@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.
Files changed (362) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +153 -10
  3. package/docs/en/cli-reference.md +56 -1
  4. package/docs/en/i18n.md +18 -18
  5. package/docs/en/schemas/index.json +10 -0
  6. package/docs/en/schemas/parallel-assign.schema.json +9 -0
  7. package/docs/en/schemas/parallel-doctor.schema.json +36 -0
  8. package/docs/en/schemas/parallel-guard.schema.json +63 -0
  9. package/docs/en/schemas/parallel-merge.schema.json +84 -0
  10. package/docs/en/schemas/parallel-status.schema.json +91 -1
  11. package/docs/integrations/apps-publish-marketplace.md +94 -0
  12. package/docs/pt/README.md +9 -0
  13. package/docs/pt/agentes.md +324 -3
  14. package/docs/pt/clientes-ai.md +7 -3
  15. package/docs/pt/comandos-cli.md +160 -13
  16. package/docs/pt/compress-agents.md +304 -0
  17. package/docs/pt/design-docs-governance.md +59 -0
  18. package/docs/pt/feature-archive.md +191 -0
  19. package/docs/pt/genome-3.0-spec.md +115 -4
  20. package/docs/pt/genome-distribution.md +232 -0
  21. package/docs/pt/inicio-rapido.md +1 -0
  22. package/docs/pt/motor-hardening.md +492 -0
  23. package/docs/pt/runner-system.md +113 -0
  24. package/package.json +2 -1
  25. package/src/agent-manifests.js +66 -0
  26. package/src/agents.js +27 -7
  27. package/src/autonomy-policy.js +139 -0
  28. package/src/brain-query.js +161 -0
  29. package/src/cli.js +1377 -1099
  30. package/src/commands/agents.js +102 -7
  31. package/src/commands/artifact-validate.js +33 -4
  32. package/src/commands/auth.js +272 -0
  33. package/src/commands/brain-query.js +44 -0
  34. package/src/commands/briefing.js +344 -0
  35. package/src/commands/commit-prepare.js +547 -0
  36. package/src/commands/compress-agents.js +416 -0
  37. package/src/commands/context-health.js +4 -2
  38. package/src/commands/context-trim.js +17 -11
  39. package/src/commands/design-hybrid-options.js +3 -3
  40. package/src/commands/devlog-process.js +6 -4
  41. package/src/commands/dossier.js +423 -0
  42. package/src/commands/feature-archive.js +513 -0
  43. package/src/commands/feature-close.js +123 -18
  44. package/src/commands/gate-approve.js +198 -0
  45. package/src/commands/gate-check.js +24 -5
  46. package/src/commands/genome-doctor.js +166 -9
  47. package/src/commands/git-guard.js +170 -0
  48. package/src/commands/harness.js +121 -0
  49. package/src/commands/implementation-plan.js +47 -20
  50. package/src/commands/init.js +6 -2
  51. package/src/commands/install.js +6 -2
  52. package/src/commands/live.js +497 -56
  53. package/src/commands/locale-apply.js +9 -6
  54. package/src/commands/locale-diff.js +11 -112
  55. package/src/commands/mcp-doctor.js +2 -1
  56. package/src/commands/mcp-init.js +4 -10
  57. package/src/commands/memory.js +234 -0
  58. package/src/commands/parallel-assign.js +107 -27
  59. package/src/commands/parallel-doctor.js +416 -3
  60. package/src/commands/parallel-guard.js +241 -0
  61. package/src/commands/parallel-init.js +66 -4
  62. package/src/commands/parallel-merge.js +299 -0
  63. package/src/commands/parallel-status.js +147 -3
  64. package/src/commands/preflight.js +63 -4
  65. package/src/commands/qa-init.js +10 -5
  66. package/src/commands/revision.js +235 -0
  67. package/src/commands/scaffold-complete.js +188 -0
  68. package/src/commands/security-audit.js +275 -0
  69. package/src/commands/security-scan.js +376 -0
  70. package/src/commands/self-implement-loop.js +46 -2
  71. package/src/commands/setup-context.js +11 -10
  72. package/src/commands/squad-agent-create.js +51 -9
  73. package/src/commands/squad-investigate.js +53 -0
  74. package/src/commands/squad-plan.js +33 -1
  75. package/src/commands/squad-scaffold.js +4 -3
  76. package/src/commands/squad-score.js +71 -14
  77. package/src/commands/squad-status.js +22 -1
  78. package/src/commands/squad-validate.js +93 -2
  79. package/src/commands/store-genome.js +304 -0
  80. package/src/commands/store-skill.js +247 -0
  81. package/src/commands/store-squad.js +431 -0
  82. package/src/commands/store-system.js +392 -0
  83. package/src/commands/tool-capabilities.js +63 -0
  84. package/src/commands/update.js +3 -3
  85. package/src/commands/verify-gate.js +40 -0
  86. package/src/commands/workflow-execute.js +644 -155
  87. package/src/commands/workflow-harden.js +231 -0
  88. package/src/commands/workflow-heal.js +136 -0
  89. package/src/commands/workflow-next.js +460 -22
  90. package/src/commands/workflow-status.js +328 -138
  91. package/src/commands/workspace.js +144 -0
  92. package/src/constants.js +42 -75
  93. package/src/context-memory.js +133 -4
  94. package/src/context-writer.js +2 -1
  95. package/src/context.js +32 -2
  96. package/src/doctor.js +46 -6
  97. package/src/dossier/codemap-store.js +267 -0
  98. package/src/dossier/dossier-bootstrap.js +222 -0
  99. package/src/dossier/dossier-compact.js +159 -0
  100. package/src/dossier/lock.js +128 -0
  101. package/src/dossier/revision-store.js +313 -0
  102. package/src/dossier/schema.js +155 -0
  103. package/src/dossier/store.js +400 -0
  104. package/src/execution-gateway.js +3 -0
  105. package/src/friction-scanner.js +202 -0
  106. package/src/genome-schema.js +24 -1
  107. package/src/genomes.js +33 -0
  108. package/src/handoff-contract.js +363 -0
  109. package/src/handoff-validator.js +45 -0
  110. package/src/harness/circuit-breaker.js +135 -0
  111. package/src/i18n/messages/en.js +317 -22
  112. package/src/i18n/messages/es.js +259 -18
  113. package/src/i18n/messages/fr.js +260 -18
  114. package/src/i18n/messages/pt-BR.js +313 -22
  115. package/src/install-profile.js +0 -16
  116. package/src/installer.js +70 -6
  117. package/src/lib/git-commit-guard.js +691 -0
  118. package/src/lib/security/artifact-reader.js +167 -0
  119. package/src/lib/security/exit-codes.js +51 -0
  120. package/src/lib/security/findings-writer.js +176 -0
  121. package/src/lib/security/runtime-events.js +77 -0
  122. package/src/lib/security/secrets-regex.js +115 -0
  123. package/src/lib/store/security-scan.js +173 -0
  124. package/src/lib/terminal-checkbox.js +130 -0
  125. package/src/lib/tmux-launcher.js +163 -0
  126. package/src/lib/tool-capabilities.js +102 -0
  127. package/src/locales.js +12 -8
  128. package/src/parallel-workspace.js +756 -0
  129. package/src/parser.js +8 -1
  130. package/src/path-guard.js +47 -0
  131. package/src/preflight-engine.js +237 -26
  132. package/src/self-healing.js +142 -0
  133. package/src/session-handoff.js +111 -1
  134. package/src/squad/squad-scaffold.js +183 -19
  135. package/src/test-briefing.js +226 -0
  136. package/src/updater.js +1 -1
  137. package/src/utils.js +3 -0
  138. package/src/workflow-gates.js +185 -0
  139. package/template/.aioson/agents/analyst.md +76 -130
  140. package/template/.aioson/agents/architect.md +53 -86
  141. package/template/.aioson/agents/committer.md +161 -0
  142. package/template/.aioson/agents/cypher.md +252 -0
  143. package/template/.aioson/agents/dev.md +112 -628
  144. package/template/.aioson/agents/deyvin.md +33 -236
  145. package/template/.aioson/agents/discover.md +235 -0
  146. package/template/.aioson/agents/discovery-design-doc.md +17 -252
  147. package/template/.aioson/agents/genome.md +76 -26
  148. package/template/.aioson/agents/manifests/analyst.manifest.json +26 -0
  149. package/template/.aioson/agents/manifests/architect.manifest.json +23 -0
  150. package/template/.aioson/agents/manifests/committer.manifest.json +23 -0
  151. package/template/.aioson/agents/manifests/dev.manifest.json +37 -0
  152. package/template/.aioson/agents/manifests/orchestrator.manifest.json +30 -0
  153. package/template/.aioson/agents/manifests/pentester.manifest.json +39 -0
  154. package/template/.aioson/agents/manifests/pm.manifest.json +26 -0
  155. package/template/.aioson/agents/manifests/product.manifest.json +23 -0
  156. package/template/.aioson/agents/manifests/qa.manifest.json +25 -0
  157. package/template/.aioson/agents/manifests/setup.manifest.json +20 -0
  158. package/template/.aioson/agents/manifests/ux-ui.manifest.json +24 -0
  159. package/template/.aioson/agents/neo.md +5 -7
  160. package/template/.aioson/agents/orache.md +2 -6
  161. package/template/.aioson/agents/orchestrator.md +81 -182
  162. package/template/.aioson/agents/pentester.md +235 -0
  163. package/template/.aioson/agents/pm.md +40 -104
  164. package/template/.aioson/agents/product.md +99 -344
  165. package/template/.aioson/agents/profiler-enricher.md +57 -6
  166. package/template/.aioson/agents/profiler-forge.md +17 -7
  167. package/template/.aioson/agents/profiler-researcher.md +29 -6
  168. package/template/.aioson/agents/qa.md +168 -514
  169. package/template/.aioson/agents/setup.md +52 -278
  170. package/template/.aioson/agents/sheldon.md +122 -754
  171. package/template/.aioson/agents/site-forge.md +111 -1583
  172. package/template/.aioson/agents/squad.md +139 -2010
  173. package/template/.aioson/agents/tester.md +10 -0
  174. package/template/.aioson/agents/ux-ui.md +104 -812
  175. package/template/.aioson/agents/validator.md +69 -0
  176. package/template/.aioson/brains/scripts/query.js +5 -1
  177. package/template/.aioson/config/autonomy-protocol.json +43 -0
  178. package/template/.aioson/config.md +43 -15
  179. package/template/.aioson/constitution.md +36 -33
  180. package/template/.aioson/context/design-doc.md +136 -0
  181. package/template/.aioson/context/project-map.md +57 -0
  182. package/template/.aioson/design-docs/code-reuse.md +48 -0
  183. package/template/.aioson/design-docs/componentization.md +47 -0
  184. package/template/.aioson/design-docs/file-size.md +52 -0
  185. package/template/.aioson/design-docs/folder-structure.md +51 -0
  186. package/template/.aioson/design-docs/naming.md +54 -0
  187. package/template/.aioson/docs/LAYERS.md +12 -2
  188. package/template/.aioson/docs/dev/execution-discipline.md +106 -0
  189. package/template/.aioson/docs/dev/stack-conventions.md +83 -0
  190. package/template/.aioson/docs/deyvin/continuity-recovery.md +57 -0
  191. package/template/.aioson/docs/deyvin/debugging-escalation.md +30 -0
  192. package/template/.aioson/docs/deyvin/pair-execution.md +44 -0
  193. package/template/.aioson/docs/deyvin/runtime-handoffs.md +36 -0
  194. package/template/.aioson/docs/product/conversation-playbook.md +116 -0
  195. package/template/.aioson/docs/product/prd-contract.md +107 -0
  196. package/template/.aioson/docs/product/quality-lens.md +57 -0
  197. package/template/.aioson/docs/product/research-loop.md +65 -0
  198. package/template/.aioson/docs/sheldon/enrichment-paths.md +134 -0
  199. package/template/.aioson/docs/sheldon/quality-lens.md +57 -0
  200. package/template/.aioson/docs/sheldon/research-loop.md +56 -0
  201. package/template/.aioson/docs/sheldon/web-intelligence.md +75 -0
  202. package/template/.aioson/docs/site-forge-build.md +195 -0
  203. package/template/.aioson/docs/site-forge-extraction.md +135 -0
  204. package/template/.aioson/docs/site-forge-qa.md +155 -0
  205. package/template/.aioson/docs/site-forge-recon.md +434 -0
  206. package/template/.aioson/docs/site-forge-transform.md +249 -0
  207. package/template/.aioson/docs/squad/content-output.md +91 -0
  208. package/template/.aioson/docs/squad/creation-flow.md +135 -0
  209. package/template/.aioson/docs/squad/domain-classification.md +117 -0
  210. package/template/.aioson/docs/squad/genome-bindings.md +47 -0
  211. package/template/.aioson/docs/squad/package-contract.md +234 -0
  212. package/template/.aioson/docs/squad/quality-lens.md +56 -0
  213. package/template/.aioson/docs/squad/research-loop.md +59 -0
  214. package/template/.aioson/docs/squad/session-operations.md +117 -0
  215. package/template/.aioson/docs/squad/workflow-quality.md +165 -0
  216. package/template/.aioson/docs/ux-ui/accessibility-audit.md +55 -0
  217. package/template/.aioson/docs/ux-ui/audit-mode.md +86 -0
  218. package/template/.aioson/docs/ux-ui/component-map.md +35 -0
  219. package/template/.aioson/docs/ux-ui/design-execution.md +111 -0
  220. package/template/.aioson/docs/ux-ui/design-gate.md +27 -0
  221. package/template/.aioson/docs/ux-ui/research-mode.md +39 -0
  222. package/template/.aioson/docs/ux-ui/site-delivery.md +156 -0
  223. package/template/.aioson/docs/ux-ui/token-contract.md +57 -0
  224. package/template/.aioson/genomes/copywriting.meta.json +48 -0
  225. package/template/.aioson/git-guard.json +11 -0
  226. package/template/.aioson/mcp/servers.md +0 -1
  227. package/template/.aioson/rules/agent-language-policy.md +93 -0
  228. package/template/.aioson/rules/aioson-context-boundary.md +63 -0
  229. package/template/.aioson/rules/canonical-path-contract.md +47 -0
  230. package/template/.aioson/rules/data-format-convention.md +24 -86
  231. package/template/.aioson/rules/disk-first-artifacts.md +44 -0
  232. package/template/.aioson/rules/output-brevity.md +44 -0
  233. package/template/.aioson/rules/prd-section-ownership.md +49 -0
  234. package/template/.aioson/rules/security-baseline.md +139 -0
  235. package/template/.aioson/rules/spec-level-ownership.md +61 -0
  236. package/template/.aioson/rules/squad-driver-pattern.md +81 -0
  237. package/template/.aioson/schemas/squad-blueprint.schema.json +24 -0
  238. package/template/.aioson/schemas/squad-manifest.schema.json +44 -0
  239. package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +30 -0
  240. package/template/.aioson/skills/process/secure-tdd/SKILL.md +97 -0
  241. package/template/.aioson/skills/process/secure-tdd/references/nextjs.md +81 -0
  242. package/template/.aioson/skills/process/secure-tdd/references/node-express.md +91 -0
  243. package/template/.aioson/skills/process/secure-tdd/references/planned-stacks.md +33 -0
  244. package/template/.aioson/skills/static/harness-validate/SKILL.md +46 -0
  245. package/template/.aioson/skills/static/web-research-cache.md +3 -0
  246. package/template/.aioson/tasks/squad-create.md +35 -8
  247. package/template/.aioson/tasks/squad-design.md +50 -2
  248. package/template/.aioson/tasks/squad-investigate.md +14 -1
  249. package/template/.claude/commands/aioson/agent/committer.md +5 -0
  250. package/template/.claude/commands/aioson/agent/copywriter.md +5 -0
  251. package/template/.claude/commands/aioson/agent/cypher.md +5 -0
  252. package/template/.claude/commands/aioson/agent/pair.md +5 -0
  253. package/template/.claude/commands/aioson/agent/validator.md +5 -0
  254. package/template/.gemini/commands/aios-analyst.toml +6 -3
  255. package/template/.gemini/commands/aios-architect.toml +7 -6
  256. package/template/.gemini/commands/aios-committer.toml +7 -0
  257. package/template/.gemini/commands/aios-copywriter.toml +7 -0
  258. package/template/.gemini/commands/aios-cypher.toml +7 -0
  259. package/template/.gemini/commands/aios-dev.toml +8 -7
  260. package/template/.gemini/commands/aios-deyvin.toml +6 -5
  261. package/template/.gemini/commands/aios-discovery-design-doc.toml +6 -3
  262. package/template/.gemini/commands/aios-genome.toml +7 -0
  263. package/template/.gemini/commands/aios-neo.toml +5 -3
  264. package/template/.gemini/commands/aios-orache.toml +7 -0
  265. package/template/.gemini/commands/aios-orchestrator.toml +8 -7
  266. package/template/.gemini/commands/aios-pair.toml +6 -5
  267. package/template/.gemini/commands/aios-pm.toml +8 -7
  268. package/template/.gemini/commands/aios-product.toml +5 -3
  269. package/template/.gemini/commands/aios-qa.toml +6 -5
  270. package/template/.gemini/commands/aios-setup.toml +5 -2
  271. package/template/.gemini/commands/aios-sheldon.toml +7 -0
  272. package/template/.gemini/commands/aios-site-forge.toml +7 -0
  273. package/template/.gemini/commands/aios-squad.toml +7 -0
  274. package/template/.gemini/commands/aios-tester.toml +6 -5
  275. package/template/.gemini/commands/aios-ux-ui.toml +8 -7
  276. package/template/.gemini/commands/aios-validator.toml +7 -0
  277. package/template/AGENTS.md +12 -1
  278. package/template/CLAUDE.md +5 -1
  279. package/template/.aioson/locales/en/agents/analyst.md +0 -244
  280. package/template/.aioson/locales/en/agents/architect.md +0 -245
  281. package/template/.aioson/locales/en/agents/dev.md +0 -397
  282. package/template/.aioson/locales/en/agents/deyvin.md +0 -137
  283. package/template/.aioson/locales/en/agents/discovery-design-doc.md +0 -27
  284. package/template/.aioson/locales/en/agents/genome.md +0 -212
  285. package/template/.aioson/locales/en/agents/neo.md +0 -8
  286. package/template/.aioson/locales/en/agents/orache.md +0 -6
  287. package/template/.aioson/locales/en/agents/orchestrator.md +0 -189
  288. package/template/.aioson/locales/en/agents/pair.md +0 -5
  289. package/template/.aioson/locales/en/agents/pm.md +0 -84
  290. package/template/.aioson/locales/en/agents/product.md +0 -378
  291. package/template/.aioson/locales/en/agents/profiler-enricher.md +0 -5
  292. package/template/.aioson/locales/en/agents/profiler-forge.md +0 -5
  293. package/template/.aioson/locales/en/agents/profiler-researcher.md +0 -5
  294. package/template/.aioson/locales/en/agents/qa.md +0 -270
  295. package/template/.aioson/locales/en/agents/setup.md +0 -421
  296. package/template/.aioson/locales/en/agents/sheldon.md +0 -455
  297. package/template/.aioson/locales/en/agents/squad.md +0 -449
  298. package/template/.aioson/locales/en/agents/tester.md +0 -6
  299. package/template/.aioson/locales/en/agents/ux-ui.md +0 -668
  300. package/template/.aioson/locales/es/agents/analyst.md +0 -225
  301. package/template/.aioson/locales/es/agents/architect.md +0 -245
  302. package/template/.aioson/locales/es/agents/dev.md +0 -370
  303. package/template/.aioson/locales/es/agents/deyvin.md +0 -99
  304. package/template/.aioson/locales/es/agents/discovery-design-doc.md +0 -21
  305. package/template/.aioson/locales/es/agents/genome.md +0 -104
  306. package/template/.aioson/locales/es/agents/neo.md +0 -50
  307. package/template/.aioson/locales/es/agents/orache.md +0 -105
  308. package/template/.aioson/locales/es/agents/orchestrator.md +0 -194
  309. package/template/.aioson/locales/es/agents/pair.md +0 -7
  310. package/template/.aioson/locales/es/agents/pm.md +0 -90
  311. package/template/.aioson/locales/es/agents/product.md +0 -372
  312. package/template/.aioson/locales/es/agents/profiler-enricher.md +0 -7
  313. package/template/.aioson/locales/es/agents/profiler-forge.md +0 -7
  314. package/template/.aioson/locales/es/agents/profiler-researcher.md +0 -7
  315. package/template/.aioson/locales/es/agents/qa.md +0 -198
  316. package/template/.aioson/locales/es/agents/setup.md +0 -405
  317. package/template/.aioson/locales/es/agents/sheldon.md +0 -309
  318. package/template/.aioson/locales/es/agents/squad.md +0 -532
  319. package/template/.aioson/locales/es/agents/tester.md +0 -9
  320. package/template/.aioson/locales/es/agents/ux-ui.md +0 -212
  321. package/template/.aioson/locales/fr/agents/analyst.md +0 -225
  322. package/template/.aioson/locales/fr/agents/architect.md +0 -245
  323. package/template/.aioson/locales/fr/agents/dev.md +0 -370
  324. package/template/.aioson/locales/fr/agents/deyvin.md +0 -99
  325. package/template/.aioson/locales/fr/agents/discovery-design-doc.md +0 -21
  326. package/template/.aioson/locales/fr/agents/genome.md +0 -104
  327. package/template/.aioson/locales/fr/agents/neo.md +0 -50
  328. package/template/.aioson/locales/fr/agents/orache.md +0 -106
  329. package/template/.aioson/locales/fr/agents/orchestrator.md +0 -194
  330. package/template/.aioson/locales/fr/agents/pair.md +0 -7
  331. package/template/.aioson/locales/fr/agents/pm.md +0 -90
  332. package/template/.aioson/locales/fr/agents/product.md +0 -372
  333. package/template/.aioson/locales/fr/agents/profiler-enricher.md +0 -7
  334. package/template/.aioson/locales/fr/agents/profiler-forge.md +0 -7
  335. package/template/.aioson/locales/fr/agents/profiler-researcher.md +0 -7
  336. package/template/.aioson/locales/fr/agents/qa.md +0 -198
  337. package/template/.aioson/locales/fr/agents/setup.md +0 -405
  338. package/template/.aioson/locales/fr/agents/sheldon.md +0 -309
  339. package/template/.aioson/locales/fr/agents/squad.md +0 -532
  340. package/template/.aioson/locales/fr/agents/tester.md +0 -9
  341. package/template/.aioson/locales/fr/agents/ux-ui.md +0 -212
  342. package/template/.aioson/locales/pt-BR/agents/analyst.md +0 -319
  343. package/template/.aioson/locales/pt-BR/agents/architect.md +0 -284
  344. package/template/.aioson/locales/pt-BR/agents/dev.md +0 -483
  345. package/template/.aioson/locales/pt-BR/agents/deyvin.md +0 -184
  346. package/template/.aioson/locales/pt-BR/agents/discovery-design-doc.md +0 -198
  347. package/template/.aioson/locales/pt-BR/agents/genome.md +0 -297
  348. package/template/.aioson/locales/pt-BR/agents/neo.md +0 -208
  349. package/template/.aioson/locales/pt-BR/agents/orache.md +0 -137
  350. package/template/.aioson/locales/pt-BR/agents/orchestrator.md +0 -324
  351. package/template/.aioson/locales/pt-BR/agents/pair.md +0 -5
  352. package/template/.aioson/locales/pt-BR/agents/pm.md +0 -182
  353. package/template/.aioson/locales/pt-BR/agents/product.md +0 -466
  354. package/template/.aioson/locales/pt-BR/agents/profiler-enricher.md +0 -5
  355. package/template/.aioson/locales/pt-BR/agents/profiler-forge.md +0 -5
  356. package/template/.aioson/locales/pt-BR/agents/profiler-researcher.md +0 -5
  357. package/template/.aioson/locales/pt-BR/agents/qa.md +0 -300
  358. package/template/.aioson/locales/pt-BR/agents/setup.md +0 -533
  359. package/template/.aioson/locales/pt-BR/agents/sheldon.md +0 -323
  360. package/template/.aioson/locales/pt-BR/agents/squad.md +0 -1330
  361. package/template/.aioson/locales/pt-BR/agents/tester.md +0 -449
  362. package/template/.aioson/locales/pt-BR/agents/ux-ui.md +0 -669
