@orchestrator-claude/cli 1.7.2 → 1.7.3
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/base/.orchestrator/patterns/legacy/README.md +360 -0
- package/dist/templates/base/.orchestrator/patterns/legacy/php/laravel.patterns.json +396 -0
- package/dist/templates/base/.orchestrator/templates/legacy/README.md +296 -0
- package/dist/templates/base/.orchestrator/templates/legacy/analysis-report.md.hbs +342 -0
- package/dist/templates/base/.orchestrator/templates/legacy/api-spec.yaml.hbs +263 -0
- package/dist/templates/base/.orchestrator/templates/legacy/business-rules.md.hbs +449 -0
- package/dist/templates/base/.orchestrator/templates/legacy/database-schema.md.hbs +356 -0
- package/dist/templates/base/.orchestrator/templates/legacy/dead-code-report.md.hbs +330 -0
- package/dist/templates/base/.orchestrator/templates/legacy/discovery-report.md.hbs +267 -0
- package/dist/templates/base/.orchestrator/templates/legacy/final-report.md.hbs +451 -0
- package/dist/templates/base/.orchestrator/templates/legacy/inventory.json.schema +346 -0
- package/dist/templates/base/.orchestrator/templates/legacy/migration-roadmap.md.hbs +571 -0
- package/dist/templates/base/.orchestrator/templates/legacy/tech-debt.md.hbs +412 -0
- package/dist/templates/base/claude/agents/api-extractor.md +665 -0
- package/dist/templates/base/claude/agents/business-rule-miner.md +734 -0
- package/dist/templates/base/claude/agents/code-archaeologist.md +715 -0
- package/dist/templates/base/claude/agents/legacy-discoverer.md +578 -0
- package/dist/templates/base/claude/agents/legacy-synthesizer.md +1097 -0
- package/dist/templates/base/claude/agents/schema-extractor.md +767 -0
- package/dist/templates/workflows/README.md +137 -0
- package/dist/templates/workflows/bug-fix.json +73 -0
- package/dist/templates/workflows/feature-development.json +87 -0
- package/dist/templates/workflows/legacy-analysis.json +288 -0
- package/dist/templates/workflows/refactoring.json +73 -0
- package/package.json +1 -1
- package/templates/base/.orchestrator/patterns/legacy/README.md +360 -0
- package/templates/base/.orchestrator/patterns/legacy/php/laravel.patterns.json +396 -0
- package/templates/base/.orchestrator/templates/legacy/README.md +296 -0
- package/templates/base/.orchestrator/templates/legacy/analysis-report.md.hbs +342 -0
- package/templates/base/.orchestrator/templates/legacy/api-spec.yaml.hbs +263 -0
- package/templates/base/.orchestrator/templates/legacy/business-rules.md.hbs +449 -0
- package/templates/base/.orchestrator/templates/legacy/database-schema.md.hbs +356 -0
- package/templates/base/.orchestrator/templates/legacy/dead-code-report.md.hbs +330 -0
- package/templates/base/.orchestrator/templates/legacy/discovery-report.md.hbs +267 -0
- package/templates/base/.orchestrator/templates/legacy/final-report.md.hbs +451 -0
- package/templates/base/.orchestrator/templates/legacy/inventory.json.schema +346 -0
- package/templates/base/.orchestrator/templates/legacy/migration-roadmap.md.hbs +571 -0
- package/templates/base/.orchestrator/templates/legacy/tech-debt.md.hbs +412 -0
- package/templates/base/claude/agents/api-extractor.md +665 -0
- package/templates/base/claude/agents/business-rule-miner.md +734 -0
- package/templates/base/claude/agents/code-archaeologist.md +715 -0
- package/templates/base/claude/agents/legacy-discoverer.md +578 -0
- package/templates/base/claude/agents/legacy-synthesizer.md +1097 -0
- package/templates/base/claude/agents/schema-extractor.md +767 -0
- package/templates/workflows/README.md +137 -0
- package/templates/workflows/bug-fix.json +73 -0
- package/templates/workflows/feature-development.json +87 -0
- package/templates/workflows/legacy-analysis.json +288 -0
- package/templates/workflows/refactoring.json +73 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Built-in Workflow Templates
|
|
2
|
+
|
|
3
|
+
This directory contains the built-in workflow templates for the Orchestrator system. Each workflow defines a standardized process for different types of development tasks.
|
|
4
|
+
|
|
5
|
+
## Available Workflows
|
|
6
|
+
|
|
7
|
+
### 1. Feature Development (`feature-development.json`)
|
|
8
|
+
|
|
9
|
+
**Purpose**: Standard workflow for implementing new features
|
|
10
|
+
|
|
11
|
+
**Triggers**: `feature`, `new feature`, `implement`, `create`, `add`, `build`
|
|
12
|
+
|
|
13
|
+
**Phases**:
|
|
14
|
+
1. **RESEARCH** (optional) - Research and gather context
|
|
15
|
+
2. **SPECIFY** - Generate specification document
|
|
16
|
+
3. **PLAN** - Create technical implementation plan
|
|
17
|
+
4. **TASKS** - Generate task backlog
|
|
18
|
+
5. **IMPLEMENT** - Execute implementation (requires approval)
|
|
19
|
+
|
|
20
|
+
**Quality Gates**:
|
|
21
|
+
- SPECIFY, PLAN, TASKS: Require valid artifacts
|
|
22
|
+
- IMPLEMENT: Tests must pass, 80% minimum coverage
|
|
23
|
+
|
|
24
|
+
### 2. Bug Fix (`bug-fix.json`)
|
|
25
|
+
|
|
26
|
+
**Purpose**: Workflow for fixing bugs and issues
|
|
27
|
+
|
|
28
|
+
**Triggers**: `bug`, `fix`, `issue`, `error`, `broken`, `crash`, `problem`
|
|
29
|
+
|
|
30
|
+
**Phases**:
|
|
31
|
+
1. **ANALYZE** - Analyze and understand the bug
|
|
32
|
+
2. **REPRODUCE** - Document reproduction steps
|
|
33
|
+
3. **FIX** - Implement the fix (requires approval)
|
|
34
|
+
4. **VERIFY** - Verify the fix works
|
|
35
|
+
|
|
36
|
+
**Quality Gates**:
|
|
37
|
+
- REPRODUCE: Requires valid artifact
|
|
38
|
+
- FIX: Tests must pass
|
|
39
|
+
- VERIFY: Tests must pass, requires valid artifact
|
|
40
|
+
|
|
41
|
+
### 3. Refactoring (`refactoring.json`)
|
|
42
|
+
|
|
43
|
+
**Purpose**: Workflow for code refactoring and improvements
|
|
44
|
+
|
|
45
|
+
**Triggers**: `refactor`, `improve`, `cleanup`, `optimize`, `restructure`, `simplify`
|
|
46
|
+
|
|
47
|
+
**Phases**:
|
|
48
|
+
1. **ANALYZE** - Analyze code and identify improvements
|
|
49
|
+
2. **PLAN** - Create refactoring plan
|
|
50
|
+
3. **REFACTOR** - Execute refactoring (requires approval)
|
|
51
|
+
4. **VERIFY** - Verify refactoring maintains functionality
|
|
52
|
+
|
|
53
|
+
**Quality Gates**:
|
|
54
|
+
- PLAN: Requires valid artifact
|
|
55
|
+
- REFACTOR: Tests must pass, 80% minimum coverage (must maintain current)
|
|
56
|
+
- VERIFY: Tests must pass
|
|
57
|
+
|
|
58
|
+
## Schema
|
|
59
|
+
|
|
60
|
+
All workflows must validate against: `src/domain/schemas/workflow.schema.json`
|
|
61
|
+
|
|
62
|
+
## Testing
|
|
63
|
+
|
|
64
|
+
Workflow templates are validated by tests in:
|
|
65
|
+
`tests/unit/infrastructure/templates/workflows/built-in-workflows.test.ts`
|
|
66
|
+
|
|
67
|
+
Run tests:
|
|
68
|
+
```bash
|
|
69
|
+
npm run test -- tests/unit/infrastructure/templates/workflows/
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Creating New Workflows
|
|
73
|
+
|
|
74
|
+
To create a new workflow template:
|
|
75
|
+
|
|
76
|
+
1. Create a JSON file in this directory following the schema
|
|
77
|
+
2. Add comprehensive tests in the test file
|
|
78
|
+
3. Ensure validation against the schema
|
|
79
|
+
4. Document triggers, phases, and gates
|
|
80
|
+
5. Update this README
|
|
81
|
+
|
|
82
|
+
## Workflow Structure
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"name": "workflow-name", // lowercase-with-hyphens
|
|
87
|
+
"displayName": "Display Name",
|
|
88
|
+
"description": "Detailed description",
|
|
89
|
+
"version": "1.0.0", // Semantic version
|
|
90
|
+
"triggers": ["keyword1", "keyword2"],
|
|
91
|
+
"phases": [
|
|
92
|
+
{
|
|
93
|
+
"name": "PHASE_NAME", // UPPERCASE_WITH_UNDERSCORES
|
|
94
|
+
"displayName": "Phase Name",
|
|
95
|
+
"agent": "agent-name",
|
|
96
|
+
"artifact": "artifact-file.md",
|
|
97
|
+
"optional": false,
|
|
98
|
+
"requiresApproval": false,
|
|
99
|
+
"gates": [
|
|
100
|
+
{
|
|
101
|
+
"type": "tests|coverage|artifact|lint|approval|custom",
|
|
102
|
+
"config": { /* gate-specific config */ }
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Gate Types
|
|
111
|
+
|
|
112
|
+
- **tests**: Tests must pass before advancing
|
|
113
|
+
- Config: `{ mustPass: true }`
|
|
114
|
+
- **coverage**: Code coverage requirements
|
|
115
|
+
- Config: `{ minimum: 80, maintainCurrent?: true }`
|
|
116
|
+
- **artifact**: Artifact must exist and be valid
|
|
117
|
+
- Config: `{ required: true }`
|
|
118
|
+
- **lint**: Linting must pass
|
|
119
|
+
- **approval**: Human approval required
|
|
120
|
+
- **custom**: Custom validation logic
|
|
121
|
+
|
|
122
|
+
## Agent Mapping
|
|
123
|
+
|
|
124
|
+
Built-in agents referenced in workflows:
|
|
125
|
+
- `researcher` - Research and analysis agent
|
|
126
|
+
- `specifier` - Specification generation agent
|
|
127
|
+
- `planner` - Technical planning agent
|
|
128
|
+
- `task-generator` - Task backlog generation agent
|
|
129
|
+
- `implementer` - Code implementation agent
|
|
130
|
+
- `reviewer` - Code review and verification agent
|
|
131
|
+
|
|
132
|
+
## Version History
|
|
133
|
+
|
|
134
|
+
- **1.0.0** (2025-01-06): Initial built-in workflows
|
|
135
|
+
- feature-development
|
|
136
|
+
- bug-fix
|
|
137
|
+
- refactoring
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bug-fix",
|
|
3
|
+
"displayName": "Bug Fix",
|
|
4
|
+
"description": "Workflow for fixing bugs and issues",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"bug",
|
|
8
|
+
"fix",
|
|
9
|
+
"issue",
|
|
10
|
+
"error",
|
|
11
|
+
"broken",
|
|
12
|
+
"crash",
|
|
13
|
+
"problem"
|
|
14
|
+
],
|
|
15
|
+
"phases": [
|
|
16
|
+
{
|
|
17
|
+
"name": "ANALYZE",
|
|
18
|
+
"displayName": "Analysis",
|
|
19
|
+
"agent": "researcher",
|
|
20
|
+
"artifact": "bug-analysis.md",
|
|
21
|
+
"gates": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "REPRODUCE",
|
|
25
|
+
"displayName": "Reproduction",
|
|
26
|
+
"agent": "implementer",
|
|
27
|
+
"artifact": "reproduction-steps.md",
|
|
28
|
+
"gates": [
|
|
29
|
+
{
|
|
30
|
+
"type": "artifact",
|
|
31
|
+
"config": {
|
|
32
|
+
"required": true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "FIX",
|
|
39
|
+
"displayName": "Fix Implementation",
|
|
40
|
+
"agent": "implementer",
|
|
41
|
+
"artifact": "fix-report.md",
|
|
42
|
+
"requiresApproval": true,
|
|
43
|
+
"gates": [
|
|
44
|
+
{
|
|
45
|
+
"type": "tests",
|
|
46
|
+
"config": {
|
|
47
|
+
"mustPass": true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "VERIFY",
|
|
54
|
+
"displayName": "Verification",
|
|
55
|
+
"agent": "reviewer",
|
|
56
|
+
"artifact": "verification-report.md",
|
|
57
|
+
"gates": [
|
|
58
|
+
{
|
|
59
|
+
"type": "tests",
|
|
60
|
+
"config": {
|
|
61
|
+
"mustPass": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "artifact",
|
|
66
|
+
"config": {
|
|
67
|
+
"required": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "feature-development",
|
|
3
|
+
"displayName": "Feature Development",
|
|
4
|
+
"description": "Standard workflow for implementing new features",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"feature",
|
|
8
|
+
"new feature",
|
|
9
|
+
"implement",
|
|
10
|
+
"create",
|
|
11
|
+
"add",
|
|
12
|
+
"build"
|
|
13
|
+
],
|
|
14
|
+
"phases": [
|
|
15
|
+
{
|
|
16
|
+
"name": "RESEARCH",
|
|
17
|
+
"displayName": "Research",
|
|
18
|
+
"agent": "researcher",
|
|
19
|
+
"artifact": "research-context.md",
|
|
20
|
+
"optional": true,
|
|
21
|
+
"gates": []
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "SPECIFY",
|
|
25
|
+
"displayName": "Specification",
|
|
26
|
+
"agent": "specifier",
|
|
27
|
+
"artifact": "spec.md",
|
|
28
|
+
"gates": [
|
|
29
|
+
{
|
|
30
|
+
"type": "artifact",
|
|
31
|
+
"config": {
|
|
32
|
+
"required": true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "PLAN",
|
|
39
|
+
"displayName": "Technical Plan",
|
|
40
|
+
"agent": "planner",
|
|
41
|
+
"artifact": "plan.md",
|
|
42
|
+
"gates": [
|
|
43
|
+
{
|
|
44
|
+
"type": "artifact",
|
|
45
|
+
"config": {
|
|
46
|
+
"required": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "TASKS",
|
|
53
|
+
"displayName": "Task Generation",
|
|
54
|
+
"agent": "task-generator",
|
|
55
|
+
"artifact": "tasks.md",
|
|
56
|
+
"gates": [
|
|
57
|
+
{
|
|
58
|
+
"type": "artifact",
|
|
59
|
+
"config": {
|
|
60
|
+
"required": true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "IMPLEMENT",
|
|
67
|
+
"displayName": "Implementation",
|
|
68
|
+
"agent": "implementer",
|
|
69
|
+
"artifact": "implementation-report.md",
|
|
70
|
+
"requiresApproval": true,
|
|
71
|
+
"gates": [
|
|
72
|
+
{
|
|
73
|
+
"type": "tests",
|
|
74
|
+
"config": {
|
|
75
|
+
"mustPass": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "coverage",
|
|
80
|
+
"config": {
|
|
81
|
+
"minimum": 80
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "legacy-analysis",
|
|
3
|
+
"name": "Legacy Application Analysis",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "legacy_analysis",
|
|
6
|
+
"description": "Systematic analysis of legacy codebases to extract documentation, identify technical debt, and generate modernization roadmaps",
|
|
7
|
+
"phases": [
|
|
8
|
+
{
|
|
9
|
+
"id": "discover",
|
|
10
|
+
"name": "Discovery",
|
|
11
|
+
"description": "Explore codebase structure and detect technology stack",
|
|
12
|
+
"agent": "legacy-discoverer",
|
|
13
|
+
"artifacts": ["discovery-report.md"],
|
|
14
|
+
"gates": {
|
|
15
|
+
"required": ["discovery-report.md"],
|
|
16
|
+
"validations": [
|
|
17
|
+
"has-stack-detected",
|
|
18
|
+
"has-confidence-score",
|
|
19
|
+
"has-directory-structure"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"requiresApproval": false,
|
|
23
|
+
"estimatedDuration": "30-60min"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "inventory",
|
|
27
|
+
"name": "Inventory",
|
|
28
|
+
"description": "Catalog all assets, files, and components",
|
|
29
|
+
"agent": "legacy-discoverer",
|
|
30
|
+
"artifacts": ["inventory.json"],
|
|
31
|
+
"gates": {
|
|
32
|
+
"required": ["inventory.json"],
|
|
33
|
+
"validations": [
|
|
34
|
+
"has-asset-counts",
|
|
35
|
+
"has-metrics",
|
|
36
|
+
"json-valid"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"requiresApproval": false,
|
|
40
|
+
"estimatedDuration": "30-60min"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "analyze",
|
|
44
|
+
"name": "Analysis",
|
|
45
|
+
"description": "Deep analysis of code quality, technical debt, and security issues",
|
|
46
|
+
"agent": "code-archaeologist",
|
|
47
|
+
"artifacts": [
|
|
48
|
+
"analysis-report.md",
|
|
49
|
+
"dead-code-report.md",
|
|
50
|
+
"tech-debt.md"
|
|
51
|
+
],
|
|
52
|
+
"gates": {
|
|
53
|
+
"required": ["analysis-report.md"],
|
|
54
|
+
"validations": [
|
|
55
|
+
"has-severity-classification",
|
|
56
|
+
"has-findings",
|
|
57
|
+
"no-secrets-exposed"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"requiresApproval": false,
|
|
61
|
+
"estimatedDuration": "1-2h"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "map",
|
|
65
|
+
"name": "Mapping",
|
|
66
|
+
"description": "Extract API specifications and database schema",
|
|
67
|
+
"agent": "api-extractor",
|
|
68
|
+
"secondaryAgents": ["schema-extractor"],
|
|
69
|
+
"parallelizable": true,
|
|
70
|
+
"artifacts": [
|
|
71
|
+
"api-spec.yaml",
|
|
72
|
+
"database-schema.md",
|
|
73
|
+
"integrations.md"
|
|
74
|
+
],
|
|
75
|
+
"gates": {
|
|
76
|
+
"required": ["api-spec.yaml", "database-schema.md"],
|
|
77
|
+
"validations": [
|
|
78
|
+
"openapi-valid",
|
|
79
|
+
"has-mermaid-diagram",
|
|
80
|
+
"has-endpoints"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"requiresApproval": false,
|
|
84
|
+
"estimatedDuration": "1-2h"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "document",
|
|
88
|
+
"name": "Documentation",
|
|
89
|
+
"description": "Extract and document business rules and domain logic",
|
|
90
|
+
"agent": "business-rule-miner",
|
|
91
|
+
"artifacts": [
|
|
92
|
+
"business-rules.md",
|
|
93
|
+
"glossary.md",
|
|
94
|
+
"flow-diagrams.md"
|
|
95
|
+
],
|
|
96
|
+
"gates": {
|
|
97
|
+
"required": ["business-rules.md"],
|
|
98
|
+
"validations": [
|
|
99
|
+
"has-rules-by-domain",
|
|
100
|
+
"has-locations",
|
|
101
|
+
"has-glossary"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"requiresApproval": false,
|
|
105
|
+
"estimatedDuration": "1-2h"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "recommend",
|
|
109
|
+
"name": "Recommendations",
|
|
110
|
+
"description": "Synthesize findings and generate migration roadmap",
|
|
111
|
+
"agent": "legacy-synthesizer",
|
|
112
|
+
"artifacts": [
|
|
113
|
+
"migration-roadmap.md",
|
|
114
|
+
"architecture-proposal.md",
|
|
115
|
+
"final-report.md"
|
|
116
|
+
],
|
|
117
|
+
"gates": {
|
|
118
|
+
"required": ["migration-roadmap.md", "final-report.md"],
|
|
119
|
+
"validations": [
|
|
120
|
+
"has-phases",
|
|
121
|
+
"has-estimates",
|
|
122
|
+
"has-risks",
|
|
123
|
+
"has-quick-wins"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"requiresApproval": true,
|
|
127
|
+
"estimatedDuration": "1-2h"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"transitions": {
|
|
131
|
+
"discover": ["inventory"],
|
|
132
|
+
"inventory": ["analyze"],
|
|
133
|
+
"analyze": ["map"],
|
|
134
|
+
"map": ["document"],
|
|
135
|
+
"document": ["recommend"],
|
|
136
|
+
"recommend": []
|
|
137
|
+
},
|
|
138
|
+
"configuration": {
|
|
139
|
+
"patternSets": {
|
|
140
|
+
"basePath": ".orchestrator/patterns/legacy",
|
|
141
|
+
"fallbackBehavior": "heuristic",
|
|
142
|
+
"defaultStack": null
|
|
143
|
+
},
|
|
144
|
+
"templates": {
|
|
145
|
+
"basePath": ".orchestrator/templates/legacy"
|
|
146
|
+
},
|
|
147
|
+
"artifactPath": ".orchestrator/artifacts/legacy-analysis",
|
|
148
|
+
"allowParallelPhases": true,
|
|
149
|
+
"tokenBudgetPerPhase": 50000,
|
|
150
|
+
"checkpointFrequency": "per-phase"
|
|
151
|
+
},
|
|
152
|
+
"gates": {
|
|
153
|
+
"discover": {
|
|
154
|
+
"has-stack-detected": {
|
|
155
|
+
"type": "content-check",
|
|
156
|
+
"description": "Discovery report must identify technology stack",
|
|
157
|
+
"pattern": "Stack Detected:|Technology Stack:",
|
|
158
|
+
"severity": "CRITICAL"
|
|
159
|
+
},
|
|
160
|
+
"has-confidence-score": {
|
|
161
|
+
"type": "content-check",
|
|
162
|
+
"description": "Must include confidence score for stack detection",
|
|
163
|
+
"pattern": "Confidence:|confidence.*\\d+",
|
|
164
|
+
"severity": "HIGH"
|
|
165
|
+
},
|
|
166
|
+
"has-directory-structure": {
|
|
167
|
+
"type": "content-check",
|
|
168
|
+
"description": "Must document directory structure",
|
|
169
|
+
"pattern": "Directory Structure:|Structure:",
|
|
170
|
+
"severity": "MEDIUM"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"inventory": {
|
|
174
|
+
"has-asset-counts": {
|
|
175
|
+
"type": "json-field",
|
|
176
|
+
"description": "Must include counts for all asset types",
|
|
177
|
+
"field": "assets",
|
|
178
|
+
"severity": "CRITICAL"
|
|
179
|
+
},
|
|
180
|
+
"has-metrics": {
|
|
181
|
+
"type": "json-field",
|
|
182
|
+
"description": "Must include code metrics",
|
|
183
|
+
"field": "metrics",
|
|
184
|
+
"severity": "HIGH"
|
|
185
|
+
},
|
|
186
|
+
"json-valid": {
|
|
187
|
+
"type": "json-validation",
|
|
188
|
+
"description": "Inventory must be valid JSON",
|
|
189
|
+
"severity": "CRITICAL"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"analyze": {
|
|
193
|
+
"has-severity-classification": {
|
|
194
|
+
"type": "content-check",
|
|
195
|
+
"description": "Must classify findings by severity",
|
|
196
|
+
"pattern": "CRITICAL|HIGH|MEDIUM|LOW",
|
|
197
|
+
"severity": "CRITICAL"
|
|
198
|
+
},
|
|
199
|
+
"has-findings": {
|
|
200
|
+
"type": "content-check",
|
|
201
|
+
"description": "Must document findings",
|
|
202
|
+
"pattern": "Findings|Issues Identified",
|
|
203
|
+
"severity": "HIGH"
|
|
204
|
+
},
|
|
205
|
+
"no-secrets-exposed": {
|
|
206
|
+
"type": "security-check",
|
|
207
|
+
"description": "Must not expose secrets in reports",
|
|
208
|
+
"pattern": "password|api[_-]?key|secret|token",
|
|
209
|
+
"action": "fail-if-found",
|
|
210
|
+
"severity": "CRITICAL"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"map": {
|
|
214
|
+
"openapi-valid": {
|
|
215
|
+
"type": "openapi-validation",
|
|
216
|
+
"description": "API spec must be valid OpenAPI 3.0",
|
|
217
|
+
"version": "3.0",
|
|
218
|
+
"severity": "CRITICAL"
|
|
219
|
+
},
|
|
220
|
+
"has-mermaid-diagram": {
|
|
221
|
+
"type": "content-check",
|
|
222
|
+
"description": "Database schema must include Mermaid ER diagram",
|
|
223
|
+
"pattern": "```mermaid|erDiagram",
|
|
224
|
+
"severity": "HIGH"
|
|
225
|
+
},
|
|
226
|
+
"has-endpoints": {
|
|
227
|
+
"type": "content-check",
|
|
228
|
+
"description": "API spec must document endpoints",
|
|
229
|
+
"pattern": "paths:",
|
|
230
|
+
"severity": "CRITICAL"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"document": {
|
|
234
|
+
"has-rules-by-domain": {
|
|
235
|
+
"type": "content-check",
|
|
236
|
+
"description": "Business rules must be categorized by domain",
|
|
237
|
+
"pattern": "Domain:|Category:",
|
|
238
|
+
"severity": "HIGH"
|
|
239
|
+
},
|
|
240
|
+
"has-locations": {
|
|
241
|
+
"type": "content-check",
|
|
242
|
+
"description": "Rules must include source file locations",
|
|
243
|
+
"pattern": "Location:|File:",
|
|
244
|
+
"severity": "MEDIUM"
|
|
245
|
+
},
|
|
246
|
+
"has-glossary": {
|
|
247
|
+
"type": "artifact-exists",
|
|
248
|
+
"description": "Glossary of domain terms must exist",
|
|
249
|
+
"artifact": "glossary.md",
|
|
250
|
+
"severity": "MEDIUM"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"recommend": {
|
|
254
|
+
"has-phases": {
|
|
255
|
+
"type": "content-check",
|
|
256
|
+
"description": "Roadmap must include migration phases",
|
|
257
|
+
"pattern": "Phase \\d+|Migration Phase",
|
|
258
|
+
"severity": "CRITICAL"
|
|
259
|
+
},
|
|
260
|
+
"has-estimates": {
|
|
261
|
+
"type": "content-check",
|
|
262
|
+
"description": "Must include effort estimates",
|
|
263
|
+
"pattern": "Estimate:|Duration:|Effort:",
|
|
264
|
+
"severity": "HIGH"
|
|
265
|
+
},
|
|
266
|
+
"has-risks": {
|
|
267
|
+
"type": "content-check",
|
|
268
|
+
"description": "Must document risks and mitigations",
|
|
269
|
+
"pattern": "Risk:|Mitigation:",
|
|
270
|
+
"severity": "HIGH"
|
|
271
|
+
},
|
|
272
|
+
"has-quick-wins": {
|
|
273
|
+
"type": "content-check",
|
|
274
|
+
"description": "Should identify quick win opportunities",
|
|
275
|
+
"pattern": "Quick Win|Low Effort",
|
|
276
|
+
"severity": "MEDIUM"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"metadata": {
|
|
281
|
+
"author": "implementer-agent",
|
|
282
|
+
"created": "2026-01-23",
|
|
283
|
+
"lastUpdated": "2026-01-23",
|
|
284
|
+
"rfc": "RFC-004-LEGACY-ANALYSIS-WORKFLOW",
|
|
285
|
+
"targetVersion": "v1.7.0",
|
|
286
|
+
"status": "active"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "refactoring",
|
|
3
|
+
"displayName": "Refactoring",
|
|
4
|
+
"description": "Workflow for code refactoring and improvements",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"refactor",
|
|
8
|
+
"improve",
|
|
9
|
+
"cleanup",
|
|
10
|
+
"optimize",
|
|
11
|
+
"restructure",
|
|
12
|
+
"simplify"
|
|
13
|
+
],
|
|
14
|
+
"phases": [
|
|
15
|
+
{
|
|
16
|
+
"name": "ANALYZE",
|
|
17
|
+
"displayName": "Analysis",
|
|
18
|
+
"agent": "researcher",
|
|
19
|
+
"artifact": "refactoring-analysis.md",
|
|
20
|
+
"gates": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "PLAN",
|
|
24
|
+
"displayName": "Refactoring Plan",
|
|
25
|
+
"agent": "planner",
|
|
26
|
+
"artifact": "refactoring-plan.md",
|
|
27
|
+
"gates": [
|
|
28
|
+
{
|
|
29
|
+
"type": "artifact",
|
|
30
|
+
"config": {
|
|
31
|
+
"required": true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "REFACTOR",
|
|
38
|
+
"displayName": "Refactoring",
|
|
39
|
+
"agent": "implementer",
|
|
40
|
+
"artifact": "refactoring-report.md",
|
|
41
|
+
"requiresApproval": true,
|
|
42
|
+
"gates": [
|
|
43
|
+
{
|
|
44
|
+
"type": "tests",
|
|
45
|
+
"config": {
|
|
46
|
+
"mustPass": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "coverage",
|
|
51
|
+
"config": {
|
|
52
|
+
"minimum": 80,
|
|
53
|
+
"maintainCurrent": true
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "VERIFY",
|
|
60
|
+
"displayName": "Verification",
|
|
61
|
+
"agent": "reviewer",
|
|
62
|
+
"artifact": "verification-report.md",
|
|
63
|
+
"gates": [
|
|
64
|
+
{
|
|
65
|
+
"type": "tests",
|
|
66
|
+
"config": {
|
|
67
|
+
"mustPass": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|