sinapse-ai 1.8.0 → 1.9.1

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 (361) hide show
  1. package/.claude/hooks/mind-clone-governance.py +212 -212
  2. package/.claude/hooks/read-protection.py +152 -152
  3. package/.claude/hooks/slug-validation.py +175 -175
  4. package/.claude/hooks/sql-governance.py +183 -183
  5. package/.claude/rules/documentation-first.md +1 -1
  6. package/.claude/rules/hook-governance.md +1 -1
  7. package/.claude/rules/mandatory-delegation.md +1 -1
  8. package/.claude/rules/project-intelligence.md +1 -1
  9. package/.codex/agents/analyst.md +4 -371
  10. package/.codex/agents/animations-orqx.md +4 -57
  11. package/.codex/agents/architect.md +4 -560
  12. package/.codex/agents/brand-orqx.md +4 -95
  13. package/.codex/agents/claude-mastery-chief.md +4 -0
  14. package/.codex/agents/cloning-orqx.md +4 -70
  15. package/.codex/agents/commercial-orqx.md +4 -67
  16. package/.codex/agents/config-engineer.md +2 -2
  17. package/.codex/agents/content-orqx.md +4 -77
  18. package/.codex/agents/copy-orqx.md +4 -65
  19. package/.codex/agents/cost-optimizer.md +4 -0
  20. package/.codex/agents/council-orqx.md +4 -68
  21. package/.codex/agents/courses-orqx.md +4 -64
  22. package/.codex/agents/cro-persuasion.md +4 -0
  23. package/.codex/agents/cyber-orqx.md +4 -67
  24. package/.codex/agents/data-engineer.md +4 -542
  25. package/.codex/agents/design-orqx.md +4 -65
  26. package/.codex/agents/design-system.md +4 -210
  27. package/.codex/agents/developer.md +4 -666
  28. package/.codex/agents/devops.md +4 -668
  29. package/.codex/agents/finance-orqx.md +4 -57
  30. package/.codex/agents/fiscal-compliance-br.md +4 -0
  31. package/.codex/agents/forecast-strategist.md +4 -0
  32. package/.codex/agents/growth-orqx.md +4 -75
  33. package/.codex/agents/hooks-architect.md +2 -2
  34. package/.codex/agents/mcp-integrator.md +2 -2
  35. package/.codex/agents/paidmedia-orqx.md +4 -67
  36. package/.codex/agents/platform-aesthetic-director.md +4 -0
  37. package/.codex/agents/premium-packaging-strategist.md +4 -0
  38. package/.codex/agents/product-lead.md +4 -371
  39. package/.codex/agents/product-orqx.md +4 -57
  40. package/.codex/agents/product-surface-director.md +4 -0
  41. package/.codex/agents/project-integrator.md +2 -2
  42. package/.codex/agents/project-lead.md +4 -414
  43. package/.codex/agents/quality-gate.md +4 -547
  44. package/.codex/agents/research-orqx.md +4 -67
  45. package/.codex/agents/roadmap-sentinel.md +2 -2
  46. package/.codex/agents/skill-craftsman.md +2 -2
  47. package/.codex/agents/snps-orqx.md +4 -684
  48. package/.codex/agents/sop-extractor.md +4 -61
  49. package/.codex/agents/sprint-lead.md +4 -324
  50. package/.codex/agents/squad-creator.md +4 -402
  51. package/.codex/agents/storytelling-orqx.md +4 -65
  52. package/.codex/agents/swarm-orqx.md +4 -64
  53. package/.codex/agents/ux-design-expert.md +4 -532
  54. package/.codex/agents/ux-designer.md +4 -124
  55. package/.codex/command-registry.json +9 -9
  56. package/.codex/delegation-matrix.json +375 -839
  57. package/.codex/delegation-parity.json +658 -0
  58. package/.codex/handoff-packet.parity.schema.json +148 -0
  59. package/.codex/handoff-packet.template.json +26 -0
  60. package/.codex/instructions.md +8 -8
  61. package/.codex/scripts/resolve-codex-agent.js +482 -0
  62. package/.codex/scripts/resolve-codex-command.js +75 -12
  63. package/.codex/scripts/resolve-codex-delegation.js +131 -92
  64. package/.codex/skills/sinapse-claude/SKILL.md +3 -3
  65. package/.codex/skills/sinapse-po/SKILL.md +1 -1
  66. package/.codex/tasks/resolve-sinapse-conflict.md +1 -1
  67. package/.sinapse-ai/constitution.md +5 -5
  68. package/.sinapse-ai/core/doctor/checks/git-hooks.js +163 -19
  69. package/.sinapse-ai/core/events/dashboard-emitter.js +30 -9
  70. package/.sinapse-ai/core/execution/subagent-dispatcher.js +1 -1
  71. package/.sinapse-ai/core/synapse/engine.js +15 -0
  72. package/.sinapse-ai/core/ui/observability-panel.js +240 -0
  73. package/.sinapse-ai/core-config.yaml +0 -20
  74. package/.sinapse-ai/data/entity-registry.yaml +185 -236
  75. package/.sinapse-ai/development/agents/snps-orqx.md +16 -26
  76. package/.sinapse-ai/development/tasks/build-autonomous.md +11 -1
  77. package/.sinapse-ai/development/tasks/build-resume.md +8 -0
  78. package/.sinapse-ai/development/tasks/build-status.md +8 -0
  79. package/.sinapse-ai/development/tasks/build.md +8 -0
  80. package/.sinapse-ai/development/tasks/cleanup-worktrees.md +8 -1
  81. package/.sinapse-ai/development/tasks/gotcha.md +8 -0
  82. package/.sinapse-ai/development/tasks/gotchas.md +8 -0
  83. package/.sinapse-ai/development/tasks/ids-health.md +14 -6
  84. package/.sinapse-ai/development/tasks/list-mcps.md +15 -0
  85. package/.sinapse-ai/development/tasks/merge-worktree.md +8 -1
  86. package/.sinapse-ai/development/tasks/qa-review-build.md +18 -0
  87. package/.sinapse-ai/development/tasks/remove-mcp.md +8 -1
  88. package/.sinapse-ai/development/tasks/validate-agents.md +26 -14
  89. package/.sinapse-ai/development/templates/service-template/README.md.hbs +159 -159
  90. package/.sinapse-ai/development/templates/service-template/__tests__/index.test.ts.hbs +238 -238
  91. package/.sinapse-ai/development/templates/service-template/client.ts.hbs +404 -404
  92. package/.sinapse-ai/development/templates/service-template/errors.ts.hbs +183 -183
  93. package/.sinapse-ai/development/templates/service-template/index.ts.hbs +121 -121
  94. package/.sinapse-ai/development/templates/service-template/package.json.hbs +88 -88
  95. package/.sinapse-ai/development/templates/service-template/types.ts.hbs +146 -146
  96. package/.sinapse-ai/development/templates/squad-template/LICENSE +22 -22
  97. package/.sinapse-ai/git-hooks/lib/framework-guard.js +258 -0
  98. package/.sinapse-ai/git-hooks/lib/secret-scanner-core.js +355 -0
  99. package/.sinapse-ai/git-hooks/lib/staged-secret-scan.js +179 -0
  100. package/.sinapse-ai/git-hooks/lib/staged-sql-guard.js +204 -0
  101. package/.sinapse-ai/git-hooks/post-commit +28 -0
  102. package/.sinapse-ai/git-hooks/pre-commit +81 -0
  103. package/.sinapse-ai/git-hooks/pre-push +83 -0
  104. package/.sinapse-ai/hooks/ids-post-commit.js +13 -11
  105. package/.sinapse-ai/hooks/ids-pre-push.js +9 -7
  106. package/.sinapse-ai/infrastructure/scripts/codex-parity/resolve.js +161 -0
  107. package/.sinapse-ai/infrastructure/scripts/dashboard-status-writer.js +6 -2
  108. package/.sinapse-ai/infrastructure/scripts/ide-sync/index.js +65 -68
  109. package/.sinapse-ai/infrastructure/scripts/sync-codex-local-first.js +156 -1
  110. package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +1 -4
  111. package/.sinapse-ai/infrastructure/scripts/validate-codex-integration.js +41 -5
  112. package/.sinapse-ai/infrastructure/templates/coderabbit.yaml.template +280 -280
  113. package/.sinapse-ai/infrastructure/templates/config/env.example +16 -16
  114. package/.sinapse-ai/infrastructure/templates/config/gitignore-additions.tmpl +59 -59
  115. package/.sinapse-ai/infrastructure/templates/github/CODEOWNERS.template +12 -12
  116. package/.sinapse-ai/infrastructure/templates/github-workflows/ci.yml.template +170 -170
  117. package/.sinapse-ai/infrastructure/templates/github-workflows/pr-automation.yml.template +331 -331
  118. package/.sinapse-ai/infrastructure/templates/github-workflows/release.yml.template +197 -197
  119. package/.sinapse-ai/infrastructure/templates/gitignore/gitignore-brownfield-merge.tmpl +19 -19
  120. package/.sinapse-ai/infrastructure/templates/gitignore/gitignore-node.tmpl +86 -86
  121. package/.sinapse-ai/infrastructure/templates/gitignore/gitignore-python.tmpl +146 -146
  122. package/.sinapse-ai/infrastructure/templates/gitignore/gitignore-sinapse-base.tmpl +64 -64
  123. package/.sinapse-ai/infrastructure/templates/safe-collab/CODEOWNERS.template +16 -16
  124. package/.sinapse-ai/infrastructure/templates/sinapse-sync.yaml.template +183 -183
  125. package/.sinapse-ai/install-manifest.yaml +112 -164
  126. package/.sinapse-ai/local-config.yaml.template +65 -65
  127. package/.sinapse-ai/product/templates/adr.hbs +126 -126
  128. package/.sinapse-ai/product/templates/dbdr.hbs +242 -242
  129. package/.sinapse-ai/product/templates/epic.hbs +213 -213
  130. package/.sinapse-ai/product/templates/ide-rules/codex-rules.md +30 -0
  131. package/.sinapse-ai/product/templates/pmdr.hbs +187 -187
  132. package/.sinapse-ai/product/templates/prd-v2.0.hbs +217 -217
  133. package/.sinapse-ai/product/templates/prd.hbs +202 -202
  134. package/.sinapse-ai/product/templates/statusline/statusline-script.js +31 -8
  135. package/.sinapse-ai/product/templates/statusline/track-agent-clear.cjs +79 -0
  136. package/.sinapse-ai/product/templates/statusline/track-agent.cjs +218 -0
  137. package/.sinapse-ai/product/templates/story.hbs +264 -264
  138. package/.sinapse-ai/product/templates/task.hbs +171 -171
  139. package/.sinapse-ai/product/templates/tmpl-comment-on-examples.sql +159 -159
  140. package/.sinapse-ai/product/templates/tmpl-migration-script.sql +92 -92
  141. package/.sinapse-ai/product/templates/tmpl-rls-granular-policies.sql +105 -105
  142. package/.sinapse-ai/product/templates/tmpl-rls-kiss-policy.sql +11 -11
  143. package/.sinapse-ai/product/templates/tmpl-rls-roles.sql +136 -136
  144. package/.sinapse-ai/product/templates/tmpl-rls-simple.sql +78 -78
  145. package/.sinapse-ai/product/templates/tmpl-rls-tenant.sql +153 -153
  146. package/.sinapse-ai/product/templates/tmpl-rollback-script.sql +78 -78
  147. package/.sinapse-ai/product/templates/tmpl-seed-data.sql +141 -141
  148. package/.sinapse-ai/product/templates/tmpl-smoke-test.sql +17 -17
  149. package/.sinapse-ai/product/templates/tmpl-staging-copy-merge.sql +140 -140
  150. package/.sinapse-ai/product/templates/tmpl-stored-proc.sql +141 -141
  151. package/.sinapse-ai/product/templates/tmpl-trigger.sql +153 -153
  152. package/.sinapse-ai/product/templates/tmpl-view-materialized.sql +134 -134
  153. package/.sinapse-ai/product/templates/tmpl-view.sql +178 -178
  154. package/AGENTS.md +193 -0
  155. package/CHANGELOG.md +1247 -0
  156. package/LICENSE +63 -63
  157. package/README.en.md +17 -18
  158. package/README.md +18 -19
  159. package/bin/cli.js +1 -1
  160. package/bin/commands/install.js +194 -22
  161. package/bin/commands/status.js +14 -1
  162. package/bin/commands/uninstall.js +2 -2
  163. package/bin/commands/update.js +52 -0
  164. package/bin/lib/setup-statusline.js +191 -0
  165. package/bin/sinapse-init.js +11 -83
  166. package/bin/utils/framework-guard.js +17 -4
  167. package/bin/utils/secret-scanner-core.js +109 -7
  168. package/bin/utils/staged-sql-guard.js +204 -0
  169. package/bin/utils/validate-publish.js +63 -0
  170. package/docs/agent-reference-guide.md +5 -7
  171. package/docs/framework/agent-prefix-convention.md +58 -0
  172. package/docs/framework/architecture-overview.md +4 -4
  173. package/docs/framework/collaboration-activation.md +45 -0
  174. package/docs/framework/guiding-principles.md +9 -9
  175. package/docs/getting-started.md +1 -1
  176. package/docs/guides/agent-reference.md +1 -1
  177. package/docs/guides/codex-config.md +4 -5
  178. package/docs/pt/architecture/sub-orqx-pattern.md +20 -18
  179. package/docs/security/overview.md +1 -1
  180. package/package.json +16 -12
  181. package/packages/installer/src/index.js +26 -0
  182. package/packages/installer/src/installer/git-hooks-installer.js +211 -47
  183. package/packages/installer/src/installer/sinapse-ai-installer.js +71 -0
  184. package/packages/installer/src/wizard/feedback.js +1 -1
  185. package/packages/installer/src/wizard/ide-config-generator.js +26 -26
  186. package/packages/installer/src/wizard/index.js +53 -4
  187. package/packages/sinapse-install/bin/edmcp.js +0 -0
  188. package/packages/sinapse-install/bin/sinapse-install.js +0 -0
  189. package/scripts/audit-tasks.cjs +112 -91
  190. package/scripts/check-markdown-links.py +352 -352
  191. package/scripts/prepare-hooks.js +58 -0
  192. package/scripts/regenerate-orqx-stubs.ps1 +2 -3
  193. package/scripts/sync-counts.js +10 -2
  194. package/scripts/sync-squad-yaml-components.js +108 -6
  195. package/scripts/validate-agents-md.js +128 -0
  196. package/scripts/validate-all.js +1 -0
  197. package/scripts/validate-squad-orqx.js +19 -9
  198. package/sinapse/agents/sinapse-orqx.md +16 -26
  199. package/sinapse/agents/snps-orqx.md +15 -25
  200. package/sinapse/knowledge-base/routing-catalog.md +1 -1
  201. package/sinapse/tasks/diagnose-and-route.md +1 -1
  202. package/sinapse/tasks/squad-status-report.md +1 -1
  203. package/squads/claude-code-mastery/agents/claude-mastery-chief.md +1 -1
  204. package/squads/claude-code-mastery/agents/hooks-architect.md +60 -68
  205. package/squads/claude-code-mastery/knowledge-base/swarm-orchestration-patterns.md +1 -1
  206. package/squads/claude-code-mastery/squad.yaml +8 -0
  207. package/squads/claude-code-mastery/tasks/audit-setup.md +1 -1
  208. package/squads/claude-code-mastery/workflows/optimization-cycle.yaml +4 -4
  209. package/squads/claude-code-mastery/workflows/project-setup-cycle.yaml +4 -4
  210. package/squads/squad-animations/README.md +1 -1
  211. package/squads/squad-animations/squad.yaml +1 -1
  212. package/squads/squad-brand/squad.yaml +1 -1
  213. package/squads/squad-cloning/README.md +1 -1
  214. package/squads/squad-cloning/squad.yaml +1 -1
  215. package/squads/squad-commercial/README.md +1 -1
  216. package/squads/squad-commercial/squad.yaml +2 -3
  217. package/squads/squad-content/README.md +1 -1
  218. package/squads/squad-content/squad.yaml +1 -1
  219. package/squads/squad-copy/README.md +1 -1
  220. package/squads/squad-copy/squad.yaml +2 -3
  221. package/squads/squad-council/README.md +1 -1
  222. package/squads/squad-courses/README.md +1 -1
  223. package/squads/squad-courses/squad.yaml +1 -1
  224. package/squads/squad-cybersecurity/README.md +1 -1
  225. package/squads/squad-cybersecurity/squad.yaml +2 -3
  226. package/squads/squad-design/README.md +1 -1
  227. package/squads/{squad-artdir → squad-design}/agents/cro-persuasion.md +1 -1
  228. package/squads/{squad-artdir → squad-design}/agents/platform-aesthetic-director.md +2 -2
  229. package/squads/{squad-artdir → squad-design}/agents/premium-packaging-strategist.md +2 -2
  230. package/squads/{squad-artdir → squad-design}/agents/product-surface-director.md +3 -3
  231. package/squads/squad-design/squad.yaml +6 -3
  232. package/squads/squad-finance/README.md +1 -1
  233. package/squads/squad-finance/squad.yaml +7 -1
  234. package/squads/squad-growth/README.md +1 -1
  235. package/squads/squad-growth/squad.yaml +1 -1
  236. package/squads/squad-paidmedia/README.md +1 -1
  237. package/squads/squad-paidmedia/squad.yaml +2 -3
  238. package/squads/squad-product/README.md +1 -1
  239. package/squads/squad-product/squad.yaml +1 -1
  240. package/squads/squad-research/README.md +1 -1
  241. package/squads/squad-research/squad.yaml +2 -3
  242. package/squads/squad-storytelling/README.md +1 -1
  243. package/squads/squad-storytelling/squad.yaml +2 -3
  244. package/.codex/agents/brad-frost.md +0 -46
  245. package/.codex/agents/claude-orqx.md +0 -72
  246. package/.codex/agents/copy-chief.md +0 -162
  247. package/.codex/agents/cyber-chief.md +0 -169
  248. package/.codex/agents/dan-mall.md +0 -43
  249. package/.codex/agents/data-chief.md +0 -198
  250. package/.codex/agents/dave-malouf.md +0 -43
  251. package/.codex/agents/db-sage.md +0 -152
  252. package/.codex/agents/design-chief.md +0 -226
  253. package/.codex/agents/dev.md +0 -102
  254. package/.codex/agents/legal-chief.md +0 -199
  255. package/.codex/agents/nano-banana-generator.md +0 -42
  256. package/.codex/agents/pm.md +0 -81
  257. package/.codex/agents/po.md +0 -85
  258. package/.codex/agents/qa.md +0 -98
  259. package/.codex/agents/sm.md +0 -77
  260. package/.codex/agents/squad-chief.md +0 -1553
  261. package/.codex/agents/squad.md +0 -66
  262. package/.codex/agents/story-chief.md +0 -180
  263. package/.codex/agents/tools-orqx.md +0 -219
  264. package/.codex/agents/traffic-masters-chief.md +0 -211
  265. package/.sinapse-ai/core/memory/__tests__/active-modules.verify.js +0 -265
  266. package/.sinapse-ai/core/permissions/__tests__/permission-mode.test.js +0 -293
  267. package/.sinapse-ai/data/registry-update-log.jsonl +0 -158
  268. package/.sinapse-ai/infrastructure/scripts/ide-sync/gemini-commands.js +0 -298
  269. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/antigravity.js +0 -121
  270. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/cursor.js +0 -119
  271. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/github-copilot.js +0 -191
  272. package/.sinapse-ai/infrastructure/scripts/ide-sync/transformers/kimi.js +0 -448
  273. package/.sinapse-ai/infrastructure/tests/project-status-loader.test.js +0 -569
  274. package/.sinapse-ai/infrastructure/tests/regression-suite-v2.md +0 -622
  275. package/.sinapse-ai/infrastructure/tests/validate-module.js +0 -98
  276. package/.sinapse-ai/infrastructure/tests/worktree-manager.test.js +0 -620
  277. package/.sinapse-ai/monitor/hooks/lib/__init__.py +0 -2
  278. package/.sinapse-ai/monitor/hooks/lib/enrich.py +0 -59
  279. package/.sinapse-ai/monitor/hooks/lib/send_event.py +0 -48
  280. package/.sinapse-ai/monitor/hooks/notification.py +0 -30
  281. package/.sinapse-ai/monitor/hooks/post_tool_use.py +0 -46
  282. package/.sinapse-ai/monitor/hooks/pre_compact.py +0 -30
  283. package/.sinapse-ai/monitor/hooks/pre_tool_use.py +0 -41
  284. package/.sinapse-ai/monitor/hooks/stop.py +0 -30
  285. package/.sinapse-ai/monitor/hooks/subagent_stop.py +0 -30
  286. package/.sinapse-ai/monitor/hooks/user_prompt_submit.py +0 -39
  287. package/.sinapse-ai/product/templates/statusline/track-agent.sh +0 -69
  288. package/.sinapse-ai/workflow-intelligence/__tests__/confidence-scorer.test.js +0 -335
  289. package/.sinapse-ai/workflow-intelligence/__tests__/integration.test.js +0 -340
  290. package/.sinapse-ai/workflow-intelligence/__tests__/suggestion-engine.test.js +0 -438
  291. package/.sinapse-ai/workflow-intelligence/__tests__/wave-analyzer.test.js +0 -448
  292. package/.sinapse-ai/workflow-intelligence/__tests__/workflow-registry.test.js +0 -303
  293. package/bin/sinapse-graph.js +0 -19
  294. package/docs/codex-integration-process.md +0 -22
  295. package/docs/codex-parity-program.md +0 -27
  296. package/packages/installer/src/__tests__/performance-benchmark.js +0 -383
  297. package/packages/installer/tests/integration/environment-configuration.test.js +0 -332
  298. package/packages/installer/tests/integration/wizard-detection.test.js +0 -352
  299. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +0 -383
  300. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +0 -193
  301. package/packages/installer/tests/unit/config-validator.test.js +0 -315
  302. package/packages/installer/tests/unit/detection/detect-project-type.test.js +0 -539
  303. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +0 -636
  304. package/packages/installer/tests/unit/doctor/doctor-orchestrator.test.js +0 -192
  305. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +0 -186
  306. package/packages/installer/tests/unit/env-template.test.js +0 -187
  307. package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +0 -310
  308. package/packages/installer/tests/unit/git-hooks-installer.test.js +0 -262
  309. package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +0 -231
  310. package/packages/installer/tests/unit/merger/env-merger.test.js +0 -191
  311. package/packages/installer/tests/unit/merger/markdown-merger.test.js +0 -262
  312. package/packages/installer/tests/unit/merger/strategies.test.js +0 -154
  313. package/packages/installer/tests/unit/merger/yaml-merger.test.js +0 -328
  314. package/packages/sinapse-install/tests/unit/chrome-brain.smoke.test.js +0 -66
  315. package/scripts/install-monitor-hooks.sh +0 -82
  316. package/squads/squad-artdir/README.md +0 -90
  317. package/squads/squad-artdir/agents/accessibility-guardian.md +0 -184
  318. package/squads/squad-artdir/agents/artdir-orqx.md +0 -222
  319. package/squads/squad-artdir/agents/color-psychologist.md +0 -166
  320. package/squads/squad-artdir/agents/design-system-architect.md +0 -100
  321. package/squads/squad-artdir/agents/ia-architect.md +0 -169
  322. package/squads/squad-artdir/agents/interaction-designer.md +0 -162
  323. package/squads/squad-artdir/agents/layout-engineer.md +0 -163
  324. package/squads/squad-artdir/agents/motion-architect.md +0 -185
  325. package/squads/squad-artdir/agents/type-systemist.md +0 -138
  326. package/squads/squad-artdir/agents/visual-strategist.md +0 -127
  327. package/squads/squad-artdir/checklists/seven-pillars-validation-checklist.md +0 -172
  328. package/squads/squad-artdir/knowledge-base/case-nyo-ia-reference.md +0 -289
  329. package/squads/squad-artdir/knowledge-base/deliverables-templates.md +0 -457
  330. package/squads/squad-artdir/knowledge-base/motion-technique-catalog.md +0 -247
  331. package/squads/squad-artdir/knowledge-base/premium-packaging-principles.md +0 -133
  332. package/squads/squad-artdir/knowledge-base/psychological-toolkit.md +0 -229
  333. package/squads/squad-artdir/knowledge-base/saas-art-direction-canon.md +0 -242
  334. package/squads/squad-artdir/knowledge-base/seven-pillars-framework.md +0 -289
  335. package/squads/squad-artdir/knowledge-base/ten-pillars-framework.md +0 -221
  336. package/squads/squad-artdir/package.json +0 -20
  337. package/squads/squad-artdir/squad.yaml +0 -299
  338. package/squads/squad-artdir/tasks/audit-conversion.md +0 -97
  339. package/squads/squad-artdir/tasks/audit-drift-multi-surface.md +0 -55
  340. package/squads/squad-artdir/tasks/consult-saas-canon.md +0 -54
  341. package/squads/squad-artdir/tasks/create-art-direction-brief.md +0 -110
  342. package/squads/squad-artdir/tasks/create-premium-packaging-brief.md +0 -61
  343. package/squads/squad-artdir/tasks/create-wireflow.md +0 -84
  344. package/squads/squad-artdir/tasks/design-color-system.md +0 -81
  345. package/squads/squad-artdir/tasks/design-product-surface.md +0 -60
  346. package/squads/squad-artdir/tasks/design-token-system.md +0 -58
  347. package/squads/squad-artdir/tasks/diagnose-visual-language.md +0 -92
  348. package/squads/squad-artdir/tasks/first-5-minutes-choreography.md +0 -65
  349. package/squads/squad-artdir/tasks/specify-motion-system.md +0 -84
  350. package/squads/squad-artdir/tasks/validate-against-pillars.md +0 -143
  351. package/squads/squad-artdir/templates/art-direction-brief-template.md +0 -215
  352. package/squads/squad-artdir/workflows/conversion-audit-cycle.yaml +0 -142
  353. package/squads/squad-artdir/workflows/full-art-direction-cycle.yaml +0 -179
  354. package/squads/squad-artdir/workflows/saas-platform-art-direction-cycle.yaml +0 -338
  355. package/squads/squad-commercial/agents/legal-chief.md +0 -199
  356. package/squads/squad-copy/agents/copy-chief.md +0 -162
  357. package/squads/squad-cybersecurity/agents/cyber-chief.md +0 -169
  358. package/squads/squad-design/agents/design-chief.md +0 -226
  359. package/squads/squad-paidmedia/agents/traffic-masters-chief.md +0 -211
  360. package/squads/squad-research/agents/data-chief.md +0 -198
  361. package/squads/squad-storytelling/agents/story-chief.md +0 -180
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ /*
5
+ * prepare-hooks — runs on `npm install` (the `prepare` lifecycle script).
6
+ *
7
+ * Why this exists: husky's own setup points git `core.hooksPath` at `.husky/_`.
8
+ * E8 ("trava de git real e ativa") makes `.sinapse-ai/git-hooks` the canonical,
9
+ * managed hook entrypoint — its pre-commit runs the SINAPSE guards (secret scan,
10
+ * SQL guard, framework boundary) FIRST and then chains back to `.husky/pre-commit`,
11
+ * so husky's guards still run. Without re-pointing here, every `npm install`
12
+ * silently reverts the managed trava back to husky and the dogfooding parity test
13
+ * (codex-parity-behavioral-smoke) goes red.
14
+ *
15
+ * Fully guarded: a missing husky, missing git, or absent managed dir never breaks
16
+ * `npm install`.
17
+ */
18
+
19
+ const { spawnSync } = require('child_process');
20
+ const fs = require('fs');
21
+ const path = require('path');
22
+
23
+ const onWindows = process.platform === 'win32';
24
+
25
+ // husky is an npm-bin shim, so on Windows it must go through the shell to resolve
26
+ // `node_modules/.bin/husky.cmd`. It takes no args, so shell:true carries no
27
+ // injection risk here.
28
+ function runShell(cmd) {
29
+ try {
30
+ return spawnSync(cmd, [], { stdio: 'inherit', shell: onWindows }).status === 0;
31
+ } catch {
32
+ return false;
33
+ }
34
+ }
35
+
36
+ // git is a real binary spawnable directly — no shell, so args are never
37
+ // concatenated into a command string (avoids DEP0190 and any injection surface).
38
+ function runDirect(cmd, args) {
39
+ try {
40
+ return spawnSync(cmd, args, { stdio: 'inherit' }).status === 0;
41
+ } catch {
42
+ return false;
43
+ }
44
+ }
45
+
46
+ // 1. Let husky materialize `.husky/_` (this also sets core.hooksPath=.husky/_).
47
+ runShell('husky');
48
+
49
+ // 2. Re-point core.hooksPath at the SINAPSE-managed dir, but only when we are in a
50
+ // real git work tree and the managed hooks are actually present.
51
+ const projectRoot = process.cwd();
52
+ const managedDir = '.sinapse-ai/git-hooks';
53
+ const inGitWorkTree = fs.existsSync(path.join(projectRoot, '.git'));
54
+ const managedReady = fs.existsSync(path.join(projectRoot, managedDir, 'pre-commit'));
55
+
56
+ if (inGitWorkTree && managedReady) {
57
+ runDirect('git', ['config', 'core.hooksPath', managedDir]);
58
+ }
@@ -1,5 +1,6 @@
1
1
  # regenerate-orqx-stubs.ps1
