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..e9774ac --- /dev/null +++ b/tests/identity.test.mjs @@ -0,0 +1,82 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { existsSync, 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', + ]; + const surfaces = [ + 'README.md', + 'CHANGELOG.md', + 'LICENSE', + 'package.json', + 'package-lock.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) { + assert.ok(!text.includes(token), `${token} found in ${relative(root, path)}`); + } + } +}); + +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)}`); + } +});