From 83915e7e8d993bef58f81a9877e1e53d7be8603b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:42:29 +0000 Subject: [PATCH 1/8] Initial plan From 4271db1492797dc74da07950387fc19c3bd403ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:45:47 +0000 Subject: [PATCH 2/8] Align public alpha identity to DevComputaria canonical names Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- CHANGELOG.md | 2 +- LICENSE | 2 +- README.md | 8 ++- docs/MIGRATION.md | 2 +- docs/STRUCTURE.md | 2 +- docs/USAGE.md | 2 +- ...6fc8a66475f610235ef76ad002a75fec5e572.json | 2 +- ...5877bbcd419caeb0cbc35df71a02c41f51e41.json | 2 +- examples/transfer/framework/capabilities.json | 2 +- examples/transfer/framework/language.md | 2 +- .../framework/schemas/Actor.schema.json | 2 +- .../framework/schemas/Behavior.schema.json | 2 +- .../schemas/BoundedContext.schema.json | 2 +- .../schemas/BusinessRule.schema.json | 2 +- .../framework/schemas/Decision.schema.json | 2 +- .../framework/schemas/Evidence.schema.json | 2 +- .../framework/schemas/FactType.schema.json | 2 +- .../framework/schemas/Journey.schema.json | 2 +- .../schemas/OpenQuestion.schema.json | 2 +- .../framework/schemas/Process.schema.json | 2 +- .../framework/schemas/Requirement.schema.json | 2 +- .../framework/schemas/Term.schema.json | 2 +- .../framework/schemas/UseCase.schema.json | 2 +- .../framework/schemas/artifact.schema.json | 28 +++++----- .../framework/schemas/config.schema.json | 2 +- examples/transfer/intent.config.yaml | 2 +- examples/transfer/notes/design.md | 4 +- examples/transfer/product/actors/ACT-001.yaml | 2 +- .../transfer/product/decisions/DEC-001.yaml | 2 +- .../transfer/product/journeys/JRN-001.yaml | 2 +- .../transfer/product/processes/PROC-001.yaml | 2 +- .../product/requirements/REQ-001.yaml | 2 +- examples/transfer/product/rules/BR-001.yaml | 2 +- .../transfer/product/use-cases/UC-001.yaml | 2 +- .../transfer/product/vocabulary/CTX-001.yaml | 2 +- .../transfer/product/vocabulary/FACT-001.yaml | 2 +- .../transfer/product/vocabulary/FACT-002.yaml | 2 +- .../transfer/product/vocabulary/TERM-001.yaml | 2 +- framework/capabilities.json | 2 +- framework/language.md | 2 +- framework/schemas/Actor.schema.json | 2 +- framework/schemas/Behavior.schema.json | 2 +- framework/schemas/BoundedContext.schema.json | 2 +- framework/schemas/BusinessRule.schema.json | 2 +- framework/schemas/Decision.schema.json | 2 +- framework/schemas/Evidence.schema.json | 2 +- framework/schemas/FactType.schema.json | 2 +- framework/schemas/Journey.schema.json | 2 +- framework/schemas/OpenQuestion.schema.json | 2 +- framework/schemas/Process.schema.json | 2 +- framework/schemas/Requirement.schema.json | 2 +- framework/schemas/Term.schema.json | 2 +- framework/schemas/UseCase.schema.json | 2 +- framework/schemas/artifact.schema.json | 28 +++++----- framework/schemas/config.schema.json | 2 +- package-lock.json | 4 +- package.json | 2 +- scripts/generate-schemas.py | 6 +-- src/domain/model.ts | 2 +- templates/product/actors/ACT-001.yaml | 2 +- templates/product/decisions/DEC-001.yaml | 2 +- templates/product/journeys/JRN-001.yaml | 2 +- templates/product/processes/PROC-001.yaml | 2 +- templates/product/requirements/REQ-001.yaml | 2 +- templates/product/rules/BR-001.yaml | 2 +- templates/product/use-cases/UC-001.yaml | 2 +- templates/product/vocabulary/CTX-001.yaml | 2 +- templates/product/vocabulary/FACT-001.yaml | 2 +- templates/product/vocabulary/FACT-002.yaml | 2 +- templates/product/vocabulary/TERM-001.yaml | 2 +- tests/identity.test.mjs | 54 +++++++++++++++++++ 71 files changed, 159 insertions(+), 101 deletions(-) create mode 100644 tests/identity.test.mjs diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f45375..27e5b89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Renomeada a ferramenta para PRD as a Code, com pacote `@marcialwushu/prd-as-code` e executável `prd`. +- Renomeada a ferramenta para PRD as a Code, com pacote `@devcomputaria/prd-as-code` e executável `prd`. ## 0.2.0-alpha.1 diff --git a/LICENSE b/LICENSE index 650ed44..5fc6c5d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 prodshape contributors +Copyright (c) 2026 DevComputaria Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 941d816..82764aa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # PRD as a Code +[![CI](https://github.com/DevComputaria/prd-as-code/actions/workflows/ci.yml/badge.svg)](https://github.com/DevComputaria/prd-as-code/actions/workflows/ci.yml) + **Product Requirements Document as Code em YAML, Markdown e Gherkin.** Framework TypeScript e CLI `prd` para vocabulário, regras, requisitos, decisões, processos e evidências versionadas. -Versão **0.2.0-alpha.1**. Um monólito modular, distribuído como um pacote npm. Este projeto evolui o protótipo independente criado nesta conversa; não é o ProductShape original e não declara compatibilidade com seu formato. +> Status: **alpha** · CLI local · pacote npm **ainda não publicado** (`@devcomputaria/prd-as-code`). + +Versão **0.2.0-alpha.1**. Um monólito modular, distribuído como um pacote npm. Este projeto evolui um protótipo independente anterior; não é o ProductShape original e não declara compatibilidade com seu formato. ## Começar @@ -43,7 +47,7 @@ projeto de desenvolvimento. Sem instalação global, execute `node dist/interfaces/cli/main.js` a partir deste repositório. O pacote não foi publicado no npm. Para instalar em outro projeto, use o arquivo `.tgz` fornecido ou gere um com `npm pack`; instale esse arquivo como dependência de desenvolvimento e versione o lockfile. ```sh -npm install --save-dev /caminho/marcialwushu-prd-as-code-0.2.0-alpha.1.tgz +npm install --save-dev /caminho/devcomputaria-prd-as-code-0.2.0-alpha.1.tgz npm exec --no -- prd validate --strict ``` diff --git a/docs/MIGRATION.md b/docs/MIGRATION.md index 2f1888b..d39583c 100644 --- a/docs/MIGRATION.md +++ b/docs/MIGRATION.md @@ -10,7 +10,7 @@ prd -C ../produto-antigo validate prd -C ../produto-antigo legacy citations check ``` -A migração reconhece apenas o formato do protótipo independente v0 desta conversa. Não reconhece ProductShape oficial. +A migração reconhece apenas o formato do protótipo independente v0 deste repositório. Não reconhece ProductShape oficial. Cria intent.config.yaml e intent-product/; preserva prodshape.json, product/, .prodshape/ e documentos com citações antigas. Os IDs são mantidos e os digests antigos são registrados no mapa `.intent/migrations/prodshape-v0.json`. Algoritmos diferentes não produzem necessariamente o mesmo digest. diff --git a/docs/STRUCTURE.md b/docs/STRUCTURE.md index 22560e5..57c7dc3 100644 --- a/docs/STRUCTURE.md +++ b/docs/STRUCTURE.md @@ -1,6 +1,6 @@ # Estrutura refatorada -Nome: PRD as a Code. Executável: `prd`. Pacote único: `@marcialwushu/prd-as-code`. +Nome: PRD as a Code. Executável: `prd`. Pacote único: `@devcomputaria/prd-as-code`. ## Mapa rápido diff --git a/docs/USAGE.md b/docs/USAGE.md index 8d3ef9b..727cb20 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -39,7 +39,7 @@ O lock e estados transitórios indicados no `.gitignore` não devem ser commitad Todo YAML começa com o envelope comum. Este é um requisito mínimo válido: ```yaml -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Requirement metadata: id: REQ-TRANSFER-001 diff --git a/examples/transfer/.intent/snapshots/804ce961a3274c0ba80055752b46fc8a66475f610235ef76ad002a75fec5e572.json b/examples/transfer/.intent/snapshots/804ce961a3274c0ba80055752b46fc8a66475f610235ef76ad002a75fec5e572.json index ee6c16f..6aea69d 100644 --- a/examples/transfer/.intent/snapshots/804ce961a3274c0ba80055752b46fc8a66475f610235ef76ad002a75fec5e572.json +++ b/examples/transfer/.intent/snapshots/804ce961a3274c0ba80055752b46fc8a66475f610235ef76ad002a75fec5e572.json @@ -1 +1 @@ -{"artifact":{"apiVersion":"intent.gitreverse/v1alpha1","kind":"Requirement","links":[{"relation":"governed-by","target":"BR-001"},{"relation":"realized-by","target":"PROC-001#avaliar"}],"metadata":{"id":"REQ-001","status":"active","title":"Avaliar conta e saldo"},"spec":{"acceptance":["Conta inativa resulta em CONTA_INATIVA.","Conta ativa sem saldo suficiente resulta em SALDO_INSUFICIENTE.","Conta ativa com saldo suficiente resulta em ELEGIVEL."],"attributes":{"priority":"high"},"category":"functional","profile":"reqif-core/v1","statement":"Neste exemplo didático, a transferência é elegível quando a conta está ativa e possui saldo suficiente."}},"body":"","canonicalization":"intent/v1"} \ No newline at end of file +{"artifact":{"apiVersion":"prd.devcomputaria/v1alpha1","kind":"Requirement","links":[{"relation":"governed-by","target":"BR-001"},{"relation":"realized-by","target":"PROC-001#avaliar"}],"metadata":{"id":"REQ-001","status":"active","title":"Avaliar conta e saldo"},"spec":{"acceptance":["Conta inativa resulta em CONTA_INATIVA.","Conta ativa sem saldo suficiente resulta em SALDO_INSUFICIENTE.","Conta ativa com saldo suficiente resulta em ELEGIVEL."],"attributes":{"priority":"high"},"category":"functional","profile":"reqif-core/v1","statement":"Neste exemplo didático, a transferência é elegível quando a conta está ativa e possui saldo suficiente."}},"body":"","canonicalization":"intent/v1"} \ No newline at end of file diff --git a/examples/transfer/.intent/snapshots/d6c280ed2a9dd38426ec527fc8a5877bbcd419caeb0cbc35df71a02c41f51e41.json b/examples/transfer/.intent/snapshots/d6c280ed2a9dd38426ec527fc8a5877bbcd419caeb0cbc35df71a02c41f51e41.json index 0d12725..e76ccf5 100644 --- a/examples/transfer/.intent/snapshots/d6c280ed2a9dd38426ec527fc8a5877bbcd419caeb0cbc35df71a02c41f51e41.json +++ b/examples/transfer/.intent/snapshots/d6c280ed2a9dd38426ec527fc8a5877bbcd419caeb0cbc35df71a02c41f51e41.json @@ -1 +1 @@ -{"artifact":{"apiVersion":"intent.gitreverse/v1alpha1","kind":"BusinessRule","metadata":{"id":"BR-001","status":"active","title":"Conta de origem ativa"},"spec":{"formulation":{"assertion":{"implies":{"if":{"bindings":{"transfer":"t"},"factRef":"FACT-001"},"then":{"bindings":{"transfer":"t"},"factRef":"FACT-002"}}},"forEach":{"conceptRef":"TERM-001","variable":"t"},"modality":"obligation"},"profile":"sbvr-core/v1","statement":"Toda transferência elegível deve ter conta de origem ativa."}},"body":"","canonicalization":"intent/v1"} \ No newline at end of file +{"artifact":{"apiVersion":"prd.devcomputaria/v1alpha1","kind":"BusinessRule","metadata":{"id":"BR-001","status":"active","title":"Conta de origem ativa"},"spec":{"formulation":{"assertion":{"implies":{"if":{"bindings":{"transfer":"t"},"factRef":"FACT-001"},"then":{"bindings":{"transfer":"t"},"factRef":"FACT-002"}}},"forEach":{"conceptRef":"TERM-001","variable":"t"},"modality":"obligation"},"profile":"sbvr-core/v1","statement":"Toda transferência elegível deve ter conta de origem ativa."}},"body":"","canonicalization":"intent/v1"} \ No newline at end of file diff --git a/examples/transfer/framework/capabilities.json b/examples/transfer/framework/capabilities.json index 000370c..a1cbc05 100644 --- a/examples/transfer/framework/capabilities.json +++ b/examples/transfer/framework/capabilities.json @@ -1,6 +1,6 @@ { "version": "0.2.0-alpha.1", - "language": "intent.gitreverse/v1alpha1", + "language": "prd.devcomputaria/v1alpha1", "xml": false, "profiles": { "product-core/v1": { diff --git a/examples/transfer/framework/language.md b/examples/transfer/framework/language.md index 3cdf17a..422b673 100644 --- a/examples/transfer/framework/language.md +++ b/examples/transfer/framework/language.md @@ -9,7 +9,7 @@ Os schemas publicados aqui são contratos próprios, inspirados nos metamodelos ## Envelope ```yaml -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Requirement metadata: id: REQ-001 diff --git a/examples/transfer/framework/schemas/Actor.schema.json b/examples/transfer/framework/schemas/Actor.schema.json index 522d6e0..42d6d16 100644 --- a/examples/transfer/framework/schemas/Actor.schema.json +++ b/examples/transfer/framework/schemas/Actor.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Actor" diff --git a/examples/transfer/framework/schemas/Behavior.schema.json b/examples/transfer/framework/schemas/Behavior.schema.json index 508ac9c..424dfb3 100644 --- a/examples/transfer/framework/schemas/Behavior.schema.json +++ b/examples/transfer/framework/schemas/Behavior.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Behavior" diff --git a/examples/transfer/framework/schemas/BoundedContext.schema.json b/examples/transfer/framework/schemas/BoundedContext.schema.json index f85fbba..637f9b4 100644 --- a/examples/transfer/framework/schemas/BoundedContext.schema.json +++ b/examples/transfer/framework/schemas/BoundedContext.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BoundedContext" diff --git a/examples/transfer/framework/schemas/BusinessRule.schema.json b/examples/transfer/framework/schemas/BusinessRule.schema.json index a33c4d3..ec77811 100644 --- a/examples/transfer/framework/schemas/BusinessRule.schema.json +++ b/examples/transfer/framework/schemas/BusinessRule.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BusinessRule" diff --git a/examples/transfer/framework/schemas/Decision.schema.json b/examples/transfer/framework/schemas/Decision.schema.json index a4c7b25..0e2b324 100644 --- a/examples/transfer/framework/schemas/Decision.schema.json +++ b/examples/transfer/framework/schemas/Decision.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Decision" diff --git a/examples/transfer/framework/schemas/Evidence.schema.json b/examples/transfer/framework/schemas/Evidence.schema.json index f441a74..e997f04 100644 --- a/examples/transfer/framework/schemas/Evidence.schema.json +++ b/examples/transfer/framework/schemas/Evidence.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Evidence" diff --git a/examples/transfer/framework/schemas/FactType.schema.json b/examples/transfer/framework/schemas/FactType.schema.json index 0a0cd0d..3d92b78 100644 --- a/examples/transfer/framework/schemas/FactType.schema.json +++ b/examples/transfer/framework/schemas/FactType.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "FactType" diff --git a/examples/transfer/framework/schemas/Journey.schema.json b/examples/transfer/framework/schemas/Journey.schema.json index a73b78a..9cba891 100644 --- a/examples/transfer/framework/schemas/Journey.schema.json +++ b/examples/transfer/framework/schemas/Journey.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Journey" diff --git a/examples/transfer/framework/schemas/OpenQuestion.schema.json b/examples/transfer/framework/schemas/OpenQuestion.schema.json index f7b51c7..1af6a99 100644 --- a/examples/transfer/framework/schemas/OpenQuestion.schema.json +++ b/examples/transfer/framework/schemas/OpenQuestion.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "OpenQuestion" diff --git a/examples/transfer/framework/schemas/Process.schema.json b/examples/transfer/framework/schemas/Process.schema.json index 9341f4b..baeecab 100644 --- a/examples/transfer/framework/schemas/Process.schema.json +++ b/examples/transfer/framework/schemas/Process.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Process" diff --git a/examples/transfer/framework/schemas/Requirement.schema.json b/examples/transfer/framework/schemas/Requirement.schema.json index a8693c7..6561a6c 100644 --- a/examples/transfer/framework/schemas/Requirement.schema.json +++ b/examples/transfer/framework/schemas/Requirement.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Requirement" diff --git a/examples/transfer/framework/schemas/Term.schema.json b/examples/transfer/framework/schemas/Term.schema.json index 328918c..e5713a4 100644 --- a/examples/transfer/framework/schemas/Term.schema.json +++ b/examples/transfer/framework/schemas/Term.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Term" diff --git a/examples/transfer/framework/schemas/UseCase.schema.json b/examples/transfer/framework/schemas/UseCase.schema.json index 65c2191..ec51a93 100644 --- a/examples/transfer/framework/schemas/UseCase.schema.json +++ b/examples/transfer/framework/schemas/UseCase.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "UseCase" diff --git a/examples/transfer/framework/schemas/artifact.schema.json b/examples/transfer/framework/schemas/artifact.schema.json index e3171cb..eeee2c1 100644 --- a/examples/transfer/framework/schemas/artifact.schema.json +++ b/examples/transfer/framework/schemas/artifact.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://gitreverse.dev/schemas/intent/v1alpha1/artifact", + "$id": "https://prd.devcomputaria/schemas/artifact", "$defs": { "expression": { "oneOf": [ @@ -102,7 +102,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Actor" @@ -196,7 +196,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Journey" @@ -290,7 +290,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "UseCase" @@ -384,7 +384,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BoundedContext" @@ -478,7 +478,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Term" @@ -580,7 +580,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "FactType" @@ -697,7 +697,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BusinessRule" @@ -831,7 +831,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Requirement" @@ -978,7 +978,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Decision" @@ -1221,7 +1221,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Process" @@ -1389,7 +1389,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Behavior" @@ -1505,7 +1505,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Evidence" @@ -1631,7 +1631,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "OpenQuestion" diff --git a/examples/transfer/framework/schemas/config.schema.json b/examples/transfer/framework/schemas/config.schema.json index 6feb361..8d177f1 100644 --- a/examples/transfer/framework/schemas/config.schema.json +++ b/examples/transfer/framework/schemas/config.schema.json @@ -2,7 +2,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "name": { "type": "string", diff --git a/examples/transfer/intent.config.yaml b/examples/transfer/intent.config.yaml index a4937c4..f3abb59 100644 --- a/examples/transfer/intent.config.yaml +++ b/examples/transfer/intent.config.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 name: Transfer language: pt product: product diff --git a/examples/transfer/notes/design.md b/examples/transfer/notes/design.md index 8d7d957..5dd4f6d 100644 --- a/examples/transfer/notes/design.md +++ b/examples/transfer/notes/design.md @@ -3,7 +3,7 @@ > { > "artifact": { -> "apiVersion": "intent.gitreverse/v1alpha1", +> "apiVersion": "prd.devcomputaria/v1alpha1", > "kind": "BusinessRule", > "metadata": { > "id": "BR-001", @@ -46,7 +46,7 @@ > { > "artifact": { -> "apiVersion": "intent.gitreverse/v1alpha1", +> "apiVersion": "prd.devcomputaria/v1alpha1", > "kind": "Requirement", > "links": [ > { diff --git a/examples/transfer/product/actors/ACT-001.yaml b/examples/transfer/product/actors/ACT-001.yaml index 5d2aba7..0aa9ae1 100644 --- a/examples/transfer/product/actors/ACT-001.yaml +++ b/examples/transfer/product/actors/ACT-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Actor metadata: id: ACT-001 diff --git a/examples/transfer/product/decisions/DEC-001.yaml b/examples/transfer/product/decisions/DEC-001.yaml index 2470fb3..f03ece8 100644 --- a/examples/transfer/product/decisions/DEC-001.yaml +++ b/examples/transfer/product/decisions/DEC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Decision metadata: id: DEC-001 diff --git a/examples/transfer/product/journeys/JRN-001.yaml b/examples/transfer/product/journeys/JRN-001.yaml index 12656af..c526969 100644 --- a/examples/transfer/product/journeys/JRN-001.yaml +++ b/examples/transfer/product/journeys/JRN-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Journey metadata: id: JRN-001 diff --git a/examples/transfer/product/processes/PROC-001.yaml b/examples/transfer/product/processes/PROC-001.yaml index 9f56fef..1a9343b 100644 --- a/examples/transfer/product/processes/PROC-001.yaml +++ b/examples/transfer/product/processes/PROC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Process metadata: id: PROC-001 diff --git a/examples/transfer/product/requirements/REQ-001.yaml b/examples/transfer/product/requirements/REQ-001.yaml index ef25df2..b8a6d0d 100644 --- a/examples/transfer/product/requirements/REQ-001.yaml +++ b/examples/transfer/product/requirements/REQ-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Requirement metadata: id: REQ-001 diff --git a/examples/transfer/product/rules/BR-001.yaml b/examples/transfer/product/rules/BR-001.yaml index 878b45f..592b4ee 100644 --- a/examples/transfer/product/rules/BR-001.yaml +++ b/examples/transfer/product/rules/BR-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: BusinessRule metadata: id: BR-001 diff --git a/examples/transfer/product/use-cases/UC-001.yaml b/examples/transfer/product/use-cases/UC-001.yaml index 4fcc1e9..dc56d16 100644 --- a/examples/transfer/product/use-cases/UC-001.yaml +++ b/examples/transfer/product/use-cases/UC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: UseCase metadata: id: UC-001 diff --git a/examples/transfer/product/vocabulary/CTX-001.yaml b/examples/transfer/product/vocabulary/CTX-001.yaml index 58ffd07..cffbaa8 100644 --- a/examples/transfer/product/vocabulary/CTX-001.yaml +++ b/examples/transfer/product/vocabulary/CTX-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: BoundedContext metadata: id: CTX-001 diff --git a/examples/transfer/product/vocabulary/FACT-001.yaml b/examples/transfer/product/vocabulary/FACT-001.yaml index da6d693..5fc7a9b 100644 --- a/examples/transfer/product/vocabulary/FACT-001.yaml +++ b/examples/transfer/product/vocabulary/FACT-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: FactType metadata: id: FACT-001 diff --git a/examples/transfer/product/vocabulary/FACT-002.yaml b/examples/transfer/product/vocabulary/FACT-002.yaml index 3946900..b48d280 100644 --- a/examples/transfer/product/vocabulary/FACT-002.yaml +++ b/examples/transfer/product/vocabulary/FACT-002.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: FactType metadata: id: FACT-002 diff --git a/examples/transfer/product/vocabulary/TERM-001.yaml b/examples/transfer/product/vocabulary/TERM-001.yaml index 6acef31..2e1a565 100644 --- a/examples/transfer/product/vocabulary/TERM-001.yaml +++ b/examples/transfer/product/vocabulary/TERM-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Term metadata: id: TERM-001 diff --git a/framework/capabilities.json b/framework/capabilities.json index 000370c..a1cbc05 100644 --- a/framework/capabilities.json +++ b/framework/capabilities.json @@ -1,6 +1,6 @@ { "version": "0.2.0-alpha.1", - "language": "intent.gitreverse/v1alpha1", + "language": "prd.devcomputaria/v1alpha1", "xml": false, "profiles": { "product-core/v1": { diff --git a/framework/language.md b/framework/language.md index 3cdf17a..422b673 100644 --- a/framework/language.md +++ b/framework/language.md @@ -9,7 +9,7 @@ Os schemas publicados aqui são contratos próprios, inspirados nos metamodelos ## Envelope ```yaml -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Requirement metadata: id: REQ-001 diff --git a/framework/schemas/Actor.schema.json b/framework/schemas/Actor.schema.json index 522d6e0..42d6d16 100644 --- a/framework/schemas/Actor.schema.json +++ b/framework/schemas/Actor.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Actor" diff --git a/framework/schemas/Behavior.schema.json b/framework/schemas/Behavior.schema.json index 508ac9c..424dfb3 100644 --- a/framework/schemas/Behavior.schema.json +++ b/framework/schemas/Behavior.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Behavior" diff --git a/framework/schemas/BoundedContext.schema.json b/framework/schemas/BoundedContext.schema.json index f85fbba..637f9b4 100644 --- a/framework/schemas/BoundedContext.schema.json +++ b/framework/schemas/BoundedContext.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BoundedContext" diff --git a/framework/schemas/BusinessRule.schema.json b/framework/schemas/BusinessRule.schema.json index a33c4d3..ec77811 100644 --- a/framework/schemas/BusinessRule.schema.json +++ b/framework/schemas/BusinessRule.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BusinessRule" diff --git a/framework/schemas/Decision.schema.json b/framework/schemas/Decision.schema.json index a4c7b25..0e2b324 100644 --- a/framework/schemas/Decision.schema.json +++ b/framework/schemas/Decision.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Decision" diff --git a/framework/schemas/Evidence.schema.json b/framework/schemas/Evidence.schema.json index f441a74..e997f04 100644 --- a/framework/schemas/Evidence.schema.json +++ b/framework/schemas/Evidence.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Evidence" diff --git a/framework/schemas/FactType.schema.json b/framework/schemas/FactType.schema.json index 0a0cd0d..3d92b78 100644 --- a/framework/schemas/FactType.schema.json +++ b/framework/schemas/FactType.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "FactType" diff --git a/framework/schemas/Journey.schema.json b/framework/schemas/Journey.schema.json index a73b78a..9cba891 100644 --- a/framework/schemas/Journey.schema.json +++ b/framework/schemas/Journey.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Journey" diff --git a/framework/schemas/OpenQuestion.schema.json b/framework/schemas/OpenQuestion.schema.json index f7b51c7..1af6a99 100644 --- a/framework/schemas/OpenQuestion.schema.json +++ b/framework/schemas/OpenQuestion.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "OpenQuestion" diff --git a/framework/schemas/Process.schema.json b/framework/schemas/Process.schema.json index 9341f4b..baeecab 100644 --- a/framework/schemas/Process.schema.json +++ b/framework/schemas/Process.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Process" diff --git a/framework/schemas/Requirement.schema.json b/framework/schemas/Requirement.schema.json index a8693c7..6561a6c 100644 --- a/framework/schemas/Requirement.schema.json +++ b/framework/schemas/Requirement.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Requirement" diff --git a/framework/schemas/Term.schema.json b/framework/schemas/Term.schema.json index 328918c..e5713a4 100644 --- a/framework/schemas/Term.schema.json +++ b/framework/schemas/Term.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Term" diff --git a/framework/schemas/UseCase.schema.json b/framework/schemas/UseCase.schema.json index 65c2191..ec51a93 100644 --- a/framework/schemas/UseCase.schema.json +++ b/framework/schemas/UseCase.schema.json @@ -99,7 +99,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "UseCase" diff --git a/framework/schemas/artifact.schema.json b/framework/schemas/artifact.schema.json index e3171cb..eeee2c1 100644 --- a/framework/schemas/artifact.schema.json +++ b/framework/schemas/artifact.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://gitreverse.dev/schemas/intent/v1alpha1/artifact", + "$id": "https://prd.devcomputaria/schemas/artifact", "$defs": { "expression": { "oneOf": [ @@ -102,7 +102,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Actor" @@ -196,7 +196,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Journey" @@ -290,7 +290,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "UseCase" @@ -384,7 +384,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BoundedContext" @@ -478,7 +478,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Term" @@ -580,7 +580,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "FactType" @@ -697,7 +697,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "BusinessRule" @@ -831,7 +831,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Requirement" @@ -978,7 +978,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Decision" @@ -1221,7 +1221,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Process" @@ -1389,7 +1389,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Behavior" @@ -1505,7 +1505,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "Evidence" @@ -1631,7 +1631,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "kind": { "const": "OpenQuestion" diff --git a/framework/schemas/config.schema.json b/framework/schemas/config.schema.json index 6feb361..8d177f1 100644 --- a/framework/schemas/config.schema.json +++ b/framework/schemas/config.schema.json @@ -2,7 +2,7 @@ "type": "object", "properties": { "apiVersion": { - "const": "intent.gitreverse/v1alpha1" + "const": "prd.devcomputaria/v1alpha1" }, "name": { "type": "string", diff --git a/package-lock.json b/package-lock.json index fcee77a..7d6c4ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@marcialwushu/prd-as-code", + "name": "@devcomputaria/prd-as-code", "version": "0.2.0-alpha.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@marcialwushu/prd-as-code", + "name": "@devcomputaria/prd-as-code", "version": "0.2.0-alpha.1", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 14055bf..234540f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@marcialwushu/prd-as-code", + "name": "@devcomputaria/prd-as-code", "version": "0.2.0-alpha.1", "description": "Product as Code: vocabulary, rules, requirements, decisions, processes and verifiable behavior.", "type": "module", diff --git a/scripts/generate-schemas.py b/scripts/generate-schemas.py index b71930a..bc48724 100644 --- a/scripts/generate-schemas.py +++ b/scripts/generate-schemas.py @@ -23,12 +23,12 @@ def const(v):return {'const':v} specs['Evidence']=obj({'profile':const('evidence/v1'),'subjectRef':ident,'subjectDigest':{'type':'string','pattern':'^sha256:[a-f0-9]{64}$'},'commit':s,'producer':s,'executedAt':s,'outcome':{'enum':['passed','failed','inconclusive']},'resultPath':s},['profile','subjectRef','subjectDigest','commit','producer','executedAt','outcome']) specs['OpenQuestion']=obj({'profile':const('product-core/v1'),'question':s,'blocking':{'type':'boolean'},'suggestions':arr(s)},['profile','question','blocking']) meta=obj({'id':ident,'title':s,'status':{'enum':['draft','active','deprecated']}}) -def artifact(kind,spec):return obj({'apiVersion':const('intent.gitreverse/v1alpha1'),'kind':const(kind),'metadata':meta,'spec':spec,'links':arr(link)},['apiVersion','kind','metadata','spec']) -umbrella={'$schema':'http://json-schema.org/draft-07/schema#','$id':'https://gitreverse.dev/schemas/intent/v1alpha1/artifact','$defs':{'expression':expr},'oneOf':[artifact(k,v) for k,v in specs.items()]} +def artifact(kind,spec):return obj({'apiVersion':const('prd.devcomputaria/v1alpha1'),'kind':const(kind),'metadata':meta,'spec':spec,'links':arr(link)},['apiVersion','kind','metadata','spec']) +umbrella={'$schema':'http://json-schema.org/draft-07/schema#','$id':'https://prd.devcomputaria/schemas/artifact','$defs':{'expression':expr},'oneOf':[artifact(k,v) for k,v in specs.items()]} # IDs are identifiers, not remotely fetched schemas; validation always loads local files. (r/'artifact.schema.json').write_text(json.dumps(umbrella,ensure_ascii=False,indent=2)+'\n') for k,v in specs.items(): schema={'$schema':'http://json-schema.org/draft-07/schema#','$defs':{'expression':expr},**artifact(k,v)} (r/(k+'.schema.json')).write_text(json.dumps(schema,ensure_ascii=False,indent=2)+'\n') -config=obj({'apiVersion':const('intent.gitreverse/v1alpha1'),'name':s,'language':{'enum':['pt','en']},'product':s,'policies':obj({'requireCitations':{'type':'boolean'}})}) +config=obj({'apiVersion':const('prd.devcomputaria/v1alpha1'),'name':s,'language':{'enum':['pt','en']},'product':s,'policies':obj({'requireCitations':{'type':'boolean'}})}) (r/'config.schema.json').write_text(json.dumps(config,indent=2)+'\n') diff --git a/src/domain/model.ts b/src/domain/model.ts index dec9d11..e1fd028 100644 --- a/src/domain/model.ts +++ b/src/domain/model.ts @@ -1,4 +1,4 @@ -export const API_VERSION = 'intent.gitreverse/v1alpha1'; +export const API_VERSION = 'prd.devcomputaria/v1alpha1'; export const PREFIX = { Actor: 'ACT', Journey: 'JRN', UseCase: 'UC', Term: 'TERM', BoundedContext: 'CTX', FactType: 'FACT', BusinessRule: 'BR', Requirement: 'REQ', Decision: 'DEC', diff --git a/templates/product/actors/ACT-001.yaml b/templates/product/actors/ACT-001.yaml index 5d2aba7..0aa9ae1 100644 --- a/templates/product/actors/ACT-001.yaml +++ b/templates/product/actors/ACT-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Actor metadata: id: ACT-001 diff --git a/templates/product/decisions/DEC-001.yaml b/templates/product/decisions/DEC-001.yaml index 2470fb3..f03ece8 100644 --- a/templates/product/decisions/DEC-001.yaml +++ b/templates/product/decisions/DEC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Decision metadata: id: DEC-001 diff --git a/templates/product/journeys/JRN-001.yaml b/templates/product/journeys/JRN-001.yaml index 12656af..c526969 100644 --- a/templates/product/journeys/JRN-001.yaml +++ b/templates/product/journeys/JRN-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Journey metadata: id: JRN-001 diff --git a/templates/product/processes/PROC-001.yaml b/templates/product/processes/PROC-001.yaml index 9f56fef..1a9343b 100644 --- a/templates/product/processes/PROC-001.yaml +++ b/templates/product/processes/PROC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Process metadata: id: PROC-001 diff --git a/templates/product/requirements/REQ-001.yaml b/templates/product/requirements/REQ-001.yaml index ef25df2..b8a6d0d 100644 --- a/templates/product/requirements/REQ-001.yaml +++ b/templates/product/requirements/REQ-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Requirement metadata: id: REQ-001 diff --git a/templates/product/rules/BR-001.yaml b/templates/product/rules/BR-001.yaml index 878b45f..592b4ee 100644 --- a/templates/product/rules/BR-001.yaml +++ b/templates/product/rules/BR-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: BusinessRule metadata: id: BR-001 diff --git a/templates/product/use-cases/UC-001.yaml b/templates/product/use-cases/UC-001.yaml index 4fcc1e9..dc56d16 100644 --- a/templates/product/use-cases/UC-001.yaml +++ b/templates/product/use-cases/UC-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: UseCase metadata: id: UC-001 diff --git a/templates/product/vocabulary/CTX-001.yaml b/templates/product/vocabulary/CTX-001.yaml index 58ffd07..cffbaa8 100644 --- a/templates/product/vocabulary/CTX-001.yaml +++ b/templates/product/vocabulary/CTX-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: BoundedContext metadata: id: CTX-001 diff --git a/templates/product/vocabulary/FACT-001.yaml b/templates/product/vocabulary/FACT-001.yaml index da6d693..5fc7a9b 100644 --- a/templates/product/vocabulary/FACT-001.yaml +++ b/templates/product/vocabulary/FACT-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: FactType metadata: id: FACT-001 diff --git a/templates/product/vocabulary/FACT-002.yaml b/templates/product/vocabulary/FACT-002.yaml index 3946900..b48d280 100644 --- a/templates/product/vocabulary/FACT-002.yaml +++ b/templates/product/vocabulary/FACT-002.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: FactType metadata: id: FACT-002 diff --git a/templates/product/vocabulary/TERM-001.yaml b/templates/product/vocabulary/TERM-001.yaml index 6acef31..2e1a565 100644 --- a/templates/product/vocabulary/TERM-001.yaml +++ b/templates/product/vocabulary/TERM-001.yaml @@ -1,4 +1,4 @@ -apiVersion: intent.gitreverse/v1alpha1 +apiVersion: prd.devcomputaria/v1alpha1 kind: Term metadata: id: TERM-001 diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs new file mode 100644 index 0000000..d3d978c --- /dev/null +++ b/tests/identity.test.mjs @@ -0,0 +1,54 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { join, relative } from 'node:path'; + +const root = process.cwd(); + +function walk(dir, out = []) { + for (const name of readdirSync(dir)) { + if (name === '.git' || name === 'node_modules' || name === 'dist') continue; + const full = join(dir, name); + const stat = statSync(full); + if (stat.isDirectory()) walk(full, out); + else out.push(full); + } + return out; +} + +test('canonical package identity is used in package metadata', () => { + const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + const lock = JSON.parse(readFileSync(join(root, 'package-lock.json'), 'utf8')); + assert.equal(pkg.name, '@devcomputaria/prd-as-code'); + assert.equal(lock.name, '@devcomputaria/prd-as-code'); + assert.equal(lock.packages[''].name, '@devcomputaria/prd-as-code'); +}); + +test('canonical apiVersion and schema IDs are used in generated schemas', () => { + const schemaDir = join(root, 'framework', 'schemas'); + for (const file of readdirSync(schemaDir).filter(name => name.endsWith('.schema.json'))) { + const schema = JSON.parse(readFileSync(join(schemaDir, file), 'utf8')); + if (schema.$id) assert.match(schema.$id, /^https:\/\/prd\.devcomputaria\/schemas\//); + const asText = JSON.stringify(schema); + assert.ok(asText.includes('prd.devcomputaria/v1alpha1'), file); + assert.ok(!asText.includes('intent.gitreverse/v1alpha1'), file); + assert.ok(!asText.includes('gitreverse.dev/schemas'), file); + } +}); + +test('public repository surfaces do not expose deprecated public identity strings', () => { + const banned = [ + '@marcialwushu/prd-as-code', + 'marcialwushu-prd-as-code', + 'intent.gitreverse/v1alpha1', + 'gitreverse.dev/schemas', + 'criado nesta conversa', + ]; + const files = walk(root).filter(path => /\.(md|json|ya?ml|ts|py)$/i.test(path)); + for (const path of files) { + const text = readFileSync(path, 'utf8'); + for (const token of banned) { + assert.ok(!text.includes(token), `${token} found in ${relative(root, path)}`); + } + } +}); From fdafb8e7384e253ae744711ec23258b6a0f7e061 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:47:26 +0000 Subject: [PATCH 3/8] Exclude tests folder from public-identity scan Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index d3d978c..aeffb9b 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -44,7 +44,10 @@ test('public repository surfaces do not expose deprecated public identity string 'gitreverse.dev/schemas', 'criado nesta conversa', ]; - const files = walk(root).filter(path => /\.(md|json|ya?ml|ts|py)$/i.test(path)); + const files = walk(root).filter(path => { + if (relative(root, path).startsWith('tests/')) return false; + return /\.(md|json|ya?ml|ts|py)$/i.test(path); + }); for (const path of files) { const text = readFileSync(path, 'utf8'); for (const token of banned) { From 894cf0c9d9e51a956aba9ea8d16429e4ba633464 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:48:13 +0000 Subject: [PATCH 4/8] Limit identity scan to canonical public surfaces Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index aeffb9b..346c236 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -45,7 +45,10 @@ test('public repository surfaces do not expose deprecated public identity string 'criado nesta conversa', ]; const files = walk(root).filter(path => { - if (relative(root, path).startsWith('tests/')) return false; + const rel = relative(root, path).replaceAll('\\', '/'); + if (rel.startsWith('tests/')) return false; + if (rel.includes('/.intent/') || rel.includes('/.prodshape/')) return false; + if (rel.startsWith('src/legacy/')) return false; return /\.(md|json|ya?ml|ts|py)$/i.test(path); }); for (const path of files) { From 3eadc399c65136b34ba1b9a54a51739b81459e21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:49:01 +0000 Subject: [PATCH 5/8] Exclude root compatibility dirs from identity surface test Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index 346c236..31f73a4 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -47,6 +47,7 @@ test('public repository surfaces do not expose deprecated public identity string const files = walk(root).filter(path => { const rel = relative(root, path).replaceAll('\\', '/'); if (rel.startsWith('tests/')) return false; + if (rel.startsWith('.intent/') || rel.startsWith('.prodshape/')) return false; if (rel.includes('/.intent/') || rel.includes('/.prodshape/')) return false; if (rel.startsWith('src/legacy/')) return false; return /\.(md|json|ya?ml|ts|py)$/i.test(path); From fed64159d1e20fc9b2286c6e8dcf210b2592d826 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:50:00 +0000 Subject: [PATCH 6/8] Scope deprecated-identity scan to canonical public surfaces Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index 31f73a4..2bc5add 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -1,6 +1,6 @@ import test from 'node:test'; import assert from 'node:assert/strict'; -import { readFileSync, readdirSync, statSync } from 'node:fs'; +import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'; import { join, relative } from 'node:path'; const root = process.cwd(); @@ -44,14 +44,26 @@ test('public repository surfaces do not expose deprecated public identity string 'gitreverse.dev/schemas', 'criado nesta conversa', ]; - const files = walk(root).filter(path => { - const rel = relative(root, path).replaceAll('\\', '/'); - if (rel.startsWith('tests/')) return false; - if (rel.startsWith('.intent/') || rel.startsWith('.prodshape/')) return false; - if (rel.includes('/.intent/') || rel.includes('/.prodshape/')) return false; - if (rel.startsWith('src/legacy/')) return false; - return /\.(md|json|ya?ml|ts|py)$/i.test(path); - }); + const surfaces = [ + 'README.md', + 'CHANGELOG.md', + 'LICENSE', + 'package.json', + 'docs', + 'framework', + 'templates', + 'examples', + 'scripts/generate-schemas.py', + 'src/domain/model.ts', + ]; + const files = []; + for (const surface of surfaces) { + const full = join(root, surface); + if (!existsSync(full)) continue; + const stat = statSync(full); + if (stat.isDirectory()) files.push(...walk(full).filter(path => /\.(md|json|ya?ml|ts|py)$/i.test(path))); + else files.push(full); + } for (const path of files) { const text = readFileSync(path, 'utf8'); for (const token of banned) { From 3c739abcf72d508c50db6556a696ab843dee3402 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:50:46 +0000 Subject: [PATCH 7/8] Add lockfile to canonical identity regression surfaces Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index 2bc5add..cb0ab9f 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -49,6 +49,7 @@ test('public repository surfaces do not expose deprecated public identity string 'CHANGELOG.md', 'LICENSE', 'package.json', + 'package-lock.json', 'docs', 'framework', 'templates', From 2f615070e2be7b01bd0d9f4ce49e40743e37aec2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:51:30 +0000 Subject: [PATCH 8/8] Split prohibited phrase regression from identity aliases Co-authored-by: marcialwushu <16365313+marcialwushu@users.noreply.github.com> --- tests/identity.test.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/identity.test.mjs b/tests/identity.test.mjs index cb0ab9f..e9774ac 100644 --- a/tests/identity.test.mjs +++ b/tests/identity.test.mjs @@ -42,7 +42,6 @@ test('public repository surfaces do not expose deprecated public identity string 'marcialwushu-prd-as-code', 'intent.gitreverse/v1alpha1', 'gitreverse.dev/schemas', - 'criado nesta conversa', ]; const surfaces = [ 'README.md', @@ -72,3 +71,12 @@ test('public repository surfaces do not expose deprecated public identity string } } }); + +test('prohibited phrase is absent from visible public documentation', () => { + const phrase = 'criado nesta conversa'; + const docs = [join(root, 'README.md'), join(root, 'CHANGELOG.md'), ...walk(join(root, 'docs')).filter(path => path.endsWith('.md'))]; + for (const path of docs) { + const text = readFileSync(path, 'utf8').toLowerCase(); + assert.ok(!text.includes(phrase), `${phrase} found in ${relative(root, path)}`); + } +});