sinapse-ai 9.3.0 → 9.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 (192) hide show
  1. package/.claude/CLAUDE.md +56 -343
  2. package/.claude/rules/agent-authority.md +6 -0
  3. package/.claude/rules/agent-handoff.md +5 -0
  4. package/.claude/rules/cross-squad-routing.md +5 -0
  5. package/.claude/rules/hook-governance.md +6 -0
  6. package/.claude/rules/mcp-usage.md +3 -1
  7. package/.claude/rules/safe-collaboration.md +10 -0
  8. package/.claude/rules/security-data-protection.md +9 -0
  9. package/.claude/rules/squad-awareness.md +3 -1
  10. package/.claude/rules/tool-examples.md +6 -0
  11. package/.claude/rules/workflow-execution.md +7 -0
  12. package/.codex/agents/analyst.md +253 -72
  13. package/.codex/agents/architect.md +455 -68
  14. package/.codex/agents/data-engineer.md +492 -106
  15. package/.codex/agents/developer.md +560 -0
  16. package/.codex/agents/devops.md +518 -69
  17. package/.codex/agents/product-lead.md +335 -0
  18. package/.codex/agents/project-lead.md +377 -0
  19. package/.codex/agents/quality-gate.md +449 -0
  20. package/.codex/agents/sinapse-orqx.md +9 -7
  21. package/.codex/agents/sprint-lead.md +287 -0
  22. package/.codex/agents/squad-creator.md +344 -0
  23. package/.codex/agents/ux-design-expert.md +495 -0
  24. package/.codex/delegation-matrix.json +756 -44
  25. package/.codex/handoff-packet.schema.json +30 -6
  26. package/.sinapse-ai/data/entity-registry.yaml +175 -363
  27. package/.sinapse-ai/data/registry-update-log.jsonl +16 -0
  28. package/.sinapse-ai/development/agents/analyst.md +90 -0
  29. package/.sinapse-ai/development/agents/architect.md +73 -0
  30. package/.sinapse-ai/development/agents/developer.md +69 -0
  31. package/.sinapse-ai/development/agents/devops.md +117 -0
  32. package/.sinapse-ai/development/agents/quality-gate.md +85 -0
  33. package/.sinapse-ai/development/checklists/agent-quality-gate.md +27 -0
  34. package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +20 -0
  35. package/.sinapse-ai/development/checklists/code-review-checklist.md +106 -0
  36. package/.sinapse-ai/development/checklists/issue-triage-checklist.md +9 -0
  37. package/.sinapse-ai/development/checklists/memory-audit-checklist.md +16 -0
  38. package/.sinapse-ai/development/checklists/pr-quality-checklist.md +72 -0
  39. package/.sinapse-ai/development/checklists/security-deployment-checklist.md +54 -0
  40. package/.sinapse-ai/development/checklists/self-critique-checklist.md +19 -1
  41. package/.sinapse-ai/development/skills/debug.md +57 -0
  42. package/.sinapse-ai/development/skills/fast-review.md +69 -0
  43. package/.sinapse-ai/development/skills/research-synthesis.md +77 -0
  44. package/.sinapse-ai/development/skills/security-scan.md +73 -0
  45. package/.sinapse-ai/development/skills/verify.md +53 -0
  46. package/.sinapse-ai/development/templates/squad/agent-template.md +17 -4
  47. package/.sinapse-ai/development/templates/squad/checklist-template.md +13 -5
  48. package/.sinapse-ai/development/templates/squad/task-template.md +7 -0
  49. package/.sinapse-ai/development/templates/squad/workflow-template.yaml +7 -0
  50. package/.sinapse-ai/development/workflows/fast-track.yaml +87 -0
  51. package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +3 -1
  52. package/.sinapse-ai/install-manifest.yaml +71 -35
  53. package/docs/codex-integration-process.md +22 -0
  54. package/docs/codex-parity-program.md +27 -0
  55. package/docs/ide-integration.md +36 -0
  56. package/package.json +1 -1
  57. package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +927 -0
  58. package/squads/squad-brand/knowledge-base/archetype-brand-mapping.md +12 -1
  59. package/squads/squad-brand/knowledge-base/brand-activism-cultural-branding.md +216 -0
  60. package/squads/squad-brand/knowledge-base/brand-audit-criteria.md +58 -0
  61. package/squads/squad-brand/knowledge-base/brand-digital-strategy.md +188 -0
  62. package/squads/squad-brand/knowledge-base/brand-legal-ip.md +222 -0
  63. package/squads/squad-brand/knowledge-base/brand-naming-framework.md +163 -0
  64. package/squads/squad-brand/knowledge-base/branding-master-reference.md +1001 -0
  65. package/squads/squad-brand/knowledge-base/color-psychology.md +25 -12
  66. package/squads/squad-brand/knowledge-base/employer-personal-branding.md +206 -0
  67. package/squads/squad-brand/knowledge-base/routing-catalog.md +34 -0
  68. package/squads/squad-brand/knowledge-base/sonic-branding-principles.md +6 -1
  69. package/squads/squad-brand/knowledge-base/typography-personality.md +34 -0
  70. package/squads/squad-claude/knowledge-base/context-window-optimization.md +334 -0
  71. package/squads/squad-claude/knowledge-base/knowledge-architecture-reference.md +403 -0
  72. package/squads/squad-claude/knowledge-base/memory-systems-reference.md +412 -0
  73. package/squads/squad-claude/knowledge-base/obsidian-claude-integration.md +423 -0
  74. package/squads/squad-claude/knowledge-base/retrieval-augmented-generation.md +320 -0
  75. package/squads/squad-claude/knowledge-base/skill-creation-patterns.md +380 -0
  76. package/squads/squad-claude/knowledge-base/swarm-orchestration-patterns.md +411 -0
  77. package/squads/squad-cloning/knowledge-base/clone-quality-assurance.md +211 -0
  78. package/squads/squad-cloning/knowledge-base/confidence-scoring.md +51 -0
  79. package/squads/squad-cloning/knowledge-base/cross-squad-deployment.md +47 -0
  80. package/squads/squad-cloning/knowledge-base/ethical-guidelines.md +237 -0
  81. package/squads/squad-cloning/knowledge-base/knowledge-graph-for-clones.md +295 -0
  82. package/squads/squad-cloning/knowledge-base/memory-architecture-for-clones.md +229 -0
  83. package/squads/squad-cloning/knowledge-base/multi-agent-deployment-patterns.md +320 -0
  84. package/squads/squad-cloning/knowledge-base/skill-standard-for-clones.md +262 -0
  85. package/squads/squad-cloning/knowledge-base/sop-extraction-guide.md +243 -0
  86. package/squads/squad-commercial/knowledge-base/account-based-selling.md +206 -0
  87. package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +14 -0
  88. package/squads/squad-commercial/knowledge-base/ai-in-sales.md +199 -0
  89. package/squads/squad-commercial/knowledge-base/brazilian-sales-context.md +195 -0
  90. package/squads/squad-commercial/knowledge-base/customer-success-operations.md +83 -2
  91. package/squads/squad-commercial/knowledge-base/prospecting-pipeline-generation.md +69 -0
  92. package/squads/squad-commercial/knowledge-base/sales-enablement-playbook.md +260 -0
  93. package/squads/squad-commercial/knowledge-base/sales-methodology-comparison.md +185 -0
  94. package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1123 -0
  95. package/squads/squad-content/knowledge-base/brazilian-content-context.md +176 -0
  96. package/squads/squad-content/knowledge-base/competitor-analysis-methods.md +40 -1
  97. package/squads/squad-content/knowledge-base/content-architecture-taxonomy.md +206 -0
  98. package/squads/squad-content/knowledge-base/content-formats-encyclopedia.md +58 -1
  99. package/squads/squad-content/knowledge-base/content-references-bibliography.md +130 -0
  100. package/squads/squad-content/knowledge-base/content-strategy-master-reference.md +1097 -0
  101. package/squads/squad-content/knowledge-base/content-tech-stack.md +150 -0
  102. package/squads/squad-content/knowledge-base/copywriting-formulas-library.md +188 -0
  103. package/squads/squad-content/knowledge-base/email-newsletter-strategy.md +161 -0
  104. package/squads/squad-content/knowledge-base/platform-algorithm-intelligence.md +86 -1
  105. package/squads/squad-content/knowledge-base/social-algorithms-master-reference.md +1007 -0
  106. package/squads/squad-content/knowledge-base/video-audio-content-playbook.md +218 -0
  107. package/squads/squad-copy/knowledge-base/ai-copy-production.md +254 -0
  108. package/squads/squad-copy/knowledge-base/brazilian-copywriting-context.md +242 -0
  109. package/squads/squad-copy/knowledge-base/email-copywriting-system.md +299 -0
  110. package/squads/squad-copy/knowledge-base/landing-page-copy-architecture.md +267 -0
  111. package/squads/squad-copy/knowledge-base/power-words-catalog.md +205 -0
  112. package/squads/squad-copy/knowledge-base/seo-copywriting.md +255 -0
  113. package/squads/squad-copy/knowledge-base/video-script-copywriting.md +239 -0
  114. package/squads/squad-council/knowledge-base/brand-strategy-models.md +193 -0
  115. package/squads/squad-council/knowledge-base/growth-strategy-models.md +267 -0
  116. package/squads/squad-council/knowledge-base/innovation-disruption-frameworks.md +193 -0
  117. package/squads/squad-council/knowledge-base/market-analysis-frameworks.md +240 -0
  118. package/squads/squad-council/knowledge-base/organizational-leadership-models.md +212 -0
  119. package/squads/squad-council/knowledge-base/sales-strategy-models.md +215 -0
  120. package/squads/squad-courses/knowledge-base/course-launch-strategy.md +251 -0
  121. package/squads/squad-courses/knowledge-base/domain-advocacia-curriculum.md +385 -0
  122. package/squads/squad-courses/knowledge-base/domain-contabilidade-curriculum.md +266 -0
  123. package/squads/squad-courses/knowledge-base/platform-comparison.md +68 -0
  124. package/squads/squad-courses/knowledge-base/video-production-guide.md +70 -0
  125. package/squads/squad-cybersecurity/knowledge-base/cloud-security-reference.md +363 -0
  126. package/squads/squad-cybersecurity/knowledge-base/compliance-frameworks.md +273 -0
  127. package/squads/squad-cybersecurity/knowledge-base/database-security.md +438 -0
  128. package/squads/squad-cybersecurity/knowledge-base/incident-response-playbook.md +420 -0
  129. package/squads/squad-cybersecurity/knowledge-base/network-security-reference.md +477 -0
  130. package/squads/squad-cybersecurity/knowledge-base/penetration-testing-methodology.md +350 -0
  131. package/squads/squad-cybersecurity/knowledge-base/vulnerability-management.md +349 -0
  132. package/squads/squad-design/knowledge-base/brazilian-design-context.md +223 -0
  133. package/squads/squad-design/knowledge-base/component-api-patterns.md +208 -4
  134. package/squads/squad-design/knowledge-base/design-system-master-reference.md +1302 -0
  135. package/squads/squad-design/knowledge-base/design-systems-frameworks.md +91 -1
  136. package/squads/squad-design/knowledge-base/responsive-modern-css.md +96 -4
  137. package/squads/squad-design/knowledge-base/wcag-aria-reference.md +117 -5
  138. package/squads/squad-design/knowledge-base/web-performance-reference.md +127 -4
  139. package/squads/squad-finance/knowledge-base/brazilian-taxation.md +263 -0
  140. package/squads/squad-finance/knowledge-base/contabilidade-master-reference.md +998 -0
  141. package/squads/squad-finance/knowledge-base/finance-master-reference.md +946 -0
  142. package/squads/squad-finance/knowledge-base/financial-reporting-analysis.md +316 -0
  143. package/squads/squad-finance/knowledge-base/fintech-brazilian-context.md +242 -0
  144. package/squads/squad-finance/knowledge-base/fpa-planning-frameworks.md +286 -0
  145. package/squads/squad-finance/knowledge-base/ma-and-transactions.md +285 -0
  146. package/squads/squad-finance/knowledge-base/risk-management.md +233 -0
  147. package/squads/squad-finance/knowledge-base/startups-venture-capital.md +337 -0
  148. package/squads/squad-growth/knowledge-base/ai-growth-playbook.md +216 -0
  149. package/squads/squad-growth/knowledge-base/attribution-models.md +78 -0
  150. package/squads/squad-growth/knowledge-base/brazilian-growth-context.md +208 -0
  151. package/squads/squad-growth/knowledge-base/community-led-growth.md +175 -0
  152. package/squads/squad-growth/knowledge-base/content-marketing-flywheel.md +190 -0
  153. package/squads/squad-growth/knowledge-base/email-lifecycle-framework.md +192 -0
  154. package/squads/squad-growth/knowledge-base/growth-frameworks-catalog.md +82 -0
  155. package/squads/squad-growth/knowledge-base/growth-master-reference.md +1168 -0
  156. package/squads/squad-growth/knowledge-base/routing-catalog.md +53 -11
  157. package/squads/squad-paidmedia/knowledge-base/audiences-segmentation-deep.md +285 -0
  158. package/squads/squad-paidmedia/knowledge-base/creative-strategy-deep.md +294 -0
  159. package/squads/squad-paidmedia/knowledge-base/google-ads-account-architecture.md +87 -0
  160. package/squads/squad-paidmedia/knowledge-base/meta-ads-campaign-architecture.md +76 -0
  161. package/squads/squad-paidmedia/knowledge-base/paid-media-metrics-reference.md +117 -0
  162. package/squads/squad-paidmedia/knowledge-base/paid-traffic-master-reference.md +1308 -0
  163. package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +95 -18
  164. package/squads/squad-paidmedia/knowledge-base/traffic-masters-frameworks.md +71 -0
  165. package/squads/squad-product/knowledge-base/brazilian-product-context.md +284 -0
  166. package/squads/squad-product/knowledge-base/discovery-methodology-playbook.md +141 -0
  167. package/squads/squad-product/knowledge-base/pm-frameworks-reference.md +125 -9
  168. package/squads/squad-product/knowledge-base/product-analytics-formulas.md +72 -0
  169. package/squads/squad-product/knowledge-base/product-led-growth-reference.md +155 -13
  170. package/squads/squad-product/knowledge-base/product-market-fit-framework.md +222 -0
  171. package/squads/squad-product/knowledge-base/routing-catalog.md +32 -0
  172. package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +591 -0
  173. package/squads/squad-research/knowledge-base/ai-augmented-research.md +212 -0
  174. package/squads/squad-research/knowledge-base/brazilian-market-research-sources.md +197 -0
  175. package/squads/squad-research/knowledge-base/community-platforms-reference.md +786 -0
  176. package/squads/squad-research/knowledge-base/community-research-methods.md +194 -0
  177. package/squads/squad-research/knowledge-base/mixed-methods-research-design.md +168 -0
  178. package/squads/squad-research/knowledge-base/network-effects-analysis.md +192 -0
  179. package/squads/squad-research/knowledge-base/qualitative-research-deep-methods.md +202 -0
  180. package/squads/squad-research/knowledge-base/quantitative-research-methods.md +208 -0
  181. package/squads/squad-research/knowledge-base/research-frameworks-encyclopedia.md +40 -0
  182. package/squads/squad-research/knowledge-base/research-synthesis-frameworks.md +223 -0
  183. package/squads/squad-storytelling/knowledge-base/brand-mythology-framework.md +236 -0
  184. package/squads/squad-storytelling/knowledge-base/brazilian-storytelling-context.md +237 -0
  185. package/squads/squad-storytelling/knowledge-base/data-storytelling.md +232 -0
  186. package/squads/squad-storytelling/knowledge-base/improv-storytelling.md +226 -0
  187. package/squads/squad-storytelling/knowledge-base/persuasion-narrative-techniques.md +269 -0
  188. package/squads/squad-storytelling/knowledge-base/social-movement-narratives.md +191 -0
  189. package/squads/squad-storytelling/knowledge-base/video-storytelling.md +252 -0
  190. package/squads/claude-code-mastery/data/swarm-orchestration-patterns.yaml +0 -378
  191. package/squads/squad-animations/knowledge-base/framer-motion-complete-reference.md +0 -710
  192. package/squads/squad-animations/knowledge-base/web-animations-api-view-transitions.md +0 -478
