@jaimevalasek/aioson 1.30.2 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +19 -6
  3. package/docs/en/1-understand/ecosystem-map.md +45 -29
  4. package/docs/en/1-understand/glossary.md +5 -5
  5. package/docs/en/1-understand/what-is-aioson.md +5 -5
  6. package/docs/en/2-start/existing-project.md +7 -7
  7. package/docs/en/2-start/first-project.md +32 -38
  8. package/docs/en/2-start/initial-decisions.md +18 -17
  9. package/docs/en/3-recipes/README.md +2 -2
  10. package/docs/en/3-recipes/continuity-between-sessions.md +2 -2
  11. package/docs/en/3-recipes/from-idea-to-prd-via-briefing.md +5 -2
  12. package/docs/en/3-recipes/full-feature-with-sheldon.md +327 -338
  13. package/docs/en/4-agents/README.md +28 -14
  14. package/docs/en/4-agents/discovery-design-doc.md +20 -8
  15. package/docs/en/4-agents/forge-run.md +3 -2
  16. package/docs/en/5-reference/cli-reference.md +51 -48
  17. package/docs/en/5-reference/executable-verification.md +10 -7
  18. package/docs/en/5-reference/parallel.md +2 -0
  19. package/docs/en/5-reference/qa-browser.md +2 -2
  20. package/docs/en/README.md +3 -3
  21. package/docs/pt/1-entender/glossario.md +4 -4
  22. package/docs/pt/1-entender/mapa-do-ecossistema.md +32 -21
  23. package/docs/pt/2-comecar/decisoes-iniciais.md +16 -16
  24. package/docs/pt/2-comecar/primeiro-projeto.md +1 -1
  25. package/docs/pt/3-receitas/README.md +1 -1
  26. package/docs/pt/3-receitas/app-saas-do-zero.md +35 -122
  27. package/docs/pt/3-receitas/feature-completa-com-sheldon.md +289 -338
  28. package/docs/pt/4-agentes/analyst.md +9 -5
  29. package/docs/pt/4-agentes/architect.md +9 -5
  30. package/docs/pt/4-agentes/dev.md +19 -7
  31. package/docs/pt/4-agentes/discovery-design-doc.md +25 -23
  32. package/docs/pt/4-agentes/orchestrator.md +164 -118
  33. package/docs/pt/4-agentes/pentester.md +5 -5
  34. package/docs/pt/4-agentes/pm.md +15 -7
  35. package/docs/pt/4-agentes/sheldon.md +166 -99
  36. package/docs/pt/4-agentes/ux-ui.md +7 -4
  37. package/docs/pt/5-referencia/agent-chain-continuity.md +14 -5
  38. package/docs/pt/5-referencia/comandos-cli.md +1 -1
  39. package/docs/pt/5-referencia/harness-retro.md +2 -1
  40. package/docs/pt/5-referencia/sdd-automation-scripts.md +6 -6
  41. package/docs/pt/5-referencia/sdd-framework.md +53 -16
  42. package/docs/pt/5-referencia/sdd-planos-e-estrutura.md +27 -15
  43. package/docs/pt/README.md +4 -4
  44. package/docs/pt/agentes.md +48 -50
  45. package/package.json +2 -2
  46. package/src/artifact-kinds.js +110 -0
  47. package/src/cli.js +82 -42
  48. package/src/commands/agent-epilogue.js +251 -186
  49. package/src/commands/agents.js +104 -48
  50. package/src/commands/audit-code.js +344 -0
  51. package/src/commands/classify.js +75 -13
  52. package/src/commands/feature-close.js +43 -18
  53. package/src/commands/harness-check.js +259 -175
  54. package/src/commands/harness-retro-promote.js +387 -0
  55. package/src/commands/live.js +24 -0
  56. package/src/commands/prototype-check.js +163 -0
  57. package/src/commands/review-feature.js +189 -0
  58. package/src/commands/runtime.js +81 -66
  59. package/src/commands/sync-agents-copy.js +115 -0
  60. package/src/commands/verification-plan.js +116 -0
  61. package/src/commands/verify-artifact.js +530 -0
  62. package/src/commands/verify-implementation.js +428 -0
  63. package/src/commands/workflow-execute.js +309 -309
  64. package/src/commands/workflow-next.js +361 -19
  65. package/src/commands/workflow-plan.js +5 -5
  66. package/src/constants.js +4 -0
  67. package/src/gateway-pointer-merge.js +7 -1
  68. package/src/handoff-contract.js +267 -172
  69. package/src/harness/contract-integrity-gate.js +172 -0
  70. package/src/harness/contract-integrity.js +111 -0
  71. package/src/harness/contract-schema.js +377 -332
  72. package/src/harness/detect-runtime-feature.js +90 -0
  73. package/src/harness/static-criteria.js +192 -0
  74. package/src/i18n/messages/en.js +8 -4
  75. package/src/i18n/messages/es.js +8 -4
  76. package/src/i18n/messages/fr.js +8 -4
  77. package/src/i18n/messages/pt-BR.js +8 -4
  78. package/src/install-wizard.js +8 -8
  79. package/src/installer.js +13 -6
  80. package/src/lib/retro/retro-render.js +10 -1
  81. package/src/lib/retro/retro-sources.js +45 -27
  82. package/src/lib/retro/verification-reports.js +230 -0
  83. package/src/parser.js +6 -0
  84. package/src/preflight-engine.js +12 -12
  85. package/src/runtime-store.js +13 -9
  86. package/src/verification/evidence-bundle.js +251 -0
  87. package/src/verification/ledger-store.js +221 -0
  88. package/src/verification/path-policy.js +74 -0
  89. package/src/verification/policy-engine.js +95 -0
  90. package/src/verification/prompt-package.js +314 -0
  91. package/src/verification/redaction.js +77 -0
  92. package/src/verification/report-parser.js +132 -0
  93. package/src/verification/report-store.js +97 -0
  94. package/src/verification/result.js +16 -0
  95. package/src/verification/runners/index.js +319 -0
  96. package/src/verification/runtime-telemetry.js +144 -0
  97. package/src/verification/schema.js +276 -0
  98. package/src/verification/source-discovery.js +153 -0
  99. package/src/verification-policy.js +398 -0
  100. package/src/version.js +52 -1
  101. package/template/.aioson/agents/analyst.md +9 -6
  102. package/template/.aioson/agents/architect.md +34 -5
  103. package/template/.aioson/agents/briefing-refiner.md +25 -0
  104. package/template/.aioson/agents/briefing.md +69 -12
  105. package/template/.aioson/agents/committer.md +2 -1
  106. package/template/.aioson/agents/copywriter.md +30 -21
  107. package/template/.aioson/agents/design-hybrid-forge.md +28 -15
  108. package/template/.aioson/agents/dev.md +28 -10
  109. package/template/.aioson/agents/deyvin.md +3 -2
  110. package/template/.aioson/agents/discover.md +12 -3
  111. package/template/.aioson/agents/discovery-design-doc.md +7 -2
  112. package/template/.aioson/agents/genome.md +19 -10
  113. package/template/.aioson/agents/neo.md +30 -30
  114. package/template/.aioson/agents/orache.md +20 -11
  115. package/template/.aioson/agents/orchestrator.md +84 -7
  116. package/template/.aioson/agents/pm.md +8 -8
  117. package/template/.aioson/agents/product.md +15 -11
  118. package/template/.aioson/agents/profiler-enricher.md +20 -11
  119. package/template/.aioson/agents/profiler-forge.md +20 -11
  120. package/template/.aioson/agents/profiler-researcher.md +20 -11
  121. package/template/.aioson/agents/qa.md +87 -17
  122. package/template/.aioson/agents/scope-check.md +19 -5
  123. package/template/.aioson/agents/setup.md +12 -1
  124. package/template/.aioson/agents/sheldon.md +92 -9
  125. package/template/.aioson/agents/site-forge.md +11 -2
  126. package/template/.aioson/agents/squad.md +20 -5
  127. package/template/.aioson/agents/ux-ui.md +4 -2
  128. package/template/.aioson/agents/validator.md +33 -1
  129. package/template/.aioson/config/verification.json +61 -0
  130. package/template/.aioson/config.md +13 -9
  131. package/template/.aioson/docs/LAYERS.md +2 -2
  132. package/template/.aioson/docs/autopilot-handoff.md +10 -10
  133. package/template/.aioson/docs/dev/execution-discipline.md +41 -0
  134. package/template/.aioson/docs/dev/phase-loop.md +47 -0
  135. package/template/.aioson/docs/feature-expansion-taxonomy.md +31 -3
  136. package/template/.aioson/docs/presets/workflow.config.full-merged.json +15 -0
  137. package/template/.aioson/docs/presets/workflow.config.lean.json +15 -0
  138. package/template/.aioson/docs/product/prd-contract.md +12 -12
  139. package/template/.aioson/docs/prototype-contract.md +98 -0
  140. package/template/.aioson/docs/reference-identity.md +94 -0
  141. package/template/.aioson/docs/sheldon/harness-contract.md +155 -28
  142. package/template/.aioson/docs/verification-config.md +82 -0
  143. package/template/.aioson/docs/verify-artifact-gates.md +91 -0
  144. package/template/.aioson/docs/workflow-lean-lane.md +129 -0
  145. package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +2 -0
  146. package/template/.aioson/skills/process/aioson-spec-driven/SKILL.md +16 -14
  147. package/template/.aioson/skills/process/aioson-spec-driven/references/approval-gates.md +2 -2
  148. package/template/.aioson/skills/process/aioson-spec-driven/references/classification-map.md +4 -4
  149. package/template/.aioson/skills/process/aioson-spec-driven/references/dev.md +15 -15
  150. package/template/.aioson/skills/process/briefing-expansion-scout/SKILL.md +25 -3
  151. package/template/.aioson/skills/process/design-hybrid-forge/SKILL.md +5 -3
  152. package/template/.aioson/skills/process/design-hybrid-forge/references/external-source-ingestion.md +89 -0
  153. package/template/.aioson/skills/process/product-scope-expansion/SKILL.md +29 -2
  154. package/template/.aioson/skills/process/prototype-forge/SKILL.md +98 -0
  155. package/template/.aioson/skills/process/reference-identity-extract/SKILL.md +164 -0
  156. package/template/.aioson/skills/process/sheldon-expansion-audit/SKILL.md +23 -2
  157. package/template/.aioson/skills/static/multi-agent-patterns.md +5 -5
  158. package/template/CLAUDE.md +15 -11
