aios-core 4.2.15 → 4.4.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 (329) hide show
  1. package/.aios-core/cli/commands/validate/index.js +1 -1
  2. package/.aios-core/core/code-intel/code-intel-client.js +19 -5
  3. package/.aios-core/core/code-intel/helpers/creation-helper.js +183 -0
  4. package/.aios-core/core/code-intel/helpers/devops-helper.js +166 -0
  5. package/.aios-core/core/code-intel/helpers/planning-helper.js +248 -0
  6. package/.aios-core/core/code-intel/helpers/qa-helper.js +187 -0
  7. package/.aios-core/core/code-intel/helpers/story-helper.js +146 -0
  8. package/.aios-core/core/code-intel/hook-runtime.js +186 -0
  9. package/.aios-core/core/code-intel/index.js +2 -0
  10. package/.aios-core/core/code-intel/providers/code-graph-provider.js +8 -0
  11. package/.aios-core/core/code-intel/providers/provider-interface.js +9 -0
  12. package/.aios-core/core/code-intel/providers/registry-provider.js +515 -0
  13. package/.aios-core/core/config/schemas/framework-config.schema.json +155 -7
  14. package/.aios-core/core/config/schemas/project-config.schema.json +329 -15
  15. package/.aios-core/core/config/template-overrides.js +84 -0
  16. package/.aios-core/core/docs/troubleshooting-guide.md +1 -1
  17. package/.aios-core/core/doctor/checks/agent-memory.js +63 -0
  18. package/.aios-core/core/doctor/checks/claude-md.js +56 -0
  19. package/.aios-core/core/doctor/checks/code-intel.js +131 -0
  20. package/.aios-core/core/doctor/checks/commands-count.js +81 -0
  21. package/.aios-core/core/doctor/checks/core-config.js +53 -0
  22. package/.aios-core/core/doctor/checks/entity-registry.js +53 -0
  23. package/.aios-core/core/doctor/checks/git-hooks.js +50 -0
  24. package/.aios-core/core/doctor/checks/graph-dashboard.js +48 -0
  25. package/.aios-core/core/doctor/checks/hooks-claude-count.js +118 -0
  26. package/.aios-core/core/doctor/checks/ide-sync.js +85 -0
  27. package/.aios-core/core/doctor/checks/index.js +46 -0
  28. package/.aios-core/core/doctor/checks/node-version.js +33 -0
  29. package/.aios-core/core/doctor/checks/npm-packages.js +35 -0
  30. package/.aios-core/core/doctor/checks/rules-files.js +61 -0
  31. package/.aios-core/core/doctor/checks/settings-json.js +121 -0
  32. package/.aios-core/core/doctor/checks/skills-count.js +72 -0
  33. package/.aios-core/core/doctor/fix-handler.js +165 -0
  34. package/.aios-core/core/doctor/formatters/json.js +14 -0
  35. package/.aios-core/core/doctor/formatters/text.js +59 -0
  36. package/.aios-core/core/doctor/index.js +94 -0
  37. package/.aios-core/core/graph-dashboard/cli.js +361 -0
  38. package/.aios-core/core/graph-dashboard/data-sources/code-intel-source.js +234 -0
  39. package/.aios-core/core/graph-dashboard/data-sources/metrics-source.js +95 -0
  40. package/.aios-core/core/graph-dashboard/data-sources/registry-source.js +106 -0
  41. package/.aios-core/core/graph-dashboard/formatters/dot-formatter.js +45 -0
  42. package/.aios-core/core/graph-dashboard/formatters/html-formatter.js +1437 -0
  43. package/.aios-core/core/graph-dashboard/formatters/json-formatter.js +13 -0
  44. package/.aios-core/core/graph-dashboard/formatters/mermaid-formatter.js +59 -0
  45. package/.aios-core/core/graph-dashboard/index.js +21 -0
  46. package/.aios-core/core/graph-dashboard/renderers/stats-renderer.js +217 -0
  47. package/.aios-core/core/graph-dashboard/renderers/status-renderer.js +125 -0
  48. package/.aios-core/core/graph-dashboard/renderers/tree-renderer.js +119 -0
  49. package/.aios-core/core/health-check/base-check.js +1 -1
  50. package/.aios-core/core/health-check/check-registry.js +1 -1
  51. package/.aios-core/core/health-check/checks/deployment/build-config.js +1 -1
  52. package/.aios-core/core/health-check/checks/deployment/ci-config.js +1 -1
  53. package/.aios-core/core/health-check/checks/deployment/deployment-readiness.js +1 -1
  54. package/.aios-core/core/health-check/checks/deployment/docker-config.js +1 -1
  55. package/.aios-core/core/health-check/checks/deployment/env-file.js +1 -1
  56. package/.aios-core/core/health-check/checks/deployment/index.js +1 -1
  57. package/.aios-core/core/health-check/checks/index.js +1 -1
  58. package/.aios-core/core/health-check/checks/local/disk-space.js +1 -1
  59. package/.aios-core/core/health-check/checks/local/environment-vars.js +1 -1
  60. package/.aios-core/core/health-check/checks/local/git-install.js +1 -1
  61. package/.aios-core/core/health-check/checks/local/ide-detection.js +1 -1
  62. package/.aios-core/core/health-check/checks/local/index.js +1 -1
  63. package/.aios-core/core/health-check/checks/local/memory.js +1 -1
  64. package/.aios-core/core/health-check/checks/local/network.js +1 -1
  65. package/.aios-core/core/health-check/checks/local/npm-install.js +1 -1
  66. package/.aios-core/core/health-check/checks/local/shell-environment.js +1 -1
  67. package/.aios-core/core/health-check/checks/project/agent-config.js +1 -1
  68. package/.aios-core/core/health-check/checks/project/aios-directory.js +1 -1
  69. package/.aios-core/core/health-check/checks/project/dependencies.js +1 -1
  70. package/.aios-core/core/health-check/checks/project/framework-config.js +1 -1
  71. package/.aios-core/core/health-check/checks/project/index.js +1 -1
  72. package/.aios-core/core/health-check/checks/project/node-version.js +1 -1
  73. package/.aios-core/core/health-check/checks/project/package-json.js +1 -1
  74. package/.aios-core/core/health-check/checks/project/task-definitions.js +1 -1
  75. package/.aios-core/core/health-check/checks/project/workflow-dependencies.js +1 -1
  76. package/.aios-core/core/health-check/checks/repository/branch-protection.js +1 -1
  77. package/.aios-core/core/health-check/checks/repository/commit-history.js +1 -1
  78. package/.aios-core/core/health-check/checks/repository/conflicts.js +1 -1
  79. package/.aios-core/core/health-check/checks/repository/git-repo.js +1 -1
  80. package/.aios-core/core/health-check/checks/repository/git-status.js +1 -1
  81. package/.aios-core/core/health-check/checks/repository/gitignore.js +1 -1
  82. package/.aios-core/core/health-check/checks/repository/index.js +1 -1
  83. package/.aios-core/core/health-check/checks/repository/large-files.js +1 -1
  84. package/.aios-core/core/health-check/checks/repository/lockfile-integrity.js +1 -1
  85. package/.aios-core/core/health-check/checks/services/api-endpoints.js +1 -1
  86. package/.aios-core/core/health-check/checks/services/claude-code.js +1 -1
  87. package/.aios-core/core/health-check/checks/services/gemini-cli.js +1 -1
  88. package/.aios-core/core/health-check/checks/services/github-cli.js +1 -1
  89. package/.aios-core/core/health-check/checks/services/index.js +1 -1
  90. package/.aios-core/core/health-check/checks/services/mcp-integration.js +1 -1
  91. package/.aios-core/core/health-check/engine.js +1 -1
  92. package/.aios-core/core/health-check/healers/backup-manager.js +1 -1
  93. package/.aios-core/core/health-check/healers/index.js +1 -1
  94. package/.aios-core/core/health-check/index.js +9 -2
  95. package/.aios-core/core/health-check/reporters/console.js +1 -1
  96. package/.aios-core/core/health-check/reporters/index.js +1 -1
  97. package/.aios-core/core/health-check/reporters/json.js +1 -1
  98. package/.aios-core/core/health-check/reporters/markdown.js +1 -1
  99. package/.aios-core/core/ids/layer-classifier.js +65 -0
  100. package/.aios-core/core/ids/registry-updater.js +49 -0
  101. package/.aios-core/core/index.esm.js +1 -1
  102. package/.aios-core/core/index.js +1 -1
  103. package/.aios-core/core/session/context-detector.js +2 -7
  104. package/.aios-core/core/synapse/context/context-tracker.js +9 -1
  105. package/.aios-core/core/synapse/engine.js +33 -13
  106. package/.aios-core/core/synapse/memory/memory-bridge.js +17 -43
  107. package/.aios-core/core/synapse/memory/synapse-memory-provider.js +201 -0
  108. package/.aios-core/core/synapse/runtime/hook-runtime.js +40 -2
  109. package/.aios-core/core/synapse/session/session-manager.js +3 -2
  110. package/.aios-core/core/synapse/utils/atomic-write.js +79 -0
  111. package/.aios-core/core-config.yaml +34 -1
  112. package/.aios-core/data/aios-kb.md +2 -2
  113. package/.aios-core/data/capability-detection.js +290 -0
  114. package/.aios-core/data/entity-registry.yaml +10450 -2129
  115. package/.aios-core/data/mcp-discipline.js +166 -0
  116. package/.aios-core/data/mcp-tool-examples.yaml +215 -0
  117. package/.aios-core/data/tok2-validation.js +168 -0
  118. package/.aios-core/data/tok3-token-comparison.js +123 -0
  119. package/.aios-core/data/tool-registry.yaml +648 -0
  120. package/.aios-core/data/tool-search-validation.js +174 -0
  121. package/.aios-core/data/workflow-chains.yaml +156 -0
  122. package/.aios-core/development/agents/aios-master.md +17 -10
  123. package/.aios-core/development/agents/analyst/MEMORY.md +33 -0
  124. package/.aios-core/development/agents/analyst.md +17 -10
  125. package/.aios-core/development/agents/architect/MEMORY.md +39 -0
  126. package/.aios-core/development/agents/architect.md +17 -10
  127. package/.aios-core/development/agents/data-engineer/MEMORY.md +32 -0
  128. package/.aios-core/development/agents/data-engineer.md +17 -10
  129. package/.aios-core/development/agents/dev/MEMORY.md +46 -0
  130. package/.aios-core/development/agents/dev.md +18 -11
  131. package/.aios-core/development/agents/devops/MEMORY.md +39 -0
  132. package/.aios-core/development/agents/devops.md +44 -10
  133. package/.aios-core/development/agents/pm/MEMORY.md +38 -0
  134. package/.aios-core/development/agents/pm.md +17 -10
  135. package/.aios-core/development/agents/po/MEMORY.md +45 -0
  136. package/.aios-core/development/agents/po.md +17 -10
  137. package/.aios-core/development/agents/qa/MEMORY.md +42 -0
  138. package/.aios-core/development/agents/qa.md +18 -11
  139. package/.aios-core/development/agents/sm/MEMORY.md +31 -0
  140. package/.aios-core/development/agents/sm.md +17 -10
  141. package/.aios-core/development/agents/squad-creator.md +18 -9
  142. package/.aios-core/development/agents/ux/MEMORY.md +31 -0
  143. package/.aios-core/development/agents/ux-design-expert.md +16 -9
  144. package/.aios-core/development/checklists/issue-triage-checklist.md +35 -0
  145. package/.aios-core/development/checklists/memory-audit-checklist.md +53 -0
  146. package/.aios-core/development/scripts/issue-triage.js +171 -0
  147. package/.aios-core/development/scripts/populate-entity-registry.js +412 -19
  148. package/.aios-core/development/scripts/unified-activation-pipeline.js +31 -10
  149. package/.aios-core/development/tasks/analyze-project-structure.md +48 -0
  150. package/.aios-core/development/tasks/apply-qa-fixes.md +7 -0
  151. package/.aios-core/development/tasks/architect-analyze-impact.md +8 -1
  152. package/.aios-core/development/tasks/brownfield-create-epic.md +41 -0
  153. package/.aios-core/development/tasks/brownfield-create-story.md +7 -0
  154. package/.aios-core/development/tasks/build-autonomous.md +7 -0
  155. package/.aios-core/development/tasks/create-deep-research-prompt.md +7 -0
  156. package/.aios-core/development/tasks/create-doc.md +44 -0
  157. package/.aios-core/development/tasks/create-next-story.md +17 -0
  158. package/.aios-core/development/tasks/create-suite.md +7 -0
  159. package/.aios-core/development/tasks/dev-develop-story.md +9 -1
  160. package/.aios-core/development/tasks/execute-checklist.md +7 -0
  161. package/.aios-core/development/tasks/github-devops-github-pr-automation.md +56 -0
  162. package/.aios-core/development/tasks/github-devops-pre-push-quality-gate.md +70 -0
  163. package/.aios-core/development/tasks/github-issue-triage.md +118 -0
  164. package/.aios-core/development/tasks/health-check.yaml +206 -171
  165. package/.aios-core/development/tasks/kb-mode-interaction.md +3 -3
  166. package/.aios-core/development/tasks/plan-create-context.md +47 -1
  167. package/.aios-core/development/tasks/plan-create-implementation.md +55 -0
  168. package/.aios-core/development/tasks/po-close-story.md +7 -0
  169. package/.aios-core/development/tasks/pr-automation.md +5 -5
  170. package/.aios-core/development/tasks/qa-create-fix-request.md +7 -0
  171. package/.aios-core/development/tasks/qa-fix-issues.md +7 -0
  172. package/.aios-core/development/tasks/qa-gate.md +56 -0
  173. package/.aios-core/development/tasks/qa-review-story.md +32 -1
  174. package/.aios-core/development/tasks/release-management.md +7 -0
  175. package/.aios-core/development/tasks/resolve-github-issue.md +608 -0
  176. package/.aios-core/development/tasks/review-contributor-pr.md +152 -0
  177. package/.aios-core/development/tasks/setup-llm-routing.md +1 -1
  178. package/.aios-core/development/tasks/spec-critique.md +8 -0
  179. package/.aios-core/development/tasks/spec-gather-requirements.md +7 -0
  180. package/.aios-core/development/tasks/spec-research-dependencies.md +4 -0
  181. package/.aios-core/development/tasks/spec-write-spec.md +5 -0
  182. package/.aios-core/development/tasks/triage-github-issues.md +356 -0
  183. package/.aios-core/development/tasks/validate-agents.md +4 -0
  184. package/.aios-core/development/tasks/validate-next-story.md +17 -0
  185. package/.aios-core/development/templates/agent-handoff-tmpl.yaml +48 -0
  186. package/.aios-core/development/templates/code-intel-integration-pattern.md +199 -0
  187. package/.aios-core/development/templates/ptc-entity-validation.md +113 -0
  188. package/.aios-core/development/templates/ptc-qa-gate.md +100 -0
  189. package/.aios-core/development/templates/ptc-research-aggregation.md +94 -0
  190. package/.aios-core/development/templates/service-template/README.md.hbs +158 -158
  191. package/.aios-core/development/templates/service-template/__tests__/index.test.ts.hbs +237 -237
  192. package/.aios-core/development/templates/service-template/client.ts.hbs +403 -403
  193. package/.aios-core/development/templates/service-template/errors.ts.hbs +182 -182
  194. package/.aios-core/development/templates/service-template/index.ts.hbs +120 -120
  195. package/.aios-core/development/templates/service-template/package.json.hbs +87 -87
  196. package/.aios-core/development/templates/service-template/types.ts.hbs +145 -145
  197. package/.aios-core/development/templates/squad/agent-template.md +11 -0
  198. package/.aios-core/development/templates/squad/task-template.md +21 -0
  199. package/.aios-core/development/templates/squad-template/LICENSE +21 -21
  200. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md +1 -1
  201. package/.aios-core/docs/standards/AIOS-LIVRO-DE-OURO-V2.2-SUMMARY.md +1 -1
  202. package/.aios-core/framework-config.yaml +8 -0
  203. package/.aios-core/index.esm.js +1 -1
  204. package/.aios-core/index.js +1 -1
  205. package/.aios-core/infrastructure/integrations/ai-providers/index.js +1 -1
  206. package/.aios-core/infrastructure/schemas/task-v3-schema.json +6 -0
  207. package/.aios-core/infrastructure/scripts/collect-tool-usage.js +311 -0
  208. package/.aios-core/infrastructure/scripts/generate-optimization-report.js +497 -0
  209. package/.aios-core/infrastructure/scripts/generate-settings-json.js +300 -0
  210. package/.aios-core/infrastructure/scripts/git-config-detector.js +65 -9
  211. package/.aios-core/infrastructure/scripts/ide-sync/index.js +3 -1
  212. package/.aios-core/infrastructure/scripts/ide-sync/transformers/github-copilot.js +184 -0
  213. package/.aios-core/infrastructure/scripts/repository-detector.js +3 -3
  214. package/.aios-core/infrastructure/templates/aios-sync.yaml.template +182 -182
  215. package/.aios-core/infrastructure/templates/coderabbit.yaml.template +279 -279
  216. package/.aios-core/infrastructure/templates/github-workflows/ci.yml.template +169 -169
  217. package/.aios-core/infrastructure/templates/github-workflows/pr-automation.yml.template +330 -330
  218. package/.aios-core/infrastructure/templates/github-workflows/release.yml.template +196 -196
  219. package/.aios-core/infrastructure/templates/gitignore/gitignore-aios-base.tmpl +63 -63
  220. package/.aios-core/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +18 -18
  221. package/.aios-core/infrastructure/templates/gitignore/gitignore-node.tmpl +85 -85
  222. package/.aios-core/infrastructure/templates/gitignore/gitignore-python.tmpl +145 -145
  223. package/.aios-core/install-manifest.yaml +613 -305
  224. package/.aios-core/lib/build.json +1 -0
  225. package/.aios-core/local-config.yaml.template +71 -71
  226. package/.aios-core/monitor/hooks/lib/__init__.py +1 -1
  227. package/.aios-core/monitor/hooks/lib/enrich.py +58 -58
  228. package/.aios-core/monitor/hooks/lib/send_event.py +47 -47
  229. package/.aios-core/monitor/hooks/notification.py +29 -29
  230. package/.aios-core/monitor/hooks/post_tool_use.py +45 -45
  231. package/.aios-core/monitor/hooks/pre_compact.py +29 -29
  232. package/.aios-core/monitor/hooks/pre_tool_use.py +40 -40
  233. package/.aios-core/monitor/hooks/stop.py +29 -29
  234. package/.aios-core/monitor/hooks/subagent_stop.py +29 -29
  235. package/.aios-core/monitor/hooks/user_prompt_submit.py +38 -38
  236. package/.aios-core/product/templates/adr.hbs +125 -125
  237. package/.aios-core/product/templates/dbdr.hbs +241 -241
  238. package/.aios-core/product/templates/epic.hbs +212 -212
  239. package/.aios-core/product/templates/ide-rules/claude-rules.md +125 -0
  240. package/.aios-core/product/templates/pmdr.hbs +186 -186
  241. package/.aios-core/product/templates/prd-v2.0.hbs +216 -216
  242. package/.aios-core/product/templates/prd.hbs +201 -201
  243. package/.aios-core/product/templates/story.hbs +263 -263
  244. package/.aios-core/product/templates/task.hbs +170 -170
  245. package/.aios-core/product/templates/tmpl-comment-on-examples.sql +158 -158
  246. package/.aios-core/product/templates/tmpl-migration-script.sql +91 -91
  247. package/.aios-core/product/templates/tmpl-rls-granular-policies.sql +104 -104
  248. package/.aios-core/product/templates/tmpl-rls-kiss-policy.sql +10 -10
  249. package/.aios-core/product/templates/tmpl-rls-roles.sql +135 -135
  250. package/.aios-core/product/templates/tmpl-rls-simple.sql +77 -77
  251. package/.aios-core/product/templates/tmpl-rls-tenant.sql +152 -152
  252. package/.aios-core/product/templates/tmpl-rollback-script.sql +77 -77
  253. package/.aios-core/product/templates/tmpl-seed-data.sql +140 -140
  254. package/.aios-core/product/templates/tmpl-smoke-test.sql +16 -16
  255. package/.aios-core/product/templates/tmpl-staging-copy-merge.sql +139 -139
  256. package/.aios-core/product/templates/tmpl-stored-proc.sql +140 -140
  257. package/.aios-core/product/templates/tmpl-trigger.sql +152 -152
  258. package/.aios-core/product/templates/tmpl-view-materialized.sql +133 -133
  259. package/.aios-core/product/templates/tmpl-view.sql +177 -177
  260. package/.aios-core/scripts/pm.sh +0 -0
  261. package/.aios-core/user-guide.md +15 -15
  262. package/.aios-core/utils/filters/constants.js +10 -0
  263. package/.aios-core/utils/filters/content-filter.js +223 -0
  264. package/.aios-core/utils/filters/field-filter.js +126 -0
  265. package/.aios-core/utils/filters/index.js +180 -0
  266. package/.aios-core/utils/filters/schema-filter.js +157 -0
  267. package/.claude/CLAUDE.md +62 -0
  268. package/.claude/hooks/enforce-architecture-first.py +196 -196
  269. package/.claude/hooks/enforce-git-push-authority.sh +33 -0
  270. package/.claude/hooks/mind-clone-governance.py +192 -192
  271. package/.claude/hooks/read-protection.py +151 -151
  272. package/.claude/hooks/slug-validation.py +176 -176
  273. package/.claude/hooks/sql-governance.py +182 -182
  274. package/.claude/hooks/synapse-engine.cjs +28 -5
  275. package/.claude/hooks/write-path-validation.py +194 -194
  276. package/.claude/rules/agent-authority.md +105 -0
  277. package/.claude/rules/agent-handoff.md +97 -0
  278. package/.claude/rules/agent-memory-imports.md +15 -0
  279. package/.claude/rules/coderabbit-integration.md +101 -0
  280. package/.claude/rules/ids-principles.md +119 -0
  281. package/.claude/rules/story-lifecycle.md +145 -0
  282. package/.claude/rules/tool-examples.md +64 -0
  283. package/.claude/rules/tool-response-filtering.md +57 -0
  284. package/.claude/rules/workflow-execution.md +150 -0
  285. package/LICENSE +33 -33
  286. package/bin/aios-graph.js +9 -0
  287. package/bin/aios-init.js +2 -2
  288. package/bin/aios-minimal.js +0 -0
  289. package/bin/aios.js +17 -221
  290. package/bin/utils/detect-fsmonitor.js +70 -0
  291. package/bin/utils/framework-guard.js +238 -0
  292. package/bin/utils/validate-publish.js +108 -0
  293. package/package.json +6 -3
  294. package/packages/aios-install/bin/aios-install.js +0 -0
  295. package/packages/aios-install/bin/edmcp.js +0 -0
  296. package/packages/aios-pro-cli/bin/aios-pro.js +2 -0
  297. package/packages/installer/src/config/templates/core-config-template.js +25 -0
  298. package/packages/installer/src/installer/brownfield-upgrader.js +68 -5
  299. package/packages/installer/src/merger/index.js +3 -0
  300. package/packages/installer/src/merger/strategies/index.js +6 -0
  301. package/packages/installer/src/merger/strategies/yaml-merger.js +181 -0
  302. package/packages/installer/src/updater/index.js +4 -4
  303. package/packages/installer/src/wizard/i18n.js +321 -3
  304. package/packages/installer/src/wizard/ide-config-generator.js +173 -25
  305. package/packages/installer/src/wizard/index.js +119 -1
  306. package/packages/installer/src/wizard/pro-setup.js +137 -121
  307. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +271 -0
  308. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +192 -0
  309. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +610 -0
  310. package/packages/installer/tests/unit/doctor/doctor-orchestrator.test.js +134 -0
  311. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +186 -0
  312. package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +309 -0
  313. package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +230 -0
  314. package/packages/installer/tests/unit/merger/strategies.test.js +2 -2
  315. package/packages/installer/tests/unit/merger/yaml-merger.test.js +327 -0
  316. package/scripts/check-markdown-links.py +352 -352
  317. package/scripts/dashboard-parallel-dev.sh +0 -0
  318. package/scripts/dashboard-parallel-phase3.sh +0 -0
  319. package/scripts/dashboard-parallel-phase4.sh +0 -0
  320. package/scripts/install-monitor-hooks.sh +0 -0
  321. package/scripts/package-synapse.js +2 -1
  322. package/pro/README.md +0 -66
  323. package/pro/license/degradation.js +0 -220
  324. package/pro/license/errors.js +0 -450
  325. package/pro/license/feature-gate.js +0 -354
  326. package/pro/license/index.js +0 -181
  327. package/pro/license/license-api.js +0 -651
  328. package/pro/license/license-cache.js +0 -523
  329. package/pro/license/license-crypto.js +0 -303