package/.claude/CLAUDE.md CHANGED
@@ -1,384 +1,97 @@
1
1
  # CLAUDE.md - SINAPSE
2
2
 
3
- Este arquivo configura o comportamento do Claude Code ao trabalhar neste repositório.
4
-
5
- ---
6
-
7
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
8
3
  ## Constitution
9
4
 
10
- O SINAPSE possui uma **Constitution formal** com princípios inegociáveis e gates automáticos.
11
-
12
- **Documento completo:** `.sinapse-ai/constitution.md`
5
+ Full doc: `.sinapse-ai/constitution.md`. Gates auto-block violations.
13
6
 
14
- **Princípios fundamentais:**
15
-
16
- | Artigo | Princípio | Severidade |
17
- |--------|-----------|------------|
7
+ | Art. | Principle | Severity |
8
+ |------|-----------|----------|
18
9
  | I | CLI First | NON-NEGOTIABLE |
19
10
  | II | Agent Authority | NON-NEGOTIABLE |
20
- | III | Documentation-First Development | NON-NEGOTIABLE |
11
+ | III | Documentation-First | NON-NEGOTIABLE |
21
12
  | IV | No Invention | MUST |
22
13
  | V | Quality First | MUST |
23
14
  | VI | Absolute Imports | SHOULD |