@@ -1,8 +1,8 @@
1
1
  # Guia de Agentes
2
2
 
3
- > **Versão tabular alternativa (legado).** Para fichas individuais detalhadas com diálogos, saídas em disco e handoff, veja [`4-agentes/README.md`](./4-agentes/README.md).
4
-
5
- > `@pair` é alias de `@deyvin` e não possui ficha separada.
3
+ > **Versão tabular alternativa (legado).** Para fichas individuais detalhadas com diálogos, saídas em disco e handoff, veja [`4-agentes/README.md`](./4-agentes/README.md).
4
+
5
+ > `@pair` é alias de `@deyvin` e não possui ficha separada.
6
6
 
7
7
  > Quando usar cada agente, o que ele entrega e como ativá-lo.
8
8
 
@@ -15,11 +15,11 @@ O AIOSON tem agentes oficiais de projeto e também pode criar agentes de squad.
15
15
  ```
16
16
  @setup ← sempre o primeiro
17
17
  @product ← gera o PRD base vivo e roteia o fluxo
18
- @deyvin ← companheiro tecnico para continuidade e pequenas implementacoes
19
- @discovery-design-doc ← quando precisa clarear escopo e gerar design doc vivo
20
- @analyst ← projetos SMALL e MEDIUM
21
- @scope-check ← valida alinhamento antes de codar ou depois de fix relevante
22
- @architect ← projetos SMALL e MEDIUM
18
+ @deyvin ← companheiro tecnico para continuidade e pequenas implementacoes
19
+ @discovery-design-doc ← quando precisa clarear escopo e gerar design doc vivo
20
+ @analyst ← projetos SMALL e MEDIUM
21
+ @scope-check ← valida alinhamento antes de codar ou depois de fix relevante
22
+ @architect ← projetos SMALL e MEDIUM
23
23
  @ux-ui ← UI/UX quando há interfaces (SMALL e MEDIUM)
24
24
  @pm ← apenas MEDIUM
25
25
  @orchestrator ← apenas MEDIUM
@@ -55,9 +55,9 @@ O AIOSON tem agentes oficiais de projeto e também pode criar agentes de squad.
55
55
 
56
56
  Quando o projeto ja existe e voce roda `scan:project`, o handoff correto agora e:
57
57
 
58
- ```text
59
- scan:project -> @analyst -> @scope-check -> @architect -> @dev
60
- ```
58
+ ```text
59
+ scan:project -> @analyst -> @scope-check -> @architect -> @dev
60
+ ```
61
61
 
62
62
  Regras do fluxo:
63
63
  - os artefatos locais do scan (`scan-index.md`, `scan-folders.md`, `scan-<pasta>.md`, `scan-aioson.md`) servem como mapas brutos do codigo
@@ -81,7 +81,7 @@ Regras do fluxo:
81
81
 
82
82
  **Como ativar:**
83
83
  ```
