aiox-core 5.0.7 → 5.0.8

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 (191) hide show
  1. package/.aiox-core/cli/commands/pro/buyer.js +379 -0
  2. package/.aiox-core/cli/commands/pro/index.js +191 -52
  3. package/.aiox-core/cli/commands/validate/index.js +2 -0
  4. package/.aiox-core/core/code-intel/helpers/dev-helper.js +1 -1
  5. package/.aiox-core/core/code-intel/helpers/devops-helper.js +0 -1
  6. package/.aiox-core/core/code-intel/helpers/planning-helper.js +1 -1
  7. package/.aiox-core/core/code-intel/helpers/qa-helper.js +2 -2
  8. package/.aiox-core/core/config/schemas/framework-config.schema.json +1 -0
  9. package/.aiox-core/core/config/template-overrides.js +1 -1
  10. package/.aiox-core/core/doctor/checks/ide-sync.js +81 -25
  11. package/.aiox-core/core/doctor/checks/rules-files.js +0 -1
  12. package/.aiox-core/core/doctor/checks/skills-count.js +83 -15
  13. package/.aiox-core/core/graph-dashboard/cli.js +1 -2
  14. package/.aiox-core/core/graph-dashboard/data-sources/code-intel-source.js +1 -1
  15. package/.aiox-core/core/ids/layer-classifier.js +1 -1
  16. package/.aiox-core/core/pro/pro-updater.js +578 -0
  17. package/.aiox-core/core/synapse/context/context-tracker.js +107 -9
  18. package/.aiox-core/core/synapse/layers/layer-processor.js +1 -1
  19. package/.aiox-core/core-config.yaml +15 -1
  20. package/.aiox-core/data/capability-detection.js +15 -15
  21. package/.aiox-core/data/entity-registry.yaml +18 -2
  22. package/.aiox-core/data/registry-update-log.jsonl +5 -0
  23. package/.aiox-core/data/tok3-token-comparison.js +0 -4
  24. package/.aiox-core/data/tool-search-validation.js +1 -1
  25. package/.aiox-core/development/agents/aiox-master.md +44 -6
  26. package/.aiox-core/development/agents/data-engineer.md +4 -4
  27. package/.aiox-core/development/agents/devops.md +52 -2
  28. package/.aiox-core/development/agents/po.md +1 -1
  29. package/.aiox-core/development/agents/qa.md +5 -11
  30. package/.aiox-core/development/agents/sm.md +3 -3
  31. package/.aiox-core/development/agents/ux-design-expert.md +1 -1
  32. package/.aiox-core/development/scripts/unified-activation-pipeline.js +29 -3
  33. package/.aiox-core/development/tasks/dev-develop-story.md +46 -7
  34. package/.aiox-core/development/tasks/devops-pro-access-grant.md +93 -0
  35. package/.aiox-core/development/tasks/devops-pro-activate.md +42 -0
  36. package/.aiox-core/development/tasks/devops-pro-check-access.md +34 -0
  37. package/.aiox-core/development/tasks/devops-pro-request-reset.md +34 -0
  38. package/.aiox-core/development/tasks/devops-pro-resend-verification.md +32 -0
  39. package/.aiox-core/development/tasks/devops-pro-reset-password.md +36 -0
  40. package/.aiox-core/development/tasks/devops-pro-validate-login.md +36 -0
  41. package/.aiox-core/development/tasks/devops-pro-verify-status.md +33 -0
  42. package/.aiox-core/development/tasks/qa-gate.md +54 -4
  43. package/.aiox-core/development/tasks/validate-next-story.md +39 -2
  44. package/.aiox-core/framework-config.yaml +1 -0
  45. package/.aiox-core/infrastructure/scripts/codex-skills-sync/README.md +69 -0
  46. package/.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js +727 -0
  47. package/.aiox-core/infrastructure/scripts/codex-skills-sync/index.js +10 -0
  48. package/.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js +65 -4
  49. package/.aiox-core/infrastructure/scripts/generate-settings-json.js +29 -4
  50. package/.aiox-core/infrastructure/scripts/ide-sync/agent-parser.js +4 -0
  51. package/.aiox-core/infrastructure/scripts/ide-sync/index.js +67 -7
  52. package/.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js +145 -3
  53. package/.aiox-core/infrastructure/scripts/repair-agent-references.js +263 -0
  54. package/.aiox-core/infrastructure/scripts/validate-claude-integration.js +60 -8
  55. package/.aiox-core/infrastructure/scripts/validate-paths.js +13 -0
  56. package/.aiox-core/install-manifest.yaml +134 -82
  57. package/.aiox-core/utils/filters/index.js +2 -1
  58. package/.claude/commands/AIOX/agents/aiox-master.md +21 -0
  59. package/.claude/commands/AIOX/agents/analyst.md +21 -0
  60. package/.claude/commands/AIOX/agents/architect.md +21 -0
  61. package/.claude/commands/AIOX/agents/data-engineer.md +21 -0
  62. package/.claude/commands/AIOX/agents/dev.md +21 -0
  63. package/.claude/commands/AIOX/agents/devops.md +21 -0
  64. package/.claude/commands/AIOX/agents/pm.md +21 -0
  65. package/.claude/commands/AIOX/agents/po.md +21 -0
  66. package/.claude/commands/AIOX/agents/qa.md +21 -0
  67. package/.claude/commands/AIOX/agents/sm.md +21 -0
  68. package/.claude/commands/AIOX/agents/squad-creator.md +21 -0
  69. package/.claude/commands/AIOX/agents/ux-design-expert.md +21 -0
  70. package/.claude/commands/AIOX/scripts/agent-config-loader.js +624 -0
  71. package/.claude/commands/AIOX/scripts/generate-greeting.js +160 -0
  72. package/.claude/commands/AIOX/scripts/greeting-builder.js +866 -0
  73. package/.claude/commands/AIOX/scripts/session-context-loader.js +286 -0
  74. package/.claude/commands/AIOX/stories/story-6.1.4.md +1404 -0
  75. package/.claude/commands/cohort-squad/agents/cohort-manager.md +156 -0
  76. package/.claude/commands/design-system/agents/brad-frost.md +1097 -0
  77. package/.claude/commands/design-system/agents/dan-mall.md +857 -0
  78. package/.claude/commands/design-system/agents/dave-malouf.md +2272 -0
  79. package/.claude/commands/design-system/agents/design-chief.md +102 -0
  80. package/.claude/commands/design-system/agents/nano-banana-generator.md +162 -0
  81. package/.claude/commands/greet.md +101 -0
  82. package/.claude/commands/synapse/manager.md +75 -0
  83. package/.claude/commands/synapse/tasks/add-rule.md +94 -0
  84. package/.claude/commands/synapse/tasks/create-command.md +109 -0
  85. package/.claude/commands/synapse/tasks/create-domain.md +127 -0
  86. package/.claude/commands/synapse/tasks/diagnose-synapse.md +245 -0
  87. package/.claude/commands/synapse/tasks/edit-rule.md +109 -0
  88. package/.claude/commands/synapse/tasks/suggest-domain.md +116 -0
  89. package/.claude/commands/synapse/tasks/toggle-domain.md +83 -0
  90. package/.claude/commands/synapse/templates/domain-template +8 -0
  91. package/.claude/commands/synapse/templates/manifest-entry-template +4 -0
  92. package/.claude/commands/synapse/utils/manifest-parser-reference.md +134 -0
  93. package/.claude/hooks/precompact-session-digest.cjs +2 -2
  94. package/.claude/skills/AIOX/agents/aiox-master/SKILL.md +511 -0
  95. package/.claude/skills/AIOX/agents/analyst/SKILL.md +281 -0
  96. package/.claude/skills/AIOX/agents/architect/SKILL.md +482 -0
  97. package/.claude/skills/AIOX/agents/data-engineer/SKILL.md +503 -0
  98. package/.claude/skills/AIOX/agents/dev/SKILL.md +568 -0
  99. package/.claude/skills/AIOX/agents/devops/SKILL.md +597 -0
  100. package/.claude/skills/AIOX/agents/pm/SKILL.md +385 -0
  101. package/.claude/skills/AIOX/agents/po/SKILL.md +343 -0
  102. package/.claude/skills/AIOX/agents/qa/SKILL.md +451 -0
  103. package/.claude/skills/AIOX/agents/sm/SKILL.md +295 -0
  104. package/.claude/skills/AIOX/agents/squad-creator/SKILL.md +352 -0
  105. package/.claude/skills/AIOX/agents/ux-design-expert/SKILL.md +503 -0
  106. package/.claude/skills/architect-first/SKILL.md +275 -0
  107. package/.claude/skills/architect-first/assets/architecture-template.md +505 -0
  108. package/.claude/skills/architect-first/assets/config-template.yaml +351 -0
  109. package/.claude/skills/architect-first/references/architecture-checklist.md +216 -0
  110. package/.claude/skills/architect-first/references/pre-implementation-checklist.md +119 -0
  111. package/.claude/skills/architect-first/references/stop-rules-guide.md +291 -0
  112. package/.claude/skills/architect-first/references/testing-strategy-guide.md +477 -0
  113. package/.claude/skills/architect-first/scripts/architecture_validator.py +490 -0
  114. package/.claude/skills/architect-first/scripts/check_coupling.py +306 -0
  115. package/.claude/skills/architect-first/scripts/validate_risk_mitigation.py +382 -0
  116. package/.claude/skills/checklist-runner/SKILL.md +113 -0
  117. package/.claude/skills/clone-mind.md +329 -0
  118. package/.claude/skills/coderabbit-review/SKILL.md +106 -0
  119. package/.claude/skills/course-generation-workflow.md +76 -0
  120. package/.claude/skills/enhance-workflow.md +466 -0
  121. package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
  122. package/.claude/skills/mcp-builder/SKILL.md +328 -0
  123. package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
  124. package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  125. package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  126. package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  127. package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
  128. package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
  129. package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  130. package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  131. package/.claude/skills/ralph.md +181 -0
  132. package/.claude/skills/skill-creator/LICENSE.txt +202 -0
  133. package/.claude/skills/skill-creator/SKILL.md +209 -0
  134. package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  135. package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  136. package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  137. package/.claude/skills/squad.md +301 -0
  138. package/.claude/skills/synapse/SKILL.md +132 -0
  139. package/.claude/skills/synapse/assets/README.md +50 -0
  140. package/.claude/skills/synapse/references/brackets.md +100 -0
  141. package/.claude/skills/synapse/references/commands.md +118 -0
  142. package/.claude/skills/synapse/references/domains.md +126 -0
  143. package/.claude/skills/synapse/references/layers.md +186 -0
  144. package/.claude/skills/synapse/references/manifest.md +142 -0
  145. package/.claude/skills/tech-search/SKILL.md +431 -0
  146. package/.claude/skills/tech-search/prompts/page-extract.md +133 -0
  147. package/README.en.md +2 -2
  148. package/README.md +8 -2
  149. package/bin/aiox.js +55 -4
  150. package/bin/utils/framework-guard.js +4 -2
  151. package/bin/utils/pro-detector.js +119 -28
  152. package/bin/utils/validate-publish.js +6 -6
  153. package/docs/aiox-agent-flows/devops-system.md +18 -0
  154. package/docs/aiox-workflows/README.md +1 -0
  155. package/docs/aiox-workflows/pro-access-grant-workflow.md +218 -0
  156. package/docs/guides/pro/access-grant-ops-playbook.md +370 -0
  157. package/docs/guides/pro/install-gate-setup.md +12 -6
  158. package/docs/guides/pro/squad-creator-handoff-pro-access-ops.md +134 -0
  159. package/docs/guides/supabase-ops-handoff.md +768 -0
  160. package/package.json +12 -1
  161. package/packages/aiox-pro-cli/bin/aiox-pro.js +33 -12
  162. package/packages/installer/src/config/configure-environment.js +118 -50
  163. package/packages/installer/src/installer/aiox-core-installer.js +124 -27
  164. package/packages/installer/src/installer/brownfield-upgrader.js +66 -9
  165. package/packages/installer/src/installer/dependency-installer.js +4 -0
  166. package/packages/installer/src/pro/pro-scaffolder.js +5 -5
  167. package/packages/installer/src/updater/index.js +151 -10
  168. package/packages/installer/src/wizard/ide-config-generator.js +73 -7
  169. package/packages/installer/src/wizard/index.js +119 -31
  170. package/packages/installer/src/wizard/pro-setup.js +118 -47
  171. package/packages/installer/src/wizard/validation/validators/dependency-validator.js +32 -25
  172. package/packages/installer/src/wizard/validation/validators/file-structure-validator.js +26 -0
  173. package/packages/installer/tests/unit/artifact-copy-pipeline/artifact-copy-pipeline.test.js +84 -1
  174. package/packages/installer/tests/unit/claude-md-template-v5/claude-md-template-v5.test.js +1 -1
  175. package/packages/installer/tests/unit/doctor/doctor-checks.test.js +85 -19
  176. package/packages/installer/tests/unit/entity-registry-bootstrap.test.js +4 -4
  177. package/packages/installer/tests/unit/generate-settings-json/generate-settings-json.test.js +5 -5
  178. package/packages/installer/tests/unit/ide-sync-integration/ide-sync-integration.test.js +4 -4
  179. package/packages/installer/tests/unit/merger/yaml-merger.test.js +11 -11
  180. package/pro/README.md +12 -1
  181. package/pro/license/index.js +3 -11
  182. package/pro/license/license-api.js +25 -0
  183. package/pro/license/license-cache.js +135 -31
  184. package/pro/license/license-crypto.js +59 -3
  185. package/pro/package.json +5 -4
  186. package/pro/squads/README.md +16 -16
  187. package/pro/squads/index.js +1 -1
  188. package/scripts/e2e/installed-skills-smoke.js +264 -0
  189. package/scripts/package-synapse.js +3 -3
  190. package/scripts/validate-package-completeness.js +8 -11
  191. package/.aiox-core/lib/build.json +0 -1