24
- | VII | Ecosystem Metrics Accuracy | NON-NEGOTIABLE |
15
+ | VII | Metrics Accuracy | NON-NEGOTIABLE |
25
16
  | VIII | Mandatory Delegation | NON-NEGOTIABLE |
26
17
  | IX | Safe Collaboration | NON-NEGOTIABLE |
27
18
  | X | Security & Data Protection | NON-NEGOTIABLE |
28
19
 
29
- **Gates automáticos bloqueiam violações.** Consulte a Constitution para detalhes completos.
30
-
31
- ---
20
+ ## CLI First
32
21
 
33
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
34
- ## Language Configuration
22
+ `CLI First Observability Second UI Third`. New features MUST work 100% via CLI before any UI.
35
23
 
36
- Language preference is handled by Claude Code's native `language` setting (v2.1.0+).
37
- Configure in `~/.claude/settings.json` (global) or `.claude/settings.json` (project):
24
+ ## Project Structure
38
25
 
39
- ```json
40
- { "language": "portuguese" }
41
26
  ```
42
-
43
- The installer writes this automatically during `npx sinapse-ai install`. No language config in `core-config.yaml`.
44
-
45
- ---
46
-
47
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
48
- ## Premissa Arquitetural: CLI First
49
-
50
- O SINAPSE segue uma hierarquia clara de prioridades que deve guiar **TODAS** as decisões:
51
-
27
+ .sinapse-ai/ # Framework core, data, agents, tasks, templates
28
+ bin/ # CLI executables
29
+ docs/stories/ # Development stories
30
+ packages/ # Shared packages
31
+ squads/ # Squad expansions
32
+ tests/ # Tests
52
33
  ```
53
- CLI First → Observability Second → UI Third
54
- ```
55
-
56
- | Camada | Prioridade | Descrição |
57
- |--------|------------|-----------|
58
- | **CLI** | Máxima | Onde a inteligência vive. Toda execução, decisões e automação. |
59
- | **Observability** | Secundária | Observar e monitorar o que acontece no CLI em tempo real. |
60
- | **UI** | Terciária | Gestão pontual e visualizações quando necessário. |
61
-
62
- ### Princípios Derivados
63
-
64
- 1. **A CLI é a fonte da verdade** - Dashboards apenas observam, nunca controlam
65
- 2. **Funcionalidades novas devem funcionar 100% via CLI** antes de ter qualquer UI
66
- 3. **A UI nunca deve ser requisito** para operação do sistema
67
- 4. **Observabilidade serve para entender** o que o CLI está fazendo, não para controlá-lo
68
- 5. **Ao decidir onde implementar algo**, sempre prefira CLI > Observability > UI
69
-
70
- > **Referência formal:** Constitution Artigo I - CLI First (NON-NEGOTIABLE)
71
-
72
- ---
73
-
74
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
75
- ## Estrutura do Projeto
76
-
77
- ```
78
- sinapse-ai/
79
- ├── .sinapse-ai/ # Core do framework
80
- │ ├── core/ # Módulos principais (orchestration, memory, etc.)
81
- │ ├── data/ # Knowledge base, entity registry
82
- │ ├── development/ # Agents, tasks, templates, checklists, scripts
83
- │ └── infrastructure/ # CI/CD templates, scripts
84
- ├── bin/ # CLI executables (sinapse-init.js, sinapse.js)
85
- ├── docs/ # Documentação
86
- │ └── stories/ # Development stories (active/, completed/)
87
- ├── packages/ # Shared packages
88
- ├── pro/ # Pro submodule (proprietary)
89
- ├── squads/ # Squad expansions
90
- └── tests/ # Testes
91
- ```
92
-
93
- ---
94
-
95
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
96
- ## Framework vs Project Boundary
97
-
98
- O SINAPSE usa um modelo de 4 camadas (L1-L4) para separar artefatos do framework e do projeto. Deny rules em `.claude/settings.json` reforçam isso deterministicamente.
99
-
100
- | Camada | Mutabilidade | Paths | Notas |
101
- |--------|-------------|-------|-------|
102
- | **L1** Framework Core | NEVER modify | `.sinapse-ai/core/`, `.sinapse-ai/constitution.md`, `bin/sinapse.js`, `bin/sinapse-init.js` | Protegido por deny rules |
103
- | **L2** Framework Templates | NEVER modify | `.sinapse-ai/development/tasks/`, `.sinapse-ai/development/templates/`, `.sinapse-ai/development/checklists/`, `.sinapse-ai/development/workflows/`, `.sinapse-ai/infrastructure/` | Extend-only |
104
- | **L3** Project Config | Mutable (exceptions) | `.sinapse-ai/data/`, `agents/*/MEMORY.md`, `core-config.yaml` | Allow rules permitem |
105
- | **L4** Project Runtime | ALWAYS modify | `docs/stories/`, `packages/`, `squads/`, `tests/` | Trabalho do projeto |
106
-
107
- **Toggle:** `core-config.yaml` → `boundary.frameworkProtection: true/false` controla se deny rules são ativas (default: true para projetos, false para contribuidores do framework).
108
-
109
- > **Referência formal:** `.claude/settings.json` (deny/allow rules), `.claude/rules/agent-authority.md`
110
-
111
- ---
112
-
113
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
114
- ## Sistema de Agentes
115
-
116
- ### Ativação de Agentes
117
- Use `@agent-name` ou `/SINAPSE:agents:agent-name`:
118
-
119
- | Agente | Persona | Escopo Principal |
120
- |--------|---------|------------------|
121
- | `@developer` | Pixel | Implementacao de codigo |
122
- | `@quality-gate` | Litmus | Testes e qualidade |
123
- | `@architect` | Stratum | Arquitetura e design tecnico |
124
- | `@project-lead` | Beacon | Product Management |
125
- | `@product-lead` | Axis | Product Owner, stories/epics |
126
- | `@sprint-lead` | Sync | Scrum Master |
127
- | `@analyst` | Scope | Pesquisa e analise |
128
- | `@data-engineer` | Tensor | Database design |
129
- | `@ux-design-expert` | Mosaic | UX/UI design |
130
- | `@devops` | Pipeline | CI/CD, git push (EXCLUSIVO) |
131
-
132
- ### Comandos de Agentes
133
- Use prefixo `*` para comandos:
134
- - `*help` - Mostrar comandos disponíveis
135
- - `*create-story` - Criar story de desenvolvimento
136
- - `*task {name}` - Executar task específica
137
- - `*exit` - Sair do modo agente
138
-
139
- ### Mapeamento Agente → Codebase
140
-
141
- | Agente | Diretórios Principais |
142
- |--------|----------------------|
143
- | `@developer` | `packages/`, `.sinapse-ai/core/`, `bin/` |
144
- | `@architect` | `docs/architecture/`, system design |
145
- | `@data-engineer` | `packages/db/`, migrations, schema |
146
- | `@quality-gate` | `tests/`, `*.test.js`, quality gates |
147
- | `@product-lead` | Stories, epics, requirements |
148
- | `@devops` | `.github/`, CI/CD, git operations |
149
-
150
- ---
151
-
152
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
153
- ## Documentation-First Development (NON-NEGOTIABLE)
154
-
155
- 1. **Pipeline automatico** - Todo briefing segue: Epic → Story → Validacao → Implementacao
156
- 2. **Story validada obrigatoria** - Nenhum codigo sem story com status >= Ready
157
- 3. **Trabalhe a partir de stories** - Todo desenvolvimento começa com uma story em `docs/stories/`
158
- 4. **Atualize progresso** - Marque checkboxes conforme completa: `[ ]` → `[x]`
159
- 5. **Rastreie mudanças** - Mantenha a seção File List na story
160
- 6. **Siga critérios** - Implemente exatamente o que os acceptance criteria especificam
161
-
162
- ### Workflow de Story
163
- ```
164
- @product-lead *create-story → @developer implementa → @quality-gate testa → @devops push
165
- ```
166
-
167
- ---
168
-
169
- <!-- PROJECT-CUSTOMIZED: Safe to modify for your project -->
170
- ## Padrões de Código
171
34
 