84
- /aioson:agent:setup
84
+ /aioson:agent:setup
85
85
  ```
86
86
 
87
87
  **O que ele pergunta:**
@@ -138,7 +138,7 @@ O `@product` detecta esses arquivos automaticamente e pergunta se deve usá-los
138
138
 
139
139
  **Como ativar:**
140
140
  ```
141
- /aioson:agent:product
141
+ /aioson:agent:product
142
142
  ```
143
143
 
144
144
  **Entrega:** Arquivo `.aioson/context/prd.md` ou `.aioson/context/prd-{slug}.md` com:
@@ -182,12 +182,12 @@ O `@product` detecta esses arquivos automaticamente e pergunta se deve usá-los
182
182
 
183
183
  **Como ativar:**
184
184
  ```
185
- /aioson:agent:deyvin
185
+ /aioson:agent:deyvin
186
186
  ```
187
187
 
188
188
  Alias compativel:
189
189
  ```text
190
- /aioson:agent:pair
190
+ /aioson:agent:pair
191
191
  ```
192
192
 
193
193
  **Exemplos bons de uso:**
@@ -227,7 +227,7 @@ Alias compativel:
227
227
 
228
228
  **Como ativar:**
229
229
  ```
230
- /aioson:agent:analyst
230
+ /aioson:agent:analyst
231
231
  ```
232
232
 
233
233
  **Exemplo de perguntas que ele faz:**
@@ -268,7 +268,7 @@ Em **modo feature**, entrega adicionalmente:
268
268
 
269
269
  **Como ativar:**
270
270
  ```