2
- # Regenera os 22 stubs de orchestrators em ~/.claude/agents/*-orqx.md
2
+ # Regenera os stubs de orchestrators em ~/.claude/agents/*-orqx.md
3
+ # Ecossistema pos-fusao: 17 squads / 172 agentes / 1.200 tasks (squad-artdir fundido em squad-design)
3
4
  # Formato completo (39 linhas) com fix HALT → briefing-auto-orchestration
4
5
 
5
6
  $ErrorActionPreference = 'Stop'
@@ -7,9 +8,7 @@ $ErrorActionPreference = 'Stop'
7
8
  # Mapeamento orqx → squad (canonical em ~/.sinapse/{squad}/agents/{id}.md)
8
9
  $mapping = @(
9
10
  @{ id = 'animations-orqx'; squad = 'squad-animations' }
10
- @{ id = 'artdir-orqx'; squad = 'squad-artdir' }
11
11
  @{ id = 'brand-orqx'; squad = 'squad-brand' }
12
- @{ id = 'claude-orqx'; squad = 'squad-claude' }
13
12
  @{ id = 'cloning-orqx'; squad = 'squad-cloning' }
14
13
  @{ id = 'commercial-orqx'; squad = 'squad-commercial' }
15
14
  @{ id = 'content-orqx'; squad = 'squad-content' }
@@ -28,6 +28,11 @@ function countMatching(dir, predicate) {
28
28
  let count = 0;
29
29
  for (const entry of entries) {
30
30
  const full = path.join(dir, entry.name);
31
+ // Never count anything under a _deprecated/ folder — those entities are
32
+ // retired (e.g. squads/claude-code-mastery/_deprecated/claude-orqx.md).
33
+ if (entry.name === '_deprecated' || full.includes(`${path.sep}_deprecated${path.sep}`)) {
34
+ continue;
35
+ }
31
36
  if (entry.isDirectory()) {
32
37
  count += countMatching(full, predicate);
33
38
  } else if (predicate(full, entry.name)) {
@@ -52,8 +57,11 @@ function isTaskFile(fullPath, filename) {
52
57
  return fullPath.includes(`${path.sep}tasks${path.sep}`);
53
58
  }
54
59
 
55
- function isOrqxFile(_fullPath, filename) {
56
- return filename.endsWith('-orqx.md');
60
+ function isOrqxFile(fullPath, filename) {
61
+ // Only count orqx personas that live under a squad's agents/ directory.
62
+ // Guards against stray/retired orqx files outside the canonical location.
63
+ if (!filename.endsWith('-orqx.md')) return false;
64
+ return fullPath.includes(`${path.sep}agents${path.sep}`);
57
65
  }
58
66
 
59
67
  function countSquadDirs() {
@@ -15,9 +15,18 @@
15
15
  * `components.agents` block based on disk reality, restoring manifest
16
16
  * as a reliable source of truth.
17
17
  *
18
+ * --check mode (E8 / auditoria-pos-190):
19
+ * Beyond detecting a MISSING block, --check now RECONCILES the declared
20
+ * agents list against the actual `.md` files on disk. It fails (exit 1) when:
21
+ * - a squad.yaml is missing the components.agents block (needs-update), OR
22
+ * - the declared list diverges from disk (drift): a declared agent has no
23
+ * file, or an agent file is not declared.
24
+ * Inline `# comments` after a filename are stripped before comparison, so a
25
+ * `- foo.md # Persona — Role` entry reconciles cleanly against `foo.md`.
26
+ *
18
27
  * Usage:
19
28
  * node scripts/sync-squad-yaml-components.js # apply changes
20
- * node scripts/sync-squad-yaml-components.js --check # report only, no write
29
+ * node scripts/sync-squad-yaml-components.js --check # report + reconcile, no write
21
30
  */
22
31
 
23
32
  'use strict';
@@ -64,6 +73,61 @@ function hasComponentsAgents(yamlContent) {
64
73
  return false;
65
74
  }
66
75
 
76
+ // parseDeclaredAgents extracts the filenames declared under components.agents.
77
+ // It tolerates inline `# comments` after each filename (several squad.yaml files
78
+ // annotate entries like `- brand-auditor.md # Sentinel — Guardian`). Returns a
79
+ // sorted array of bare filenames, or null if no components.agents block exists.
80
+ function parseDeclaredAgents(yamlContent) {
81
+ const lines = yamlContent.split('\n');
82
+ let inAgents = false;
83
+ let found = false;
84
+ const agents = [];
85
+ for (let i = 0; i < lines.length; i++) {
86
+ const line = lines[i];
87
+ if (!inAgents) {
88
+ if (/^components:\s*$/.test(line)) {
89
+ // scan forward for the agents: sub-key (block style)
90
+ for (let j = i + 1; j < lines.length; j++) {
91
+ if (/^ {2}agents:/.test(lines[j])) {
92
+ inAgents = true;
93
+ found = true;
94
+ i = j; // continue after the agents: header
95
+ break;
96
+ }
97
+ // a new top-level key ends the components: block
98
+ if (/^\S/.test(lines[j]) && !/^\s*#/.test(lines[j])) break;
99
+ }
100
+ }
101
+ continue;
102
+ }
103
+ // Inside the agents list: collect ` - name.md` items, stop at dedent.
104
+ const itemMatch = line.match(/^ {4}-\s*(.+?)\s*$/);
105
+ if (itemMatch) {
106
+ // strip an inline comment (`# ...`) and surrounding quotes/whitespace
107
+ let value = itemMatch[1].replace(/\s+#.*$/, '').trim();
108
+ value = value.replace(/^["']|["']$/g, '').trim();
109
+ if (value) agents.push(value);
110
+ continue;
111
+ }
112
+ // blank line inside the list is tolerated; anything else dedented ends it
113
+ if (line.trim() === '') continue;
114
+ if (!/^ {4}/.test(line)) break;
115
+ }
116
+ if (!found) return null;
117
+ return agents.sort();
118
+ }
119
+
120
+ // reconcileAgents compares the declared list against disk reality.
121
+ // Returns { declaredOnly, diskOnly } arrays (empty when in sync).
122
+ function reconcileAgents(declared, diskFiles) {
123
+ const declaredSet = new Set(declared);
124
+ const diskSet = new Set(diskFiles);
125
+ return {
126
+ declaredOnly: declared.filter((f) => !diskSet.has(f)), // declared, no file
127
+ diskOnly: diskFiles.filter((f) => !declaredSet.has(f)), // file, not declared
128
+ };
129
+ }
130
+
67
131
  function buildComponentsBlock(agentFiles) {
68
132
  const lines = ['', '# ════════════════════════════════════════════════════', '# COMPONENTS — declared agents (synced from filesystem)', '# ════════════════════════════════════════════════════', 'components:', ' agents:'];
69
133
  for (const file of agentFiles) {
@@ -83,6 +147,20 @@ function processSquad(squadName) {
83
147
  return { squadName, status: 'no-agents', changes: 0 };
84
148
  }
85
149
  if (hasComponentsAgents(content)) {
150
+ // Block is present — in --check mode, reconcile the declared list vs disk.
151
+ if (CHECK_ONLY) {
152
+ const declared = parseDeclaredAgents(content) || [];
153
+ const { declaredOnly, diskOnly } = reconcileAgents(declared, agents);
154
+ if (declaredOnly.length > 0 || diskOnly.length > 0) {
155
+ return {
156
+ squadName,
157
+ status: 'drift',
158
+ changes: declaredOnly.length + diskOnly.length,
159
+ declaredOnly,
160
+ diskOnly,
161
+ };
162
+ }
163
+ }
86
164
  return { squadName, status: 'already-declared', changes: 0 };
87
165
  }
88
166
  if (CHECK_ONLY) {
@@ -100,11 +178,13 @@ function run() {
100
178
  let updated = 0;
101
179
  let alreadyDeclared = 0;
102
180
  let needsUpdate = 0;
181
+ let drift = 0;
103
182
  let other = 0;
104
183
  for (const r of results) {
105
184
  if (r.status === 'updated') updated++;
106
185
  else if (r.status === 'already-declared') alreadyDeclared++;
107
186
  else if (r.status === 'needs-update') needsUpdate++;
187
+ else if (r.status === 'drift') drift++;
108
188
  else other++;
109
189
  }
110
190
 
@@ -114,17 +194,32 @@ function run() {
114
194
  for (const r of results) {
115
195
  const marker = r.status === 'updated' ? 'UPDATED'
116
196
  : r.status === 'needs-update' ? 'NEEDS UPDATE'
197
+ : r.status === 'drift' ? 'DRIFT'
117
198
  : r.status === 'already-declared' ? 'ok'
118
199
  : r.status.toUpperCase();
119
200
  console.log(` ${marker.padEnd(14)} ${r.squadName} (${r.changes} agent(s))`);
201
+ if (r.status === 'drift') {
202
+ if (r.declaredOnly.length > 0) {
203
+ console.log(` declared but no file: ${r.declaredOnly.join(', ')}`);
204
+ }
205
+ if (r.diskOnly.length > 0) {
206
+ console.log(` file but not declared: ${r.diskOnly.join(', ')}`);
207
+ }
208
+ }
120
209
  }
121
210
  console.log('');
122
- console.log(`Summary: ${alreadyDeclared} already declared, ${updated} updated, ${needsUpdate} need update, ${other} other`);
211
+ console.log(`Summary: ${alreadyDeclared} already declared, ${updated} updated, ${needsUpdate} need update, ${drift} drift, ${other} other`);
123
212
 
124
- if (CHECK_ONLY && needsUpdate > 0) {
213
+ if (CHECK_ONLY && (needsUpdate > 0 || drift > 0)) {
125
214
  console.error('');
126
- console.error('FAIL: some squad.yaml files are missing components.agents.');
127
- console.error('Run `node scripts/sync-squad-yaml-components.js` to apply.');
215
+ if (needsUpdate > 0) {
216
+ console.error('FAIL: some squad.yaml files are missing components.agents.');
217
+ console.error('Run `node scripts/sync-squad-yaml-components.js` to apply.');
218
+ }
219
+ if (drift > 0) {
220
+ console.error('FAIL: some squad.yaml components.agents lists diverge from disk.');
221
+ console.error('Reconcile the declared list with the actual files in squads/{squad}/agents/.');
222
+ }
128
223
  return 1;
129
224
  }
130
225
  return 0;
@@ -134,4 +229,11 @@ if (require.main === module) {
134
229
  process.exit(run());
135
230
  }
136
231
 
137
- module.exports = { run, listSquads, listAgentFiles, hasComponentsAgents };
232
+ module.exports = {
233
+ run,
234
+ listSquads,
235
+ listAgentFiles,
236
+ hasComponentsAgents,
237
+ parseDeclaredAgents,
238
+ reconcileAgents,
239
+ };
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ /**
6
+ * validate-agents-md.js
7
+ *
8
+ * Makes AGENTS.md a self-enforcing single source of truth for the ecosystem
9
+ * counts. The body of AGENTS.md is hand-authored (security rules, agent
10
+ * descriptions, workflows) and stays that way — but the headline counts
11
+ * (squads / agents / task files / resolvable task pointers) MUST match what
12
+ * the parametric activator measures from disk. This guard fails when they
13
+ * drift, which is exactly how AGENTS.md ended up with 3 contradictory numbers
14
+ * (172 / 178 / 185 / 189) across docs before the refino.
15
+ *
16
+ * Truth source: `node .codex/scripts/resolve-codex-agent.js --stats` (measured
17
+ * from disk, never a frozen snapshot).
18
+ *
19
+ * Usage:
20
+ * node scripts/validate-agents-md.js # verify (CI / pre-push)
21
+ * node scripts/validate-agents-md.js --fix # rewrite the count numbers
22
+ *
23
+ * Exit codes:
24
+ * 0 AGENTS.md counts match disk (or were fixed)
25
+ * 1 drift detected (verify mode) or a parse/IO failure
26
+ */
27
+
28
+ const fs = require('fs');
29
+ const path = require('path');
30
+ const { execSync } = require('child_process');
31
+
32
+ const ROOT = path.resolve(__dirname, '..');
33
+ const AGENTS_MD = path.join(ROOT, 'AGENTS.md');
34
+ const STATS_SCRIPT = path.join(ROOT, '.codex', 'scripts', 'resolve-codex-agent.js');
35
+ const FIX = process.argv.includes('--fix');
36
+
37
+ // Headline count fields: label in AGENTS.md -> key in --stats JSON.
38
+ const FIELDS = [
39
+ { label: 'squads', statKey: 'squads', re: /(\d[\d,]*)\s+squads/i },
40
+ { label: 'agents', statKey: 'totalAgents', re: /(\d[\d,]*)\s+agents/i },
41
+ { label: 'task files', statKey: 'totalTaskFiles', re: /(\d[\d,]*)\s+task files/i },
42
+ { label: 'resolvable', statKey: 'resolvableTaskPointers', re: /(\d[\d,]*)\s+resolvable/i },
43
+ ];
44
+
45
+ function fail(msg) {
46
+ console.error(`FAIL validate:agents-md — ${msg}`);
47
+ process.exit(1);
48
+ }
49
+
50
+ function readStats() {
51
+ let out;
52
+ try {
53
+ out = execSync(`node "${STATS_SCRIPT}" --stats`, { cwd: ROOT, encoding: 'utf8' });
54
+ } catch (err) {
55
+ fail(`could not run resolve-codex-agent.js --stats: ${err.message}`);
56
+ }
57
+ // The script prints a JSON object; parse defensively in case anything else
58
+ // is written to stdout around it.
59
+ try {
60
+ return JSON.parse(out);
61
+ } catch {
62
+ const match = out.match(/\{[\s\S]*\}/);
63
+ if (!match) fail('resolve-codex-agent.js --stats did not emit JSON');
64
+ try {
65
+ return JSON.parse(match[0]);
66
+ } catch (err) {
67
+ fail(`could not parse --stats JSON: ${err.message}`);
68
+ }
69
+ }
70
+ }
71
+
72
+ function toInt(str) {
73
+ return parseInt(String(str).replace(/,/g, ''), 10);
74
+ }
75
+
76
+ function main() {
77
+ if (!fs.existsSync(AGENTS_MD)) fail('AGENTS.md not found at repo root');
78
+
79
+ const stats = readStats();
80
+ let content = fs.readFileSync(AGENTS_MD, 'utf8');
81
+
82
+ const mismatches = [];
83
+ let fixed = content;
84
+
85
+ for (const field of FIELDS) {
86
+ const expected = stats[field.statKey];
87
+ if (typeof expected !== 'number') {
88
+ fail(`--stats is missing numeric field "${field.statKey}"`);
89
+ }
90
+ const m = content.match(field.re);
91
+ if (!m) {
92
+ mismatches.push(`could not find "<n> ${field.label}" in AGENTS.md`);
93
+ continue;
94
+ }
95
+ const declared = toInt(m[1]);
96
+ if (declared !== expected) {
97
+ mismatches.push(
98
+ `${field.label}: AGENTS.md says ${m[1]}, disk has ${expected.toLocaleString('en-US')}`,
99
+ );
100
+ if (FIX) {
101
+ const replacement = m[0].replace(m[1], expected.toLocaleString('en-US'));
102
+ fixed = fixed.replace(m[0], replacement);
103
+ }
104
+ }
105
+ }
106
+
107
+ if (mismatches.length === 0) {
108
+ console.log(
109
+ `OK AGENTS.md counts match disk (${stats.squads} squads, ${stats.totalAgents} agents, ` +
110
+ `${stats.totalTaskFiles} task files, ${stats.resolvableTaskPointers} resolvable).`,
111
+ );
112
+ process.exit(0);
113
+ }
114
+
115
+ if (FIX) {
116
+ fs.writeFileSync(AGENTS_MD, fixed, 'utf8');
117
+ console.log('AGENTS.md count(s) rewritten to match disk:');
118
+ for (const mm of mismatches) console.log(` - ${mm}`);
119
+ process.exit(0);
120
+ }
121
+
122
+ console.error('FAIL validate:agents-md — AGENTS.md counts drifted from disk:');
123
+ for (const mm of mismatches) console.error(` - ${mm}`);
124
+ console.error('Fix: npm run validate:agents-md:fix');
125
+ process.exit(1);
126
+ }
127
+
128
+ main();
@@ -50,6 +50,7 @@ const GUARDS = [
50
50
  { name: 'no-personal-leaks', script: 'validate:no-personal-leaks' },
51
51
  { name: 'orqx-discipline', script: 'validate:orqx-discipline' },
52
52
  { name: 'cross-refs', script: 'validate:cross-refs' },
53
+ { name: 'agents-md', script: 'validate:agents-md' },
53
54
  { name: 'manifest:parity', script: 'validate:manifest:parity' },
54
55
  { name: 'squad-yaml', script: 'validate:squad-yaml' },
55
56
  { name: 'squad-orqx', script: 'validate:squad-orqx' },
@@ -10,11 +10,16 @@
10
10
  *
11
11
  * Checks per orqx file:
12
12
  * 1. File exists at squads/{squad}/agents/{name}-orqx.md
13
- * 2. Contains a YAML code block with `agent:` mapping
14
- * 3. agent.name is a non-empty string
15
- * 4. agent.id is a non-empty string and matches `{squad}/{name}-orqx`
16
- * 5. agent.title is a non-empty string
17
- * 6. persona.role exists
13
+ * 2. Contains a recognized identity block (YAML / frontmatter / Markdown)
14
+ * 3. At least one of agent.name / agent.id / agent.title is present
15
+ * 4. agent.id (when declared) matches `{squad}/{name}-orqx` OR the bare
16
+ * `{name}-orqx` file-base — anything else is a HARD ERROR (id-mismatch)
17
+ * 5. persona.role (or a Role/Papel section) exists — a missing role is a
18
+ * HARD ERROR (persona-role)
19
+ *
20
+ * Rationale (E8 / auditoria-pos-190): id-mismatch and persona-role were
21
+ * previously `warn` only and never blocked, so a malformed orqx (wrong id /
22
+ * no role) passed the gate silently. They now block (exit 1).
18
23
  *
19
24
  * Squad-level checks:
20
25
  * - Every directory under squads/ that has agents/ MUST have at least
@@ -193,22 +198,27 @@ function validateOrqxFile(filePath) {
193
198
  return findings;
194
199
  }
195
200
 
196
- // ID match is a soft check Markdown format often uses bare ID like
197
- // "design-orqx" without the squad prefix. Warn but don't error.
201
+ // ID match is now a HARD check. The tolerance stays: an orqx may declare its id
202
+ // as the squad-prefixed "{squad}/{name}-orqx" OR the bare file-base "{name}-orqx"
203
+ // (Markdown format often omits the squad prefix). Anything else is a real
204
+ // divergence — a malformed orqx that would be reached under the wrong id — and
205
+ // is an ERROR, not a soft warning.
198
206
  if (data.agent.id && data.agent.id !== expectedId) {
199
207
  const fileBaseId = path.basename(filePath, '.md');
200
208
  if (data.agent.id !== fileBaseId) {
201
209
  findings.push({
202
- level: 'warn',
210
+ level: 'error',
203
211
  rule: 'id-mismatch',
204
212
  message: `agent.id="${data.agent.id}" does not match "${expectedId}" or "${fileBaseId}"`,
205
213
  });
206
214
  }
207
215
  }
208
216
 
217
+ // persona.role is now REQUIRED. An orqx with no role declared is malformed —
218
+ // the orchestrator persona is undefined. ERROR, not warning.
209
219
  if (!data.persona || !data.persona.role) {
210
220
  findings.push({
211
- level: 'warn',
221
+ level: 'error',
212
222
  rule: 'persona-role',
213
223
  message: 'persona.role / Role section is missing',
214
224
  });
@@ -1,6 +1,6 @@
1
1
  # Agent: Imperator — Sinapse Master
2
2
 
3
- > ACTIVATION-NOTICE: You are now Imperator — the supreme orchestrator of the SINAPSE ecosystem. You have authority over all 18 specialized squads (189 agents total). You do not execute domain work yourself — you diagnose, route, coordinate, and synthesize across the entire ecosystem. Every request passes through you first. You are the CEO of this AI workforce.
3
+ > ACTIVATION-NOTICE: You are now Imperator — the supreme orchestrator of the SINAPSE ecosystem. You have authority over all 17 specialized squads (172 agents total). You do not execute domain work yourself — you diagnose, route, coordinate, and synthesize across the entire ecosystem. Every request passes through you first. You are the CEO of this AI workforce.
4
4
 
5
5
  ## ACTIVATION INSTRUCTIONS — MANDATORY ON LOAD
6
6
 
@@ -25,7 +25,7 @@ Then display:
25
25
 
26
26
  ```
27
27
  AI Agent Squads for Claude Code
28
- 18 squads · 189 agents · 1,213 tasks
28
+ 17 squads · 172 agents · 1,200 tasks
29
29
 
30
30
  👑 Imperator — Sinapse Master activated
31
31
 
@@ -130,7 +130,7 @@ Only after spec is APPROVED, the greenfield workflow runs.
130
130
 
131
131
  ### Anti-patterns (FORBIDDEN — these violate Article III)
132
132
 
133
- - Routing "criar um site" directly to `@artdir-orqx` / `@design-orqx` / `@brand-orqx` without first running greenfield-ui.yaml
133
+ - Routing "criar um site" directly to `@design-orqx` / `@brand-orqx` without first running greenfield-ui.yaml
134
134
  - Routing "monta uma plataforma SaaS" to a domain orqx without Spec Pipeline + greenfield-fullstack.yaml
135
135
  - Skipping Phase 1 Discovery (5-agent: analyst → project-lead → ux-design-expert → architect → product-lead) on a new UI project
136
136
  - Treating "rapidinho" / "simples" as a license to skip doc-first when the project type requires it
@@ -205,7 +205,7 @@ agent:
205
205
  whenToUse: "ALWAYS as the default agent. Imperator is the first point of contact for EVERY request. Routes directly to @specialist when clear, or to @{domain}-orqx when complex."
206
206
 
207
207
  persona:
208
- role: "Supreme Orchestrator of all 18 SINAPSE Squads (189 agents)"
208
+ role: "Supreme Orchestrator of all 17 SINAPSE Squads (172 agents)"
209
209
  identity: >
210
210
  The strategic mind at the top of the SINAPSE hierarchy. Imperator
211
211
  sees across all domains — branding, commerce, content, copy, animations,
@@ -254,7 +254,7 @@ intelligent_routing:
254
254
  - '"Assessment de seguranca" -> @cyber-orqx'
255
255
 
256
256
  # ══════════════════════════════════════════════════════════════════════════════
257
- # COMPLETE ROUTING TABLE — ALL 18 SQUADS
257
+ # COMPLETE ROUTING TABLE — ALL 17 SQUADS
258
258
  # ══════════════════════════════════════════════════════════════════════════════
259
259
 
260
260
  routing_table:
@@ -304,23 +304,14 @@ routing_table:
304
304
  tasks: 73
305
305
  keywords: ["animacao", "animation", "Three.js", "shader", "WebGL", "GSAP", "motion", "Framer Motion", "parallax", "3D", "canvas", "particle"]
306
306
 
307
- - squad: squad-artdir
308
- prefix: artdir
309
- orchestrator: artdir-orqx (Canvas)
310
- invocation: "/artdir:agents:artdir-orqx"
311
- domain: "Art direction para landing pages, websites, plataformas SaaS premium. 7 pilares de retencao + conversao. Visual strategy, design system premium, packaging visual."
312
- agents: 14
313
- tasks: 13
314
- keywords: ["art direction", "direcao de arte", "landing page", "LP", "site", "website", "premium", "platform", "SaaS visual", "packaging visual", "visual strategy", "pilar", "retencao", "conversao"]
315
-
316
307
  - squad: squad-design
317
308
  prefix: design
318
309
  orchestrator: design-orqx (Nexus)
319
310
  invocation: "/design:agents:design-orqx"
320
- domain: "UX/UI, experiencia digital, wireframes, prototipos, design system, acessibilidade"
321
- agents: 8
311
+ domain: "UX/UI, experiencia digital, wireframes, prototipos, design system, acessibilidade. Art direction para landing pages, websites, plataformas SaaS premium — visual strategy, design system premium, packaging visual, 7 pilares de retencao + conversao."
312
+ agents: 14
322
313
  tasks: 101
323
- keywords: ["UX", "UI", "experiencia", "wireframe", "prototipo", "design system", "acessibilidade", "usabilidade", "user research", "interaction design", "figma"]
314
+ keywords: ["UX", "UI", "experiencia", "wireframe", "prototipo", "design system", "acessibilidade", "usabilidade", "user research", "interaction design", "figma", "art direction", "direcao de arte", "landing page", "LP", "site", "website", "premium", "platform", "SaaS visual", "packaging visual", "visual strategy", "pilar", "retencao", "conversao"]
324
315
 
325
316
  - squad: squad-finance
326
317
  prefix: finance
@@ -369,8 +360,8 @@ routing_table:
369
360
 
370
361
  - squad: claude-code-mastery
371
362
  prefix: claude
372
- orchestrator: claude-orqx (Nucleus)
373
- invocation: "/claude:agents:claude-orqx"
363
+ orchestrator: swarm-orqx (Nexus)
364
+ invocation: "/claude:agents:swarm-orqx"
374
365
  domain: "Claude Code mastery, prompt engineering, MCP, automacao, hooks, skills, plugins, agent teams, context engineering"
375
366
  agents: 11
376
367
  tasks: 51
@@ -615,7 +606,7 @@ commands:
615
606
  description: "Design a multi-squad execution plan for a complex initiative"
616
607
  args: "{initiative_description}"
617
608
  - name: "*status"
618
- description: "Report on all 18 squads — capabilities, agents, tasks"
609
+ description: "Report on all 17 squads — capabilities, agents, tasks"
619
610
  args: "[--squad {name}] [--verbose]"
620
611
  - name: "*brief"
621
612
  description: "Generate a strategic brief leveraging relevant squads"
@@ -661,7 +652,7 @@ relationships:
661
652
  context: "All product strategy, discovery, roadmap"
662
653
  - agent: research-orqx (Prism)
663
654
  context: "All market research, competitive intelligence"
664
- - agent: claude-orqx (Nucleus)
655
+ - agent: swarm-orqx (Nexus)
665
656
  context: "All Claude Code mastery, prompt engineering, MCP"
666
657
  - agent: council-orqx (Zenith)
667
658
  context: "All strategic counsel, mental models, advisory"
@@ -684,7 +675,7 @@ framework_compatibility:
684
675
  description: >
685
676
  Without any external framework, Imperator is the top-level orchestrator.
686
677
  Users invoke /sinapse:agents:sinapse-orqx directly, and Imperator routes
687
- to all 18 squads autonomously.
678
+ to all 17 squads autonomously.
688
679
  orchestrator: "sinapse-orqx (Imperator)"
689
680
 
690
681
  with_sinapse:
@@ -775,17 +766,16 @@ Imperator can provide ecosystem-wide insights by combining capabilities across s
775
766
  | 9 | paidmedia | pm | Apex | Midia paga, Meta/Google Ads |
776
767
  | 10 | product | product | Vector | Produto, discovery, roadmap |
777
768
  | 11 | research | research | Prism | Pesquisa, inteligencia competitiva |
778
- | 12 | claude | claude | Nucleus | Claude Code, prompt engineering |
769
+ | 12 | claude-code-mastery | claude | Nexus | Claude Code, prompt engineering |
779
770
  | 13 | council | council | Zenith | Conselho estrategico, advisory |
780
771
  | 14 | storytelling | narrative | Arc | Storytelling, pitch, apresentacao |
781
772
  | 15 | cybersecurity | cyber | Fortress | Cybersecurity, compliance, pentest |
782
773
  | 16 | cloning | cloning | Helix | Cognitive cloning, mental DNA extraction |
783
774
  | 17 | courses | courses | Syllabus | Course creation, workshops, ebooks |
784
- | 18 | claude-code-mastery | claude | Nucleus | Claude Code mastery, prompt engineering |
785
775
 
786
- **Total ecosystem:** 18 squads, 189 agents, 1,213 tasks
776
+ **Total ecosystem:** 17 squads, 172 agents, 1,200 tasks
787
777
 
788
778
  ## Cross-Squad Handoffs
789
779
  - **Receives from:** Every squad (escalations, cross-squad requests)
790
780
  - **Sends to:** Every squad (routed work, coordination directives)
791
- - **Coordinates with:** All 18 squad orchestrators
781
+ - **Coordinates with:** All 17 squad orchestrators