172
- ### Convenções de Nomenclatura
35
+ ## Framework Boundary (L1-L4)
173
36
 
174
- | Tipo | Convenção | Exemplo |
175
- |------|-----------|---------|
176
- | Componentes | PascalCase | `WorkflowList` |
177
- | Hooks | prefixo `use` | `useWorkflowOperations` |
178
- | Arquivos | kebab-case | `workflow-list.tsx` |
179
- | Constantes | SCREAMING_SNAKE_CASE | `MAX_RETRIES` |
180
- | Interfaces | PascalCase + sufixo | `WorkflowListProps` |
37
+ | Layer | Mutability | Key Paths |
38
+ |-------|-----------|-----------|
39
+ | L1 Core | NEVER | `.sinapse-ai/core/`, `bin/sinapse*.js` |
40
+ | L2 Templates | NEVER | `.sinapse-ai/development/{tasks,templates,checklists,workflows}/` |
41
+ | L3 Config | Mutable | `.sinapse-ai/data/`, `core-config.yaml` |
42
+ | L4 Runtime | ALWAYS | `docs/stories/`, `packages/`, `squads/`, `tests/` |
181
43
 
182
- ### Imports
183
- **Sempre use imports absolutos.** Nunca use imports relativos.
184
- ```typescript
185
- // ✓ Correto
186
- import { useStore } from '@/stores/feature/store'
44
+ ## Agents
187
45
 
188
- // Errado
189
- import { useStore } from '../../../stores/feature/store'
190
- ```
46
+ Use `@agent-name` or `/SINAPSE:agents:agent-name`. Commands: `*help`, `*create-story`, `*task {name}`, `*exit`.
191
47
 
