@orchestrator-claude/cli 1.4.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 +74 -0
- package/dist/api-client/OrchestratorAPIClient.d.ts +111 -0
- package/dist/api-client/OrchestratorAPIClient.d.ts.map +1 -0
- package/dist/api-client/OrchestratorAPIClient.js +176 -0
- package/dist/api-client/OrchestratorAPIClient.js.map +1 -0
- package/dist/api-client/index.d.ts +11 -0
- package/dist/api-client/index.d.ts.map +1 -0
- package/dist/api-client/index.js +10 -0
- package/dist/api-client/index.js.map +1 -0
- package/dist/api-client/retry.d.ts +29 -0
- package/dist/api-client/retry.d.ts.map +1 -0
- package/dist/api-client/retry.js +85 -0
- package/dist/api-client/retry.js.map +1 -0
- package/dist/api-client/types.d.ts +148 -0
- package/dist/api-client/types.d.ts.map +1 -0
- package/dist/api-client/types.js +10 -0
- package/dist/api-client/types.js.map +1 -0
- package/dist/commands/AgentsCommand.d.ts +74 -0
- package/dist/commands/AgentsCommand.d.ts.map +1 -0
- package/dist/commands/AgentsCommand.js +170 -0
- package/dist/commands/AgentsCommand.js.map +1 -0
- package/dist/commands/InitCommand.d.ts +63 -0
- package/dist/commands/InitCommand.d.ts.map +1 -0
- package/dist/commands/InitCommand.js +150 -0
- package/dist/commands/InitCommand.js.map +1 -0
- package/dist/commands/MigrateCommand.d.ts +93 -0
- package/dist/commands/MigrateCommand.d.ts.map +1 -0
- package/dist/commands/MigrateCommand.js +260 -0
- package/dist/commands/MigrateCommand.js.map +1 -0
- package/dist/commands/StatusCommand.d.ts +61 -0
- package/dist/commands/StatusCommand.d.ts.map +1 -0
- package/dist/commands/StatusCommand.js +142 -0
- package/dist/commands/StatusCommand.js.map +1 -0
- package/dist/commands/TemplatesCommand.d.ts +69 -0
- package/dist/commands/TemplatesCommand.d.ts.map +1 -0
- package/dist/commands/TemplatesCommand.js +147 -0
- package/dist/commands/TemplatesCommand.js.map +1 -0
- package/dist/commands/WorkflowCommand.d.ts +82 -0
- package/dist/commands/WorkflowCommand.d.ts.map +1 -0
- package/dist/commands/WorkflowCommand.js +203 -0
- package/dist/commands/WorkflowCommand.js.map +1 -0
- package/dist/config/CLIConfig.d.ts +66 -0
- package/dist/config/CLIConfig.d.ts.map +1 -0
- package/dist/config/CLIConfig.js +60 -0
- package/dist/config/CLIConfig.js.map +1 -0
- package/dist/formatters/OutputFormatter.d.ts +102 -0
- package/dist/formatters/OutputFormatter.d.ts.map +1 -0
- package/dist/formatters/OutputFormatter.js +182 -0
- package/dist/formatters/OutputFormatter.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +249 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/.gitkeep +0 -0
- package/dist/templates/TemplateEngine.d.ts +90 -0
- package/dist/templates/TemplateEngine.d.ts.map +1 -0
- package/dist/templates/TemplateEngine.js +149 -0
- package/dist/templates/TemplateEngine.js.map +1 -0
- package/dist/templates/base/CLAUDE.md.hbs +362 -0
- package/dist/templates/base/claude/agents/implementer.md +446 -0
- package/dist/templates/base/claude/agents/orchestrator.md +155 -0
- package/dist/templates/base/claude/agents/planner.md +348 -0
- package/dist/templates/base/claude/agents/researcher.md +390 -0
- package/dist/templates/base/claude/agents/reviewer.md +444 -0
- package/dist/templates/base/claude/agents/specifier.md +331 -0
- package/dist/templates/base/claude/agents/task-generator.md +382 -0
- package/dist/templates/base/claude/hooks/post-artifact-generate.sh +39 -0
- package/dist/templates/base/claude/hooks/post-implement-validate.sh +139 -0
- package/dist/templates/base/claude/hooks/post-phase-checkpoint.sh +322 -0
- package/dist/templates/base/claude/hooks/pre-agent-invoke.sh +34 -0
- package/dist/templates/base/claude/hooks/pre-phase-advance.sh +40 -0
- package/dist/templates/base/claude/hooks/track-agent-invocation.sh +230 -0
- package/dist/templates/base/claude/orchestrator-config.json +141 -0
- package/dist/templates/base/claude/settings.json +80 -0
- package/dist/templates/base/claude/skills/artifact-validator/SKILL.md +226 -0
- package/dist/templates/base/claude/skills/docs-guardian/SKILL.md +230 -0
- package/dist/templates/base/claude/skills/kb-lookup/SKILL.md +257 -0
- package/dist/templates/base/claude/skills/phase-gate-evaluator/SKILL.md +274 -0
- package/dist/templates/base/claude/skills/workflow-status/SKILL.md +322 -0
- package/dist/templates/base/docker-compose.yml.hbs +20 -0
- package/dist/templates/base/mcp.json.hbs +37 -0
- package/dist/templates/base/orchestrator/.state/.gitkeep +0 -0
- package/dist/templates/base/orchestrator-index.json.hbs +37 -0
- package/dist/templates/base/package.json.hbs +40 -0
- package/dist/templates/default/.orchestrator/orchestrator-index.json +19 -0
- package/dist/templates/default/README.md +58 -0
- package/dist/templates/default/docker-compose.yml +24 -0
- package/dist/templates/default/template.json +10 -0
- package/dist/templates/projects/api/files/index.ts.hbs +30 -0
- package/dist/templates/projects/api/files/server.ts.hbs +63 -0
- package/dist/templates/projects/api/files/tsconfig.json.hbs +27 -0
- package/dist/templates/projects/api/files/vitest.config.ts.hbs +28 -0
- package/dist/templates/projects/api/template.config.json +238 -0
- package/dist/templates/projects/api/template.config.ts +149 -0
- package/dist/templates/projects/cli/files/cli.ts.hbs +50 -0
- package/dist/templates/projects/cli/files/index.ts.hbs +8 -0
- package/dist/templates/projects/cli/files/tsconfig.json.hbs +27 -0
- package/dist/templates/projects/cli/files/vitest.config.ts.hbs +28 -0
- package/dist/templates/projects/cli/template.config.json +213 -0
- package/dist/templates/projects/cli/template.config.ts +126 -0
- package/dist/templates/projects/frontend/files/App.tsx.hbs +31 -0
- package/dist/templates/projects/frontend/files/index.html.hbs +13 -0
- package/dist/templates/projects/frontend/files/main.tsx.hbs +22 -0
- package/dist/templates/projects/frontend/files/tsconfig.json.hbs +34 -0
- package/dist/templates/projects/frontend/files/tsconfig.node.json.hbs +10 -0
- package/dist/templates/projects/frontend/files/vite.config.ts.hbs +19 -0
- package/dist/templates/projects/frontend/files/vitest.config.ts.hbs +36 -0
- package/dist/templates/projects/frontend/template.config.json +241 -0
- package/dist/templates/projects/frontend/template.config.ts +153 -0
- package/dist/templates/projects/minimal/files/claude-settings.json.hbs +20 -0
- package/dist/templates/projects/minimal/files/env.example.hbs +17 -0
- package/dist/templates/projects/minimal/files/gitignore.hbs +41 -0
- package/dist/templates/projects/minimal/files/index.ts.hbs +13 -0
- package/dist/templates/projects/minimal/files/tsconfig.json.hbs +27 -0
- package/dist/templates/projects/minimal/template.config.json +185 -0
- package/dist/templates/projects/minimal/template.config.ts +88 -0
- package/package.json +37 -0
- package/templates/.gitkeep +0 -0
- package/templates/base/CLAUDE.md.hbs +362 -0
- package/templates/base/claude/agents/implementer.md +446 -0
- package/templates/base/claude/agents/orchestrator.md +155 -0
- package/templates/base/claude/agents/planner.md +348 -0
- package/templates/base/claude/agents/researcher.md +390 -0
- package/templates/base/claude/agents/reviewer.md +444 -0
- package/templates/base/claude/agents/specifier.md +331 -0
- package/templates/base/claude/agents/task-generator.md +382 -0
- package/templates/base/claude/hooks/post-artifact-generate.sh +39 -0
- package/templates/base/claude/hooks/post-implement-validate.sh +139 -0
- package/templates/base/claude/hooks/post-phase-checkpoint.sh +322 -0
- package/templates/base/claude/hooks/pre-agent-invoke.sh +34 -0
- package/templates/base/claude/hooks/pre-phase-advance.sh +40 -0
- package/templates/base/claude/hooks/track-agent-invocation.sh +230 -0
- package/templates/base/claude/orchestrator-config.json +141 -0
- package/templates/base/claude/settings.json +80 -0
- package/templates/base/claude/skills/artifact-validator/SKILL.md +226 -0
- package/templates/base/claude/skills/docs-guardian/SKILL.md +230 -0
- package/templates/base/claude/skills/kb-lookup/SKILL.md +257 -0
- package/templates/base/claude/skills/phase-gate-evaluator/SKILL.md +274 -0
- package/templates/base/claude/skills/workflow-status/SKILL.md +322 -0
- package/templates/base/docker-compose.yml.hbs +20 -0
- package/templates/base/mcp.json.hbs +37 -0
- package/templates/base/orchestrator/.state/.gitkeep +0 -0
- package/templates/base/orchestrator-index.json.hbs +37 -0
- package/templates/base/package.json.hbs +40 -0
- package/templates/default/.orchestrator/orchestrator-index.json +19 -0
- package/templates/default/README.md +58 -0
- package/templates/default/docker-compose.yml +24 -0
- package/templates/default/template.json +10 -0
- package/templates/projects/api/files/index.ts.hbs +30 -0
- package/templates/projects/api/files/server.ts.hbs +63 -0
- package/templates/projects/api/files/tsconfig.json.hbs +27 -0
- package/templates/projects/api/files/vitest.config.ts.hbs +28 -0
- package/templates/projects/api/template.config.json +238 -0
- package/templates/projects/api/template.config.ts +149 -0
- package/templates/projects/cli/files/cli.ts.hbs +50 -0
- package/templates/projects/cli/files/index.ts.hbs +8 -0
- package/templates/projects/cli/files/tsconfig.json.hbs +27 -0
- package/templates/projects/cli/files/vitest.config.ts.hbs +28 -0
- package/templates/projects/cli/template.config.json +213 -0
- package/templates/projects/cli/template.config.ts +126 -0
- package/templates/projects/frontend/files/App.tsx.hbs +31 -0
- package/templates/projects/frontend/files/index.html.hbs +13 -0
- package/templates/projects/frontend/files/main.tsx.hbs +22 -0
- package/templates/projects/frontend/files/tsconfig.json.hbs +34 -0
- package/templates/projects/frontend/files/tsconfig.node.json.hbs +10 -0
- package/templates/projects/frontend/files/vite.config.ts.hbs +19 -0
- package/templates/projects/frontend/files/vitest.config.ts.hbs +36 -0
- package/templates/projects/frontend/template.config.json +241 -0
- package/templates/projects/frontend/template.config.ts +153 -0
- package/templates/projects/minimal/files/claude-settings.json.hbs +20 -0
- package/templates/projects/minimal/files/env.example.hbs +17 -0
- package/templates/projects/minimal/files/gitignore.hbs +41 -0
- package/templates/projects/minimal/files/index.ts.hbs +13 -0
- package/templates/projects/minimal/files/tsconfig.json.hbs +27 -0
- package/templates/projects/minimal/template.config.json +185 -0
- package/templates/projects/minimal/template.config.ts +88 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "minimal",
|
|
3
|
+
"description": "Minimal project template with basic Orchestrator setup",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"directories": [
|
|
6
|
+
".orchestrator",
|
|
7
|
+
".orchestrator/artifacts",
|
|
8
|
+
".orchestrator/artifacts/research",
|
|
9
|
+
".orchestrator/artifacts/specify",
|
|
10
|
+
".orchestrator/artifacts/plan",
|
|
11
|
+
".orchestrator/artifacts/tasks",
|
|
12
|
+
".orchestrator/artifacts/implement",
|
|
13
|
+
".orchestrator/workflows",
|
|
14
|
+
".orchestrator/memory",
|
|
15
|
+
".orchestrator/memory/knowledge-base",
|
|
16
|
+
".orchestrator/memory/knowledge-base/core",
|
|
17
|
+
".orchestrator/memory/knowledge-base/contextual",
|
|
18
|
+
".orchestrator/memory/knowledge-base/research",
|
|
19
|
+
".orchestrator/checkpoints",
|
|
20
|
+
".orchestrator/.state",
|
|
21
|
+
".claude",
|
|
22
|
+
".claude/agents",
|
|
23
|
+
".claude/skills",
|
|
24
|
+
".claude/skills/artifact-validator",
|
|
25
|
+
".claude/skills/kb-lookup",
|
|
26
|
+
".claude/skills/phase-gate-evaluator",
|
|
27
|
+
".claude/skills/workflow-status",
|
|
28
|
+
".claude/skills/docs-guardian",
|
|
29
|
+
".claude/hooks",
|
|
30
|
+
"src",
|
|
31
|
+
"tests"
|
|
32
|
+
],
|
|
33
|
+
"files": [
|
|
34
|
+
{
|
|
35
|
+
"source": "projects/minimal/files/gitignore.hbs",
|
|
36
|
+
"destination": ".gitignore",
|
|
37
|
+
"template": true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"source": "projects/minimal/files/env.example.hbs",
|
|
41
|
+
"destination": ".env.example",
|
|
42
|
+
"template": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"source": "projects/minimal/files/tsconfig.json.hbs",
|
|
46
|
+
"destination": "tsconfig.json",
|
|
47
|
+
"template": true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"source": "projects/minimal/files/index.ts.hbs",
|
|
51
|
+
"destination": "src/index.ts",
|
|
52
|
+
"template": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"source": "base/CLAUDE.md.hbs",
|
|
56
|
+
"destination": "CLAUDE.md",
|
|
57
|
+
"template": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"source": "base/mcp.json.hbs",
|
|
61
|
+
"destination": ".mcp.json",
|
|
62
|
+
"template": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"source": "base/package.json.hbs",
|
|
66
|
+
"destination": "package.json",
|
|
67
|
+
"template": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"source": "base/orchestrator-index.json.hbs",
|
|
71
|
+
"destination": ".orchestrator/orchestrator-index.json",
|
|
72
|
+
"template": true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"source": "base/claude/settings.json",
|
|
76
|
+
"destination": ".claude/settings.json",
|
|
77
|
+
"template": false
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"source": "base/claude/orchestrator-config.json",
|
|
81
|
+
"destination": ".claude/orchestrator-config.json",
|
|
82
|
+
"template": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"source": "base/claude/agents/orchestrator.md",
|
|
86
|
+
"destination": ".claude/agents/orchestrator.md",
|
|
87
|
+
"template": false
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"source": "base/claude/agents/specifier.md",
|
|
91
|
+
"destination": ".claude/agents/specifier.md",
|
|
92
|
+
"template": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"source": "base/claude/agents/planner.md",
|
|
96
|
+
"destination": ".claude/agents/planner.md",
|
|
97
|
+
"template": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"source": "base/claude/agents/task-generator.md",
|
|
101
|
+
"destination": ".claude/agents/task-generator.md",
|
|
102
|
+
"template": false
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"source": "base/claude/agents/implementer.md",
|
|
106
|
+
"destination": ".claude/agents/implementer.md",
|
|
107
|
+
"template": false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"source": "base/claude/agents/reviewer.md",
|
|
111
|
+
"destination": ".claude/agents/reviewer.md",
|
|
112
|
+
"template": false
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"source": "base/claude/agents/researcher.md",
|
|
116
|
+
"destination": ".claude/agents/researcher.md",
|
|
117
|
+
"template": false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"source": "base/claude/skills/artifact-validator/SKILL.md",
|
|
121
|
+
"destination": ".claude/skills/artifact-validator/SKILL.md",
|
|
122
|
+
"template": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"source": "base/claude/skills/kb-lookup/SKILL.md",
|
|
126
|
+
"destination": ".claude/skills/kb-lookup/SKILL.md",
|
|
127
|
+
"template": false
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"source": "base/claude/skills/phase-gate-evaluator/SKILL.md",
|
|
131
|
+
"destination": ".claude/skills/phase-gate-evaluator/SKILL.md",
|
|
132
|
+
"template": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"source": "base/claude/skills/workflow-status/SKILL.md",
|
|
136
|
+
"destination": ".claude/skills/workflow-status/SKILL.md",
|
|
137
|
+
"template": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"source": "base/claude/skills/docs-guardian/SKILL.md",
|
|
141
|
+
"destination": ".claude/skills/docs-guardian/SKILL.md",
|
|
142
|
+
"template": false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"source": "base/claude/hooks/pre-agent-invoke.sh",
|
|
146
|
+
"destination": ".claude/hooks/pre-agent-invoke.sh",
|
|
147
|
+
"template": false
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"source": "base/claude/hooks/pre-phase-advance.sh",
|
|
151
|
+
"destination": ".claude/hooks/pre-phase-advance.sh",
|
|
152
|
+
"template": false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"source": "base/claude/hooks/post-artifact-generate.sh",
|
|
156
|
+
"destination": ".claude/hooks/post-artifact-generate.sh",
|
|
157
|
+
"template": false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"source": "base/claude/hooks/post-implement-validate.sh",
|
|
161
|
+
"destination": ".claude/hooks/post-implement-validate.sh",
|
|
162
|
+
"template": false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"source": "base/claude/hooks/track-agent-invocation.sh",
|
|
166
|
+
"destination": ".claude/hooks/track-agent-invocation.sh",
|
|
167
|
+
"template": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"source": "base/claude/hooks/post-phase-checkpoint.sh",
|
|
171
|
+
"destination": ".claude/hooks/post-phase-checkpoint.sh",
|
|
172
|
+
"template": false
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"source": "base/orchestrator/.state/.gitkeep",
|
|
176
|
+
"destination": ".orchestrator/.state/.gitkeep",
|
|
177
|
+
"template": false
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"dependencies": {},
|
|
181
|
+
"devDependencies": {},
|
|
182
|
+
"scripts": {},
|
|
183
|
+
"constitutionExtensions": [],
|
|
184
|
+
"knowledgeBaseSeeds": ["docs-constitution"]
|
|
185
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal Project Template Configuration
|
|
3
|
+
*/
|
|
4
|
+
import { ProjectTemplate } from '../../../../domain/entities/ProjectTemplate.js';
|
|
5
|
+
|
|
6
|
+
const config = ProjectTemplate.create({
|
|
7
|
+
name: 'minimal',
|
|
8
|
+
description: 'Minimal project template with basic Orchestrator setup',
|
|
9
|
+
version: '1.0.0',
|
|
10
|
+
|
|
11
|
+
directories: [
|
|
12
|
+
'.orchestrator',
|
|
13
|
+
'.orchestrator/artifacts',
|
|
14
|
+
'.orchestrator/artifacts/research',
|
|
15
|
+
'.orchestrator/artifacts/specify',
|
|
16
|
+
'.orchestrator/artifacts/plan',
|
|
17
|
+
'.orchestrator/artifacts/tasks',
|
|
18
|
+
'.orchestrator/artifacts/implement',
|
|
19
|
+
'.orchestrator/memory',
|
|
20
|
+
'.orchestrator/memory/knowledge-base',
|
|
21
|
+
'.orchestrator/memory/knowledge-base/core',
|
|
22
|
+
'.orchestrator/memory/knowledge-base/contextual',
|
|
23
|
+
'.orchestrator/memory/knowledge-base/research',
|
|
24
|
+
'.orchestrator/checkpoints',
|
|
25
|
+
'.orchestrator/.state',
|
|
26
|
+
'src',
|
|
27
|
+
'tests',
|
|
28
|
+
],
|
|
29
|
+
|
|
30
|
+
files: [
|
|
31
|
+
{
|
|
32
|
+
source: 'projects/minimal/files/gitignore.hbs',
|
|
33
|
+
destination: '.gitignore',
|
|
34
|
+
template: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
source: 'projects/minimal/files/env.example.hbs',
|
|
38
|
+
destination: '.env.example',
|
|
39
|
+
template: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
source: 'projects/minimal/files/claude-settings.json.hbs',
|
|
43
|
+
destination: '.claude/claude-settings.json',
|
|
44
|
+
template: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
source: 'base/CLAUDE.md.hbs',
|
|
48
|
+
destination: 'CLAUDE.md',
|
|
49
|
+
template: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
source: 'base/mcp.json.hbs',
|
|
53
|
+
destination: '.mcp.json',
|
|
54
|
+
template: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
source: 'base/package.json.hbs',
|
|
58
|
+
destination: 'package.json',
|
|
59
|
+
template: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
source: 'base/orchestrator-index.json.hbs',
|
|
63
|
+
destination: '.orchestrator/orchestrator-index.json',
|
|
64
|
+
template: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
source: 'base/orchestrator/.state/.gitkeep',
|
|
68
|
+
destination: '.orchestrator/.state/.gitkeep',
|
|
69
|
+
template: false,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
|
|
73
|
+
dependencies: {},
|
|
74
|
+
|
|
75
|
+
devDependencies: {},
|
|
76
|
+
|
|
77
|
+
scripts: {},
|
|
78
|
+
|
|
79
|
+
constitutionExtensions: [],
|
|
80
|
+
|
|
81
|
+
knowledgeBaseSeeds: [],
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (config.isErr()) {
|
|
85
|
+
throw new Error(`Failed to create minimal template config: ${config.error}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default config.value;
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orchestrator-claude/cli",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Orchestrator CLI - Thin Client",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"orchestrator": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"templates"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && npm run copy-templates && npm run postbuild",
|
|
16
|
+
"copy-templates": "cp -r templates dist/",
|
|
17
|
+
"postbuild": "chmod +x dist/index.js",
|
|
18
|
+
"test": "vitest",
|
|
19
|
+
"test:coverage": "vitest --coverage"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"axios": "^1.7.0",
|
|
23
|
+
"commander": "^13.0.0",
|
|
24
|
+
"chalk": "^5.4.0",
|
|
25
|
+
"handlebars": "^4.7.8",
|
|
26
|
+
"ora": "^8.0.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^22.0.0",
|
|
30
|
+
"typescript": "^5.7.0",
|
|
31
|
+
"vitest": "^3.0.0",
|
|
32
|
+
"@vitest/coverage-v8": "^3.0.0"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.0.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This project uses the **Orchestrator System** for autonomous workflow management. When handling feature requests, bug fixes, or refactoring tasks, you MUST use the orchestrator workflow instead of implementing directly.
|
|
6
|
+
|
|
7
|
+
## Critical Rule
|
|
8
|
+
|
|
9
|
+
**NEVER implement features directly.** Always use the orchestrator workflow:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
User Request → Detect Workflow → Research (if needed) → SPECIFY → PLAN → TASKS → Implement
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## How to Start a Workflow
|
|
16
|
+
|
|
17
|
+
When a user requests a new feature, bug fix, or refactoring:
|
|
18
|
+
|
|
19
|
+
### 1. Detect Workflow Type
|
|
20
|
+
|
|
21
|
+
Use the MCP tool to detect the workflow type:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
mcp__orchestrator-tools__detectWorkflow({ prompt: "user request here" })
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Workflow types:
|
|
28
|
+
- `feature_development` - New features, new functionality
|
|
29
|
+
- `bug_fix` - Bug fixes, error corrections
|
|
30
|
+
- `refactoring` - Code refactoring, improvements
|
|
31
|
+
- `emergency_debug` - Urgent debugging
|
|
32
|
+
|
|
33
|
+
### 2. Start Workflow and Get Next Step
|
|
34
|
+
|
|
35
|
+
**MANDATORY:** After detecting workflow type, call `startWorkflow` to create the workflow:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
mcp__orchestrator-tools__startWorkflow({ workflowType: "feature-development", prompt: "user request here" })
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This returns a deterministic `nextStep` instruction:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"success": true,
|
|
46
|
+
"workflowId": "wf-123",
|
|
47
|
+
"nextStep": {
|
|
48
|
+
"action": "invoke_agent",
|
|
49
|
+
"subagent_type": "orchestrator",
|
|
50
|
+
"prompt": "Start workflow feature-development (ID: wf-123) for user request: ..."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 3. Execute nextStep (Invoke Orchestrator Agent)
|
|
56
|
+
|
|
57
|
+
**IMMEDIATELY** follow the `nextStep` instruction by invoking the orchestrator agent via Task tool:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Use the Task tool with subagent_type from nextStep.subagent_type
|
|
61
|
+
Prompt: nextStep.prompt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The orchestrator agent will:
|
|
65
|
+
1. Set pending actions for specialized agents
|
|
66
|
+
2. Return control to CLI for Ping-Pong pattern
|
|
67
|
+
3. CLI invokes agents via Task tool as directed by getNextAction()
|
|
68
|
+
4. Process continues until workflow completes
|
|
69
|
+
|
|
70
|
+
## Available MCP Tools
|
|
71
|
+
|
|
72
|
+
### orchestrator-tools
|
|
73
|
+
- `detectWorkflow` - Detect workflow type from user prompt
|
|
74
|
+
- `startWorkflow` - **Create workflow and get deterministic nextStep instruction** (MANDATORY after detectWorkflow)
|
|
75
|
+
- `advancePhase` - Advance to the next workflow phase
|
|
76
|
+
- `evaluateGate` - Evaluate if a phase gate passes
|
|
77
|
+
- `validateArtifact` - Validate artifact against schema
|
|
78
|
+
- `createCheckpoint` - Create a git checkpoint
|
|
79
|
+
- `getStatus` - Get current workflow status
|
|
80
|
+
- `getWorkflows` - List workflows with phase configs (including `requiresApproval`)
|
|
81
|
+
- `getNextAction` - Get the next pending action (Ping-Pong pattern)
|
|
82
|
+
|
|
83
|
+
### knowledge-base
|
|
84
|
+
- `search` - Search the knowledge base
|
|
85
|
+
- `getDocument` - Get a specific document
|
|
86
|
+
- `getConstitution` - Get the project constitution
|
|
87
|
+
- `listByTier` - List documents by tier
|
|
88
|
+
- `listByCategory` - List documents by category
|
|
89
|
+
|
|
90
|
+
## Auto-Advance Behavior (requiresApproval)
|
|
91
|
+
|
|
92
|
+
**CRITICAL**: Each workflow phase has a `requiresApproval` configuration.
|
|
93
|
+
|
|
94
|
+
### How It Works
|
|
95
|
+
|
|
96
|
+
1. **Load workflow config** at start using `getWorkflows`:
|
|
97
|
+
```
|
|
98
|
+
mcp__orchestrator-tools__getWorkflows()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
2. **Check each phase's `requiresApproval`**:
|
|
102
|
+
- `requiresApproval: false` → **AUTO-ADVANCE** after gate passes (no user interaction)
|
|
103
|
+
- `requiresApproval: true` → **PAUSE** and ask user for approval
|
|
104
|
+
|
|
105
|
+
### Default Configuration (feature-development)
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
SPECIFY → requiresApproval: false → auto-advance
|
|
109
|
+
PLAN → requiresApproval: false → auto-advance
|
|
110
|
+
TASKS → requiresApproval: false → auto-advance
|
|
111
|
+
IMPLEMENT → requiresApproval: true → PAUSE HERE
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Expected Behavior
|
|
115
|
+
|
|
116
|
+
- **DO NOT ask user** between SPECIFY → PLAN → TASKS phases
|
|
117
|
+
- **Run these phases sequentially** invoking each agent automatically
|
|
118
|
+
- **ONLY pause** before IMPLEMENT phase (or phases with `requiresApproval: true`)
|
|
119
|
+
- This reduces unnecessary interactions and speeds up the workflow
|
|
120
|
+
|
|
121
|
+
### Example Flow
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
User: "Create a calculator function"
|
|
125
|
+
|
|
126
|
+
Claude:
|
|
127
|
+
1. detectWorkflow({ prompt: "Create a calculator function" }) → feature-development
|
|
128
|
+
2. startWorkflow({ workflowType: "feature-development", prompt: "..." }) → { nextStep: {...} }
|
|
129
|
+
3. Execute nextStep → Invoke orchestrator agent via Task tool
|
|
130
|
+
4. getNextAction() → { agent: "specifier", status: "awaiting_agent" }
|
|
131
|
+
5. Invoke specifier via Task tool → spec.md created
|
|
132
|
+
6. getNextAction() → { agent: "planner", status: "awaiting_agent" }
|
|
133
|
+
7. Invoke planner via Task tool → plan.md created
|
|
134
|
+
8. getNextAction() → { agent: "task-generator", status: "awaiting_agent" }
|
|
135
|
+
9. Invoke task-generator via Task tool → tasks.md created
|
|
136
|
+
10. getNextAction() → { status: "awaiting_approval" }
|
|
137
|
+
11. Ask user: "Artifacts ready. Approve implementation?"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Workflow Phases
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
RESEARCH (optional)
|
|
144
|
+
↓
|
|
145
|
+
SPECIFY
|
|
146
|
+
↓
|
|
147
|
+
PLAN
|
|
148
|
+
↓
|
|
149
|
+
TASKS
|
|
150
|
+
↓
|
|
151
|
+
[HUMAN APPROVAL REQUIRED]
|
|
152
|
+
↓
|
|
153
|
+
IMPLEMENT
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Each phase produces artifacts in `.orchestrator/artifacts/`:
|
|
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
|
+
---
|
|
164
|
+
|
|
165
|
+
## Workflow Execution Pattern (Ping-Pong Híbrido)
|
|
166
|
+
|
|
167
|
+
### Critical Rule: Always Check for Pending Actions
|
|
168
|
+
|
|
169
|
+
**MANDATORY:** After EVERY Task tool invocation that involves workflow orchestration, you MUST:
|
|
170
|
+
|
|
171
|
+
1. **Call `mcp__orchestrator-tools__getNextAction()`**
|
|
172
|
+
2. **Analyze the response and take appropriate action**
|
|
173
|
+
|
|
174
|
+
### Status → Action Mapping
|
|
175
|
+
|
|
176
|
+
| Status | Your Action |
|
|
177
|
+
|--------|-------------|
|
|
178
|
+
| `awaiting_agent` | **Immediately** invoke the specified agent via Task tool |
|
|
179
|
+
| `awaiting_approval` | **Ask user** for approval, then call `approveAction()` |
|
|
180
|
+
| `running` | Agent is currently executing, do nothing |
|
|
181
|
+
| No pending action | Workflow is complete or paused |
|
|
182
|
+
|
|
183
|
+
### Workflow Execution Loop
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
// MANDATORY PATTERN for workflow execution
|
|
187
|
+
|
|
188
|
+
// 1. Detect workflow type
|
|
189
|
+
const detection = await detectWorkflow({ prompt: "Create authentication API" });
|
|
190
|
+
|
|
191
|
+
// 2. Start workflow and get nextStep (DETERMINISTIC)
|
|
192
|
+
const startResult = await startWorkflow({
|
|
193
|
+
workflowType: detection.workflowType,
|
|
194
|
+
prompt: "Create authentication API"
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// 3. Execute nextStep - invoke orchestrator agent
|
|
198
|
+
await invokeTool("Task", {
|
|
199
|
+
subagent_type: startResult.nextStep.subagent_type, // "orchestrator"
|
|
200
|
+
prompt: startResult.nextStep.prompt
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// 4. Check for pending actions (Ping-Pong loop)
|
|
204
|
+
const action = await getNextAction();
|
|
205
|
+
|
|
206
|
+
// 5. Handle the action
|
|
207
|
+
if (action.hasAction && action.pendingAction.status === "awaiting_agent") {
|
|
208
|
+
// Immediately invoke the specified agent
|
|
209
|
+
await invokeTool("Task", {
|
|
210
|
+
subagent_type: action.pendingAction.agent,
|
|
211
|
+
prompt: action.pendingAction.prompt
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// 6. REPEAT: Check for next action after agent completes
|
|
215
|
+
const nextAction = await getNextAction();
|
|
216
|
+
// ... continue loop
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (action.hasAction && action.pendingAction.status === "awaiting_approval") {
|
|
220
|
+
// Inform user and wait for approval
|
|
221
|
+
console.log("⚠️ Workflow requires approval before continuing to IMPLEMENT phase.");
|
|
222
|
+
console.log("Review artifacts and type 'yes' to proceed.");
|
|
223
|
+
|
|
224
|
+
// After user approves:
|
|
225
|
+
await approveAction({ workflowId: action.workflowId });
|
|
226
|
+
|
|
227
|
+
// Then check for next action again
|
|
228
|
+
const nextAction = await getNextAction();
|
|
229
|
+
// ...
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### What NOT to Do
|
|
234
|
+
|
|
235
|
+
- ❌ **NEVER** skip `startWorkflow` after `detectWorkflow` - it creates the workflow and returns deterministic `nextStep`
|
|
236
|
+
- ❌ **NEVER** ignore `nextStep` from `startWorkflow` - it tells you exactly which agent to invoke
|
|
237
|
+
- ❌ **NEVER** ignore `getNextAction()` after Task tool invocation
|
|
238
|
+
- ❌ **NEVER** decide which agent to invoke without checking `pendingAction`
|
|
239
|
+
- ❌ **NEVER** skip to IMPLEMENT phase without user approval
|
|
240
|
+
- ❌ **NEVER** execute multiple phases in a single agent invocation
|
|
241
|
+
- ❌ **NEVER** use Write/Edit tools to create artifacts during orchestration (let specialized agents do it)
|
|
242
|
+
- ❌ **NEVER** invoke agents out of order defined by `pendingAction`
|
|
243
|
+
|
|
244
|
+
### Why This Pattern?
|
|
245
|
+
|
|
246
|
+
**Problem (LIM-001):** Context window bloat when orchestrator executes all phases internally in one invocation.
|
|
247
|
+
|
|
248
|
+
**Solution (Ping-Pong Híbrido):** Orchestrator acts as **dispatcher**, creating `pendingActions` that guide the CLI to invoke specialized agents in separate, isolated invocations.
|
|
249
|
+
|
|
250
|
+
**Benefits:**
|
|
251
|
+
- Each agent invocation has isolated context (< 12k tokens)
|
|
252
|
+
- Total token usage reduced by 40%+
|
|
253
|
+
- No hallucination from massive context
|
|
254
|
+
- Real agent metrics (not simulated)
|
|
255
|
+
- Workflow resumable after crashes (pendingAction persists)
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## MANDATORY: IMPLEMENT Phase Delegation
|
|
260
|
+
|
|
261
|
+
> **WARNING**
|
|
262
|
+
>
|
|
263
|
+
> The IMPLEMENT phase REQUIRES delegation to the implementer subagent.
|
|
264
|
+
> Direct implementation is FORBIDDEN and will break workflow governance.
|
|
265
|
+
|
|
266
|
+
### Trigger Phrases
|
|
267
|
+
|
|
268
|
+
When user approves implementation with ANY of these phrases:
|
|
269
|
+
|
|
270
|
+
**English:**
|
|
271
|
+
- "yes", "yes, implement", "proceed", "go ahead", "continue"
|
|
272
|
+
- "start implementation", "implement it", "do it"
|
|
273
|
+
|
|
274
|
+
**Portuguese:**
|
|
275
|
+
- "sim", "prossiga", "continue", "pode implementar"
|
|
276
|
+
- "manda ver", "vai la", "implementa"
|
|
277
|
+
|
|
278
|
+
### Required Actions (IN ORDER)
|
|
279
|
+
|
|
280
|
+
1. **ANNOUNCE DELEGATION:**
|
|
281
|
+
```
|
|
282
|
+
I will now delegate to the implementer agent to execute the tasks.
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
2. **ADVANCE PHASE:**
|
|
286
|
+
```
|
|
287
|
+
mcp__orchestrator-tools__advancePhase({ workflowId: "current-workflow-id" })
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
3. **INVOKE IMPLEMENTER (REQUIRED):**
|
|
291
|
+
```
|
|
292
|
+
Use the Task tool with subagent_type="implementer"
|
|
293
|
+
|
|
294
|
+
Prompt:
|
|
295
|
+
Execute all tasks from .orchestrator/artifacts/tasks/tasks.md
|
|
296
|
+
|
|
297
|
+
Context:
|
|
298
|
+
- Specification: .orchestrator/artifacts/specify/spec.md
|
|
299
|
+
- Plan: .orchestrator/artifacts/plan/plan.md
|
|
300
|
+
- Tasks: .orchestrator/artifacts/tasks/tasks.md
|
|
301
|
+
|
|
302
|
+
Requirements:
|
|
303
|
+
- Follow TDD (write tests BEFORE implementation)
|
|
304
|
+
- Maintain 80% minimum coverage
|
|
305
|
+
- Update orchestrator-index.json after EACH task
|
|
306
|
+
- Create checkpoint after every 3-5 tasks
|
|
307
|
+
- Generate implementation-report.md at the end
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### FORBIDDEN Actions
|
|
311
|
+
|
|
312
|
+
- Using Edit/Write tools directly for code implementation
|
|
313
|
+
- Skipping Task tool invocation
|
|
314
|
+
- Writing production code without implementer agent
|
|
315
|
+
- Forgetting to update orchestrator-index.json
|
|
316
|
+
|
|
317
|
+
### Self-Verification Checklist
|
|
318
|
+
|
|
319
|
+
Before proceeding, verify:
|
|
320
|
+
- [ ] Did I announce delegation to the user?
|
|
321
|
+
- [ ] Did I call advancePhase via MCP?
|
|
322
|
+
- [ ] Did I use Task tool with subagent_type="implementer"?
|
|
323
|
+
- [ ] Is the implementer prompt complete with all context?
|
|
324
|
+
|
|
325
|
+
If ANY answer is NO -> STOP and correct before continuing.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Quality Rules
|
|
330
|
+
|
|
331
|
+
- **TDD**: Write tests BEFORE implementation
|
|
332
|
+
- **Coverage**: Minimum 80% test coverage
|
|
333
|
+
- **SOLID**: Follow SOLID principles
|
|
334
|
+
- **Clean Architecture**: Dependencies point inward
|
|
335
|
+
- **TypeScript Strict**: `strict: true` required
|
|
336
|
+
|
|
337
|
+
## Project Structure
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
.orchestrator/
|
|
341
|
+
├── artifacts/ # Generated artifacts by phase
|
|
342
|
+
├── memory/
|
|
343
|
+
│ └── knowledge-base/
|
|
344
|
+
│ ├── core/ # CONSTITUTION.md (immutable rules)
|
|
345
|
+
│ └── contextual/ # Project context
|
|
346
|
+
├── checkpoints/ # Checkpoint metadata
|
|
347
|
+
└── orchestrator-index.json # Workflow state
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Important Notes
|
|
351
|
+
|
|
352
|
+
1. **Always start with workflow detection** - Don't skip this step
|
|
353
|
+
2. **Let agents do their work** - Don't bypass the workflow
|
|
354
|
+
3. **Validate artifacts** - Use the artifact-validator skill
|
|
355
|
+
4. **Check gates** - Use phase-gate-evaluator before advancing
|
|
356
|
+
5. **Create checkpoints** - After each validated artifact
|
|
357
|
+
6. **Consult CONSTITUTION** - For project rules and constraints
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
*This project was initialized with the Orchestrator CLI.*
|
|
362
|
+
*Generated: {{currentDate}}*
|