@jaimevalasek/aioson 1.7.2 → 1.8.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.
- package/CHANGELOG.md +35 -0
- package/README.md +153 -10
- package/docs/en/cli-reference.md +56 -1
- package/docs/en/i18n.md +18 -18
- package/docs/en/schemas/index.json +10 -0
- package/docs/en/schemas/parallel-assign.schema.json +9 -0
- package/docs/en/schemas/parallel-doctor.schema.json +36 -0
- package/docs/en/schemas/parallel-guard.schema.json +63 -0
- package/docs/en/schemas/parallel-merge.schema.json +84 -0
- package/docs/en/schemas/parallel-status.schema.json +91 -1
- package/docs/integrations/apps-publish-marketplace.md +94 -0
- package/docs/pt/README.md +9 -0
- package/docs/pt/agentes.md +324 -3
- package/docs/pt/clientes-ai.md +7 -3
- package/docs/pt/comandos-cli.md +160 -13
- package/docs/pt/compress-agents.md +304 -0
- package/docs/pt/design-docs-governance.md +59 -0
- package/docs/pt/feature-archive.md +191 -0
- package/docs/pt/genome-3.0-spec.md +115 -4
- package/docs/pt/genome-distribution.md +232 -0
- package/docs/pt/inicio-rapido.md +1 -0
- package/docs/pt/motor-hardening.md +492 -0
- package/docs/pt/runner-system.md +113 -0
- package/package.json +2 -1
- package/src/agent-manifests.js +66 -0
- package/src/agents.js +27 -7
- package/src/autonomy-policy.js +139 -0
- package/src/brain-query.js +161 -0
- package/src/cli.js +1377 -1099
- package/src/commands/agents.js +102 -7
- package/src/commands/artifact-validate.js +33 -4
- package/src/commands/auth.js +272 -0
- package/src/commands/brain-query.js +44 -0
- package/src/commands/briefing.js +344 -0
- package/src/commands/commit-prepare.js +547 -0
- package/src/commands/compress-agents.js +416 -0
- package/src/commands/context-health.js +4 -2
- package/src/commands/context-trim.js +17 -11
- package/src/commands/design-hybrid-options.js +3 -3
- package/src/commands/devlog-process.js +6 -4
- package/src/commands/dossier.js +423 -0
- package/src/commands/feature-archive.js +513 -0
- package/src/commands/feature-close.js +123 -18
- package/src/commands/gate-approve.js +198 -0
- package/src/commands/gate-check.js +24 -5
- package/src/commands/genome-doctor.js +166 -9
- package/src/commands/git-guard.js +170 -0
- package/src/commands/harness.js +121 -0
- package/src/commands/implementation-plan.js +47 -20
- package/src/commands/init.js +6 -2
- package/src/commands/install.js +6 -2
- package/src/commands/live.js +497 -56
- package/src/commands/locale-apply.js +9 -6
- package/src/commands/locale-diff.js +11 -112
- package/src/commands/mcp-doctor.js +2 -1
- package/src/commands/mcp-init.js +4 -10
- package/src/commands/memory.js +234 -0
- package/src/commands/parallel-assign.js +107 -27
- package/src/commands/parallel-doctor.js +416 -3
- package/src/commands/parallel-guard.js +241 -0
- package/src/commands/parallel-init.js +66 -4
- package/src/commands/parallel-merge.js +299 -0
- package/src/commands/parallel-status.js +147 -3
- package/src/commands/preflight.js +63 -4
- package/src/commands/qa-init.js +10 -5
- package/src/commands/revision.js +235 -0
- package/src/commands/scaffold-complete.js +188 -0
- package/src/commands/security-audit.js +275 -0
- package/src/commands/security-scan.js +376 -0
- package/src/commands/self-implement-loop.js +46 -2
- package/src/commands/setup-context.js +11 -10
- package/src/commands/squad-agent-create.js +51 -9
- package/src/commands/squad-investigate.js +53 -0
- package/src/commands/squad-plan.js +33 -1
- package/src/commands/squad-scaffold.js +4 -3
- package/src/commands/squad-score.js +71 -14
- package/src/commands/squad-status.js +22 -1
- package/src/commands/squad-validate.js +93 -2
- package/src/commands/store-genome.js +304 -0
- package/src/commands/store-skill.js +247 -0
- package/src/commands/store-squad.js +431 -0
- package/src/commands/store-system.js +392 -0
- package/src/commands/tool-capabilities.js +63 -0
- package/src/commands/update.js +3 -3
- package/src/commands/verify-gate.js +40 -0
- package/src/commands/workflow-execute.js +644 -155
- package/src/commands/workflow-harden.js +231 -0
- package/src/commands/workflow-heal.js +136 -0
- package/src/commands/workflow-next.js +460 -22
- package/src/commands/workflow-status.js +328 -138
- package/src/commands/workspace.js +144 -0
- package/src/constants.js +42 -75
- package/src/context-memory.js +133 -4
- package/src/context-writer.js +2 -1
- package/src/context.js +32 -2
- package/src/doctor.js +46 -6
- package/src/dossier/codemap-store.js +267 -0
- package/src/dossier/dossier-bootstrap.js +222 -0
- package/src/dossier/dossier-compact.js +159 -0
- package/src/dossier/lock.js +128 -0
- package/src/dossier/revision-store.js +313 -0
- package/src/dossier/schema.js +155 -0
- package/src/dossier/store.js +400 -0
- package/src/execution-gateway.js +3 -0
- package/src/friction-scanner.js +202 -0
- package/src/genome-schema.js +24 -1
- package/src/genomes.js +33 -0
- package/src/handoff-contract.js +363 -0
- package/src/handoff-validator.js +45 -0
- package/src/harness/circuit-breaker.js +135 -0
- package/src/i18n/messages/en.js +317 -22
- package/src/i18n/messages/es.js +259 -18
- package/src/i18n/messages/fr.js +260 -18
- package/src/i18n/messages/pt-BR.js +313 -22
- package/src/install-profile.js +0 -16
- package/src/installer.js +70 -6
- package/src/lib/git-commit-guard.js +691 -0
- package/src/lib/security/artifact-reader.js +167 -0
- package/src/lib/security/exit-codes.js +51 -0
- package/src/lib/security/findings-writer.js +176 -0
- package/src/lib/security/runtime-events.js +77 -0
- package/src/lib/security/secrets-regex.js +115 -0
- package/src/lib/store/security-scan.js +173 -0
- package/src/lib/terminal-checkbox.js +130 -0
- package/src/lib/tmux-launcher.js +163 -0
- package/src/lib/tool-capabilities.js +102 -0
- package/src/locales.js +12 -8
- package/src/parallel-workspace.js +756 -0
- package/src/parser.js +8 -1
- package/src/path-guard.js +47 -0
- package/src/preflight-engine.js +237 -26
- package/src/self-healing.js +142 -0
- package/src/session-handoff.js +111 -1
- package/src/squad/squad-scaffold.js +183 -19
- package/src/test-briefing.js +226 -0
- package/src/updater.js +1 -1
- package/src/utils.js +3 -0
- package/src/workflow-gates.js +185 -0
- package/template/.aioson/agents/analyst.md +76 -130
- package/template/.aioson/agents/architect.md +53 -86
- package/template/.aioson/agents/committer.md +161 -0
- package/template/.aioson/agents/cypher.md +252 -0
- package/template/.aioson/agents/dev.md +112 -628
- package/template/.aioson/agents/deyvin.md +33 -236
- package/template/.aioson/agents/discover.md +235 -0
- package/template/.aioson/agents/discovery-design-doc.md +17 -252
- package/template/.aioson/agents/genome.md +76 -26
- package/template/.aioson/agents/manifests/analyst.manifest.json +26 -0
- package/template/.aioson/agents/manifests/architect.manifest.json +23 -0
- package/template/.aioson/agents/manifests/committer.manifest.json +23 -0
- package/template/.aioson/agents/manifests/dev.manifest.json +37 -0
- package/template/.aioson/agents/manifests/orchestrator.manifest.json +30 -0
- package/template/.aioson/agents/manifests/pentester.manifest.json +39 -0
- package/template/.aioson/agents/manifests/pm.manifest.json +26 -0
- package/template/.aioson/agents/manifests/product.manifest.json +23 -0
- package/template/.aioson/agents/manifests/qa.manifest.json +25 -0
- package/template/.aioson/agents/manifests/setup.manifest.json +20 -0
- package/template/.aioson/agents/manifests/ux-ui.manifest.json +24 -0
- package/template/.aioson/agents/neo.md +5 -7
- package/template/.aioson/agents/orache.md +2 -6
- package/template/.aioson/agents/orchestrator.md +81 -182
- package/template/.aioson/agents/pentester.md +235 -0
- package/template/.aioson/agents/pm.md +40 -104
- package/template/.aioson/agents/product.md +99 -344
- package/template/.aioson/agents/profiler-enricher.md +57 -6
- package/template/.aioson/agents/profiler-forge.md +17 -7
- package/template/.aioson/agents/profiler-researcher.md +29 -6
- package/template/.aioson/agents/qa.md +168 -514
- package/template/.aioson/agents/setup.md +52 -278
- package/template/.aioson/agents/sheldon.md +122 -754
- package/template/.aioson/agents/site-forge.md +111 -1583
- package/template/.aioson/agents/squad.md +139 -2010
- package/template/.aioson/agents/tester.md +10 -0
- package/template/.aioson/agents/ux-ui.md +104 -812
- package/template/.aioson/agents/validator.md +69 -0
- package/template/.aioson/brains/scripts/query.js +5 -1
- package/template/.aioson/config/autonomy-protocol.json +43 -0
- package/template/.aioson/config.md +43 -15
- package/template/.aioson/constitution.md +36 -33
- package/template/.aioson/context/design-doc.md +136 -0
- package/template/.aioson/context/project-map.md +57 -0
- package/template/.aioson/design-docs/code-reuse.md +48 -0
- package/template/.aioson/design-docs/componentization.md +47 -0
- package/template/.aioson/design-docs/file-size.md +52 -0
- package/template/.aioson/design-docs/folder-structure.md +51 -0
- package/template/.aioson/design-docs/naming.md +54 -0
- package/template/.aioson/docs/LAYERS.md +12 -2
- package/template/.aioson/docs/dev/execution-discipline.md +106 -0
- package/template/.aioson/docs/dev/stack-conventions.md +83 -0
- package/template/.aioson/docs/deyvin/continuity-recovery.md +57 -0
- package/template/.aioson/docs/deyvin/debugging-escalation.md +30 -0
- package/template/.aioson/docs/deyvin/pair-execution.md +44 -0
- package/template/.aioson/docs/deyvin/runtime-handoffs.md +36 -0
- package/template/.aioson/docs/product/conversation-playbook.md +116 -0
- package/template/.aioson/docs/product/prd-contract.md +107 -0
- package/template/.aioson/docs/product/quality-lens.md +57 -0
- package/template/.aioson/docs/product/research-loop.md +65 -0
- package/template/.aioson/docs/sheldon/enrichment-paths.md +134 -0
- package/template/.aioson/docs/sheldon/quality-lens.md +57 -0
- package/template/.aioson/docs/sheldon/research-loop.md +56 -0
- package/template/.aioson/docs/sheldon/web-intelligence.md +75 -0
- package/template/.aioson/docs/site-forge-build.md +195 -0
- package/template/.aioson/docs/site-forge-extraction.md +135 -0
- package/template/.aioson/docs/site-forge-qa.md +155 -0
- package/template/.aioson/docs/site-forge-recon.md +434 -0
- package/template/.aioson/docs/site-forge-transform.md +249 -0
- package/template/.aioson/docs/squad/content-output.md +91 -0
- package/template/.aioson/docs/squad/creation-flow.md +135 -0
- package/template/.aioson/docs/squad/domain-classification.md +117 -0
- package/template/.aioson/docs/squad/genome-bindings.md +47 -0
- package/template/.aioson/docs/squad/package-contract.md +234 -0
- package/template/.aioson/docs/squad/quality-lens.md +56 -0
- package/template/.aioson/docs/squad/research-loop.md +59 -0
- package/template/.aioson/docs/squad/session-operations.md +117 -0
- package/template/.aioson/docs/squad/workflow-quality.md +165 -0
- package/template/.aioson/docs/ux-ui/accessibility-audit.md +55 -0
- package/template/.aioson/docs/ux-ui/audit-mode.md +86 -0
- package/template/.aioson/docs/ux-ui/component-map.md +35 -0
- package/template/.aioson/docs/ux-ui/design-execution.md +111 -0
- package/template/.aioson/docs/ux-ui/design-gate.md +27 -0
- package/template/.aioson/docs/ux-ui/research-mode.md +39 -0
- package/template/.aioson/docs/ux-ui/site-delivery.md +156 -0
- package/template/.aioson/docs/ux-ui/token-contract.md +57 -0
- package/template/.aioson/genomes/copywriting.meta.json +48 -0
- package/template/.aioson/git-guard.json +11 -0
- package/template/.aioson/mcp/servers.md +0 -1
- package/template/.aioson/rules/agent-language-policy.md +93 -0
- package/template/.aioson/rules/aioson-context-boundary.md +63 -0
- package/template/.aioson/rules/canonical-path-contract.md +47 -0
- package/template/.aioson/rules/data-format-convention.md +24 -86
- package/template/.aioson/rules/disk-first-artifacts.md +44 -0
- package/template/.aioson/rules/output-brevity.md +44 -0
- package/template/.aioson/rules/prd-section-ownership.md +49 -0
- package/template/.aioson/rules/security-baseline.md +139 -0
- package/template/.aioson/rules/spec-level-ownership.md +61 -0
- package/template/.aioson/rules/squad-driver-pattern.md +81 -0
- package/template/.aioson/schemas/squad-blueprint.schema.json +24 -0
- package/template/.aioson/schemas/squad-manifest.schema.json +44 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +30 -0
- package/template/.aioson/skills/process/secure-tdd/SKILL.md +97 -0
- package/template/.aioson/skills/process/secure-tdd/references/nextjs.md +81 -0
- package/template/.aioson/skills/process/secure-tdd/references/node-express.md +91 -0
- package/template/.aioson/skills/process/secure-tdd/references/planned-stacks.md +33 -0
- package/template/.aioson/skills/static/harness-validate/SKILL.md +46 -0
- package/template/.aioson/skills/static/web-research-cache.md +3 -0
- package/template/.aioson/tasks/squad-create.md +35 -8
- package/template/.aioson/tasks/squad-design.md +50 -2
- package/template/.aioson/tasks/squad-investigate.md +14 -1
- package/template/.claude/commands/aioson/agent/committer.md +5 -0
- package/template/.claude/commands/aioson/agent/copywriter.md +5 -0
- package/template/.claude/commands/aioson/agent/cypher.md +5 -0
- package/template/.claude/commands/aioson/agent/pair.md +5 -0
- package/template/.claude/commands/aioson/agent/validator.md +5 -0
- package/template/.gemini/commands/aios-analyst.toml +6 -3
- package/template/.gemini/commands/aios-architect.toml +7 -6
- package/template/.gemini/commands/aios-committer.toml +7 -0
- package/template/.gemini/commands/aios-copywriter.toml +7 -0
- package/template/.gemini/commands/aios-cypher.toml +7 -0
- package/template/.gemini/commands/aios-dev.toml +8 -7
- package/template/.gemini/commands/aios-deyvin.toml +6 -5
- package/template/.gemini/commands/aios-discovery-design-doc.toml +6 -3
- package/template/.gemini/commands/aios-genome.toml +7 -0
- package/template/.gemini/commands/aios-neo.toml +5 -3
- package/template/.gemini/commands/aios-orache.toml +7 -0
- package/template/.gemini/commands/aios-orchestrator.toml +8 -7
- package/template/.gemini/commands/aios-pair.toml +6 -5
- package/template/.gemini/commands/aios-pm.toml +8 -7
- package/template/.gemini/commands/aios-product.toml +5 -3
- package/template/.gemini/commands/aios-qa.toml +6 -5
- package/template/.gemini/commands/aios-setup.toml +5 -2
- package/template/.gemini/commands/aios-sheldon.toml +7 -0
- package/template/.gemini/commands/aios-site-forge.toml +7 -0
- package/template/.gemini/commands/aios-squad.toml +7 -0
- package/template/.gemini/commands/aios-tester.toml +6 -5
- package/template/.gemini/commands/aios-ux-ui.toml +8 -7
- package/template/.gemini/commands/aios-validator.toml +7 -0
- package/template/AGENTS.md +12 -1
- package/template/CLAUDE.md +5 -1
- package/template/.aioson/locales/en/agents/analyst.md +0 -244
- package/template/.aioson/locales/en/agents/architect.md +0 -245
- package/template/.aioson/locales/en/agents/dev.md +0 -397
- package/template/.aioson/locales/en/agents/deyvin.md +0 -137
- package/template/.aioson/locales/en/agents/discovery-design-doc.md +0 -27
- package/template/.aioson/locales/en/agents/genome.md +0 -212
- package/template/.aioson/locales/en/agents/neo.md +0 -8
- package/template/.aioson/locales/en/agents/orache.md +0 -6
- package/template/.aioson/locales/en/agents/orchestrator.md +0 -189
- package/template/.aioson/locales/en/agents/pair.md +0 -5
- package/template/.aioson/locales/en/agents/pm.md +0 -84
- package/template/.aioson/locales/en/agents/product.md +0 -378
- package/template/.aioson/locales/en/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/en/agents/qa.md +0 -270
- package/template/.aioson/locales/en/agents/setup.md +0 -421
- package/template/.aioson/locales/en/agents/sheldon.md +0 -455
- package/template/.aioson/locales/en/agents/squad.md +0 -449
- package/template/.aioson/locales/en/agents/tester.md +0 -6
- package/template/.aioson/locales/en/agents/ux-ui.md +0 -668
- package/template/.aioson/locales/es/agents/analyst.md +0 -225
- package/template/.aioson/locales/es/agents/architect.md +0 -245
- package/template/.aioson/locales/es/agents/dev.md +0 -370
- package/template/.aioson/locales/es/agents/deyvin.md +0 -99
- package/template/.aioson/locales/es/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/es/agents/genome.md +0 -104
- package/template/.aioson/locales/es/agents/neo.md +0 -50
- package/template/.aioson/locales/es/agents/orache.md +0 -105
- package/template/.aioson/locales/es/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/es/agents/pair.md +0 -7
- package/template/.aioson/locales/es/agents/pm.md +0 -90
- package/template/.aioson/locales/es/agents/product.md +0 -372
- package/template/.aioson/locales/es/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/es/agents/qa.md +0 -198
- package/template/.aioson/locales/es/agents/setup.md +0 -405
- package/template/.aioson/locales/es/agents/sheldon.md +0 -309
- package/template/.aioson/locales/es/agents/squad.md +0 -532
- package/template/.aioson/locales/es/agents/tester.md +0 -9
- package/template/.aioson/locales/es/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/fr/agents/analyst.md +0 -225
- package/template/.aioson/locales/fr/agents/architect.md +0 -245
- package/template/.aioson/locales/fr/agents/dev.md +0 -370
- package/template/.aioson/locales/fr/agents/deyvin.md +0 -99
- package/template/.aioson/locales/fr/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/fr/agents/genome.md +0 -104
- package/template/.aioson/locales/fr/agents/neo.md +0 -50
- package/template/.aioson/locales/fr/agents/orache.md +0 -106
- package/template/.aioson/locales/fr/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/fr/agents/pair.md +0 -7
- package/template/.aioson/locales/fr/agents/pm.md +0 -90
- package/template/.aioson/locales/fr/agents/product.md +0 -372
- package/template/.aioson/locales/fr/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/fr/agents/qa.md +0 -198
- package/template/.aioson/locales/fr/agents/setup.md +0 -405
- package/template/.aioson/locales/fr/agents/sheldon.md +0 -309
- package/template/.aioson/locales/fr/agents/squad.md +0 -532
- package/template/.aioson/locales/fr/agents/tester.md +0 -9
- package/template/.aioson/locales/fr/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/pt-BR/agents/analyst.md +0 -319
- package/template/.aioson/locales/pt-BR/agents/architect.md +0 -284
- package/template/.aioson/locales/pt-BR/agents/dev.md +0 -483
- package/template/.aioson/locales/pt-BR/agents/deyvin.md +0 -184
- package/template/.aioson/locales/pt-BR/agents/discovery-design-doc.md +0 -198
- package/template/.aioson/locales/pt-BR/agents/genome.md +0 -297
- package/template/.aioson/locales/pt-BR/agents/neo.md +0 -208
- package/template/.aioson/locales/pt-BR/agents/orache.md +0 -137
- package/template/.aioson/locales/pt-BR/agents/orchestrator.md +0 -324
- package/template/.aioson/locales/pt-BR/agents/pair.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/pm.md +0 -182
- package/template/.aioson/locales/pt-BR/agents/product.md +0 -466
- package/template/.aioson/locales/pt-BR/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/qa.md +0 -300
- package/template/.aioson/locales/pt-BR/agents/setup.md +0 -533
- package/template/.aioson/locales/pt-BR/agents/sheldon.md +0 -323
- package/template/.aioson/locales/pt-BR/agents/squad.md +0 -1330
- package/template/.aioson/locales/pt-BR/agents/tester.md +0 -449
- package/template/.aioson/locales/pt-BR/agents/ux-ui.md +0 -669
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Agente @validator
|
|
2
|
+
|
|
3
|
+
> ⚡ **ACTIVATED** — Você está operando como @validator. Sua missão é validar tecnicamente o output do implementador contra o contrato de sucesso.
|
|
4
|
+
|
|
5
|
+
## Missão
|
|
6
|
+
Atuar como o "Validador" no Padrão Nautilus. Sua única responsabilidade é verificar se os critérios binários definidos no `harness-contract.json` foram atendidos. Você é o gatekeeper final antes de uma feature ser marcada como concluída.
|
|
7
|
+
|
|
8
|
+
## Restrições de Contexto (Obrigatório)
|
|
9
|
+
Para garantir imparcialidade e evitar alucinações de continuidade, você opera em um **sandbox de contexto estrito**:
|
|
10
|
+
|
|
11
|
+
1. **Lê (Somente):**
|
|
12
|
+
- `.aioson/plans/{slug}/harness-contract.json` (O Contrato)
|
|
13
|
+
- `.aioson/plans/{slug}/progress.json` (Estado Atual)
|
|
14
|
+
- Arquivos explicitamente listados em `progress.json.completed_steps`
|
|
15
|
+
- Output de ferramentas de diagnóstico (Linter, Test Runners, Compiladores)
|
|
16
|
+
2. **NUNCA lê:**
|
|
17
|
+
- Histórico de conversa de outros agentes (@dev, @analyst, @architect)
|
|
18
|
+
- PRDs, Requirements ou Architecture (seu foco é o contrato binário, não a visão de produto)
|
|
19
|
+
- Código de outras features não relacionadas ao contrato atual
|
|
20
|
+
3. **Comportamento:**
|
|
21
|
+
- Nunca implemente código. Você apenas observa e reporta.
|
|
22
|
+
- Nunca sugira refatorações estéticas ou melhorias que não estejam no contrato.
|
|
23
|
+
- Se um critério falhar, forneça a razão técnica exata (ex: "Arquivo X não encontrado" ou "Erro de sintaxe na linha Y").
|
|
24
|
+
|
|
25
|
+
## Protocolo de Execução (RF-VAL)
|
|
26
|
+
|
|
27
|
+
### Passo 1: Carregamento
|
|
28
|
+
Localize o `harness-contract.json` para a feature atual. Identifique os critérios `binary: true`.
|
|
29
|
+
|
|
30
|
+
### Passo 2: Verificação Determinística
|
|
31
|
+
Execute (ou solicite a execução) de ferramentas locais para cada critério:
|
|
32
|
+
- `ls -l {path}` para existência de arquivos.
|
|
33
|
+
- `cat {path}` para validar padrões ou conteúdo.
|
|
34
|
+
- `npm test` ou equivalente para critérios de execução.
|
|
35
|
+
|
|
36
|
+
### Passo 3: Verificação Semântica
|
|
37
|
+
Para critérios que exigem compreensão (ex: "API segue o padrão REST"), analise o código entregue contrastando exclusivamente com o que o contrato exige.
|
|
38
|
+
|
|
39
|
+
### Passo 4: Geração de Veredicto
|
|
40
|
+
Seu output deve ser **EXCLUSIVAMENTE** um objeto JSON estruturado para ser parseado pela máquina. Não adicione preâmbulos ou explicações fora do JSON.
|
|
41
|
+
|
|
42
|
+
## Output Format (JSON)
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"phase": {N},
|
|
47
|
+
"validation_at": "{ISO-8601}",
|
|
48
|
+
"results": [
|
|
49
|
+
{
|
|
50
|
+
"id": "{C1, C2...}",
|
|
51
|
+
"passed": {true|false},
|
|
52
|
+
"reason": {null | "mensagem técnica do erro"}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"overall_score": {0 | 1},
|
|
56
|
+
"ready_for_done_gate": {true | false}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- `overall_score`: `1` se TODOS os critérios obrigatórios passaram; `0` caso contrário.
|
|
61
|
+
- `ready_for_done_gate`: `true` se a feature pode seguir para o status `done`.
|
|
62
|
+
|
|
63
|
+
## Interação
|
|
64
|
+
Após emitir o JSON, encerre a sessão imediatamente. Você é um processo de curta duração.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
## ▶ Próximo passo
|
|
68
|
+
O resultado será gravado no `progress.json` pelo gateway. Ative o agente de volta (@dev) para correção ou siga para o fechamento da feature.
|
|
69
|
+
---
|
|
@@ -58,7 +58,11 @@ if (tags.length > 0) {
|
|
|
58
58
|
// --- Load nodes ---
|
|
59
59
|
let nodes = [];
|
|
60
60
|
for (const brain of brainFiles) {
|
|
61
|
-
const brainPath = path.
|
|
61
|
+
const brainPath = path.isAbsolute(brain.path)
|
|
62
|
+
? brain.path
|
|
63
|
+
: brain.path.startsWith('.aioson/brains/')
|
|
64
|
+
? path.join(BRAINS_DIR, '..', '..', brain.path)
|
|
65
|
+
: path.join(BRAINS_DIR, brain.path);
|
|
62
66
|
if (!fs.existsSync(brainPath)) {
|
|
63
67
|
process.stderr.write(`Warning: brain file not found: ${brainPath}\n`);
|
|
64
68
|
continue;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"global_mode": "guarded",
|
|
4
|
+
"tools": {
|
|
5
|
+
"codex": {
|
|
6
|
+
"mode": "trusted",
|
|
7
|
+
"fallback_mode": "guarded",
|
|
8
|
+
"shell_whitelist": ["git *", "npm *", "npx *", "node *", "aioson *"],
|
|
9
|
+
"shell_blacklist": ["rm -rf /", "curl * | sh", "*>*"],
|
|
10
|
+
"aioson_whitelist": ["workflow:next", "workflow:heal", "commit:prepare", "git:guard", "runtime:emit", "live:handoff"],
|
|
11
|
+
"requires_tty": false,
|
|
12
|
+
"max_auto_retries": 3
|
|
13
|
+
},
|
|
14
|
+
"claude": {
|
|
15
|
+
"mode": "trusted",
|
|
16
|
+
"fallback_mode": "guarded",
|
|
17
|
+
"shell_whitelist": ["git *", "npm *", "npx *", "node *", "aioson *"],
|
|
18
|
+
"shell_blacklist": ["rm -rf /", "curl * | sh", "*>*"],
|
|
19
|
+
"aioson_whitelist": ["workflow:next", "workflow:heal", "commit:prepare", "git:guard", "runtime:emit", "live:handoff"],
|
|
20
|
+
"requires_tty": false,
|
|
21
|
+
"max_auto_retries": 3
|
|
22
|
+
},
|
|
23
|
+
"gemini": {
|
|
24
|
+
"mode": "guarded",
|
|
25
|
+
"fallback_mode": "guarded",
|
|
26
|
+
"shell_whitelist": ["git status", "git log", "npm test"],
|
|
27
|
+
"aioson_whitelist": ["workflow:next"],
|
|
28
|
+
"requires_tty": true,
|
|
29
|
+
"max_auto_retries": 1
|
|
30
|
+
},
|
|
31
|
+
"opencode": {
|
|
32
|
+
"mode": "guarded",
|
|
33
|
+
"fallback_mode": "abort",
|
|
34
|
+
"shell_whitelist": [],
|
|
35
|
+
"aioson_whitelist": ["workflow:next"],
|
|
36
|
+
"requires_tty": true,
|
|
37
|
+
"max_auto_retries": 0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"agents": {
|
|
41
|
+
"committer": { "max_mode": "guarded" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -48,7 +48,8 @@ Quando o agente perceber que está próximo do threshold:
|
|
|
48
48
|
- `framework`
|
|
49
49
|
- `framework_installed` (boolean) — `true` means the framework was detected in the workspace; downstream agents skip installation commands. `false` means it was not detected; agents must include installation steps before any implementation.
|
|
50
50
|
- `classification`
|
|
51
|
-
- `
|
|
51
|
+
- `interaction_language` (BCP-47, for example `en`, `pt-BR`)
|
|
52
|
+
- `conversation_language` (legacy compatibility alias; keep synchronized with `interaction_language`)
|
|
52
53
|
- `aioson_version`
|
|
53
54
|
|
|
54
55
|
Optional UI context fields:
|
|
@@ -63,6 +64,7 @@ Allowed `project_type` values:
|
|
|
63
64
|
- `site`
|
|
64
65
|
- `script`
|
|
65
66
|
- `dapp`
|
|
67
|
+
- `desktop_app`
|
|
66
68
|
|
|
67
69
|
Optional Web3 context fields (recommended for `project_type=dapp`):
|
|
68
70
|
- `web3_enabled` (boolean)
|
|
@@ -205,6 +207,19 @@ Agents load a doc only when its `description` matches the current task or when a
|
|
|
205
207
|
|
|
206
208
|
**Key principle:** docs persist across sessions. A refactoring plan saved here will be available to any future agent that works on the same area — no need to re-explain context.
|
|
207
209
|
|
|
210
|
+
### Code governance (`.aioson/design-docs/`)
|
|
211
|
+
|
|
212
|
+
Persistent code-structure governance surfaced by `aioson preflight` and loaded on demand by agents. These files are project-local: installed once, preserved on update, and restorable with `aioson doctor --fix` if missing.
|
|
213
|
+
|
|
214
|
+
Default governance files:
|
|
215
|
+
- `folder-structure.md`
|
|
216
|
+
- `componentization.md`
|
|
217
|
+
- `code-reuse.md`
|
|
218
|
+
- `naming.md`
|
|
219
|
+
- `file-size.md`
|
|
220
|
+
|
|
221
|
+
**When to use:** folder structure, naming, reuse, component boundaries, file-size thresholds, and maintainability constraints.
|
|
222
|
+
|
|
208
223
|
### Design docs (`.aioson/context/design-doc.md`)
|
|
209
224
|
|
|
210
225
|
Living decision documents that bridge discovery and implementation. Produced by `@discovery-design-doc`.
|
|
@@ -219,16 +234,31 @@ agents: [dev, architect] # empty [] = all agents load it
|
|
|
219
234
|
|
|
220
235
|
**Design-doc vs PRD — when to use each:**
|
|
221
236
|
|
|
222
|
-
| | PRD (`prd.md`) | Design doc (`design-doc.md`) |
|
|
223
|
-
|
|
224
|
-
| **Produced by** | `@product` | `@discovery-design-doc` |
|
|
225
|
-
| **Focus** | What and why — vision, users, problem, features | How — technical flows, decisions, risks, slices |
|
|
226
|
-
| **Audience** | All agents | Technical agents (dev, architect, qa) |
|
|
227
|
-
| **Lifecycle** | Written once, enhanced by @pm | Living document, updated as decisions are made |
|
|
228
|
-
| **When to create** | Every project/feature | Complex features needing technical clarity |
|
|
237
|
+
| | PRD (`prd.md`) | Code governance (`.aioson/design-docs/`) | Design doc (`design-doc.md`) |
|
|
238
|
+
|---|---|---|---|
|
|
239
|
+
| **Produced by** | `@product` | Installer + project team | `@discovery-design-doc` |
|
|
240
|
+
| **Focus** | What and why — vision, users, problem, features | Structural code quality rules | How — technical flows, decisions, risks, slices |
|
|
241
|
+
| **Audience** | All agents | Agents doing structural planning or implementation | Technical agents (dev, architect, qa) |
|
|
242
|
+
| **Lifecycle** | Written once, enhanced by @pm | Stable, edited when conventions change | Living document, updated as decisions are made |
|
|
243
|
+
| **When to create** | Every project/feature | Installed by default | Complex features needing technical clarity |
|
|
229
244
|
|
|
230
245
|
A project can have both: the PRD defines the product; the design-doc defines the approach. For simple features (MICRO), only the PRD may be needed.
|
|
231
246
|
|
|
247
|
+
### Bootstrap (`.aioson/context/bootstrap/`)
|
|
248
|
+
|
|
249
|
+
Semantic knowledge cache that gives agents instant understanding of the system without reading the codebase. Generated by `@discover`.
|
|
250
|
+
|
|
251
|
+
| File | Content | Loaded by |
|
|
252
|
+
|------|---------|-----------|
|
|
253
|
+
| `what-is.md` | System identity, users, value proposition | `@product`, `@analyst` |
|
|
254
|
+
| `how-it-works.md` | Architecture, modules, data flow, integrations | `@dev`, `@architect` |
|
|
255
|
+
| `what-it-does.md` | Features, business rules, user workflows | `@product`, `@analyst` |
|
|
256
|
+
| `current-state.md` | Implementation status, tech debt, recent changes | `@dev`, `@qa` |
|
|
257
|
+
|
|
258
|
+
**When to use:** run `@discover` once after setup, and re-run when significant changes accumulate. Agents read bootstrap files at session start for instant context.
|
|
259
|
+
|
|
260
|
+
**Key difference from `discovery.md`:** `discovery.md` is a technical scan (routes, entities, structure). Bootstrap is semantic (meaning, purpose, business rules). They complement each other.
|
|
261
|
+
|
|
232
262
|
## Skills
|
|
233
263
|
|
|
234
264
|
AIOSON ships three types of skills in `.aioson/skills/`:
|
|
@@ -373,10 +403,8 @@ When the same setting exists in multiple tiers, the lower tier wins (local > pro
|
|
|
373
403
|
Until the user tier is implemented in the CLI, use `CLAUDE.local.md` for personal
|
|
374
404
|
preferences that should not affect other team members.
|
|
375
405
|
|
|
376
|
-
## Agent
|
|
377
|
-
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
-
|
|
381
|
-
- `aioson locale:apply` (reads `conversation_language` from context)
|
|
382
|
-
- `aioson locale:apply --lang=pt-BR` (manual override, also accepts `en`, `es`, `fr`)
|
|
406
|
+
## Agent language model
|
|
407
|
+
- Canonical agent prompts are stored only in `.aioson/agents/` and written in English.
|
|
408
|
+
- User-facing communication is controlled by `interaction_language`.
|
|
409
|
+
- `conversation_language` remains as a compatibility alias for older projects.
|
|
410
|
+
- Use `aioson locale:apply` to restore canonical prompts and synchronize the chosen `interaction_language`.
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
---
|
|
2
|
-
version: 1.
|
|
3
|
-
ratified: 2026-04-04
|
|
4
|
-
last_amended: 2026-04-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# AIOSON Constitution
|
|
8
|
-
|
|
9
|
-
> Principles that govern all agents, all classifications, all sessions.
|
|
10
|
-
> Every agent may cite these articles. No agent may override them.
|
|
11
|
-
|
|
12
|
-
## Article I — Spec First
|
|
13
|
-
Features begin as specifications, not code. Implementation without a spec artifact is exploration, not development.
|
|
14
|
-
|
|
15
|
-
## Article II — Right-Sized Process
|
|
16
|
-
MICRO, SMALL, and MEDIUM must not receive the same process depth. Applying MEDIUM ceremony to a MICRO project wastes more than it protects.
|
|
17
|
-
|
|
18
|
-
## Article III — Observable Work
|
|
19
|
-
Important agent actions leave visible artifacts or runtime signals. Work that exists only in conversation history is work that can be lost.
|
|
20
|
-
|
|
21
|
-
## Article IV — Testable Behavior
|
|
22
|
-
Acceptance criteria must be independently verifiable. "Works correctly" is not a criterion. "Returns 403 when user A accesses user B's resource" is.
|
|
23
|
-
|
|
24
|
-
## Article V — Clean Handoffs
|
|
25
|
-
Artifacts must be self-contained enough for the next agent to start without re-reading the full discovery chain. If the next agent needs to ask "where do I start?", the handoff failed.
|
|
26
|
-
|
|
27
|
-
## Article VI — Simplicity Over Ceremony
|
|
28
|
-
Do not add layers, files, or workflows unless they reduce downstream ambiguity. Three similar lines of code is better than a premature abstraction. One well-written spec is better than five thin artifacts.
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
---
|
|
2
|
+
version: 1.1.0
|
|
3
|
+
ratified: 2026-04-04
|
|
4
|
+
last_amended: 2026-04-28
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AIOSON Constitution
|
|
8
|
+
|
|
9
|
+
> Principles that govern all agents, all classifications, all sessions.
|
|
10
|
+
> Every agent may cite these articles. No agent may override them.
|
|
11
|
+
|
|
12
|
+
## Article I — Spec First
|
|
13
|
+
Features begin as specifications, not code. Implementation without a spec artifact is exploration, not development.
|
|
14
|
+
|
|
15
|
+
## Article II — Right-Sized Process
|
|
16
|
+
MICRO, SMALL, and MEDIUM must not receive the same process depth. Applying MEDIUM ceremony to a MICRO project wastes more than it protects.
|
|
17
|
+
|
|
18
|
+
## Article III — Observable Work
|
|
19
|
+
Important agent actions leave visible artifacts or runtime signals. Work that exists only in conversation history is work that can be lost.
|
|
20
|
+
|
|
21
|
+
## Article IV — Testable Behavior
|
|
22
|
+
Acceptance criteria must be independently verifiable. "Works correctly" is not a criterion. "Returns 403 when user A accesses user B's resource" is.
|
|
23
|
+
|
|
24
|
+
## Article V — Clean Handoffs
|
|
25
|
+
Artifacts must be self-contained enough for the next agent to start without re-reading the full discovery chain. If the next agent needs to ask "where do I start?", the handoff failed.
|
|
26
|
+
|
|
27
|
+
## Article VI — Simplicity Over Ceremony
|
|
28
|
+
Do not add layers, files, or workflows unless they reduce downstream ambiguity. Three similar lines of code is better than a premature abstraction. One well-written spec is better than five thin artifacts.
|
|
29
|
+
|
|
30
|
+
## Article VII — Zero Trust by Default
|
|
31
|
+
Security is a baseline, not a feature. Every technical agent (`@analyst`, `@architect`, `@dev`, `@qa`) must consume the security baseline declared in `.aioson/rules/security-baseline.md`, which defines the controls, severities, evidence and per-classification policy (MICRO advisory, SMALL scan, MEDIUM audit-blocking on open High/Critical findings). Controls carry stable IDs (`SEC-SBD-01`..`SEC-SBD-08`) so requirements, conformance and findings can reference them without prose drift. Agents may not silently weaken, rename or skip a control — deviations require an explicit decision recorded in the feature spec.
|
|
32
|
+
|
|
33
|
+
## Governance
|
|
34
|
+
- Amendments require explicit user approval
|
|
35
|
+
- Articles are numbered, not named — never renumber existing articles
|
|
36
|
+
- New articles are appended, never inserted
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Design Governance — Code Organization Rules"
|
|
3
|
+
scope: "project"
|
|
4
|
+
agents: []
|
|
5
|
+
updated: "2026-04-12"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Design Doc — Code Organization
|
|
9
|
+
|
|
10
|
+
> Este arquivo define as regras de organização de código para este projeto.
|
|
11
|
+
> É carregado obrigatoriamente por `@dev` e `@deyvin` antes de qualquer implementação.
|
|
12
|
+
> É gerado/atualizado por `@discovery-design-doc` durante o gate pré-dev.
|
|
13
|
+
> Agentes podem enriquecer este arquivo com padrões descobertos durante implementação — nunca remover seções.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Organização de pastas
|
|
18
|
+
|
|
19
|
+
**Princípio:** estrutura hierárquica semântica — cada pasta representa uma responsabilidade, não uma coleção aleatória de arquivos.
|
|
20
|
+
|
|
21
|
+
**Regras:**
|
|
22
|
+
- Máximo 3 níveis de profundidade antes de reavaliar a estrutura. Se precisar de mais, a responsabilidade provavelmente deve ser um módulo separado.
|
|
23
|
+
- Singular para entidade única ou responsabilidade específica: `command/`, `service/`, `handler/`, `util/`
|
|
24
|
+
- Plural para coleções de itens do mesmo tipo: `commands/`, `services/`, `handlers/`, `utils/`
|
|
25
|
+
- Kebab-case para todos os nomes de pasta: `squad-dashboard/`, `context-cache/`, `runner/`
|
|
26
|
+
- Nunca misturar estilos dentro de um mesmo nível de diretório
|
|
27
|
+
|
|
28
|
+
**Padrão de agrupamento:**
|
|
29
|
+
```
|
|
30
|
+
src/
|
|
31
|
+
commands/ ← todos os handlers de CLI (um arquivo por comando)
|
|
32
|
+
lib/ ← lógica reutilizável sem dependência de CLI
|
|
33
|
+
{domínio}/ ← agrupado por domínio (genomes/, squads/, store/)
|
|
34
|
+
squad/ ← lógica específica do sistema de squads
|
|
35
|
+
runner/ ← lógica de execução de planos
|
|
36
|
+
i18n/ ← internacionalização
|
|
37
|
+
messages/ ← arquivos de tradução por locale
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Evitar:**
|
|
41
|
+
- Pastas genéricas como `misc/`, `stuff/`, `temp/`, `old/`
|
|
42
|
+
- Arquivos soltos na raiz de `src/` que pertencem a um domínio específico
|
|
43
|
+
- Uma pasta com um único arquivo (exceto `index.js` de módulo público)
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Componentização
|
|
48
|
+
|
|
49
|
+
**Quando extrair um componente ou módulo separado:**
|
|
50
|
+
- A lógica aparece em 2+ lugares diferentes → extrair para `lib/` ou utilitário compartilhado
|
|
51
|
+
- O arquivo está se aproximando de 300 linhas de lógica pura (excluindo comentários e linhas em branco)
|
|
52
|
+
- A responsabilidade pode ser descrita em uma frase curta e distinta
|
|
53
|
+
- O código pode ser testado de forma independente
|
|
54
|
+
|
|
55
|
+
**Quando manter inline:**
|
|
56
|
+
- Lógica usada em único lugar e com menos de ~50 linhas
|
|
57
|
+
- Abstração prematura sem segundo uso confirmado
|
|
58
|
+
- Extração criaria um arquivo de uma única função trivial
|
|
59
|
+
|
|
60
|
+
**Responsabilidade única:**
|
|
61
|
+
- Um arquivo = uma responsabilidade principal
|
|
62
|
+
- Funções auxiliares de suporte à responsabilidade principal podem coexistir no mesmo arquivo
|
|
63
|
+
- Funções auxiliares usadas em 2+ arquivos → mover para `utils.js` ou módulo dedicado
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Reuso
|
|
68
|
+
|
|
69
|
+
**Antes de criar qualquer arquivo novo:**
|
|
70
|
+
1. Verificar se `src/utils.js` já resolve o problema
|
|
71
|
+
2. Verificar se existe módulo em `src/lib/` com responsabilidade próxima
|
|
72
|
+
3. Verificar se o padrão existe em algum `src/commands/*.js` similar
|
|
73
|
+
|
|
74
|
+
**Hierarquia de reuso:**
|
|
75
|
+
1. Função utilitária existente em `src/utils.js`
|
|
76
|
+
2. Módulo de lib em `src/lib/{domínio}/`
|
|
77
|
+
3. Helper local no próprio arquivo (se uso único)
|
|
78
|
+
4. Novo arquivo somente se nenhuma das opções acima servir
|
|
79
|
+
|
|
80
|
+
**Composição sobre duplicação:**
|
|
81
|
+
- Nunca copiar-colar blocos de código entre arquivos — extrair para função nomeada
|
|
82
|
+
- Se dois comandos CLI têm lógica similar, o ponto comum vai para `src/lib/`
|
|
83
|
+
- Se dois arquivos importam a mesma sequência de dependências, criar uma factory ou inicializador
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Tamanho de arquivo
|
|
88
|
+
|
|
89
|
+
**Guideline:**
|
|
90
|
+
- **< 300 linhas** — ideal. Arquivo focado e coeso.
|
|
91
|
+
- **300–500 linhas** — aceitável. Monitorar crescimento.
|
|
92
|
+
- **> 500 linhas** — ⚠ alerta. `@dev` e `@deyvin` devem propor split antes de continuar.
|
|
93
|
+
|
|
94
|
+
**Protocolo de alerta (implementado por @dev e @deyvin):**
|
|
95
|
+
Ao estimar que um arquivo resultante terá mais de 500 linhas:
|
|
96
|
+
1. Emitir alerta com estimativa
|
|
97
|
+
2. Listar 2–3 alternativas concretas de extração ou componentização
|
|
98
|
+
3. Aguardar confirmação antes de continuar (`@dev`) ou prosseguir após 1 turno sem resposta (`@deyvin` pair mode)
|
|
99
|
+
|
|
100
|
+
**O alerta nunca é bloqueante** — é uma pausa para pensar, não um impedimento.
|
|
101
|
+
|
|
102
|
+
**Estratégias de split comuns:**
|
|
103
|
+
- Extrair funções de validação para `validate-{domínio}.js`
|
|
104
|
+
- Extrair helpers de formatação para `format-{domínio}.js`
|
|
105
|
+
- Separar lógica de leitura/escrita de arquivo em módulo de I/O
|
|
106
|
+
- Quebrar comando CLI grande em command handler + business logic em `lib/`
|
|
107
|
+
|
|
108
|
+
**Exceções documentadas:** arquivos de mensagens i18n, fixtures de teste e arquivos gerados automaticamente não contam para o guideline.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Nomeclatura
|
|
113
|
+
|
|
114
|
+
**Arquivos:**
|
|
115
|
+
- kebab-case para todos os arquivos: `squad-dashboard.js`, `context-writer.js`
|
|
116
|
+
- Prefixo de domínio quando dentro de pasta flat: `squad-plan.js`, `squad-status.js` (dentro de `commands/`)
|
|
117
|
+
- Sem sufixos genéricos como `helper`, `manager`, `handler` quando o nome do domínio já é claro
|
|
118
|
+
|
|
119
|
+
**Por camada:**
|
|
120
|
+
| Camada | Convenção | Exemplo |
|
|
121
|
+
|--------|-----------|---------|
|
|
122
|
+
| CLI commands | `{namespace}-{action}.js` | `squad-deploy.js`, `workflow-next.js` |
|
|
123
|
+
| Lib / domain logic | `{responsabilidade}.js` | `context-compactor.js`, `learning-extractor.js` |
|
|
124
|
+
| Utils compartilhados | `{tipo}-{domínio}.js` ou `utils.js` | `genome-format.js`, `utils.js` |
|
|
125
|
+
| Entry points de módulo | `index.js` | `src/i18n/index.js` |
|
|
126
|
+
| Configuração | `{nome}.config.js` ou `constants.js` | `constants.js` |
|
|
127
|
+
|
|
128
|
+
**Variáveis e funções (JavaScript):**
|
|
129
|
+
- camelCase: `contextPackage`, `featureSlug`, `runtimeStore`
|
|
130
|
+
- Constantes globais: SCREAMING_SNAKE_CASE — `MAX_RETRIES`, `DEFAULT_TIMEOUT`
|
|
131
|
+
- Funções: verbo + substantivo — `loadContext()`, `parseManifest()`, `emitEvent()`
|
|
132
|
+
- Booleanos: prefixo `is`, `has`, `should` — `isReady`, `hasErrors`, `shouldRetry`
|
|
133
|
+
|
|
134
|
+
**Banco de dados (SQLite):**
|
|
135
|
+
- snake_case para tabelas e colunas: `agent_runs`, `session_key`, `started_at`
|
|
136
|
+
- Tabelas no plural: `agent_runs`, `runtime_logs`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
agents: [dev, architect, ux-ui, qa, tester, committer]
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Canonical Project Map
|
|
6
|
+
|
|
7
|
+
> When the user mentions a directory, resolve it using this map before creating files.
|
|
8
|
+
> If ambiguous, confirm the exact path with the user.
|
|
9
|
+
|
|
10
|
+
## Root-level directories
|
|
11
|
+
|
|
12
|
+
| Intent | Canonical path | Notes |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| `docs/` (root) | `docs/` | Project documentation for humans. NOT `.aioson/docs/`. |
|
|
15
|
+
| `plans/` | `plans/` | Pre-production research and plans. |
|
|
16
|
+
| `prds/` | `prds/` | Product requirement drafts (not active PRDs). |
|
|
17
|
+
| `src/` | `src/` | Source code. |
|
|
18
|
+
| `tests/` | `tests/` | Test files. |
|
|
19
|
+
| `scripts/` | `scripts/` | Utility scripts. |
|
|
20
|
+
| `bin/` | `bin/` | CLI entry points. |
|
|
21
|
+
| `changelogs/` | `changelogs/` | Release notes and changelogs. |
|
|
22
|
+
|
|
23
|
+
## AIOSON-managed directories
|
|
24
|
+
|
|
25
|
+
| Intent | Canonical path | Notes |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `.aioson/` | `.aioson/` | Framework context and runtime. |
|
|
28
|
+
| `agents/` | `.aioson/agents/` | Agent prompt files. |
|
|
29
|
+
| `context/` | `.aioson/context/` | Workflow state, handoffs, specs. |
|
|
30
|
+
| `docs/` (aioson) | `.aioson/docs/` | Private docs loaded on-demand by agents. |
|
|
31
|
+
| `rules/` | `.aioson/rules/` | Project-specific rules for agents. |
|
|
32
|
+
| `design-docs/` | `.aioson/design-docs/` | Code governance docs. |
|
|
33
|
+
| `plans/` (feature) | `.aioson/plans/{slug}/` | Feature plans and harness contracts. |
|
|
34
|
+
| `runtime/` | `.aioson/runtime/` | SQLite telemetry and dashboard data. |
|
|
35
|
+
| `backups/` | `.aioson/backups/` | Auto-generated backups. |
|
|
36
|
+
| `skills/` | `.aioson/skills/` | Design, static and dynamic skills. |
|
|
37
|
+
| `installed-skills/` | `.aioson/installed-skills/` | Third-party installed skills. |
|
|
38
|
+
|
|
39
|
+
## Context files (must live in `.aioson/context/`)
|
|
40
|
+
|
|
41
|
+
| File | Canonical path |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `project.context.md` | `.aioson/context/project.context.md` |
|
|
44
|
+
| `prd.md` | `.aioson/context/prd.md` |
|
|
45
|
+
| `spec.md` | `.aioson/context/spec.md` |
|
|
46
|
+
| `last-handoff.json` | `.aioson/context/last-handoff.json` |
|
|
47
|
+
| `workflow.state.json` | `.aioson/context/workflow.state.json` |
|
|
48
|
+
| `project-pulse.md` | `.aioson/context/project-pulse.md` |
|
|
49
|
+
| `dev-state.md` | `.aioson/context/dev-state.md` |
|
|
50
|
+
| `commit-prep.json` | `.aioson/context/commit-prep.json` |
|
|
51
|
+
|
|
52
|
+
## Path rules
|
|
53
|
+
|
|
54
|
+
1. **When the user says `/docs/`, they mean the project root `docs/` folder**, not `.aioson/docs/`.
|
|
55
|
+
2. **When the user specifies a target directory, confirm the exact path** before creating files.
|
|
56
|
+
3. **Never create bootstrap or template files in the project root** unless explicitly asked. Default to `.aioson/context/` for framework artifacts.
|
|
57
|
+
4. **Never overwrite `.gitignore`**, `README.md`, or existing config files unless explicitly asked. Append or modify the targeted item only.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "DRY principles, reuse hierarchy, and composition patterns"
|
|
3
|
+
scope: "governance"
|
|
4
|
+
agents: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Reuse — Governance Rules
|
|
8
|
+
|
|
9
|
+
> Loaded automatically by @dev and @deyvin. Override per-project via `.aioson/rules/`.
|
|
10
|
+
|
|
11
|
+
## Before creating any new file
|
|
12
|
+
|
|
13
|
+
Always verify in this order:
|
|
14
|
+
|
|
15
|
+
1. Does a shared utility already solve this? (check `utils.js`, `utils/`, `helpers/`, `shared/`)
|
|
16
|
+
2. Does a domain module in `lib/`, `services/`, or `lib/` already own this responsibility?
|
|
17
|
+
3. Does a similar existing file already do something close enough to extend?
|
|
18
|
+
|
|
19
|
+
Create a new file only if none of the above applies.
|
|
20
|
+
|
|
21
|
+
## Reuse hierarchy
|
|
22
|
+
|
|
23
|
+
1. **Existing shared utility** — call it, do not reimplement
|
|
24
|
+
2. **Domain module** — if the logic is domain-specific, extend the right module
|
|
25
|
+
3. **Inline helper** — acceptable if single use and under ~50 lines
|
|
26
|
+
4. **New file** — only when no existing location is appropriate
|
|
27
|
+
|
|
28
|
+
## Composition over duplication
|
|
29
|
+
|
|
30
|
+
- Never copy-paste code blocks between files — extract to a named function instead
|
|
31
|
+
- If two modules import the same sequence of dependencies, consider a factory or initializer
|
|
32
|
+
- If the same validation logic appears in 3+ places, it belongs in a shared validator
|
|
33
|
+
- If two commands share a pattern for reading + transforming + writing, extract the pipeline
|
|
34
|
+
|
|
35
|
+
## DRY with pragmatism
|
|
36
|
+
|
|
37
|
+
DRY applies to **logic**, not to **structure**:
|
|
38
|
+
|
|
39
|
+
- Two functions that look similar but serve different domain concepts should stay separate
|
|
40
|
+
- Merging them to reduce lines often creates the wrong abstraction
|
|
41
|
+
- Duplicating a string or constant is worse than a duplicate variable — always use named constants
|
|
42
|
+
- Small, isolated duplication is sometimes better than a shared dependency that couples unrelated modules
|
|
43
|
+
|
|
44
|
+
## When NOT to reuse
|
|
45
|
+
|
|
46
|
+
- When the shared abstraction introduces coupling between unrelated modules
|
|
47
|
+
- When the reused code would need flags or conditionals to serve a new caller — that signals divergence, not reuse
|
|
48
|
+
- When the only shared thing is syntax, not semantics
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "When and how to extract components, modules, and abstractions"
|
|
3
|
+
scope: "governance"
|
|
4
|
+
agents: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Componentization — Governance Rules
|
|
8
|
+
|
|
9
|
+
> Loaded automatically by @dev and @deyvin. Override per-project via `.aioson/rules/`.
|
|
10
|
+
|
|
11
|
+
## When to extract
|
|
12
|
+
|
|
13
|
+
Extract a component, module, or function when ANY of these is true:
|
|
14
|
+
|
|
15
|
+
1. **Duplication** — the same logic appears in 2 or more different places
|
|
16
|
+
2. **Size** — a file is approaching 300 lines of pure logic (excluding comments and blank lines)
|
|
17
|
+
3. **Testability** — the piece of logic can be tested in isolation from the rest
|
|
18
|
+
4. **Description** — the responsibility can be stated in one short, specific sentence
|
|
19
|
+
|
|
20
|
+
## When to keep inline
|
|
21
|
+
|
|
22
|
+
Keep logic inline when ALL of these are true:
|
|
23
|
+
|
|
24
|
+
- Used in exactly one place
|
|
25
|
+
- Under ~50 lines
|
|
26
|
+
- Extracting it would create a file with a single trivial function
|
|
27
|
+
- No second confirmed use case exists
|
|
28
|
+
|
|
29
|
+
## Single responsibility
|
|
30
|
+
|
|
31
|
+
- One file = one primary responsibility
|
|
32
|
+
- Supporting helper functions for that primary responsibility may coexist in the same file
|
|
33
|
+
- Helper functions used in 2+ files → move to a shared utility or dedicated module
|
|
34
|
+
|
|
35
|
+
## Avoid premature abstraction
|
|
36
|
+
|
|
37
|
+
- Do not create abstractions for hypothetical future requirements
|
|
38
|
+
- Three similar-but-not-identical code blocks is not always a reason to abstract — wait for the pattern to stabilize
|
|
39
|
+
- An abstraction that is harder to understand than the original code is a liability, not an asset
|
|
40
|
+
- The right abstraction reveals intent. If the name cannot describe what it does in 3 words or fewer, reconsider.
|
|
41
|
+
|
|
42
|
+
## Signals that an abstraction is wrong
|
|
43
|
+
|
|
44
|
+
- The function needs many flags or mode switches to handle different callers
|
|
45
|
+
- The caller has to know internal details to use it correctly
|
|
46
|
+
- Tests for the abstraction are harder to read than tests for the original code
|
|
47
|
+
- Removing the abstraction and inlining the logic would make the code clearer
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "File size guidelines, alert thresholds, and split strategies"
|
|
3
|
+
scope: "governance"
|
|
4
|
+
agents: []
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# File Size — Governance Rules
|
|
8
|
+
|
|
9
|
+
> Loaded automatically by @dev and @deyvin. Override per-project via `.aioson/rules/`.
|
|
10
|
+
|
|
11
|
+
## Thresholds
|
|
12
|
+
|
|
13
|
+
| Lines | Status | Action |
|
|
14
|
+
|-------|--------|--------|
|
|
15
|
+
| < 300 | Ideal | Continue normally |
|
|
16
|
+
| 300–500 | Acceptable | Monitor growth; do not split preemptively |
|
|
17
|
+
| > 500 | Alert | Propose split before writing more code |
|
|
18
|
+
|
|
19
|
+
Lines are counted as pure logic — comments, blank lines, and closing braces do not count toward the threshold.
|
|
20
|
+
|
|
21
|
+
## Alert protocol
|
|
22
|
+
|
|
23
|
+
When estimating that a resulting file will exceed 500 lines:
|
|
24
|
+
|
|
25
|
+
1. Emit the alert with the estimated line count and file path
|
|
26
|
+
2. List 2–3 concrete extraction alternatives with real file paths
|
|
27
|
+
3. `@dev`: wait for user confirmation before proceeding
|
|
28
|
+
4. `@deyvin` pair mode: present alternatives and continue after 1 turn with no response
|
|
29
|
+
|
|
30
|
+
The alert is never blocking — it is a pause to think, not an impediment.
|
|
31
|
+
|
|
32
|
+
## Common split strategies
|
|
33
|
+
|
|
34
|
+
| Situation | Split approach |
|
|
35
|
+
|-----------|---------------|
|
|
36
|
+
| Large command / controller | Extract business logic to a `service/` or `lib/` module |
|
|
37
|
+
| Validation logic growing | Extract to `validate-{domain}.js` / `{domain}_validator.py` |
|
|
38
|
+
| Formatting / serialization | Extract to `format-{domain}.js` or a dedicated serializer |
|
|
39
|
+
| Mixed read/write concerns | Separate into a reader and a writer module |
|
|
40
|
+
| Route file growing | Group into feature sub-routers |
|
|
41
|
+
| Large test file | Split by domain or by test type (unit / integration / e2e) |
|
|
42
|
+
| Large React component | Extract sub-components and move logic to a custom hook |
|
|
43
|
+
| Large class with many methods | Extract related method groups into collaborator classes |
|
|
44
|
+
|
|
45
|
+
## Exceptions
|
|
46
|
+
|
|
47
|
+
These file types are exempt from the size guideline:
|
|
48
|
+
|
|
49
|
+
- Internationalization / locale files (`messages.json`, `en.yml`, `pt-BR.ts`)
|
|
50
|
+
- Test fixtures and factories
|
|
51
|
+
- Auto-generated files (migrations with timestamps, GraphQL schemas, OpenAPI specs)
|
|
52
|
+
- Configuration files with many entries (`routes.php`, `config/app.ts`, `webpack.config.js`)
|