aios-core 2.1.6 → 2.2.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 (367) hide show
  1. package/.aios-core/core/README.md +229 -229
  2. package/.aios-core/core/data/agent-config-requirements.yaml +368 -368
  3. package/.aios-core/core/data/aios-kb.md +923 -923
  4. package/.aios-core/core/data/workflow-patterns.yaml +267 -267
  5. package/.aios-core/core/docs/SHARD-TRANSLATION-GUIDE.md +335 -335
  6. package/.aios-core/core/docs/component-creation-guide.md +457 -457
  7. package/.aios-core/core/docs/session-update-pattern.md +307 -307
  8. package/.aios-core/core/docs/template-syntax.md +266 -266
  9. package/.aios-core/core/docs/troubleshooting-guide.md +624 -624
  10. package/.aios-core/core/elicitation/elicitation-engine.js +1 -1
  11. package/.aios-core/core/index.esm.js +42 -42
  12. package/.aios-core/core/index.js +1 -1
  13. package/.aios-core/core/migration/migration-config.yaml +83 -83
  14. package/.aios-core/core/migration/module-mapping.yaml +89 -89
  15. package/.aios-core/core/quality-gates/layer2-pr-automation.js +1 -1
  16. package/.aios-core/core/quality-gates/quality-gate-config.yaml +86 -86
  17. package/.aios-core/core/registry/README.md +179 -179
  18. package/.aios-core/core/utils/security-utils.js +1 -1
  19. package/.aios-core/core-config.yaml +391 -382
  20. package/.aios-core/data/agent-config-requirements.yaml +368 -368
  21. package/.aios-core/data/aios-kb.md +923 -923
  22. package/.aios-core/data/technical-preferences.md +3 -3
  23. package/.aios-core/data/workflow-patterns.yaml +267 -267
  24. package/.aios-core/development/README.md +142 -142
  25. package/.aios-core/development/agent-teams/team-all.yaml +15 -15
  26. package/.aios-core/development/agent-teams/team-fullstack.yaml +18 -18
  27. package/.aios-core/development/agent-teams/team-ide-minimal.yaml +10 -10
  28. package/.aios-core/development/agent-teams/team-no-ui.yaml +13 -13
  29. package/.aios-core/development/agent-teams/team-qa-focused.yaml +155 -155
  30. package/.aios-core/development/agents/aios-master.md +339 -339
  31. package/.aios-core/development/agents/analyst.md +195 -195
  32. package/.aios-core/development/agents/architect.md +359 -359
  33. package/.aios-core/development/agents/data-engineer.md +468 -468
  34. package/.aios-core/development/agents/dev.md +390 -390
  35. package/.aios-core/development/agents/devops.md +398 -398
  36. package/.aios-core/development/agents/pm.md +198 -198
  37. package/.aios-core/development/agents/po.md +256 -256
  38. package/.aios-core/development/agents/qa.md +312 -312
  39. package/.aios-core/development/agents/sm.md +220 -220
  40. package/.aios-core/development/agents/ux-design-expert.md +451 -451
  41. package/.aios-core/development/scripts/greeting-config-cli.js +85 -85
  42. package/.aios-core/development/tasks/add-mcp.md +319 -319
  43. package/.aios-core/development/tasks/advanced-elicitation.md +318 -318
  44. package/.aios-core/development/tasks/analyst-facilitate-brainstorming.md +341 -341
  45. package/.aios-core/development/tasks/analyze-framework.md +696 -696
  46. package/.aios-core/development/tasks/analyze-performance.md +637 -637
  47. package/.aios-core/development/tasks/apply-qa-fixes.md +340 -340
  48. package/.aios-core/development/tasks/architect-analyze-impact.md +826 -826
  49. package/.aios-core/development/tasks/audit-codebase.md +429 -429
  50. package/.aios-core/development/tasks/audit-tailwind-config.md +270 -270
  51. package/.aios-core/development/tasks/audit-utilities.md +358 -358
  52. package/.aios-core/development/tasks/bootstrap-shadcn-library.md +286 -286
  53. package/.aios-core/development/tasks/brownfield-create-epic.md +485 -485
  54. package/.aios-core/development/tasks/brownfield-create-story.md +356 -356
  55. package/.aios-core/development/tasks/build-component.md +478 -478
  56. package/.aios-core/development/tasks/calculate-roi.md +455 -455
  57. package/.aios-core/development/tasks/ci-cd-configuration.md +764 -764
  58. package/.aios-core/development/tasks/cleanup-utilities.md +670 -670
  59. package/.aios-core/development/tasks/collaborative-edit.md +1108 -1108
  60. package/.aios-core/development/tasks/compose-molecule.md +284 -284
  61. package/.aios-core/development/tasks/consolidate-patterns.md +414 -414
  62. package/.aios-core/development/tasks/correct-course.md +279 -279
  63. package/.aios-core/development/tasks/create-agent.md +321 -321
  64. package/.aios-core/development/tasks/create-brownfield-story.md +726 -726
  65. package/.aios-core/development/tasks/create-deep-research-prompt.md +498 -498
  66. package/.aios-core/development/tasks/create-doc.md +316 -316
  67. package/.aios-core/development/tasks/create-next-story.md +774 -774
  68. package/.aios-core/development/tasks/create-suite.md +283 -283
  69. package/.aios-core/development/tasks/create-task.md +371 -371
  70. package/.aios-core/development/tasks/create-workflow.md +370 -370
  71. package/.aios-core/development/tasks/db-analyze-hotpaths.md +572 -572
  72. package/.aios-core/development/tasks/db-apply-migration.md +381 -381
  73. package/.aios-core/development/tasks/db-bootstrap.md +642 -642
  74. package/.aios-core/development/tasks/db-domain-modeling.md +693 -693
  75. package/.aios-core/development/tasks/db-dry-run.md +293 -293
  76. package/.aios-core/development/tasks/db-env-check.md +260 -260
  77. package/.aios-core/development/tasks/db-expansion-pack-integration.md +663 -663
  78. package/.aios-core/development/tasks/db-explain.md +631 -631
  79. package/.aios-core/development/tasks/db-impersonate.md +495 -495
  80. package/.aios-core/development/tasks/db-load-csv.md +593 -593
  81. package/.aios-core/development/tasks/db-policy-apply.md +653 -653
  82. package/.aios-core/development/tasks/db-rls-audit.md +411 -411
  83. package/.aios-core/development/tasks/db-rollback.md +739 -739
  84. package/.aios-core/development/tasks/db-run-sql.md +613 -613
  85. package/.aios-core/development/tasks/db-schema-audit.md +1011 -1011
  86. package/.aios-core/development/tasks/db-seed.md +390 -390
  87. package/.aios-core/development/tasks/db-smoke-test.md +351 -351
  88. package/.aios-core/development/tasks/db-snapshot.md +569 -569
  89. package/.aios-core/development/tasks/db-supabase-setup.md +712 -712
  90. package/.aios-core/development/tasks/db-verify-order.md +515 -515
  91. package/.aios-core/development/tasks/deprecate-component.md +956 -956
  92. package/.aios-core/development/tasks/dev-apply-qa-fixes.md +318 -318
  93. package/.aios-core/development/tasks/dev-backlog-debt.md +469 -469
  94. package/.aios-core/development/tasks/dev-develop-story.md +846 -846
  95. package/.aios-core/development/tasks/dev-improve-code-quality.md +872 -872
  96. package/.aios-core/development/tasks/dev-optimize-performance.md +1033 -1033
  97. package/.aios-core/development/tasks/dev-suggest-refactoring.md +870 -870
  98. package/.aios-core/development/tasks/dev-validate-next-story.md +348 -348
  99. package/.aios-core/development/tasks/document-project.md +552 -552
  100. package/.aios-core/development/tasks/environment-bootstrap.md +1311 -1311
  101. package/.aios-core/development/tasks/execute-checklist.md +301 -301
  102. package/.aios-core/development/tasks/export-design-tokens-dtcg.md +274 -274
  103. package/.aios-core/development/tasks/extend-pattern.md +269 -269
  104. package/.aios-core/development/tasks/extract-tokens.md +467 -467
  105. package/.aios-core/development/tasks/facilitate-brainstorming-session.md +518 -518
  106. package/.aios-core/development/tasks/generate-ai-frontend-prompt.md +260 -260
  107. package/.aios-core/development/tasks/generate-documentation.md +284 -284
  108. package/.aios-core/development/tasks/generate-migration-strategy.md +522 -522
  109. package/.aios-core/development/tasks/generate-shock-report.md +501 -501
  110. package/.aios-core/development/tasks/github-devops-github-pr-automation.md +427 -427
  111. package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +733 -733
  112. package/.aios-core/development/tasks/github-devops-repository-cleanup.md +374 -374
  113. package/.aios-core/development/tasks/github-devops-version-management.md +483 -483
  114. package/.aios-core/development/tasks/improve-self.md +822 -822
  115. package/.aios-core/development/tasks/index-docs.md +387 -387
  116. package/.aios-core/development/tasks/init-project-status.md +506 -506
  117. package/.aios-core/development/tasks/integrate-expansion-pack.md +314 -314
  118. package/.aios-core/development/tasks/kb-mode-interaction.md +283 -283
  119. package/.aios-core/development/tasks/learn-patterns.md +900 -900
  120. package/.aios-core/development/tasks/mcp-workflow.md +437 -437
  121. package/.aios-core/development/tasks/modify-agent.md +381 -381
  122. package/.aios-core/development/tasks/modify-task.md +424 -424
  123. package/.aios-core/development/tasks/modify-workflow.md +465 -465
  124. package/.aios-core/development/tasks/po-backlog-add.md +370 -370
  125. package/.aios-core/development/tasks/po-manage-story-backlog.md +523 -523
  126. package/.aios-core/development/tasks/po-pull-story-from-clickup.md +540 -540
  127. package/.aios-core/development/tasks/po-pull-story.md +316 -316
  128. package/.aios-core/development/tasks/po-stories-index.md +351 -351
  129. package/.aios-core/development/tasks/po-sync-story-to-clickup.md +457 -457
  130. package/.aios-core/development/tasks/po-sync-story.md +303 -303
  131. package/.aios-core/development/tasks/pr-automation.md +701 -701
  132. package/.aios-core/development/tasks/propose-modification.md +842 -842
  133. package/.aios-core/development/tasks/qa-backlog-add-followup.md +425 -425
  134. package/.aios-core/development/tasks/qa-gate.md +373 -373
  135. package/.aios-core/development/tasks/qa-generate-tests.md +1174 -1174
  136. package/.aios-core/development/tasks/qa-nfr-assess.md +557 -557
  137. package/.aios-core/development/tasks/qa-review-proposal.md +1157 -1157
  138. package/.aios-core/development/tasks/qa-review-story.md +682 -682
  139. package/.aios-core/development/tasks/qa-risk-profile.md +566 -566
  140. package/.aios-core/development/tasks/qa-run-tests.md +277 -277
  141. package/.aios-core/development/tasks/qa-test-design.md +387 -387
  142. package/.aios-core/development/tasks/qa-trace-requirements.md +476 -476
  143. package/.aios-core/development/tasks/release-management.md +723 -723
  144. package/.aios-core/development/tasks/security-audit.md +554 -554
  145. package/.aios-core/development/tasks/security-scan.md +790 -790
  146. package/.aios-core/development/tasks/setup-database.md +741 -741
  147. package/.aios-core/development/tasks/setup-design-system.md +462 -462
  148. package/.aios-core/development/tasks/setup-github.md +874 -874
  149. package/.aios-core/development/tasks/setup-llm-routing.md +1 -1
  150. package/.aios-core/development/tasks/setup-mcp-docker.md +584 -584
  151. package/.aios-core/development/tasks/setup-project-docs.md +1 -1
  152. package/.aios-core/development/tasks/shard-doc.md +537 -537
  153. package/.aios-core/development/tasks/sm-create-next-story.md +480 -480
  154. package/.aios-core/development/tasks/sync-documentation.md +864 -864
  155. package/.aios-core/development/tasks/tailwind-upgrade.md +294 -294
  156. package/.aios-core/development/tasks/test-as-user.md +621 -621
  157. package/.aios-core/development/tasks/test-validation-task.md +171 -171
  158. package/.aios-core/development/tasks/undo-last.md +346 -346
  159. package/.aios-core/development/tasks/update-manifest.md +409 -409
  160. package/.aios-core/development/tasks/ux-create-wireframe.md +617 -617
  161. package/.aios-core/development/tasks/ux-ds-scan-artifact.md +672 -672
  162. package/.aios-core/development/tasks/ux-user-research.md +559 -559
  163. package/.aios-core/development/tasks/validate-next-story.md +422 -422
  164. package/.aios-core/development/workflows/README.md +83 -83
  165. package/.aios-core/development/workflows/brownfield-fullstack.yaml +297 -297
  166. package/.aios-core/development/workflows/brownfield-service.yaml +187 -187
  167. package/.aios-core/development/workflows/brownfield-ui.yaml +197 -197
  168. package/.aios-core/development/workflows/greenfield-fullstack.yaml +333 -333
  169. package/.aios-core/development/workflows/greenfield-service.yaml +206 -206
  170. package/.aios-core/development/workflows/greenfield-ui.yaml +235 -235
  171. package/.aios-core/docs/SHARD-TRANSLATION-GUIDE.md +335 -335
  172. package/.aios-core/docs/component-creation-guide.md +457 -457
  173. package/.aios-core/docs/session-update-pattern.md +307 -307
  174. package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +572 -572
  175. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +185 -185
  176. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +354 -354
  177. package/.aios-core/docs/standards/AIOS-FRAMEWORK-MASTER.md +1963 -1963
  178. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +821 -821
  179. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-SUMMARY.md +1190 -1190
  180. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1.md +439 -439
  181. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +1339 -1339
  182. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO.md +5398 -5398
  183. package/.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md +697 -697
  184. package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +511 -511
  185. package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +556 -556
  186. package/.aios-core/docs/standards/STANDARDS-INDEX.md +210 -210
  187. package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +550 -550
  188. package/.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md +1414 -1414
  189. package/.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md +523 -523
  190. package/.aios-core/docs/template-syntax.md +266 -266
  191. package/.aios-core/docs/troubleshooting-guide.md +624 -624
  192. package/.aios-core/index.esm.js +15 -15
  193. package/.aios-core/index.js +1 -1
  194. package/.aios-core/infrastructure/README.md +126 -126
  195. package/.aios-core/infrastructure/integrations/pm-adapters/README.md +59 -59
  196. package/.aios-core/infrastructure/scripts/approval-workflow.js +1 -1
  197. package/.aios-core/infrastructure/scripts/batch-creator.js +1 -1
  198. package/.aios-core/infrastructure/scripts/component-generator.js +3 -3
  199. package/.aios-core/infrastructure/scripts/component-metadata.js +1 -1
  200. package/.aios-core/infrastructure/scripts/component-search.js +1 -1
  201. package/.aios-core/infrastructure/scripts/coverage-analyzer.js +1 -1
  202. package/.aios-core/infrastructure/scripts/dependency-analyzer.js +1 -1
  203. package/.aios-core/infrastructure/scripts/dependency-impact-analyzer.js +1 -1
  204. package/.aios-core/infrastructure/scripts/framework-analyzer.js +1 -1
  205. package/.aios-core/infrastructure/scripts/improvement-engine.js +1 -1
  206. package/.aios-core/infrastructure/scripts/llm-routing/install-llm-routing.js +26 -13
  207. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.cmd +127 -0
  208. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.sh +108 -0
  209. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.cmd +71 -0
  210. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.sh +65 -0
  211. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.cmd +51 -0
  212. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.sh +16 -0
  213. package/.aios-core/infrastructure/scripts/llm-routing/usage-tracker/index.js +549 -0
  214. package/.aios-core/infrastructure/scripts/modification-risk-assessment.js +1 -1
  215. package/.aios-core/infrastructure/scripts/performance-analyzer.js +1 -1
  216. package/.aios-core/infrastructure/scripts/pm-adapter.js +134 -134
  217. package/.aios-core/infrastructure/scripts/repository-detector.js +3 -3
  218. package/.aios-core/infrastructure/scripts/template-engine.js +1 -1
  219. package/.aios-core/infrastructure/scripts/template-validator.js +1 -1
  220. package/.aios-core/infrastructure/scripts/test-generator.js +1 -1
  221. package/.aios-core/infrastructure/scripts/test-quality-assessment.js +1 -1
  222. package/.aios-core/infrastructure/scripts/transaction-manager.js +1 -1
  223. package/.aios-core/infrastructure/scripts/usage-analytics.js +1 -1
  224. package/.aios-core/infrastructure/scripts/visual-impact-generator.js +2 -2
  225. package/.aios-core/infrastructure/templates/github-workflows/README.md +109 -109
  226. package/.aios-core/infrastructure/tests/regression-suite-v2.md +621 -621
  227. package/.aios-core/infrastructure/tools/README.md +222 -222
  228. package/.aios-core/infrastructure/tools/cli/github-cli.yaml +200 -200
  229. package/.aios-core/infrastructure/tools/cli/railway-cli.yaml +260 -260
  230. package/.aios-core/infrastructure/tools/cli/supabase-cli.yaml +224 -224
  231. package/.aios-core/infrastructure/tools/local/ffmpeg.yaml +261 -261
  232. package/.aios-core/infrastructure/tools/mcp/21st-dev-magic.yaml +127 -127
  233. package/.aios-core/infrastructure/tools/mcp/browser.yaml +103 -103
  234. package/.aios-core/infrastructure/tools/mcp/clickup.yaml +534 -534
  235. package/.aios-core/infrastructure/tools/mcp/context7.yaml +78 -78
  236. package/.aios-core/infrastructure/tools/mcp/desktop-commander.yaml +180 -180
  237. package/.aios-core/infrastructure/tools/mcp/exa.yaml +103 -103
  238. package/.aios-core/infrastructure/tools/mcp/google-workspace.yaml +930 -930
  239. package/.aios-core/infrastructure/tools/mcp/n8n.yaml +551 -551
  240. package/.aios-core/infrastructure/tools/mcp/supabase.yaml +808 -808
  241. package/.aios-core/install-manifest.yaml +347 -347
  242. package/.aios-core/product/README.md +56 -56
  243. package/.aios-core/product/checklists/accessibility-wcag-checklist.md +80 -0
  244. package/.aios-core/product/checklists/architect-checklist.md +443 -443
  245. package/.aios-core/product/checklists/change-checklist.md +182 -182
  246. package/.aios-core/product/checklists/component-quality-checklist.md +74 -0
  247. package/.aios-core/product/checklists/database-design-checklist.md +119 -119
  248. package/.aios-core/product/checklists/dba-predeploy-checklist.md +97 -97
  249. package/.aios-core/product/checklists/dba-rollback-checklist.md +99 -99
  250. package/.aios-core/product/checklists/migration-readiness-checklist.md +75 -0
  251. package/.aios-core/product/checklists/pattern-audit-checklist.md +88 -0
  252. package/.aios-core/product/checklists/pm-checklist.md +375 -375
  253. package/.aios-core/product/checklists/po-master-checklist.md +441 -441
  254. package/.aios-core/product/checklists/pre-push-checklist.md +108 -108
  255. package/.aios-core/product/checklists/release-checklist.md +122 -122
  256. package/.aios-core/product/checklists/story-dod-checklist.md +101 -101
  257. package/.aios-core/product/checklists/story-draft-checklist.md +215 -215
  258. package/.aios-core/product/data/atomic-design-principles.md +108 -0
  259. package/.aios-core/product/data/brainstorming-techniques.md +36 -36
  260. package/.aios-core/product/data/consolidation-algorithms.md +142 -0
  261. package/.aios-core/product/data/database-best-practices.md +182 -0
  262. package/.aios-core/product/data/design-token-best-practices.md +107 -0
  263. package/.aios-core/product/data/elicitation-methods.md +134 -134
  264. package/.aios-core/product/data/integration-patterns.md +207 -0
  265. package/.aios-core/product/data/migration-safety-guide.md +329 -0
  266. package/.aios-core/product/data/mode-selection-best-practices.md +471 -471
  267. package/.aios-core/product/data/postgres-tuning-guide.md +300 -0
  268. package/.aios-core/product/data/rls-security-patterns.md +333 -0
  269. package/.aios-core/product/data/roi-calculation-guide.md +142 -0
  270. package/.aios-core/product/data/supabase-patterns.md +330 -0
  271. package/.aios-core/product/data/test-levels-framework.md +148 -148
  272. package/.aios-core/product/data/test-priorities-matrix.md +174 -174
  273. package/.aios-core/product/data/wcag-compliance-guide.md +267 -0
  274. package/.aios-core/product/templates/1mcp-config.yaml +225 -225
  275. package/.aios-core/product/templates/activation-instructions-inline-greeting.yaml +63 -63
  276. package/.aios-core/product/templates/activation-instructions-template.md +258 -258
  277. package/.aios-core/product/templates/agent-template.yaml +120 -120
  278. package/.aios-core/product/templates/architecture-tmpl.yaml +650 -650
  279. package/.aios-core/product/templates/brainstorming-output-tmpl.yaml +155 -155
  280. package/.aios-core/product/templates/brownfield-architecture-tmpl.yaml +475 -475
  281. package/.aios-core/product/templates/brownfield-prd-tmpl.yaml +279 -279
  282. package/.aios-core/product/templates/changelog-template.md +134 -134
  283. package/.aios-core/product/templates/command-rationalization-matrix.md +152 -152
  284. package/.aios-core/product/templates/competitor-analysis-tmpl.yaml +292 -292
  285. package/.aios-core/product/templates/design-story-tmpl.yaml +587 -587
  286. package/.aios-core/product/templates/ds-artifact-analysis.md +70 -70
  287. package/.aios-core/product/templates/front-end-architecture-tmpl.yaml +205 -205
  288. package/.aios-core/product/templates/front-end-spec-tmpl.yaml +348 -348
  289. package/.aios-core/product/templates/fullstack-architecture-tmpl.yaml +804 -804
  290. package/.aios-core/product/templates/github-pr-template.md +67 -67
  291. package/.aios-core/product/templates/gordon-mcp.yaml +140 -140
  292. package/.aios-core/product/templates/ide-rules/antigravity-rules.md +115 -115
  293. package/.aios-core/product/templates/ide-rules/claude-rules.md +221 -221
  294. package/.aios-core/product/templates/ide-rules/cline-rules.md +84 -84
  295. package/.aios-core/product/templates/ide-rules/copilot-rules.md +92 -92
  296. package/.aios-core/product/templates/ide-rules/cursor-rules.md +115 -115
  297. package/.aios-core/product/templates/ide-rules/gemini-rules.md +85 -85
  298. package/.aios-core/product/templates/ide-rules/roo-rules.md +86 -86
  299. package/.aios-core/product/templates/ide-rules/trae-rules.md +104 -104
  300. package/.aios-core/product/templates/ide-rules/windsurf-rules.md +80 -80
  301. package/.aios-core/product/templates/index-strategy-tmpl.yaml +53 -53
  302. package/.aios-core/product/templates/market-research-tmpl.yaml +251 -251
  303. package/.aios-core/product/templates/mcp-workflow.js +271 -271
  304. package/.aios-core/product/templates/migration-plan-tmpl.yaml +1022 -1022
  305. package/.aios-core/product/templates/migration-strategy-tmpl.md +524 -524
  306. package/.aios-core/product/templates/personalized-agent-template.md +258 -258
  307. package/.aios-core/product/templates/personalized-checklist-template.md +340 -340
  308. package/.aios-core/product/templates/personalized-task-template-v2.md +905 -905
  309. package/.aios-core/product/templates/personalized-task-template.md +344 -344
  310. package/.aios-core/product/templates/personalized-template-file.yaml +322 -322
  311. package/.aios-core/product/templates/personalized-workflow-template.yaml +460 -460
  312. package/.aios-core/product/templates/prd-tmpl.yaml +201 -201
  313. package/.aios-core/product/templates/project-brief-tmpl.yaml +220 -220
  314. package/.aios-core/product/templates/qa-gate-tmpl.yaml +240 -240
  315. package/.aios-core/product/templates/rls-policies-tmpl.yaml +1203 -1203
  316. package/.aios-core/product/templates/schema-design-tmpl.yaml +428 -428
  317. package/.aios-core/product/templates/state-persistence-tmpl.yaml +219 -219
  318. package/.aios-core/product/templates/story-tmpl.yaml +331 -331
  319. package/.aios-core/product/templates/task-execution-report.md +495 -495
  320. package/.aios-core/product/templates/task-template.md +122 -122
  321. package/.aios-core/product/templates/token-exports-tailwind-tmpl.js +395 -395
  322. package/.aios-core/product/templates/tokens-schema-tmpl.yaml +305 -305
  323. package/.aios-core/product/templates/workflow-template.yaml +133 -133
  324. package/.aios-core/scripts/README.md +354 -354
  325. package/.aios-core/scripts/aios-doc-template.md +325 -325
  326. package/.aios-core/scripts/elicitation-engine.js +1 -1
  327. package/.aios-core/scripts/test-template-system.js +1 -1
  328. package/.aios-core/scripts/workflow-management.md +69 -69
  329. package/.aios-core/user-guide.md +1413 -1413
  330. package/.aios-core/working-in-the-brownfield.md +361 -361
  331. package/LICENSE +1 -1
  332. package/README.md +702 -703
  333. package/bin/aios-init-old.js +3 -3
  334. package/bin/aios-init-v4.js +1 -1
  335. package/bin/aios-init.backup-v1.1.4.js +1 -1
  336. package/bin/aios-init.js +3 -3
  337. package/bin/aios.js +279 -279
  338. package/bin/utils/install-errors.js +339 -339
  339. package/bin/utils/install-transaction.js +445 -445
  340. package/index.d.ts +18 -18
  341. package/index.esm.js +20 -20
  342. package/index.js +6 -6
  343. package/package.json +8 -10
  344. package/packages/installer/src/config/templates/env-template.js +27 -4
  345. package/packages/installer/src/detection/detect-project-type.js +81 -81
  346. package/packages/installer/tests/integration/wizard-detection.test.js +8 -6
  347. package/packages/installer/tests/unit/env-template.test.js +8 -8
  348. package/src/config/ide-configs.js +1 -1
  349. package/src/wizard/feedback.js +2 -2
  350. package/src/wizard/index.js +1 -1
  351. package/src/wizard/validation/report-generator.js +1 -1
  352. package/src/wizard/validation/troubleshooting-system.js +13 -13
  353. package/.aios-core/infrastructure/scripts/_archived/final-todo-count.js +0 -122
  354. package/.aios-core/infrastructure/scripts/_archived/fix-yaml-formatting.js +0 -89
  355. package/.aios-core/infrastructure/scripts/_archived/migration-generator.js +0 -780
  356. package/.aios-core/infrastructure/scripts/_archived/migration-path-generator.js +0 -950
  357. package/.aios-core/infrastructure/scripts/_archived/phase2-entrada-saida-errors.js +0 -425
  358. package/.aios-core/infrastructure/scripts/_archived/phase2-spot-check.js +0 -132
  359. package/.aios-core/infrastructure/scripts/_archived/phase3-tools-scripts-validation.js +0 -381
  360. package/.aios-core/infrastructure/scripts/_archived/phase4-metadata-performance.js +0 -203
  361. package/.aios-core/infrastructure/scripts/_archived/test-yaml-parsing.js +0 -24
  362. package/.aios-core/infrastructure/scripts/_archived/verify-yaml-fix.js +0 -51
  363. package/.aios-core/tasks/find-component.md.legacy +0 -391
  364. package/.aios-core/tasks/generate-commit-message.md.legacy +0 -426
  365. package/.aios-core/tasks/generate-migration.md.legacy +0 -382
  366. package/.aios-core/tasks/rollback-modification.md.legacy +0 -307
  367. package/.aios-core/tasks/update-tests.md.legacy +0 -283