271
- /aioson:agent:discovery-design-doc
271
+ /aioson:agent:discovery-design-doc
272
272
  ```
273
273
 
274
274
  **Entrega:**
@@ -300,7 +300,7 @@ Em **modo feature**, entrega adicionalmente:
300
300
 
301
301
  **Como ativar:**
302
302
  ```
303
- /aioson:agent:architect
303
+ /aioson:agent:architect
304
304
  ```
305
305
 
306
306
  **Estruturas que ele propõe (exemplo Laravel SMALL):**
@@ -341,7 +341,7 @@ tests/
341
341
 
342
342
  **Como ativar o agente UI/UX:**
343
343
  ```
344
- /aioson:agent:ux-ui
344
+ /aioson:agent:ux-ui
345
345
  ```
346
346
 
347
347
  **Submodos disponíveis:**
@@ -384,7 +384,7 @@ tests/
384
384
 
385
385
  **Como ativar:**
386
386
  ```
387
- /aioson:agent:pm
387
+ /aioson:agent:pm
388
388
  ```
389
389
 
390
390
  **Regra de ouro do @pm:** O documento deve ter no máximo 2 páginas. Se passar disso, corte funcionalidades do MVP.
@@ -410,7 +410,7 @@ tests/
410
410
 
411
411
  **Como ativar:**
412
412
  ```