192
- **Ordem de imports:**
193
- 1. React/core libraries
194
- 2. External libraries
195
- 3. UI components
196
- 4. Utilities
197
- 5. Stores
198
- 6. Feature imports
199
- 7. CSS imports
48
+ | Agent | Persona | Scope |
49
+ |-------|---------|-------|
50
+ | @developer | Pixel | Code implementation |
51
+ | @quality-gate | Litmus | Testing & quality |
52
+ | @architect | Stratum | Architecture |
53
+ | @project-lead | Beacon | Product Management |
54
+ | @product-lead | Axis | Product Owner |
55
+ | @sprint-lead | Sync | Scrum Master |
56
+ | @analyst | Scope | Research |
57
+ | @data-engineer | Tensor | Database |
58
+ | @ux-design-expert | Mosaic | UX/UI |
59
+ | @devops | Pipeline | CI/CD, push (EXCLUSIVE) |
200
60
 
201
- ### TypeScript
202
- - Sem `any` - Use tipos apropriados ou `unknown` com type guards
203
- - Sempre defina interface de props para componentes
204
- - Use `as const` para objetos/arrays constantes
205
- - Tipos de ref explícitos: `useRef<HTMLDivElement>(null)`
61
+ ## Documentation-First (NON-NEGOTIABLE)
206
62
 
