@orchestrator-claude/cli 3.0.1 → 3.1.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.
- package/README.md +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/base/CLAUDE.md.hbs +23 -17
- package/dist/templates/base/claude/agents/api-extractor.md +5 -25
- package/dist/templates/base/claude/agents/business-rule-miner.md +5 -33
- package/dist/templates/base/claude/agents/code-archaeologist.md +5 -46
- package/dist/templates/base/claude/agents/implementer.md +16 -69
- package/dist/templates/base/claude/agents/legacy-discoverer.md +9 -43
- package/dist/templates/base/claude/agents/legacy-synthesizer.md +7 -54
- package/dist/templates/base/claude/agents/orchestrator.md +4 -4
- package/dist/templates/base/claude/agents/planner.md +9 -38
- package/dist/templates/base/claude/agents/researcher.md +8 -37
- package/dist/templates/base/claude/agents/reviewer.md +15 -54
- package/dist/templates/base/claude/agents/schema-extractor.md +5 -26
- package/dist/templates/base/claude/agents/specifier.md +9 -38
- package/dist/templates/base/claude/agents/task-generator.md +12 -50
- package/package.json +3 -2
- package/templates/base/CLAUDE.md.hbs +23 -17
- package/templates/base/claude/agents/api-extractor.md +5 -25
- package/templates/base/claude/agents/business-rule-miner.md +5 -33
- package/templates/base/claude/agents/code-archaeologist.md +5 -46
- package/templates/base/claude/agents/implementer.md +16 -69
- package/templates/base/claude/agents/legacy-discoverer.md +9 -43
- package/templates/base/claude/agents/legacy-synthesizer.md +7 -54
- package/templates/base/claude/agents/orchestrator.md +4 -4
- package/templates/base/claude/agents/planner.md +9 -38
- package/templates/base/claude/agents/researcher.md +8 -37
- package/templates/base/claude/agents/reviewer.md +15 -54
- package/templates/base/claude/agents/schema-extractor.md +5 -26
- package/templates/base/claude/agents/specifier.md +9 -38
- package/templates/base/claude/agents/task-generator.md +12 -50
|
@@ -275,29 +275,11 @@ O artefato deve:
|
|
|
275
275
|
|
|
276
276
|
**ATENCAO:** Alem de gerar o artefato, voce DEVE manter a governanca do workflow.
|
|
277
277
|
|
|
278
|
-
### 1.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
{
|
|
284
|
-
"activeWorkflow": {
|
|
285
|
-
"currentPhase": "plan",
|
|
286
|
-
"status": "in_progress"
|
|
287
|
-
},
|
|
288
|
-
"artifacts": [
|
|
289
|
-
{
|
|
290
|
-
"id": "art-XXX",
|
|
291
|
-
"type": "plan",
|
|
292
|
-
"path": ".orchestrator/artifacts/plan/plan.md",
|
|
293
|
-
"status": "draft",
|
|
294
|
-
"createdAt": "{timestamp}",
|
|
295
|
-
"workflowId": "{workflowId}",
|
|
296
|
-
"phase": "plan"
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
```
|
|
278
|
+
### 1. Artifact Registration (automatic via MCP tools)
|
|
279
|
+
|
|
280
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
281
|
+
|
|
282
|
+
The CLI will use MCP tools to update workflow state in PostgreSQL after artifact storage.
|
|
301
283
|
|
|
302
284
|
### 2. Validar Artefato
|
|
303
285
|
|
|
@@ -321,28 +303,17 @@ Parametros:
|
|
|
321
303
|
- description: "Complete PLAN phase - [nome da feature]"
|
|
322
304
|
```
|
|
323
305
|
|
|
324
|
-
### 4.
|
|
306
|
+
### 4. Return Structured Output
|
|
325
307
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
```json
|
|
329
|
-
{
|
|
330
|
-
"gates": {
|
|
331
|
-
"plan": {
|
|
332
|
-
"passed": true,
|
|
333
|
-
"evaluatedAt": "{timestamp}"
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
```
|
|
308
|
+
Return structured output to the CLI for state update. The CLI will use MCP tools to update the phase gate in PostgreSQL.
|
|
338
309
|
|
|
339
310
|
### Checklist de Governanca (OBRIGATORIO)
|
|
340
311
|
|
|
341
312
|
Antes de considerar a fase PLAN finalizada:
|
|
342
313
|
|
|
343
314
|
- [ ] plan.md criado em .orchestrator/artifacts/plan/
|
|
344
|
-
- [ ]
|
|
315
|
+
- [ ] Structured output returned to CLI for state update
|
|
345
316
|
- [ ] Validacao executada via artifact-validator
|
|
346
317
|
- [ ] Status do artefato = "validated"
|
|
347
318
|
- [ ] Checkpoint criado via MCP
|
|
348
|
-
- [ ] Gate plan.passed = true
|
|
319
|
+
- [ ] Gate plan.passed = true (updated via CLI)
|
|
@@ -301,29 +301,11 @@ Limites de uso:
|
|
|
301
301
|
|
|
302
302
|
**ATENCAO:** Alem de gerar o artefato, voce DEVE manter a governanca do workflow.
|
|
303
303
|
|
|
304
|
-
### 1.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
{
|
|
310
|
-
"activeWorkflow": {
|
|
311
|
-
"currentPhase": "research",
|
|
312
|
-
"status": "in_progress"
|
|
313
|
-
},
|
|
314
|
-
"artifacts": [
|
|
315
|
-
{
|
|
316
|
-
"id": "art-XXX",
|
|
317
|
-
"type": "research",
|
|
318
|
-
"path": ".orchestrator/artifacts/research/research-context.md",
|
|
319
|
-
"status": "completed",
|
|
320
|
-
"createdAt": "{timestamp}",
|
|
321
|
-
"workflowId": "{workflowId}",
|
|
322
|
-
"phase": "research"
|
|
323
|
-
}
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
```
|
|
304
|
+
### 1. Artifact Registration (automatic via MCP tools)
|
|
305
|
+
|
|
306
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
307
|
+
|
|
308
|
+
The CLI will use MCP tools to update workflow state in PostgreSQL after artifact storage.
|
|
327
309
|
|
|
328
310
|
### 2. Criar Checkpoint (se pesquisa for significativa)
|
|
329
311
|
|
|
@@ -336,27 +318,16 @@ Parametros:
|
|
|
336
318
|
- description: "Complete RESEARCH phase - [topico pesquisado]"
|
|
337
319
|
```
|
|
338
320
|
|
|
339
|
-
### 3.
|
|
321
|
+
### 3. Return Structured Output
|
|
340
322
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
```json
|
|
344
|
-
{
|
|
345
|
-
"gates": {
|
|
346
|
-
"research": {
|
|
347
|
-
"passed": true,
|
|
348
|
-
"evaluatedAt": "{timestamp}"
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
323
|
+
Return structured output to the CLI for state update. The CLI will use MCP tools to update the phase gate in PostgreSQL if RESEARCH is an explicit workflow phase.
|
|
353
324
|
|
|
354
325
|
### Checklist de Governanca (OBRIGATORIO)
|
|
355
326
|
|
|
356
327
|
Antes de considerar a pesquisa finalizada:
|
|
357
328
|
|
|
358
329
|
- [ ] research-context.md criado em .orchestrator/artifacts/research/
|
|
359
|
-
- [ ]
|
|
330
|
+
- [ ] Structured output returned to CLI for state update
|
|
360
331
|
- [ ] Findings sao acionaveis e relevantes
|
|
361
332
|
- [ ] Sources documentadas
|
|
362
333
|
- [ ] Cache information registrada
|
|
@@ -361,62 +361,20 @@ Formato:
|
|
|
361
361
|
}
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
### 2.
|
|
364
|
+
### 2. Artifact Registration (automatic via MCP tools)
|
|
365
365
|
|
|
366
|
-
|
|
366
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
367
367
|
|
|
368
|
-
|
|
369
|
-
{
|
|
370
|
-
"artifacts": [
|
|
371
|
-
{
|
|
372
|
-
"id": "val-XXX",
|
|
373
|
-
"type": "validation_report",
|
|
374
|
-
"path": ".orchestrator/artifacts/{phase}/validation-report.json",
|
|
375
|
-
"status": "completed",
|
|
376
|
-
"createdAt": "{timestamp}",
|
|
377
|
-
"workflowId": "{workflowId}",
|
|
378
|
-
"phase": "{phase}"
|
|
379
|
-
}
|
|
380
|
-
]
|
|
381
|
-
}
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
### 3. Atualizar Status do Artefato Revisado
|
|
385
|
-
|
|
386
|
-
Se aprovado, atualize o status do artefato original:
|
|
387
|
-
|
|
388
|
-
```json
|
|
389
|
-
{
|
|
390
|
-
"artifacts": [
|
|
391
|
-
{
|
|
392
|
-
"id": "art-XXX",
|
|
393
|
-
"status": "validated", // era "draft"
|
|
394
|
-
"validatedAt": "{timestamp}",
|
|
395
|
-
"validationReport": "val-XXX"
|
|
396
|
-
}
|
|
397
|
-
]
|
|
398
|
-
}
|
|
399
|
-
```
|
|
368
|
+
### 3. Return Structured Output for Validation Status
|
|
400
369
|
|
|
401
|
-
|
|
370
|
+
Return structured output to the CLI indicating the validation result. The CLI will use MCP tools to:
|
|
371
|
+
- Update artifact status to "validated" in PostgreSQL
|
|
372
|
+
- Link validation report to original artifact
|
|
373
|
+
- Update phase gate if applicable
|
|
402
374
|
|
|
403
|
-
|
|
375
|
+
### 4. Comunicar Resultado ao Orchestrator
|
|
404
376
|
|
|
405
|
-
|
|
406
|
-
{
|
|
407
|
-
"gates": {
|
|
408
|
-
"{phase}": {
|
|
409
|
-
"passed": true, // ou false se rejeitado
|
|
410
|
-
"evaluatedAt": "{timestamp}",
|
|
411
|
-
"evaluatedBy": "reviewer-agent"
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### 5. Comunicar Resultado ao Orchestrator
|
|
418
|
-
|
|
419
|
-
Ao finalizar revisao, retorne status estruturado para o orchestrator:
|
|
377
|
+
Ao finalizar revisao, retorne status estruturado para o CLI:
|
|
420
378
|
|
|
421
379
|
```markdown
|
|
422
380
|
## Review Result
|
|
@@ -431,14 +389,17 @@ Ao finalizar revisao, retorne status estruturado para o orchestrator:
|
|
|
431
389
|
- Se REJECTED: Escalar para usuario
|
|
432
390
|
```
|
|
433
391
|
|
|
392
|
+
The CLI will handle updating PostgreSQL via MCP tools.
|
|
393
|
+
|
|
434
394
|
### Checklist de Governanca (OBRIGATORIO)
|
|
435
395
|
|
|
436
396
|
Antes de considerar a revisao finalizada:
|
|
437
397
|
|
|
438
398
|
- [ ] Todos os criterios de qualidade verificados
|
|
439
|
-
- [ ] Validation report criado
|
|
440
|
-
- [ ]
|
|
441
|
-
- [ ]
|
|
399
|
+
- [ ] Validation report criado
|
|
400
|
+
- [ ] Structured output returned to CLI for state update
|
|
401
|
+
- [ ] Status do artefato will be updated via CLI (validated/rejected)
|
|
402
|
+
- [ ] Gate da fase will be evaluated via CLI
|
|
442
403
|
- [ ] Resultado comunicado ao orchestrator
|
|
443
404
|
- [ ] Condicoes para aprovacao documentadas (se houver)
|
|
444
405
|
```
|
|
@@ -584,7 +584,7 @@ $posts = Post::with('user')->get();
|
|
|
584
584
|
4. MUST document column types and nullability
|
|
585
585
|
5. MUST generate database-schema.md using template
|
|
586
586
|
6. MUST include table catalog with all columns
|
|
587
|
-
7. MUST update
|
|
587
|
+
7. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
588
588
|
8. MUST create checkpoint after MAP phase fully complete (with api-extractor)
|
|
589
589
|
|
|
590
590
|
### MUST NOT (Forbidden)
|
|
@@ -650,30 +650,9 @@ After completing MAP phase (Database portion):
|
|
|
650
650
|
|
|
651
651
|
2. Validate Mermaid syntax (paste in Mermaid Live Editor or use CLI if available)
|
|
652
652
|
|
|
653
|
-
3.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
"activeWorkflow": {
|
|
657
|
-
"currentPhase": "map",
|
|
658
|
-
"status": "completed"
|
|
659
|
-
},
|
|
660
|
-
"artifacts": [
|
|
661
|
-
{
|
|
662
|
-
"id": "art-map-002",
|
|
663
|
-
"type": "database-schema",
|
|
664
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/database-schema.md",
|
|
665
|
-
"status": "completed",
|
|
666
|
-
"createdAt": "{timestamp}",
|
|
667
|
-
"phase": "map",
|
|
668
|
-
"format": "markdown-mermaid",
|
|
669
|
-
"validated": true,
|
|
670
|
-
"tableCount": 15,
|
|
671
|
-
"relationshipCount": 22,
|
|
672
|
-
"accuracyPercent": 95
|
|
673
|
-
}
|
|
674
|
-
]
|
|
675
|
-
}
|
|
676
|
-
```
|
|
653
|
+
3. Return structured output to CLI for state update:
|
|
654
|
+
|
|
655
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. The CLI will use MCP tools to update workflow state after artifact storage.
|
|
677
656
|
|
|
678
657
|
4. Create checkpoint (MANDATORY after MAP phase complete):
|
|
679
658
|
```
|
|
@@ -753,7 +732,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
753
732
|
- [ ] Junction tables identified for many-to-many
|
|
754
733
|
- [ ] Query patterns analyzed (if applicable)
|
|
755
734
|
- [ ] Artifact saved to correct path
|
|
756
|
-
- [ ]
|
|
735
|
+
- [ ] Structured output returned to CLI for state update
|
|
757
736
|
- [ ] Checkpoint created (after MAP phase complete)
|
|
758
737
|
|
|
759
738
|
**FORBIDDEN**: Claiming completion without valid Mermaid ER diagram.
|
|
@@ -258,29 +258,11 @@ O artefato deve:
|
|
|
258
258
|
|
|
259
259
|
**ATENCAO:** Alem de gerar o artefato, voce DEVE manter a governanca do workflow.
|
|
260
260
|
|
|
261
|
-
### 1.
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
{
|
|
267
|
-
"activeWorkflow": {
|
|
268
|
-
"currentPhase": "specify",
|
|
269
|
-
"status": "in_progress"
|
|
270
|
-
},
|
|
271
|
-
"artifacts": [
|
|
272
|
-
{
|
|
273
|
-
"id": "art-XXX",
|
|
274
|
-
"type": "specification",
|
|
275
|
-
"path": ".orchestrator/artifacts/specify/spec.md",
|
|
276
|
-
"status": "draft",
|
|
277
|
-
"createdAt": "{timestamp}",
|
|
278
|
-
"workflowId": "{workflowId}",
|
|
279
|
-
"phase": "specify"
|
|
280
|
-
}
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
```
|
|
261
|
+
### 1. Artifact Registration (automatic via MCP tools)
|
|
262
|
+
|
|
263
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
264
|
+
|
|
265
|
+
The CLI will use MCP tools to update workflow state in PostgreSQL after artifact storage.
|
|
284
266
|
|
|
285
267
|
### 2. Validar Artefato
|
|
286
268
|
|
|
@@ -304,28 +286,17 @@ Parametros:
|
|
|
304
286
|
- description: "Complete SPECIFY phase - [nome da feature]"
|
|
305
287
|
```
|
|
306
288
|
|
|
307
|
-
### 4.
|
|
289
|
+
### 4. Return Structured Output
|
|
308
290
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
```json
|
|
312
|
-
{
|
|
313
|
-
"gates": {
|
|
314
|
-
"specify": {
|
|
315
|
-
"passed": true,
|
|
316
|
-
"evaluatedAt": "{timestamp}"
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
```
|
|
291
|
+
Return structured output to the CLI for state update. The CLI will use MCP tools to update the phase gate in PostgreSQL.
|
|
321
292
|
|
|
322
293
|
### Checklist de Governanca (OBRIGATORIO)
|
|
323
294
|
|
|
324
295
|
Antes de considerar a fase SPECIFY finalizada:
|
|
325
296
|
|
|
326
297
|
- [ ] spec.md criado em .orchestrator/artifacts/specify/
|
|
327
|
-
- [ ]
|
|
298
|
+
- [ ] Structured output returned to CLI for state update
|
|
328
299
|
- [ ] Validacao executada via artifact-validator
|
|
329
300
|
- [ ] Status do artefato = "validated"
|
|
330
301
|
- [ ] Checkpoint criado via MCP
|
|
331
|
-
- [ ] Gate specify.passed = true
|
|
302
|
+
- [ ] Gate specify.passed = true (updated via CLI)
|
|
@@ -298,29 +298,11 @@ O artefato deve:
|
|
|
298
298
|
|
|
299
299
|
**ATENCAO:** Alem de gerar o artefato, voce DEVE manter a governanca do workflow.
|
|
300
300
|
|
|
301
|
-
### 1.
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
{
|
|
307
|
-
"activeWorkflow": {
|
|
308
|
-
"currentPhase": "tasks",
|
|
309
|
-
"status": "in_progress"
|
|
310
|
-
},
|
|
311
|
-
"artifacts": [
|
|
312
|
-
{
|
|
313
|
-
"id": "art-XXX",
|
|
314
|
-
"type": "tasks",
|
|
315
|
-
"path": ".orchestrator/artifacts/tasks/tasks.md",
|
|
316
|
-
"status": "draft",
|
|
317
|
-
"createdAt": "{timestamp}",
|
|
318
|
-
"workflowId": "{workflowId}",
|
|
319
|
-
"phase": "tasks"
|
|
320
|
-
}
|
|
321
|
-
]
|
|
322
|
-
}
|
|
323
|
-
```
|
|
301
|
+
### 1. Artifact Registration (automatic via MCP tools)
|
|
302
|
+
|
|
303
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
304
|
+
|
|
305
|
+
The CLI will use MCP tools to update workflow state in PostgreSQL after artifact storage.
|
|
324
306
|
|
|
325
307
|
### 2. Validar Artefato
|
|
326
308
|
|
|
@@ -344,39 +326,19 @@ Parametros:
|
|
|
344
326
|
- description: "Complete TASKS phase - [nome da feature]"
|
|
345
327
|
```
|
|
346
328
|
|
|
347
|
-
### 4.
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
```json
|
|
352
|
-
{
|
|
353
|
-
"gates": {
|
|
354
|
-
"tasks": {
|
|
355
|
-
"passed": true,
|
|
356
|
-
"evaluatedAt": "{timestamp}"
|
|
357
|
-
},
|
|
358
|
-
"implement": {
|
|
359
|
-
"passed": false,
|
|
360
|
-
"pending": true,
|
|
361
|
-
"requiresApproval": true
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
"activeWorkflow": {
|
|
365
|
-
"status": "awaiting_approval",
|
|
366
|
-
"nextPhase": "implement"
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
```
|
|
329
|
+
### 4. Return Structured Output for Human Approval
|
|
330
|
+
|
|
331
|
+
Return structured output to the CLI indicating that tasks phase is complete and human approval is required before IMPLEMENT. The CLI will use MCP tools to update workflow state in PostgreSQL to "awaiting_approval".
|
|
370
332
|
|
|
371
333
|
### Checklist de Governanca (OBRIGATORIO)
|
|
372
334
|
|
|
373
335
|
Antes de considerar a fase TASKS finalizada:
|
|
374
336
|
|
|
375
337
|
- [ ] tasks.md criado em .orchestrator/artifacts/tasks/
|
|
376
|
-
- [ ]
|
|
338
|
+
- [ ] Structured output returned to CLI for state update
|
|
377
339
|
- [ ] Validacao executada via artifact-validator
|
|
378
340
|
- [ ] Status do artefato = "validated"
|
|
379
341
|
- [ ] Checkpoint criado via MCP
|
|
380
|
-
- [ ] Gate tasks.passed = true
|
|
381
|
-
- [ ] Gate implement.requiresApproval = true (
|
|
382
|
-
- [ ] Status do workflow = "awaiting_approval"
|
|
342
|
+
- [ ] Gate tasks.passed = true (updated via CLI)
|
|
343
|
+
- [ ] Gate implement.requiresApproval = true (set via CLI)
|
|
344
|
+
- [ ] Status do workflow = "awaiting_approval" (set via CLI)
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchestrator-claude/cli",
|
|
3
|
-
"version": "3.0
|
|
4
|
-
"
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"deprecated": "Use orchestrator MCP server directly. See RFC-014.",
|
|
5
|
+
"description": "Orchestrator CLI - Thin Client (DEPRECATED)",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"bin": {
|
|
@@ -153,12 +153,14 @@ RESEARCH (optional)
|
|
|
153
153
|
IMPLEMENT
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
Each phase produces artifacts in
|
|
157
|
-
- `research
|
|
158
|
-
- `specify
|
|
159
|
-
- `plan
|
|
160
|
-
- `tasks
|
|
161
|
-
- `implement
|
|
156
|
+
Each phase produces artifacts stored in MinIO (object storage) and tracked in PostgreSQL:
|
|
157
|
+
- `research` - Research context documents
|
|
158
|
+
- `specify` - Specifications (spec.md)
|
|
159
|
+
- `plan` - Technical plans (plan.md)
|
|
160
|
+
- `tasks` - Task backlogs (tasks.md)
|
|
161
|
+
- `implement` - Implementation reports
|
|
162
|
+
|
|
163
|
+
**CRITICAL**: Artifacts are accessed via MCP tools (`artifactStore`, `artifactRetrieve`), NOT via filesystem paths. The `.orchestrator/artifacts/` directory does NOT exist on the filesystem.
|
|
162
164
|
|
|
163
165
|
---
|
|
164
166
|
|
|
@@ -302,7 +304,6 @@ When user approves implementation with ANY of these phrases:
|
|
|
302
304
|
Requirements:
|
|
303
305
|
- Follow TDD (write tests BEFORE implementation)
|
|
304
306
|
- Maintain 80% minimum coverage
|
|
305
|
-
- Update orchestrator-index.json after EACH task
|
|
306
307
|
- Create checkpoint after every 3-5 tasks
|
|
307
308
|
- Generate implementation-report.md at the end
|
|
308
309
|
```
|
|
@@ -312,7 +313,7 @@ When user approves implementation with ANY of these phrases:
|
|
|
312
313
|
- Using Edit/Write tools directly for code implementation
|
|
313
314
|
- Skipping Task tool invocation
|
|
314
315
|
- Writing production code without implementer agent
|
|
315
|
-
-
|
|
316
|
+
- Editing `.orchestrator/orchestrator-index.json` directly (state is in PostgreSQL)
|
|
316
317
|
|
|
317
318
|
### Self-Verification Checklist
|
|
318
319
|
|
|
@@ -334,19 +335,24 @@ If ANY answer is NO -> STOP and correct before continuing.
|
|
|
334
335
|
- **Clean Architecture**: Dependencies point inward
|
|
335
336
|
- **TypeScript Strict**: `strict: true` required
|
|
336
337
|
|
|
337
|
-
##
|
|
338
|
+
## State Management
|
|
338
339
|
|
|
339
340
|
```
|
|
340
|
-
|
|
341
|
-
├──
|
|
342
|
-
├──
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
└──
|
|
341
|
+
PostgreSQL (Single Source of Truth):
|
|
342
|
+
├── workflows # Workflow state, pending actions, phases
|
|
343
|
+
├── artifacts # Artifact metadata
|
|
344
|
+
├── checkpoints # Checkpoint metadata
|
|
345
|
+
└── agent_invocations # Agent invocation history
|
|
346
|
+
|
|
347
|
+
MinIO (Object Storage):
|
|
348
|
+
└── artifacts/ # Generated artifact content by phase
|
|
349
|
+
|
|
350
|
+
.orchestrator/ (DEPRECATED - do NOT read or write directly):
|
|
351
|
+
└── orchestrator-index.json # DEPRECATED: state is in PostgreSQL
|
|
348
352
|
```
|
|
349
353
|
|
|
354
|
+
**CRITICAL**: All workflow state is in PostgreSQL. All artifact content is in MinIO. Access everything through MCP tools. NEVER edit `.orchestrator/orchestrator-index.json` directly.
|
|
355
|
+
|
|
350
356
|
## Important Notes
|
|
351
357
|
|
|
352
358
|
1. **Always start with workflow detection** - Don't skip this step
|
|
@@ -452,7 +452,7 @@ tags:
|
|
|
452
452
|
4. MUST identify and document authentication requirements
|
|
453
453
|
5. MUST group endpoints by tags/resources logically
|
|
454
454
|
6. MUST include at least one example per endpoint (request or response)
|
|
455
|
-
7. MUST update
|
|
455
|
+
7. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
456
456
|
8. MUST create checkpoint after MAP phase complete
|
|
457
457
|
|
|
458
458
|
### MUST NOT (Forbidden)
|
|
@@ -518,29 +518,9 @@ After completing MAP phase (API portion):
|
|
|
518
518
|
|
|
519
519
|
2. Validate OpenAPI 3.0 compliance (if swagger-cli available)
|
|
520
520
|
|
|
521
|
-
3.
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
"activeWorkflow": {
|
|
525
|
-
"currentPhase": "map",
|
|
526
|
-
"status": "in_progress"
|
|
527
|
-
},
|
|
528
|
-
"artifacts": [
|
|
529
|
-
{
|
|
530
|
-
"id": "art-map-001",
|
|
531
|
-
"type": "api-spec",
|
|
532
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/api-spec.yaml",
|
|
533
|
-
"status": "completed",
|
|
534
|
-
"createdAt": "{timestamp}",
|
|
535
|
-
"phase": "map",
|
|
536
|
-
"format": "openapi-3.0",
|
|
537
|
-
"validated": true,
|
|
538
|
-
"endpointCount": 45,
|
|
539
|
-
"coveragePercent": 92
|
|
540
|
-
}
|
|
541
|
-
]
|
|
542
|
-
}
|
|
543
|
-
```
|
|
521
|
+
3. Return structured output to CLI for state update:
|
|
522
|
+
|
|
523
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. The CLI will use MCP tools to update workflow state after artifact storage.
|
|
544
524
|
|
|
545
525
|
4. MUST NOT create checkpoint yet (wait for schema-extractor to complete MAP phase)
|
|
546
526
|
|
|
@@ -652,7 +632,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
652
632
|
- [ ] At least one example per endpoint
|
|
653
633
|
- [ ] No sensitive data in examples
|
|
654
634
|
- [ ] Artifact saved to correct path
|
|
655
|
-
- [ ]
|
|
635
|
+
- [ ] Structured output returned to CLI for state update
|
|
656
636
|
|
|
657
637
|
**FORBIDDEN**: Claiming completion without generating valid OpenAPI 3.0 spec.
|
|
658
638
|
|
|
@@ -609,7 +609,7 @@ stateDiagram-v2
|
|
|
609
609
|
4. MUST categorize rules by domain
|
|
610
610
|
5. MUST generate business-rules.md using template
|
|
611
611
|
6. MUST assign unique IDs to business rules (BR-DOMAIN-###)
|
|
612
|
-
7. MUST update
|
|
612
|
+
7. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
613
613
|
8. MUST create checkpoint after DOCUMENT phase complete
|
|
614
614
|
|
|
615
615
|
### MUST NOT (Forbidden)
|
|
@@ -665,37 +665,9 @@ After completing DOCUMENT phase:
|
|
|
665
665
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/business-rules.md`
|
|
666
666
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/glossary.md`
|
|
667
667
|
|
|
668
|
-
2.
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
"activeWorkflow": {
|
|
672
|
-
"currentPhase": "document",
|
|
673
|
-
"status": "completed"
|
|
674
|
-
},
|
|
675
|
-
"artifacts": [
|
|
676
|
-
{
|
|
677
|
-
"id": "art-document-001",
|
|
678
|
-
"type": "business-rules",
|
|
679
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/business-rules.md",
|
|
680
|
-
"status": "completed",
|
|
681
|
-
"createdAt": "{timestamp}",
|
|
682
|
-
"phase": "document",
|
|
683
|
-
"rulesExtracted": 87,
|
|
684
|
-
"domains": 5,
|
|
685
|
-
"stateMachines": 4
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
"id": "art-document-002",
|
|
689
|
-
"type": "glossary",
|
|
690
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/glossary.md",
|
|
691
|
-
"status": "completed",
|
|
692
|
-
"createdAt": "{timestamp}",
|
|
693
|
-
"phase": "document",
|
|
694
|
-
"termsCount": 25
|
|
695
|
-
}
|
|
696
|
-
]
|
|
697
|
-
}
|
|
698
|
-
```
|
|
668
|
+
2. Return structured output to CLI for state update:
|
|
669
|
+
|
|
670
|
+
Artifacts are automatically registered in PostgreSQL when stored via MCP `artifactStore` tool. The CLI will use MCP tools to update workflow state after artifact storage.
|
|
699
671
|
|
|
700
672
|
3. Create checkpoint (MANDATORY after DOCUMENT phase):
|
|
701
673
|
```
|
|
@@ -720,7 +692,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
720
692
|
- [ ] glossary.md generated (if applicable)
|
|
721
693
|
- [ ] Unique IDs assigned (BR-DOMAIN-###)
|
|
722
694
|
- [ ] Artifacts saved to correct paths
|
|
723
|
-
- [ ]
|
|
695
|
+
- [ ] Structured output returned to CLI for state update
|
|
724
696
|
- [ ] Checkpoint created
|
|
725
697
|
|
|
726
698
|
**FORBIDDEN**: Claiming completion without file:line locations.
|