@@ -1,1963 +1,1963 @@
1
- # AIOS Framework - Complete Documentation
2
-
3
- > **⚠️ DEPRECATION NOTICE**
4
- >
5
- > This document describes **v2.0.0** of the AIOS Framework.
6
- >
7
- > **For the current version (v2.1), see:**
8
- > - [AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md](./AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md) - Complete v2.1 framework guide
9
- > - [STANDARDS-INDEX.md](./STANDARDS-INDEX.md) - Navigation for all standards
10
- >
11
- > **Key changes in v2.1:**
12
- > - 4-module architecture (core, development, product, infrastructure)
13
- > - Squad System (replaces "Expansion Packs")
14
- > - Multi-repo strategy (3 public + 2 private repos)
15
- > - Quality Gates 3-layer system
16
- > - Story Template v2.0
17
- >
18
- > This document is retained for historical reference only.
19
-
20
- **Version:** 2.0.0 (DEPRECATED - See v2.1)
21
- **Status:** ⚠️ Deprecated - Reference Only
22
- **Last Updated:** 2025-01-18
23
- **Maintained By:** AIOS Framework Team
24
-
25
- ---
26
-
27
- ## 📋 Table of Contents
28
-
29
- ### Part I: Framework Overview
30
- 1. [What is AIOS?](#what-is-aios)
31
- 2. [Core Philosophy](#core-philosophy)
32
- 3. [Framework Architecture](#framework-architecture)
33
- 4. [Getting Started](#getting-started)
34
-
35
- ### Part II: Framework Structure
36
- 5. [Directory Structure](#directory-structure)
37
- 6. [File Organization](#file-organization)
38
- 7. [Naming Conventions](#naming-conventions)
39
-
40
- ### Part III: Agent System
41
- 8. [Agent Architecture](#agent-architecture)
42
- 9. [Agent Personalization](#agent-personalization)
43
- 10. [Agent Roles & Specializations](#agent-roles--specializations)
44
- 11. [Greeting System](#greeting-system)
45
-
46
- ### Part IV: Task & Workflow System
47
- 12. [Task Format Specification](#task-format-specification)
48
- 13. [Execution Modes](#execution-modes)
49
- 14. [Workflow Orchestration](#workflow-orchestration)
50
- 15. [Fork/Join & Organizer-Worker Patterns](#forkjoin--organizer-worker-patterns)
51
-
52
- ### Part V: Executor Types
53
- 16. [The Four Executor Types](#the-four-executor-types)
54
- 17. [Executor Decision Tree](#executor-decision-tree)
55
-
56
- ### Part VI: Standards & Best Practices
57
- 18. [Coding Standards](#coding-standards)
58
- 19. [Technology Stack](#technology-stack)
59
- 20. [Quality Gates & CodeRabbit Integration](#quality-gates--coderabbit-integration)
60
-
61
- ### Part VII: Migration & Roadmap
62
- 21. [Current Migration Status](#current-migration-status)
63
- 22. [Future Architecture (Q2 2026)](#future-architecture-q2-2026)
64
- 23. [Subdirectory Migration Plan](#subdirectory-migration-plan)
65
-
66
- ### Part VIII: Appendices
67
- 24. [Glossary](#glossary)
68
- 25. [Decision History](#decision-history)
69
- 26. [References](#references)
70
-
71
- ---
72
-
73
- # Part I: Framework Overview
74
-
75
- ## What is AIOS?
76
-
77
- **AIOS (AI Operating System)** is a sophisticated framework for orchestrating AI agents, workers, and humans in complex software development workflows. It provides a structured, scalable approach to building AI-assisted development teams with personality, coordination, and quality gates.
78
-
79
- ### Key Capabilities
80
-
81
- - 🤖 **16 Specialized Agents** - Dev, QA, Architect, PM, PO, Analyst, Data Engineer, DevOps, etc.
82
- - 📋 **60+ Executable Tasks** - Story creation, code generation, testing, deployment, documentation
83
- - 📝 **20+ Templates** - PRDs, stories, architecture docs, test plans, database schemas
84
- - 🔄 **Multi-Agent Workflows** - Greenfield, brownfield, fork/join, organizer-worker patterns
85
- - 🎭 **Personalized Agent System** - Named personalities with archetypes, vocabularies, and signatures
86
- - 🎯 **Three Execution Modes** - YOLO (autonomous), Interactive (balanced), Pre-Flight (comprehensive)
87
- - ✅ **Quality Gates** - CodeRabbit integration, automated reviews, acceptance criteria validation
88
-
89
- ---
90
-
91
- ## Core Philosophy
92
-
93
- ### Structure is Sacred. Tone is Flexible.
94
-
95
- AIOS follows a fundamental principle:
96
-
97
- > "Quando as informações estão sempre nas mesmas posições, nosso cérebro sabe onde buscar rápido."
98
-
99
- **FIXED:**
100
- - Template positions
101
- - Section order
102
- - Metric formats
103
- - File structure
104
- - Task workflows
105
-
106
- **FLEXIBLE:**
107
- - Status messages
108
- - Vocabulary choices
109
- - Emoji usage
110
- - Agent personality
111
- - Communication tone
112
-
113
- ### Design Principles
114
-
115
- 1. **Familiaridade + Personalização = Produtividade**
116
- - Users learn structure once
117
- - Personality makes it memorable
118
- - Consistency enables speed
119
-
120
- 2. **Separation of Concerns**
121
- - Framework vs. Project
122
- - Structure vs. Tone
123
- - Automation vs. Human Judgment
124
-
125
- 3. **Progressive Complexity**
126
- - Simple by default
127
- - Complex when needed
128
- - Scalable architecture
129
-
130
- 4. **Multi-Agent Coordination**
131
- - Agents work together
132
- - Clear handoffs
133
- - Shared context
134
-
135
- ---
136
-
137
- ## Framework Architecture
138
-
139
- ### Dual-Layer Architecture
140
-
141
- ```
142
- ┌─────────────────────────────────────────────────────────────┐
143
- │ FRAMEWORK LAYER (.aios-core/) │
144
- │ ├── Agents (16 specialists) │
145
- │ ├── Tasks (60+ executable workflows) │
146
- │ ├── Templates (20+ document generators) │
147
- │ ├── Workflows (6+ multi-agent orchestrations) │
148
- │ ├── Checklists (6+ validation processes) │
149
- │ ├── Data (Knowledge base) │
150
- │ ├── Scripts (54+ utilities) │
151
- │ └── Tools (MCP integrations) │
152
- └─────────────────────────────────────────────────────────────┘
153
-
154
- ┌─────────────────────────────────────────────────────────────┐
155
- │ PROJECT LAYER (root workspace) │
156
- │ ├── frontend/ (Next.js, React) │
157
- │ ├── backend/ (NestJS, Supabase) │
158
- │ ├── docs/ (Project documentation) │
159
- │ ├── tests/ (Unit, integration, E2E) │
160
- │ └── .aios/ (Session state, logs) │
161
- └─────────────────────────────────────────────────────────────┘
162
- ```
163
-
164
- **Framework Layer:** Portable across all AIOS projects
165
- **Project Layer:** Specific to each implementation
166
-
167
- ---
168
-
169
- ### Three-Layer Personality System
170
-
171
- ```
172
- ┌─────────────────────────────────────────────────────────────┐
173
- │ LAYER 1: Agent Persona Config (.aios-core/agents/*.md) │
174
- │ - Name, archetype, zodiac │
175
- │ - Vocabulary, emoji palette │
176
- │ - Greeting levels, signature │
177
- └─────────────────────────────────────────────────────────────┘
178
-
179
- ┌─────────────────────────────────────────────────────────────┐
180
- │ LAYER 2: Output Formatter (.aios-core/scripts/) │
181
- │ - greeting-builder.js │
182
- │ - session-context-loader.js │
183
- │ - project-status-loader.js │
184
- └─────────────────────────────────────────────────────────────┘
185
-
186
- ┌─────────────────────────────────────────────────────────────┐
187
- │ LAYER 3: Standardized Output │
188
- │ - Fixed structure + personalized tone │
189
- │ - Contextual greetings │
190
- │ - Agent signatures │
191
- └─────────────────────────────────────────────────────────────┘
192
- ```
193
-
194
- ---
195
-
196
- ## Getting Started
197
-
198
- ### Prerequisites
199
-
200
- - **Node.js** 18+ (LTS)
201
- - **Git** (version control)
202
- - **IDE:** Cursor or VS Code with Claude extension
203
- - **MCP Servers:** ClickUp, Context7, Exa (optional)
204
-
205
- ### Quick Start
206
-
207
- ```bash
208
- # 1. Clone the repository
209
- git clone <your-aios-project>
210
- cd <project-directory>
211
-
212
- # 2. Install dependencies
213
- npm install
214
-
215
- # 3. Configure AIOS
216
- # Edit .aios-core/core-config.yaml
217
-
218
- # 4. Activate first agent
219
- # In IDE: type /AIOS/agents/pm
220
-
221
- # 5. Create your first story
222
- *create-next-story
223
- ```
224
-
225
- ### First Commands to Try
226
-
227
- ```bash
228
- # Product Owner (Story Management)
229
- /AIOS/agents/po
230
- *create-next-story
231
- *validate-story-draft docs/stories/your-story.md
232
-
233
- # Developer (Implementation)
234
- /AIOS/agents/dev
235
- *develop-story docs/stories/your-story.md
236
-
237
- # QA (Quality Assurance)
238
- /AIOS/agents/qa
239
- *review docs/stories/your-story.md
240
- *code-review
241
- ```
242
-
243
- ---
244
-
245
- # Part II: Framework Structure
246
-
247
- ## Directory Structure
248
-
249
- ### Complete Framework Structure
250
-
251
- ```
252
- .aios-core/ # Framework Core (Portable)
253
- ├── agents/ # 16 agent definitions
254
- │ ├── dev.md # 💻 Dex (Builder)
255
- │ ├── qa.md # 🛡️ Quinn (Guardian)
256
- │ ├── architect.md # 🏛️ Aria (Visionary)
257
- │ ├── pm.md # 📊 Morgan (Balancer)
258
- │ ├── po.md # 📋 Pax (Balancer)
259
- │ ├── sm.md # 🌊 Sage (Flow Master)
260
- │ ├── analyst.md # 🔍 Scout (Explorer)
261
- │ ├── data-engineer.md # 🔧 Dara (Engineer)
262
- │ ├── devops.md # ⚙️ Gage (Operator)
263
- │ ├── db-sage.md # 🗄️ [Database Architect]
264
- │ ├── ux-design-expert.md # 🎨 Uma (Empathizer)
265
- │ ├── aios-master.md # ⭐ Orion (Orchestrator)
266
- │ ├── aios-developer.md # 🛠️ [Framework Developer]
267
- │ ├── aios-orchestrator.md # 🎭 [Workflow Orchestrator]
268
- │ ├── github-devops.md # 🐙 [Git Operations]
269
- │ └── test-agent.md # 🧪 [Test Agent]
270
-
271
- ├── tasks/ # 60+ executable workflows
272
- │ ├── create-doc.md # Document generation
273
- │ ├── create-next-story.md # Story creation
274
- │ ├── develop-story.md # Story implementation
275
- │ ├── review-story.md # Story review
276
- │ ├── validate-next-story.md # Story validation
277
- │ ├── manage-story-backlog.md # Backlog management
278
- │ ├── execute-checklist.md # Checklist execution
279
- │ ├── document-project.md # Project documentation
280
- │ ├── generate-tests.md # Test generation
281
- │ ├── nfr-assess.md # Non-functional requirements
282
- │ ├── qa-gate.md # Quality gate decision
283
- │ ├── code-review.md # Automated code review
284
- │ ├── apply-qa-fixes.md # QA fix application
285
- │ ├── improve-code-quality.md # Code quality improvements
286
- │ ├── setup-database.md # Database setup
287
- │ ├── domain-modeling.md # Domain modeling
288
- │ ├── version-management.md # Version management
289
- │ ├── pre-push-quality-gate.md # Pre-push validation
290
- │ ├── github-pr-automation.md # PR automation
291
- │ ├── create-agent.md # Agent creation
292
- │ ├── create-task.md # Task creation
293
- │ ├── create-workflow.md # Workflow creation
294
- │ └── ... (40+ more)
295
-
296
- ├── templates/ # 20+ document templates
297
- │ ├── story-tmpl.yaml # Story template v2.0
298
- │ ├── design-story-tmpl.yaml # Design story template
299
- │ ├── prd-tmpl.yaml # PRD template
300
- │ ├── epic-tmpl.md # Epic template
301
- │ ├── architecture-tmpl.yaml # Architecture template
302
- │ ├── fullstack-architecture-tmpl.yaml # Full-stack architecture
303
- │ ├── brownfield-architecture-tmpl.yaml # Brownfield architecture
304
- │ ├── schema-design-tmpl.yaml # Database schema template
305
- │ ├── project-brief-tmpl.yaml # Project brief
306
- │ ├── market-research-tmpl.yaml # Market research
307
- │ ├── competitor-analysis-tmpl.yaml # Competitor analysis
308
- │ ├── github-pr-template.md # PR template
309
- │ ├── github-actions-ci.yml # CI/CD template
310
- │ ├── personalized-task-template-v2.md # Task template
311
- │ └── ... (6+ more)
312
-
313
- ├── workflows/ # 6 multi-step workflows
314
- │ ├── greenfield-fullstack.yaml # Greenfield full-stack
315
- │ ├── greenfield-service.yaml # Greenfield service
316
- │ ├── greenfield-ui.yaml # Greenfield UI
317
- │ ├── brownfield-fullstack.yaml # Brownfield full-stack
318
- │ ├── brownfield-service.yaml # Brownfield service
319
- │ └── brownfield-ui.yaml # Brownfield UI
320
-
321
- ├── checklists/ # 6+ validation checklists
322
- │ ├── po-master-checklist.md # PO validation
323
- │ ├── story-draft-checklist.md # Story draft validation
324
- │ ├── story-dod-checklist.md # Story Definition of Done
325
- │ ├── architect-checklist.md # Architecture review
326
- │ ├── qa-checklist.md # QA validation
327
- │ ├── pm-checklist.md # PM validation
328
- │ └── change-checklist.md # Change management
329
-
330
- ├── data/ # Knowledge base
331
- │ ├── aios-kb.md # AIOS knowledge base
332
- │ ├── technical-preferences.md # Tech stack preferences
333
- │ ├── elicitation-methods.md # Elicitation techniques
334
- │ ├── brainstorming-techniques.md # Brainstorming methods
335
- │ ├── mode-selection-best-practices.md # Execution mode guidance
336
- │ ├── test-levels-framework.md # Testing strategy
337
- │ ├── test-priorities-matrix.md # Test prioritization
338
- │ └── agent-config-requirements.yaml # Agent requirements
339
-
340
- ├── scripts/ # 54+ utility scripts
341
- │ ├── agent-config-loader.js # Agent configuration
342
- │ ├── greeting-builder.js # Greeting generation
343
- │ ├── generate-greeting.js # Greeting orchestrator
344
- │ ├── session-context-loader.js # Session management
345
- │ ├── project-status-loader.js # Project status
346
- │ ├── config-cache.js # Configuration cache
347
- │ ├── performance-tracker.js # Performance tracking
348
- │ ├── component-generator.js # Component scaffolding
349
- │ ├── elicitation-engine.js # Interactive elicitation
350
- │ ├── story-manager.js # Story lifecycle
351
- │ ├── yaml-validator.js # YAML validation
352
- │ ├── usage-analytics.js # Usage tracking
353
- │ ├── migrate-task-to-v2.js # Task migration
354
- │ ├── validate-task-v2.js # Task validation
355
- │ └── ... (40+ more)
356
-
357
- ├── tools/ # Tool integrations
358
- │ ├── mcp/ # MCP server configs
359
- │ │ ├── clickup-direct.yaml
360
- │ │ ├── context7.yaml
361
- │ │ └── exa-direct.yaml
362
- │ ├── cli/ # CLI tool wrappers
363
- │ │ ├── github-cli.yaml
364
- │ │ └── railway-cli.yaml
365
- │ └── local/ # Local tools
366
-
367
- ├── elicitation/ # Elicitation engines
368
- │ ├── agent-elicitation.js
369
- │ ├── task-elicitation.js
370
- │ └── workflow-elicitation.js
371
-
372
- ├── core-config.yaml # Framework configuration
373
- ├── install-manifest.yaml # Installation manifest
374
- ├── user-guide.md # User guide
375
- └── working-in-the-brownfield.md # Brownfield guide
376
- ```
377
-
378
- ---
379
-
380
- ## File Organization
381
-
382
- ### File Types & Purposes
383
-
384
- | Type | Location | Purpose | Format |
385
- |------|----------|---------|--------|
386
- | **Agents** | `.aios-core/agents/*.md` | Agent definitions with persona | Markdown + YAML |
387
- | **Tasks** | `.aios-core/tasks/*.md` | Executable workflows | Markdown + YAML |
388
- | **Templates** | `.aios-core/templates/*.yaml` | Document generators | YAML |
389
- | **Workflows** | `.aios-core/workflows/*.yaml` | Multi-agent orchestration | YAML |
390
- | **Checklists** | `.aios-core/checklists/*.md` | Validation processes | Markdown + Checklist |
391
- | **Data/KB** | `.aios-core/data/*.md` | Knowledge base, references | Markdown/YAML |
392
- | **Scripts** | `.aios-core/scripts/*.js` | Utilities, automation | JavaScript |
393
- | **Tools** | `.aios-core/tools/*/*.yaml` | Tool integrations | YAML |
394
-
395
- ### Framework vs. Project Files
396
-
397
- **Framework Files (.aios-core/):**
398
- - ✅ Portable across projects
399
- - ✅ Version controlled in framework repo
400
- - ✅ Shared by all AIOS projects
401
- - ✅ Changes require framework approval
402
-
403
- **Project Files (root/):**
404
- - ✅ Project-specific implementation
405
- - ✅ Version controlled in project repo
406
- - ✅ Unique to each project
407
- - ✅ Changes by project team
408
-
409
- ---
410
-
411
- ## Naming Conventions
412
-
413
- ### File Names
414
-
415
- **Rule:** `kebab-case` for all files
416
-
417
- ```bash
418
- ✅ CORRECT:
419
- - create-next-story.md
420
- - fullstack-architecture-tmpl.yaml
421
- - agent-config-loader.js
422
-
423
- ❌ WRONG:
424
- - createNextStory.md
425
- - fullstackArchitectureTmpl.yaml
426
- - agent_config_loader.js
427
- ```
428
-
429
- ### Variable Names
430
-
431
- **JavaScript/JSON:** `camelCase`
432
- ```javascript
433
- ✅ CORRECT:
434
- const agentConfig = { ... }
435
- const taskDefinition = { ... }
436
-
437
- ❌ WRONG:
438
- const agent_config = { ... }
439
- const task-definition = { ... }
440
- ```
441
-
442
- **CSS:** `kebab-case`
443
- ```css
444
- ✅ CORRECT:
445
- .content-area { }
446
- --spacing-md: 200px;
447
-
448
- ❌ WRONG:
449
- .contentArea { }
450
- --spacing_md: 200px;
451
- ```
452
-
453
- **Database:** `snake_case`
454
- ```sql
455
- ✅ CORRECT:
456
- tasks.responsavel_type
457
- workflow_executions.started_at
458
-
459
- ❌ WRONG:
460
- tasks.responsavelType
461
- workflow_executions.startedAt
462
- ```
463
-
464
- ---
465
-
466
- # Part III: Agent System
467
-
468
- ## Agent Architecture
469
-
470
- ### Agent Definition Structure
471
-
472
- Every agent follows this YAML structure:
473
-
474
- ```yaml
475
- # Agent Core Identity
476
- agent:
477
- name: {PersonalizedName} # Human name (Dex, Quinn, Pax)
478
- id: {agent-id} # System identifier
479
- title: {Role} # Professional role
480
- icon: {emoji} # Visual identifier
481
- whenToUse: "{description}" # When to activate this agent
482
-
483
- # Personality Profile
484
- persona_profile:
485
- archetype: {Archetype} # Builder, Guardian, Balancer, etc.
486
- zodiac: {Sign} # ♒ Aquarius, ♍ Virgo, ♎ Libra, etc.
487
-
488
- communication:
489
- tone: {tone} # pragmatic | empathetic | analytical
490
- emoji_frequency: {level} # high | medium | low | minimal
491
-
492
- vocabulary: # Agent-specific words (5-10)
493
- - {word1}
494
- - {word2}
495
- - {word3}
496
-
497
- greeting_levels: # 3 personification levels
498
- minimal: "{icon} {id} Agent ready"
499
- named: "{icon} {name} ({archetype}) ready. {tagline}!"
500
- archetypal: "{icon} {name} the {archetype} ready to {verb}!"
501
-
502
- signature_closing: "{personalized_sign_off}"
503
-
504
- # Behavioral Configuration
505
- persona:
506
- role: {DetailedRole}
507
- style: {CommunicationStyle}
508
- identity: {CoreIdentity}
509
- focus: {PrimaryFocus}
510
- core_principles:
511
- - {principle1}
512
- - {principle2}
513
- - {principle3}
514
-
515
- # Commands
516
- commands:
517
- - name: {command-name}
518
- description: {description}
519
-
520
- # Dependencies
521
- dependencies:
522
- tasks:
523
- - {task-file}.md
524
- templates:
525
- - {template-file}.yaml
526
- checklists:
527
- - {checklist-file}.md
528
- data:
529
- - {data-file}.md
530
- tools:
531
- - {tool-name}
532
- ```
533
-
534
- ---
535
-
536
- ## Agent Personalization
537
-
538
- ### The 11 Archetypes
539
-
540
- | Archetype | Name | Icon | Zodiac | Tone | Examples |
541
- |-----------|------|------|--------|------|----------|
542
- | **Builder** | Dex | 💻 | ♒ Aquarius | Pragmatic | Dev |
543
- | **Guardian** | Quinn | 🛡️ | ♍ Virgo | Protective | QA |
544
- | **Balancer** | Pax, Morgan | 📋 📊 | ♎ Libra | Diplomatic | PO, PM |
545
- | **Visionary** | Aria | 🏛️ | ♐ Sagittarius | Conceptual | Architect |
546
- | **Flow Master** | Sage | 🌊 | ♓ Pisces | Adaptive | SM |
547
- | **Explorer** | Scout | 🔍 | ♊ Gemini | Curious | Analyst |
548
- | **Engineer** | Dara | 🔧 | ♉ Taurus | Methodical | Data Engineer |
549
- | **Operator** | Gage | ⚙️ | ♑ Capricorn | Efficient | DevOps |
550
- | **Empathizer** | Uma | 🎨 | ♋ Cancer | Empathetic | UX Expert |
551
- | **Orchestrator** | Orion | ⭐ | ♌ Leo | Commanding | AIOS Master |
552
- | **Architect** | (Various) | 🏗️ | (Various) | Systematic | DB Sage |
553
-
554
- ### Vocabulary System
555
-
556
- Each archetype has specific vocabulary:
557
-
558
- **Builder (Dex):**
559
- - construir, implementar, refatorar, resolver, otimizar
560
- - debuggar, testar, deployar, commitar, mergear
561
-
562
- **Guardian (Quinn):**
563
- - validar, verificar, proteger, garantir, auditar
564
- - revisar, inspecionar, certificar, assegurar
565
-
566
- **Balancer (Pax, Morgan):**
567
- - equilibrar, harmonizar, priorizar, alinhar, integrar
568
- - negociar, mediar, sincronizar, coordenar
569
-
570
- ### Emoji Palette System
571
-
572
- **High Frequency:**
573
- - ✅ ❌ ⚠️ 🎯 🚀 ⭐ 💡 🔥
574
-
575
- **Medium Frequency:**
576
- - 📊 📋 📝 🔍 💻 🛡️ 🏛️ 🌊
577
-
578
- **Low Frequency:**
579
- - Agent-specific emojis only
580
-
581
- **Minimal:**
582
- - Status indicators only (✅ ❌ ⚠️)
583
-
584
- ---
585
-
586
- ## Agent Roles & Specializations
587
-
588
- ### Development Team
589
-
590
- **💻 Dex (Builder) - Developer**
591
- - **Role:** Full-stack implementation
592
- - **Commands:** `*develop-story`, `*apply-qa-fixes`, `*improve-code-quality`
593
- - **When to Use:** Code implementation, debugging, refactoring
594
-
595
- **🛡️ Quinn (Guardian) - QA Engineer**
596
- - **Role:** Quality assurance and testing
597
- - **Commands:** `*review`, `*code-review`, `*gate`, `*nfr-assess`
598
- - **When to Use:** Testing, quality validation, acceptance criteria
599
-
600
- **🏛️ Aria (Visionary) - Architect**
601
- - **Role:** System architecture and design
602
- - **Commands:** `*create-full-stack-architecture`, `*document-project`
603
- - **When to Use:** Architecture decisions, system design, tech stack
604
-
605
- ---
606
-
607
- ### Product & Agile Team
608
-
609
- **📋 Pax (Balancer) - Product Owner**
610
- - **Role:** Story management and backlog
611
- - **Commands:** `*create-next-story`, `*validate-story-draft`, `*sync-story`
612
- - **When to Use:** Story creation, backlog prioritization, acceptance
613
-
614
- **📊 Morgan (Balancer) - Product Manager**
615
- - **Role:** Product strategy and roadmap
616
- - **Commands:** `*create-doc`, `*brownfield-create-epic`
617
- - **When to Use:** PRDs, product strategy, stakeholder management
618
-
619
- **🌊 Sage (Flow Master) - Scrum Master**
620
- - **Role:** Process facilitation and flow
621
- - **Commands:** `*execute-checklist`, `*correct-course`
622
- - **When to Use:** Sprint planning, retrospectives, flow optimization
623
-
624
- ---
625
-
626
- ### Specialized Agents
627
-
628
- **🔍 Scout (Explorer) - Business Analyst**
629
- - **Role:** Requirements analysis and research
630
- - **Commands:** `*facilitate-brainstorming-session`, `*create-deep-research-prompt`
631
- - **When to Use:** Requirements elicitation, market research, analysis
632
-
633
- **🔧 Dara (Engineer) - Data Engineer**
634
- - **Role:** Data modeling and pipelines
635
- - **Commands:** `*setup-database`, `*domain-modeling`
636
- - **When to Use:** Database design, ETL pipelines, data architecture
637
-
638
- **⚙️ Gage (Operator) - DevOps Engineer**
639
- - **Role:** Deployment and operations
640
- - **Commands:** `*version-management`, `*github-pr-automation`, `*ci-cd-configuration`
641
- - **When to Use:** CI/CD, deployment, infrastructure, monitoring
642
-
643
- **🎨 Uma (Empathizer) - UX Design Expert**
644
- - **Role:** User experience and design systems
645
- - **Commands:** `*ux-user-research`, `*ux-create-wireframe`, `*audit-codebase`
646
- - **When to Use:** UX research, design systems, accessibility
647
-
648
- ---
649
-
650
- ### Framework Agents
651
-
652
- **⭐ Orion (Orchestrator) - AIOS Master**
653
- - **Role:** Framework orchestration and agent coordination
654
- - **Commands:** `*create-agent`, `*create-task`, `*create-workflow`
655
- - **When to Use:** Framework development, agent creation, workflow design
656
-
657
- **🗄️ DB Sage - Database Architect**
658
- - **Role:** Database schema design and optimization
659
- - **When to Use:** Complex database design, query optimization
660
-
661
- **🐙 GitHub DevOps - Git Operations**
662
- - **Role:** Git push operations and PR management
663
- - **When to Use:** Git push, PR creation (not available for local operations)
664
-
665
- ---
666
-
667
- ## Greeting System
668
-
669
- ### Three Greeting Levels
670
-
671
- **1. Minimal** (Quick activation)
672
- ```
673
- 💻 dev Agent ready
674
- ```
675
-
676
- **2. Named** (Standard, personalized)
677
- ```
678
- 💻 Dex (Builder) pronto. Vamos construir isso!
679
- ```
680
-
681
- **3. Archetypal** (Full personality)
682
- ```
683
- 💻 Dex the Builder (♒ Aquarius) ready to implement!
684
- ```
685
-
686
- ### Contextual Greeting Components
687
-
688
- **Complete Greeting Structure:**
689
-
690
- ```
691
- {Archetypal Greeting}
692
-
693
- 📊 **Project Status:**
694
- - 🌿 **Branch:** main
695
- - 📝 **Modified:** file1.md, file2.js ...and 10 more
696
- - 📖 **Recent:** feat: complete story implementation
697
- - 📌 **Story:** STORY-6.1.4
698
-
699
- 💡 **Context:** {Intelligent narrative based on previous work}
700
- **Recommended:** Use *{command} to continue
701
-
702
- **Quick Commands:**
703
- - *help: Show all available commands
704
- - *command1: Description
705
- - *command2: Description
706
-
707
- Type *guide for comprehensive usage instructions.
708
-
709
- — {Agent Signature}
710
- ```
711
-
712
- ### Context Intelligence
713
-
714
- The greeting system analyzes:
715
- - **Previous Agent:** Who was active before
716
- - **Modified Files:** What files were changed
717
- - **Current Story:** What story is being worked on
718
- - **Last Commands:** What commands were recently used
719
- - **Session Type:** New, existing, or workflow session
720
-
721
- **Example Context:**
722
- ```
723
- 💡 **Context:** Vejo que @Dex finalizou a implementação do
724
- **`greeting-builder.js`** no **`story-6.1.4.md`**.
725
- Agora podemos revisar a qualidade dessa implementação
726
-
727
- **Recommended:** Use `*review story-6.1.4.md` para continuar
728
- ```
729
-
730
- ---
731
-
732
- # Part IV: Task & Workflow System
733
-
734
- ## Task Format Specification
735
-
736
- ### Universal Task Structure (AIOS v1.0)
737
-
738
- Every task follows this specification:
739
-
740
- ```yaml
741
- task: {taskIdentifier()}
742
- responsável: {AgentName} # Agent executing (Dex, Quinn, etc.)
743
- responsavel_type: Agente # Agente | Worker | Humano | Clone
744
- atomic_layer: {Layer} # Optional for open-source
745
-
746
- **Entrada:**
747
- - campo: {fieldName}
748
- tipo: {type} # string | number | boolean | array | object
749
- origem: {source} # Step X | User Input | config | agent output
750
- obrigatório: {true|false}
751
- padrão: {defaultValue} # Optional
752
- validação: {validationRule} # Optional
753
-
754
- **Saída:**
755
- - campo: {fieldName}
756
- tipo: {type}
757
- destino: {destination} # Step Y | state | output | multiple steps
758
- persistido: {true|false} # Saved to file/DB or memory-only
759
- cache_key: {key} # Optional: if cacheable
760
-
761
- **Checklist:**
762
- pre-conditions:
763
- - [ ] {condition}
764
- tipo: pre-condition
765
- blocker: {true|false}
766
- validação: {validation_logic}
767
-
768
- post-conditions:
769
- - [ ] {condition}
770
- tipo: post-condition
771
- blocker: {true|false}
772
- validação: {validation_logic}
773
-
774
- acceptance-criteria:
775
- - [ ] {criterion}
776
- tipo: acceptance
777
- blocker: false
778
- story: {STORY-XXX}
779
-
780
- **Performance:**
781
- - duration_expected: {X}ms
782
- - cost_estimated: ${Y}
783
- - cacheable: {true|false}
784
- - parallelizable: {true|false}
785
-
786
- **Error Handling:**
787
- - strategy: {retry|fallback|abort}
788
- - retry:
789
- max_attempts: {N}
790
- backoff: {linear|exponential}
791
- ```
792
-
793
- ### Task Components Explained
794
-
795
- **Entrada (Input):**
796
- - Defines all required and optional inputs
797
- - Specifies data types and validation rules
798
- - Documents default values
799
- - Tracks data origin (previous step, user, config)
800
-
801
- **Saída (Output):**
802
- - Defines all outputs produced
803
- - Specifies destination (next step, state, file)
804
- - Indicates persistence (temporary or permanent)
805
- - Enables caching when appropriate
806
-
807
- **Checklist:**
808
- - **Pre-conditions:** Validated BEFORE execution (blocking)
809
- - **Post-conditions:** Validated AFTER execution (quality gates)
810
- - **Acceptance Criteria:** Manual verification steps
811
-
812
- **Performance:**
813
- - Expected duration for tracking
814
- - Cost estimation (for AI executors)
815
- - Cacheability for optimization
816
- - Parallelizability for concurrency
817
-
818
- **Error Handling:**
819
- - Strategy: retry, fallback, or abort
820
- - Retry configuration with backoff
821
- - Fallback values or alternative flows
822
- - Notification mechanisms
823
-
824
- ---
825
-
826
- ## Execution Modes
827
-
828
- ### The Three Execution Modes
829
-
830
- Every task supports three execution modes to balance automation, education, and control:
831
-
832
- #### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
833
-
834
- **Characteristics:**
835
- - ✅ Autonomous decision making
836
- - ✅ All decisions logged to `.ai/decision-log-{task-id}.md`
837
- - ✅ Minimal user interaction
838
- - ✅ Fast execution
839
-
840
- **Best For:**
841
- - Experienced developers
842
- - Simple, well-defined tasks
843
- - Time-sensitive work
844
- - Repetitive operations
845
-
846
- **Example:**
847
- ```yaml
848
- mode: yolo
849
- ```
850
-
851
- **Decision Logging:**
852
- ```markdown
853
- ## Decision: Use TypeScript for API layer
854
- **Context:** Need to define type-safe API contracts
855
- **Options:** [TypeScript, JavaScript with JSDoc]
856
- **Selected:** TypeScript
857
- **Rationale:** Better IDE support and compile-time checks
858
- **Timestamp:** 2025-01-18T14:30:00Z
859
- ```
860
-
861
- ---
862
-
863
- #### 2. Interactive Mode - Balanced, Educational (5-10 prompts) **[DEFAULT]**
864
-
865
- **Characteristics:**
866
- - ✅ Explicit decision checkpoints
867
- - ✅ Educational explanations
868
- - ✅ Collaborative decision making
869
- - ✅ Context preservation
870
-
871
- **Best For:**
872
- - Learning new patterns
873
- - Complex decisions
874
- - Collaborative work
875
- - Code reviews
876
-
877
- **Example:**
878
- ```yaml
879
- mode: interactive
880
- ```
881
-
882
- **Checkpoint Example:**
883
- ```markdown
884
- 🤔 **Decision Point:** Database Technology Selection
885
-
886
- **Options:**
887
- 1. PostgreSQL (Relational, ACID, complex queries)
888
- 2. MongoDB (Document, flexible schema, horizontal scaling)
889
- 3. Supabase (PostgreSQL + Auth + Storage + Realtime)
890
-
891
- **Recommendation:** Supabase (Option 3)
892
- **Rationale:** Provides PostgreSQL + auth + storage out-of-box
893
-
894
- **Your choice?** (1-3 or 'explain')
895
- ```
896
-
897
- ---
898
-
899
- #### 3. Pre-Flight Planning - Comprehensive Upfront (1 questionnaire)
900
-
901
- **Characteristics:**
902
- - ✅ Task analysis phase (identify ambiguities)
903
- - ✅ Comprehensive questionnaire
904
- - ✅ Zero ambiguity execution
905
- - ✅ Plan approval before work
906
-
907
- **Best For:**
908
- - Ambiguous requirements
909
- - Critical work (production, security)
910
- - Team consensus needed
911
- - Large-scale changes
912
-
913
- **Example:**
914
- ```yaml
915
- mode: preflight
916
- ```
917
-
918
- **Pre-Flight Questionnaire:**
919
- ```markdown
920
- 📋 **Pre-Flight Planning: Implement User Authentication**
921
-
922
- **Identified Ambiguities:**
923
- 1. Authentication Method: Social login or email/password?
924
- 2. Session Management: JWT or session cookies?
925
- 3. Password Requirements: Complexity rules?
926
- 4. MFA Support: Required or optional?
927
- 5. User Roles: RBAC or simple user types?
928
-
929
- **Please Answer:**
930
- [... comprehensive questionnaire ...]
931
-
932
- **Execution Plan:**
933
- [... generated after questionnaire ...]
934
-
935
- **Approve plan?** (yes/no/modify)
936
- ```
937
-
938
- ---
939
-
940
- ### Mode Selection Guidelines
941
-
942
- | Scenario | YOLO | Interactive | Pre-Flight |
943
- |----------|------|-------------|------------|
944
- | **Simple CRUD** | ✅ Perfect | ⚠️ Overkill | ❌ Too much |
945
- | **Learning new tech** | ❌ Miss details | ✅ Perfect | ⚠️ Good |
946
- | **Security feature** | ❌ Risky | ⚠️ Good | ✅ Perfect |
947
- | **Time pressure** | ✅ Perfect | ⚠️ Slower | ❌ Slow |
948
- | **Team project** | ❌ Solo | ⚠️ Good | ✅ Perfect |
949
- | **Experimental** | ✅ Perfect | ✅ Good | ❌ Overhead |
950
-
951
- ---
952
-
953
- ## Workflow Orchestration
954
-
955
- ### Workflow Types
956
-
957
- AIOS supports multiple workflow patterns:
958
-
959
- 1. **Sequential** - Tasks execute one after another
960
- 2. **Fork/Join** - Parallel execution with synchronization
961
- 3. **Organizer-Worker** - Dynamic work distribution
962
- 4. **Conditional** - Branch based on conditions
963
- 5. **Loop** - Repeat until condition met
964
-
965
- ### Workflow Definition Format
966
-
967
- ```yaml
968
- workflow:
969
- id: {workflow-id}
970
- name: {WorkflowName}
971
- version: {X.Y.Z}
972
- type: {sequential|fork-join|organizer-worker|conditional|loop}
973
-
974
- steps:
975
- - id: step-1
976
- task: {task-name}
977
- agent: {agent-id}
978
- dependencies: []
979
- condition: {optional}
980
-
981
- - id: step-2
982
- task: {task-name}
983
- agent: {agent-id}
984
- dependencies: [step-1]
985
-
986
- - id: step-3
987
- type: fork
988
- branches:
989
- - id: branch-a
990
- steps: [...]
991
- - id: branch-b
992
- steps: [...]
993
- join: step-4
994
-
995
- - id: step-4
996
- type: join
997
- merge_strategy: {combine|first|last|custom}
998
- ```
999
-
1000
- ### Built-in Workflows
1001
-
1002
- **Greenfield Workflows:**
1003
- - `greenfield-fullstack.yaml` - Complete full-stack project
1004
- - `greenfield-service.yaml` - Backend service only
1005
- - `greenfield-ui.yaml` - Frontend UI only
1006
-
1007
- **Brownfield Workflows:**
1008
- - `brownfield-fullstack.yaml` - Add features to existing full-stack
1009
- - `brownfield-service.yaml` - Extend existing backend
1010
- - `brownfield-ui.yaml` - Enhance existing frontend
1011
-
1012
- ---
1013
-
1014
- ## Fork/Join & Organizer-Worker Patterns
1015
-
1016
- ### Fork/Join Pattern (Story 6.1.12)
1017
-
1018
- **Purpose:** Execute tasks in parallel and synchronize results
1019
-
1020
- **Use Cases:**
1021
- - Parallel test execution
1022
- - Multi-agent analysis
1023
- - Concurrent API calls
1024
- - Independent component building
1025
-
1026
- **Example:**
1027
-
1028
- ```yaml
1029
- - id: analyze-architecture
1030
- type: fork
1031
- branches:
1032
- - id: frontend-analysis
1033
- agent: architect
1034
- task: analyze-frontend-architecture
1035
-
1036
- - id: backend-analysis
1037
- agent: architect
1038
- task: analyze-backend-architecture
1039
-
1040
- - id: database-analysis
1041
- agent: db-sage
1042
- task: analyze-database-schema
1043
-
1044
- join: merge-analysis
1045
- merge_strategy: combine_reports
1046
-
1047
- - id: merge-analysis
1048
- type: join
1049
- task: consolidate-architecture-report
1050
- agent: architect
1051
- ```
1052
-
1053
- **Merge Strategies:**
1054
- - `combine` - Combine all results
1055
- - `first` - Use first completed result
1056
- - `last` - Use last completed result
1057
- - `custom` - Custom merge function
1058
-
1059
- ---
1060
-
1061
- ### Organizer-Worker Pattern (Story 6.1.13)
1062
-
1063
- **Purpose:** Intelligent work distribution across agents
1064
-
1065
- **Use Cases:**
1066
- - Dynamic task distribution
1067
- - Load balancing
1068
- - Skill-based assignment
1069
- - Scalable multi-agent coordination
1070
-
1071
- **Pattern Structure:**
1072
-
1073
- ```
1074
- ┌─────────────────────────────────────┐
1075
- │ Organizer Agent │
1076
- │ (aios-master) │
1077
- │ - Receives work │
1078
- │ - Distributes to workers │
1079
- │ - Collects results │
1080
- │ - Merges outputs │
1081
- └─────────────────────────────────────┘
1082
- ↓ ↓ ↓
1083
- ┌──────────┐ ┌──────────┐ ┌──────────┐
1084
- │ Worker 1 │ │ Worker 2 │ │ Worker 3 │
1085
- │ (dev) │ │ (dev) │ │ (qa) │
1086
- └──────────┘ └──────────┘ └──────────┘
1087
- ```
1088
-
1089
- **Agent Role Extension:**
1090
-
1091
- ```yaml
1092
- # Organizer Agent
1093
- agent:
1094
- id: aios-master
1095
- role: organizer # NEW: organizer role
1096
- can_distribute_work: true
1097
-
1098
- # Worker Agents
1099
- agent:
1100
- id: dev
1101
- role: worker # NEW: worker role (default)
1102
- skills: [coding, testing]
1103
- ```
1104
-
1105
- **Distribution Strategies:**
1106
-
1107
- 1. **Round Robin** - Distribute evenly
1108
- ```yaml
1109
- distribution_strategy: round_robin
1110
- ```
1111
-
1112
- 2. **Load Balanced** - Consider current workload
1113
- ```yaml
1114
- distribution_strategy: load_balanced
1115
- max_concurrent_tasks: 3
1116
- ```
1117
-
1118
- 3. **Skill Based** - Match skills to requirements
1119
- ```yaml
1120
- distribution_strategy: skill_based
1121
- required_skills: [coding, frontend]
1122
- ```
1123
-
1124
- **Example Workflow:**
1125
-
1126
- ```yaml
1127
- - id: implement-features
1128
- type: organizer-worker
1129
- organizer: aios-master
1130
- workers: [dev-1, dev-2, dev-3]
1131
- distribution_strategy: skill_based
1132
-
1133
- work_items:
1134
- - feature: user-authentication
1135
- required_skills: [backend, security]
1136
- - feature: dashboard-ui
1137
- required_skills: [frontend, react]
1138
- - feature: data-pipeline
1139
- required_skills: [data, etl]
1140
-
1141
- merge_strategy: combine
1142
- failure_strategy: reassign
1143
- ```
1144
-
1145
- ---
1146
-
1147
- # Part V: Executor Types
1148
-
1149
- ## The Four Executor Types
1150
-
1151
- ### 1. Agente (AI-Powered Execution)
1152
-
1153
- **Definition:** AI agent using Large Language Models for creative/analytical tasks
1154
-
1155
- **When to Use:**
1156
- - ✅ Requires creativity or subjective judgment
1157
- - ✅ Natural language understanding/generation
1158
- - ✅ Contextual analysis
1159
- - ✅ No deterministic algorithm
1160
-
1161
- **Examples:**
1162
- - Analyze requirements and extract insights
1163
- - Generate code from specifications
1164
- - Design system architecture
1165
- - Review code for quality
1166
- - Create documentation
1167
-
1168
- **Characteristics:**
1169
- - **Cost:** $$$$ High ($0.001 - $0.01 per execution)
1170
- - **Speed:** Slow (3-10 seconds)
1171
- - **Deterministic:** ❌ No (stochastic outputs)
1172
-
1173
- ---
1174
-
1175
- ### 2. Worker (Script-Based Execution)
1176
-
1177
- **Definition:** Deterministic script/function with predefined logic
1178
-
1179
- **When to Use:**
1180
- - ✅ Deterministic (same input → same output)
1181
- - ✅ Data transformation or validation
1182
- - ✅ File/database operations
1183
- - ✅ External API calls (no AI)
1184
-
1185
- **Examples:**
1186
- - Load configuration from JSON
1187
- - Validate HTML structure
1188
- - Export PNG from HTML
1189
- - Calculate metrics
1190
- - Run migrations
1191
-
1192
- **Characteristics:**
1193
- - **Cost:** $ Low ($0 - $0.001 per execution)
1194
- - **Speed:** Fast (< 1 second)
1195
- - **Deterministic:** ✅ Yes (repeatable)
1196
-
1197
- ---
1198
-
1199
- ### 3. Humano (Manual Human Execution)
1200
-
1201
- **Definition:** Human operator for subjective judgment or approval
1202
-
1203
- **When to Use:**
1204
- - ✅ Requires human subjective judgment
1205
- - ✅ Quality gate or approval step
1206
- - ✅ Sensitive decisions
1207
- - ✅ Cannot be automated (yet)
1208
-
1209
- **Examples:**
1210
- - Review and approve/reject work
1211
- - Make strategic decisions
1212
- - Handle edge cases
1213
- - Provide creative direction
1214
- - Security review
1215
-
1216
- **Characteristics:**
1217
- - **Cost:** $$$ Medium ($5 - $50 per execution)
1218
- - **Speed:** Very Slow (minutes to hours)
1219
- - **Deterministic:** ❌ No (subjective)
1220
-
1221
- ---
1222
-
1223
- ### 4. Clone (Mind Emulation with Heuristics)
1224
-
1225
- **Definition:** AI agent with personality heuristics and domain axioms
1226
-
1227
- **When to Use:**
1228
- - ✅ Requires specific domain expertise
1229
- - ✅ Must follow specific methodology
1230
- - ✅ Needs validation against established principles
1231
- - ✅ Benefits from "personality-driven" execution
1232
-
1233
- **Examples:**
1234
- - Validate components (Atomic Design - Brad Frost)
1235
- - Review copy (Alex Hormozi methodology)
1236
- - Evaluate design consistency
1237
- - Apply mental models
1238
-
1239
- **Characteristics:**
1240
- - **Cost:** $$$$ High ($0.002 - $0.015 per execution)
1241
- - **Speed:** Slow (5-15 seconds)
1242
- - **Deterministic:** ⚠️ Partial (heuristics guide AI)
1243
-
1244
- ---
1245
-
1246
- ## Executor Decision Tree
1247
-
1248
- ### Decision Flow
1249
-
1250
- ```
1251
- Task to Execute
1252
-
1253
- Requires Creativity/Subjectivity?
1254
- ├─ NO → Deterministic Algorithm Exists?
1255
- │ ├─ YES → Worker (script)
1256
- │ └─ NO → Requires Human Judgment?
1257
- │ ├─ YES → Critical Decision?
1258
- │ │ ├─ YES → Humano
1259
- │ │ └─ NO → Specific Methodology?
1260
- │ │ ├─ YES → Clone
1261
- │ │ └─ NO → Agente
1262
- │ └─ NO → Agente
1263
- └─ YES → Requires Human Judgment?
1264
- ├─ YES → Critical Decision?
1265
- │ ├─ YES → Humano
1266
- │ └─ NO → Specific Methodology?
1267
- │ ├─ YES → Clone
1268
- │ └─ NO → Agente
1269
- └─ NO → Specific Methodology?
1270
- ├─ YES → Clone
1271
- └─ NO → Agente
1272
- ```
1273
-
1274
- ### Decision Criteria
1275
-
1276
- | Criterion | Worker | Agente | Humano | Clone |
1277
- |-----------|--------|--------|--------|-------|
1278
- | **Creativity Required** | ❌ | ✅ | ✅ | ✅ |
1279
- | **Deterministic** | ✅ | ❌ | ❌ | ⚠️ |
1280
- | **Cost** | $ | $$$$ | $$$ | $$$$ |
1281
- | **Speed** | Fast | Slow | Very Slow | Slow |
1282
- | **Human Judgment** | ❌ | ❌ | ✅ | ❌ |
1283
- | **Methodology** | ❌ | ❌ | ⚠️ | ✅ |
1284
-
1285
- ---
1286
-
1287
- # Part VI: Standards & Best Practices
1288
-
1289
- ## Coding Standards
1290
-
1291
- ### JavaScript/TypeScript Standards
1292
-
1293
- **Naming Conventions:**
1294
- - `camelCase` for variables, functions, methods
1295
- - `PascalCase` for classes, components, interfaces
1296
- - `UPPER_CASE` for constants
1297
- - `kebab-case` for file names
1298
-
1299
- **Code Structure:**
1300
- ```javascript
1301
- // ✅ GOOD
1302
- const userProfile = {
1303
- firstName: 'John',
1304
- lastName: 'Doe',
1305
- isActive: true
1306
- };
1307
-
1308
- // ❌ BAD
1309
- const user_profile = {
1310
- first_name: 'John',
1311
- last_name: 'Doe',
1312
- is_active: true
1313
- };
1314
- ```
1315
-
1316
- **Function Design:**
1317
- - Keep functions small (<50 lines)
1318
- - Single responsibility
1319
- - Pure functions when possible
1320
- - Document with JSDoc
1321
-
1322
- **Error Handling:**
1323
- ```javascript
1324
- // ✅ GOOD
1325
- try {
1326
- const result = await operation();
1327
- return { success: true, data: result };
1328
- } catch (error) {
1329
- logger.error('Operation failed:', error);
1330
- return { success: false, error: error.message };
1331
- }
1332
-
1333
- // ❌ BAD
1334
- const result = await operation(); // No error handling
1335
- ```
1336
-
1337
- ---
1338
-
1339
- ### CSS Standards
1340
-
1341
- **Naming Convention:** `kebab-case`
1342
-
1343
- ```css
1344
- /* ✅ GOOD */
1345
- .content-area {
1346
- padding: var(--spacing-md);
1347
- }
1348
-
1349
- --spacing-md: 200px;
1350
- --color-primary: #007bff;
1351
-
1352
- /* ❌ BAD */
1353
- .contentArea {
1354
- padding: var(--spacing_md);
1355
- }
1356
- ```
1357
-
1358
- **CSS Organization:**
1359
- 1. Layout properties
1360
- 2. Box model properties
1361
- 3. Visual properties
1362
- 4. Typography
1363
- 5. Misc
1364
-
1365
- ---
1366
-
1367
- ### Database Standards
1368
-
1369
- **Naming Convention:** `snake_case`
1370
-
1371
- ```sql
1372
- -- ✅ GOOD
1373
- CREATE TABLE workflow_executions (
1374
- execution_id UUID PRIMARY KEY,
1375
- workflow_id UUID NOT NULL,
1376
- started_at TIMESTAMP,
1377
- completed_at TIMESTAMP,
1378
- status VARCHAR(20)
1379
- );
1380
-
1381
- -- ❌ BAD
1382
- CREATE TABLE workflowExecutions (
1383
- executionId UUID PRIMARY KEY,
1384
- workflowId UUID NOT NULL,
1385
- startedAt TIMESTAMP
1386
- );
1387
- ```
1388
-
1389
- ---
1390
-
1391
- ## Technology Stack
1392
-
1393
- ### Frontend Stack
1394
-
1395
- **Core:**
1396
- - **Framework:** Next.js 14 (App Router)
1397
- - **UI Library:** React 18
1398
- - **Language:** TypeScript 5
1399
- - **Styling:** Tailwind CSS 3
1400
-
1401
- **State Management:**
1402
- - **Global:** Zustand or React Context
1403
- - **Server:** React Server Components
1404
- - **Forms:** React Hook Form + Zod
1405
-
1406
- **UI Components:**
1407
- - **Library:** shadcn/ui (Radix UI)
1408
- - **Icons:** Lucide React
1409
- - **Animations:** Framer Motion
1410
-
1411
- ---
1412
-
1413
- ### Backend Stack
1414
-
1415
- **Core:**
1416
- - **Framework:** NestJS
1417
- - **Language:** TypeScript 5
1418
- - **Runtime:** Node.js 18+ (LTS)
1419
-
1420
- **Database:**
1421
- - **Primary:** Supabase (PostgreSQL)
1422
- - **ORM:** Prisma or TypeORM
1423
- - **Migrations:** Prisma Migrate
1424
-
1425
- **Authentication:**
1426
- - **Provider:** Supabase Auth
1427
- - **Strategy:** JWT + Row Level Security (RLS)
1428
-
1429
- **API:**
1430
- - **Type:** REST + tRPC (type-safe)
1431
- - **Validation:** Zod
1432
- - **Documentation:** OpenAPI/Swagger
1433
-
1434
- ---
1435
-
1436
- ### DevOps & Infrastructure
1437
-
1438
- **Version Control:**
1439
- - **Platform:** GitHub
1440
- - **Workflow:** Feature branches + PRs
1441
- - **CI/CD:** GitHub Actions
1442
-
1443
- **Deployment:**
1444
- - **Platform:** Railway (recommended) or Vercel
1445
- - **Strategy:** Zero-downtime deployment
1446
- - **Environments:** dev, staging, production
1447
-
1448
- **Monitoring:**
1449
- - **Logs:** Structured logging (Winston/Pino)
1450
- - **Metrics:** Custom dashboards
1451
- - **Errors:** Error tracking service
1452
-
1453
- ---
1454
-
1455
- ## Quality Gates & CodeRabbit Integration
1456
-
1457
- ### CodeRabbit Quality Gates
1458
-
1459
- AIOS uses **CodeRabbit** for automated code review at three key checkpoints:
1460
-
1461
- #### 1. Pre-Commit Gate (@dev)
1462
-
1463
- **When:** Before committing code
1464
- **Command:** `*code-review uncommitted`
1465
-
1466
- **Focus:**
1467
- - Syntax errors
1468
- - Basic code quality
1469
- - Linting violations
1470
- - Obvious bugs
1471
-
1472
- **Action:** Fix CRITICAL issues before committing
1473
-
1474
- ---
1475
-
1476
- #### 2. Mid-Point Review (@dev + @qa)
1477
-
1478
- **When:** During story implementation
1479
- **Command:** `*code-review --base main`
1480
-
1481
- **Focus:**
1482
- - Architecture patterns
1483
- - Error handling
1484
- - Performance issues
1485
- - Integration points
1486
-
1487
- **Action:** Address HIGH and CRITICAL issues
1488
-
1489
- ---
1490
-
1491
- #### 3. Pre-PR Gate (@dev + @qa)
1492
-
1493
- **When:** Before creating PR
1494
- **Command:** `*code-review --base main --full`
1495
-
1496
- **Focus:**
1497
- - Complete code quality
1498
- - Test coverage
1499
- - Documentation
1500
- - Backward compatibility
1501
- - Security vulnerabilities
1502
-
1503
- **Action:** Resolve ALL CRITICAL, address HIGH issues
1504
-
1505
- ---
1506
-
1507
- ### Severity Levels
1508
-
1509
- | Severity | Action | Examples |
1510
- |----------|--------|----------|
1511
- | **CRITICAL** | ❌ Block | Security vulnerabilities, data loss risks |
1512
- | **HIGH** | ⚠️ Fix before PR | Performance issues, error handling gaps |
1513
- | **MEDIUM** | 📋 Document as debt | Code maintainability, design patterns |
1514
- | **LOW** | ℹ️ Optional | Style inconsistencies, minor optimizations |
1515
-
1516
- ---
1517
-
1518
- ### Story-Specific Integration
1519
-
1520
- Each story includes CodeRabbit integration:
1521
-
1522
- ```yaml
1523
- # CodeRabbit Integration
1524
- story_type: [Feature|Bug|Refactor|Architecture]
1525
- specialized_agents: [@dev, @qa, @architect]
1526
-
1527
- quality_gates:
1528
- pre_commit: Focus on syntax and basic quality
1529
- mid_point: Focus on architecture and integration
1530
- pre_pr: Comprehensive review before merge
1531
-
1532
- focus_areas:
1533
- - Error Handling: Check all error paths
1534
- - Performance: Validate response times
1535
- - Security: Check for vulnerabilities
1536
- - Integration: Validate API contracts
1537
- ```
1538
-
1539
- ---
1540
-
1541
- # Part VII: Migration & Roadmap
1542
-
1543
- ## Current Migration Status
1544
-
1545
- ### Epic 6.1: Agent Identity System (In Progress)
1546
-
1547
- **Objective:** Modernize agent system with personality, unified greeting, and improved structure
1548
-
1549
- **Waves:**
1550
-
1551
- **Wave 1 - Foundation (In Progress):**
1552
- - ✅ Story 6.1.1: Agent Personalization Implementation
1553
- - ✅ Story 6.1.2: Persona Profile Integration
1554
- - ✅ Story 6.1.3: Greeting Levels Implementation
1555
- - ✅ Story 6.1.4: Unified Greeting System Integration
1556
- - ⏸️ Story 6.1.4.1: Fix Remaining Agent YAML Issues (Approved)
1557
- - ✅ Story 6.1.5: Output Formatter Implementation
1558
- - ✅ Story 6.1.6: Output Formatter Testing
1559
- - ✅ Story 6.1.7: Core Tasks Migration
1560
- - ✅ Story 6.1.8: Templates Migration
1561
- - ✅ Story 6.1.9: Checklists Migration
1562
- - 📋 Story 6.1.10: Dependencies & Data Files Migration (Ready)
1563
- - 📋 Story 6.1.11: AIOS-Master Tasks Creation (Ready)
1564
- - 📋 Story 6.1.12: Fork/Join Workflow Operations (Ready)
1565
- - 📋 Story 6.1.13: Organizer-Worker Pattern (Ready)
1566
-
1567
- **Wave 2 - Enhancement (Pending):**
1568
- - ❌ Story 6.1.14: Expansion Pack Framework (REJECTED - Architecture conflict)
1569
- - ❌ Story 6.1.14.1-3: Expansion Pack Extraction (REJECTED - Architecture conflict)
1570
- - 📋 Story 6.1.15: Subdirectory Architecture Validation (PROPOSED)
1571
- - 📋 Story 6.1.16-21: Subdirectory Migration (PROPOSED - if 6.1.15 succeeds)
1572
-
1573
- ---
1574
-
1575
- ## Future Architecture (Q2 2026)
1576
-
1577
- ### Repository Restructuring (Decision 005)
1578
-
1579
- **Current State:**
1580
- ```
1581
- aios-fullstack/
1582
- ├── .aios-core/ # Framework embedded in project
1583
- ├── frontend/
1584
- ├── backend/
1585
- └── docs/
1586
- ```
1587
-
1588
- **Future State (Q2 2026):**
1589
- ```
1590
- aios/
1591
- ├── aios-core/ # Framework repository (standalone)
1592
- │ ├── agents/
1593
- │ ├── tasks/
1594
- │ ├── templates/
1595
- │ └── ...
1596
-
1597
- └── aios-fullstack/ # Project repository
1598
- ├── frontend/
1599
- ├── backend/
1600
- └── .aios/ # Framework reference (git submodule)
1601
- ```
1602
-
1603
- **Benefits:**
1604
- - ✅ Framework versioning independent of project
1605
- - ✅ Easier framework updates
1606
- - ✅ Cleaner project structure
1607
- - ✅ Multiple projects share same framework
1608
-
1609
- **Migration Timeline:**
1610
- - **Q1 2026:** Prepare for separation
1611
- - **Q2 2026:** Execute repository split
1612
- - **Q3 2026:** Complete migration
1613
-
1614
- ---
1615
-
1616
- ## Subdirectory Migration Plan
1617
-
1618
- ### The Challenge (Story 6.1.15+)
1619
-
1620
- **Current Structure:** Flat files in `.aios-core/{type}/`
1621
- ```
1622
- .aios-core/
1623
- ├── tasks/
1624
- │ ├── create-doc.md
1625
- │ ├── develop-story.md
1626
- │ ├── generate-tests.md
1627
- │ └── ... (60+ files)
1628
- ```
1629
-
1630
- **Proposed Structure:** Organized subdirectories
1631
- ```
1632
- .aios-core/
1633
- ├── tasks/
1634
- │ ├── documentation/
1635
- │ │ ├── create-doc.md
1636
- │ │ └── document-project.md
1637
- │ ├── development/
1638
- │ │ ├── develop-story.md
1639
- │ │ └── apply-qa-fixes.md
1640
- │ └── testing/
1641
- │ ├── generate-tests.md
1642
- │ └── nfr-assess.md
1643
- ```
1644
-
1645
- ---
1646
-
1647
- ### Migration Phases
1648
-
1649
- **Phase 0: Validation (Story 6.1.15)**
1650
- - Duration: 2-3 days
1651
- - Investment: $100-150
1652
- - Goal: Test subdirectory architecture works
1653
- - Deliverable: GO/NO-GO decision
1654
-
1655
- **Phase 1: Core Infrastructure (Story 6.1.16)**
1656
- - Duration: 1.5 days
1657
- - Investment: $75
1658
- - Goal: Update file resolution logic
1659
- - Deliverable: Scripts support subdirectories
1660
-
1661
- **Phase 2: File Migration (Stories 6.1.17-19)**
1662
- - Duration: 10-15 days
1663
- - Investment: $500-750
1664
- - Goal: Move files to subdirectories
1665
- - Deliverable: Organized framework structure
1666
-
1667
- **Phase 3: Reference Updates (Story 6.1.20)**
1668
- - Duration: 1 day
1669
- - Investment: $50
1670
- - Goal: Update all agent references
1671
- - Deliverable: All references correct
1672
-
1673
- **Phase 4: Cleanup (Story 6.1.21)**
1674
- - Duration: 0.5 day
1675
- - Investment: $25
1676
- - Goal: Remove backward compatibility
1677
- - Deliverable: Optimized system
1678
-
1679
- **Total Effort:** 15-21 days, $750-1,050
1680
-
1681
- ---
1682
-
1683
- ### Proposed Subdirectory Organization
1684
-
1685
- **data/ subdirectories:**
1686
- ```
1687
- data/
1688
- ├── agile/ # Agile/Scrum knowledge
1689
- ├── architecture/ # Architecture patterns
1690
- ├── design-systems/ # UX/Design frameworks
1691
- ├── database/ # Database knowledge
1692
- ├── infrastructure/ # DevOps/Infrastructure
1693
- ├── quality/ # Testing/QA knowledge
1694
- └── technical/ # Technical standards
1695
- ```
1696
-
1697
- **tasks/ subdirectories:**
1698
- ```
1699
- tasks/
1700
- ├── agile/ # Story management
1701
- ├── architecture/ # Architecture tasks
1702
- ├── database/ # Database tasks
1703
- ├── data-engineering/ # Data engineering
1704
- ├── development/ # Development tasks
1705
- ├── devops/ # DevOps tasks
1706
- ├── documentation/ # Documentation tasks
1707
- ├── quality/ # QA tasks
1708
- ├── research/ # Research/Analysis
1709
- ├── ux-design/ # UX/Design tasks
1710
- └── framework/ # Framework management
1711
- ```
1712
-
1713
- **templates/ subdirectories:**
1714
- ```
1715
- templates/
1716
- ├── agile/ # Story, epic templates
1717
- ├── architecture/ # Architecture templates
1718
- ├── database/ # Database templates
1719
- ├── infrastructure/ # Infrastructure templates
1720
- ├── product/ # PRD, brief templates
1721
- └── ux-design/ # Design templates
1722
- ```
1723
-
1724
- ---
1725
-
1726
- ### Risk Mitigation
1727
-
1728
- **Risks:**
1729
- 1. ❌ Breaking agent loading
1730
- 2. ❌ Performance degradation
1731
- 3. ❌ Incomplete migration
1732
- 4. ❌ Script path resolution failures
1733
-
1734
- **Mitigations:**
1735
- 1. ✅ Test in isolated environment first (Phase 0)
1736
- 2. ✅ Benchmark performance during validation
1737
- 3. ✅ Automated migration scripts + validation
1738
- 4. ✅ Comprehensive script audit (Phase 1)
1739
- 5. ✅ Backward compatibility during migration
1740
- 6. ✅ Git-based rollback strategy
1741
-
1742
- ---
1743
-
1744
- # Part VIII: Appendices
1745
-
1746
- ## Glossary
1747
-
1748
- ### Core Concepts
1749
-
1750
- **AIOS:** AI Operating System - Framework for orchestrating AI agents and workflows
1751
-
1752
- **Agent:** AI-powered executor with personality, specialized role, and commands
1753
-
1754
- **Task:** Executable workflow with inputs, outputs, validation, and error handling
1755
-
1756
- **Workflow:** Multi-step orchestration coordinating multiple agents/tasks
1757
-
1758
- **Executor:** Entity that executes tasks (Agente, Worker, Humano, Clone)
1759
-
1760
- **Archetype:** Personality template (Builder, Guardian, Balancer, etc.)
1761
-
1762
- **Persona Profile:** Agent personality configuration (communication, vocabulary, greetings)
1763
-
1764
- **Greeting System:** Contextual agent activation with status, context, and commands
1765
-
1766
- **Quality Gate:** Validation checkpoint using CodeRabbit or manual review
1767
-
1768
- **Fork/Join:** Parallel execution pattern with synchronization
1769
-
1770
- **Organizer-Worker:** Dynamic work distribution pattern
1771
-
1772
- **Execution Mode:** YOLO (autonomous), Interactive (balanced), Pre-Flight (comprehensive)
1773
-
1774
- ---
1775
-
1776
- ### File Types
1777
-
1778
- **Agent Definition (.md):** Agent personality, role, commands, dependencies
1779
-
1780
- **Task Definition (.md):** Executable workflow with YAML specification
1781
-
1782
- **Template (.yaml/.md):** Document generator with variables and structure
1783
-
1784
- **Workflow (.yaml):** Multi-agent orchestration definition
1785
-
1786
- **Checklist (.md):** Validation process with checkboxes
1787
-
1788
- **Data/KB (.md/.yaml):** Knowledge base, reference material
1789
-
1790
- **Script (.js):** Utility, automation, or tool
1791
-
1792
- **Config (.yaml):** Configuration file
1793
-
1794
- ---
1795
-
1796
- ### Patterns
1797
-
1798
- **MCP (Model Context Protocol):** Integration protocol for external tools
1799
-
1800
- **RLS (Row Level Security):** Database security at row level
1801
-
1802
- **RBAC (Role-Based Access Control):** Permission system
1803
-
1804
- **JWT (JSON Web Token):** Authentication token standard
1805
-
1806
- **ETL (Extract, Transform, Load):** Data pipeline pattern
1807
-
1808
- **CRUD (Create, Read, Update, Delete):** Basic operations
1809
-
1810
- **CI/CD (Continuous Integration/Deployment):** Automation pipeline
1811
-
1812
- **PRD (Product Requirements Document):** Product specification
1813
-
1814
- **NFR (Non-Functional Requirements):** Quality attributes
1815
-
1816
- ---
1817
-
1818
- ## Decision History
1819
-
1820
- ### Major Architectural Decisions
1821
-
1822
- **Decision 001:** Agent Personalization Standard (2025-01-14)
1823
- - **Status:** Implemented
1824
- - **Decision:** Three-layer personality system (persona → formatter → output)
1825
- - **Rationale:** Familiaridade + Personalização = Produtividade
1826
-
1827
- **Decision 002:** Unified Greeting System (2025-01-16)
1828
- - **Status:** Implemented
1829
- - **Decision:** Single greeting generator for all agents
1830
- - **Rationale:** Consistency, performance, maintainability
1831
-
1832
- **Decision 003:** Task Format v2.0 (2025-11-13)
1833
- - **Status:** Implemented
1834
- - **Decision:** Universal task specification with execution modes
1835
- - **Rationale:** Scalability, reusability, clarity
1836
-
1837
- **Decision 004:** Open Source vs Service (2025-01-14)
1838
- - **Status:** Defined
1839
- - **Decision:** Open-source = Agente-only, Service = All executors
1840
- - **Rationale:** Community vs commercial differentiation
1841
-
1842
- **Decision 005:** Repository Restructuring (2025-01-15)
1843
- - **Status:** Planned (Q2 2026)
1844
- - **Decision:** Split framework and project repositories
1845
- - **Rationale:** Independent versioning, cleaner structure
1846
-
1847
- **Decision 006:** Subdirectory Migration (2025-01-18)
1848
- - **Status:** Approved (Pending validation)
1849
- - **Decision:** Organize framework files in domain subdirectories
1850
- - **Rationale:** Scalability, better organization, expansion packs support
1851
-
1852
- **Decision 007:** Expansion Pack Architecture (2025-01-18)
1853
- - **Status:** REJECTED (Conflict with AIOS principles)
1854
- - **Decision:** NO new directory types (methodologies/, patterns/)
1855
- - **Rationale:** Violates 7-type framework structure
1856
- - **Alternative:** Use subdirectories in existing types (data/, tasks/, templates/)
1857
-
1858
- ---
1859
-
1860
- ## References
1861
-
1862
- ### Internal Documentation
1863
-
1864
- - **Framework Structure:** `docs/architecture/source-tree.md`
1865
- - **Coding Standards:** `docs/framework/coding-standards.md`
1866
- - **Technology Stack:** `docs/framework/tech-stack.md`
1867
- - **Agent Standard:** `.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md`
1868
- - **Task Format:** `.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md`
1869
- - **Executor Tree:** `.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md`
1870
- - **Architectural Decisions:** `.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md`
1871
- - **Repository Restructuring:** `docs/decisions/decision-005-repository-restructuring-FINAL.md`
1872
-
1873
- ### Implementation Stories
1874
-
1875
- - **Story 6.1.4:** Unified Greeting System Integration
1876
- - **Story 6.1.10:** Dependencies & Data Files Migration
1877
- - **Story 6.1.11:** AIOS-Master Tasks Creation
1878
- - **Story 6.1.12:** Fork/Join Workflow Operations
1879
- - **Story 6.1.13:** Organizer-Worker Pattern Implementation
1880
-
1881
- ### External Resources
1882
-
1883
- - **Atomic Design:** Brad Frost's methodology
1884
- - **Twelve-Factor App:** Methodology for SaaS applications
1885
- - **MCP Protocol:** Model Context Protocol specification
1886
- - **Supabase Docs:** https://supabase.com/docs
1887
- - **Next.js Docs:** https://nextjs.org/docs
1888
- - **NestJS Docs:** https://docs.nestjs.com
1889
-
1890
- ---
1891
-
1892
- ## Contributing
1893
-
1894
- ### How to Contribute
1895
-
1896
- 1. **Read this document** - Understand AIOS principles
1897
- 2. **Choose an area** - Framework, agents, tasks, workflows
1898
- 3. **Follow standards** - Coding standards, naming conventions
1899
- 4. **Test thoroughly** - Unit tests, integration tests
1900
- 5. **Document changes** - Update relevant docs
1901
- 6. **Submit PR** - Follow PR template
1902
-
1903
- ### PR Template
1904
-
1905
- ```markdown
1906
- ## Story Reference
1907
- [Story 6.1.X] {Story Title}
1908
-
1909
- ## Changes
1910
- - [ ] Agent definitions updated
1911
- - [ ] Task files created/modified
1912
- - [ ] Templates added/changed
1913
- - [ ] Tests added
1914
- - [ ] Documentation updated
1915
-
1916
- ## Testing
1917
- - [ ] Unit tests pass
1918
- - [ ] Integration tests pass
1919
- - [ ] Manual testing complete
1920
-
1921
- ## CodeRabbit Review
1922
- - [ ] Pre-commit review passed
1923
- - [ ] All CRITICAL issues resolved
1924
- - [ ] HIGH issues addressed or documented
1925
-
1926
- ## Checklist
1927
- - [ ] Follows coding standards
1928
- - [ ] Naming conventions correct
1929
- - [ ] No breaking changes (or documented)
1930
- - [ ] Backward compatible
1931
- ```
1932
-
1933
- ---
1934
-
1935
- ## Support & Contact
1936
-
1937
- ### Getting Help
1938
-
1939
- 1. **Documentation First:** Check this master document
1940
- 2. **Framework Docs:** Review specific docs in `docs/framework/`
1941
- 3. **Decision History:** Check `docs/decisions/`
1942
- 4. **Story Context:** Review implementation stories
1943
-
1944
- ### Framework Team
1945
-
1946
- - **Architect:** Aria (@architect)
1947
- - **Lead Developer:** Dex (@dev)
1948
- - **Quality Lead:** Quinn (@qa)
1949
- - **Product Owner:** Pax (@po)
1950
-
1951
- ---
1952
-
1953
- **Document Version:** 2.0.0
1954
- **Last Updated:** 2025-01-18
1955
- **Maintained By:** AIOS Framework Team
1956
- **Status:** Living Document
1957
-
1958
- ---
1959
-
1960
- *This document consolidates all AIOS framework documentation into a single, comprehensive reference. It is a living document and will be updated as the framework evolves.*
1961
-
1962
- — Aria, arquitetando o futuro 🏗️
1963
-
1
+ # AIOS Framework - Complete Documentation
2
+
3
+ > **⚠️ DEPRECATION NOTICE**
4
+ >
5
+ > This document describes **v2.0.0** of the AIOS Framework.
6
+ >
7
+ > **For the current version (v2.1), see:**
8
+ > - [AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md](./AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md) - Complete v2.1 framework guide
9
+ > - [STANDARDS-INDEX.md](./STANDARDS-INDEX.md) - Navigation for all standards
10
+ >
11
+ > **Key changes in v2.1:**
12
+ > - 4-module architecture (core, development, product, infrastructure)
13
+ > - Squad System (replaces "Expansion Packs")
14
+ > - Multi-repo strategy (3 public + 2 private repos)
15
+ > - Quality Gates 3-layer system
16
+ > - Story Template v2.0
17
+ >
18
+ > This document is retained for historical reference only.
19
+
20
+ **Version:** 2.0.0 (DEPRECATED - See v2.1)
21
+ **Status:** ⚠️ Deprecated - Reference Only
22
+ **Last Updated:** 2025-01-18
23
+ **Maintained By:** AIOS Framework Team
24
+
25
+ ---
26
+
27
+ ## 📋 Table of Contents
28
+
29
+ ### Part I: Framework Overview
30
+ 1. [What is AIOS?](#what-is-aios)
31
+ 2. [Core Philosophy](#core-philosophy)
32
+ 3. [Framework Architecture](#framework-architecture)
33
+ 4. [Getting Started](#getting-started)
34
+
35
+ ### Part II: Framework Structure
36
+ 5. [Directory Structure](#directory-structure)
37
+ 6. [File Organization](#file-organization)
38
+ 7. [Naming Conventions](#naming-conventions)
39
+
40
+ ### Part III: Agent System
41
+ 8. [Agent Architecture](#agent-architecture)
42
+ 9. [Agent Personalization](#agent-personalization)
43
+ 10. [Agent Roles & Specializations](#agent-roles--specializations)
44
+ 11. [Greeting System](#greeting-system)
45
+
46
+ ### Part IV: Task & Workflow System
47
+ 12. [Task Format Specification](#task-format-specification)
48
+ 13. [Execution Modes](#execution-modes)
49
+ 14. [Workflow Orchestration](#workflow-orchestration)
50
+ 15. [Fork/Join & Organizer-Worker Patterns](#forkjoin--organizer-worker-patterns)
51
+
52
+ ### Part V: Executor Types
53
+ 16. [The Four Executor Types](#the-four-executor-types)
54
+ 17. [Executor Decision Tree](#executor-decision-tree)
55
+
56
+ ### Part VI: Standards & Best Practices
57
+ 18. [Coding Standards](#coding-standards)
58
+ 19. [Technology Stack](#technology-stack)
59
+ 20. [Quality Gates & CodeRabbit Integration](#quality-gates--coderabbit-integration)
60
+
61
+ ### Part VII: Migration & Roadmap
62
+ 21. [Current Migration Status](#current-migration-status)
63
+ 22. [Future Architecture (Q2 2026)](#future-architecture-q2-2026)
64
+ 23. [Subdirectory Migration Plan](#subdirectory-migration-plan)
65
+
66
+ ### Part VIII: Appendices
67
+ 24. [Glossary](#glossary)
68
+ 25. [Decision History](#decision-history)
69
+ 26. [References](#references)
70
+
71
+ ---
72
+
73
+ # Part I: Framework Overview
74
+
75
+ ## What is AIOS?
76
+
77
+ **AIOS (AI Operating System)** is a sophisticated framework for orchestrating AI agents, workers, and humans in complex software development workflows. It provides a structured, scalable approach to building AI-assisted development teams with personality, coordination, and quality gates.
78
+
79
+ ### Key Capabilities
80
+
81
+ - 🤖 **16 Specialized Agents** - Dev, QA, Architect, PM, PO, Analyst, Data Engineer, DevOps, etc.
82
+ - 📋 **60+ Executable Tasks** - Story creation, code generation, testing, deployment, documentation
83
+ - 📝 **20+ Templates** - PRDs, stories, architecture docs, test plans, database schemas
84
+ - 🔄 **Multi-Agent Workflows** - Greenfield, brownfield, fork/join, organizer-worker patterns
85
+ - 🎭 **Personalized Agent System** - Named personalities with archetypes, vocabularies, and signatures
86
+ - 🎯 **Three Execution Modes** - YOLO (autonomous), Interactive (balanced), Pre-Flight (comprehensive)
87
+ - ✅ **Quality Gates** - CodeRabbit integration, automated reviews, acceptance criteria validation
88
+
89
+ ---
90
+
91
+ ## Core Philosophy
92
+
93
+ ### Structure is Sacred. Tone is Flexible.
94
+
95
+ AIOS follows a fundamental principle:
96
+
97
+ > "Quando as informações estão sempre nas mesmas posições, nosso cérebro sabe onde buscar rápido."
98
+
99
+ **FIXED:**
100
+ - Template positions
101
+ - Section order
102
+ - Metric formats
103
+ - File structure
104
+ - Task workflows
105
+
106
+ **FLEXIBLE:**
107
+ - Status messages
108
+ - Vocabulary choices
109
+ - Emoji usage
110
+ - Agent personality
111
+ - Communication tone
112
+
113
+ ### Design Principles
114
+
115
+ 1. **Familiaridade + Personalização = Produtividade**
116
+ - Users learn structure once
117
+ - Personality makes it memorable
118
+ - Consistency enables speed
119
+
120
+ 2. **Separation of Concerns**
121
+ - Framework vs. Project
122
+ - Structure vs. Tone
123
+ - Automation vs. Human Judgment
124
+
125
+ 3. **Progressive Complexity**
126
+ - Simple by default
127
+ - Complex when needed
128
+ - Scalable architecture
129
+
130
+ 4. **Multi-Agent Coordination**
131
+ - Agents work together
132
+ - Clear handoffs
133
+ - Shared context
134
+
135
+ ---
136
+
137
+ ## Framework Architecture
138
+
139
+ ### Dual-Layer Architecture
140
+
141
+ ```
142
+ ┌─────────────────────────────────────────────────────────────┐
143
+ │ FRAMEWORK LAYER (.aios-core/) │
144
+ │ ├── Agents (16 specialists) │
145
+ │ ├── Tasks (60+ executable workflows) │
146
+ │ ├── Templates (20+ document generators) │
147
+ │ ├── Workflows (6+ multi-agent orchestrations) │
148
+ │ ├── Checklists (6+ validation processes) │
149
+ │ ├── Data (Knowledge base) │
150
+ │ ├── Scripts (54+ utilities) │
151
+ │ └── Tools (MCP integrations) │
152
+ └─────────────────────────────────────────────────────────────┘
153
+
154
+ ┌─────────────────────────────────────────────────────────────┐
155
+ │ PROJECT LAYER (root workspace) │
156
+ │ ├── frontend/ (Next.js, React) │
157
+ │ ├── backend/ (NestJS, Supabase) │
158
+ │ ├── docs/ (Project documentation) │
159
+ │ ├── tests/ (Unit, integration, E2E) │
160
+ │ └── .aios/ (Session state, logs) │
161
+ └─────────────────────────────────────────────────────────────┘
162
+ ```
163
+
164
+ **Framework Layer:** Portable across all AIOS projects
165
+ **Project Layer:** Specific to each implementation
166
+
167
+ ---
168
+
169
+ ### Three-Layer Personality System
170
+
171
+ ```
172
+ ┌─────────────────────────────────────────────────────────────┐
173
+ │ LAYER 1: Agent Persona Config (.aios-core/agents/*.md) │
174
+ │ - Name, archetype, zodiac │
175
+ │ - Vocabulary, emoji palette │
176
+ │ - Greeting levels, signature │
177
+ └─────────────────────────────────────────────────────────────┘
178
+
179
+ ┌─────────────────────────────────────────────────────────────┐
180
+ │ LAYER 2: Output Formatter (.aios-core/scripts/) │
181
+ │ - greeting-builder.js │
182
+ │ - session-context-loader.js │
183
+ │ - project-status-loader.js │
184
+ └─────────────────────────────────────────────────────────────┘
185
+
186
+ ┌─────────────────────────────────────────────────────────────┐
187
+ │ LAYER 3: Standardized Output │
188
+ │ - Fixed structure + personalized tone │
189
+ │ - Contextual greetings │
190
+ │ - Agent signatures │
191
+ └─────────────────────────────────────────────────────────────┘
192
+ ```
193
+
194
+ ---
195
+
196
+ ## Getting Started
197
+
198
+ ### Prerequisites
199
+
200
+ - **Node.js** 18+ (LTS)
201
+ - **Git** (version control)
202
+ - **IDE:** Cursor or VS Code with Claude extension
203
+ - **MCP Servers:** ClickUp, Context7, Exa (optional)
204
+
205
+ ### Quick Start
206
+
207
+ ```bash
208
+ # 1. Clone the repository
209
+ git clone <your-aios-project>
210
+ cd <project-directory>
211
+
212
+ # 2. Install dependencies
213
+ npm install
214
+
215
+ # 3. Configure AIOS
216
+ # Edit .aios-core/core-config.yaml
217
+
218
+ # 4. Activate first agent
219
+ # In IDE: type /AIOS/agents/pm
220
+
221
+ # 5. Create your first story
222
+ *create-next-story
223
+ ```
224
+
225
+ ### First Commands to Try
226
+
227
+ ```bash
228
+ # Product Owner (Story Management)
229
+ /AIOS/agents/po
230
+ *create-next-story
231
+ *validate-story-draft docs/stories/your-story.md
232
+
233
+ # Developer (Implementation)
234
+ /AIOS/agents/dev
235
+ *develop-story docs/stories/your-story.md
236
+
237
+ # QA (Quality Assurance)
238
+ /AIOS/agents/qa
239
+ *review docs/stories/your-story.md
240
+ *code-review
241
+ ```
242
+
243
+ ---
244
+
245
+ # Part II: Framework Structure
246
+
247
+ ## Directory Structure
248
+
249
+ ### Complete Framework Structure
250
+
251
+ ```
252
+ .aios-core/ # Framework Core (Portable)
253
+ ├── agents/ # 16 agent definitions
254
+ │ ├── dev.md # 💻 Dex (Builder)
255
+ │ ├── qa.md # 🛡️ Quinn (Guardian)
256
+ │ ├── architect.md # 🏛️ Aria (Visionary)
257
+ │ ├── pm.md # 📊 Morgan (Balancer)
258
+ │ ├── po.md # 📋 Pax (Balancer)
259
+ │ ├── sm.md # 🌊 Sage (Flow Master)
260
+ │ ├── analyst.md # 🔍 Scout (Explorer)
261
+ │ ├── data-engineer.md # 🔧 Dara (Engineer)
262
+ │ ├── devops.md # ⚙️ Gage (Operator)
263
+ │ ├── db-sage.md # 🗄️ [Database Architect]
264
+ │ ├── ux-design-expert.md # 🎨 Uma (Empathizer)
265
+ │ ├── aios-master.md # ⭐ Orion (Orchestrator)
266
+ │ ├── aios-developer.md # 🛠️ [Framework Developer]
267
+ │ ├── aios-orchestrator.md # 🎭 [Workflow Orchestrator]
268
+ │ ├── github-devops.md # 🐙 [Git Operations]
269
+ │ └── test-agent.md # 🧪 [Test Agent]
270
+
271
+ ├── tasks/ # 60+ executable workflows
272
+ │ ├── create-doc.md # Document generation
273
+ │ ├── create-next-story.md # Story creation
274
+ │ ├── develop-story.md # Story implementation
275
+ │ ├── review-story.md # Story review
276
+ │ ├── validate-next-story.md # Story validation
277
+ │ ├── manage-story-backlog.md # Backlog management
278
+ │ ├── execute-checklist.md # Checklist execution
279
+ │ ├── document-project.md # Project documentation
280
+ │ ├── generate-tests.md # Test generation
281
+ │ ├── nfr-assess.md # Non-functional requirements
282
+ │ ├── qa-gate.md # Quality gate decision
283
+ │ ├── code-review.md # Automated code review
284
+ │ ├── apply-qa-fixes.md # QA fix application
285
+ │ ├── improve-code-quality.md # Code quality improvements
286
+ │ ├── setup-database.md # Database setup
287
+ │ ├── domain-modeling.md # Domain modeling
288
+ │ ├── version-management.md # Version management
289
+ │ ├── pre-push-quality-gate.md # Pre-push validation
290
+ │ ├── github-pr-automation.md # PR automation
291
+ │ ├── create-agent.md # Agent creation
292
+ │ ├── create-task.md # Task creation
293
+ │ ├── create-workflow.md # Workflow creation
294
+ │ └── ... (40+ more)
295
+
296
+ ├── templates/ # 20+ document templates
297
+ │ ├── story-tmpl.yaml # Story template v2.0
298
+ │ ├── design-story-tmpl.yaml # Design story template
299
+ │ ├── prd-tmpl.yaml # PRD template
300
+ │ ├── epic-tmpl.md # Epic template
301
+ │ ├── architecture-tmpl.yaml # Architecture template
302
+ │ ├── fullstack-architecture-tmpl.yaml # Full-stack architecture
303
+ │ ├── brownfield-architecture-tmpl.yaml # Brownfield architecture
304
+ │ ├── schema-design-tmpl.yaml # Database schema template
305
+ │ ├── project-brief-tmpl.yaml # Project brief
306
+ │ ├── market-research-tmpl.yaml # Market research
307
+ │ ├── competitor-analysis-tmpl.yaml # Competitor analysis
308
+ │ ├── github-pr-template.md # PR template
309
+ │ ├── github-actions-ci.yml # CI/CD template
310
+ │ ├── personalized-task-template-v2.md # Task template
311
+ │ └── ... (6+ more)
312
+
313
+ ├── workflows/ # 6 multi-step workflows
314
+ │ ├── greenfield-fullstack.yaml # Greenfield full-stack
315
+ │ ├── greenfield-service.yaml # Greenfield service
316
+ │ ├── greenfield-ui.yaml # Greenfield UI
317
+ │ ├── brownfield-fullstack.yaml # Brownfield full-stack
318
+ │ ├── brownfield-service.yaml # Brownfield service
319
+ │ └── brownfield-ui.yaml # Brownfield UI
320
+
321
+ ├── checklists/ # 6+ validation checklists
322
+ │ ├── po-master-checklist.md # PO validation
323
+ │ ├── story-draft-checklist.md # Story draft validation
324
+ │ ├── story-dod-checklist.md # Story Definition of Done
325
+ │ ├── architect-checklist.md # Architecture review
326
+ │ ├── qa-checklist.md # QA validation
327
+ │ ├── pm-checklist.md # PM validation
328
+ │ └── change-checklist.md # Change management
329
+
330
+ ├── data/ # Knowledge base
331
+ │ ├── aios-kb.md # AIOS knowledge base
332
+ │ ├── technical-preferences.md # Tech stack preferences
333
+ │ ├── elicitation-methods.md # Elicitation techniques
334
+ │ ├── brainstorming-techniques.md # Brainstorming methods
335
+ │ ├── mode-selection-best-practices.md # Execution mode guidance
336
+ │ ├── test-levels-framework.md # Testing strategy
337
+ │ ├── test-priorities-matrix.md # Test prioritization
338
+ │ └── agent-config-requirements.yaml # Agent requirements
339
+
340
+ ├── scripts/ # 54+ utility scripts
341
+ │ ├── agent-config-loader.js # Agent configuration
342
+ │ ├── greeting-builder.js # Greeting generation
343
+ │ ├── generate-greeting.js # Greeting orchestrator
344
+ │ ├── session-context-loader.js # Session management
345
+ │ ├── project-status-loader.js # Project status
346
+ │ ├── config-cache.js # Configuration cache
347
+ │ ├── performance-tracker.js # Performance tracking
348
+ │ ├── component-generator.js # Component scaffolding
349
+ │ ├── elicitation-engine.js # Interactive elicitation
350
+ │ ├── story-manager.js # Story lifecycle
351
+ │ ├── yaml-validator.js # YAML validation
352
+ │ ├── usage-analytics.js # Usage tracking
353
+ │ ├── migrate-task-to-v2.js # Task migration
354
+ │ ├── validate-task-v2.js # Task validation
355
+ │ └── ... (40+ more)
356
+
357
+ ├── tools/ # Tool integrations
358
+ │ ├── mcp/ # MCP server configs
359
+ │ │ ├── clickup-direct.yaml
360
+ │ │ ├── context7.yaml
361
+ │ │ └── exa-direct.yaml
362
+ │ ├── cli/ # CLI tool wrappers
363
+ │ │ ├── github-cli.yaml
364
+ │ │ └── railway-cli.yaml
365
+ │ └── local/ # Local tools
366
+
367
+ ├── elicitation/ # Elicitation engines
368
+ │ ├── agent-elicitation.js
369
+ │ ├── task-elicitation.js
370
+ │ └── workflow-elicitation.js
371
+
372
+ ├── core-config.yaml # Framework configuration
373
+ ├── install-manifest.yaml # Installation manifest
374
+ ├── user-guide.md # User guide
375
+ └── working-in-the-brownfield.md # Brownfield guide
376
+ ```
377
+
378
+ ---
379
+
380
+ ## File Organization
381
+
382
+ ### File Types & Purposes
383
+
384
+ | Type | Location | Purpose | Format |
385
+ |------|----------|---------|--------|
386
+ | **Agents** | `.aios-core/agents/*.md` | Agent definitions with persona | Markdown + YAML |
387
+ | **Tasks** | `.aios-core/tasks/*.md` | Executable workflows | Markdown + YAML |
388
+ | **Templates** | `.aios-core/templates/*.yaml` | Document generators | YAML |
389
+ | **Workflows** | `.aios-core/workflows/*.yaml` | Multi-agent orchestration | YAML |
390
+ | **Checklists** | `.aios-core/checklists/*.md` | Validation processes | Markdown + Checklist |
391
+ | **Data/KB** | `.aios-core/data/*.md` | Knowledge base, references | Markdown/YAML |
392
+ | **Scripts** | `.aios-core/scripts/*.js` | Utilities, automation | JavaScript |
393
+ | **Tools** | `.aios-core/tools/*/*.yaml` | Tool integrations | YAML |
394
+
395
+ ### Framework vs. Project Files
396
+
397
+ **Framework Files (.aios-core/):**
398
+ - ✅ Portable across projects
399
+ - ✅ Version controlled in framework repo
400
+ - ✅ Shared by all AIOS projects
401
+ - ✅ Changes require framework approval
402
+
403
+ **Project Files (root/):**
404
+ - ✅ Project-specific implementation
405
+ - ✅ Version controlled in project repo
406
+ - ✅ Unique to each project
407
+ - ✅ Changes by project team
408
+
409
+ ---
410
+
411
+ ## Naming Conventions
412
+
413
+ ### File Names
414
+
415
+ **Rule:** `kebab-case` for all files
416
+
417
+ ```bash
418
+ ✅ CORRECT:
419
+ - create-next-story.md
420
+ - fullstack-architecture-tmpl.yaml
421
+ - agent-config-loader.js
422
+
423
+ ❌ WRONG:
424
+ - createNextStory.md
425
+ - fullstackArchitectureTmpl.yaml
426
+ - agent_config_loader.js
427
+ ```
428
+
429
+ ### Variable Names
430
+
431
+ **JavaScript/JSON:** `camelCase`
432
+ ```javascript
433
+ ✅ CORRECT:
434
+ const agentConfig = { ... }
435
+ const taskDefinition = { ... }
436
+
437
+ ❌ WRONG:
438
+ const agent_config = { ... }
439
+ const task-definition = { ... }
440
+ ```
441
+
442
+ **CSS:** `kebab-case`
443
+ ```css
444
+ ✅ CORRECT:
445
+ .content-area { }
446
+ --spacing-md: 200px;
447
+
448
+ ❌ WRONG:
449
+ .contentArea { }
450
+ --spacing_md: 200px;
451
+ ```
452
+
453
+ **Database:** `snake_case`
454
+ ```sql
455
+ ✅ CORRECT:
456
+ tasks.responsavel_type
457
+ workflow_executions.started_at
458
+
459
+ ❌ WRONG:
460
+ tasks.responsavelType
461
+ workflow_executions.startedAt
462
+ ```
463
+
464
+ ---
465
+
466
+ # Part III: Agent System
467
+
468
+ ## Agent Architecture
469
+
470
+ ### Agent Definition Structure
471
+
472
+ Every agent follows this YAML structure:
473
+
474
+ ```yaml
475
+ # Agent Core Identity
476
+ agent:
477
+ name: {PersonalizedName} # Human name (Dex, Quinn, Pax)
478
+ id: {agent-id} # System identifier
479
+ title: {Role} # Professional role
480
+ icon: {emoji} # Visual identifier
481
+ whenToUse: "{description}" # When to activate this agent
482
+
483
+ # Personality Profile
484
+ persona_profile:
485
+ archetype: {Archetype} # Builder, Guardian, Balancer, etc.
486
+ zodiac: {Sign} # ♒ Aquarius, ♍ Virgo, ♎ Libra, etc.
487
+
488
+ communication:
489
+ tone: {tone} # pragmatic | empathetic | analytical
490
+ emoji_frequency: {level} # high | medium | low | minimal
491
+
492
+ vocabulary: # Agent-specific words (5-10)
493
+ - {word1}
494
+ - {word2}
495
+ - {word3}
496
+
497
+ greeting_levels: # 3 personification levels
498
+ minimal: "{icon} {id} Agent ready"
499
+ named: "{icon} {name} ({archetype}) ready. {tagline}!"
500
+ archetypal: "{icon} {name} the {archetype} ready to {verb}!"
501
+
502
+ signature_closing: "{personalized_sign_off}"
503
+
504
+ # Behavioral Configuration
505
+ persona:
506
+ role: {DetailedRole}
507
+ style: {CommunicationStyle}
508
+ identity: {CoreIdentity}
509
+ focus: {PrimaryFocus}
510
+ core_principles:
511
+ - {principle1}
512
+ - {principle2}
513
+ - {principle3}
514
+
515
+ # Commands
516
+ commands:
517
+ - name: {command-name}
518
+ description: {description}
519
+
520
+ # Dependencies
521
+ dependencies:
522
+ tasks:
523
+ - {task-file}.md
524
+ templates:
525
+ - {template-file}.yaml
526
+ checklists:
527
+ - {checklist-file}.md
528
+ data:
529
+ - {data-file}.md
530
+ tools:
531
+ - {tool-name}
532
+ ```
533
+
534
+ ---
535
+
536
+ ## Agent Personalization
537
+
538
+ ### The 11 Archetypes
539
+
540
+ | Archetype | Name | Icon | Zodiac | Tone | Examples |
541
+ |-----------|------|------|--------|------|----------|
542
+ | **Builder** | Dex | 💻 | ♒ Aquarius | Pragmatic | Dev |
543
+ | **Guardian** | Quinn | 🛡️ | ♍ Virgo | Protective | QA |
544
+ | **Balancer** | Pax, Morgan | 📋 📊 | ♎ Libra | Diplomatic | PO, PM |
545
+ | **Visionary** | Aria | 🏛️ | ♐ Sagittarius | Conceptual | Architect |
546
+ | **Flow Master** | Sage | 🌊 | ♓ Pisces | Adaptive | SM |
547
+ | **Explorer** | Scout | 🔍 | ♊ Gemini | Curious | Analyst |
548
+ | **Engineer** | Dara | 🔧 | ♉ Taurus | Methodical | Data Engineer |
549
+ | **Operator** | Gage | ⚙️ | ♑ Capricorn | Efficient | DevOps |
550
+ | **Empathizer** | Uma | 🎨 | ♋ Cancer | Empathetic | UX Expert |
551
+ | **Orchestrator** | Orion | ⭐ | ♌ Leo | Commanding | AIOS Master |
552
+ | **Architect** | (Various) | 🏗️ | (Various) | Systematic | DB Sage |
553
+
554
+ ### Vocabulary System
555
+
556
+ Each archetype has specific vocabulary:
557
+
558
+ **Builder (Dex):**
559
+ - construir, implementar, refatorar, resolver, otimizar
560
+ - debuggar, testar, deployar, commitar, mergear
561
+
562
+ **Guardian (Quinn):**
563
+ - validar, verificar, proteger, garantir, auditar
564
+ - revisar, inspecionar, certificar, assegurar
565
+
566
+ **Balancer (Pax, Morgan):**
567
+ - equilibrar, harmonizar, priorizar, alinhar, integrar
568
+ - negociar, mediar, sincronizar, coordenar
569
+
570
+ ### Emoji Palette System
571
+
572
+ **High Frequency:**
573
+ - ✅ ❌ ⚠️ 🎯 🚀 ⭐ 💡 🔥
574
+
575
+ **Medium Frequency:**
576
+ - 📊 📋 📝 🔍 💻 🛡️ 🏛️ 🌊
577
+
578
+ **Low Frequency:**
579
+ - Agent-specific emojis only
580
+
581
+ **Minimal:**
582
+ - Status indicators only (✅ ❌ ⚠️)
583
+
584
+ ---
585
+
586
+ ## Agent Roles & Specializations
587
+
588
+ ### Development Team
589
+
590
+ **💻 Dex (Builder) - Developer**
591
+ - **Role:** Full-stack implementation
592
+ - **Commands:** `*develop-story`, `*apply-qa-fixes`, `*improve-code-quality`
593
+ - **When to Use:** Code implementation, debugging, refactoring
594
+
595
+ **🛡️ Quinn (Guardian) - QA Engineer**
596
+ - **Role:** Quality assurance and testing
597
+ - **Commands:** `*review`, `*code-review`, `*gate`, `*nfr-assess`
598
+ - **When to Use:** Testing, quality validation, acceptance criteria
599
+
600
+ **🏛️ Aria (Visionary) - Architect**
601
+ - **Role:** System architecture and design
602
+ - **Commands:** `*create-full-stack-architecture`, `*document-project`
603
+ - **When to Use:** Architecture decisions, system design, tech stack
604
+
605
+ ---
606
+
607
+ ### Product & Agile Team
608
+
609
+ **📋 Pax (Balancer) - Product Owner**
610
+ - **Role:** Story management and backlog
611
+ - **Commands:** `*create-next-story`, `*validate-story-draft`, `*sync-story`
612
+ - **When to Use:** Story creation, backlog prioritization, acceptance
613
+
614
+ **📊 Morgan (Balancer) - Product Manager**
615
+ - **Role:** Product strategy and roadmap
616
+ - **Commands:** `*create-doc`, `*brownfield-create-epic`
617
+ - **When to Use:** PRDs, product strategy, stakeholder management
618
+
619
+ **🌊 Sage (Flow Master) - Scrum Master**
620
+ - **Role:** Process facilitation and flow
621
+ - **Commands:** `*execute-checklist`, `*correct-course`
622
+ - **When to Use:** Sprint planning, retrospectives, flow optimization
623
+
624
+ ---
625
+
626
+ ### Specialized Agents
627
+
628
+ **🔍 Scout (Explorer) - Business Analyst**
629
+ - **Role:** Requirements analysis and research
630
+ - **Commands:** `*facilitate-brainstorming-session`, `*create-deep-research-prompt`
631
+ - **When to Use:** Requirements elicitation, market research, analysis
632
+
633
+ **🔧 Dara (Engineer) - Data Engineer**
634
+ - **Role:** Data modeling and pipelines
635
+ - **Commands:** `*setup-database`, `*domain-modeling`
636
+ - **When to Use:** Database design, ETL pipelines, data architecture
637
+
638
+ **⚙️ Gage (Operator) - DevOps Engineer**
639
+ - **Role:** Deployment and operations
640
+ - **Commands:** `*version-management`, `*github-pr-automation`, `*ci-cd-configuration`
641
+ - **When to Use:** CI/CD, deployment, infrastructure, monitoring
642
+
643
+ **🎨 Uma (Empathizer) - UX Design Expert**
644
+ - **Role:** User experience and design systems
645
+ - **Commands:** `*ux-user-research`, `*ux-create-wireframe`, `*audit-codebase`
646
+ - **When to Use:** UX research, design systems, accessibility
647
+
648
+ ---
649
+
650
+ ### Framework Agents
651
+
652
+ **⭐ Orion (Orchestrator) - AIOS Master**
653
+ - **Role:** Framework orchestration and agent coordination
654
+ - **Commands:** `*create-agent`, `*create-task`, `*create-workflow`
655
+ - **When to Use:** Framework development, agent creation, workflow design
656
+
657
+ **🗄️ DB Sage - Database Architect**
658
+ - **Role:** Database schema design and optimization
659
+ - **When to Use:** Complex database design, query optimization
660
+
661
+ **🐙 GitHub DevOps - Git Operations**
662
+ - **Role:** Git push operations and PR management
663
+ - **When to Use:** Git push, PR creation (not available for local operations)
664
+
665
+ ---
666
+
667
+ ## Greeting System
668
+
669
+ ### Three Greeting Levels
670
+
671
+ **1. Minimal** (Quick activation)
672
+ ```
673
+ 💻 dev Agent ready
674
+ ```
675
+
676
+ **2. Named** (Standard, personalized)
677
+ ```
678
+ 💻 Dex (Builder) pronto. Vamos construir isso!
679
+ ```
680
+
681
+ **3. Archetypal** (Full personality)
682
+ ```
683
+ 💻 Dex the Builder (♒ Aquarius) ready to implement!
684
+ ```
685
+
686
+ ### Contextual Greeting Components
687
+
688
+ **Complete Greeting Structure:**
689
+
690
+ ```
691
+ {Archetypal Greeting}
692
+
693
+ 📊 **Project Status:**
694
+ - 🌿 **Branch:** main
695
+ - 📝 **Modified:** file1.md, file2.js ...and 10 more
696
+ - 📖 **Recent:** feat: complete story implementation
697
+ - 📌 **Story:** STORY-6.1.4
698
+
699
+ 💡 **Context:** {Intelligent narrative based on previous work}
700
+ **Recommended:** Use *{command} to continue
701
+
702
+ **Quick Commands:**
703
+ - *help: Show all available commands
704
+ - *command1: Description
705
+ - *command2: Description
706
+
707
+ Type *guide for comprehensive usage instructions.
708
+
709
+ — {Agent Signature}
710
+ ```
711
+
712
+ ### Context Intelligence
713
+
714
+ The greeting system analyzes:
715
+ - **Previous Agent:** Who was active before
716
+ - **Modified Files:** What files were changed
717
+ - **Current Story:** What story is being worked on
718
+ - **Last Commands:** What commands were recently used
719
+ - **Session Type:** New, existing, or workflow session
720
+
721
+ **Example Context:**
722
+ ```
723
+ 💡 **Context:** Vejo que @Dex finalizou a implementação do
724
+ **`greeting-builder.js`** no **`story-6.1.4.md`**.
725
+ Agora podemos revisar a qualidade dessa implementação
726
+
727
+ **Recommended:** Use `*review story-6.1.4.md` para continuar
728
+ ```
729
+
730
+ ---
731
+
732
+ # Part IV: Task & Workflow System
733
+
734
+ ## Task Format Specification
735
+
736
+ ### Universal Task Structure (AIOS v1.0)
737
+
738
+ Every task follows this specification:
739
+
740
+ ```yaml
741
+ task: {taskIdentifier()}
742
+ responsável: {AgentName} # Agent executing (Dex, Quinn, etc.)
743
+ responsavel_type: Agente # Agente | Worker | Humano | Clone
744
+ atomic_layer: {Layer} # Optional for open-source
745
+
746
+ **Entrada:**
747
+ - campo: {fieldName}
748
+ tipo: {type} # string | number | boolean | array | object
749
+ origem: {source} # Step X | User Input | config | agent output
750
+ obrigatório: {true|false}
751
+ padrão: {defaultValue} # Optional
752
+ validação: {validationRule} # Optional
753
+
754
+ **Saída:**
755
+ - campo: {fieldName}
756
+ tipo: {type}
757
+ destino: {destination} # Step Y | state | output | multiple steps
758
+ persistido: {true|false} # Saved to file/DB or memory-only
759
+ cache_key: {key} # Optional: if cacheable
760
+
761
+ **Checklist:**
762
+ pre-conditions:
763
+ - [ ] {condition}
764
+ tipo: pre-condition
765
+ blocker: {true|false}
766
+ validação: {validation_logic}
767
+
768
+ post-conditions:
769
+ - [ ] {condition}
770
+ tipo: post-condition
771
+ blocker: {true|false}
772
+ validação: {validation_logic}
773
+
774
+ acceptance-criteria:
775
+ - [ ] {criterion}
776
+ tipo: acceptance
777
+ blocker: false
778
+ story: {STORY-XXX}
779
+
780
+ **Performance:**
781
+ - duration_expected: {X}ms
782
+ - cost_estimated: ${Y}
783
+ - cacheable: {true|false}
784
+ - parallelizable: {true|false}
785
+
786
+ **Error Handling:**
787
+ - strategy: {retry|fallback|abort}
788
+ - retry:
789
+ max_attempts: {N}
790
+ backoff: {linear|exponential}
791
+ ```
792
+
793
+ ### Task Components Explained
794
+
795
+ **Entrada (Input):**
796
+ - Defines all required and optional inputs
797
+ - Specifies data types and validation rules
798
+ - Documents default values
799
+ - Tracks data origin (previous step, user, config)
800
+
801
+ **Saída (Output):**
802
+ - Defines all outputs produced
803
+ - Specifies destination (next step, state, file)
804
+ - Indicates persistence (temporary or permanent)
805
+ - Enables caching when appropriate
806
+
807
+ **Checklist:**
808
+ - **Pre-conditions:** Validated BEFORE execution (blocking)
809
+ - **Post-conditions:** Validated AFTER execution (quality gates)
810
+ - **Acceptance Criteria:** Manual verification steps
811
+
812
+ **Performance:**
813
+ - Expected duration for tracking
814
+ - Cost estimation (for AI executors)
815
+ - Cacheability for optimization
816
+ - Parallelizability for concurrency
817
+
818
+ **Error Handling:**
819
+ - Strategy: retry, fallback, or abort
820
+ - Retry configuration with backoff
821
+ - Fallback values or alternative flows
822
+ - Notification mechanisms
823
+
824
+ ---
825
+
826
+ ## Execution Modes
827
+
828
+ ### The Three Execution Modes
829
+
830
+ Every task supports three execution modes to balance automation, education, and control:
831
+
832
+ #### 1. YOLO Mode - Fast, Autonomous (0-1 prompts)
833
+
834
+ **Characteristics:**
835
+ - ✅ Autonomous decision making
836
+ - ✅ All decisions logged to `.ai/decision-log-{task-id}.md`
837
+ - ✅ Minimal user interaction
838
+ - ✅ Fast execution
839
+
840
+ **Best For:**
841
+ - Experienced developers
842
+ - Simple, well-defined tasks
843
+ - Time-sensitive work
844
+ - Repetitive operations
845
+
846
+ **Example:**
847
+ ```yaml
848
+ mode: yolo
849
+ ```
850
+
851
+ **Decision Logging:**
852
+ ```markdown
853
+ ## Decision: Use TypeScript for API layer
854
+ **Context:** Need to define type-safe API contracts
855
+ **Options:** [TypeScript, JavaScript with JSDoc]
856
+ **Selected:** TypeScript
857
+ **Rationale:** Better IDE support and compile-time checks
858
+ **Timestamp:** 2025-01-18T14:30:00Z
859
+ ```
860
+
861
+ ---
862
+
863
+ #### 2. Interactive Mode - Balanced, Educational (5-10 prompts) **[DEFAULT]**
864
+
865
+ **Characteristics:**
866
+ - ✅ Explicit decision checkpoints
867
+ - ✅ Educational explanations
868
+ - ✅ Collaborative decision making
869
+ - ✅ Context preservation
870
+
871
+ **Best For:**
872
+ - Learning new patterns
873
+ - Complex decisions
874
+ - Collaborative work
875
+ - Code reviews
876
+
877
+ **Example:**
878
+ ```yaml
879
+ mode: interactive
880
+ ```
881
+
882
+ **Checkpoint Example:**
883
+ ```markdown
884
+ 🤔 **Decision Point:** Database Technology Selection
885
+
886
+ **Options:**
887
+ 1. PostgreSQL (Relational, ACID, complex queries)
888
+ 2. MongoDB (Document, flexible schema, horizontal scaling)
889
+ 3. Supabase (PostgreSQL + Auth + Storage + Realtime)
890
+
891
+ **Recommendation:** Supabase (Option 3)
892
+ **Rationale:** Provides PostgreSQL + auth + storage out-of-box
893
+
894
+ **Your choice?** (1-3 or 'explain')
895
+ ```
896
+
897
+ ---
898
+
899
+ #### 3. Pre-Flight Planning - Comprehensive Upfront (1 questionnaire)
900
+
901
+ **Characteristics:**
902
+ - ✅ Task analysis phase (identify ambiguities)
903
+ - ✅ Comprehensive questionnaire
904
+ - ✅ Zero ambiguity execution
905
+ - ✅ Plan approval before work
906
+
907
+ **Best For:**
908
+ - Ambiguous requirements
909
+ - Critical work (production, security)
910
+ - Team consensus needed
911
+ - Large-scale changes
912
+
913
+ **Example:**
914
+ ```yaml
915
+ mode: preflight
916
+ ```
917
+
918
+ **Pre-Flight Questionnaire:**
919
+ ```markdown
920
+ 📋 **Pre-Flight Planning: Implement User Authentication**
921
+
922
+ **Identified Ambiguities:**
923
+ 1. Authentication Method: Social login or email/password?
924
+ 2. Session Management: JWT or session cookies?
925
+ 3. Password Requirements: Complexity rules?
926
+ 4. MFA Support: Required or optional?
927
+ 5. User Roles: RBAC or simple user types?
928
+
929
+ **Please Answer:**
930
+ [... comprehensive questionnaire ...]
931
+
932
+ **Execution Plan:**
933
+ [... generated after questionnaire ...]
934
+
935
+ **Approve plan?** (yes/no/modify)
936
+ ```
937
+
938
+ ---
939
+
940
+ ### Mode Selection Guidelines
941
+
942
+ | Scenario | YOLO | Interactive | Pre-Flight |
943
+ |----------|------|-------------|------------|
944
+ | **Simple CRUD** | ✅ Perfect | ⚠️ Overkill | ❌ Too much |
945
+ | **Learning new tech** | ❌ Miss details | ✅ Perfect | ⚠️ Good |
946
+ | **Security feature** | ❌ Risky | ⚠️ Good | ✅ Perfect |
947
+ | **Time pressure** | ✅ Perfect | ⚠️ Slower | ❌ Slow |
948
+ | **Team project** | ❌ Solo | ⚠️ Good | ✅ Perfect |
949
+ | **Experimental** | ✅ Perfect | ✅ Good | ❌ Overhead |
950
+
951
+ ---
952
+
953
+ ## Workflow Orchestration
954
+
955
+ ### Workflow Types
956
+
957
+ AIOS supports multiple workflow patterns:
958
+
959
+ 1. **Sequential** - Tasks execute one after another
960
+ 2. **Fork/Join** - Parallel execution with synchronization
961
+ 3. **Organizer-Worker** - Dynamic work distribution
962
+ 4. **Conditional** - Branch based on conditions
963
+ 5. **Loop** - Repeat until condition met
964
+
965
+ ### Workflow Definition Format
966
+
967
+ ```yaml
968
+ workflow:
969
+ id: {workflow-id}
970
+ name: {WorkflowName}
971
+ version: {X.Y.Z}
972
+ type: {sequential|fork-join|organizer-worker|conditional|loop}
973
+
974
+ steps:
975
+ - id: step-1
976
+ task: {task-name}
977
+ agent: {agent-id}
978
+ dependencies: []
979
+ condition: {optional}
980
+
981
+ - id: step-2
982
+ task: {task-name}
983
+ agent: {agent-id}
984
+ dependencies: [step-1]
985
+
986
+ - id: step-3
987
+ type: fork
988
+ branches:
989
+ - id: branch-a
990
+ steps: [...]
991
+ - id: branch-b
992
+ steps: [...]
993
+ join: step-4
994
+
995
+ - id: step-4
996
+ type: join
997
+ merge_strategy: {combine|first|last|custom}
998
+ ```
999
+
1000
+ ### Built-in Workflows
1001
+
1002
+ **Greenfield Workflows:**
1003
+ - `greenfield-fullstack.yaml` - Complete full-stack project
1004
+ - `greenfield-service.yaml` - Backend service only
1005
+ - `greenfield-ui.yaml` - Frontend UI only
1006
+
1007
+ **Brownfield Workflows:**
1008
+ - `brownfield-fullstack.yaml` - Add features to existing full-stack
1009
+ - `brownfield-service.yaml` - Extend existing backend
1010
+ - `brownfield-ui.yaml` - Enhance existing frontend
1011
+
1012
+ ---
1013
+
1014
+ ## Fork/Join & Organizer-Worker Patterns
1015
+
1016
+ ### Fork/Join Pattern (Story 6.1.12)
1017
+
1018
+ **Purpose:** Execute tasks in parallel and synchronize results
1019
+
1020
+ **Use Cases:**
1021
+ - Parallel test execution
1022
+ - Multi-agent analysis
1023
+ - Concurrent API calls
1024
+ - Independent component building
1025
+
1026
+ **Example:**
1027
+
1028
+ ```yaml
1029
+ - id: analyze-architecture
1030
+ type: fork
1031
+ branches:
1032
+ - id: frontend-analysis
1033
+ agent: architect
1034
+ task: analyze-frontend-architecture
1035
+
1036
+ - id: backend-analysis
1037
+ agent: architect
1038
+ task: analyze-backend-architecture
1039
+
1040
+ - id: database-analysis
1041
+ agent: db-sage
1042
+ task: analyze-database-schema
1043
+
1044
+ join: merge-analysis
1045
+ merge_strategy: combine_reports
1046
+
1047
+ - id: merge-analysis
1048
+ type: join
1049
+ task: consolidate-architecture-report
1050
+ agent: architect
1051
+ ```
1052
+
1053
+ **Merge Strategies:**
1054
+ - `combine` - Combine all results
1055
+ - `first` - Use first completed result
1056
+ - `last` - Use last completed result
1057
+ - `custom` - Custom merge function
1058
+
1059
+ ---
1060
+
1061
+ ### Organizer-Worker Pattern (Story 6.1.13)
1062
+
1063
+ **Purpose:** Intelligent work distribution across agents
1064
+
1065
+ **Use Cases:**
1066
+ - Dynamic task distribution
1067
+ - Load balancing
1068
+ - Skill-based assignment
1069
+ - Scalable multi-agent coordination
1070
+
1071
+ **Pattern Structure:**
1072
+
1073
+ ```
1074
+ ┌─────────────────────────────────────┐
1075
+ │ Organizer Agent │
1076
+ │ (aios-master) │
1077
+ │ - Receives work │
1078
+ │ - Distributes to workers │
1079
+ │ - Collects results │
1080
+ │ - Merges outputs │
1081
+ └─────────────────────────────────────┘
1082
+ ↓ ↓ ↓
1083
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
1084
+ │ Worker 1 │ │ Worker 2 │ │ Worker 3 │
1085
+ │ (dev) │ │ (dev) │ │ (qa) │
1086
+ └──────────┘ └──────────┘ └──────────┘
1087
+ ```
1088
+
1089
+ **Agent Role Extension:**
1090
+
1091
+ ```yaml
1092
+ # Organizer Agent
1093
+ agent:
1094
+ id: aios-master
1095
+ role: organizer # NEW: organizer role
1096
+ can_distribute_work: true
1097
+
1098
+ # Worker Agents
1099
+ agent:
1100
+ id: dev
1101
+ role: worker # NEW: worker role (default)
1102
+ skills: [coding, testing]
1103
+ ```
1104
+
1105
+ **Distribution Strategies:**
1106
+
1107
+ 1. **Round Robin** - Distribute evenly
1108
+ ```yaml
1109
+ distribution_strategy: round_robin
1110
+ ```
1111
+
1112
+ 2. **Load Balanced** - Consider current workload
1113
+ ```yaml
1114
+ distribution_strategy: load_balanced
1115
+ max_concurrent_tasks: 3
1116
+ ```
1117
+
1118
+ 3. **Skill Based** - Match skills to requirements
1119
+ ```yaml
1120
+ distribution_strategy: skill_based
1121
+ required_skills: [coding, frontend]
1122
+ ```
1123
+
1124
+ **Example Workflow:**
1125
+
1126
+ ```yaml
1127
+ - id: implement-features
1128
+ type: organizer-worker
1129
+ organizer: aios-master
1130
+ workers: [dev-1, dev-2, dev-3]
1131
+ distribution_strategy: skill_based
1132
+
1133
+ work_items:
1134
+ - feature: user-authentication
1135
+ required_skills: [backend, security]
1136
+ - feature: dashboard-ui
1137
+ required_skills: [frontend, react]
1138
+ - feature: data-pipeline
1139
+ required_skills: [data, etl]
1140
+
1141
+ merge_strategy: combine
1142
+ failure_strategy: reassign
1143
+ ```
1144
+
1145
+ ---
1146
+
1147
+ # Part V: Executor Types
1148
+
1149
+ ## The Four Executor Types
1150
+
1151
+ ### 1. Agente (AI-Powered Execution)
1152
+
1153
+ **Definition:** AI agent using Large Language Models for creative/analytical tasks
1154
+
1155
+ **When to Use:**
1156
+ - ✅ Requires creativity or subjective judgment
1157
+ - ✅ Natural language understanding/generation
1158
+ - ✅ Contextual analysis
1159
+ - ✅ No deterministic algorithm
1160
+
1161
+ **Examples:**
1162
+ - Analyze requirements and extract insights
1163
+ - Generate code from specifications
1164
+ - Design system architecture
1165
+ - Review code for quality
1166
+ - Create documentation
1167
+
1168
+ **Characteristics:**
1169
+ - **Cost:** $$$$ High ($0.001 - $0.01 per execution)
1170
+ - **Speed:** Slow (3-10 seconds)
1171
+ - **Deterministic:** ❌ No (stochastic outputs)
1172
+
1173
+ ---
1174
+
1175
+ ### 2. Worker (Script-Based Execution)
1176
+
1177
+ **Definition:** Deterministic script/function with predefined logic
1178
+
1179
+ **When to Use:**
1180
+ - ✅ Deterministic (same input → same output)
1181
+ - ✅ Data transformation or validation
1182
+ - ✅ File/database operations
1183
+ - ✅ External API calls (no AI)
1184
+
1185
+ **Examples:**
1186
+ - Load configuration from JSON
1187
+ - Validate HTML structure
1188
+ - Export PNG from HTML
1189
+ - Calculate metrics
1190
+ - Run migrations
1191
+
1192
+ **Characteristics:**
1193
+ - **Cost:** $ Low ($0 - $0.001 per execution)
1194
+ - **Speed:** Fast (< 1 second)
1195
+ - **Deterministic:** ✅ Yes (repeatable)
1196
+
1197
+ ---
1198
+
1199
+ ### 3. Humano (Manual Human Execution)
1200
+
1201
+ **Definition:** Human operator for subjective judgment or approval
1202
+
1203
+ **When to Use:**
1204
+ - ✅ Requires human subjective judgment
1205
+ - ✅ Quality gate or approval step
1206
+ - ✅ Sensitive decisions
1207
+ - ✅ Cannot be automated (yet)
1208
+
1209
+ **Examples:**
1210
+ - Review and approve/reject work
1211
+ - Make strategic decisions
1212
+ - Handle edge cases
1213
+ - Provide creative direction
1214
+ - Security review
1215
+
1216
+ **Characteristics:**
1217
+ - **Cost:** $$$ Medium ($5 - $50 per execution)
1218
+ - **Speed:** Very Slow (minutes to hours)
1219
+ - **Deterministic:** ❌ No (subjective)
1220
+
1221
+ ---
1222
+
1223
+ ### 4. Clone (Mind Emulation with Heuristics)
1224
+
1225
+ **Definition:** AI agent with personality heuristics and domain axioms
1226
+
1227
+ **When to Use:**
1228
+ - ✅ Requires specific domain expertise
1229
+ - ✅ Must follow specific methodology
1230
+ - ✅ Needs validation against established principles
1231
+ - ✅ Benefits from "personality-driven" execution
1232
+
1233
+ **Examples:**
1234
+ - Validate components (Atomic Design - Brad Frost)
1235
+ - Review copy (Alex Hormozi methodology)
1236
+ - Evaluate design consistency
1237
+ - Apply mental models
1238
+
1239
+ **Characteristics:**
1240
+ - **Cost:** $$$$ High ($0.002 - $0.015 per execution)
1241
+ - **Speed:** Slow (5-15 seconds)
1242
+ - **Deterministic:** ⚠️ Partial (heuristics guide AI)
1243
+
1244
+ ---
1245
+
1246
+ ## Executor Decision Tree
1247
+
1248
+ ### Decision Flow
1249
+
1250
+ ```
1251
+ Task to Execute
1252
+
1253
+ Requires Creativity/Subjectivity?
1254
+ ├─ NO → Deterministic Algorithm Exists?
1255
+ │ ├─ YES → Worker (script)
1256
+ │ └─ NO → Requires Human Judgment?
1257
+ │ ├─ YES → Critical Decision?
1258
+ │ │ ├─ YES → Humano
1259
+ │ │ └─ NO → Specific Methodology?
1260
+ │ │ ├─ YES → Clone
1261
+ │ │ └─ NO → Agente
1262
+ │ └─ NO → Agente
1263
+ └─ YES → Requires Human Judgment?
1264
+ ├─ YES → Critical Decision?
1265
+ │ ├─ YES → Humano
1266
+ │ └─ NO → Specific Methodology?
1267
+ │ ├─ YES → Clone
1268
+ │ └─ NO → Agente
1269
+ └─ NO → Specific Methodology?
1270
+ ├─ YES → Clone
1271
+ └─ NO → Agente
1272
+ ```
1273
+
1274
+ ### Decision Criteria
1275
+
1276
+ | Criterion | Worker | Agente | Humano | Clone |
1277
+ |-----------|--------|--------|--------|-------|
1278
+ | **Creativity Required** | ❌ | ✅ | ✅ | ✅ |
1279
+ | **Deterministic** | ✅ | ❌ | ❌ | ⚠️ |
1280
+ | **Cost** | $ | $$$$ | $$$ | $$$$ |
1281
+ | **Speed** | Fast | Slow | Very Slow | Slow |
1282
+ | **Human Judgment** | ❌ | ❌ | ✅ | ❌ |
1283
+ | **Methodology** | ❌ | ❌ | ⚠️ | ✅ |
1284
+
1285
+ ---
1286
+
1287
+ # Part VI: Standards & Best Practices
1288
+
1289
+ ## Coding Standards
1290
+
1291
+ ### JavaScript/TypeScript Standards
1292
+
1293
+ **Naming Conventions:**
1294
+ - `camelCase` for variables, functions, methods
1295
+ - `PascalCase` for classes, components, interfaces
1296
+ - `UPPER_CASE` for constants
1297
+ - `kebab-case` for file names
1298
+
1299
+ **Code Structure:**
1300
+ ```javascript
1301
+ // ✅ GOOD
1302
+ const userProfile = {
1303
+ firstName: 'John',
1304
+ lastName: 'Doe',
1305
+ isActive: true
1306
+ };
1307
+
1308
+ // ❌ BAD
1309
+ const user_profile = {
1310
+ first_name: 'John',
1311
+ last_name: 'Doe',
1312
+ is_active: true
1313
+ };
1314
+ ```
1315
+
1316
+ **Function Design:**
1317
+ - Keep functions small (<50 lines)
1318
+ - Single responsibility
1319
+ - Pure functions when possible
1320
+ - Document with JSDoc
1321
+
1322
+ **Error Handling:**
1323
+ ```javascript
1324
+ // ✅ GOOD
1325
+ try {
1326
+ const result = await operation();
1327
+ return { success: true, data: result };
1328
+ } catch (error) {
1329
+ logger.error('Operation failed:', error);
1330
+ return { success: false, error: error.message };
1331
+ }
1332
+
1333
+ // ❌ BAD
1334
+ const result = await operation(); // No error handling
1335
+ ```
1336
+
1337
+ ---
1338
+
1339
+ ### CSS Standards
1340
+
1341
+ **Naming Convention:** `kebab-case`
1342
+
1343
+ ```css
1344
+ /* ✅ GOOD */
1345
+ .content-area {
1346
+ padding: var(--spacing-md);
1347
+ }
1348
+
1349
+ --spacing-md: 200px;
1350
+ --color-primary: #007bff;
1351
+
1352
+ /* ❌ BAD */
1353
+ .contentArea {
1354
+ padding: var(--spacing_md);
1355
+ }
1356
+ ```
1357
+
1358
+ **CSS Organization:**
1359
+ 1. Layout properties
1360
+ 2. Box model properties
1361
+ 3. Visual properties
1362
+ 4. Typography
1363
+ 5. Misc
1364
+
1365
+ ---
1366
+
1367
+ ### Database Standards
1368
+
1369
+ **Naming Convention:** `snake_case`
1370
+
1371
+ ```sql
1372
+ -- ✅ GOOD
1373
+ CREATE TABLE workflow_executions (
1374
+ execution_id UUID PRIMARY KEY,
1375
+ workflow_id UUID NOT NULL,
1376
+ started_at TIMESTAMP,
1377
+ completed_at TIMESTAMP,
1378
+ status VARCHAR(20)
1379
+ );
1380
+
1381
+ -- ❌ BAD
1382
+ CREATE TABLE workflowExecutions (
1383
+ executionId UUID PRIMARY KEY,
1384
+ workflowId UUID NOT NULL,
1385
+ startedAt TIMESTAMP
1386
+ );
1387
+ ```
1388
+
1389
+ ---
1390
+
1391
+ ## Technology Stack
1392
+
1393
+ ### Frontend Stack
1394
+
1395
+ **Core:**
1396
+ - **Framework:** Next.js 14 (App Router)
1397
+ - **UI Library:** React 18
1398
+ - **Language:** TypeScript 5
1399
+ - **Styling:** Tailwind CSS 3
1400
+
1401
+ **State Management:**
1402
+ - **Global:** Zustand or React Context
1403
+ - **Server:** React Server Components
1404
+ - **Forms:** React Hook Form + Zod
1405
+
1406
+ **UI Components:**
1407
+ - **Library:** shadcn/ui (Radix UI)
1408
+ - **Icons:** Lucide React
1409
+ - **Animations:** Framer Motion
1410
+
1411
+ ---
1412
+
1413
+ ### Backend Stack
1414
+
1415
+ **Core:**
1416
+ - **Framework:** NestJS
1417
+ - **Language:** TypeScript 5
1418
+ - **Runtime:** Node.js 18+ (LTS)
1419
+
1420
+ **Database:**
1421
+ - **Primary:** Supabase (PostgreSQL)
1422
+ - **ORM:** Prisma or TypeORM
1423
+ - **Migrations:** Prisma Migrate
1424
+
1425
+ **Authentication:**
1426
+ - **Provider:** Supabase Auth
1427
+ - **Strategy:** JWT + Row Level Security (RLS)
1428
+
1429
+ **API:**
1430
+ - **Type:** REST + tRPC (type-safe)
1431
+ - **Validation:** Zod
1432
+ - **Documentation:** OpenAPI/Swagger
1433
+
1434
+ ---
1435
+
1436
+ ### DevOps & Infrastructure
1437
+
1438
+ **Version Control:**
1439
+ - **Platform:** GitHub
1440
+ - **Workflow:** Feature branches + PRs
1441
+ - **CI/CD:** GitHub Actions
1442
+
1443
+ **Deployment:**
1444
+ - **Platform:** Railway (recommended) or Vercel
1445
+ - **Strategy:** Zero-downtime deployment
1446
+ - **Environments:** dev, staging, production
1447
+
1448
+ **Monitoring:**
1449
+ - **Logs:** Structured logging (Winston/Pino)
1450
+ - **Metrics:** Custom dashboards
1451
+ - **Errors:** Error tracking service
1452
+
1453
+ ---
1454
+
1455
+ ## Quality Gates & CodeRabbit Integration
1456
+
1457
+ ### CodeRabbit Quality Gates
1458
+
1459
+ AIOS uses **CodeRabbit** for automated code review at three key checkpoints:
1460
+
1461
+ #### 1. Pre-Commit Gate (@dev)
1462
+
1463
+ **When:** Before committing code
1464
+ **Command:** `*code-review uncommitted`
1465
+
1466
+ **Focus:**
1467
+ - Syntax errors
1468
+ - Basic code quality
1469
+ - Linting violations
1470
+ - Obvious bugs
1471
+
1472
+ **Action:** Fix CRITICAL issues before committing
1473
+
1474
+ ---
1475
+
1476
+ #### 2. Mid-Point Review (@dev + @qa)
1477
+
1478
+ **When:** During story implementation
1479
+ **Command:** `*code-review --base main`
1480
+
1481
+ **Focus:**
1482
+ - Architecture patterns
1483
+ - Error handling
1484
+ - Performance issues
1485
+ - Integration points
1486
+
1487
+ **Action:** Address HIGH and CRITICAL issues
1488
+
1489
+ ---
1490
+
1491
+ #### 3. Pre-PR Gate (@dev + @qa)
1492
+
1493
+ **When:** Before creating PR
1494
+ **Command:** `*code-review --base main --full`
1495
+
1496
+ **Focus:**
1497
+ - Complete code quality
1498
+ - Test coverage
1499
+ - Documentation
1500
+ - Backward compatibility
1501
+ - Security vulnerabilities
1502
+
1503
+ **Action:** Resolve ALL CRITICAL, address HIGH issues
1504
+
1505
+ ---
1506
+
1507
+ ### Severity Levels
1508
+
1509
+ | Severity | Action | Examples |
1510
+ |----------|--------|----------|
1511
+ | **CRITICAL** | ❌ Block | Security vulnerabilities, data loss risks |
1512
+ | **HIGH** | ⚠️ Fix before PR | Performance issues, error handling gaps |
1513
+ | **MEDIUM** | 📋 Document as debt | Code maintainability, design patterns |
1514
+ | **LOW** | ℹ️ Optional | Style inconsistencies, minor optimizations |
1515
+
1516
+ ---
1517
+
1518
+ ### Story-Specific Integration
1519
+
1520
+ Each story includes CodeRabbit integration:
1521
+
1522
+ ```yaml
1523
+ # CodeRabbit Integration
1524
+ story_type: [Feature|Bug|Refactor|Architecture]
1525
+ specialized_agents: [@dev, @qa, @architect]
1526
+
1527
+ quality_gates:
1528
+ pre_commit: Focus on syntax and basic quality
1529
+ mid_point: Focus on architecture and integration
1530
+ pre_pr: Comprehensive review before merge
1531
+
1532
+ focus_areas:
1533
+ - Error Handling: Check all error paths
1534
+ - Performance: Validate response times
1535
+ - Security: Check for vulnerabilities
1536
+ - Integration: Validate API contracts
1537
+ ```
1538
+
1539
+ ---
1540
+
1541
+ # Part VII: Migration & Roadmap
1542
+
1543
+ ## Current Migration Status
1544
+
1545
+ ### Epic 6.1: Agent Identity System (In Progress)
1546
+
1547
+ **Objective:** Modernize agent system with personality, unified greeting, and improved structure
1548
+
1549
+ **Waves:**
1550
+
1551
+ **Wave 1 - Foundation (In Progress):**
1552
+ - ✅ Story 6.1.1: Agent Personalization Implementation
1553
+ - ✅ Story 6.1.2: Persona Profile Integration
1554
+ - ✅ Story 6.1.3: Greeting Levels Implementation
1555
+ - ✅ Story 6.1.4: Unified Greeting System Integration
1556
+ - ⏸️ Story 6.1.4.1: Fix Remaining Agent YAML Issues (Approved)
1557
+ - ✅ Story 6.1.5: Output Formatter Implementation
1558
+ - ✅ Story 6.1.6: Output Formatter Testing
1559
+ - ✅ Story 6.1.7: Core Tasks Migration
1560
+ - ✅ Story 6.1.8: Templates Migration
1561
+ - ✅ Story 6.1.9: Checklists Migration
1562
+ - 📋 Story 6.1.10: Dependencies & Data Files Migration (Ready)
1563
+ - 📋 Story 6.1.11: AIOS-Master Tasks Creation (Ready)
1564
+ - 📋 Story 6.1.12: Fork/Join Workflow Operations (Ready)
1565
+ - 📋 Story 6.1.13: Organizer-Worker Pattern (Ready)
1566
+
1567
+ **Wave 2 - Enhancement (Pending):**
1568
+ - ❌ Story 6.1.14: Expansion Pack Framework (REJECTED - Architecture conflict)
1569
+ - ❌ Story 6.1.14.1-3: Expansion Pack Extraction (REJECTED - Architecture conflict)
1570
+ - 📋 Story 6.1.15: Subdirectory Architecture Validation (PROPOSED)
1571
+ - 📋 Story 6.1.16-21: Subdirectory Migration (PROPOSED - if 6.1.15 succeeds)
1572
+
1573
+ ---
1574
+
1575
+ ## Future Architecture (Q2 2026)
1576
+
1577
+ ### Repository Restructuring (Decision 005)
1578
+
1579
+ **Current State:**
1580
+ ```
1581
+ @synkra/aios-core/
1582
+ ├── .aios-core/ # Framework embedded in project
1583
+ ├── frontend/
1584
+ ├── backend/
1585
+ └── docs/
1586
+ ```
1587
+
1588
+ **Future State (Q2 2026):**
1589
+ ```
1590
+ aios/
1591
+ ├── aios-core/ # Framework repository (standalone)
1592
+ │ ├── agents/
1593
+ │ ├── tasks/
1594
+ │ ├── templates/
1595
+ │ └── ...
1596
+
1597
+ └── @synkra/aios-core/ # Project repository
1598
+ ├── frontend/
1599
+ ├── backend/
1600
+ └── .aios/ # Framework reference (git submodule)
1601
+ ```
1602
+
1603
+ **Benefits:**
1604
+ - ✅ Framework versioning independent of project
1605
+ - ✅ Easier framework updates
1606
+ - ✅ Cleaner project structure
1607
+ - ✅ Multiple projects share same framework
1608
+
1609
+ **Migration Timeline:**
1610
+ - **Q1 2026:** Prepare for separation
1611
+ - **Q2 2026:** Execute repository split
1612
+ - **Q3 2026:** Complete migration
1613
+
1614
+ ---
1615
+
1616
+ ## Subdirectory Migration Plan
1617
+
1618
+ ### The Challenge (Story 6.1.15+)
1619
+
1620
+ **Current Structure:** Flat files in `.aios-core/{type}/`
1621
+ ```
1622
+ .aios-core/
1623
+ ├── tasks/
1624
+ │ ├── create-doc.md
1625
+ │ ├── develop-story.md
1626
+ │ ├── generate-tests.md
1627
+ │ └── ... (60+ files)
1628
+ ```
1629
+
1630
+ **Proposed Structure:** Organized subdirectories
1631
+ ```
1632
+ .aios-core/
1633
+ ├── tasks/
1634
+ │ ├── documentation/
1635
+ │ │ ├── create-doc.md
1636
+ │ │ └── document-project.md
1637
+ │ ├── development/
1638
+ │ │ ├── develop-story.md
1639
+ │ │ └── apply-qa-fixes.md
1640
+ │ └── testing/
1641
+ │ ├── generate-tests.md
1642
+ │ └── nfr-assess.md
1643
+ ```
1644
+
1645
+ ---
1646
+
1647
+ ### Migration Phases
1648
+
1649
+ **Phase 0: Validation (Story 6.1.15)**
1650
+ - Duration: 2-3 days
1651
+ - Investment: $100-150
1652
+ - Goal: Test subdirectory architecture works
1653
+ - Deliverable: GO/NO-GO decision
1654
+
1655
+ **Phase 1: Core Infrastructure (Story 6.1.16)**
1656
+ - Duration: 1.5 days
1657
+ - Investment: $75
1658
+ - Goal: Update file resolution logic
1659
+ - Deliverable: Scripts support subdirectories
1660
+
1661
+ **Phase 2: File Migration (Stories 6.1.17-19)**
1662
+ - Duration: 10-15 days
1663
+ - Investment: $500-750
1664
+ - Goal: Move files to subdirectories
1665
+ - Deliverable: Organized framework structure
1666
+
1667
+ **Phase 3: Reference Updates (Story 6.1.20)**
1668
+ - Duration: 1 day
1669
+ - Investment: $50
1670
+ - Goal: Update all agent references
1671
+ - Deliverable: All references correct
1672
+
1673
+ **Phase 4: Cleanup (Story 6.1.21)**
1674
+ - Duration: 0.5 day
1675
+ - Investment: $25
1676
+ - Goal: Remove backward compatibility
1677
+ - Deliverable: Optimized system
1678
+
1679
+ **Total Effort:** 15-21 days, $750-1,050
1680
+
1681
+ ---
1682
+
1683
+ ### Proposed Subdirectory Organization
1684
+
1685
+ **data/ subdirectories:**
1686
+ ```
1687
+ data/
1688
+ ├── agile/ # Agile/Scrum knowledge
1689
+ ├── architecture/ # Architecture patterns
1690
+ ├── design-systems/ # UX/Design frameworks
1691
+ ├── database/ # Database knowledge
1692
+ ├── infrastructure/ # DevOps/Infrastructure
1693
+ ├── quality/ # Testing/QA knowledge
1694
+ └── technical/ # Technical standards
1695
+ ```
1696
+
1697
+ **tasks/ subdirectories:**
1698
+ ```
1699
+ tasks/
1700
+ ├── agile/ # Story management
1701
+ ├── architecture/ # Architecture tasks
1702
+ ├── database/ # Database tasks
1703
+ ├── data-engineering/ # Data engineering
1704
+ ├── development/ # Development tasks
1705
+ ├── devops/ # DevOps tasks
1706
+ ├── documentation/ # Documentation tasks
1707
+ ├── quality/ # QA tasks
1708
+ ├── research/ # Research/Analysis
1709
+ ├── ux-design/ # UX/Design tasks
1710
+ └── framework/ # Framework management
1711
+ ```
1712
+
1713
+ **templates/ subdirectories:**
1714
+ ```
1715
+ templates/
1716
+ ├── agile/ # Story, epic templates
1717
+ ├── architecture/ # Architecture templates
1718
+ ├── database/ # Database templates
1719
+ ├── infrastructure/ # Infrastructure templates
1720
+ ├── product/ # PRD, brief templates
1721
+ └── ux-design/ # Design templates
1722
+ ```
1723
+
1724
+ ---
1725
+
1726
+ ### Risk Mitigation
1727
+
1728
+ **Risks:**
1729
+ 1. ❌ Breaking agent loading
1730
+ 2. ❌ Performance degradation
1731
+ 3. ❌ Incomplete migration
1732
+ 4. ❌ Script path resolution failures
1733
+
1734
+ **Mitigations:**
1735
+ 1. ✅ Test in isolated environment first (Phase 0)
1736
+ 2. ✅ Benchmark performance during validation
1737
+ 3. ✅ Automated migration scripts + validation
1738
+ 4. ✅ Comprehensive script audit (Phase 1)
1739
+ 5. ✅ Backward compatibility during migration
1740
+ 6. ✅ Git-based rollback strategy
1741
+
1742
+ ---
1743
+
1744
+ # Part VIII: Appendices
1745
+
1746
+ ## Glossary
1747
+
1748
+ ### Core Concepts
1749
+
1750
+ **AIOS:** AI Operating System - Framework for orchestrating AI agents and workflows
1751
+
1752
+ **Agent:** AI-powered executor with personality, specialized role, and commands
1753
+
1754
+ **Task:** Executable workflow with inputs, outputs, validation, and error handling
1755
+
1756
+ **Workflow:** Multi-step orchestration coordinating multiple agents/tasks
1757
+
1758
+ **Executor:** Entity that executes tasks (Agente, Worker, Humano, Clone)
1759
+
1760
+ **Archetype:** Personality template (Builder, Guardian, Balancer, etc.)
1761
+
1762
+ **Persona Profile:** Agent personality configuration (communication, vocabulary, greetings)
1763
+
1764
+ **Greeting System:** Contextual agent activation with status, context, and commands
1765
+
1766
+ **Quality Gate:** Validation checkpoint using CodeRabbit or manual review
1767
+
1768
+ **Fork/Join:** Parallel execution pattern with synchronization
1769
+
1770
+ **Organizer-Worker:** Dynamic work distribution pattern
1771
+
1772
+ **Execution Mode:** YOLO (autonomous), Interactive (balanced), Pre-Flight (comprehensive)
1773
+
1774
+ ---
1775
+
1776
+ ### File Types
1777
+
1778
+ **Agent Definition (.md):** Agent personality, role, commands, dependencies
1779
+
1780
+ **Task Definition (.md):** Executable workflow with YAML specification
1781
+
1782
+ **Template (.yaml/.md):** Document generator with variables and structure
1783
+
1784
+ **Workflow (.yaml):** Multi-agent orchestration definition
1785
+
1786
+ **Checklist (.md):** Validation process with checkboxes
1787
+
1788
+ **Data/KB (.md/.yaml):** Knowledge base, reference material
1789
+
1790
+ **Script (.js):** Utility, automation, or tool
1791
+
1792
+ **Config (.yaml):** Configuration file
1793
+
1794
+ ---
1795
+
1796
+ ### Patterns
1797
+
1798
+ **MCP (Model Context Protocol):** Integration protocol for external tools
1799
+
1800
+ **RLS (Row Level Security):** Database security at row level
1801
+
1802
+ **RBAC (Role-Based Access Control):** Permission system
1803
+
1804
+ **JWT (JSON Web Token):** Authentication token standard
1805
+
1806
+ **ETL (Extract, Transform, Load):** Data pipeline pattern
1807
+
1808
+ **CRUD (Create, Read, Update, Delete):** Basic operations
1809
+
1810
+ **CI/CD (Continuous Integration/Deployment):** Automation pipeline
1811
+
1812
+ **PRD (Product Requirements Document):** Product specification
1813
+
1814
+ **NFR (Non-Functional Requirements):** Quality attributes
1815
+
1816
+ ---
1817
+
1818
+ ## Decision History
1819
+
1820
+ ### Major Architectural Decisions
1821
+
1822
+ **Decision 001:** Agent Personalization Standard (2025-01-14)
1823
+ - **Status:** Implemented
1824
+ - **Decision:** Three-layer personality system (persona → formatter → output)
1825
+ - **Rationale:** Familiaridade + Personalização = Produtividade
1826
+
1827
+ **Decision 002:** Unified Greeting System (2025-01-16)
1828
+ - **Status:** Implemented
1829
+ - **Decision:** Single greeting generator for all agents
1830
+ - **Rationale:** Consistency, performance, maintainability
1831
+
1832
+ **Decision 003:** Task Format v2.0 (2025-11-13)
1833
+ - **Status:** Implemented
1834
+ - **Decision:** Universal task specification with execution modes
1835
+ - **Rationale:** Scalability, reusability, clarity
1836
+
1837
+ **Decision 004:** Open Source vs Service (2025-01-14)
1838
+ - **Status:** Defined
1839
+ - **Decision:** Open-source = Agente-only, Service = All executors
1840
+ - **Rationale:** Community vs commercial differentiation
1841
+
1842
+ **Decision 005:** Repository Restructuring (2025-01-15)
1843
+ - **Status:** Planned (Q2 2026)
1844
+ - **Decision:** Split framework and project repositories
1845
+ - **Rationale:** Independent versioning, cleaner structure
1846
+
1847
+ **Decision 006:** Subdirectory Migration (2025-01-18)
1848
+ - **Status:** Approved (Pending validation)
1849
+ - **Decision:** Organize framework files in domain subdirectories
1850
+ - **Rationale:** Scalability, better organization, expansion packs support
1851
+
1852
+ **Decision 007:** Expansion Pack Architecture (2025-01-18)
1853
+ - **Status:** REJECTED (Conflict with AIOS principles)
1854
+ - **Decision:** NO new directory types (methodologies/, patterns/)
1855
+ - **Rationale:** Violates 7-type framework structure
1856
+ - **Alternative:** Use subdirectories in existing types (data/, tasks/, templates/)
1857
+
1858
+ ---
1859
+
1860
+ ## References
1861
+
1862
+ ### Internal Documentation
1863
+
1864
+ - **Framework Structure:** `docs/architecture/source-tree.md`
1865
+ - **Coding Standards:** `docs/framework/coding-standards.md`
1866
+ - **Technology Stack:** `docs/framework/tech-stack.md`
1867
+ - **Agent Standard:** `.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md`
1868
+ - **Task Format:** `.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md`
1869
+ - **Executor Tree:** `.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md`
1870
+ - **Architectural Decisions:** `.aios-core/docs/standards/V3-ARCHITECTURAL-DECISIONS.md`
1871
+ - **Repository Restructuring:** `docs/decisions/decision-005-repository-restructuring-FINAL.md`
1872
+
1873
+ ### Implementation Stories
1874
+
1875
+ - **Story 6.1.4:** Unified Greeting System Integration
1876
+ - **Story 6.1.10:** Dependencies & Data Files Migration
1877
+ - **Story 6.1.11:** AIOS-Master Tasks Creation
1878
+ - **Story 6.1.12:** Fork/Join Workflow Operations
1879
+ - **Story 6.1.13:** Organizer-Worker Pattern Implementation
1880
+
1881
+ ### External Resources
1882
+
1883
+ - **Atomic Design:** Brad Frost's methodology
1884
+ - **Twelve-Factor App:** Methodology for SaaS applications
1885
+ - **MCP Protocol:** Model Context Protocol specification
1886
+ - **Supabase Docs:** https://supabase.com/docs
1887
+ - **Next.js Docs:** https://nextjs.org/docs
1888
+ - **NestJS Docs:** https://docs.nestjs.com
1889
+
1890
+ ---
1891
+
1892
+ ## Contributing
1893
+
1894
+ ### How to Contribute
1895
+
1896
+ 1. **Read this document** - Understand AIOS principles
1897
+ 2. **Choose an area** - Framework, agents, tasks, workflows
1898
+ 3. **Follow standards** - Coding standards, naming conventions
1899
+ 4. **Test thoroughly** - Unit tests, integration tests
1900
+ 5. **Document changes** - Update relevant docs
1901
+ 6. **Submit PR** - Follow PR template
1902
+
1903
+ ### PR Template
1904
+
1905
+ ```markdown
1906
+ ## Story Reference
1907
+ [Story 6.1.X] {Story Title}
1908
+
1909
+ ## Changes
1910
+ - [ ] Agent definitions updated
1911
+ - [ ] Task files created/modified
1912
+ - [ ] Templates added/changed
1913
+ - [ ] Tests added
1914
+ - [ ] Documentation updated
1915
+
1916
+ ## Testing
1917
+ - [ ] Unit tests pass
1918
+ - [ ] Integration tests pass
1919
+ - [ ] Manual testing complete
1920
+
1921
+ ## CodeRabbit Review
1922
+ - [ ] Pre-commit review passed
1923
+ - [ ] All CRITICAL issues resolved
1924
+ - [ ] HIGH issues addressed or documented
1925
+
1926
+ ## Checklist
1927
+ - [ ] Follows coding standards
1928
+ - [ ] Naming conventions correct
1929
+ - [ ] No breaking changes (or documented)
1930
+ - [ ] Backward compatible
1931
+ ```
1932
+
1933
+ ---
1934
+
1935
+ ## Support & Contact
1936
+
1937
+ ### Getting Help
1938
+
1939
+ 1. **Documentation First:** Check this master document
1940
+ 2. **Framework Docs:** Review specific docs in `docs/framework/`
1941
+ 3. **Decision History:** Check `docs/decisions/`
1942
+ 4. **Story Context:** Review implementation stories
1943
+
1944
+ ### Framework Team
1945
+
1946
+ - **Architect:** Aria (@architect)
1947
+ - **Lead Developer:** Dex (@dev)
1948
+ - **Quality Lead:** Quinn (@qa)
1949
+ - **Product Owner:** Pax (@po)
1950
+
1951
+ ---
1952
+
1953
+ **Document Version:** 2.0.0
1954
+ **Last Updated:** 2025-01-18
1955
+ **Maintained By:** AIOS Framework Team
1956
+ **Status:** Living Document
1957
+
1958
+ ---
1959
+
1960
+ *This document consolidates all AIOS framework documentation into a single, comprehensive reference. It is a living document and will be updated as the framework evolves.*
1961
+
1962
+ — Aria, arquitetando o futuro 🏗️
1963
+