207
- ### Error Handling
208
- ```typescript
209
- try {
210
- // Operation
211
- } catch (error) {
212
- logger.error(`Failed to ${operation}`, { error })
213
- throw new Error(`Failed to ${operation}: ${error instanceof Error ? error.message : 'Unknown'}`)
214
- }
215
- ```
63
+ Pipeline: Epic → Story → Validation → Implementation. No code without a story at status >= Ready.
216
64
 
217
- ---
65
+ ## Code Patterns
218
66
 
219
- <!-- PROJECT-CUSTOMIZED: Safe to modify for your project -->
220
- ## Testes & Quality Gates
67
+ - **Naming:** PascalCase components, `use` prefix hooks, kebab-case files, SCREAMING_SNAKE constants
68
+ - **Imports:** Always absolute (`@/...`), never relative. Order: React → external → UI → utils → stores → features → CSS
69
+ - **TypeScript:** No `any`, always define props interfaces, `as const` for constants
70
+ - **Commits:** Conventional Commits + story ref: `feat: feature [Story 2.1]`
71
+ - **Push:** Only `@devops` can push to remote
221
72
 
222
- ### Comandos de Teste
223
- ```bash
224
- npm test # Rodar testes
225
- npm run test:coverage # Testes com cobertura
226
- npm run lint # ESLint
227
- npm run typecheck # TypeScript
228
- ```
73
+ ## Tests
229
74
 
230
- ### Quality Gates (Pre-Push)
231
- Antes de push, todos os checks devem passar:
232
75
  ```bash
233
- npm run lint # ESLint
234
- npm run typecheck # TypeScript
235
- npm test # Jest
76
+ npm test && npm run lint && npm run typecheck
236
77
  ```
237
78
 
238
- ---
239
-
240
- <!-- PROJECT-CUSTOMIZED: Safe to modify for your project -->
241
- ## Convenções Git
242
-
243
- ### Commits
244
- Seguir Conventional Commits:
245
- - `feat:` - Nova funcionalidade
246
- - `fix:` - Correção de bug
247
- - `docs:` - Documentação
248
- - `test:` - Testes
249
- - `chore:` - Manutenção
250
- - `refactor:` - Refatoração
251
-
252
- **Referencie story ID:** `feat: implement feature [Story 2.1]`
253
-
254
- ### Branches
255
- - `main` - Branch principal
256
- - `feat/*` - Features
257
- - `fix/*` - Correções
258
- - `docs/*` - Documentação
259
-
260
- ### Push Authority
261
- **Apenas `@devops` pode fazer push para remote.**
262
-
263
- ---
79
+ ## Tool Usage
264
80
 
265
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
266
- ## Otimização Claude Code
81
+ Use Grep (not grep), Read (not cat), Edit (not sed), Glob (not find). Prefer native tools over MCP. Tool registry: `.sinapse-ai/data/tool-registry.yaml`.
267
82
 
