aios-core 1.0.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 (662) hide show
  1. package/.aios-core/cli/commands/generate/index.js +222 -0
  2. package/.aios-core/cli/commands/manifest/index.js +46 -0
  3. package/.aios-core/cli/commands/manifest/regenerate.js +96 -0
  4. package/.aios-core/cli/commands/manifest/validate.js +66 -0
  5. package/.aios-core/cli/commands/mcp/add.js +234 -0
  6. package/.aios-core/cli/commands/mcp/index.js +76 -0
  7. package/.aios-core/cli/commands/mcp/link.js +217 -0
  8. package/.aios-core/cli/commands/mcp/setup.js +164 -0
  9. package/.aios-core/cli/commands/mcp/status.js +183 -0
  10. package/.aios-core/cli/commands/metrics/cleanup.js +91 -0
  11. package/.aios-core/cli/commands/metrics/index.js +65 -0
  12. package/.aios-core/cli/commands/metrics/record.js +154 -0
  13. package/.aios-core/cli/commands/metrics/seed.js +126 -0
  14. package/.aios-core/cli/commands/metrics/show.js +209 -0
  15. package/.aios-core/cli/commands/migrate/analyze.js +353 -0
  16. package/.aios-core/cli/commands/migrate/backup.js +352 -0
  17. package/.aios-core/cli/commands/migrate/execute.js +292 -0
  18. package/.aios-core/cli/commands/migrate/index.js +441 -0
  19. package/.aios-core/cli/commands/migrate/rollback.js +323 -0
  20. package/.aios-core/cli/commands/migrate/update-imports.js +396 -0
  21. package/.aios-core/cli/commands/migrate/validate.js +452 -0
  22. package/.aios-core/cli/commands/qa/index.js +56 -0
  23. package/.aios-core/cli/commands/qa/run.js +163 -0
  24. package/.aios-core/cli/commands/qa/status.js +195 -0
  25. package/.aios-core/cli/commands/workers/formatters/info-formatter.js +274 -0
  26. package/.aios-core/cli/commands/workers/formatters/list-table.js +265 -0
  27. package/.aios-core/cli/commands/workers/formatters/list-tree.js +159 -0
  28. package/.aios-core/cli/commands/workers/index.js +56 -0
  29. package/.aios-core/cli/commands/workers/info.js +194 -0
  30. package/.aios-core/cli/commands/workers/list.js +214 -0
  31. package/.aios-core/cli/commands/workers/search-filters.js +185 -0
  32. package/.aios-core/cli/commands/workers/search-keyword.js +310 -0
  33. package/.aios-core/cli/commands/workers/search-semantic.js +293 -0
  34. package/.aios-core/cli/commands/workers/search.js +154 -0
  35. package/.aios-core/cli/commands/workers/utils/pagination.js +102 -0
  36. package/.aios-core/cli/index.js +128 -0
  37. package/.aios-core/cli/utils/output-formatter-cli.js +232 -0
  38. package/.aios-core/cli/utils/score-calculator.js +221 -0
  39. package/.aios-core/core/README.md +229 -0
  40. package/.aios-core/core/config/config-cache.js +233 -0
  41. package/.aios-core/core/config/config-loader.js +277 -0
  42. package/.aios-core/core/docs/SHARD-TRANSLATION-GUIDE.md +335 -0
  43. package/.aios-core/core/docs/component-creation-guide.md +458 -0
  44. package/.aios-core/core/docs/session-update-pattern.md +314 -0
  45. package/.aios-core/core/docs/template-syntax.md +267 -0
  46. package/.aios-core/core/docs/troubleshooting-guide.md +625 -0
  47. package/.aios-core/core/elicitation/agent-elicitation.js +272 -0
  48. package/.aios-core/core/elicitation/elicitation-engine.js +484 -0
  49. package/.aios-core/core/elicitation/session-manager.js +321 -0
  50. package/.aios-core/core/elicitation/task-elicitation.js +281 -0
  51. package/.aios-core/core/elicitation/workflow-elicitation.js +315 -0
  52. package/.aios-core/core/index.esm.js +42 -0
  53. package/.aios-core/core/index.js +76 -0
  54. package/.aios-core/core/manifest/manifest-generator.js +386 -0
  55. package/.aios-core/core/manifest/manifest-validator.js +429 -0
  56. package/.aios-core/core/mcp/config-migrator.js +340 -0
  57. package/.aios-core/core/mcp/global-config-manager.js +369 -0
  58. package/.aios-core/core/mcp/index.js +34 -0
  59. package/.aios-core/core/mcp/os-detector.js +188 -0
  60. package/.aios-core/core/mcp/symlink-manager.js +413 -0
  61. package/.aios-core/core/migration/migration-config.yaml +83 -0
  62. package/.aios-core/core/migration/module-mapping.yaml +89 -0
  63. package/.aios-core/core/quality-gates/base-layer.js +134 -0
  64. package/.aios-core/core/quality-gates/checklist-generator.js +329 -0
  65. package/.aios-core/core/quality-gates/focus-area-recommender.js +359 -0
  66. package/.aios-core/core/quality-gates/human-review-orchestrator.js +529 -0
  67. package/.aios-core/core/quality-gates/layer1-precommit.js +336 -0
  68. package/.aios-core/core/quality-gates/layer2-pr-automation.js +324 -0
  69. package/.aios-core/core/quality-gates/layer3-human-review.js +348 -0
  70. package/.aios-core/core/quality-gates/notification-manager.js +550 -0
  71. package/.aios-core/core/quality-gates/quality-gate-config.yaml +86 -0
  72. package/.aios-core/core/quality-gates/quality-gate-manager.js +601 -0
  73. package/.aios-core/core/registry/README.md +179 -0
  74. package/.aios-core/core/registry/build-registry.js +452 -0
  75. package/.aios-core/core/registry/registry-loader.js +330 -0
  76. package/.aios-core/core/registry/registry-schema.json +166 -0
  77. package/.aios-core/core/registry/service-registry.json +6586 -0
  78. package/.aios-core/core/registry/validate-registry.js +340 -0
  79. package/.aios-core/core/session/context-detector.js +232 -0
  80. package/.aios-core/core/session/context-loader.js +442 -0
  81. package/.aios-core/core/utils/output-formatter.js +298 -0
  82. package/.aios-core/core/utils/security-utils.js +333 -0
  83. package/.aios-core/core/utils/yaml-validator.js +419 -0
  84. package/.aios-core/core-config.yaml +497 -0
  85. package/.aios-core/data/agent-config-requirements.yaml +368 -0
  86. package/.aios-core/data/aios-kb.md +924 -0
  87. package/.aios-core/data/learned-patterns.yaml +3 -0
  88. package/.aios-core/data/technical-preferences.md +4 -0
  89. package/.aios-core/data/workflow-patterns.yaml +611 -0
  90. package/.aios-core/development/README.md +142 -0
  91. package/.aios-core/development/agent-teams/team-all.yaml +15 -0
  92. package/.aios-core/development/agent-teams/team-fullstack.yaml +18 -0
  93. package/.aios-core/development/agent-teams/team-ide-minimal.yaml +10 -0
  94. package/.aios-core/development/agent-teams/team-no-ui.yaml +13 -0
  95. package/.aios-core/development/agent-teams/team-qa-focused.yaml +155 -0
  96. package/.aios-core/development/agents/aios-master.md +370 -0
  97. package/.aios-core/development/agents/analyst.md +195 -0
  98. package/.aios-core/development/agents/architect.md +363 -0
  99. package/.aios-core/development/agents/data-engineer.md +468 -0
  100. package/.aios-core/development/agents/dev.md +403 -0
  101. package/.aios-core/development/agents/devops.md +410 -0
  102. package/.aios-core/development/agents/pm.md +198 -0
  103. package/.aios-core/development/agents/po.md +256 -0
  104. package/.aios-core/development/agents/qa.md +312 -0
  105. package/.aios-core/development/agents/sm.md +220 -0
  106. package/.aios-core/development/agents/squad-creator.md +302 -0
  107. package/.aios-core/development/agents/ux-design-expert.md +471 -0
  108. package/.aios-core/development/scripts/agent-assignment-resolver.js +231 -0
  109. package/.aios-core/development/scripts/agent-config-loader.js +624 -0
  110. package/.aios-core/development/scripts/agent-exit-hooks.js +96 -0
  111. package/.aios-core/development/scripts/apply-inline-greeting-all-agents.js +146 -0
  112. package/.aios-core/development/scripts/audit-agent-config.js +380 -0
  113. package/.aios-core/development/scripts/backlog-manager.js +404 -0
  114. package/.aios-core/development/scripts/batch-update-agents-session-context.js +95 -0
  115. package/.aios-core/development/scripts/decision-context.js +228 -0
  116. package/.aios-core/development/scripts/decision-log-generator.js +293 -0
  117. package/.aios-core/development/scripts/decision-log-indexer.js +284 -0
  118. package/.aios-core/development/scripts/decision-recorder.js +168 -0
  119. package/.aios-core/development/scripts/dev-context-loader.js +297 -0
  120. package/.aios-core/development/scripts/generate-greeting.js +160 -0
  121. package/.aios-core/development/scripts/greeting-builder.js +866 -0
  122. package/.aios-core/development/scripts/greeting-config-cli.js +85 -0
  123. package/.aios-core/development/scripts/greeting-preference-manager.js +145 -0
  124. package/.aios-core/development/scripts/migrate-task-to-v2.js +377 -0
  125. package/.aios-core/development/scripts/squad/README.md +112 -0
  126. package/.aios-core/development/scripts/squad/index.js +123 -0
  127. package/.aios-core/development/scripts/squad/squad-analyzer.js +638 -0
  128. package/.aios-core/development/scripts/squad/squad-designer.js +1010 -0
  129. package/.aios-core/development/scripts/squad/squad-downloader.js +510 -0
  130. package/.aios-core/development/scripts/squad/squad-extender.js +871 -0
  131. package/.aios-core/development/scripts/squad/squad-generator.js +1405 -0
  132. package/.aios-core/development/scripts/squad/squad-loader.js +359 -0
  133. package/.aios-core/development/scripts/squad/squad-migrator.js +632 -0
  134. package/.aios-core/development/scripts/squad/squad-publisher.js +629 -0
  135. package/.aios-core/development/scripts/squad/squad-validator.js +783 -0
  136. package/.aios-core/development/scripts/story-index-generator.js +337 -0
  137. package/.aios-core/development/scripts/story-manager.js +375 -0
  138. package/.aios-core/development/scripts/story-update-hook.js +259 -0
  139. package/.aios-core/development/scripts/task-identifier-resolver.js +145 -0
  140. package/.aios-core/development/scripts/test-greeting-system.js +142 -0
  141. package/.aios-core/development/scripts/validate-task-v2.js +319 -0
  142. package/.aios-core/development/scripts/workflow-navigator.js +214 -0
  143. package/.aios-core/development/tasks/add-mcp.md +436 -0
  144. package/.aios-core/development/tasks/advanced-elicitation.md +319 -0
  145. package/.aios-core/development/tasks/analyst-facilitate-brainstorming.md +342 -0
  146. package/.aios-core/development/tasks/analyze-brownfield.md +456 -0
  147. package/.aios-core/development/tasks/analyze-framework.md +697 -0
  148. package/.aios-core/development/tasks/analyze-performance.md +637 -0
  149. package/.aios-core/development/tasks/analyze-project-structure.md +621 -0
  150. package/.aios-core/development/tasks/apply-qa-fixes.md +340 -0
  151. package/.aios-core/development/tasks/architect-analyze-impact.md +827 -0
  152. package/.aios-core/development/tasks/audit-codebase.md +429 -0
  153. package/.aios-core/development/tasks/audit-tailwind-config.md +270 -0
  154. package/.aios-core/development/tasks/audit-utilities.md +358 -0
  155. package/.aios-core/development/tasks/bootstrap-shadcn-library.md +286 -0
  156. package/.aios-core/development/tasks/brownfield-create-epic.md +486 -0
  157. package/.aios-core/development/tasks/brownfield-create-story.md +357 -0
  158. package/.aios-core/development/tasks/build-component.md +478 -0
  159. package/.aios-core/development/tasks/calculate-roi.md +455 -0
  160. package/.aios-core/development/tasks/ci-cd-configuration.md +764 -0
  161. package/.aios-core/development/tasks/cleanup-utilities.md +670 -0
  162. package/.aios-core/development/tasks/collaborative-edit.md +1109 -0
  163. package/.aios-core/development/tasks/compose-molecule.md +284 -0
  164. package/.aios-core/development/tasks/consolidate-patterns.md +414 -0
  165. package/.aios-core/development/tasks/correct-course.md +280 -0
  166. package/.aios-core/development/tasks/create-agent.md +322 -0
  167. package/.aios-core/development/tasks/create-brownfield-story.md +727 -0
  168. package/.aios-core/development/tasks/create-deep-research-prompt.md +499 -0
  169. package/.aios-core/development/tasks/create-doc.md +316 -0
  170. package/.aios-core/development/tasks/create-next-story.md +774 -0
  171. package/.aios-core/development/tasks/create-service.md +391 -0
  172. package/.aios-core/development/tasks/create-suite.md +284 -0
  173. package/.aios-core/development/tasks/create-task.md +372 -0
  174. package/.aios-core/development/tasks/create-workflow.md +371 -0
  175. package/.aios-core/development/tasks/db-analyze-hotpaths.md +572 -0
  176. package/.aios-core/development/tasks/db-apply-migration.md +381 -0
  177. package/.aios-core/development/tasks/db-bootstrap.md +642 -0
  178. package/.aios-core/development/tasks/db-domain-modeling.md +693 -0
  179. package/.aios-core/development/tasks/db-dry-run.md +293 -0
  180. package/.aios-core/development/tasks/db-env-check.md +260 -0
  181. package/.aios-core/development/tasks/db-expansion-pack-integration.md +663 -0
  182. package/.aios-core/development/tasks/db-explain.md +631 -0
  183. package/.aios-core/development/tasks/db-impersonate.md +495 -0
  184. package/.aios-core/development/tasks/db-load-csv.md +593 -0
  185. package/.aios-core/development/tasks/db-policy-apply.md +653 -0
  186. package/.aios-core/development/tasks/db-rls-audit.md +411 -0
  187. package/.aios-core/development/tasks/db-rollback.md +739 -0
  188. package/.aios-core/development/tasks/db-run-sql.md +613 -0
  189. package/.aios-core/development/tasks/db-schema-audit.md +1011 -0
  190. package/.aios-core/development/tasks/db-seed.md +390 -0
  191. package/.aios-core/development/tasks/db-smoke-test.md +351 -0
  192. package/.aios-core/development/tasks/db-snapshot.md +569 -0
  193. package/.aios-core/development/tasks/db-supabase-setup.md +712 -0
  194. package/.aios-core/development/tasks/db-verify-order.md +515 -0
  195. package/.aios-core/development/tasks/deprecate-component.md +957 -0
  196. package/.aios-core/development/tasks/dev-apply-qa-fixes.md +318 -0
  197. package/.aios-core/development/tasks/dev-backlog-debt.md +469 -0
  198. package/.aios-core/development/tasks/dev-develop-story.md +846 -0
  199. package/.aios-core/development/tasks/dev-improve-code-quality.md +873 -0
  200. package/.aios-core/development/tasks/dev-optimize-performance.md +1034 -0
  201. package/.aios-core/development/tasks/dev-suggest-refactoring.md +871 -0
  202. package/.aios-core/development/tasks/dev-validate-next-story.md +349 -0
  203. package/.aios-core/development/tasks/document-project.md +553 -0
  204. package/.aios-core/development/tasks/environment-bootstrap.md +1311 -0
  205. package/.aios-core/development/tasks/execute-checklist.md +301 -0
  206. package/.aios-core/development/tasks/export-design-tokens-dtcg.md +274 -0
  207. package/.aios-core/development/tasks/extend-pattern.md +269 -0
  208. package/.aios-core/development/tasks/extract-tokens.md +467 -0
  209. package/.aios-core/development/tasks/facilitate-brainstorming-session.md +518 -0
  210. package/.aios-core/development/tasks/generate-ai-frontend-prompt.md +261 -0
  211. package/.aios-core/development/tasks/generate-documentation.md +284 -0
  212. package/.aios-core/development/tasks/generate-migration-strategy.md +522 -0
  213. package/.aios-core/development/tasks/generate-shock-report.md +501 -0
  214. package/.aios-core/development/tasks/github-devops-github-pr-automation.md +664 -0
  215. package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +733 -0
  216. package/.aios-core/development/tasks/github-devops-repository-cleanup.md +374 -0
  217. package/.aios-core/development/tasks/github-devops-version-management.md +483 -0
  218. package/.aios-core/development/tasks/improve-self.md +823 -0
  219. package/.aios-core/development/tasks/index-docs.md +388 -0
  220. package/.aios-core/development/tasks/init-project-status.md +506 -0
  221. package/.aios-core/development/tasks/integrate-expansion-pack.md +314 -0
  222. package/.aios-core/development/tasks/kb-mode-interaction.md +284 -0
  223. package/.aios-core/development/tasks/learn-patterns.md +901 -0
  224. package/.aios-core/development/tasks/mcp-workflow.md +437 -0
  225. package/.aios-core/development/tasks/modify-agent.md +382 -0
  226. package/.aios-core/development/tasks/modify-task.md +425 -0
  227. package/.aios-core/development/tasks/modify-workflow.md +466 -0
  228. package/.aios-core/development/tasks/next.md +294 -0
  229. package/.aios-core/development/tasks/patterns.md +334 -0
  230. package/.aios-core/development/tasks/po-backlog-add.md +370 -0
  231. package/.aios-core/development/tasks/po-manage-story-backlog.md +523 -0
  232. package/.aios-core/development/tasks/po-pull-story-from-clickup.md +540 -0
  233. package/.aios-core/development/tasks/po-pull-story.md +316 -0
  234. package/.aios-core/development/tasks/po-stories-index.md +351 -0
  235. package/.aios-core/development/tasks/po-sync-story-to-clickup.md +457 -0
  236. package/.aios-core/development/tasks/po-sync-story.md +303 -0
  237. package/.aios-core/development/tasks/pr-automation.md +701 -0
  238. package/.aios-core/development/tasks/propose-modification.md +843 -0
  239. package/.aios-core/development/tasks/qa-backlog-add-followup.md +425 -0
  240. package/.aios-core/development/tasks/qa-gate.md +374 -0
  241. package/.aios-core/development/tasks/qa-generate-tests.md +1175 -0
  242. package/.aios-core/development/tasks/qa-nfr-assess.md +558 -0
  243. package/.aios-core/development/tasks/qa-review-proposal.md +1158 -0
  244. package/.aios-core/development/tasks/qa-review-story.md +683 -0
  245. package/.aios-core/development/tasks/qa-risk-profile.md +567 -0
  246. package/.aios-core/development/tasks/qa-run-tests.md +277 -0
  247. package/.aios-core/development/tasks/qa-test-design.md +388 -0
  248. package/.aios-core/development/tasks/qa-trace-requirements.md +477 -0
  249. package/.aios-core/development/tasks/release-management.md +723 -0
  250. package/.aios-core/development/tasks/search-mcp.md +309 -0
  251. package/.aios-core/development/tasks/security-audit.md +554 -0
  252. package/.aios-core/development/tasks/security-scan.md +790 -0
  253. package/.aios-core/development/tasks/setup-database.md +741 -0
  254. package/.aios-core/development/tasks/setup-design-system.md +462 -0
  255. package/.aios-core/development/tasks/setup-github.md +874 -0
  256. package/.aios-core/development/tasks/setup-llm-routing.md +229 -0
  257. package/.aios-core/development/tasks/setup-mcp-docker.md +627 -0
  258. package/.aios-core/development/tasks/setup-project-docs.md +440 -0
  259. package/.aios-core/development/tasks/shard-doc.md +538 -0
  260. package/.aios-core/development/tasks/sm-create-next-story.md +480 -0
  261. package/.aios-core/development/tasks/squad-creator-analyze.md +315 -0
  262. package/.aios-core/development/tasks/squad-creator-create.md +312 -0
  263. package/.aios-core/development/tasks/squad-creator-design.md +334 -0
  264. package/.aios-core/development/tasks/squad-creator-download.md +167 -0
  265. package/.aios-core/development/tasks/squad-creator-extend.md +411 -0
  266. package/.aios-core/development/tasks/squad-creator-list.md +225 -0
  267. package/.aios-core/development/tasks/squad-creator-migrate.md +243 -0
  268. package/.aios-core/development/tasks/squad-creator-publish.md +229 -0
  269. package/.aios-core/development/tasks/squad-creator-sync-synkra.md +315 -0
  270. package/.aios-core/development/tasks/squad-creator-validate.md +159 -0
  271. package/.aios-core/development/tasks/sync-documentation.md +865 -0
  272. package/.aios-core/development/tasks/tailwind-upgrade.md +294 -0
  273. package/.aios-core/development/tasks/test-as-user.md +621 -0
  274. package/.aios-core/development/tasks/test-validation-task.md +171 -0
  275. package/.aios-core/development/tasks/undo-last.md +347 -0
  276. package/.aios-core/development/tasks/update-manifest.md +410 -0
  277. package/.aios-core/development/tasks/ux-create-wireframe.md +617 -0
  278. package/.aios-core/development/tasks/ux-ds-scan-artifact.md +672 -0
  279. package/.aios-core/development/tasks/ux-user-research.md +559 -0
  280. package/.aios-core/development/tasks/validate-next-story.md +423 -0
  281. package/.aios-core/development/tasks/waves.md +205 -0
  282. package/.aios-core/development/templates/service-template/README.md.hbs +158 -0
  283. package/.aios-core/development/templates/service-template/__tests__/index.test.ts.hbs +237 -0
  284. package/.aios-core/development/templates/service-template/client.ts.hbs +403 -0
  285. package/.aios-core/development/templates/service-template/errors.ts.hbs +182 -0
  286. package/.aios-core/development/templates/service-template/index.ts.hbs +120 -0
  287. package/.aios-core/development/templates/service-template/jest.config.js +89 -0
  288. package/.aios-core/development/templates/service-template/package.json.hbs +87 -0
  289. package/.aios-core/development/templates/service-template/tsconfig.json +45 -0
  290. package/.aios-core/development/templates/service-template/types.ts.hbs +145 -0
  291. package/.aios-core/development/templates/squad/agent-template.md +69 -0
  292. package/.aios-core/development/templates/squad/checklist-template.md +82 -0
  293. package/.aios-core/development/templates/squad/data-template.yaml +105 -0
  294. package/.aios-core/development/templates/squad/script-template.js +179 -0
  295. package/.aios-core/development/templates/squad/task-template.md +125 -0
  296. package/.aios-core/development/templates/squad/template-template.md +97 -0
  297. package/.aios-core/development/templates/squad/tool-template.js +103 -0
  298. package/.aios-core/development/templates/squad/workflow-template.yaml +108 -0
  299. package/.aios-core/development/workflows/README.md +84 -0
  300. package/.aios-core/development/workflows/brownfield-fullstack.yaml +297 -0
  301. package/.aios-core/development/workflows/brownfield-service.yaml +187 -0
  302. package/.aios-core/development/workflows/brownfield-ui.yaml +197 -0
  303. package/.aios-core/development/workflows/greenfield-fullstack.yaml +333 -0
  304. package/.aios-core/development/workflows/greenfield-service.yaml +206 -0
  305. package/.aios-core/development/workflows/greenfield-ui.yaml +235 -0
  306. package/.aios-core/docs/standards/AGENT-PERSONALIZATION-STANDARD-V1.md +572 -0
  307. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-QUICK-REFERENCE.md +185 -0
  308. package/.aios-core/docs/standards/AIOS-COLOR-PALETTE-V2.1.md +354 -0
  309. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +821 -0
  310. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +1339 -0
  311. package/.aios-core/docs/standards/EXECUTOR-DECISION-TREE.md +697 -0
  312. package/.aios-core/docs/standards/OPEN-SOURCE-VS-SERVICE-DIFFERENCES.md +511 -0
  313. package/.aios-core/docs/standards/QUALITY-GATES-SPECIFICATION.md +556 -0
  314. package/.aios-core/docs/standards/STANDARDS-INDEX.md +210 -0
  315. package/.aios-core/docs/standards/STORY-TEMPLATE-V2-SPECIFICATION.md +550 -0
  316. package/.aios-core/docs/standards/TASK-FORMAT-SPECIFICATION-V1.md +1414 -0
  317. package/.aios-core/elicitation/agent-elicitation.js +272 -0
  318. package/.aios-core/elicitation/task-elicitation.js +281 -0
  319. package/.aios-core/elicitation/workflow-elicitation.js +315 -0
  320. package/.aios-core/index.esm.js +16 -0
  321. package/.aios-core/index.js +16 -0
  322. package/.aios-core/infrastructure/README.md +126 -0
  323. package/.aios-core/infrastructure/index.js +199 -0
  324. package/.aios-core/infrastructure/integrations/pm-adapters/README.md +59 -0
  325. package/.aios-core/infrastructure/integrations/pm-adapters/clickup-adapter.js +345 -0
  326. package/.aios-core/infrastructure/integrations/pm-adapters/github-adapter.js +392 -0
  327. package/.aios-core/infrastructure/integrations/pm-adapters/jira-adapter.js +448 -0
  328. package/.aios-core/infrastructure/integrations/pm-adapters/local-adapter.js +175 -0
  329. package/.aios-core/infrastructure/scripts/aios-validator.js +294 -0
  330. package/.aios-core/infrastructure/scripts/approval-workflow.js +643 -0
  331. package/.aios-core/infrastructure/scripts/atomic-layer-classifier.js +308 -0
  332. package/.aios-core/infrastructure/scripts/backup-manager.js +607 -0
  333. package/.aios-core/infrastructure/scripts/batch-creator.js +608 -0
  334. package/.aios-core/infrastructure/scripts/branch-manager.js +391 -0
  335. package/.aios-core/infrastructure/scripts/capability-analyzer.js +535 -0
  336. package/.aios-core/infrastructure/scripts/clickup-helpers.js +226 -0
  337. package/.aios-core/infrastructure/scripts/code-quality-improver.js +1312 -0
  338. package/.aios-core/infrastructure/scripts/commit-message-generator.js +850 -0
  339. package/.aios-core/infrastructure/scripts/component-generator.js +738 -0
  340. package/.aios-core/infrastructure/scripts/component-metadata.js +627 -0
  341. package/.aios-core/infrastructure/scripts/component-search.js +277 -0
  342. package/.aios-core/infrastructure/scripts/config-cache.js +322 -0
  343. package/.aios-core/infrastructure/scripts/config-loader.js +349 -0
  344. package/.aios-core/infrastructure/scripts/conflict-resolver.js +675 -0
  345. package/.aios-core/infrastructure/scripts/coverage-analyzer.js +882 -0
  346. package/.aios-core/infrastructure/scripts/dependency-analyzer.js +638 -0
  347. package/.aios-core/infrastructure/scripts/dependency-impact-analyzer.js +703 -0
  348. package/.aios-core/infrastructure/scripts/diff-generator.js +129 -0
  349. package/.aios-core/infrastructure/scripts/documentation-integrity/brownfield-analyzer.js +501 -0
  350. package/.aios-core/infrastructure/scripts/documentation-integrity/config-generator.js +368 -0
  351. package/.aios-core/infrastructure/scripts/documentation-integrity/deployment-config-loader.js +308 -0
  352. package/.aios-core/infrastructure/scripts/documentation-integrity/doc-generator.js +331 -0
  353. package/.aios-core/infrastructure/scripts/documentation-integrity/gitignore-generator.js +312 -0
  354. package/.aios-core/infrastructure/scripts/documentation-integrity/index.js +74 -0
  355. package/.aios-core/infrastructure/scripts/documentation-integrity/mode-detector.js +389 -0
  356. package/.aios-core/infrastructure/scripts/documentation-synchronizer.js +1432 -0
  357. package/.aios-core/infrastructure/scripts/framework-analyzer.js +746 -0
  358. package/.aios-core/infrastructure/scripts/git-config-detector.js +293 -0
  359. package/.aios-core/infrastructure/scripts/git-wrapper.js +443 -0
  360. package/.aios-core/infrastructure/scripts/ide-sync/README.md +184 -0
  361. package/.aios-core/infrastructure/scripts/ide-sync/agent-parser.js +295 -0
  362. package/.aios-core/infrastructure/scripts/ide-sync/index.js +502 -0
  363. package/.aios-core/infrastructure/scripts/ide-sync/redirect-generator.js +200 -0
  364. package/.aios-core/infrastructure/scripts/ide-sync/transformers/antigravity.js +105 -0
  365. package/.aios-core/infrastructure/scripts/ide-sync/transformers/claude-code.js +84 -0
  366. package/.aios-core/infrastructure/scripts/ide-sync/transformers/cursor.js +94 -0
  367. package/.aios-core/infrastructure/scripts/ide-sync/transformers/trae.js +125 -0
  368. package/.aios-core/infrastructure/scripts/ide-sync/transformers/windsurf.js +106 -0
  369. package/.aios-core/infrastructure/scripts/ide-sync/validator.js +273 -0
  370. package/.aios-core/infrastructure/scripts/improvement-engine.js +758 -0
  371. package/.aios-core/infrastructure/scripts/improvement-validator.js +710 -0
  372. package/.aios-core/infrastructure/scripts/llm-routing/install-llm-routing.js +280 -0
  373. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.cmd +127 -0
  374. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free-tracked.sh +108 -0
  375. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free.cmd +80 -0
  376. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-free.sh +62 -0
  377. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-max.cmd +26 -0
  378. package/.aios-core/infrastructure/scripts/llm-routing/templates/claude-max.sh +18 -0
  379. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.cmd +71 -0
  380. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-proxy.sh +65 -0
  381. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.cmd +51 -0
  382. package/.aios-core/infrastructure/scripts/llm-routing/templates/deepseek-usage.sh +16 -0
  383. package/.aios-core/infrastructure/scripts/llm-routing/usage-tracker/index.js +549 -0
  384. package/.aios-core/infrastructure/scripts/modification-risk-assessment.js +970 -0
  385. package/.aios-core/infrastructure/scripts/modification-validator.js +555 -0
  386. package/.aios-core/infrastructure/scripts/output-formatter.js +297 -0
  387. package/.aios-core/infrastructure/scripts/performance-analyzer.js +758 -0
  388. package/.aios-core/infrastructure/scripts/performance-and-error-resolver.js +258 -0
  389. package/.aios-core/infrastructure/scripts/performance-optimizer.js +1902 -0
  390. package/.aios-core/infrastructure/scripts/performance-tracker.js +452 -0
  391. package/.aios-core/infrastructure/scripts/pm-adapter-factory.js +181 -0
  392. package/.aios-core/infrastructure/scripts/pm-adapter.js +134 -0
  393. package/.aios-core/infrastructure/scripts/project-status-loader.js +445 -0
  394. package/.aios-core/infrastructure/scripts/refactoring-suggester.js +1139 -0
  395. package/.aios-core/infrastructure/scripts/repository-detector.js +64 -0
  396. package/.aios-core/infrastructure/scripts/sandbox-tester.js +618 -0
  397. package/.aios-core/infrastructure/scripts/security-checker.js +359 -0
  398. package/.aios-core/infrastructure/scripts/spot-check-validator.js +149 -0
  399. package/.aios-core/infrastructure/scripts/status-mapper.js +115 -0
  400. package/.aios-core/infrastructure/scripts/template-engine.js +240 -0
  401. package/.aios-core/infrastructure/scripts/template-validator.js +279 -0
  402. package/.aios-core/infrastructure/scripts/test-generator.js +844 -0
  403. package/.aios-core/infrastructure/scripts/test-quality-assessment.js +1081 -0
  404. package/.aios-core/infrastructure/scripts/test-utilities-fast.js +126 -0
  405. package/.aios-core/infrastructure/scripts/test-utilities.js +200 -0
  406. package/.aios-core/infrastructure/scripts/tool-resolver.js +360 -0
  407. package/.aios-core/infrastructure/scripts/transaction-manager.js +590 -0
  408. package/.aios-core/infrastructure/scripts/usage-analytics.js +634 -0
  409. package/.aios-core/infrastructure/scripts/validate-output-pattern.js +213 -0
  410. package/.aios-core/infrastructure/scripts/visual-impact-generator.js +1056 -0
  411. package/.aios-core/infrastructure/scripts/yaml-validator.js +397 -0
  412. package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -0
  413. package/.aios-core/infrastructure/templates/core-config/core-config-brownfield.tmpl.yaml +176 -0
  414. package/.aios-core/infrastructure/templates/core-config/core-config-greenfield.tmpl.yaml +168 -0
  415. package/.aios-core/infrastructure/templates/github-workflows/README.md +109 -0
  416. package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -0
  417. package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -0
  418. package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -0
  419. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -0
  420. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -0
  421. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -0
  422. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -0
  423. package/.aios-core/infrastructure/templates/project-docs/coding-standards-tmpl.md +346 -0
  424. package/.aios-core/infrastructure/templates/project-docs/source-tree-tmpl.md +177 -0
  425. package/.aios-core/infrastructure/templates/project-docs/tech-stack-tmpl.md +267 -0
  426. package/.aios-core/infrastructure/tests/project-status-loader.test.js +394 -0
  427. package/.aios-core/infrastructure/tests/regression-suite-v2.md +621 -0
  428. package/.aios-core/infrastructure/tests/validate-module.js +97 -0
  429. package/.aios-core/infrastructure/tools/README.md +222 -0
  430. package/.aios-core/infrastructure/tools/cli/github-cli.yaml +200 -0
  431. package/.aios-core/infrastructure/tools/cli/llm-routing.yaml +126 -0
  432. package/.aios-core/infrastructure/tools/cli/railway-cli.yaml +260 -0
  433. package/.aios-core/infrastructure/tools/cli/supabase-cli.yaml +224 -0
  434. package/.aios-core/infrastructure/tools/local/ffmpeg.yaml +261 -0
  435. package/.aios-core/infrastructure/tools/mcp/21st-dev-magic.yaml +127 -0
  436. package/.aios-core/infrastructure/tools/mcp/browser.yaml +103 -0
  437. package/.aios-core/infrastructure/tools/mcp/clickup.yaml +534 -0
  438. package/.aios-core/infrastructure/tools/mcp/context7.yaml +78 -0
  439. package/.aios-core/infrastructure/tools/mcp/desktop-commander.yaml +180 -0
  440. package/.aios-core/infrastructure/tools/mcp/exa.yaml +103 -0
  441. package/.aios-core/infrastructure/tools/mcp/google-workspace.yaml +930 -0
  442. package/.aios-core/infrastructure/tools/mcp/n8n.yaml +551 -0
  443. package/.aios-core/infrastructure/tools/mcp/supabase.yaml +808 -0
  444. package/.aios-core/install-manifest.yaml +2338 -0
  445. package/.aios-core/manifests/schema/manifest-schema.json +190 -0
  446. package/.aios-core/package.json +103 -0
  447. package/.aios-core/product/README.md +56 -0
  448. package/.aios-core/product/checklists/accessibility-wcag-checklist.md +80 -0
  449. package/.aios-core/product/checklists/architect-checklist.md +444 -0
  450. package/.aios-core/product/checklists/change-checklist.md +183 -0
  451. package/.aios-core/product/checklists/component-quality-checklist.md +74 -0
  452. package/.aios-core/product/checklists/database-design-checklist.md +119 -0
  453. package/.aios-core/product/checklists/dba-predeploy-checklist.md +97 -0
  454. package/.aios-core/product/checklists/dba-rollback-checklist.md +99 -0
  455. package/.aios-core/product/checklists/migration-readiness-checklist.md +75 -0
  456. package/.aios-core/product/checklists/pattern-audit-checklist.md +88 -0
  457. package/.aios-core/product/checklists/pm-checklist.md +376 -0
  458. package/.aios-core/product/checklists/po-master-checklist.md +442 -0
  459. package/.aios-core/product/checklists/pre-push-checklist.md +108 -0
  460. package/.aios-core/product/checklists/release-checklist.md +122 -0
  461. package/.aios-core/product/checklists/story-dod-checklist.md +102 -0
  462. package/.aios-core/product/checklists/story-draft-checklist.md +216 -0
  463. package/.aios-core/product/data/atomic-design-principles.md +108 -0
  464. package/.aios-core/product/data/brainstorming-techniques.md +37 -0
  465. package/.aios-core/product/data/consolidation-algorithms.md +142 -0
  466. package/.aios-core/product/data/database-best-practices.md +182 -0
  467. package/.aios-core/product/data/design-token-best-practices.md +107 -0
  468. package/.aios-core/product/data/elicitation-methods.md +135 -0
  469. package/.aios-core/product/data/integration-patterns.md +207 -0
  470. package/.aios-core/product/data/migration-safety-guide.md +329 -0
  471. package/.aios-core/product/data/mode-selection-best-practices.md +471 -0
  472. package/.aios-core/product/data/postgres-tuning-guide.md +300 -0
  473. package/.aios-core/product/data/rls-security-patterns.md +333 -0
  474. package/.aios-core/product/data/roi-calculation-guide.md +142 -0
  475. package/.aios-core/product/data/supabase-patterns.md +330 -0
  476. package/.aios-core/product/data/test-levels-framework.md +149 -0
  477. package/.aios-core/product/data/test-priorities-matrix.md +175 -0
  478. package/.aios-core/product/data/wcag-compliance-guide.md +267 -0
  479. package/.aios-core/product/templates/activation-instructions-inline-greeting.yaml +63 -0
  480. package/.aios-core/product/templates/activation-instructions-template.md +258 -0
  481. package/.aios-core/product/templates/adr.hbs +125 -0
  482. package/.aios-core/product/templates/agent-template.yaml +121 -0
  483. package/.aios-core/product/templates/architecture-tmpl.yaml +651 -0
  484. package/.aios-core/product/templates/brainstorming-output-tmpl.yaml +156 -0
  485. package/.aios-core/product/templates/brownfield-architecture-tmpl.yaml +476 -0
  486. package/.aios-core/product/templates/brownfield-prd-tmpl.yaml +280 -0
  487. package/.aios-core/product/templates/changelog-template.md +134 -0
  488. package/.aios-core/product/templates/command-rationalization-matrix.md +152 -0
  489. package/.aios-core/product/templates/competitor-analysis-tmpl.yaml +293 -0
  490. package/.aios-core/product/templates/component-react-tmpl.tsx +98 -0
  491. package/.aios-core/product/templates/dbdr.hbs +241 -0
  492. package/.aios-core/product/templates/design-story-tmpl.yaml +587 -0
  493. package/.aios-core/product/templates/ds-artifact-analysis.md +70 -0
  494. package/.aios-core/product/templates/engine/elicitation.js +298 -0
  495. package/.aios-core/product/templates/engine/index.js +308 -0
  496. package/.aios-core/product/templates/engine/loader.js +231 -0
  497. package/.aios-core/product/templates/engine/renderer.js +343 -0
  498. package/.aios-core/product/templates/engine/schemas/adr.schema.json +102 -0
  499. package/.aios-core/product/templates/engine/schemas/dbdr.schema.json +205 -0
  500. package/.aios-core/product/templates/engine/schemas/epic.schema.json +175 -0
  501. package/.aios-core/product/templates/engine/schemas/pmdr.schema.json +175 -0
  502. package/.aios-core/product/templates/engine/schemas/prd-v2.schema.json +300 -0
  503. package/.aios-core/product/templates/engine/schemas/prd.schema.json +152 -0
  504. package/.aios-core/product/templates/engine/schemas/story.schema.json +222 -0
  505. package/.aios-core/product/templates/engine/schemas/task.schema.json +154 -0
  506. package/.aios-core/product/templates/engine/validator.js +294 -0
  507. package/.aios-core/product/templates/epic.hbs +212 -0
  508. package/.aios-core/product/templates/eslintrc-security.json +32 -0
  509. package/.aios-core/product/templates/front-end-architecture-tmpl.yaml +206 -0
  510. package/.aios-core/product/templates/front-end-spec-tmpl.yaml +349 -0
  511. package/.aios-core/product/templates/fullstack-architecture-tmpl.yaml +805 -0
  512. package/.aios-core/product/templates/github-actions-cd.yml +212 -0
  513. package/.aios-core/product/templates/github-actions-ci.yml +172 -0
  514. package/.aios-core/product/templates/github-pr-template.md +67 -0
  515. package/.aios-core/product/templates/gordon-mcp.yaml +140 -0
  516. package/.aios-core/product/templates/ide-rules/antigravity-rules.md +115 -0
  517. package/.aios-core/product/templates/ide-rules/claude-rules.md +221 -0
  518. package/.aios-core/product/templates/ide-rules/cline-rules.md +84 -0
  519. package/.aios-core/product/templates/ide-rules/copilot-rules.md +92 -0
  520. package/.aios-core/product/templates/ide-rules/cursor-rules.md +115 -0
  521. package/.aios-core/product/templates/ide-rules/gemini-rules.md +85 -0
  522. package/.aios-core/product/templates/ide-rules/roo-rules.md +86 -0
  523. package/.aios-core/product/templates/ide-rules/trae-rules.md +104 -0
  524. package/.aios-core/product/templates/ide-rules/windsurf-rules.md +80 -0
  525. package/.aios-core/product/templates/index-strategy-tmpl.yaml +53 -0
  526. package/.aios-core/product/templates/market-research-tmpl.yaml +252 -0
  527. package/.aios-core/product/templates/mcp-workflow.js +271 -0
  528. package/.aios-core/product/templates/migration-plan-tmpl.yaml +1022 -0
  529. package/.aios-core/product/templates/migration-strategy-tmpl.md +524 -0
  530. package/.aios-core/product/templates/personalized-agent-template.md +258 -0
  531. package/.aios-core/product/templates/personalized-checklist-template.md +340 -0
  532. package/.aios-core/product/templates/personalized-task-template-v2.md +905 -0
  533. package/.aios-core/product/templates/personalized-task-template.md +344 -0
  534. package/.aios-core/product/templates/personalized-template-file.yaml +322 -0
  535. package/.aios-core/product/templates/personalized-workflow-template.yaml +460 -0
  536. package/.aios-core/product/templates/pmdr.hbs +186 -0
  537. package/.aios-core/product/templates/prd-tmpl.yaml +202 -0
  538. package/.aios-core/product/templates/prd-v2.0.hbs +216 -0
  539. package/.aios-core/product/templates/prd.hbs +201 -0
  540. package/.aios-core/product/templates/project-brief-tmpl.yaml +221 -0
  541. package/.aios-core/product/templates/qa-gate-tmpl.yaml +240 -0
  542. package/.aios-core/product/templates/rls-policies-tmpl.yaml +1203 -0
  543. package/.aios-core/product/templates/schema-design-tmpl.yaml +428 -0
  544. package/.aios-core/product/templates/shock-report-tmpl.html +502 -0
  545. package/.aios-core/product/templates/state-persistence-tmpl.yaml +219 -0
  546. package/.aios-core/product/templates/story-tmpl.yaml +332 -0
  547. package/.aios-core/product/templates/story.hbs +263 -0
  548. package/.aios-core/product/templates/task-execution-report.md +495 -0
  549. package/.aios-core/product/templates/task-template.md +123 -0
  550. package/.aios-core/product/templates/task.hbs +170 -0
  551. package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -0
  552. package/.aios-core/product/templates/tmpl-migration-script.sql +91 -0
  553. package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -0
  554. package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -0
  555. package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -0
  556. package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -0
  557. package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -0
  558. package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -0
  559. package/.aios-core/product/templates/tmpl-seed-data.sql +140 -0
  560. package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -0
  561. package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -0
  562. package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -0
  563. package/.aios-core/product/templates/tmpl-trigger.sql +152 -0
  564. package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -0
  565. package/.aios-core/product/templates/tmpl-view.sql +177 -0
  566. package/.aios-core/product/templates/token-exports-css-tmpl.css +240 -0
  567. package/.aios-core/product/templates/token-exports-tailwind-tmpl.js +395 -0
  568. package/.aios-core/product/templates/tokens-schema-tmpl.yaml +305 -0
  569. package/.aios-core/product/templates/workflow-template.yaml +134 -0
  570. package/.aios-core/quality/metrics-collector.js +599 -0
  571. package/.aios-core/quality/metrics-hook.js +260 -0
  572. package/.aios-core/quality/schemas/quality-metrics.schema.json +233 -0
  573. package/.aios-core/quality/seed-metrics.js +336 -0
  574. package/.aios-core/schemas/squad-design-schema.json +299 -0
  575. package/.aios-core/schemas/squad-schema.json +185 -0
  576. package/.aios-core/scripts/README.md +122 -0
  577. package/.aios-core/scripts/aios-doc-template.md +325 -0
  578. package/.aios-core/scripts/batch-migrate-phase1.ps1 +36 -0
  579. package/.aios-core/scripts/batch-migrate-phase2.ps1 +88 -0
  580. package/.aios-core/scripts/batch-migrate-phase3.ps1 +45 -0
  581. package/.aios-core/scripts/command-execution-hook.js +201 -0
  582. package/.aios-core/scripts/migrate-framework-docs.sh +300 -0
  583. package/.aios-core/scripts/session-context-loader.js +45 -0
  584. package/.aios-core/scripts/test-template-system.js +941 -0
  585. package/.aios-core/scripts/validate-phase1.ps1 +35 -0
  586. package/.aios-core/scripts/workflow-management.md +69 -0
  587. package/.aios-core/user-guide.md +1413 -0
  588. package/.aios-core/utils/aios-validator.js +25 -0
  589. package/.aios-core/workflow-intelligence/__tests__/confidence-scorer.test.js +334 -0
  590. package/.aios-core/workflow-intelligence/__tests__/integration.test.js +337 -0
  591. package/.aios-core/workflow-intelligence/__tests__/suggestion-engine.test.js +433 -0
  592. package/.aios-core/workflow-intelligence/__tests__/wave-analyzer.test.js +458 -0
  593. package/.aios-core/workflow-intelligence/__tests__/workflow-registry.test.js +302 -0
  594. package/.aios-core/workflow-intelligence/engine/confidence-scorer.js +305 -0
  595. package/.aios-core/workflow-intelligence/engine/output-formatter.js +285 -0
  596. package/.aios-core/workflow-intelligence/engine/suggestion-engine.js +603 -0
  597. package/.aios-core/workflow-intelligence/engine/wave-analyzer.js +676 -0
  598. package/.aios-core/workflow-intelligence/index.js +327 -0
  599. package/.aios-core/workflow-intelligence/learning/capture-hook.js +147 -0
  600. package/.aios-core/workflow-intelligence/learning/index.js +230 -0
  601. package/.aios-core/workflow-intelligence/learning/pattern-capture.js +340 -0
  602. package/.aios-core/workflow-intelligence/learning/pattern-store.js +498 -0
  603. package/.aios-core/workflow-intelligence/learning/pattern-validator.js +309 -0
  604. package/.aios-core/workflow-intelligence/registry/workflow-registry.js +358 -0
  605. package/.aios-core/working-in-the-brownfield.md +361 -0
  606. package/.claude/rules/mcp-usage.md +176 -0
  607. package/LICENSE +48 -0
  608. package/README.md +705 -0
  609. package/bin/aios-init.js +867 -0
  610. package/bin/aios-minimal.js +26 -0
  611. package/bin/aios.js +280 -0
  612. package/bin/modules/env-config.js +436 -0
  613. package/bin/modules/mcp-installer.js +383 -0
  614. package/bin/utils/install-errors.js +339 -0
  615. package/bin/utils/install-transaction.js +445 -0
  616. package/package.json +126 -0
  617. package/packages/installer/package.json +39 -0
  618. package/packages/installer/src/config/configure-environment.js +312 -0
  619. package/packages/installer/src/config/templates/core-config-template.js +183 -0
  620. package/packages/installer/src/config/templates/env-template.js +270 -0
  621. package/packages/installer/src/config/validation/config-validator.js +243 -0
  622. package/packages/installer/src/detection/detect-project-type.js +81 -0
  623. package/packages/installer/src/wizard/wizard.js +244 -0
  624. package/packages/installer/tests/integration/environment-configuration.test.js +329 -0
  625. package/packages/installer/tests/integration/wizard-detection.test.js +351 -0
  626. package/packages/installer/tests/unit/config-validator.test.js +315 -0
  627. package/packages/installer/tests/unit/detection/detect-project-type.test.js +401 -0
  628. package/packages/installer/tests/unit/env-template.test.js +187 -0
  629. package/scripts/generate-install-manifest.js +337 -0
  630. package/scripts/validate-manifest.js +265 -0
  631. package/src/config/ide-configs.js +189 -0
  632. package/src/installer/aios-core-installer.js +319 -0
  633. package/src/installer/brownfield-upgrader.js +438 -0
  634. package/src/installer/dependency-installer.js +335 -0
  635. package/src/installer/file-hasher.js +137 -0
  636. package/src/utils/aios-colors.js +234 -0
  637. package/src/wizard/feedback.js +218 -0
  638. package/src/wizard/ide-config-generator.js +536 -0
  639. package/src/wizard/ide-selector.js +84 -0
  640. package/src/wizard/index.js +589 -0
  641. package/src/wizard/questions.js +249 -0
  642. package/src/wizard/validation/index.js +120 -0
  643. package/src/wizard/validation/report-generator.js +269 -0
  644. package/src/wizard/validation/troubleshooting-system.js +346 -0
  645. package/src/wizard/validation/validators/config-validator.js +362 -0
  646. package/src/wizard/validation/validators/dependency-validator.js +333 -0
  647. package/src/wizard/validation/validators/file-structure-validator.js +181 -0
  648. package/src/wizard/validation/validators/mcp-health-checker.js +310 -0
  649. package/src/wizard/validators.js +274 -0
  650. package/templates/squad/LICENSE +21 -0
  651. package/templates/squad/README.md +37 -0
  652. package/templates/squad/agents/example-agent.yaml +36 -0
  653. package/templates/squad/package.json +19 -0
  654. package/templates/squad/squad.yaml +25 -0
  655. package/templates/squad/tasks/example-task.yaml +46 -0
  656. package/templates/squad/templates/example-template.md +24 -0
  657. package/templates/squad/tests/example-agent.test.js +53 -0
  658. package/templates/squad/workflows/example-workflow.yaml +54 -0
  659. package/tools/diagnose-installation.js +266 -0
  660. package/tools/diagnose-npx-issue.ps1 +96 -0
  661. package/tools/quick-diagnose.cmd +85 -0
  662. package/tools/quick-diagnose.ps1 +117 -0