413
- /aioson:agent:orchestrator
413
+ /aioson:agent:orchestrator
414
414
  ```
415
415
 
416
416
  **Ou via CLI para preparar os arquivos:**
@@ -455,7 +455,7 @@ npx @jaimevalasek/aioson parallel:status
455
455
 
456
456
  **Como ativar:**
457
457
  ```
458
- /aioson:agent:squad
458
+ /aioson:agent:squad
459
459
  ```
460
460
 
461
461
  **Entrega:**
@@ -481,7 +481,7 @@ npx @jaimevalasek/aioson parallel:status
481
481
 
482
482
  **Como ativar:**
483
483
  ```
484
- /aioson:agent:genome
484
+ /aioson:agent:genome
485
485
  ```
486
486
 
487
487
  **Entrega:**
@@ -517,7 +517,7 @@ Depois disso, ela passa a ser parte real do pacote local da squad e deve ser con
517
517
 
518
518
  **Como ativar:**
519
519
  ```
520
- /aioson:agent:dev
520
+ /aioson:agent:dev
521
521
  ```
522
522
 
523
523
  **Princípios que ele aplica em qualquer stack:**
@@ -570,7 +570,7 @@ Se o usuário pedir para pular o teste, o `@dev` resiste, explica, e só cede ap
570
570
 
571
571
  **Como ativar:**
572
572
  ```
573
- /aioson:agent:qa
573
+ /aioson:agent:qa
574
574
  ```
575
575
 
576
576
  **Entrega:**
@@ -634,7 +634,7 @@ O root de `.aioson/context/` fica limpo automaticamente. O desenvolvedor não pr
634
634
 
635
635
  **Como ativar:**
636
636
  ```
637
- /aioson:agent:tester
637
+ /aioson:agent:tester
638
638
  ```
639
639
 
640
640
  **Entrega:**
@@ -669,7 +669,7 @@ O root de `.aioson/context/` fica limpo automaticamente. O desenvolvedor não pr
669
669
 
670
670
  **Como ativar:**
671
671
  ```
672
- /aioson:agent:sheldon
672
+ /aioson:agent:sheldon
673
673
  ```
674
674
 
675
675
  **Entrega:**
@@ -698,7 +698,7 @@ Agentes que nao fazem parte do fluxo principal de entrega, mas entram sob demand
698
698
 
699
699
  **Como ativar:**
700
700
  ```
701
- /aioson:agent:committer
701
+ /aioson:agent:committer
702
702
  ```
703
703
 
704
704
  **Entrega:**
@@ -719,7 +719,7 @@ Agentes que nao fazem parte do fluxo principal de entrega, mas entram sob demand
719
719
 
720
720
  **Como ativar:**
721
721
  ```
722
- /aioson:agent:copywriter
722
+ /aioson:agent:copywriter
723
723
  ```
724
724
 
725
725
  **Entrega:**
@@ -741,7 +741,7 @@ Agentes que nao fazem parte do fluxo principal de entrega, mas entram sob demand
741
741
 
742
742
  **Como ativar:**
743
743
  ```
744
- /aioson:agent:briefing
744
+ /aioson:agent:briefing
745
745
  ```
746
746
 
747
747
  **Entrega:**
@@ -762,7 +762,7 @@ Agentes que nao fazem parte do fluxo principal de entrega, mas entram sob demand
762
762
 
763
763
  **Como ativar:**
764
764
  ```