268
- ### Uso de Ferramentas
269
- | Tarefa | Use | Não Use |
270
- |--------|-----|---------|
271
- | Buscar conteúdo | `Grep` tool | `grep`/`rg` no bash |
272
- | Ler arquivos | `Read` tool | `cat`/`head`/`tail` |
273
- | Editar arquivos | `Edit` tool | `sed`/`awk` |
274
- | Buscar arquivos | `Glob` tool | `find` |
275
- | Operações complexas | `Task` tool | Múltiplos comandos manuais |
83
+ ## Context Management
276
84
 
277
- ### Performance
278
- - Prefira chamadas de ferramentas em batch
279
- - Use execução paralela para operações independentes
280
- - Cache dados frequentemente acessados durante a sessão
281
-
282
- ### Context Management (NOG-18 + TOK-4A)
283
- - Use `/compact` when context feels heavy or approaching limits
284
- - Context brackets (SYNAPSE) replaced by native compaction
285
- - Agent memory persists in `.sinapse-ai/development/agents/{id}/MEMORY.md`
286
85
  - Rules with `paths:` frontmatter only load when working on matching files
287
- - **Agent Handoff:** On agent switch (`@agent`), previous agent is compacted to ~379-token handoff artifact. See `.claude/rules/agent-handoff.md` for full protocol. Max 3 retained summaries, oldest discarded.
86
+ - Agent handoff compacts to ~379 tokens on switch
87
+ - Agent memory in `.sinapse-ai/development/agents/{id}/MEMORY.md`
88
+ - **Memory as hints:** Memory entries are hints, NOT ground truth. Always verify against actual codebase before acting on remembered facts.
288
89
 
289
- ### Gerenciamento de Sessão
290
- - Rastreie progresso da story durante a sessão
291
- - Atualize checkboxes imediatamente após completar tasks
292
- - Mantenha contexto da story atual sendo trabalhada
293
- - Salve estado importante antes de operações longas
90
+ ## Delegation Model
294
91
 
295
- ### Recuperação de Erros
296
- - Sempre forneça sugestões de recuperação para falhas
297
- - Inclua contexto do erro em mensagens ao usuário
298
- - Sugira procedimentos de rollback quando apropriado
299
- - Documente quaisquer correções manuais necessárias
92
+ - **Persona switch:** For sequential agent work in same context (lightweight)
93
+ - **Sub-agent (Agent tool):** Only for parallel/isolated work (min ~20K tokens overhead)
94
+ - **Never** spawn sub-agents for simple sequential tasks — use persona switch instead
300
95
 
301
96
  ---
302
-
303
- <!-- PROJECT-CUSTOMIZED: Safe to modify for your project -->
304
- ## Comandos Frequentes
305
-
306
- ### Desenvolvimento
307
- ```bash
308
- npm run dev # Iniciar desenvolvimento
309
- npm test # Rodar testes
310
- npm run lint # Verificar estilo
311
- npm run typecheck # Verificar tipos
312
- npm run build # Build produção
313
- ```
314
-
315
- ### SINAPSE
316
- ```bash
317
- npx sinapse-ai install # Instalar SINAPSE
318
- npx sinapse-ai doctor # Diagnóstico do sistema
319
- npx sinapse-ai info # Informações do sistema
320
- ```
321
-
322
- ### Dashboard (apps/dashboard/)
323
- ```bash
324
- cd apps/dashboard
325
- npm install
326
- npm run dev # Desenvolvimento
327
- npm run build # Build produção
328
- ```
329
-
330
- ---
331
-
332
- <!-- FRAMEWORK-OWNED: Generated by SINAPSE installer, do not customize -->
333
- ## MCP Usage
334
-
335
- Ver `.claude/rules/mcp-usage.md` para regras detalhadas.
336
-
337
- **Resumo:**
338
- - Preferir ferramentas nativas do Claude Code sobre MCP
339
- - MCP Docker Gateway apenas quando explicitamente necessário
340
- - `@devops` gerencia toda infraestrutura MCP
341
-
342
- ---
343
-
344
- <!-- PROJECT-CUSTOMIZED: Token Optimization TOK-2 -->
345
- ## Tool Selection Guidance
346
-
347
- Prefer native Claude Code tools over MCP for common operations. The tool-registry at `.sinapse-ai/data/tool-registry.yaml` defines the 3-Tier Tool Mesh:
348
-
349
- | Tier | When Loaded | Examples |
350
- |------|-------------|---------|
351
- | **1** (Always) | Session start | Read, Write, Edit, Bash, Grep, Glob, Task |
352
- | **2** (Deferred) | Agent activation | git, coderabbit, context7, supabase |
353
- | **3** (Deferred) | Via tool search | EXA, Playwright, Apify, Nogic, Code-Graph |
354
-
355
- **Guidelines:**
356
- - Use Tier 1 native tools for file ops, search, and commands — avoid MCP equivalents
357
- - Tier 3 MCP tools are deferred via Tool Search — only loaded when explicitly needed
358
- - Limit tool search to maximum 2 searches per turn to avoid overhead
359
- - Essential MCP servers (nogic, code-graph) are never disabled
360
- - Non-essential servers (EXA, Apify, Playwright) load on-demand via tool search
361
-
362
- **Tool Examples (TOK-4B):** Concrete input examples improve tool selection accuracy by +18pp. See `.claude/rules/tool-examples.md` for examples of top-10 tools. Full registry: `.sinapse-ai/data/mcp-tool-examples.yaml`. ADR-5: examples for always-loaded tools only, search for deferred tools.
363
-
364
- **Runtime capabilities:** `.sinapse/runtime-capabilities.json` (generated by capability-detection.js)
365
-
366
- ---
367
-
368
- <!-- PROJECT-CUSTOMIZED: Safe to modify for your project -->
369
- ## Debug
370
-
371
- ### Habilitar Debug
372
- ```bash
373
- export SINAPSE_DEBUG=true
374
- ```
375
-
376
- ### Logs
377
- ```bash
378
- tail -f .sinapse/logs/agent.log
379
- ```
380
-
381
- ---
382
-
383
- *SINAPSE Claude Code Configuration v4.0*
384
- *CLI First | Observability Second | UI Third*
97
+ *SINAPSE v6.0 — CLI First | Observability Second | UI Third*
@@ -1,3 +1,9 @@
1
+ ---
2
+ paths:
3
+ - ".sinapse-ai/development/agents/**"
4
+ - "docs/stories/**"
5
+ ---
6
+
1
7
  # Agent Authority — Detailed Rules