@@ -1,6 +1,7 @@
1
- name = "aios-qa"
2
1
  description = "Quality review"
3
- instruction_file = ".aioson/agents/qa.md"
4
- requires_context = [
5
- ".aioson/context/discovery.md"
6
- ]
2
+ prompt = """
3
+ @{ .aioson/context/discovery.md }
4
+ @{ .aioson/agents/qa.md }
5
+
6
+ {{args}}
7
+ """
@@ -1,3 +1,6 @@
1
- name = "aios-setup"
2
1
  description = "Project onboarding"
3
- instruction_file = ".aioson/agents/setup.md"
2
+ prompt = """
3
+ @{ .aioson/agents/setup.md }
4
+
5
+ {{args}}
6
+ """
@@ -0,0 +1,7 @@
1
+ description = "Deep technical analysis and architecture review"
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/agents/sheldon.md }
5
+
6
+ {{args}}
7
+ """
@@ -0,0 +1,7 @@
1
+ description = "Clone, extract, and forge sites and design skills"
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/agents/site-forge.md }
5
+
6
+ {{args}}
7
+ """
@@ -0,0 +1,7 @@
1
+ description = "Squad assembly and management"
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/agents/squad.md }
5
+
6
+ {{args}}
7
+ """
@@ -1,6 +1,7 @@
1
- name = "aios-tester"
2
1
  description = "Systematic test engineering for implemented apps"
3
- instruction_file = ".aioson/agents/tester.md"
4
- requires_context = [
5
- ".aioson/context/project.context.md"
6
- ]
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/agents/tester.md }
5
+
6
+ {{args}}
7
+ """
@@ -1,8 +1,9 @@
1
- name = "aios-ux-ui"
2
1
  description = "Frontend design and UX specification"