765
- /aioson:agent:design-hybrid-forge
765
+ /aioson:agent:design-hybrid-forge
766
766
  ```
767
767
 
768
768
  **Entrega:**
@@ -782,7 +782,7 @@ Agentes que nao fazem parte do fluxo principal de entrega, mas entram sob demand
782
782
 
783
783
  **Como ativar:**
784
784
  ```
785
- /aioson:agent:discover
785
+ /aioson:agent:discover
786
786
  ```
787
787
 
788
788
  **Ou via CLI:**
@@ -809,7 +809,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
809
809
 
810
810
  **Como ativar:**
811
811
  ```
812
- /aioson:agent:neo
812
+ /aioson:agent:neo
813
813
  ```
814
814
 
815
815
  **Entrega:**
@@ -830,7 +830,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
830
830
 
831
831
  **Como ativar:**
832
832
  ```
833
- /aioson:agent:orache
833
+ /aioson:agent:orache
834
834
  ```
835
835
 
836
836
  **Entrega:**
@@ -852,7 +852,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
852
852
 
853
853
  **Como ativar:**
854
854
  ```
855
- /aioson:agent:pentester
855
+ /aioson:agent:pentester
856
856
  ```
857
857
 
858
858
  **Entrega:**
@@ -873,7 +873,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
873
873
 
874
874
  **Como ativar:**
875
875
  ```
876
- /aioson:agent:profiler-researcher
876
+ /aioson:agent:profiler-researcher
877
877
  ```
878
878
 
879
879
  **Entrega:**
@@ -892,7 +892,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
892
892
 
893
893
  **Como ativar:**
894
894
  ```
895
- /aioson:agent:profiler-enricher
895
+ /aioson:agent:profiler-enricher
896
896
  ```
897
897
 
898
898
  **Entrega:**
@@ -911,7 +911,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
911
911
 
912
912
  **Como ativar:**
913
913
  ```
914
- /aioson:agent:profiler-forge
914
+ /aioson:agent:profiler-forge
915
915
  ```
916
916
 
917
917
  **Entrega:**
@@ -930,7 +930,7 @@ npx @jaimevalasek/aioson scan:project . --folder=src
930
930
 
931
931
  **Como ativar:**
932
932
  ```
933
- /aioson:agent:site-forge
933
+ /aioson:agent:site-forge
934
934
  ```
935
935
 
936
936
  **Exemplos de uso:**
@@ -956,7 +956,7 @@ Extraia o design de https://exemplo.com como uma skill
956
956
 
957
957
  **Como ativar:**
958
958
  ```
959
- /aioson:agent:validator
959
+ /aioson:agent:validator
960
960
  ```
961
961
 
962
962
  **Entrega:**
@@ -972,22 +972,20 @@ Extraia o design de https://exemplo.com como uma skill
972
972
  ```
973
973
  Duração típica: minutos a horas. Sem análise, sem arquitetura formal.
974
974
 
975
- ### SMALL
975
+ ### SMALL — lean lane (padrão v1.35.0)
976
976
  ```
977
- @setup → @product → [@sheldon] → @analyst → @architect → @dev → @qa → [@tester]
977
+ @setup → @product → @sheldon → @dev → @qa → [@tester]
978
978
  ```
979
- Duração típica: horas a dias. Análise leve, estrutura clara.
979
+ Duração típica: horas a dias. `@sheldon` é a autoridade única de spec: produz requirements + decisões técnicas + plano faseado + harness-contract (Gates A/B/C) em uma passada. `@analyst`, `@architect`, `@scope-check` são detours opt-in.
980
980
 
981
- ### MEDIUM
981
+ ### MEDIUM — maestro lane (v1.35.0)
982
982
  ```
983
- @setup → @product → [@sheldon] → @analyst → @architect → @ux-ui → @pm → @orchestrator → @dev → @pentester → @qa → [@tester]
983
+ @setup → @product → [@sheldon] → @orchestrator → @dev → @pentester → @qa → [@tester]
984
984
  ```
