@orchestrator-claude/definitions 3.5.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 (73) hide show
  1. package/agents/api-extractor.md +687 -0
  2. package/agents/business-rule-miner.md +754 -0
  3. package/agents/code-archaeologist.md +720 -0
  4. package/agents/docs-guardian.md +524 -0
  5. package/agents/implementer.md +512 -0
  6. package/agents/legacy-discoverer.md +583 -0
  7. package/agents/legacy-synthesizer.md +1101 -0
  8. package/agents/orchestrator.md +165 -0
  9. package/agents/planner.md +365 -0
  10. package/agents/researcher.md +447 -0
  11. package/agents/reviewer.md +514 -0
  12. package/agents/schema-extractor.md +781 -0
  13. package/agents/specifier.md +360 -0
  14. package/agents/task-generator.md +390 -0
  15. package/bin/orch-defs.js +2 -0
  16. package/dist/cli.d.ts +3 -0
  17. package/dist/cli.d.ts.map +1 -0
  18. package/dist/cli.js +172 -0
  19. package/dist/cli.js.map +1 -0
  20. package/dist/commands/DiffCommand.d.ts +13 -0
  21. package/dist/commands/DiffCommand.d.ts.map +1 -0
  22. package/dist/commands/DiffCommand.js +74 -0
  23. package/dist/commands/DiffCommand.js.map +1 -0
  24. package/dist/commands/SeedCommand.d.ts +19 -0
  25. package/dist/commands/SeedCommand.d.ts.map +1 -0
  26. package/dist/commands/SeedCommand.js +56 -0
  27. package/dist/commands/SeedCommand.js.map +1 -0
  28. package/dist/http/ApiClient.d.ts +50 -0
  29. package/dist/http/ApiClient.d.ts.map +1 -0
  30. package/dist/http/ApiClient.js +58 -0
  31. package/dist/http/ApiClient.js.map +1 -0
  32. package/dist/index.d.ts +12 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +11 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/manifest/ManifestLoader.d.ts +34 -0
  37. package/dist/manifest/ManifestLoader.d.ts.map +1 -0
  38. package/dist/manifest/ManifestLoader.js +110 -0
  39. package/dist/manifest/ManifestLoader.js.map +1 -0
  40. package/dist/manifest/types.d.ts +59 -0
  41. package/dist/manifest/types.d.ts.map +1 -0
  42. package/dist/manifest/types.js +5 -0
  43. package/dist/manifest/types.js.map +1 -0
  44. package/dist/scripts/generate-manifest.d.ts +10 -0
  45. package/dist/scripts/generate-manifest.d.ts.map +1 -0
  46. package/dist/scripts/generate-manifest.js +114 -0
  47. package/dist/scripts/generate-manifest.js.map +1 -0
  48. package/hooks/post-agent-artifact-relay.sh +157 -0
  49. package/hooks/post-artifact-generate.sh +39 -0
  50. package/hooks/post-implement-validate.sh +139 -0
  51. package/hooks/post-phase-checkpoint.sh +322 -0
  52. package/hooks/pre-agent-invoke.sh +34 -0
  53. package/hooks/pre-phase-advance.sh +40 -0
  54. package/hooks/track-agent-invocation.sh +241 -0
  55. package/kb/auth-strategies.md +742 -0
  56. package/kb/docs-constitution.md +310 -0
  57. package/kb/error-handling.md +555 -0
  58. package/kb/rest-conventions.md +458 -0
  59. package/kb/validation-patterns.md +589 -0
  60. package/manifest.json +314 -0
  61. package/package.json +65 -0
  62. package/skills/artifact-validator/SKILL.md +226 -0
  63. package/skills/docs-guardian/SKILL.md +230 -0
  64. package/skills/kb-lookup/SKILL.md +257 -0
  65. package/skills/phase-gate-evaluator/SKILL.md +274 -0
  66. package/skills/release/SKILL.md +239 -0
  67. package/skills/release/release.sh +491 -0
  68. package/skills/smoke-test/SKILL.md +195 -0
  69. package/skills/workflow-status/SKILL.md +322 -0
  70. package/workflows/bug-fix.json +74 -0
  71. package/workflows/feature-development.json +88 -0
  72. package/workflows/legacy-analysis.json +304 -0
  73. package/workflows/refactoring.json +74 -0
