@orchestrator-claude/cli 3.0.2 → 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
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# @orchestrator-claude/cli
|
|
2
2
|
|
|
3
|
+
> **DEPRECATED**: This package is deprecated since RFC-014. All orchestration
|
|
4
|
+
> logic now runs through MCP tools backed by PostgreSQL/MinIO. The thin-client
|
|
5
|
+
> CLI is no longer maintained. Use the orchestrator MCP server directly via
|
|
6
|
+
> Claude Code hooks and skills instead.
|
|
7
|
+
|
|
3
8
|
**Orchestrator CLI - True Thin Client**
|
|
4
9
|
|
|
5
10
|
This is the thin client CLI for the Orchestrator system. It contains only HTTP client logic and bundled templates, with all business logic running in a Docker container.
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -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.
|
|
@@ -496,7 +496,7 @@ Se ferramenta nao instalada: SKIP (nao e blocker)
|
|
|
496
496
|
4. MUST sanitize ALL secrets in outputs (replace with `***REDACTED***`)
|
|
497
497
|
5. MUST classify findings by severity (CRITICAL/HIGH/MEDIUM/LOW)
|
|
498
498
|
6. MUST generate all 3 artifacts (analysis-report, dead-code-report, tech-debt)
|
|
499
|
-
7. MUST update
|
|
499
|
+
7. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
500
500
|
8. MUST create checkpoint after analysis complete
|
|
501
501
|
|
|
502
502
|
### MUST NOT (Forbidden)
|
|
@@ -561,50 +561,9 @@ After completing ANALYZE phase:
|
|
|
561
561
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/dead-code-report.md`
|
|
562
562
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/tech-debt.md`
|
|
563
563
|
|
|
564
|
-
2.
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
"activeWorkflow": {
|
|
568
|
-
"currentPhase": "analyze",
|
|
569
|
-
"status": "completed"
|
|
570
|
-
},
|
|
571
|
-
"artifacts": [
|
|
572
|
-
{
|
|
573
|
-
"id": "art-analyze-001",
|
|
574
|
-
"type": "analysis-report",
|
|
575
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/analysis-report.md",
|
|
576
|
-
"status": "completed",
|
|
577
|
-
"createdAt": "{timestamp}",
|
|
578
|
-
"phase": "analyze",
|
|
579
|
-
"findingsCount": {
|
|
580
|
-
"critical": 2,
|
|
581
|
-
"high": 8,
|
|
582
|
-
"medium": 15,
|
|
583
|
-
"low": 23
|
|
584
|
-
}
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"id": "art-analyze-002",
|
|
588
|
-
"type": "dead-code-report",
|
|
589
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/dead-code-report.md",
|
|
590
|
-
"status": "completed",
|
|
591
|
-
"createdAt": "{timestamp}",
|
|
592
|
-
"phase": "analyze",
|
|
593
|
-
"deadCodeLOC": 12450,
|
|
594
|
-
"percentageOfCodebase": 23
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"id": "art-analyze-003",
|
|
598
|
-
"type": "tech-debt",
|
|
599
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/tech-debt.md",
|
|
600
|
-
"status": "completed",
|
|
601
|
-
"createdAt": "{timestamp}",
|
|
602
|
-
"phase": "analyze",
|
|
603
|
-
"estimatedEffort": "320h"
|
|
604
|
-
}
|
|
605
|
-
]
|
|
606
|
-
}
|
|
607
|
-
```
|
|
564
|
+
2. Return structured output to CLI for state update:
|
|
565
|
+
|
|
566
|
+
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.
|
|
608
567
|
|
|
609
568
|
3. Create checkpoint (MANDATORY after ANALYZE):
|
|
610
569
|
```
|
|
@@ -701,7 +660,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
701
660
|
- [ ] tech-debt.md generated using template
|
|
702
661
|
- [ ] All findings classified by severity
|
|
703
662
|
- [ ] All artifacts saved to correct paths
|
|
704
|
-
- [ ]
|
|
663
|
+
- [ ] Structured output returned to CLI for state update
|
|
705
664
|
- [ ] Checkpoint created
|
|
706
665
|
|
|
707
666
|
**FORBIDDEN**: Claiming completion without generating all 3 artifacts.
|
|
@@ -303,23 +303,9 @@ npm run build # PASSOU
|
|
|
303
303
|
|
|
304
304
|
**ATENCAO:** Alem de implementar codigo, voce DEVE manter a governanca do workflow.
|
|
305
305
|
|
|
306
|
-
### 1.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
```json
|
|
311
|
-
{
|
|
312
|
-
"activeWorkflow": {
|
|
313
|
-
"currentPhase": "implement",
|
|
314
|
-
"status": "in_progress"
|
|
315
|
-
},
|
|
316
|
-
"implementation": {
|
|
317
|
-
"completedTasks": [/* IDs das tasks completas */],
|
|
318
|
-
"currentTask": "TASK-XXX",
|
|
319
|
-
"progress": "X/Y tasks"
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
```
|
|
306
|
+
### 1. Return Structured Output for Task Progress
|
|
307
|
+
|
|
308
|
+
After **EACH TASK** completed, return structured output to the CLI with task completion status. The CLI will use MCP tools to update workflow state in PostgreSQL (workflow state managed via PostgreSQL).
|
|
323
309
|
|
|
324
310
|
### 2. Criar Checkpoints
|
|
325
311
|
|
|
@@ -334,8 +320,7 @@ Parametros:
|
|
|
334
320
|
|
|
335
321
|
### 3. Gerar implementation-report.md
|
|
336
322
|
|
|
337
|
-
Ao **FINALIZAR TODAS AS TAREFAS**, crie o artefato
|
|
338
|
-
`.orchestrator/artifacts/implement/implementation-report.md`
|
|
323
|
+
Ao **FINALIZAR TODAS AS TAREFAS**, crie o artefato e persista via MCP tool `artifactStore` (phase: implement).
|
|
339
324
|
|
|
340
325
|
Formato obrigatorio:
|
|
341
326
|
```markdown
|
|
@@ -381,66 +366,28 @@ Validacao:
|
|
|
381
366
|
- [ ] Build sem erros
|
|
382
367
|
```
|
|
383
368
|
|
|
384
|
-
### 4.
|
|
385
|
-
|
|
386
|
-
Adicione o artefato ao array `artifacts`:
|
|
387
|
-
|
|
388
|
-
```json
|
|
389
|
-
{
|
|
390
|
-
"artifacts": [
|
|
391
|
-
{
|
|
392
|
-
"id": "art-XXX",
|
|
393
|
-
"type": "implementation",
|
|
394
|
-
"path": ".orchestrator/artifacts/implement/implementation-report.md",
|
|
395
|
-
"status": "completed",
|
|
396
|
-
"createdAt": "{timestamp}",
|
|
397
|
-
"workflowId": "{workflowId}",
|
|
398
|
-
"phase": "implement"
|
|
399
|
-
}
|
|
400
|
-
]
|
|
401
|
-
}
|
|
402
|
-
```
|
|
369
|
+
### 4. Artifact Registration (automatic via MCP tools)
|
|
403
370
|
|
|
404
|
-
|
|
371
|
+
**Note**: The artifact will be automatically registered in PostgreSQL by the domain layer when you use `artifactStore`. Sub-agents MUST NOT edit `.orchestrator/orchestrator-index.json` directly.
|
|
405
372
|
|
|
406
|
-
|
|
373
|
+
### 5. Return Structured Output for Final State
|
|
407
374
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
"passed": true,
|
|
413
|
-
"evaluatedAt": "{timestamp}"
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
### 6. Atualizar Status Final
|
|
420
|
-
|
|
421
|
-
Ao completar TODAS as tarefas:
|
|
422
|
-
|
|
423
|
-
```json
|
|
424
|
-
{
|
|
425
|
-
"activeWorkflow": {
|
|
426
|
-
"currentPhase": "completed",
|
|
427
|
-
"status": "completed",
|
|
428
|
-
"completedAt": "{timestamp}"
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
```
|
|
375
|
+
Ao finalizar todas as tarefas, return structured output to the CLI indicating completion. The CLI will use MCP tools to update workflow state in PostgreSQL:
|
|
376
|
+
- Phase gate: implement.passed = true
|
|
377
|
+
- Workflow status: "completed"
|
|
378
|
+
- Completion timestamp
|
|
432
379
|
|
|
433
380
|
### Checklist de Governanca (OBRIGATORIO)
|
|
434
381
|
|
|
435
382
|
Antes de considerar a fase IMPLEMENT finalizada:
|
|
436
383
|
|
|
437
384
|
- [ ] Todas as tarefas do tasks.md implementadas
|
|
438
|
-
- [ ]
|
|
385
|
+
- [ ] Structured output returned to CLI for state update
|
|
439
386
|
- [ ] Checkpoints criados a cada grupo de tarefas
|
|
440
|
-
- [ ] implementation-report.md
|
|
441
|
-
- [ ] Artefato registrado em
|
|
442
|
-
- [ ] Gate implement.passed = true
|
|
443
|
-
- [ ] Status do workflow = "completed"
|
|
387
|
+
- [ ] implementation-report.md persistido via MCP tool `artifactStore`
|
|
388
|
+
- [ ] Artefato automaticamente registrado em PostgreSQL pelo domain layer
|
|
389
|
+
- [ ] Gate implement.passed = true (updated via CLI)
|
|
390
|
+
- [ ] Status do workflow = "completed" (updated via CLI)
|
|
444
391
|
- [ ] Testes passando (npm run test)
|
|
445
392
|
- [ ] Coverage >= 80% (npm run test:coverage)
|
|
446
393
|
- [ ] Build sem erros (npm run build)
|
|
@@ -364,7 +364,7 @@ LOW:
|
|
|
364
364
|
4. MUST generate inventory.json validated against schema
|
|
365
365
|
5. MUST sanitize secrets in all outputs (replace with `***REDACTED***`)
|
|
366
366
|
6. MUST catalog >= 95% of assets vs reality (if pattern set is good)
|
|
367
|
-
7. MUST update
|
|
367
|
+
7. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
368
368
|
8. MUST classify findings by severity (CRITICAL/HIGH/MEDIUM/LOW)
|
|
369
369
|
|
|
370
370
|
### MUST NOT (Forbidden)
|
|
@@ -424,25 +424,9 @@ After completing DISCOVER phase:
|
|
|
424
424
|
1. Save discovery-report.md to:
|
|
425
425
|
`.orchestrator/artifacts/legacy-analysis/{workflowId}/discovery-report.md`
|
|
426
426
|
|
|
427
|
-
2.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
"activeWorkflow": {
|
|
431
|
-
"currentPhase": "discover",
|
|
432
|
-
"status": "completed"
|
|
433
|
-
},
|
|
434
|
-
"artifacts": [
|
|
435
|
-
{
|
|
436
|
-
"id": "art-discover-001",
|
|
437
|
-
"type": "discovery-report",
|
|
438
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/discovery-report.md",
|
|
439
|
-
"status": "completed",
|
|
440
|
-
"createdAt": "{timestamp}",
|
|
441
|
-
"phase": "discover"
|
|
442
|
-
}
|
|
443
|
-
]
|
|
444
|
-
}
|
|
445
|
-
```
|
|
427
|
+
2. Return structured output to CLI for state update:
|
|
428
|
+
|
|
429
|
+
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.
|
|
446
430
|
|
|
447
431
|
After completing INVENTORY phase:
|
|
448
432
|
|
|
@@ -452,27 +436,9 @@ After completing INVENTORY phase:
|
|
|
452
436
|
2. Validate against schema:
|
|
453
437
|
`.orchestrator/templates/legacy/inventory.json.schema`
|
|
454
438
|
|
|
455
|
-
3.
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
"activeWorkflow": {
|
|
459
|
-
"currentPhase": "inventory",
|
|
460
|
-
"status": "completed"
|
|
461
|
-
},
|
|
462
|
-
"artifacts": [
|
|
463
|
-
{
|
|
464
|
-
"id": "art-inventory-001",
|
|
465
|
-
"type": "inventory",
|
|
466
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/inventory.json",
|
|
467
|
-
"status": "completed",
|
|
468
|
-
"createdAt": "{timestamp}",
|
|
469
|
-
"phase": "inventory",
|
|
470
|
-
"validated": true,
|
|
471
|
-
"schema": ".orchestrator/templates/legacy/inventory.json.schema"
|
|
472
|
-
}
|
|
473
|
-
]
|
|
474
|
-
}
|
|
475
|
-
```
|
|
439
|
+
3. Return structured output to CLI for state update:
|
|
440
|
+
|
|
441
|
+
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.
|
|
476
442
|
|
|
477
443
|
4. Create checkpoint (MANDATORY after INVENTORY):
|
|
478
444
|
```
|
|
@@ -554,7 +520,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
554
520
|
- [ ] Red flags classified by severity
|
|
555
521
|
- [ ] Secrets sanitized (if any found)
|
|
556
522
|
- [ ] Artifact saved to correct path
|
|
557
|
-
- [ ]
|
|
523
|
+
- [ ] Structured output returned to CLI for state update
|
|
558
524
|
|
|
559
525
|
### INVENTORY Phase Checklist
|
|
560
526
|
|
|
@@ -564,7 +530,7 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
564
530
|
- [ ] >= 95% asset coverage vs reality
|
|
565
531
|
- [ ] JSON is valid and parseable
|
|
566
532
|
- [ ] Artifact saved to correct path
|
|
567
|
-
- [ ]
|
|
533
|
+
- [ ] Structured output returned to CLI for state update
|
|
568
534
|
- [ ] Checkpoint created
|
|
569
535
|
|
|
570
536
|
**FORBIDDEN**: Claiming completion without evidence.
|
|
@@ -959,7 +959,7 @@ This analysis followed the **RFC-004 Legacy Analysis Workflow** with 6 phases:
|
|
|
959
959
|
5. MUST identify quick wins (high impact, low effort)
|
|
960
960
|
6. MUST document risks with probability, impact, and mitigations
|
|
961
961
|
7. MUST generate all 3 final artifacts (migration-roadmap, architecture-proposal, final-report)
|
|
962
|
-
8. MUST update
|
|
962
|
+
8. MUST return structured output to CLI for state update (workflow state managed via PostgreSQL)
|
|
963
963
|
9. MUST create final checkpoint after RECOMMEND phase complete
|
|
964
964
|
|
|
965
965
|
### MUST NOT (Forbidden)
|
|
@@ -1003,48 +1003,9 @@ After completing RECOMMEND phase:
|
|
|
1003
1003
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/architecture-proposal.md`
|
|
1004
1004
|
- `.orchestrator/artifacts/legacy-analysis/{workflowId}/final-report.md`
|
|
1005
1005
|
|
|
1006
|
-
2.
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
"activeWorkflow": {
|
|
1010
|
-
"currentPhase": "recommend",
|
|
1011
|
-
"status": "completed",
|
|
1012
|
-
"completedAt": "{timestamp}"
|
|
1013
|
-
},
|
|
1014
|
-
"artifacts": [
|
|
1015
|
-
{
|
|
1016
|
-
"id": "art-recommend-001",
|
|
1017
|
-
"type": "migration-roadmap",
|
|
1018
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/migration-roadmap.md",
|
|
1019
|
-
"status": "completed",
|
|
1020
|
-
"createdAt": "{timestamp}",
|
|
1021
|
-
"phase": "recommend",
|
|
1022
|
-
"strategy": "strangler-fig",
|
|
1023
|
-
"totalEffort": "1020-1530h",
|
|
1024
|
-
"phases": 7
|
|
1025
|
-
},
|
|
1026
|
-
{
|
|
1027
|
-
"id": "art-recommend-002",
|
|
1028
|
-
"type": "architecture-proposal",
|
|
1029
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/architecture-proposal.md",
|
|
1030
|
-
"status": "completed",
|
|
1031
|
-
"createdAt": "{timestamp}",
|
|
1032
|
-
"phase": "recommend",
|
|
1033
|
-
"targetArchitecture": "modular-monolith"
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
"id": "art-recommend-003",
|
|
1037
|
-
"type": "final-report",
|
|
1038
|
-
"path": ".orchestrator/artifacts/legacy-analysis/{workflowId}/final-report.md",
|
|
1039
|
-
"status": "completed",
|
|
1040
|
-
"createdAt": "{timestamp}",
|
|
1041
|
-
"phase": "recommend",
|
|
1042
|
-
"totalArtifacts": 12,
|
|
1043
|
-
"totalIssues": 48
|
|
1044
|
-
}
|
|
1045
|
-
]
|
|
1046
|
-
}
|
|
1047
|
-
```
|
|
1006
|
+
2. Return structured output to CLI for state update:
|
|
1007
|
+
|
|
1008
|
+
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.
|
|
1048
1009
|
|
|
1049
1010
|
3. Create final checkpoint (MANDATORY):
|
|
1050
1011
|
```
|
|
@@ -1054,15 +1015,7 @@ After completing RECOMMEND phase:
|
|
|
1054
1015
|
- description: "Complete RECOMMEND phase - {strategy} strategy, {X} phases, {Y}h effort"
|
|
1055
1016
|
```
|
|
1056
1017
|
|
|
1057
|
-
4.
|
|
1058
|
-
```json
|
|
1059
|
-
{
|
|
1060
|
-
"activeWorkflow": {
|
|
1061
|
-
"status": "completed",
|
|
1062
|
-
"completedAt": "{timestamp}"
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
```
|
|
1018
|
+
4. CLI will mark workflow as completed via MCP tools → PostgreSQL
|
|
1066
1019
|
|
|
1067
1020
|
## Verification Before Completion
|
|
1068
1021
|
|
|
@@ -1082,9 +1035,9 @@ Before claiming phase complete, MUST provide evidence:
|
|
|
1082
1035
|
- [ ] architecture-proposal.md generated
|
|
1083
1036
|
- [ ] final-report.md generated using template
|
|
1084
1037
|
- [ ] All 3 artifacts saved to correct paths
|
|
1085
|
-
- [ ]
|
|
1038
|
+
- [ ] Structured output returned to CLI for state update
|
|
1086
1039
|
- [ ] Final checkpoint created
|
|
1087
|
-
- [ ] Workflow marked as completed
|
|
1040
|
+
- [ ] Workflow marked as completed (via CLI)
|
|
1088
1041
|
|
|
1089
1042
|
**FORBIDDEN**: Claiming completion without reading ALL artifacts or generating ALL 3 final artifacts.
|
|
1090
1043
|
|
|
@@ -83,12 +83,12 @@ The role: **Choose actions using MCP tools, delegate artifact creation to specia
|
|
|
83
83
|
**CRITICAL: Violating these rules breaks checkpoints, metrics, and recovery.**
|
|
84
84
|
|
|
85
85
|
You MUST NOT:
|
|
86
|
-
- Use Edit/Write tools on
|
|
86
|
+
- Use Edit/Write tools on `.orchestrator/orchestrator-index.json` (workflow state managed via PostgreSQL)
|
|
87
87
|
- Use Edit/Write tools to create artifacts (subagents create them)
|
|
88
88
|
- Spawn subagents internally via Task tool (use executeAction instead)
|
|
89
89
|
- Execute multiple phases in a single invocation
|
|
90
90
|
- Skip MCP tools for "efficiency"
|
|
91
|
-
-
|
|
91
|
+
- Attempt to manually update workflow state (MCP tools → REST API → PostgreSQL)
|
|
92
92
|
|
|
93
93
|
**WHY:** The deterministic layer (MCP tools) triggers:
|
|
94
94
|
- Auto-checkpoints after artifact approval
|
|
@@ -111,7 +111,7 @@ getContext() → executeAction("advance_to_specify") → RETURN
|
|
|
111
111
|
getContext() → executeAction("advance_to_specify") → Task(specifier) ← WRONG!
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
The CLI reads `pendingAction`
|
|
114
|
+
The CLI reads `pendingAction` via MCP tools (PostgreSQL) and invokes the appropriate agent. Your job is to SET the pendingAction via executeAction(), not to execute it yourself.
|
|
115
115
|
|
|
116
116
|
## Example Flow
|
|
117
117
|
|
|
@@ -124,7 +124,7 @@ User: "Create OAuth2 API"
|
|
|
124
124
|
5. **RETURN** ← You stop here! CLI handles the rest.
|
|
125
125
|
|
|
126
126
|
**What happens next (NOT your responsibility):**
|
|
127
|
-
- CLI reads pendingAction
|
|
127
|
+
- CLI reads pendingAction via MCP tools (PostgreSQL)
|
|
128
128
|
- CLI invokes specifier agent
|
|
129
129
|
- Specifier creates spec.md
|
|
130
130
|
- CLI invokes orchestrator again for next phase
|