985
- Duração típica: dias a semanas. Análise completa, paralelismo, backlog formal, revisao adversarial obrigatoria.
986
-
987
- > O `@pentester` entra obrigatoriamente em projetos MEDIUM entre `@dev` e `@qa`. Em projetos sensiveis ou com requisitos de seguranca, ative-o tambem em SMALL.
985
+ Duração típica: dias a semanas. `@orchestrator` é o maestro de spec: faz fan-out para `@analyst` + `@architect` + `@pm` (+ `@ux-ui` quando UI-heavy) como sub-agentes, consolida e verifica os artefatos. `@pentester` é inline (entre `@dev` e `@qa`).
988
986
 
989
- `[@sheldon]` — opcional, recomendado antes de iniciar a cadeia de execução para validar o PRD.
990
- `[@tester]` — opcional, recomendado quando a cobertura de testes for insuficiente após `@dev`.
987
+ > `[@sheldon]` — opcional no MEDIUM como pré-etapa antes do `@orchestrator` para endurecer o PRD.
988
+ > `[@tester]` — opcional, recomendado quando a cobertura de testes for insuficiente após `@dev`.
991
989
 
992
990
  ---
993
991
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaimevalasek/aioson",
3
- "version": "1.30.2",
3
+ "version": "1.36.0",
4
4
  "description": "AI operating framework for hyper-personalized software.",
5
5
  "keywords": [
6
6
  "ai",
@@ -42,7 +42,7 @@
42
42
  "test:genome-2.0:block-a": "node scripts/smoke/genome-2.0-smoke.js && npm run test:genome && npm test && npm run lint",
43
43
  "test:genome-2.0:rollout": "node scripts/testing/genome-2.0-rollout.js",
44
44
  "lint": "node scripts/check-js.js",
45
- "sync:agents": "node src/commands/sync-agents-preflight.js && rsync -av --progress --exclude='config.md' --exclude='runtime/' --exclude='backups/' --exclude='mcp/servers.local.json' template/ ./",
45
+ "sync:agents": "node src/commands/sync-agents-preflight.js && node src/commands/sync-agents-copy.js",
46
46
  "ci": "npm run lint && npm test"
47
47
  },