@@ -0,0 +1,867 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * AIOS-FullStack Installation Wizard v5
5
+ * Based on the original beautiful visual design with ASCII art
6
+ * Version: 2.1.0
7
+ *
8
+ * Supported IDEs (8 total):
9
+ * - Claude Code, Cursor, Windsurf, Trae, Roo Code, Cline, Gemini CLI, GitHub Copilot
10
+ */
11
+
12
+ const path = require('path');
13
+ const fs = require('fs');
14
+ const fse = require('fs-extra');
15
+ const yaml = require('js-yaml');
16
+ const { execSync } = require('child_process');
17
+ const inquirer = require('inquirer');
18
+ const chalk = require('chalk');
19
+
20
+ // ASCII Art Banner (Clean blocky style like reference image)
21
+ const BANNER = chalk.cyan(`
22
+ █████╗ ██╗ ██████╗ ███████╗ ███████╗██╗ ██╗██╗ ██╗ ███████╗████████╗ █████╗ ██████╗██╗ ██╗
23
+ ██╔══██╗██║██╔═══██╗██╔════╝ ██╔════╝██║ ██║██║ ██║ ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝
24
+ ███████║██║██║ ██║███████╗█████╗█████╗ ██║ ██║██║ ██║ ███████╗ ██║ ███████║██║ █████╔╝
25
+ ██╔══██║██║██║ ██║╚════██║╚════╝██╔══╝ ██║ ██║██║ ██║ ╚════██║ ██║ ██╔══██║██║ ██╔═██╗
26
+ ██║ ██║██║╚██████╔╝███████║ ██║ ╚██████╔╝███████╗███████╗███████║ ██║ ██║ ██║╚██████╗██║ ██╗
27
+ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
28
+ `);
29
+
30
+ const SUBTITLE = chalk.magenta('🚀 Universal AI Agent Framework for Any Domain');
31
+ // Read version from package.json dynamically
32
+ const packageJsonVersion = require(path.join(__dirname, '..', 'package.json')).version;
33
+ const VERSION = chalk.yellow(`✨ Installer v${packageJsonVersion}`);
34
+
35
+ /**
36
+ * Smart path resolution for AIOS Core modules
37
+ */
38
+ function resolveAiosCoreModule(modulePath) {
39
+ const aiosCoreModule = path.join(__dirname, '..', '.aios-core', modulePath);
40
+
41
+ const moduleExists = fs.existsSync(aiosCoreModule + '.js') ||
42
+ fs.existsSync(aiosCoreModule + '/index.js') ||
43
+ fs.existsSync(aiosCoreModule);
44
+
45
+ if (!moduleExists) {
46
+ throw new Error(
47
+ `Cannot find AIOS Core module: ${modulePath}\n` +
48
+ `Searched: ${aiosCoreModule}\n` +
49
+ 'Please ensure @synkra/aios-core is installed correctly.',
50
+ );
51
+ }
52
+
53
+ return require(aiosCoreModule);
54
+ }
55
+
56
+ // Load AIOS Core modules
57
+ const { detectRepositoryContext } = resolveAiosCoreModule('scripts/repository-detector');
58
+ // PM adapters imported but not used directly (loaded dynamically)
59
+ // const { ClickUpAdapter } = resolveAiosCoreModule('utils/pm-adapters/clickup-adapter');
60
+ // const { GitHubProjectsAdapter } = resolveAiosCoreModule('utils/pm-adapters/github-adapter');
61
+ // const { JiraAdapter } = resolveAiosCoreModule('utils/pm-adapters/jira-adapter');
62
+
63
+ // Brownfield upgrade module (Story 6.18)
64
+ let brownfieldUpgrader;
65
+ try {
66
+ brownfieldUpgrader = require('../src/installer/brownfield-upgrader');
67
+ } catch (_err) {
68
+ // Module may not be available in older installations
69
+ brownfieldUpgrader = null;
70
+ }
71
+
72
+ async function main() {
73
+ console.clear();
74
+
75
+ // Check for minimal mode flag
76
+ const isMinimalMode = process.argv.includes('--minimal');
77
+
78
+ // Display beautiful banner
79
+ console.log(BANNER);
80
+ console.log(SUBTITLE);
81
+ console.log(VERSION);
82
+ if (isMinimalMode) {
83
+ console.log(chalk.yellow(' 🔹 Minimal Installation Mode'));
84
+ }
85
+ console.log('');
86
+ console.log(chalk.gray('═'.repeat(80)));
87
+ console.log('');
88
+
89
+ const projectRoot = process.cwd();
90
+ let context = detectRepositoryContext();
91
+
92
+ // Setup prerequisites if needed
93
+ if (!context) {
94
+ console.log(chalk.blue('⚙️ Setting up project prerequisites...\n'));
95
+
96
+ // Check for git repository
97
+ let hasGit = false;
98
+ try {
99
+ execSync('git rev-parse --git-dir', { cwd: projectRoot, stdio: 'ignore' });
100
+ hasGit = true;
101
+ } catch (_err) {
102
+ // Not a git repo
103
+ }
104
+
105
+ if (!hasGit) {
106
+ try {
107
+ execSync('git init', { cwd: projectRoot, stdio: 'ignore' });
108
+ console.log(chalk.green('✓') + ' Git repository initialized');
109
+ } catch (_err) {
110
+ console.error(chalk.red('✗') + ' Failed to initialize git repository');
111
+ process.exit(1);
112
+ }
113
+ }
114
+
115
+ // Check for package.json
116
+ const packageJsonPath = path.join(projectRoot, 'package.json');
117
+ if (!fs.existsSync(packageJsonPath)) {
118
+ const dirName = path.basename(projectRoot);
119
+ const defaultPackage = {
120
+ name: dirName.toLowerCase().replace(/\s+/g, '-'),
121
+ version: '1.0.0',
122
+ description: 'AIOS-FullStack project',
123
+ main: 'index.js',
124
+ scripts: { test: 'echo "Error: no test specified" && exit 1' },
125
+ keywords: [],
126
+ author: '',
127
+ license: 'ISC',
128
+ };
129
+ fs.writeFileSync(packageJsonPath, JSON.stringify(defaultPackage, null, 2));
130
+ console.log(chalk.green('✓') + ' package.json created');
131
+ }
132
+
133
+ console.log(chalk.green('✓') + ' Prerequisites ready\n');
134
+
135
+ // Try to detect context again
136
+ context = detectRepositoryContext();
137
+
138
+ // If still no context, create minimal one
139
+ if (!context) {
140
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
141
+ context = {
142
+ projectRoot,
143
+ packageName: packageJson.name,
144
+ packageVersion: packageJson.version,
145
+ repositoryUrl: 'local-repository',
146
+ frameworkLocation: path.join(__dirname, '..'),
147
+ };
148
+ }
149
+ }
150
+
151
+ console.log(chalk.cyan('📦 Package:') + ` ${context.packageName}`);
152
+ console.log('');
153
+
154
+ // Check for existing installation (Story 6.18 - Brownfield Upgrade)
155
+ const installedManifestPath = path.join(projectRoot, '.aios-core', '.installed-manifest.yaml');
156
+ const hasExistingInstall = fs.existsSync(installedManifestPath);
157
+
158
+ if (hasExistingInstall && brownfieldUpgrader) {
159
+ console.log(chalk.yellow('🔄 Existing AIOS installation detected!'));
160
+ console.log('');
161
+
162
+ const sourceDir = path.join(context.frameworkLocation, '.aios-core');
163
+ const upgradeCheck = brownfieldUpgrader.checkUpgradeAvailable(sourceDir, projectRoot);
164
+
165
+ if (upgradeCheck.available) {
166
+ console.log(chalk.green(` Upgrade available: ${upgradeCheck.from} → ${upgradeCheck.to}`));
167
+ console.log('');
168
+
169
+ // Generate upgrade report for display
170
+ const sourceManifest = brownfieldUpgrader.loadSourceManifest(sourceDir);
171
+ const installedManifest = brownfieldUpgrader.loadInstalledManifest(projectRoot);
172
+ const report = brownfieldUpgrader.generateUpgradeReport(sourceManifest, installedManifest, projectRoot);
173
+
174
+ console.log(chalk.gray('─'.repeat(80)));
175
+ const { upgradeChoice } = await inquirer.prompt([
176
+ {
177
+ type: 'list',
178
+ name: 'upgradeChoice',
179
+ message: chalk.white('What would you like to do?'),
180
+ choices: [
181
+ {
182
+ name: ` Upgrade to ${upgradeCheck.to} ` + chalk.gray(`(${report.newFiles.length} new, ${report.modifiedFiles.length} updated files)`),
183
+ value: 'upgrade',
184
+ },
185
+ {
186
+ name: ' Dry Run ' + chalk.gray('(Show what would be changed without applying)'),
187
+ value: 'dry-run',
188
+ },
189
+ {
190
+ name: ' Fresh Install ' + chalk.gray('(Reinstall everything, overwrite all files)'),
191
+ value: 'fresh',
192
+ },
193
+ {
194
+ name: ' Cancel ' + chalk.gray('(Exit without changes)'),
195
+ value: 'cancel',
196
+ },
197
+ ],
198
+ },
199
+ ]);
200
+
201
+ if (upgradeChoice === 'cancel') {
202
+ console.log(chalk.yellow('\nInstallation cancelled.'));
203
+ process.exit(0);
204
+ }
205
+
206
+ if (upgradeChoice === 'dry-run') {
207
+ console.log('');
208
+ console.log(brownfieldUpgrader.formatUpgradeReport(report));
209
+ console.log('');
210
+ console.log(chalk.yellow('This was a dry run. No files were changed.'));
211
+ console.log(chalk.gray('Run again and select "Upgrade" to apply changes.'));
212
+ process.exit(0);
213
+ }
214
+
215
+ if (upgradeChoice === 'upgrade') {
216
+ console.log('');
217
+ console.log(chalk.blue('📦 Applying upgrade...'));
218
+
219
+ const result = await brownfieldUpgrader.applyUpgrade(report, sourceDir, projectRoot, { dryRun: false });
220
+
221
+ if (result.success) {
222
+ // Update installed manifest
223
+ const packageJson = require(path.join(context.frameworkLocation, 'package.json'));
224
+ brownfieldUpgrader.updateInstalledManifest(projectRoot, sourceManifest, `aios-core@${packageJson.version}`);
225
+
226
+ console.log(chalk.green('✓') + ` Upgraded ${result.filesInstalled.length} files`);
227
+ if (result.filesSkipped.length > 0) {
228
+ console.log(chalk.yellow('⚠') + ` Preserved ${result.filesSkipped.length} user-modified files`);
229
+ }
230
+ console.log('');
231
+ console.log(chalk.green('✅ Upgrade complete!'));
232
+ console.log(chalk.gray(` From: ${upgradeCheck.from}`));
233
+ console.log(chalk.gray(` To: ${upgradeCheck.to}`));
234
+ process.exit(0);
235
+ } else {
236
+ console.error(chalk.red('✗') + ' Upgrade failed with errors:');
237
+ for (const err of result.errors) {
238
+ console.error(chalk.red(` - ${err.path}: ${err.error}`));
239
+ }
240
+ process.exit(1);
241
+ }
242
+ }
243
+
244
+ // If 'fresh' was selected, continue with normal installation flow below
245
+ if (upgradeChoice === 'fresh') {
246
+ console.log(chalk.yellow('\nProceeding with fresh installation...'));
247
+ console.log('');
248
+ }
249
+ } else {
250
+ console.log(chalk.green(` Current version: ${upgradeCheck.from || 'unknown'}`));
251
+ console.log(chalk.gray(' No upgrade available. You can proceed with fresh install if needed.'));
252
+ console.log('');
253
+ }
254
+ }
255
+
256
+ // Step 1: Installation Mode
257
+ console.log(chalk.gray('─'.repeat(80)));
258
+ const { installMode } = await inquirer.prompt([
259
+ {
260
+ type: 'list',
261
+ name: 'installMode',
262
+ message: chalk.white('How are you using AIOS-FullStack?'),
263
+ choices: [
264
+ {
265
+ name: ' Using AIOS in a project ' + chalk.gray('(Framework files added to .gitignore)'),
266
+ value: 'project-development',
267
+ },
268
+ {
269
+ name: ' Developing AIOS framework itself ' + chalk.gray('(Framework files are source code)'),
270
+ value: 'framework-development',
271
+ },
272
+ ],
273
+ },
274
+ ]);
275
+
276
+ // Save installation config
277
+ const config = {
278
+ installation: {
279
+ mode: installMode,
280
+ detected_at: new Date().toISOString(),
281
+ },
282
+ repository: {
283
+ url: context.repositoryUrl,
284
+ auto_detect: true,
285
+ },
286
+ framework: {
287
+ source: installMode === 'framework-development' ? 'local' : 'npm',
288
+ version: context.packageVersion,
289
+ location: context.frameworkLocation,
290
+ },
291
+ git_ignore_rules: {
292
+ mode: installMode,
293
+ ignore_framework_files: installMode === 'project-development',
294
+ },
295
+ };
296
+
297
+ const configPath = path.join(context.projectRoot, '.aios-installation-config.yaml');
298
+ fs.writeFileSync(configPath, yaml.dump(config));
299
+
300
+ // Update .gitignore
301
+ updateGitIgnore(installMode, context.projectRoot);
302
+
303
+ // Step 2: PM Tool
304
+ console.log('');
305
+ const { pmTool } = await inquirer.prompt([
306
+ {
307
+ type: 'list',
308
+ name: 'pmTool',
309
+ message: chalk.white('Do you use a project management tool?'),
310
+ choices: [
311
+ { name: ' None (local YAML files only) ' + chalk.gray('- Recommended'), value: 'local' },
312
+ { name: ' ClickUp ' + chalk.gray('- Requires API token'), value: 'clickup' },
313
+ { name: ' GitHub Projects ' + chalk.gray('- Uses gh auth'), value: 'github-projects' },
314
+ { name: ' Jira ' + chalk.gray('- Requires API token'), value: 'jira' },
315
+ ],
316
+ },
317
+ ]);
318
+
319
+ // Save PM config
320
+ savePMConfig(pmTool, {}, context.projectRoot);
321
+
322
+ // Step 3: IDE Selection (CHECKBOX with instructions)
323
+ console.log('');
324
+ console.log(chalk.gray('─'.repeat(80)));
325
+ console.log(chalk.dim(' Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed'));
326
+ console.log('');
327
+
328
+ const { ides } = await inquirer.prompt([
329
+ {
330
+ type: 'checkbox',
331
+ name: 'ides',
332
+ message: chalk.white('Which IDE(s) will you use?'),
333
+ choices: [
334
+ { name: ' Claude Code ' + chalk.blue('(v2.1)') + chalk.gray(' - Recommended'), value: 'claude', checked: true },
335
+ { name: ' Cursor ' + chalk.blue('(v2.1)'), value: 'cursor' },
336
+ { name: ' Windsurf ' + chalk.blue('(v2.1)'), value: 'windsurf' },
337
+ { name: ' Trae ' + chalk.blue('(v2.1)'), value: 'trae' },
338
+ { name: ' Roo Code ' + chalk.blue('(v2.1)'), value: 'roo' },
339
+ { name: ' Cline ' + chalk.blue('(v2.1)'), value: 'cline' },
340
+ { name: ' Gemini CLI ' + chalk.blue('(v2.1)'), value: 'gemini' },
341
+ { name: ' GitHub Copilot ' + chalk.blue('(v2.1)'), value: 'github-copilot' },
342
+ { name: ' AntiGravity ' + chalk.blue('(v2.1)') + chalk.gray(' - Google AI IDE'), value: 'antigravity' },
343
+ new inquirer.Separator(chalk.gray('─'.repeat(40))),
344
+ { name: ' Skip IDE setup', value: 'none' },
345
+ ],
346
+ validate: function(answer) {
347
+ if (answer.length < 1) {
348
+ return 'You must choose at least one option.';
349
+ }
350
+ return true;
351
+ },
352
+ },
353
+ ]);
354
+
355
+ // Step 4: Copy AIOS Core files
356
+ console.log('');
357
+ console.log(chalk.blue('📦 Installing AIOS Core files...'));
358
+
359
+ const sourceCoreDir = path.join(context.frameworkLocation, '.aios-core');
360
+ const targetCoreDir = path.join(context.projectRoot, '.aios-core');
361
+
362
+ if (fs.existsSync(sourceCoreDir)) {
363
+ await fse.copy(sourceCoreDir, targetCoreDir);
364
+ console.log(chalk.green('✓') + ' AIOS Core files installed ' + chalk.gray('(11 agents, 68 tasks, 23 templates)'));
365
+
366
+ // Create installed manifest for brownfield upgrades (Story 6.18)
367
+ if (brownfieldUpgrader) {
368
+ try {
369
+ const sourceManifest = brownfieldUpgrader.loadSourceManifest(sourceCoreDir);
370
+ if (sourceManifest) {
371
+ const packageJson = require(path.join(context.frameworkLocation, 'package.json'));
372
+ brownfieldUpgrader.updateInstalledManifest(context.projectRoot, sourceManifest, `aios-core@${packageJson.version}`);
373
+ console.log(chalk.green('✓') + ' Installation manifest created ' + chalk.gray('(enables future upgrades)'));
374
+ }
375
+ } catch (manifestErr) {
376
+ // Non-critical - just log warning
377
+ console.log(chalk.yellow('⚠') + ' Could not create installation manifest ' + chalk.gray('(brownfield upgrades may not work)'));
378
+ }
379
+ }
380
+ } else {
381
+ console.error(chalk.red('✗') + ' AIOS Core files not found');
382
+ process.exit(1);
383
+ }
384
+
385
+ // Copy IDE rules and commands if IDE was selected
386
+ if (!ides.includes('none')) {
387
+ console.log('');
388
+ console.log(chalk.blue('📝 Installing IDE configurations...'));
389
+
390
+ const ideRulesMap = {
391
+ 'claude': { source: 'claude-rules.md', target: '.claude/CLAUDE.md' },
392
+ 'cursor': { source: 'cursor-rules.md', target: '.cursor/rules.md' },
393
+ 'windsurf': { source: 'windsurf-rules.md', target: '.windsurf/rules.md' },
394
+ 'trae': { source: 'trae-rules.md', target: '.trae/rules.md' },
395
+ 'roo': { source: 'roo-rules.md', target: '.roomodes' },
396
+ 'cline': { source: 'cline-rules.md', target: '.cline/rules.md' },
397
+ 'gemini': { source: 'gemini-rules.md', target: '.gemini/rules.md' },
398
+ 'github-copilot': { source: 'copilot-rules.md', target: '.github/chatmodes/aios-agent.md' },
399
+ 'antigravity': { source: 'antigravity-rules.md', target: '.antigravity/rules.md' },
400
+ };
401
+
402
+ // Step 1: Copy basic IDE rules files
403
+ for (const ide of ides) {
404
+ if (ide !== 'none' && ideRulesMap[ide]) {
405
+ const ideConfig = ideRulesMap[ide];
406
+ const sourceRules = path.join(targetCoreDir, 'templates', 'ide-rules', ideConfig.source);
407
+ const targetRules = path.join(context.projectRoot, ideConfig.target);
408
+
409
+ if (fs.existsSync(sourceRules)) {
410
+ await fse.ensureDir(path.dirname(targetRules));
411
+ await fse.copy(sourceRules, targetRules);
412
+ console.log(chalk.green('✓') + ` ${ide.charAt(0).toUpperCase() + ide.slice(1)} base rules installed`);
413
+ }
414
+ }
415
+ }
416
+
417
+ // Step 2: Install AIOS CORE agents and tasks for Claude Code
418
+ // v2.1: Agents and tasks are in development/ module
419
+ if (ides.includes('claude')) {
420
+ const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
421
+ const coreAgentsTarget = path.join(context.projectRoot, '.claude', 'commands', 'AIOS', 'agents');
422
+
423
+ const coreTasksSource = path.join(targetCoreDir, 'development', 'tasks');
424
+ const coreTasksTarget = path.join(context.projectRoot, '.claude', 'commands', 'AIOS', 'tasks');
425
+
426
+ if (fs.existsSync(coreAgentsSource)) {
427
+ await fse.copy(coreAgentsSource, coreAgentsTarget);
428
+ const agentCount = fs.readdirSync(coreAgentsSource).filter(f => f.endsWith('.md')).length;
429
+ console.log(chalk.green('✓') + ` Claude Code CORE agents installed (${agentCount} agents)`);
430
+ }
431
+
432
+ if (fs.existsSync(coreTasksSource)) {
433
+ await fse.copy(coreTasksSource, coreTasksTarget);
434
+ const taskCount = fs.readdirSync(coreTasksSource).filter(f => f.endsWith('.md')).length;
435
+ console.log(chalk.green('✓') + ` Claude Code CORE tasks installed (${taskCount} tasks)`);
436
+ }
437
+
438
+ // Create AIOS README for Claude Code
439
+ const aiossReadme = path.join(context.projectRoot, '.claude', 'commands', 'AIOS', 'README.md');
440
+ await fse.ensureDir(path.dirname(aiossReadme));
441
+ await fse.writeFile(aiossReadme, `# AIOS Core Commands
442
+
443
+ This directory contains the core AIOS-FullStack agents and tasks.
444
+
445
+ ## Usage
446
+ - Agents: Use slash commands like /dev, /architect, /qa, /pm, etc.
447
+ - Tasks: Reference tasks in agent workflows
448
+
449
+ ## Documentation
450
+ See .aios-core/user-guide.md for complete documentation.
451
+ `);
452
+ }
453
+
454
+ // Step 3: Install AIOS CORE agents for Cursor
455
+ // v2.1: Agents are in development/ module
456
+ if (ides.includes('cursor')) {
457
+ const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
458
+ const cursorRulesTarget = path.join(context.projectRoot, '.cursor', 'rules', 'AIOS', 'agents');
459
+
460
+ if (fs.existsSync(coreAgentsSource)) {
461
+ await fse.ensureDir(cursorRulesTarget);
462
+
463
+ // Convert .md files to .mdc for Cursor
464
+ const agentFiles = fs.readdirSync(coreAgentsSource).filter(f => f.endsWith('.md'));
465
+ for (const agentFile of agentFiles) {
466
+ const sourcePath = path.join(coreAgentsSource, agentFile);
467
+ const targetFileName = agentFile.replace('.md', '.mdc');
468
+ const targetPath = path.join(cursorRulesTarget, targetFileName);
469
+ await fse.copy(sourcePath, targetPath);
470
+ }
471
+
472
+ console.log(chalk.green('✓') + ` Cursor CORE rules installed (${agentFiles.length} agents)`);
473
+ }
474
+
475
+ // Create AIOS README for Cursor
476
+ const cursorReadme = path.join(context.projectRoot, '.cursor', 'rules', 'AIOS', 'README.md');
477
+ await fse.ensureDir(path.dirname(cursorReadme));
478
+ await fse.writeFile(cursorReadme, `# AIOS Core Rules
479
+
480
+ This directory contains the core AIOS-FullStack agent rules for Cursor.
481
+
482
+ ## Usage
483
+ These rules are automatically loaded by Cursor to provide agent-specific context.
484
+
485
+ ## Documentation
486
+ See .aios-core/user-guide.md for complete documentation.
487
+ `);
488
+ }
489
+
490
+ // Step 4: Install AIOS CORE agents for other IDEs (Trae, Cline, Gemini, AntiGravity)
491
+ // v2.1: Agents are in development/ module
492
+ const otherIdeInstalls = ['trae', 'cline', 'gemini', 'antigravity'];
493
+ for (const ide of otherIdeInstalls) {
494
+ if (ides.includes(ide)) {
495
+ const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
496
+ const ideRulesDir = ide === 'gemini' ? '.gemini' : `.${ide}`;
497
+ const ideRulesTarget = path.join(context.projectRoot, ideRulesDir, 'rules', 'AIOS', 'agents');
498
+
499
+ if (fs.existsSync(coreAgentsSource)) {
500
+ await fse.ensureDir(ideRulesTarget);
501
+
502
+ // Copy agent files
503
+ const agentFiles = fs.readdirSync(coreAgentsSource).filter(f => f.endsWith('.md'));
504
+ for (const agentFile of agentFiles) {
505
+ const sourcePath = path.join(coreAgentsSource, agentFile);
506
+ const targetPath = path.join(ideRulesTarget, agentFile);
507
+ await fse.copy(sourcePath, targetPath);
508
+ }
509
+
510
+ const ideName = ide.charAt(0).toUpperCase() + ide.slice(1);
511
+ console.log(chalk.green('✓') + ` ${ideName} CORE agents installed (${agentFiles.length} agents)`);
512
+ }
513
+ }
514
+ }
515
+
516
+ // Step 5: Install Roo Code modes
517
+ // v2.1: Agents are in development/ module
518
+ if (ides.includes('roo')) {
519
+ const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
520
+ const rooModesPath = path.join(context.projectRoot, '.roomodes');
521
+
522
+ if (fs.existsSync(coreAgentsSource)) {
523
+ const agentFiles = fs.readdirSync(coreAgentsSource).filter(f => f.endsWith('.md'));
524
+
525
+ // Create .roomodes JSON file
526
+ const roomodes = {
527
+ customModes: agentFiles.map(f => {
528
+ const agentName = f.replace('.md', '');
529
+ return {
530
+ slug: `bmad-${agentName}`,
531
+ name: `AIOS ${agentName.charAt(0).toUpperCase() + agentName.slice(1)}`,
532
+ roleDefinition: `AIOS-FullStack ${agentName} agent - see .aios-core/agents/${f}`,
533
+ groups: ['aios'],
534
+ source: 'project',
535
+ };
536
+ }),
537
+ };
538
+
539
+ await fse.writeFile(rooModesPath, JSON.stringify(roomodes, null, 2));
540
+ console.log(chalk.green('✓') + ` Roo Code modes installed (${agentFiles.length} modes)`);
541
+ }
542
+ }
543
+
544
+ // Step 6: Install GitHub Copilot chat modes
545
+ // v2.1: Agents are in development/ module
546
+ if (ides.includes('github-copilot')) {
547
+ const coreAgentsSource = path.join(targetCoreDir, 'development', 'agents');
548
+ const copilotModesDir = path.join(context.projectRoot, '.github', 'chatmodes');
549
+
550
+ if (fs.existsSync(coreAgentsSource)) {
551
+ await fse.ensureDir(copilotModesDir);
552
+
553
+ const agentFiles = fs.readdirSync(coreAgentsSource).filter(f => f.endsWith('.md'));
554
+ for (const agentFile of agentFiles) {
555
+ const sourcePath = path.join(coreAgentsSource, agentFile);
556
+ const agentName = agentFile.replace('.md', '');
557
+ const targetPath = path.join(copilotModesDir, `aios-${agentName}.md`);
558
+ await fse.copy(sourcePath, targetPath);
559
+ }
560
+
561
+ console.log(chalk.green('✓') + ` GitHub Copilot chat modes installed (${agentFiles.length} modes)`);
562
+ }
563
+ }
564
+ }
565
+
566
+ // Step 7: Expansion Packs (CHECKBOX with visual)
567
+ // Try multiple locations for expansion-packs (npm package vs local development vs npx)
568
+ // __dirname is the 'bin/' directory of the package, so '..' gives us the package root
569
+ const packageRoot = path.resolve(__dirname, '..');
570
+
571
+ const possibleExpansionDirs = [
572
+ // Primary: relative to this script (works for npx and local)
573
+ path.join(packageRoot, 'expansion-packs'),
574
+ // Secondary: context-based framework location
575
+ path.join(context.frameworkLocation, 'expansion-packs'),
576
+ // Tertiary: installed in project's node_modules
577
+ path.join(context.projectRoot, 'node_modules', '@synkra/aios-core', 'expansion-packs'),
578
+ path.join(context.projectRoot, 'node_modules', '@aios', 'fullstack', 'expansion-packs'),
579
+ ];
580
+
581
+ let sourceExpansionDir = null;
582
+ for (const dir of possibleExpansionDirs) {
583
+ if (fs.existsSync(dir)) {
584
+ sourceExpansionDir = dir;
585
+ break;
586
+ }
587
+ }
588
+
589
+ const availablePacks = [];
590
+ let expansionPacks = []; // Declare here to be accessible in summary
591
+
592
+ if (sourceExpansionDir && fs.existsSync(sourceExpansionDir)) {
593
+ let packs = fs.readdirSync(sourceExpansionDir).filter(f =>
594
+ fs.statSync(path.join(sourceExpansionDir, f)).isDirectory(),
595
+ );
596
+
597
+ // Filter for minimal mode - only show expansion-creator
598
+ if (isMinimalMode) {
599
+ packs = packs.filter(pack => pack === 'expansion-creator');
600
+ }
601
+
602
+ availablePacks.push(...packs);
603
+ }
604
+
605
+ if (availablePacks.length > 0) {
606
+ console.log('');
607
+ console.log(chalk.gray('─'.repeat(80)));
608
+ console.log(chalk.dim(' Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed'));
609
+ console.log('');
610
+
611
+ const result = await inquirer.prompt([
612
+ {
613
+ type: 'checkbox',
614
+ name: 'expansionPacks',
615
+ message: chalk.white('Select expansion packs to install (optional)'),
616
+ choices: availablePacks.map(pack => ({
617
+ name: ' ' + pack,
618
+ value: pack,
619
+ })),
620
+ },
621
+ ]);
622
+
623
+ expansionPacks = result.expansionPacks; // Assign to outer scope variable
624
+
625
+ if (expansionPacks.length > 0) {
626
+ console.log('');
627
+ console.log(chalk.blue('📦 Installing expansion packs...'));
628
+
629
+ const targetExpansionDir = path.join(context.projectRoot, 'expansion-packs');
630
+
631
+ for (const pack of expansionPacks) {
632
+ const sourcePack = path.join(sourceExpansionDir, pack);
633
+ const targetPack = path.join(targetExpansionDir, pack);
634
+ await fse.copy(sourcePack, targetPack);
635
+ console.log(chalk.green('✓') + ` Expansion pack installed: ${pack}`);
636
+
637
+ // Install expansion pack agents/tasks for Claude Code
638
+ if (ides.includes('claude')) {
639
+ const packAgentsSource = path.join(targetPack, 'agents');
640
+ const packTasksSource = path.join(targetPack, 'tasks');
641
+ const packReadmeSource = path.join(targetPack, 'README.md');
642
+
643
+ const packClaudeTarget = path.join(context.projectRoot, '.claude', 'commands', pack);
644
+
645
+ // Copy agents
646
+ if (fs.existsSync(packAgentsSource)) {
647
+ const packAgentsTarget = path.join(packClaudeTarget, 'agents');
648
+ await fse.copy(packAgentsSource, packAgentsTarget);
649
+ const agentCount = fs.readdirSync(packAgentsSource).filter(f => f.endsWith('.md')).length;
650
+ console.log(chalk.green(' ✓') + ` Claude Code ${pack} agents (${agentCount} agents)`);
651
+ }
652
+
653
+ // Copy tasks
654
+ if (fs.existsSync(packTasksSource)) {
655
+ const packTasksTarget = path.join(packClaudeTarget, 'tasks');
656
+ await fse.copy(packTasksSource, packTasksTarget);
657
+ const taskCount = fs.readdirSync(packTasksSource).filter(f => f.endsWith('.md')).length;
658
+ console.log(chalk.green(' ✓') + ` Claude Code ${pack} tasks (${taskCount} tasks)`);
659
+ }
660
+
661
+ // Copy README
662
+ if (fs.existsSync(packReadmeSource)) {
663
+ await fse.copy(packReadmeSource, path.join(packClaudeTarget, 'README.md'));
664
+ }
665
+ }
666
+
667
+ // Install expansion pack agents for Cursor
668
+ if (ides.includes('cursor')) {
669
+ const packAgentsSource = path.join(targetPack, 'agents');
670
+ const packReadmeSource = path.join(targetPack, 'README.md');
671
+
672
+ if (fs.existsSync(packAgentsSource)) {
673
+ const cursorPackTarget = path.join(context.projectRoot, '.cursor', 'rules', pack, 'agents');
674
+ await fse.ensureDir(cursorPackTarget);
675
+
676
+ // Convert .md files to .mdc for Cursor
677
+ const agentFiles = fs.readdirSync(packAgentsSource).filter(f => f.endsWith('.md'));
678
+ for (const agentFile of agentFiles) {
679
+ const sourcePath = path.join(packAgentsSource, agentFile);
680
+ const targetFileName = agentFile.replace('.md', '.mdc');
681
+ const targetPath = path.join(cursorPackTarget, targetFileName);
682
+ await fse.copy(sourcePath, targetPath);
683
+ }
684
+
685
+ console.log(chalk.green(' ✓') + ` Cursor ${pack} rules (${agentFiles.length} agents)`);
686
+
687
+ // Copy README for Cursor
688
+ if (fs.existsSync(packReadmeSource)) {
689
+ await fse.copy(packReadmeSource, path.join(context.projectRoot, '.cursor', 'rules', pack, 'README.md'));
690
+ }
691
+ }
692
+ }
693
+ }
694
+ }
695
+ }
696
+
697
+ // Summary
698
+ console.log('');
699
+ console.log(chalk.gray('═'.repeat(80)));
700
+ console.log('');
701
+ console.log(chalk.green.bold('✓ AIOS-FullStack installation complete! 🎉'));
702
+ console.log('');
703
+ console.log(chalk.cyan('📋 Configuration Summary:'));
704
+ console.log(' ' + chalk.dim('Mode: ') + installMode);
705
+ console.log(' ' + chalk.dim('Version: ') + packageJsonVersion);
706
+ console.log(' ' + chalk.dim('Repository: ') + context.repositoryUrl);
707
+ console.log(' ' + chalk.dim('IDE(s): ') + (ides.includes('none') ? 'none' : ides.join(', ')));
708
+ console.log(' ' + chalk.dim('PM Tool: ') + pmTool);
709
+
710
+ if (availablePacks.length > 0 && expansionPacks && expansionPacks.length > 0) {
711
+ console.log(' ' + chalk.dim('Expansion Packs:') + ' ' + expansionPacks.join(', '));
712
+ }
713
+
714
+ console.log('');
715
+ console.log(chalk.cyan('📁 Installed Structure:'));
716
+ console.log(' ' + chalk.dim('.aios-core/') + ' - Framework core files');
717
+
718
+ if (ides.includes('claude')) {
719
+ console.log(' ' + chalk.dim('.claude/'));
720
+ console.log(' ' + chalk.dim('├─ CLAUDE.md') + ' - Main configuration');
721
+ console.log(' ' + chalk.dim('└─ commands/'));
722
+ console.log(' ' + chalk.dim(' ├─ AIOS/') + ' - Core agents & tasks');
723
+ if (expansionPacks && expansionPacks.length > 0) {
724
+ expansionPacks.forEach(pack => {
725
+ console.log(' ' + chalk.dim(` └─ ${pack}/`) + ' - Expansion pack commands');
726
+ });
727
+ }
728
+ }
729
+
730
+ if (ides.includes('cursor')) {
731
+ console.log(' ' + chalk.dim('.cursor/'));
732
+ console.log(' ' + chalk.dim('├─ rules.md') + ' - Main configuration');
733
+ console.log(' ' + chalk.dim('└─ rules/'));
734
+ console.log(' ' + chalk.dim(' ├─ AIOS/') + ' - Core agent rules');
735
+ if (expansionPacks && expansionPacks.length > 0) {
736
+ expansionPacks.forEach(pack => {
737
+ console.log(' ' + chalk.dim(` └─ ${pack}/`) + ' - Expansion pack rules');
738
+ });
739
+ }
740
+ }
741
+
742
+ // Show other IDE installations
743
+ const otherInstalledIdes = ['windsurf', 'trae', 'cline', 'gemini', 'antigravity'].filter(ide => ides.includes(ide));
744
+ for (const ide of otherInstalledIdes) {
745
+ const ideDir = ide === 'gemini' ? '.gemini' : `.${ide}`;
746
+ console.log(' ' + chalk.dim(`${ideDir}/`) + ' - ' + ide.charAt(0).toUpperCase() + ide.slice(1) + ' configuration');
747
+ }
748
+
749
+ if (ides.includes('roo')) {
750
+ console.log(' ' + chalk.dim('.roomodes') + ' - Roo Code mode definitions');
751
+ }
752
+
753
+ if (ides.includes('github-copilot')) {
754
+ console.log(' ' + chalk.dim('.github/chatmodes/') + ' - GitHub Copilot agent modes');
755
+ }
756
+
757
+ console.log('');
758
+ console.log(chalk.cyan('📚 Next steps:'));
759
+
760
+ if (ides.includes('claude')) {
761
+ console.log(' ' + chalk.yellow('Claude Code:'));
762
+ console.log(' • Use slash commands: /dev, /architect, /qa, /pm, /github-devops');
763
+ console.log(' • Browse: .claude/commands/AIOS/agents/ for all available agents');
764
+ }
765
+
766
+ if (ides.includes('cursor')) {
767
+ console.log(' ' + chalk.yellow('Cursor:'));
768
+ console.log(' • Agent rules auto-loaded from .cursor/rules/');
769
+ console.log(' • Use @agent-name to activate agents in chat');
770
+ }
771
+
772
+ if (ides.includes('windsurf') || ides.includes('trae') || ides.includes('cline')) {
773
+ console.log(' ' + chalk.yellow('Windsurf/Trae/Cline:'));
774
+ console.log(' • Use @agent-name to activate agents in chat');
775
+ }
776
+
777
+ if (ides.includes('roo')) {
778
+ console.log(' ' + chalk.yellow('Roo Code:'));
779
+ console.log(' • Select agent mode from status bar mode selector');
780
+ }
781
+
782
+ if (ides.includes('gemini')) {
783
+ console.log(' ' + chalk.yellow('Gemini CLI:'));
784
+ console.log(' • Include agent context in your prompts');
785
+ }
786
+
787
+ if (ides.includes('github-copilot')) {
788
+ console.log(' ' + chalk.yellow('GitHub Copilot:'));
789
+ console.log(' • Open Chat view and select Agent mode');
790
+ console.log(' • Requires VS Code 1.101+ with chat.agent.enabled: true');
791
+ }
792
+
793
+ if (ides.includes('antigravity')) {
794
+ console.log(' ' + chalk.yellow('AntiGravity:'));
795
+ console.log(' • Use Workspace Rules to activate agents');
796
+ console.log(' • Browse: .antigravity/rules/AIOS/agents/ for all available agents');
797
+ }
798
+
799
+ console.log(' ' + chalk.yellow('General:'));
800
+ console.log(' • Run ' + chalk.yellow('"@synkra/aios-core doctor"') + ' to verify installation');
801
+ console.log(' • Check .aios-core/user-guide.md for complete documentation');
802
+ console.log(' • Explore expansion-packs/ for additional capabilities');
803
+ console.log('');
804
+ console.log(chalk.gray('═'.repeat(80)));
805
+ console.log('');
806
+ }
807
+
808
+ /**
809
+ * Updates .gitignore file based on installation mode
810
+ */
811
+ function updateGitIgnore(mode, projectRoot) {
812
+ const gitignorePath = path.join(projectRoot, '.gitignore');
813
+
814
+ let gitignore = '';
815
+ if (fs.existsSync(gitignorePath)) {
816
+ gitignore = fs.readFileSync(gitignorePath, 'utf8');
817
+ }
818
+
819
+ if (mode === 'project-development') {
820
+ const frameworkRules = [
821
+ '',
822
+ '# AIOS-FullStack Framework Files (auto-managed - do not edit)',
823
+ '.aios-core/',
824
+ 'node_modules/@aios/',
825
+ 'outputs/minds/',
826
+ '.aios-installation-config.yaml',
827
+ '# End AIOS-FullStack auto-managed section',
828
+ '',
829
+ ];
830
+
831
+ const hasFrameworkSection = gitignore.includes('# AIOS-FullStack Framework Files');
832
+
833
+ if (!hasFrameworkSection) {
834
+ gitignore += frameworkRules.join('\n');
835
+ fs.writeFileSync(gitignorePath, gitignore);
836
+ }
837
+ }
838
+ }
839
+
840
+ /**
841
+ * Save PM configuration
842
+ */
843
+ function savePMConfig(pmTool, config, projectRoot) {
844
+ const pmConfigData = {
845
+ pm_tool: {
846
+ type: pmTool,
847
+ configured_at: new Date().toISOString(),
848
+ config: config,
849
+ },
850
+ sync_behavior: {
851
+ auto_sync_on_status_change: true,
852
+ create_tasks_on_story_creation: false,
853
+ bidirectional_sync: false,
854
+ },
855
+ };
856
+
857
+ const configPath = path.join(projectRoot, '.aios-pm-config.yaml');
858
+ fs.writeFileSync(configPath, yaml.dump(pmConfigData));
859
+ }
860
+
861
+ // Run installer with error handling
862
+ main().catch((error) => {
863
+ console.error('');
864
+ console.error(chalk.red('✗ Installation failed: ') + error.message);
865
+ console.error('');
866
+ process.exit(1);
867
+ });