@@ -0,0 +1,274 @@
1
+ ---
2
+ name: phase-gate-evaluator
3
+ description: Avalia gates entre fases do workflow para verificar se criterios de qualidade foram atendidos. Use antes de avancar fase ou para diagnosticar bloqueios.
4
+ allowed-tools: Read, Grep, Glob
5
+ ---
6
+
7
+ # Phase Gate Evaluator Skill
8
+
9
+ ## Descricao
10
+
11
+ Esta skill avalia se um workflow pode avancar de uma fase para a proxima,
12
+ verificando criterios de qualidade (gates) definidos para cada transicao.
13
+
14
+ ## Quando Usar
15
+
16
+ Use esta skill quando:
17
+ - Apos validacao bem-sucedida de um artefato
18
+ - Para verificar se pode avancar para proxima fase
19
+ - Para diagnosticar por que um gate nao passou
20
+ - Para listar criterios pendentes de uma fase
21
+
22
+ ## Invocacao
23
+
24
+ Exemplos de como invocar esta skill:
25
+
26
+ ```
27
+ "Avalie o gate da fase specify para o workflow wf-123"
28
+
29
+ "Verifique se posso avancar de plan para tasks"
30
+
31
+ "Liste os criterios pendentes do gate de implementacao"
32
+
33
+ "Por que o gate da fase tasks nao passou?"
34
+ ```
35
+
36
+ ## Parametros
37
+
38
+ | Parametro | Tipo | Obrigatorio | Descricao |
39
+ |-----------|------|-------------|-----------|
40
+ | `workflow_id` | string | Sim | ID do workflow sendo avaliado |
41
+ | `phase` | enum | Sim | research, specify, plan, tasks, implement |
42
+ | `evaluation_mode` | enum | Nao | evaluate (default), diagnose, list_criteria |
43
+
44
+ ### Valores de evaluation_mode
45
+
46
+ - **evaluate**: Avalia gate e retorna passed/failed
47
+ - **diagnose**: Explica em detalhes por que gate falhou
48
+ - **list_criteria**: Lista todos os criterios do gate sem avaliar
49
+
50
+ ## Gates por Fase
51
+
52
+ ### RESEARCH → SPECIFY
53
+ ```yaml
54
+ gate_id: research-complete
55
+ criteria:
56
+ - research_context_exists: true
57
+ - research_context_validated: true
58
+ - minimum_sources: 3
59
+ - has_patterns_identified: true
60
+ - has_risks_documented: true
61
+ ```
62
+
63
+ ### SPECIFY → PLAN
64
+ ```yaml
65
+ gate_id: specification-complete
66
+ criteria:
67
+ - spec_artifact_exists: true
68
+ - spec_artifact_validated: true
69
+ - all_rf_have_acceptance_criteria: true
70
+ - all_rnf_have_metrics: true
71
+ - scope_clearly_defined: true
72
+ - dependencies_identified: true
73
+ - risks_documented: true
74
+ ```
75
+
76
+ ### PLAN → TASKS
77
+ ```yaml
78
+ gate_id: plan-complete
79
+ criteria:
80
+ - plan_artifact_exists: true
81
+ - plan_artifact_validated: true
82
+ - architecture_decisions_documented: true
83
+ - phases_defined: true
84
+ - deliverables_per_phase: true
85
+ - technical_risks_mitigated: true
86
+ ```
87
+
88
+ ### TASKS → IMPLEMENT
89
+ ```yaml
90
+ gate_id: tasks-complete
91
+ criteria:
92
+ - tasks_artifact_exists: true
93
+ - tasks_artifact_validated: true
94
+ - all_tasks_have_acceptance_criteria: true
95
+ - dependencies_form_dag: true
96
+ - no_orphan_tasks: true
97
+ - estimates_provided: true
98
+ ```
99
+
100
+ ### IMPLEMENT → DONE
101
+ ```yaml
102
+ gate_id: implementation-complete
103
+ criteria:
104
+ - all_tasks_completed: true
105
+ - all_tests_passing: true
106
+ - code_review_approved: true
107
+ - documentation_updated: true
108
+ - checkpoint_created: true
109
+ ```
110
+
111
+ ## Output
112
+
113
+ ### Modo: evaluate
114
+ ```json
115
+ {
116
+ "gateId": "specification-complete",
117
+ "workflowId": "wf-123",
118
+ "phase": "specify",
119
+ "nextPhase": "plan",
120
+ "evaluatedAt": "2025-12-09T10:30:00Z",
121
+
122
+ "passed": false,
123
+
124
+ "criteria": [
125
+ {
126
+ "id": "spec_artifact_exists",
127
+ "description": "Artefato de especificacao existe",
128
+ "passed": true,
129
+ "evidence": ".orchestrator/artifacts/specify/spec.md"
130
+ },
131
+ {
132
+ "id": "spec_artifact_validated",
133
+ "description": "Artefato validado sem erros",
134
+ "passed": true,
135
+ "evidence": "Validation passed at 2025-12-09T10:25:00Z"
136
+ },
137
+ {
138
+ "id": "all_rf_have_acceptance_criteria",
139
+ "description": "Todos RFs tem criterios de aceite",
140
+ "passed": false,
141
+ "evidence": "RF-003 e RF-005 sem criterios de aceite",
142
+ "blockers": ["RF-003", "RF-005"]
143
+ }
144
+ ],
145
+
146
+ "summary": {
147
+ "totalCriteria": 7,
148
+ "passedCriteria": 5,
149
+ "failedCriteria": 2,
150
+ "passRate": 71
151
+ },
152
+
153
+ "recommendation": "Adicione criterios de aceite para RF-003 e RF-005 antes de avancar"
154
+ }
155
+ ```
156
+
157
+ ### Modo: diagnose
158
+ ```json
159
+ {
160
+ "gateId": "specification-complete",
161
+ "diagnosis": {
162
+ "failedCriteria": [
163
+ {
164
+ "id": "all_rf_have_acceptance_criteria",
165
+ "reason": "2 requisitos funcionais nao tem criterios de aceite verificaveis",
166
+ "affectedItems": ["RF-003", "RF-005"],
167
+ "howToFix": "Para cada RF, adicione uma secao 'Criterio de Aceite' com items verificaveis",
168
+ "example": "RF-003:\n Criterio de Aceite:\n - [ ] Usuario consegue fazer login em < 3 segundos\n - [ ] Mensagem de erro clara se credenciais invalidas"
169
+ }
170
+ ],
171
+ "rootCause": "Especificacao incompleta - requisitos sem verificabilidade",
172
+ "estimatedEffort": "30 minutos para adicionar criterios faltantes",
173
+ "priority": "Alta - bloqueia avanco do workflow"
174
+ }
175
+ }
176
+ ```
177
+
178
+ ### Modo: list_criteria
179
+ ```json
180
+ {
181
+ "gateId": "specification-complete",
182
+ "phase": "specify",
183
+ "criteria": [
184
+ {
185
+ "id": "spec_artifact_exists",
186
+ "description": "Artefato de especificacao existe em .orchestrator/artifacts/specify/",
187
+ "type": "existence",
188
+ "required": true
189
+ },
190
+ {
191
+ "id": "spec_artifact_validated",
192
+ "description": "Artefato passou validacao completa (schema + business)",
193
+ "type": "validation",
194
+ "required": true
195
+ },
196
+ {
197
+ "id": "all_rf_have_acceptance_criteria",
198
+ "description": "Cada requisito funcional deve ter pelo menos 1 criterio de aceite",
199
+ "type": "completeness",
200
+ "required": true
201
+ },
202
+ {
203
+ "id": "all_rnf_have_metrics",
204
+ "description": "Cada requisito nao-funcional deve ter metrica e target",
205
+ "type": "completeness",
206
+ "required": true
207
+ },
208
+ {
209
+ "id": "scope_clearly_defined",
210
+ "description": "In scope e out of scope claramente definidos",
211
+ "type": "quality",
212
+ "required": true
213
+ },
214
+ {
215
+ "id": "dependencies_identified",
216
+ "description": "Dependencias externas e internas documentadas",
217
+ "type": "completeness",
218
+ "required": true
219
+ },
220
+ {
221
+ "id": "risks_documented",
222
+ "description": "Riscos identificados com mitigacoes",
223
+ "type": "quality",
224
+ "required": false
225
+ }
226
+ ]
227
+ }
228
+ ```
229
+
230
+ ## Integracao com TypeScript
231
+
232
+ Esta skill invoca o handler TypeScript:
233
+
234
+ ```typescript
235
+ // src/presentation/skills/PhaseGateSkillHandler.ts
236
+
237
+ export class PhaseGateSkillHandler {
238
+ async handle(params: GateParams): Promise<GateResult> {
239
+ // 1. Carrega definicao do gate para a fase
240
+ // 2. Carrega estado do workflow
241
+ // 3. Avalia cada criterio
242
+ // 4. Agrega resultados
243
+ // 5. Retorna GateResult
244
+ }
245
+ }
246
+ ```
247
+
248
+ ## Comportamento Especial
249
+
250
+ ### Gate Parcial
251
+ Se alguns criterios passam mas outros nao:
252
+ - Retorna `passed: false`
253
+ - Lista criterios que passaram como evidencia de progresso
254
+ - Fornece guidance especifico para resolver blockers
255
+
256
+ ### Gate com Warnings
257
+ Se gate passa mas tem warnings:
258
+ - Retorna `passed: true`
259
+ - Inclui warnings no resultado
260
+ - Recomenda enderecamento antes de continuar
261
+
262
+ ### Re-avaliacao
263
+ Apos correcao de problemas:
264
+ - Pode re-avaliar mesmo gate
265
+ - Historico de avaliacoes mantido
266
+ - Mostra delta desde ultima avaliacao
267
+
268
+ ## Notas Importantes
269
+
270
+ 1. Gate **NAO** avanca fase automaticamente - apenas avalia
271
+ 2. Use MCP `advancePhase` apos gate passar
272
+ 3. Gates podem ser customizados por projeto via CONSTITUTION
273
+ 4. Criterios `required: false` geram warnings, nao bloqueiam
274
+ 5. Evidencias sao importantes para auditoria e rastreabilidade
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: release
3
+ description: Executa release oficial do Orchestrator via CI/CD. NUNCA faca bump manual de versao - sempre use esta skill.
4
+ allowed-tools: Read, Bash, Grep, Glob
5
+ ---
6
+
7
+ # Release Skill
8
+
9
+ ## REGRA CRITICA
10
+
11
+ **NUNCA faca bump de versao manualmente!**
12
+
13
+ - ❌ NUNCA edite `package.json` para alterar versao
14
+ - ❌ NUNCA crie tags git manualmente
15
+ - ❌ NUNCA faca `docker build` + `docker push` manual
16
+ - ✅ SEMPRE use esta skill para releases
17
+
18
+ Releases manuais causam dessincronizacao entre npm, Docker e package.json.
19
+
20
+ ## Descricao
21
+
22
+ Esta skill automatiza o processo de release do Orchestrator:
23
+
24
+ 1. Valida pre-requisitos (git clean, branch main)
25
+ 2. Calcula nova versao (patch/minor/major)
26
+ 3. Atualiza TODOS os arquivos de versao
27
+ 4. Cria commit e tag
28
+ 5. Push dispara CI/CD (npm publish + Docker build)
29
+
30
+ ## Arquivos Atualizados pelo Script
31
+
32
+ O script atualiza automaticamente:
33
+
34
+ - `package.json` (root)
35
+ - `packages/cli/package.json`
36
+ - `packages/mcp-server/package.json`
37
+ - `packages/sdk/package.json`
38
+ - `packages/cli/src/index.ts` (CLI_VERSION constant)
39
+ - `src/infrastructure/templates/base/package.json.hbs` (template versions)
40
+
41
+ ## Invocacao
42
+
43
+ ```
44
+ /release patch # 1.5.6 -> 1.5.7
45
+ /release minor # 1.5.6 -> 1.6.0
46
+ /release major # 1.5.6 -> 2.0.0
47
+ /release 2.0.0 # Versao explicita
48
+ ```
49
+
50
+ ## Parametros
51
+
52
+ | Parametro | Tipo | Obrigatorio | Descricao |
53
+ |-----------|------|-------------|-----------|
54
+ | `version` | string | Sim | patch, minor, major, ou x.y.z |
55
+ | `--dry-run` | flag | Nao | Mostra o que seria feito sem executar |
56
+ | `--force` | flag | Nao | Pula confirmacoes interativas |
57
+
58
+ ## Processo de Execucao
59
+
60
+ ### 1. Pre-verificacao
61
+
62
+ Antes de executar o script, verifique:
63
+
64
+ ```bash
65
+ # Working tree limpa?
66
+ git status
67
+
68
+ # Na branch main?
69
+ git branch --show-current
70
+
71
+ # Ultima tag?
72
+ git describe --tags --abbrev=0
73
+ ```
74
+
75
+ ### 2. Dry Run (Recomendado)
76
+
77
+ Sempre faca dry-run primeiro:
78
+
79
+ ```bash
80
+ ./scripts/release.sh --dry-run patch
81
+ ```
82
+
83
+ ### 3. Executar Release
84
+
85
+ ```bash
86
+ ./scripts/release.sh patch
87
+ ```
88
+
89
+ ### 4. Monitorar CI/CD
90
+
91
+ Apos o push, monitore o pipeline:
92
+ - GitHub Actions: https://github.com/orchestratorAII/orchestrator_claude/actions
93
+
94
+ ## Exemplos de Uso
95
+
96
+ ### Release de Patch (Bug Fix)
97
+
98
+ ```
99
+ User: "Faca release do fix que acabamos de fazer"
100
+
101
+ Claude:
102
+ 1. Verifico pre-requisitos
103
+ 2. Executo: ./scripts/release.sh --dry-run patch
104
+ 3. Confirmo com usuario
105
+ 4. Executo: ./scripts/release.sh patch
106
+ 5. Reporto URL do pipeline
107
+ ```
108
+
109
+ ### Release de Minor (Nova Feature)
110
+
111
+ ```
112
+ User: "Release da nova feature de dashboard"
113
+
114
+ Claude:
115
+ 1. Verifico CHANGELOG atualizado
116
+ 2. Executo: ./scripts/release.sh --dry-run minor
117
+ 3. Confirmo com usuario
118
+ 4. Executo: ./scripts/release.sh minor
119
+ ```
120
+
121
+ ### Release de Major (Breaking Change)
122
+
123
+ ```
124
+ User: "Precisamos fazer release 2.0.0"
125
+
126
+ Claude:
127
+ 1. Verifico CHANGELOG com breaking changes documentados
128
+ 2. Executo: ./scripts/release.sh --dry-run 2.0.0
129
+ 3. ALERTA sobre breaking changes
130
+ 4. Confirmo DUAS vezes com usuario
131
+ 5. Executo: ./scripts/release.sh 2.0.0
132
+ ```
133
+
134
+ ## Output Esperado
135
+
136
+ ```
137
+ ════════════════════════════════════════
138
+ Orchestrator Release Script
139
+ ════════════════════════════════════════
140
+
141
+ 🔍 Validating prerequisites...
142
+ ✅ All prerequisites satisfied
143
+ 🔍 Validating working tree...
144
+ ✅ Working tree is clean
145
+
146
+ Release Plan:
147
+ Current version: 1.5.6
148
+ New version: 1.5.7
149
+ Git tag: v1.5.7
150
+
151
+ ✅ Tag 'v1.5.7' is available
152
+
153
+ Files to update:
154
+ - package.json (root)
155
+ - packages/cli/package.json
156
+ - packages/mcp-server/package.json
157
+ - packages/sdk/package.json
158
+ - packages/cli/src/index.ts (CLI_VERSION)
159
+ - src/infrastructure/templates/base/package.json.hbs (templates)
160
+
161
+ Continue with release? (y/N): y
162
+
163
+ 📝 Updating versions to 1.5.7...
164
+ ✅ All versions updated to 1.5.7
165
+ ✅ Version bump committed
166
+ ✅ Tag created: v1.5.7
167
+ ⬆️ Pushing to remote...
168
+ ✅ Pushed main and tag v1.5.7
169
+
170
+ ════════════════════════════════════════
171
+ Release v1.5.7 initiated!
172
+ ════════════════════════════════════════
173
+
174
+ 🚀 CI/CD pipeline will now:
175
+ - Build and publish Docker image
176
+ - Publish npm packages
177
+
178
+ 📍 Monitor pipeline at:
179
+ https://github.com/orchestratorAII/orchestrator_claude/actions
180
+ ```
181
+
182
+ ## Troubleshooting
183
+
184
+ ### Working tree not clean
185
+
186
+ ```
187
+ ❌ Working tree is not clean
188
+ Please commit or stash your changes
189
+ ```
190
+
191
+ **Solucao:** Commit ou stash as mudancas pendentes antes do release.
192
+
193
+ ### Tag already exists
194
+
195
+ ```
196
+ ❌ Tag 'v1.5.7' already exists
197
+ ```
198
+
199
+ **Solucao:** Use uma versao diferente ou delete a tag existente (se foi erro).
200
+
201
+ ### Not on main branch
202
+
203
+ ```
204
+ ⚠️ You are on branch 'feature-x', not main
205
+ ```
206
+
207
+ **Solucao:** Merge para main primeiro, depois faca release.
208
+
209
+ ## Integracao com CI/CD
210
+
211
+ O push da tag dispara automaticamente:
212
+
213
+ 1. **GitHub Actions** (`release.yml`)
214
+ - Build e teste
215
+ - Publish npm packages
216
+ - Build e push Docker image
217
+
218
+ 2. **Versoes Sincronizadas**
219
+ - npm: @orchestrator-claude/cli
220
+ - npm: @orchestrator-claude/mcp-server
221
+ - npm: @orchestrator-claude/sdk
222
+ - Docker: orchestrator-api:vX.Y.Z
223
+
224
+ ## Notas Importantes
225
+
226
+ 1. **Sempre faca dry-run primeiro** para verificar mudancas
227
+ 2. **CHANGELOG deve estar atualizado** antes do release
228
+ 3. **CI/CD faz o publish** - nunca publique manualmente
229
+ 4. **Uma tag = uma versao** em todos os lugares
230
+ 5. **Major releases** requerem confirmacao extra
231
+
232
+ ## Checklist Pre-Release
233
+
234
+ - [ ] CHANGELOG.md atualizado com todas as mudancas
235
+ - [ ] Todos os testes passando (`npm test`)
236
+ - [ ] Build funcionando (`npm run build`)
237
+ - [ ] Working tree limpa
238
+ - [ ] Na branch main
239
+ - [ ] Dry-run executado e revisado