48
48
  "dependencies": {
@@ -0,0 +1,110 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Canonical map: which agents produce a `verify:artifact`-checkable artifact at
5
+ * session end, the kind, and how that artifact's path is resolved.
6
+ *
7
+ * needs: 'none' — self-resolving (fixed path); the engine can prove it at
8
+ * `agent:done` with no extra input.
9
+ * needs: 'slug' — path keyed by --slug; the agent threads it into agent:done.
10
+ * needs: 'file' — date-stamped / caller-known path, threaded via --file.
11
+ * needs: 'dir' — a generated-site root, via --dir (advisory static floor only
12
+ * at agent:done; the full `npm run build` stays in the agent's
13
+ * explicit Done gate).
14
+ *
15
+ * This is the bridge that makes the periphery's done-gates AUTO-FIRE: instead of
16
+ * relying on each agent to remember its `## Done gate` line, `agent:done` runs the
17
+ * check itself (advisory, best-effort). Keep in sync with the RULESETS/ADAPTERS
18
+ * registry in commands/verify-artifact.js and the per-agent Done gates — it is one
19
+ * of the workflow agent-enumeration sites.
20
+ */
21
+ const AGENT_ARTIFACT_KIND = {
22
+ setup: { kind: 'project-context', needs: 'none' },
23
+ discover: { kind: 'bootstrap', needs: 'none' },
24
+ committer: { kind: 'commit-message', needs: 'none' },
25
+ genome: { kind: 'genome', needs: 'slug' },
26
+ 'profiler-forge': { kind: 'genome', needs: 'slug' },
27
+ 'profiler-researcher': { kind: 'research-report', needs: 'slug' },
28
+ 'profiler-enricher': { kind: 'enriched-profile', needs: 'slug' },
29
+ 'design-hybrid-forge': { kind: 'hybrid-skill', needs: 'slug' },
30
+ copywriter: { kind: 'copy', needs: 'slug' },
31
+ orache: { kind: 'orache-report', needs: 'file' },
32
+ 'site-forge': { kind: 'site', needs: 'dir', opts: { noBuild: true } }
33
+ };
34
+
35
+ const NEEDS_FLAG = { slug: '--slug=<slug>', file: '--file=<path>', dir: '--dir=<dir>' };
36
+
37
+ /** Resolve an agent name (with or without a leading @) to its artifact mapping, or null. */
38
+ function resolveAgentArtifact(agent) {
39
+ const name = String(agent || '').trim().replace(/^@/, '');
40
+ return AGENT_ARTIFACT_KIND[name] || null;
41
+ }
42
+
43
+ /**
44
+ * Best-effort advisory `verify:artifact` for the calling agent at `agent:done`.
45
+ *
46
+ * Returns `null` when the agent produces no checkable artifact (the common case —
47
+ * product, dev, qa, …). Otherwise a uniform advisory descriptor:
48
+ * { kind, ok, skipped, issues?, reason }
49
+ * - self-resolving kinds, or locator-keyed kinds whose locator was threaded into
50
+ * agent:done, run the real check (advisory — never blocks).
51
+ * - a locator-keyed kind with no locator yields `skipped:true` plus a one-line
52
+ * hint naming the exact command, so it is surfaced instead of silently missing.
53
+ *
54
+ * Never throws — a failure here must never break the session-end registration.
55
+ */
56
+ async function verifyAgentArtifact({ targetDir, agent, options = {} }) {
57
+ const mapping = resolveAgentArtifact(agent);
58
+ if (!mapping) return null;
59
+ const { kind, needs } = mapping;
60
+ const slug = options.slug ? String(options.slug).trim() : null;
61
+ const file = options.file ? String(options.file).trim() : null;
62
+ const dir = options.dir ? String(options.dir).trim() : null;
63
+
64
+ const missingLocator =
65
+ (needs === 'slug' && !slug) || (needs === 'file' && !file) || (needs === 'dir' && !dir);
66
+ if (missingLocator) {
67
+ const flag = NEEDS_FLAG[needs];
68
+ return {
69
+ kind,
70
+ ok: true,
71
+ skipped: true,
72
+ reason: `needs ${flag} — run: aioson verify:artifact . --kind=${kind} ${flag} --advisory`
73
+ };
74
+ }
75
+
76
+ try {
77
+ const { runVerifyArtifact } = require('./commands/verify-artifact');
78
+ const report = await runVerifyArtifact({
79
+ args: [targetDir],
80
+ options: {
81
+ kind,
82
+ slug,
83
+ file,
84
+ dir,
85
+ advisory: true,
86
+ suppressExitCode: true,
87
+ json: true,
88
+ ...(mapping.opts && mapping.opts.noBuild ? { 'no-build': true } : {})
89
+ },
90
+ logger: { log() {}, error() {}, warn() {} }
91
+ });
92
+ if (!report) return null;
93
+ const issues = report.issues || [];
94
+ const head = issues.slice(0, 3).join('; ');
95
+ const more = issues.length > 3 ? ` (+${issues.length - 3} more)` : '';
96
+ return {
97
+ kind,
98
+ ok: Boolean(report.ok),
99
+ skipped: false,
100
+ issues,
101
+ reason: report.ok
102
+ ? null
103
+ : `${head}${more} — advisory; see .aioson/context/verify-artifact-${kind}.json`
104
+ };
105
+ } catch {
106
+ return null;
107
+ }
108
+ }
109
+
110
+ module.exports = { AGENT_ARTIFACT_KIND, resolveAgentArtifact, verifyAgentArtifact };