2
8
 
3
9
  ## Delegation Matrix
@@ -1,3 +1,8 @@
1
+ ---
2
+ paths:
3
+ - ".sinapse-ai/development/agents/**"
4
+ ---
5
+
1
6
  # Agent Handoff Protocol — Context Compaction
2
7
 
3
8
  ## Purpose
@@ -1,3 +1,8 @@
1
+ ---
2
+ paths:
3
+ - "squads/**"
4
+ ---
5
+
1
6
  # Cross-Squad Routing Rules
2
7
 
3
8
  > Applies to Imperator (sinapse-orqx) and ALL squad orchestrators (*-orqx).
@@ -1,3 +1,9 @@
1
+ ---
2
+ paths:
3
+ - ".claude/hooks/**"
4
+ - ".claude/settings.json"
5
+ ---
6
+
1
7
  # Hook Governance Rules
2
8
 
3
9
  > Applies to ALL agents. Hooks are the enforcement layer of the Constitution.
@@ -1,5 +1,7 @@
1
1
  ---
2
- paths: **/*
2
+ paths:
3
+ - ".mcp.json"
4
+ - ".sinapse-ai/data/tool-registry.yaml"
3
5
  ---
4
6
 
5
7
  # MCP Server Usage Rules - SINAPSE Architecture
@@ -40,6 +40,7 @@ The agent creates the branch. The user never needs to name it.
40
40
  |-----|---------------|---------|
41
41
  | Caio's session | `caio/{type}/{short-desc}` | `caio/feat/installer-ux` |
42
42
  | Matheus's session | `soier/{type}/{short-desc}` | `soier/fix/agent-config` |
43
+ | AI agent | `agent/{squad}/{agent-id}/{type}-{desc}` | `agent/core/pixel/feat-dark-mode` |
43
44
  | Unknown | `dev/{type}/{short-desc}` | `dev/feat/new-feature` |
44
45
 
45
46
  Types: `feat`, `fix`, `refactor`, `docs`, `chore`, `test`
@@ -171,3 +172,12 @@ These same rules apply to ANY project where SINAPSE agents operate:
171
172
  ```
172
173
 
173
174
  Everything else: **ask the agent to do it.**
175
+
176
+ ## PR Quality Standards
177
+
178
+ | Metric | Target | Warning |
179
+ |--------|--------|---------|
180
+ | PR size | < 200 lines | > 400 lines |
181
+ | PR cycle time | < 1 day | > 3 days |
182
+
183
+ **DORA Targets (Elite):** Deploy multiple/day, lead time < 1 day, failure rate < 4%, recovery < 1 hour.
@@ -1,3 +1,12 @@
1
+ ---
2
+ paths:
3
+ - ".env*"
4
+ - "supabase/**"
5
+ - "packages/**/auth/**"
6
+ - "apps/**"
7
+ - ".github/workflows/**"
8
+ ---
9
+
1
10
  # Security & Data Protection (NON-NEGOTIABLE)
2
11
 
3
12
  > **Constitution Article X — NON-NEGOTIABLE**
@@ -1,5 +1,7 @@
1
1
  ---
2
- paths: **/*
2
+ paths:
3
+ - "squads/**"
4
+ - ".sinapse-ai/development/agents/**"
3
5
  ---
4
6
 
5
7
  # Sinapse — Orchestration Rules
@@ -1,3 +1,9 @@
1
+ ---
2
+ paths:
3
+ - ".sinapse-ai/data/tool-registry.yaml"
4
+ - ".mcp.json"
5
+ ---
6
+
1
7
  # Tool Input Examples — Selection Guidance
2
8
 
3
9
  ## Purpose
@@ -1,3 +1,10 @@
1
+ ---
2
+ paths:
3
+ - "docs/stories/**"
4
+ - ".sinapse-ai/development/tasks/**"
5
+ - ".sinapse-ai/development/workflows/**"
6
+ ---
7
+
1
8
  # Workflow Execution — Detailed Rules
2
9
 
3
10
  ## Task-First Principle