3
- instruction_file = ".aioson/agents/ux-ui.md"
4
- requires_context = [
5
- ".aioson/context/project.context.md",
6
- ".aioson/context/discovery.md",
7
- ".aioson/context/architecture.md"
8
- ]
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/context/discovery.md }
5
+ @{ .aioson/context/architecture.md }
6
+ @{ .aioson/agents/ux-ui.md }
7
+
8
+ {{args}}
9
+ """
@@ -0,0 +1,7 @@
1
+ description = "Technical validation against success contract"
2
+ prompt = """
3
+ @{ .aioson/context/project.context.md }
4
+ @{ .aioson/agents/validator.md }
5
+
6
+ {{args}}
7
+ """
@@ -37,6 +37,9 @@ Describe your intent. The agent system will match and execute.
37
37
  | @neo | "where do I start?", "what should I do next?", "show project status", "guide me", "use the neo agent" |
38
38
  | @orchestrator | "coordinate this session", "use the orchestrator agent" |
39
39
  | @squad | "assemble a squad", "use the squad agent", "montar squad" |
40
+ | @committer | "commit my changes", "generate commit message", "use the committer agent" |
41
+ | @copywriter | "write copy for this page", "conversion strategy", "use the copywriter agent" |
42
+ | @cypher | "create a briefing from plans", "pre-production planning", "use the cypher agent" |
40
43
  | @genome | "generate a genome", "use the genome agent", "gerar genome" |
41
44
  | @profiler-researcher | "start the profiler research", "profile this person", "pesquisar DNA mental" |
42
45
  | @profiler-enricher | "enrich this profile", "analyze this person's cognition", "consolidar perfil cognitivo" |
@@ -44,6 +47,7 @@ Describe your intent. The agent system will match and execute.
44
47
  | @orache | "investigate this domain", "research market and competitors", "use the orache agent" |
45
48
  | @design-hybrid-forge | "create hybrid design skill", "combine two design skills", "use the design-hybrid-forge agent" |
46
49
  | @site-forge | "clone this site with [skill]", "rebuild [url] using [skill]", "[url] in the style of [skill]", "extract the design from [url] as a skill", "use the site-forge agent" |
50
+ | @discover | "discover the system", "scan and understand the project", "build semantic knowledge cache", "refresh bootstrap", "use the discover agent" |
47
51
 
48
52
  When an agent file is included via @ or described via natural language, read the corresponding file and execute its instructions immediately from the first step.
49
53
  Do not answer with "I will open/read/show the file" unless the user explicitly asked to inspect that file.
@@ -87,10 +91,14 @@ When running Codex directly (without `aioson workflow:next`), these rules apply:
87
91
  - @pm → `.aioson/agents/pm.md`
88
92
  - @dev → `.aioson/agents/dev.md`
89
93
  - @qa → `.aioson/agents/qa.md`
94
+ - @validator → `.aioson/agents/validator.md`
90
95
  - @tester → `.aioson/agents/tester.md`
91
96
  - @neo → `.aioson/agents/neo.md`
92
97
  - @orchestrator → `.aioson/agents/orchestrator.md`
93
98
  - @squad → `.aioson/agents/squad.md`
99
+ - @committer → `.aioson/agents/committer.md`
100
+ - @copywriter → `.aioson/agents/copywriter.md`
101
+ - @cypher → `.aioson/agents/cypher.md`
94
102
  - @genome → `.aioson/agents/genome.md`
95
103
  - @profiler-researcher → `.aioson/agents/profiler-researcher.md`
96
104
  - @profiler-enricher → `.aioson/agents/profiler-enricher.md`
@@ -161,8 +169,9 @@ researchs/
161
169
  - After running a web search, save the result to `researchs/{slug}/summary.md` so other agents can reuse it
162
170
  - `summary.md` frontmatter must include: `searched_at` (ISO-date), `agent` (who ran it), `query`, `verdict` (`confirmed` | `has-alternatives` | `outdated` | `deprecated`)
163
171
  - This folder is at the project root (alongside `plans/`, `prds/`), not inside `.aioson/`
172
+ - `@product`, `@sheldon`, and `@squad` should extract short keyword phrases from the active task, scout `researchs/`, and save fresh findings whenever external context could materially improve the output
164
173
 
165
- Primary agent that writes here: @sheldon (RF-WEB step)
174
+ Primary recurring writers here: @product, @sheldon, and @squad
166
175
  All agents may read from here to avoid redundant searches.
167
176
 
168
177
  ## Session protocol
@@ -170,3 +179,5 @@ If `.aioson/context/spec.md` exists, read it at session start and update it at s
170
179
 
171
180
  ## Golden rule
172
181
  Small project, small solution.
182
+ Golden rule
183
+ Small project, small solution.
@@ -22,11 +22,14 @@ You operate as AIOSON.
22
22
  - /pm -> `.aioson/agents/pm.md`
23
23
  - /dev -> `.aioson/agents/dev.md`
24
24
  - /qa -> `.aioson/agents/qa.md`
25
+ - /validator -> `.aioson/agents/validator.md`
25
26
  - /tester -> `.aioson/agents/tester.md`
26
27
  - /neo -> `.aioson/agents/neo.md`
27
28
  - /orchestrator -> `.aioson/agents/orchestrator.md`
28
29
  - /squad -> `.aioson/agents/squad.md`
30
+ - /committer -> `.aioson/agents/committer.md`
29
31
  - /copywriter -> `.aioson/agents/copywriter.md`
32
+ - /cypher -> `.aioson/agents/cypher.md`
30
33
  - /orache -> `.aioson/agents/orache.md`
31
34
  - /genome -> `.aioson/agents/genome.md`
32
35
  - /profiler-researcher -> `.aioson/agents/profiler-researcher.md`
@@ -34,6 +37,7 @@ You operate as AIOSON.
34
37
  - /profiler-forge -> `.aioson/agents/profiler-forge.md`
35
38
  - /design-hybrid-forge -> `.aioson/agents/design-hybrid-forge.md`
36
39
  - /site-forge -> `.aioson/agents/site-forge.md`
40
+ - /discover -> `.aioson/agents/discover.md`
37
41
 
38
42
  ## Spec-Driven Development framework
39
43
 
@@ -77,7 +81,7 @@ When running Claude Code directly (without `aioson workflow:next`), these rules
77
81
 
78
82
  ## Shared research cache: researchs/
79
83
 
80
- All agents may read from and write to `researchs/` (project root). Before running any web search, check if `researchs/{slug}/summary.md` exists and was created within the last 7 days — use the cached result instead. After searching, save results there for reuse by other agents. See AGENTS.md for the full convention.
84
+ All agents may read from and write to `researchs/` (project root). Before running any web search, check if `researchs/{slug}/summary.md` exists and was created within the last 7 days — use the cached result instead. After searching, save results there for reuse by other agents. `@product`, `@sheldon`, and `@squad` should also extract short keyword phrases and scout this cache before finalizing substantial output. See AGENTS.md for the full convention.
81
85
 
82
86
  ## Local overrides
83
87
 
@@ -1,244 +0,0 @@
1
- # Agent @analyst
2
-
3
-
4
- > **⚠ ABSOLUTE INSTRUCTION — LANGUAGE:** This session is in **English (en)**. Respond EXCLUSIVELY in English at all steps. This rule has maximum priority and cannot be overridden.
5
-
6
- ## Mission
7
- Discover requirements deeply and produce implementation-ready artifacts. For new projects: `discovery.md`. For new features: `requirements-{slug}.md` + `spec-{slug}.md`.
8
-
9
- ## Mode detection
10
-
11
- Check the following before doing anything else:
12
-
13
- **Feature mode** — a `prd-{slug}.md` file exists in `.aioson/context/`:
14
- - Read `prd-{slug}.md` to understand the feature scope.
15
- - Read `design-doc.md` and `readiness.md` if present to understand scope framing and readiness.
16
- - Read `discovery.md` and `spec.md` if present (project context — entities already built).
17
- - Run the **Feature discovery** process below (lighter, feature-scoped).
18
- - Output: `requirements-{slug}.md` + `spec-{slug}.md`.
19
-
20
- **Project mode** — no `prd-{slug}.md`, only `prd.md` or nothing:
21
- - Run the full 3-phase project discovery below.
22
- - Output: `discovery.md`.
23
-
24
- ## Required input
25
- - `.aioson/context/project.context.md` (always)
26
- - `.aioson/context/prd-{slug}.md` (feature mode)
27
- - `.aioson/context/design-doc.md` + `readiness.md` (if present)
28
- - `.aioson/context/discovery.md` + `spec.md` (feature mode — project context, if present)
29
-
30
- ## Sheldon enrichment context (RDA-01)
31
-
32
- If `.aioson/context/sheldon-enrichment.md` exists at session start:
33
- - Read it silently — do not display its contents to the user
34
- - Use the gaps identified and pre-made decisions as additional context for discovery
35
- - Do not re-ask questions that are already documented in the enrichment log
36
- - If `plan_path` is set in the frontmatter: read the manifest at that path and scope discovery to Phase 1 first
37
-
38
- ## Context integrity
39
-
40
- Read `project.context.md` before starting discovery.
41
-
42
- Rules:
43
- - If the file is inconsistent with the scope artifacts already present (`prd.md`, `prd-{slug}.md`, `discovery.md`, `spec.md`, `features.md`), fix the objectively inferable metadata inside the workflow before proceeding.
44
- - Only repair fields you can defend from current evidence. Do not guess missing domain rules just to make the file look complete.
45
- - If the missing or invalid field blocks discovery and is not inferable, ask the minimum clarification or send the workflow back to `@setup` inside the workflow.
46
- - Never treat context repair as a reason to recommend execution outside the workflow.
47
-
48
- ## Brownfield pre-flight
49
-
50
- Check `framework_installed` in `project.context.md` before starting any phase.
51
-
52
- **If `framework_installed=true` AND `.aioson/context/discovery.md` exists:**
53
- - Skip Phases 1–3 below.
54
- - Read `skeleton-system.md` first if present — it is the lightweight index of the current structure.
55
- - Read `discovery.md` AND `spec.md` (if present) together — they are two halves of project memory: discovery.md = structure, spec.md = development decisions.
56
- - Proceed to enhance or update discovery.md based on the user's request.
57
-
58
- **If `framework_installed=true` AND no `discovery.md` exists AND local scan artifacts already exist** (`scan-index.md`, `scan-folders.md`, at least one `scan-<folder>.md`, or `scan-aioson.md`):
59
- - Read `scan-index.md` first.
60
- - Read `scan-folders.md` and `scan-aioson.md` if present.
61
- - Read every relevant `scan-<folder>.md` that maps the requested brownfield scope.
62
- - Use those scan artifacts as compressed brownfield memory and generate `.aioson/context/discovery.md` yourself.
63
- - This path is valid for Codex, Claude Code, Gemini CLI, and similar AI clients even when the user does not use API keys inside `aioson`.
64
- - If the user wants to save tokens and their client allows model choice, they may pick a smaller/faster model for this discovery step.
65
-
66
- **If `framework_installed=true` AND no `discovery.md` exists AND no local scan artifacts exist:**
67
- > ⚠ Existing project detected but no discovery.md found. Run the local scanner first:
68
- > ```
69
- > aioson scan:project . --folder=src
70
- > ```
71
- > Optional API path:
72
- > ```
73
- > aioson scan:project . --folder=src --with-llm --provider=<provider>
74
- > ```
75
- > Then start a new session and run @analyst again.
76
-
77
- Stop here only when neither `discovery.md` nor local scan artifacts exist. Do not run Phases 1–3 on a large existing codebase without one of those two memory sources.
78
-
79
- > **Rule:** whenever `discovery.md` is present, always read `spec.md` alongside it — never one without the other.
80
-
81
- ## Skills and docs on demand
82
-
83
- Before deepening discovery:
84
-
85
- - check whether `design-doc.md` already answers part of the problem
86
- - use `readiness.md` to avoid unnecessary rediscovery
87
- - load only the docs that actually matter for this batch
88
- - consult local skills only when they improve domain mapping or flow clarity
89
-
90
- Do not inflate context without need.
91
-
92
- ## Process
93
-
94
- ### Phase 1 — Business discovery
95
- Ask the following questions before any technical work:
96
- 1. What does the system need to do? (describe freely, no rush)
97
- 2. Who will use it? What types of users exist?
98
- 3. What are the 3 most important features for the MVP?
99
- 4. Is there a deadline or defined MVP version?
100
- 5. Do you have a visual reference you admire? (links or descriptions)
101
- 6. Is there a similar system on the market?
102
-
103
- Wait for answers before proceeding. Do not make assumptions.
104
-
105
- ### Phase 2 — Entity deep dive
106
- After the free description, identify mentioned entities and ask specific questions for each one. Do not use generic questions — adapt to the actual entities described.
107
-
108
- Example (user described a scheduling system):
109
- - Can a client have multiple appointments?
110
- - Does the appointment have start and end time, or just start with fixed duration?
111
- - Is cancellation possible? With refund? With minimum notice?
112
- - Does the provider have unavailability windows?
113
- - Are notifications required (email/SMS) on booking?
114
- - Is there a daily limit of appointments per provider?
115
-
116
- Apply the same depth to every entity in the project: ask about lifecycle states, who can change them, cascade effects, and audit requirements.
117
-
118
- ### Phase 3 — Data design
119
- For each entity, produce field-level detail (do not stop at high-level):
120
-
121
- | Field | Type | Nullable | Constraints |
122
- |-------|------|----------|-------------|
123
- | id | bigint PK | no | auto-increment |
124
- | name | string | no | max 255 |
125
- | email | string | no | unique |
126
- | status | enum | no | pending, active, cancelled |
127
- | notes | text | yes | |
128
- | cancelled_at | timestamp | yes | |
129
-
130
- Define:
131
- - Complete field list with types and nullability
132
- - Enum values for every status field
133
- - Foreign key relationships and cascade behavior
134
- - Indexes that will matter in production queries
135
-
136
- ## Classification scoring
137
- Calculate official score (0–6):
138
- - User types: `1=0`, `2=1`, `3+=2`
139
- - External integrations: `0=0`, `1-2=1`, `3+=2`
140
- - Business rule complexity: `none=0`, `some=1`, `complex=2`
141
-
142
- Result:
143
- - 0–1 = MICRO
144
- - 2–3 = SMALL
145
- - 4–6 = MEDIUM
146
-
147
- ## Feature discovery (feature mode only)
148
-
149
- When invoked in feature mode, skip Phases 1–3 and run this focused 2-phase process instead.
150
-
151
- ### Phase A — Understand the feature
152
- Read `prd-{slug}.md` fully. Then ask only what is needed to map entities and rules — do not re-ask what prd-{slug}.md already answers.
153
-
154
- Focus questions on:
155
- - New entities introduced by this feature (fields, types, nullability, enums)
156
- - Changes to existing entities (new fields, state changes, new relationships)
157
- - Who can trigger which actions and under what conditions
158
- - Error states and edge cases not covered in the PRD
159
- - Data that must be migrated or seeded
160
-
161
- ### Phase B — Feature entity design
162
- For each new or modified entity, produce field-level detail (same format as Phase 3). Map relationships to existing entities from `discovery.md`. Define migration order for new tables only.
163
-
164
- ### Output contract — feature mode
165
-
166
- **`requirements-{slug}.md`** — implementation spec for the feature:
167
- 1. Feature summary (1–2 lines from prd-{slug}.md)
168
- 2. New entities and fields (full table format)
169
- 3. Changes to existing entities
170
- 4. Relationships (with existing entities from discovery.md)
171
- 5. Migration additions (ordered)
172
- 6. Business rules
173
- 7. Edge cases
174
- 8. Out of scope for this feature
175
-
176
- **`spec-{slug}.md`** — feature memory skeleton (will be enriched by @dev):
177
-
178
- ```markdown
179
- ---
180
- feature: {slug}
181
- status: in_progress
182
- started: {ISO-date}
183
- ---
184
-
185
- # Spec — {Feature Name}
186
-
187
- ## What was built
188
- [To be filled by @dev during implementation]
189
-
190
- ## Entities added
191
- [Paste entity list from requirements-{slug}.md]
192
-
193
- ## Key decisions
194
- - [Date] [Decision] — [Reason]
195
-
196
- ## Edge cases handled
197
- [From requirements-{slug}.md § Edge cases]
198
-
199
- ## Dependencies
200
- - Reads: [existing entities this feature queries]
201
- - Writes: [tables this feature modifies or creates]
202
-
203
- ## Notes
204
- [Anything @dev or @qa should know before touching this feature]
205
- ```
206
-
207
- After producing both files, tell the user: "Feature spec ready. Activate **@dev** to implement — it will read `prd-{slug}.md`, `requirements-{slug}.md`, and `spec-{slug}.md`."
208
-
209
- ## MICRO shortcut
210
- If classification is MICRO (score 0–1) or the user describes a clearly single-entity project with no integrations, adapt the process:
211
- - Phase 1: ask only questions 1–3 (what, who, MVP features). Skip 4–6.
212
- - Skip Phase 2 entity deep-dive.
213
- - Skip Phase 3 field-level schema.
214
- - Deliver a short discovery.md: 2-line summary + entity list (no table) + critical rules only.
215
-
216
- Full 3-phase discovery on a MICRO project costs more tokens than the implementation itself.
217
-
218
- ## Responsibility boundary
219
- The `@analyst` owns all technical and structural content: requirements, entities, tables, relationships, business rules, and migration order. This never depends on external content tools.
220
-
221
- Copy, interface text, onboarding messages, and marketing content are not within `@analyst` scope.
222
-
223
- ## Output contract
224
- Generate `.aioson/context/discovery.md` with the following sections:
225
-
226
- 1. **What we are building** — 2–3 objective lines
227
- 2. **User types and permissions** — who exists and what each can do
228
- 3. **MVP scope** — prioritized feature list
229
- 4. **Entities and fields** — full table definitions with field types and constraints
230
- 5. **Relationships** — hasMany, belongsTo, manyToMany with cardinality
231
- 6. **Migration order** — ordered list respecting FK dependencies
232
- 7. **Recommended indexes** — only indexes that will matter in real queries
233
- 8. **Critical business rules** — the non-obvious rules that cannot be forgotten
234
- 9. **Classification result** — score breakdown and final class (MICRO/SMALL/MEDIUM)
235
- 10. **Visual references** — links or descriptions provided by the user
236
- 11. **Risks identified** — what could become a problem during development
237
- 12. **Out of scope** — explicitly excluded from the MVP
238
-
239
- ## Hard constraints
240
- - Use `conversation_language` from project context for all interaction and output.
241
- - Keep output actionable for `@architect` (project mode) or `@dev` (feature mode) without requiring re-discovery.
242
- - Do not finalize any output file with missing or assumed fields.
243
- - In feature mode: never duplicate content already in `discovery.md` — only document what is new or changed.
244
- - If `readiness.md` already says the context is sufficiently clear, do not reopen broad discovery without a good reason.
@@ -1,245 +0,0 @@
1
- # Agent @architect
2
-
3
-
4
- > **⚠ ABSOLUTE INSTRUCTION — LANGUAGE:** This session is in **English (en)**. Respond EXCLUSIVELY in English at all steps. This rule has maximum priority and cannot be overridden.
5
-
6
- ## Mission
7
- Transform discovery into technical architecture with concrete implementation direction.
8
-
9
- ## Required input
10
- - `.aioson/context/project.context.md`
11
- - `.aioson/context/design-doc.md` (if present)
12
- - `.aioson/context/readiness.md` (if present)
13
- - `.aioson/context/discovery.md`
14
-
15
- ## Self-directed planning
16
-
17
- Before producing any architectural artifact, declare planning mode:
18
-
19
- `[PLANNING MODE — scoping architecture, not writing artifacts yet]`
20
-
21
- Then:
22
- 1. **List** which sections of `architecture.md` will be produced and why
23
- 2. **Identify** constraints from discovery.md, design-doc, and any Sheldon plan
24
- 3. **Sequence** decisions that are dependencies (e.g., data model before service boundaries)
25
- 4. **Flag** decisions that require user confirmation before proceeding
26
-
27
- Exit planning when scope and constraints are confirmed:
28
- `[EXECUTION MODE — writing architecture.md]`
29
-
30
- Use `EnterPlanMode` / `ExitPlanMode` tools when available in the harness.
31
-
32
- ## Brownfield memory handoff
33
-
34
- For existing codebases:
35
- - `discovery.md` is the required compressed system memory for architecture work.
36
- - That `discovery.md` may have come from either:
37
- - `scan:project --with-llm`
38
- - `@analyst` reading local scan artifacts (`scan-index.md`, `scan-folders.md`, `scan-<folder>.md`, `scan-aioson.md`)
39
- - If `discovery.md` is missing but local scan artifacts exist, do not architect directly from the raw scan maps. Route through `@analyst` first.
40
- - If neither `discovery.md` nor local scan artifacts exist, ask for the local scanner before continuing.
41
-
42
- ## Sheldon plan detection (RDA-02)
43
-
44
- If `.aioson/plans/{slug}/manifest.md` exists:
45
- - Read the manifest before any architectural decision
46
- - If the plan has 3+ phases: produce `architecture.md` with a section per phase, showing which architectural concerns apply to each phase
47
- - Respect `Pre-made decisions` in the manifest as non-negotiable constraints — do not propose alternatives
48
- - Use `Deferred decisions` as inputs for your architectural recommendations
49
-
50
- ## Rules
51
- - Do not redesign entities produced by `@analyst`. Consume the data design as-is.
52
- - Keep architecture proportional to classification. Never apply MEDIUM patterns to a MICRO project.
53
- - Prefer simple, maintainable decisions over speculative complexity.
54
- - If a decision is deferred, document why.
55
- - If `readiness.md` points to low readiness, return architecture blockers instead of pretending certainty.
56
- - Load architecture docs and skills on demand, not as a giant context bundle.
57
-
58
- ## Responsibilities
59
- - Define folder/module structure by stack and classification size.
60
- - Provide migration execution order (from discovery, do not redesign).
61
- - Define model relationships from discovery.
62
- - Define service boundaries and integration points.
63
- - Define baseline security and observability concerns.
64
- - Use `design-doc.md` as the current scope decision document when it exists.
65
-
66
- ## Folder structure by stack and size
67
-
68
- ### Laravel — TALL Stack
69
-
70
- **MICRO** (simple CRUD, no complex rules):
71
- ```
72
- app/
73
- ├── Http/Controllers/
74
- ├── Models/
75
- └── Livewire/
76
- ```
77
-
78
- **SMALL** (auth, modules, simple panel):
79
- ```
80
- app/
81
- ├── Actions/ ← business logic isolated here
82
- ├── Http/
83
- │ ├── Controllers/ ← orchestration only
84
- │ └── Requests/ ← all validation here
85
- ├── Livewire/
86
- │ ├── Pages/ ← page-level components
87
- │ └── Components/ ← reusable components
88
- ├── Models/ ← scopes and relationships only
89
- ├── Services/ ← external integrations
90
- └── Traits/ ← reusable behaviors
91
- ```
92
-
93
- **MEDIUM** (SaaS, multi-tenant, complex integrations):
94
- ```
95
- app/
96
- ├── Actions/
97
- ├── Http/
98
- │ ├── Controllers/
99
- │ ├── Requests/
100
- │ └── Resources/ ← API Resources for JSON responses
101
- ├── Livewire/
102
- │ ├── Pages/
103
- │ └── Components/
104
- ├── Models/
105
- ├── Services/
106
- ├── Repositories/ ← only justified at this size
107
- ├── Traits/
108
- ├── Events/
109
- ├── Listeners/
110
- ├── Jobs/
111
- └── Policies/
112
- ```
113
-
114
- ### Node / Express
115
-
116
- **MICRO**:
117
- ```
118
- src/
119
- ├── routes/
120
- ├── controllers/
121
- └── models/
122
- ```
123
-
124
- **SMALL**:
125
- ```
126
- src/
127
- ├── routes/
128
- ├── controllers/
129
- ├── services/
130
- ├── models/
131
- ├── middleware/
132
- └── validators/
133
- ```
134
-
135
- **MEDIUM**:
136
- ```
137
- src/
138
- ├── routes/
139
- ├── controllers/
140
- ├── services/
141
- ├── repositories/
142
- ├── models/
143
- ├── middleware/
144
- ├── validators/
145
- ├── events/
146
- └── jobs/
147
- ```
148
-
149
- ### Next.js (App Router)
150
-
151
- **MICRO**:
152
- ```
153
- app/
154
- ├── (routes)/
155
- └── components/
156
- lib/
157
- ```
158
-
159
- **SMALL**:
160
- ```
161
- app/
162
- ├── (public)/
163
- ├── (auth)/
164
- │ └── dashboard/
165
- └── api/
166
- components/
167
- ├── ui/ ← primitives from library
168
- └── features/ ← domain-specific
169
- lib/
170
- └── actions/ ← server actions
171
- ```
172
-
173
- **MEDIUM**:
174
- ```
175
- app/
176
- ├── (public)/
177
- ├── (auth)/
178
- │ ├── dashboard/
179
- │ └── settings/
180
- └── api/
181
- components/
182
- ├── ui/
183
- └── features/
184
- lib/
185
- ├── actions/
186
- ├── services/
187
- └── repositories/
188
- ```
189
-
190
- ### dApp (Hardhat / Foundry / Anchor)
191
-
192
- **MICRO / SMALL**:
193
- ```
194
- contracts/ ← smart contracts
195
- scripts/ ← deploy and interaction scripts
196
- test/ ← contract tests
197
- frontend/
198
- ├── src/
199
- │ ├── components/
200
- │ ├── hooks/ ← wagmi/web3 hooks
201
- │ └── lib/ ← contract ABIs and config
202
- ```
203
-
204
- **MEDIUM**:
205
- ```
206
- contracts/
207
- scripts/
208
- test/
209
- frontend/
210
- ├── src/
211
- │ ├── components/
212
- │ ├── hooks/
213
- │ ├── lib/
214
- │ └── services/ ← indexer and off-chain integration
215
- indexer/ ← subgraph or equivalent
216
- ```
217
-
218
- ## Output contract
219
- Generate `.aioson/context/architecture.md` with:
220
-
221
- 1. **Architecture overview** — 2–3 lines on the approach
222
- 2. **Folder/module structure** — concrete tree for this project's stack and size
223
- 3. **Migration order** — ordered from discovery (do not redesign)
224
- 4. **Models and relationships** — concrete mapping from discovery entities
225
- 5. **Integration architecture** — external services and how they connect
226
- 6. **Cross-cutting concerns** — auth, validation, logging, error handling decisions
227
- 7. **Implementation sequence for `@dev`** — order in which modules should be built
228
- 8. **Explicit non-goals/deferred items** — what was deliberately excluded and why
229
-
230
- When frontend quality is important, add a handoff section for `@ux-ui` covering:
231
- - Key screens
232
- - Component library constraints
233
- - UX risks to mitigate
234
-
235
- ## Output targets by classification
236
- Keep architecture.md proportional — verbose output costs tokens without adding value:
237
- - **MICRO**: ≤ 40 lines. Folder structure + implementation sequence only. Omit integration architecture and cross-cutting concerns unless auth is explicitly required.
238
- - **SMALL**: ≤ 80 lines. Full structure + key decisions. Keep each section to 2–4 lines.
239
- - **MEDIUM**: no line limit. Complexity justifies detail.
240
-
241
- ## Hard constraints
242
- - Use `conversation_language` from project context for all interaction and output.
243
- - Ensure output can be executed directly by `@dev` without ambiguity.
244
- - Do not introduce patterns that do not exist in the chosen stack's conventions.
245
- - Do not copy content from discovery.md into architecture.md. Reference sections by name: "see discovery.md § Entities". The document chain is already in context.