@@ -0,0 +1,466 @@
1
+ # Enhance Workflow v2.0 - Multi-Agent Orchestration
2
+
3
+ Pipeline de enhancement com análise de determinismo, roundtable dinâmico por domínio, e validação QA.
4
+
5
+ **Fluxo:** Pre-flight → Determinism Check → Discovery → Research → Roundtable (dinâmico) → Create Epic → QA Validation
6
+
7
+ ---
8
+
9
+ ## Domain Roundtable Map
10
+
11
+ O roundtable é selecionado automaticamente baseado no domínio do projeto:
12
+
13
+ ```yaml
14
+ domain_roundtable_map:
15
+ # Development (default)
16
+ code_app:
17
+ keywords: [app, api, database, frontend, backend, feature, refactor, bug]
18
+ agents: [architect, data-engineer, devops, ux]
19
+ agent_files: [AIOX/agents/architect.md, AIOX/agents/data-engineer.md, AIOX/agents/devops.md, AIOX/agents/ux-design-expert.md]
20
+
21
+ # Copywriting & Marketing
22
+ copy_marketing:
23
+ keywords: [copy, sales page, vsl, email sequence, headline, funnel, launch, marketing]
24
+ agents: [copy-chief, story-chief, funnel-architect, ads-analyst]
25
+ agent_files: [Copy/agents/copy-chief.md, Storytelling/agents/story-chief.md, CreatorOS/agents/funnel-architect.md, traffic-masters/agents/ads-analyst.md]
26
+
27
+ # Mind Cloning (MMOS)
28
+ mmos_minds:
29
+ keywords: [mind, clone, persona, cognitive, behavioral, dna, emulator, personality]
30
+ agents: [barbara-cognitive-architect, daniel-behavioral-analyst, charlie-synthesis-expert, quinn-quality-specialist]
31
+ agent_files: [MMOS/agents/barbara-cognitive-architect.md, MMOS/agents/daniel-behavioral-analyst.md, MMOS/agents/charlie-synthesis-expert.md, MMOS/agents/quinn-quality-specialist.md]
32
+
33
+ # Design & Brand
34
+ design_brand:
35
+ keywords: [design, ui, ux, brand, visual, logo, design system, component]
36
+ agents: [design-chief, brad-frost, marty-neumeier, ux]
37
+ agent_files: [Design/agents/design-chief.md, Design/agents/brad-frost.md, Design/agents/marty-neumeier.md, AIOX/agents/ux-design-expert.md]
38
+
39
+ # Storytelling & Content
40
+ storytelling_content:
41
+ keywords: [story, narrative, content, course, curriculum, blog, video script]
42
+ agents: [story-chief, nancy-duarte, donald-miller, content-pm]
43
+ agent_files: [Storytelling/agents/story-chief.md, Storytelling/agents/nancy-duarte.md, Storytelling/agents/donald-miller.md, CreatorOS/agents/content-pm.md]
44
+
45
+ # Paid Traffic & Ads
46
+ traffic_ads:
47
+ keywords: [ads, traffic, campaign, facebook, google ads, meta, tiktok, media buyer]
48
+ agents: [traffic-masters-chief, ads-analyst, creative-analyst, media-buyer]
49
+ agent_files: [traffic-masters/agents/traffic-masters-chief.md, traffic-masters/agents/ads-analyst.md, traffic-masters/agents/creative-analyst.md, traffic-masters/agents/media-buyer.md]
50
+
51
+ # Cybersecurity
52
+ security:
53
+ keywords: [security, pentest, vulnerability, audit, compliance, hack, breach]
54
+ agents: [cyber-chief, peter-kim, georgia-weidman, jim-manico]
55
+ agent_files: [Cybersecurity/agents/cyber-chief.md, Cybersecurity/agents/peter-kim.md, Cybersecurity/agents/georgia-weidman.md, Cybersecurity/agents/jim-manico.md]
56
+
57
+ # Legal
58
+ legal:
59
+ keywords: [legal, contract, compliance, lgpd, privacy, terms, lawsuit, tax]
60
+ agents: [legal-chief, safe-counsel, lgpd-specialist, compliance-architect]
61
+ agent_files: [Legal/agents/legal-chief.md, Legal/agents/safe-counsel.md, Legal/agents/lgpd-specialist.md, HybridOps/agents/compliance-validator.md]
62
+
63
+ # HR & People
64
+ hr_people:
65
+ keywords: [hr, hiring, talent, culture, team, performance review, onboarding]
66
+ agents: [hr-chief, talent-classifier, behavior-detector, strengths-identifier]
67
+ agent_files: [HR/agents/hr-chief.md, HR/agents/talent-classifier.md, HR/agents/behavior-detector.md, HR/agents/strengths-identifier.md]
68
+
69
+ # Data & Analytics
70
+ data_analytics:
71
+ keywords: [analytics, metrics, kpi, dashboard, data, cohort, retention, growth]
72
+ agents: [data-chief, peter-fader, sean-ellis, avinash-kaushik]
73
+ agent_files: [Data/agents/data-chief.md, Data/agents/peter-fader.md, Data/agents/sean-ellis.md, Data/agents/avinash-kaushik.md]
74
+
75
+ # FinOps & Cloud Costs
76
+ finops_cloud:
77
+ keywords: [finops, cloud cost, aws, gcp, azure, billing, optimization, infra cost]
78
+ agents: [finops-chief, corey-quinn, jr-storment, mike-fuller]
79
+ agent_files: [finops/agents/finops-chief.md, finops/agents/corey-quinn.md, finops/agents/jr-storment.md, finops/agents/mike-fuller.md]
80
+
81
+ # Process & Ops
82
+ process_ops:
83
+ keywords: [process, workflow, automation, clickup, sop, procedure, ops]
84
+ agents: [process-architect, workflow-designer, qa-architect, compliance-validator]
85
+ agent_files: [HybridOps/agents/process-architect.md, HybridOps/agents/workflow-designer.md, HybridOps/agents/qa-architect.md, HybridOps/agents/compliance-validator.md]
86
+
87
+ # Squad & Workflow Creation
88
+ squad_workflow:
89
+ keywords: [squad, skill, workflow, agent, pipeline, orchestration]
90
+ agents: [pedro-valerio, squad-architect, qa, devops]
91
+ agent_files: [squad-creator/agents/pedro-valerio.md, squad-creator/agents/squad-architect.md, AIOX/agents/qa.md, AIOX/agents/devops.md]
92
+
93
+ # Strategic Advisory
94
+ advisory_strategy:
95
+ keywords: [strategy, investment, board, advisor, pivot, fundraise, m&a]
96
+ agents: [board-chair, ray-dalio, charlie-munger, naval-ravikant]
97
+ agent_files: [AdvisoryBoard/agents/board-chair.md, AdvisoryBoard/agents/ray-dalio.md, AdvisoryBoard/agents/charlie-munger.md, AdvisoryBoard/agents/naval-ravikant.md]
98
+
99
+ # Personality Analysis
100
+ innerlens_personality:
101
+ keywords: [innerlens, personality, profile, psychologist, fragment, identity]
102
+ agents: [innerlens-orchestrator, psychologist, fragment-extractor, quality-assurance]
103
+ agent_files: [InnerLens/agents/innerlens-orchestrator.md, InnerLens/agents/psychologist.md, InnerLens/agents/fragment-extractor.md, InnerLens/agents/quality-assurance.md]
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Activation
109
+
110
+ Quando o usuario invocar `/enhance-workflow`, execute o fluxo completo.
111
+
112
+ ---
113
+
114
+ ## Phase 0: Pre-flight Check
115
+
116
+ Antes de qualquer coisa, valide:
117
+
118
+ ```
119
+ PRE-FLIGHT CHECKLIST:
120
+ [ ] Diretório outputs/enhance/ existe ou pode ser criado
121
+ [ ] Contexto do projeto foi fornecido (não vazio)
122
+ [ ] Agent files necessários existem em .claude/commands/
123
+ [ ] Ferramentas externas disponíveis (exa, context7) - graceful degradation se não
124
+
125
+ Se FALHAR: Abortar com mensagem clara do que falta.
126
+ Timeout: 30s
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Phase 0.5: Determinism Analysis
132
+
133
+ **ANTES de gastar tokens com agentes**, avaliar se o enhancement pode ser resolvido deterministicamente:
134
+
135
+ ```yaml
136
+ determinism_check:
137
+ # Classificar tipo de enhancement
138
+ types:
139
+ rename:
140
+ patterns: ["renomear", "rename", "mudar nome"]
141
+ deterministic: true
142
+ action: "sed, IDE refactor tools"
143
+
144
+ migration:
145
+ patterns: ["migrar", "atualizar dependências", "upgrade"]
146
+ deterministic: true
147
+ action: "npm update, migration scripts"
148
+
149
+ format:
150
+ patterns: ["formatar", "lint", "estilo de código"]
151
+ deterministic: true
152
+ action: "prettier, eslint --fix"
153
+
154
+ bug_fix:
155
+ patterns: ["corrigir", "fix", "bug", "erro"]
156
+ deterministic: false
157
+ action: "pipeline (requer análise)"
158
+
159
+ feature:
160
+ patterns: ["adicionar", "criar", "implementar", "nova feature"]
161
+ deterministic: false
162
+ action: "pipeline completo"
163
+
164
+ refactor:
165
+ patterns: ["refatorar", "melhorar código"]
166
+ deterministic: "depends" # AST tools se mecânico, pipeline se arquitetural
167
+
168
+ ux:
169
+ patterns: ["melhorar ux", "design", "interface", "experiência"]
170
+ deterministic: false
171
+ action: "pipeline completo"
172
+
173
+ # Se DETERMINÍSTICO:
174
+ # 1. Sugerir comando/script ao usuário
175
+ # 2. Perguntar: "Executar diretamente ou forçar pipeline? [D/p]"
176
+ # 3. Se D: executar e encerrar
177
+ # 4. Se p: continuar com pipeline
178
+
179
+ # Se PROBABILÍSTICO:
180
+ # Continuar com pipeline normal
181
+ ```
182
+
183
+ **Registrar decisão em `.state.json`:**
184
+ ```json
185
+ {
186
+ "determinism_analysis": {
187
+ "input": "descrição original",
188
+ "classification": "feature",
189
+ "is_deterministic": false,
190
+ "suggested_action": null,
191
+ "user_decision": "pipeline",
192
+ "analyzed_at": "ISO8601"
193
+ }
194
+ }
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Phase 0.7: Domain Classification
200
+
201
+ Analisar o contexto e classificar o domínio para selecionar o roundtable correto:
202
+
203
+ ```
204
+ 1. Extrair keywords do contexto fornecido pelo usuário
205
+ 2. Fazer match com domain_roundtable_map
206
+ 3. Se múltiplos matches: perguntar ao usuário qual domínio
207
+ 4. Se nenhum match: usar code_app (default)
208
+ 5. Registrar em .state.json: { "domain": "copy_marketing", "roundtable_agents": [...] }
209
+ ```
210
+
211
+ **Apresentar ao usuário:**
212
+ ```
213
+ [enhance-workflow] Domínio detectado: copy_marketing
214
+ [enhance-workflow] Roundtable team: copy-chief, story-chief, funnel-architect, ads-analyst
215
+ [enhance-workflow] Confirma? [S/n]
216
+ ```
217
+
218
+ ---
219
+
220
+ ## Input Collection
221
+
222
+ Pergunte ao usuario (use AskUserQuestion):
223
+
224
+ 1. **Projeto**: Qual projeto/feature sera enhanced?
225
+ 2. **Scope**: greenfield (novo) ou brownfield (existente)?
226
+ 3. **Foco**: Qual o resultado esperado?
227
+
228
+ Se contexto já fornecido, pule para Pre-flight.
229
+
230
+ ---
231
+
232
+ ## Setup
233
+
234
+ ### Diretório de Artefatos
235
+
236
+ ```
237
+ outputs/enhance/{slug}/
238
+ ├── 00-INDEX.md # Hub de navegação (criado no início)
239
+ ├── .state.json # Checkpoint state
240
+ ├── .metrics.json # Métricas de execução
241
+ └── ...artefatos...
242
+ ```
243
+
244
+ ### Team Creation
245
+
246
+ ```
247
+ TeamCreate(team_name: "enhance-{slug}")
248
+ ```
249
+
250
+ ### Task Creation (com dependências)
251
+
252
+ | ID | Task | Agent | Blocked By |
253
+ |----|------|-------|------------|
254
+ | 1 | Discovery | architect | - |
255
+ | 2 | Research | analyst | 1 |
256
+ | 3 | Roundtable | {domain_agents} | 2 |
257
+ | 4 | Create Epic | pm | 3 |
258
+ | 5 | QA Validation | qa | 4 |
259
+
260
+ ### Criar 00-INDEX.md inicial
261
+
262
+ ```markdown
263
+ # Enhance Workflow: {project_name}
264
+
265
+ **Iniciado:** {timestamp}
266
+ **Status:** 🔄 Em progresso
267
+ **Domínio:** {domain}
268
+ **Modo:** {quick/standard/deep}
269
+
270
+ ## Fases
271
+
272
+ | # | Fase | Agente | Status |
273
+ |---|------|--------|--------|
274
+ | 1 | Discovery | @architect | 🔄 |
275
+ | 2 | Research | @analyst | ⏳ |
276
+ | 3 | Roundtable | {agents} | ⏳ |
277
+ | 4 | Create Epic | @pm | ⏳ |
278
+ | 5 | QA Validation | @qa | ⏳ |
279
+
280
+ ## Artefatos
281
+
282
+ _Atualizados conforme fases completam_
283
+ ```
284
+
285
+ ---
286
+
287
+ ## Phase Execution
288
+
289
+ ### Progress Indicator Pattern
290
+
291
+ Antes de cada fase, mostrar:
292
+ ```
293
+ [enhance-workflow] [1/5] Discovery em andamento...
294
+ ```
295
+
296
+ Após cada fase:
297
+ ```
298
+ [enhance-workflow] [1/5] Discovery completo (45s)
299
+ [enhance-workflow] [2/5] Research em andamento...
300
+ ```
301
+
302
+ ### Checkpoint Pattern
303
+
304
+ Após cada fase completar:
305
+ 1. Atualizar `.state.json` com fase completa
306
+ 2. Atualizar `00-INDEX.md` com status e link
307
+ 3. Salvar hash do artefato gerado
308
+
309
+ ---
310
+
311
+ ### Phase 1: Discovery (@architect)
312
+
313
+ **Spawn agent** com prompt incluindo Context Preamble do AIOX.
314
+
315
+ Após completar:
316
+ - Checkpoint: `{ "phases": { "discovery": { "status": "completed", "artifact_hash": "..." } } }`
317
+ - Atualizar 00-INDEX.md
318
+
319
+ ---
320
+
321
+ ### Phase 2: Research (@analyst)
322
+
323
+ **Spawn agent** que lê 01-discovery.md e pesquisa.
324
+
325
+ Graceful degradation: Se falhar após 5 retries, continuar sem research (warn user).
326
+
327
+ ---
328
+
329
+ ### Phase 3: Roundtable (DINÂMICO)
330
+
331
+ **Spawn 4 agents em paralelo** baseado no domínio classificado.
332
+
333
+ Exemplo para `copy_marketing`:
334
+ - `rt-copy-chief` → perspectiva de copy
335
+ - `rt-story-chief` → perspectiva de storytelling
336
+ - `rt-funnel-architect` → perspectiva de funil
337
+ - `rt-ads-analyst` → perspectiva de tráfego
338
+
339
+ Cada agent lê 01-discovery.md e 02-research.md, fornece perspectiva especializada.
340
+
341
+ Após todos completarem, consolidar em `03-roundtable.md`.
342
+
343
+ ---
344
+
345
+ ### Phase 4: Create Epic (@pm)
346
+
347
+ **Spawn pm** que lê todos os artefatos e cria o Epic.
348
+
349
+ ---
350
+
351
+ ### Phase 5: QA Validation (@qa) - NOVA
352
+
353
+ **Spawn qa** para validar o Epic:
354
+
355
+ ```
356
+ Você é Quinn, o QA do AIOX. Leia seu agent file em:
357
+ .claude/commands/AIOX/agents/qa.md
358
+
359
+ Execute *review no Epic gerado:
360
+
361
+ ## Checklist de Validação
362
+
363
+ ### Estrutura
364
+ - [ ] Epic Overview presente
365
+ - [ ] Scope (in/out) definido
366
+ - [ ] Success Metrics mensuráveis
367
+
368
+ ### Stories
369
+ - [ ] Todas têm formato "Como X, quero Y, para Z"
370
+ - [ ] Acceptance criteria com checkboxes
371
+ - [ ] Story points estimados (fibonacci)
372
+ - [ ] Executor atribuído (@agent)
373
+
374
+ ### Qualidade
375
+ - [ ] Definition of Done presente
376
+ - [ ] Risks and Mitigations documentados
377
+ - [ ] Technical Requirements claros
378
+
379
+ ## Gate Decision
380
+
381
+ - **PASS**: Todos os critérios atendidos → Entregar ao usuário
382
+ - **CONCERNS**: >80% atendidos, não-críticos faltando → Entregar com warnings
383
+ - **FAIL**: <80% atendidos OU críticos faltando → Retry @pm (max 2x)
384
+
385
+ Salve resultado em: outputs/enhance/{slug}/05-qa-report.md
386
+ ```
387
+
388
+ Se FAIL: Enviar feedback para @pm, re-spawnar, max 2 retries.
389
+ Se PASS/CONCERNS: Prosseguir para entrega.
390
+
391
+ ---
392
+
393
+ ## Finalizacao
394
+
395
+ 1. **Atualizar 00-INDEX.md final** com todos os links e status ✅
396
+
397
+ 2. **Apresentar resumo** ao usuario:
398
+ ```
399
+ ## Enhance Workflow Completo: {nome}
400
+
401
+ ### Artefatos Gerados
402
+ - `00-INDEX.md` - Hub de navegação
403
+ - `01-discovery.md` - Análise técnica
404
+ - `02-research.md` - Pesquisa estratégica
405
+ - `03-roundtable.md` - Consenso ({domain})
406
+ - `04-epic.md` - Epic completo
407
+ - `05-qa-report.md` - Validação QA
408
+
409
+ ### Epic: {titulo}
410
+ - Stories: {N} ({total} SP)
411
+ - QA Gate: {PASS/CONCERNS}
412
+ - Domínio: {domain}
413
+
414
+ ### Próximos Passos
415
+ 1. Revisar epic em 04-epic.md
416
+ 2. Executar com /execute-epic {slug}
417
+ ```
418
+
419
+ 3. **Cleanup**: Shutdown agents, TeamDelete
420
+
421
+ 4. **Finalizar métricas** em `.metrics.json`
422
+
423
+ ---
424
+
425
+ ## Modos de Execução (Futuro)
426
+
427
+ ```yaml
428
+ modes:
429
+ quick:
430
+ phases: [discovery, epic]
431
+ skip: [research, roundtable, qa]
432
+ timeout: 10min
433
+
434
+ standard:
435
+ phases: [discovery, research, roundtable, epic, qa]
436
+ timeout: 30min
437
+
438
+ deep:
439
+ phases: [discovery, research, roundtable, security_review, cost_analysis, epic, qa]
440
+ timeout: 45min
441
+ ```
442
+
443
+ ---
444
+
445
+ ## Retry Policy
446
+
447
+ ```yaml
448
+ per_phase:
449
+ discovery: { max_attempts: 3, on_max: fail_fast }
450
+ research: { max_attempts: 5, on_max: graceful_skip }
451
+ roundtable: { max_attempts: 2, on_max: continue_partial }
452
+ epic: { max_attempts: 3, on_max: fail_with_partial }
453
+ qa: { max_attempts: 2, on_max: deliver_with_warning }
454
+ ```
455
+
456
+ ---
457
+
458
+ ## Notas de Implementação
459
+
460
+ - Cada agent roda em contexto isolado
461
+ - Comunicação entre fases via ARQUIVOS
462
+ - Roundtable roda em PARALELO
463
+ - Sempre use `mode: "bypassPermissions"`
464
+ - Determinism check ANTES de gastar tokens
465
+ - Domain classification ANTES de roundtable
466
+ - QA validation ANTES de entregar
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.