@@ -0,0 +1,648 @@
1
+ # =============================================================================
2
+ # AIOS Unified Tool Registry
3
+ # =============================================================================
4
+ # Single source of truth for tool loading decisions, enabling deferred loading
5
+ # and intelligent tool selection across agents, tasks, and squads.
6
+ #
7
+ # Consumer Module:
8
+ # This registry is loaded by `.aios-core/core/registry/registry-loader.js`.
9
+ # Extend the existing loader to read `tool-registry.yaml` alongside
10
+ # `entity-registry.yaml`. Both follow the same L3 YAML conventions.
11
+ #
12
+ # Fallback Behavior:
13
+ # If this file is missing or malformed, the system MUST continue without
14
+ # degradation. Tools load via their original paths (.mcp.json, agent defs).
15
+ # The registry is an optimization layer, not a dependency.
16
+ #
17
+ # Migration Strategy:
18
+ # Incremental — registry starts with core tools and profiles. Additional
19
+ # tools (180+ tasks, squad-specific) are added progressively as TOK-2+
20
+ # stories land. Do NOT attempt to catalog all 207 tasks at once.
21
+ #
22
+ # Squad Override Pattern:
23
+ # Squads can extend this base registry via `squads/{name}/tool-overrides.yaml`.
24
+ # Override schema:
25
+ # extends: tool-registry # base registry reference
26
+ # overrides:
27
+ # profiles: # add/replace agent profiles
28
+ # custom-agent:
29
+ # always_loaded: [...]
30
+ # tools: # add/replace tool entries
31
+ # custom-tool:
32
+ # tier: 3
33
+ # ...
34
+ # task_bindings: # add/replace task bindings
35
+ # custom-task:
36
+ # required: [...]
37
+ #
38
+ # ADR References:
39
+ # ADR-1: Registry at L3 (.aios-core/data/) — consistent with entity-registry
40
+ # ADR-2: 3-Tier Tool Mesh (Always/Deferred/External) aligned with L1-L4
41
+ # ADR-3: PTC native ONLY — MCP tools CANNOT be used in programmatic/batch
42
+ # code blocks. Only tools with ptc_eligible: true (Tier 1 native) are
43
+ # allowed. See: templates/ptc-*.md for enforcement patterns.
44
+ # ADR-5: Tool Search for discovery, Examples for accuracy (incompatible)
45
+ # ADR-7: Runtime detection flag — capabilities checked before activation
46
+ # =============================================================================
47
+
48
+ version: 1.0.0
49
+
50
+ metadata:
51
+ lastUpdated: '2026-02-23'
52
+ runtimeDetection: true
53
+ layer: L3
54
+ description: Unified tool registry for AIOS token optimization
55
+ epic: epic-token-optimization
56
+ story: TOK-1
57
+
58
+ # =============================================================================
59
+ # TOOLS CATALOG
60
+ # =============================================================================
61
+ # Tier 1 (Always): Native Claude Code tools — always loaded, ~3K tokens
62
+ # Tier 2 (Deferred): Agent commands, skills, project tools — loaded on activation
63
+ # Tier 3 (Deferred): MCP tools via Docker Gateway or external — via tool_search
64
+ # =============================================================================
65
+
66
+ tools:
67
+ # ---------------------------------------------------------------------------
68
+ # TIER 1 — Native Claude Code Tools (Always Loaded)
69
+ # ---------------------------------------------------------------------------
70
+ Read:
71
+ tier: 1
72
+ layer: L1
73
+ defer: false
74
+ tokenCost: 200
75
+ category: file-operations
76
+ ptc_eligible: true
77
+ Write:
78
+ tier: 1
79
+ layer: L1
80
+ defer: false
81
+ tokenCost: 200
82
+ category: file-operations
83
+ ptc_eligible: true
84
+ Edit:
85
+ tier: 1
86
+ layer: L1
87
+ defer: false
88
+ tokenCost: 250
89
+ category: file-operations
90
+ ptc_eligible: true
91
+ Bash:
92
+ tier: 1
93
+ layer: L1
94
+ defer: false
95
+ tokenCost: 300
96
+ category: system
97
+ ptc_eligible: true
98
+ Grep:
99
+ tier: 1
100
+ layer: L1
101
+ defer: false
102
+ tokenCost: 200
103
+ category: search
104
+ ptc_eligible: true
105
+ Glob:
106
+ tier: 1
107
+ layer: L1
108
+ defer: false
109
+ tokenCost: 150
110
+ category: search
111
+ ptc_eligible: true
112
+ Task:
113
+ tier: 1
114
+ layer: L1
115
+ defer: false
116
+ tokenCost: 400
117
+ category: orchestration
118
+ ptc_eligible: true
119
+ Skill:
120
+ tier: 1
121
+ layer: L1
122
+ defer: false
123
+ tokenCost: 200
124
+ category: orchestration
125
+ ptc_eligible: true
126
+ WebSearch:
127
+ tier: 1
128
+ layer: L1
129
+ defer: false
130
+ tokenCost: 250
131
+ category: web
132
+ ptc_eligible: true
133
+ WebFetch:
134
+ tier: 1
135
+ layer: L1
136
+ defer: false
137
+ tokenCost: 250
138
+ category: web
139
+ ptc_eligible: true
140
+ filter:
141
+ type: content
142
+ max_tokens: 3000
143
+ NotebookEdit:
144
+ tier: 1
145
+ layer: L1
146
+ defer: false
147
+ tokenCost: 200
148
+ category: file-operations
149
+ ptc_eligible: true
150
+ AskUserQuestion:
151
+ tier: 1
152
+ layer: L1
153
+ defer: false
154
+ tokenCost: 300
155
+ category: interaction
156
+ ptc_eligible: true
157
+
158
+ # ---------------------------------------------------------------------------
159
+ # TIER 2 — Agent Commands & Skills (Deferred on Activation)
160
+ # ---------------------------------------------------------------------------
161
+ git:
162
+ tier: 2
163
+ layer: L2
164
+ defer: true
165
+ tokenCost: 100
166
+ category: version-control
167
+ github-cli:
168
+ tier: 2
169
+ layer: L2
170
+ defer: true
171
+ tokenCost: 150
172
+ category: version-control
173
+ coderabbit:
174
+ tier: 2
175
+ layer: L2
176
+ defer: true
177
+ tokenCost: 300
178
+ category: quality
179
+ context7:
180
+ tier: 2 # Hybrid: runs via MCP Docker Gateway but classified as Tier 2
181
+ # because it is agent-scoped (6 agents use it), not task-scoped.
182
+ # Future consumers (TOK-2 loader) should be aware it requires
183
+ # docker-gateway availability despite its Tier 2 classification.
184
+ layer: L2
185
+ defer: true
186
+ tokenCost: 200
187
+ category: documentation
188
+ keywords:
189
+ - library
190
+ - docs
191
+ - api-reference
192
+ mcp_server: docker-gateway
193
+ filter:
194
+ type: content
195
+ max_tokens: 5000
196
+ supabase:
197
+ tier: 2
198
+ layer: L3
199
+ defer: true
200
+ tokenCost: 250
201
+ category: database
202
+ supabase-cli:
203
+ tier: 2
204
+ layer: L3
205
+ defer: true
206
+ tokenCost: 200
207
+ category: database
208
+ browser:
209
+ tier: 2
210
+ layer: L3
211
+ defer: true
212
+ tokenCost: 300
213
+ category: testing
214
+ clickup:
215
+ tier: 2
216
+ layer: L3
217
+ defer: true
218
+ tokenCost: 200
219
+ category: project-management
220
+ n8n:
221
+ tier: 2
222
+ layer: L3
223
+ defer: true
224
+ tokenCost: 200
225
+ category: automation
226
+ ffmpeg:
227
+ tier: 2
228
+ layer: L3
229
+ defer: true
230
+ tokenCost: 150
231
+ category: media
232
+
233
+ # ---------------------------------------------------------------------------
234
+ # TIER 3 — MCP External Tools (Deferred via tool_search)
235
+ # ---------------------------------------------------------------------------
236
+ exa:
237
+ tier: 3
238
+ layer: L4
239
+ defer: true
240
+ essential: false # Task-specific: research, competitor analysis
241
+ tokenCost: 500
242
+ category: web-search
243
+ ptc_eligible: false # ADR-3: MCP tools excluded from PTC/batch blocks
244
+ keywords:
245
+ - search
246
+ - research
247
+ - web
248
+ - competitor
249
+ mcp_server: docker-gateway
250
+ input_examples: null # Placeholder — populated by TOK-4B
251
+ filter:
252
+ type: content
253
+ max_tokens: 2000
254
+ extract:
255
+ - title
256
+ - snippet
257
+ - url
258
+ playwright:
259
+ tier: 3
260
+ layer: L4
261
+ defer: true
262
+ essential: false # Task-specific: browser automation, screenshots
263
+ tokenCost: 800
264
+ category: browser-automation
265
+ ptc_eligible: false # ADR-3: MCP tools excluded from PTC/batch blocks
266
+ keywords:
267
+ - browser
268
+ - screenshot
269
+ - web-test
270
+ - automation
271
+ - website
272
+ mcp_server: direct
273
+ input_examples: null
274
+ filter:
275
+ type: schema
276
+ fields:
277
+ - url
278
+ - title
279
+ - status
280
+ - content
281
+ max_tokens: 4000
282
+ apify:
283
+ tier: 3
284
+ layer: L4
285
+ defer: true
286
+ essential: false # Task-specific: web scraping, social media
287
+ tokenCost: 600
288
+ category: web-scraping
289
+ ptc_eligible: false # ADR-3: MCP tools excluded from PTC/batch blocks
290
+ keywords:
291
+ - scraping
292
+ - social-media
293
+ - data-extraction
294
+ - actors
295
+ mcp_server: docker-gateway
296
+ input_examples: null
297
+ filter:
298
+ type: field
299
+ fields:
300
+ - username
301
+ - caption
302
+ - likes
303
+ - timestamp
304
+ - url
305
+ max_rows: 20
306
+ nogic:
307
+ tier: 3
308
+ layer: L4
309
+ defer: true
310
+ essential: true # Core code intelligence — NEVER disable
311
+ tokenCost: 400
312
+ category: code-intelligence
313
+ ptc_eligible: false # ADR-3: MCP tools excluded from PTC/batch blocks
314
+ keywords:
315
+ - code-analysis
316
+ - nogic
317
+ - intelligence
318
+ mcp_server: project
319
+ input_examples: null
320
+ code-graph:
321
+ tier: 3
322
+ layer: L4
323
+ defer: true
324
+ essential: true # Dependency analysis — NEVER disable
325
+ tokenCost: 400
326
+ category: code-intelligence
327
+ ptc_eligible: false # ADR-3: MCP tools excluded from PTC/batch blocks
328
+ keywords:
329
+ - graph
330
+ - dependencies
331
+ - code-structure
332
+ mcp_server: project
333
+ input_examples: null
334
+
335
+ # ---------------------------------------------------------------------------
336
+ # TIER 2 — Specialized Agent Tools
337
+ # ---------------------------------------------------------------------------
338
+ psql:
339
+ tier: 2
340
+ layer: L3
341
+ defer: true
342
+ tokenCost: 150
343
+ category: database
344
+ pg_dump:
345
+ tier: 2
346
+ layer: L3
347
+ defer: true
348
+ tokenCost: 100
349
+ category: database
350
+ postgres-explain-analyzer:
351
+ tier: 2
352
+ layer: L3
353
+ defer: true
354
+ tokenCost: 200
355
+ category: database
356
+ docker-gateway:
357
+ tier: 2
358
+ layer: L3
359
+ defer: true
360
+ tokenCost: 300
361
+ category: infrastructure
362
+ railway-cli:
363
+ tier: 2
364
+ layer: L3
365
+ defer: true
366
+ tokenCost: 150
367
+ category: deployment
368
+ google-workspace:
369
+ tier: 2
370
+ layer: L3
371
+ defer: true
372
+ tokenCost: 300
373
+ category: productivity
374
+ 21st-dev-magic:
375
+ tier: 2
376
+ layer: L3
377
+ defer: true
378
+ tokenCost: 200
379
+ category: design
380
+
381
+ # =============================================================================
382
+ # AGENT PROFILES
383
+ # =============================================================================
384
+ # Each profile defines which tools an agent needs by loading priority.
385
+ # always_loaded: loaded at agent activation (Tier 1 + critical Tier 2)
386
+ # frequently_used: loaded on first relevant task
387
+ # deferred: loaded only via tool_search or explicit request
388
+ # =============================================================================
389
+
390
+ profiles:
391
+ dev:
392
+ always_loaded:
393
+ - Read
394
+ - Write
395
+ - Edit
396
+ - Bash
397
+ - Grep
398
+ - Glob
399
+ - Task
400
+ - git
401
+ - coderabbit
402
+ frequently_used:
403
+ - context7
404
+ - supabase
405
+ - browser
406
+ - WebSearch
407
+ deferred:
408
+ - n8n
409
+ - ffmpeg
410
+ - playwright
411
+ - exa
412
+
413
+ qa:
414
+ always_loaded:
415
+ - Read
416
+ - Grep
417
+ - Glob
418
+ - Bash
419
+ - git
420
+ - coderabbit
421
+ frequently_used:
422
+ - browser
423
+ - context7
424
+ - supabase
425
+ - WebSearch
426
+ deferred:
427
+ - playwright
428
+ - exa
429
+
430
+ architect:
431
+ always_loaded:
432
+ - Read
433
+ - Grep
434
+ - Glob
435
+ - WebSearch
436
+ - WebFetch
437
+ - Task
438
+ frequently_used:
439
+ - exa
440
+ - context7
441
+ - git
442
+ - coderabbit
443
+ deferred:
444
+ - supabase-cli
445
+ - railway-cli
446
+
447
+ analyst:
448
+ always_loaded:
449
+ - Read
450
+ - Grep
451
+ - Glob
452
+ - WebSearch
453
+ - WebFetch
454
+ - Task
455
+ frequently_used:
456
+ - exa
457
+ - context7
458
+ deferred:
459
+ - google-workspace
460
+
461
+ devops:
462
+ always_loaded:
463
+ - Bash
464
+ - Read
465
+ - Write
466
+ - Edit
467
+ - git
468
+ - github-cli
469
+ frequently_used:
470
+ - coderabbit
471
+ - docker-gateway
472
+ deferred:
473
+ - railway-cli
474
+
475
+ pm:
476
+ always_loaded:
477
+ - Read
478
+ - Write
479
+ - Edit
480
+ - Grep
481
+ - Glob
482
+ - Task
483
+ frequently_used:
484
+ - WebSearch
485
+ - WebFetch
486
+ deferred: []
487
+
488
+ po:
489
+ always_loaded:
490
+ - Read
491
+ - Write
492
+ - Edit
493
+ - Grep
494
+ - Glob
495
+ frequently_used:
496
+ - github-cli
497
+ - context7
498
+ deferred: []
499
+
500
+ sm:
501
+ always_loaded:
502
+ - Read
503
+ - Write
504
+ - Edit
505
+ - Grep
506
+ - Glob
507
+ frequently_used:
508
+ - git
509
+ - context7
510
+ deferred:
511
+ - clickup
512
+
513
+ data-engineer:
514
+ always_loaded:
515
+ - Read
516
+ - Write
517
+ - Edit
518
+ - Bash
519
+ - Grep
520
+ - Glob
521
+ frequently_used:
522
+ - supabase-cli
523
+ - psql
524
+ - coderabbit
525
+ deferred:
526
+ - pg_dump
527
+ - postgres-explain-analyzer
528
+
529
+ ux-design-expert:
530
+ always_loaded:
531
+ - Read
532
+ - Write
533
+ - Edit
534
+ - Grep
535
+ - Glob
536
+ frequently_used:
537
+ - browser
538
+ - 21st-dev-magic
539
+ deferred:
540
+ - playwright
541
+
542
+ # =============================================================================
543
+ # TASK BINDINGS
544
+ # =============================================================================
545
+ # Maps core tasks to their tool requirements.
546
+ # required: tools that MUST be available
547
+ # optional: tools that enhance but are not required
548
+ # execution_mode: direct (standard) or programmatic (PTC — TOK-3)
549
+ # =============================================================================
550
+
551
+ task_bindings:
552
+ qa-gate:
553
+ required:
554
+ - Read
555
+ - Grep
556
+ - Glob
557
+ - Bash
558
+ - coderabbit
559
+ optional:
560
+ - browser
561
+ - supabase
562
+ execution_mode: programmatic # TOK-3: batch lint+typecheck+test in single Bash block
563
+
564
+ dev-develop-story:
565
+ required:
566
+ - Read
567
+ - Write
568
+ - Edit
569
+ - Bash
570
+ - Grep
571
+ - Glob
572
+ - git
573
+ optional:
574
+ - coderabbit
575
+ - context7
576
+ - supabase
577
+ - browser
578
+ execution_mode: direct
579
+
580
+ plan-create-implementation:
581
+ required:
582
+ - Read
583
+ - Grep
584
+ - Glob
585
+ - Task
586
+ optional:
587
+ - WebSearch
588
+ - context7
589
+ execution_mode: direct
590
+
591
+ create-next-story:
592
+ required:
593
+ - Read
594
+ - Write
595
+ - Edit
596
+ - Grep
597
+ - Glob
598
+ optional:
599
+ - git
600
+ - context7
601
+ execution_mode: direct
602
+
603
+ validate-next-story:
604
+ required:
605
+ - Read
606
+ - Grep
607
+ - Glob
608
+ optional:
609
+ - github-cli
610
+ - context7
611
+ execution_mode: direct
612
+
613
+ # --- PTC-eligible bindings (TOK-3) ---
614
+ entity-validation:
615
+ required:
616
+ - Read
617
+ - Grep
618
+ - Glob
619
+ - Bash
620
+ optional: []
621
+ execution_mode: programmatic # TOK-3: batch-scan N entities × M checks in single Bash block
622
+
623
+ research-aggregation:
624
+ required:
625
+ - Bash
626
+ - Read
627
+ - Grep
628
+ - WebSearch
629
+ optional:
630
+ - WebFetch
631
+ execution_mode: programmatic # TOK-3: multi-search + filter in single Bash block
632
+
633
+ # =============================================================================
634
+ # ANALYTICS CONFIGURATION (TOK-5)
635
+ # =============================================================================
636
+ # Configurable thresholds for promote/demote recommendations.
637
+ # These values are read by generate-optimization-report.js.
638
+ # Adjust based on observed usage patterns.
639
+ # =============================================================================
640
+
641
+ analytics:
642
+ thresholds:
643
+ promote:
644
+ minUsesPerSession: 10 # Tool used >N times per session average
645
+ minSessions: 5 # Across M+ sessions to be statistically meaningful
646
+ demote:
647
+ maxUsesPerNSessions: 1 # Tool used <N times per window
648
+ sessionWindow: 5 # Window of M sessions for demote calculation