orchestr8 2.1.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/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # agent-workflow
2
+
3
+ A multi-agent workflow framework for automated feature development. Four specialized AI agents collaborate in sequence to take features from specification to implementation.
4
+
5
+ ## Agents
6
+
7
+ | Agent | Role |
8
+ |-------|------|
9
+ | **Alex** | System Specification & Chief-of-Staff — creates/maintains specs, guards design coherence |
10
+ | **Cass** | Story Writer/BA — translates specs into testable user stories |
11
+ | **Nigel** | Tester — converts stories into executable tests and test plans |
12
+ | **Codey** | Developer — implements code to satisfy tests (test-first) |
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npx agent-workflow init
18
+ ```
19
+
20
+ This installs the `.blueprint/` directory and `SKILL.md` into your project. If files already exist, you'll be prompted before overwriting. It also adds the workflow queue to `.gitignore`.
21
+
22
+ ### Commands
23
+
24
+ | Command | Description |
25
+ |---------|-------------|
26
+ | `npx agent-workflow init` | Initialize `.blueprint/` and `SKILL.md` in your project |
27
+ | `npx agent-workflow update` | Update agents, templates, and rituals to latest version |
28
+ | `npx agent-workflow add-skills [agent]` | Install recommended skills for an agent (alex, cass, nigel, codey, all) |
29
+ | `npx agent-workflow skills [agent]` | List recommended skills |
30
+ | `npx agent-workflow help` | Show help |
31
+
32
+ The `update` command preserves your content in `features/`, `system_specification/`, and `.business_context/` while updating the framework files.
33
+
34
+ ### Optional Skills
35
+
36
+ Each agent has recommended skills from the [skills.sh](https://skills.sh) ecosystem that enhance their capabilities:
37
+
38
+ | Agent | Skills |
39
+ |-------|--------|
40
+ | **Alex** | `avoid-feature-creep`, `feature-spec` |
41
+ | **Cass** | `user-story-writing` |
42
+ | **Nigel** | `javascript-testing-patterns`, `modern-javascript-patterns` |
43
+ | **Codey** | `javascript-expert`, `modern-javascript-patterns` |
44
+
45
+ ```bash
46
+ npx agent-workflow add-skills all # Install all recommended skills
47
+ npx agent-workflow add-skills codey # Install skills for Codey only
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ Run the pipeline with the `/implement-feature` skill in Claude Code:
53
+
54
+ ```bash
55
+ /implement-feature # Interactive
56
+ /implement-feature "user-auth" # New feature
57
+ /implement-feature "user-auth" --update-feature-spec # Update spec
58
+ /implement-feature "user-auth" --update-story "login" # Update story
59
+ /implement-feature --update-system-spec # Update system spec
60
+ ```
61
+
62
+ ### Pipeline Flow
63
+
64
+ ```
65
+ New Feature: Alex → Cass → Nigel → Codey → Commit
66
+ Update Story: Cass → Nigel → Codey → Commit
67
+ Update Feature: Alex → cascade check
68
+ Update System: Alex → cascade check
69
+ ```
70
+
71
+ ## Directory Structure
72
+
73
+ ```
74
+ .blueprint/
75
+ ├── agents/ # Agent specifications
76
+ │ ├── AGENT_SPECIFICATION_ALEX.md
77
+ │ ├── AGENT_BA_CASS.md
78
+ │ ├── AGENT_TESTER_NIGEL.md
79
+ │ └── AGENT_DEVELOPER_CODEY.md
80
+ ├── templates/ # Spec templates
81
+ │ ├── SYSTEM_SPEC.md
82
+ │ └── FEATURE_SPEC.md
83
+ ├── ways_of_working/ # Development rituals
84
+ ├── features/ # Feature specs (created per feature)
85
+ ├── system_specification/ # System spec (created on first run)
86
+ └── .business_context/ # Project-specific context
87
+ ```
88
+
89
+ ## How It Works
90
+
91
+ 1. **Alex** gates on the system spec — creates it if missing, then routes to the appropriate workflow
92
+ 2. **Cass** writes user stories with acceptance criteria from the feature spec
93
+ 3. **Nigel** creates test plans, behavior matrices, and executable tests
94
+ 4. **Codey** implements code to pass the tests, then auto-commits
95
+
96
+ The pipeline maintains a queue (`.claude/implement-queue.json`) to track progress and enable recovery on failure.
97
+
98
+ ## License
99
+
100
+ MIT
package/SKILL.md ADDED
@@ -0,0 +1,381 @@
1
+ ---
2
+ name: implement-feature
3
+ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool sub-agents
4
+ ---
5
+
6
+ # Implement Feature Skill
7
+
8
+ ## Paths
9
+
10
+ | Var | Path |
11
+ |-----|------|
12
+ | `{SYS_SPEC}` | `.blueprint/system_specification/SYSTEM_SPEC.md` |
13
+ | `{FEAT_DIR}` | `.blueprint/features/feature_{slug}` |
14
+ | `{FEAT_SPEC}` | `{FEAT_DIR}/FEATURE_SPEC.md` |
15
+ | `{STORIES}` | `{FEAT_DIR}/story-*.md` |
16
+ | `{TEST_DIR}` | `./test/artifacts/feature_{slug}` |
17
+ | `{TEST_FILE}` | `./test/feature_{slug}.test.js` |
18
+ | `{PLAN}` | `{FEAT_DIR}/IMPLEMENTATION_PLAN.md` |
19
+ | `{QUEUE}` | `.claude/implement-queue.json` |
20
+
21
+ ## Invocation
22
+
23
+ ```bash
24
+ /implement-feature # Interactive
25
+ /implement-feature "user-auth" # New feature
26
+ /implement-feature "user-auth" --pause-after=alex|cass|nigel|codey-plan
27
+ /implement-feature "user-auth" --no-commit
28
+ ```
29
+
30
+ ## Pipeline Overview
31
+
32
+ ```
33
+ /implement-feature "slug"
34
+
35
+
36
+ ┌─────────────────────────────────────────┐
37
+ │ 1. Parse args, get slug │
38
+ │ 2. Check system spec exists (gate) │
39
+ │ 3. Initialize queue │
40
+ │ 4. Route based on flags/state │
41
+ └─────────────────────────────────────────┘
42
+
43
+
44
+ SPAWN ALEX → SPAWN CASS → SPAWN NIGEL → SPAWN CODEY → AUTO-COMMIT
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Steps 1-5: Setup
50
+
51
+ ### Step 1: Parse Arguments
52
+ Extract: `{slug}`, pause gates (`--pause-after`), `--no-commit`
53
+
54
+ ### Step 2: Get Feature Slug
55
+ If not provided: Ask user, convert to slug format (lowercase, hyphens), confirm.
56
+
57
+ ### Step 3: System Spec Gate
58
+ Check `{SYS_SPEC}` exists. If not: run Alex to create it, then **stop for review**.
59
+
60
+ ### Step 4: Route
61
+ - Slug exists at `{FEAT_DIR}` → ask: continue from last state or restart
62
+ - No slug → new feature pipeline
63
+
64
+ ### Step 5: Initialize
65
+ Create/read `{QUEUE}`. Ensure dirs exist: `mkdir -p {FEAT_DIR} {TEST_DIR}`
66
+
67
+ ---
68
+
69
+ ## Step 6: Spawn Alex Agent
70
+
71
+ Use the Task tool with `subagent_type="general-purpose"`:
72
+
73
+ **Prompt:**
74
+ ```
75
+ You are Alex, the System Specification & Chief-of-Staff Agent.
76
+
77
+ Read your full specification from: .blueprint/agents/AGENT_SPECIFICATION_ALEX.md
78
+
79
+ ## Your Task
80
+ Create a feature specification for "{slug}".
81
+
82
+ ## Inputs (read these files)
83
+ - System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
84
+ - Template: .blueprint/templates/FEATURE_SPEC.md
85
+ - Business Context: .blueprint/.business_context/
86
+
87
+ ## Output (write this file)
88
+ Write the feature spec to: {FEAT_DIR}/FEATURE_SPEC.md
89
+
90
+ ## Completion
91
+ When done, summarize:
92
+ - Feature intent
93
+ - Key behaviours
94
+ - Scope boundaries
95
+ - Story themes you recommend
96
+ - Any system spec tensions found
97
+ ```
98
+
99
+ **On completion:**
100
+ 1. Verify `{FEAT_SPEC}` exists
101
+ 2. Update queue: move feature to `cassQueue`
102
+ 3. If `--pause-after=alex`: Show output path, ask user to continue
103
+
104
+ **On failure:** Ask user (retry / skip / abort)
105
+
106
+ ---
107
+
108
+ ## Step 7: Spawn Cass Agent
109
+
110
+ Use the Task tool with `subagent_type="general-purpose"`:
111
+
112
+ **Prompt:**
113
+ ```
114
+ You are Cass, the Story Writer Agent.
115
+
116
+ Read your full specification from: .blueprint/agents/AGENT_BA_CASS.md
117
+
118
+ ## Your Task
119
+ Create user stories for feature "{slug}".
120
+
121
+ ## Inputs (read these files)
122
+ - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
123
+ - System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
124
+
125
+ ## Output (write these files)
126
+ Create one markdown file per user story in {FEAT_DIR}/:
127
+ - story-{story-slug}.md (e.g., story-login.md, story-logout.md)
128
+
129
+ Each story must include:
130
+ - User story in standard format
131
+ - Context/scope
132
+ - Acceptance criteria (Given/When/Then)
133
+ - Session persistence shape (if relevant)
134
+ - Out of scope items
135
+
136
+ ## Completion
137
+ When done, summarize:
138
+ - Number of stories created
139
+ - Story filenames
140
+ - Key behaviours covered
141
+ ```
142
+
143
+ **On completion:**
144
+ 1. Verify at least one `story-*.md` exists in `{FEAT_DIR}`
145
+ 2. Update queue: move feature to `nigelQueue`
146
+ 3. If `--pause-after=cass`: Show story paths, ask user to continue
147
+
148
+ **On failure:** Ask user (retry / skip / abort)
149
+
150
+ ---
151
+
152
+ ## Step 8: Spawn Nigel Agent
153
+
154
+ Use the Task tool with `subagent_type="general-purpose"`:
155
+
156
+ **Prompt:**
157
+ ```
158
+ You are Nigel, the Tester Agent.
159
+
160
+ Read your full specification from: .blueprint/agents/AGENT_TESTER_NIGEL.md
161
+
162
+ ## Your Task
163
+ Create tests for feature "{slug}".
164
+
165
+ ## Inputs (read these files)
166
+ - Stories: {FEAT_DIR}/story-*.md
167
+ - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
168
+ - System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
169
+
170
+ ## Outputs (write these files)
171
+ 1. Test artifacts in {TEST_DIR}/:
172
+ - understanding.md
173
+ - test-plan.md
174
+ - test-behaviour-matrix.md
175
+ - implementation-guide.md
176
+
177
+ 2. Executable tests:
178
+ - {TEST_FILE}
179
+
180
+ ## Completion
181
+ When done, summarize:
182
+ - Test count
183
+ - Coverage of acceptance criteria
184
+ - Key assumptions made
185
+ ```
186
+
187
+ **On completion:**
188
+ 1. Verify `{TEST_FILE}` exists
189
+ 2. Update queue: move feature to `codeyQueue`
190
+ 3. If `--pause-after=nigel`: Show test paths, ask user to continue
191
+
192
+ **On failure:** Ask user (retry / skip / abort)
193
+
194
+ ---
195
+
196
+ ## Step 9: Spawn Codey Agent (Plan)
197
+
198
+ Use the Task tool with `subagent_type="general-purpose"`:
199
+
200
+ **Prompt:**
201
+ ```
202
+ You are Codey, the Developer Agent.
203
+
204
+ Read your full specification from: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
205
+
206
+ ## Your Task
207
+ Create an implementation plan for feature "{slug}". Do NOT implement yet.
208
+
209
+ ## Inputs (read these files)
210
+ - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
211
+ - Stories: {FEAT_DIR}/story-*.md
212
+ - Test Artifacts: {TEST_DIR}/
213
+ - Tests: {TEST_FILE}
214
+
215
+ ## Output (write this file)
216
+ Write implementation plan to: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
217
+
218
+ Plan structure:
219
+ ## Summary
220
+ ## Understanding (behaviors, test count)
221
+ ## Files to Create/Modify
222
+ ## Implementation Steps
223
+ ## Data Model (if applicable)
224
+ ## Validation Rules
225
+ ## Risks/Questions
226
+ ## Definition of Done
227
+ ```
228
+
229
+ **On completion:**
230
+ 1. Verify `{PLAN}` exists
231
+ 2. If `--pause-after=codey-plan`: Show plan path, ask user to continue
232
+
233
+ **On failure:** Ask user (retry / skip / abort)
234
+
235
+ ---
236
+
237
+ ## Step 10: Spawn Codey Agent (Implement)
238
+
239
+ Use the Task tool with `subagent_type="general-purpose"`:
240
+
241
+ **Prompt:**
242
+ ```
243
+ You are Codey, the Developer Agent.
244
+
245
+ Read your full specification from: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
246
+
247
+ ## Your Task
248
+ Implement feature "{slug}" according to the plan.
249
+
250
+ ## Inputs (read these files)
251
+ - Implementation Plan: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
252
+ - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
253
+ - Stories: {FEAT_DIR}/story-*.md
254
+ - Test Artifacts: {TEST_DIR}/
255
+ - Tests: {TEST_FILE}
256
+
257
+ ## Process
258
+ 1. Run tests to establish baseline: npm test
259
+ 2. Implement code to make tests pass
260
+ 3. Run npm test to verify all tests pass
261
+ 4. Run npm run lint (if available) to verify code quality
262
+
263
+ ## Important
264
+ - Do NOT commit changes
265
+ - Do NOT modify test assertions unless they contain bugs
266
+ - Focus on making tests pass
267
+
268
+ ## Completion
269
+ When done, summarize:
270
+ - Files created/modified
271
+ - Test status (pass/fail count)
272
+ - Any issues encountered
273
+ ```
274
+
275
+ **On completion:**
276
+ 1. Run `npm test` to verify
277
+ 2. Update queue: move feature to `completed`
278
+ 3. Proceed to auto-commit (unless `--no-commit`)
279
+
280
+ **On failure:** Ask user (retry / skip / abort)
281
+
282
+ ---
283
+
284
+ ## Step 11: Auto-commit
285
+
286
+ If not `--no-commit`:
287
+
288
+ ```bash
289
+ git add {FEAT_DIR}/ {TEST_DIR}/ {TEST_FILE}
290
+ # Add any implementation files created by Codey
291
+ git status --short
292
+ ```
293
+
294
+ Commit message:
295
+ ```
296
+ feat({slug}): Add {slug} feature
297
+
298
+ Artifacts:
299
+ - Feature spec by Alex
300
+ - User stories by Cass
301
+ - Tests by Nigel
302
+ - Implementation by Codey
303
+
304
+ Co-Authored-By: Claude <noreply@anthropic.com>
305
+ ```
306
+
307
+ ---
308
+
309
+ ## Step 12: Report Status
310
+
311
+ ```
312
+ ## Completed
313
+ - feature_{slug}
314
+ - Stories: N
315
+ - Tests: N (all passing)
316
+ - Commit: {hash}
317
+
318
+ ## Next Action
319
+ Pipeline complete. Run `npm test` to verify or `/implement-feature` for next feature.
320
+ ```
321
+
322
+ ---
323
+
324
+ ## Error Handling
325
+
326
+ After each agent spawn, if the Task tool returns an error or output validation fails:
327
+
328
+ **Ask the user:**
329
+ 1. **Retry** - Re-run the agent with same inputs
330
+ 2. **Skip** - Move to next stage anyway (with warning about missing artifacts)
331
+ 3. **Abort** - Stop pipeline, update queue with failure for recovery
332
+
333
+ **On abort:** Update queue `failed` array with:
334
+ ```json
335
+ {
336
+ "slug": "{slug}",
337
+ "stage": "{stage}",
338
+ "reason": "{error message}",
339
+ "timestamp": "{ISO timestamp}"
340
+ }
341
+ ```
342
+
343
+ ---
344
+
345
+ ## Queue Structure
346
+
347
+ Location: `.claude/implement-queue.json`
348
+
349
+ ```json
350
+ {
351
+ "lastUpdated": "2025-02-01T12:00:00Z",
352
+ "current": {
353
+ "slug": "user-auth",
354
+ "stage": "cass",
355
+ "startedAt": "2025-02-01T11:55:00Z"
356
+ },
357
+ "alexQueue": [],
358
+ "cassQueue": [{ "slug": "user-auth", "featureSpec": "..." }],
359
+ "nigelQueue": [],
360
+ "codeyQueue": [],
361
+ "completed": [{ "slug": "...", "testCount": 5, "commitHash": "abc123" }],
362
+ "failed": []
363
+ }
364
+ ```
365
+
366
+ ---
367
+
368
+ ## Recovery
369
+
370
+ Run `/implement-feature` again - reads queue and resumes from `current.stage`.
371
+
372
+ ---
373
+
374
+ ## Agent References
375
+
376
+ | Agent | File |
377
+ |-------|------|
378
+ | Alex | `.blueprint/agents/AGENT_SPECIFICATION_ALEX.md` |
379
+ | Cass | `.blueprint/agents/AGENT_BA_CASS.md` |
380
+ | Nigel | `.blueprint/agents/AGENT_TESTER_NIGEL.md` |
381
+ | Codey | `.blueprint/agents/AGENT_DEVELOPER_CODEY.md` |
package/bin/cli.js ADDED
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { init } = require('../src/init');
4
+ const { update } = require('../src/update');
5
+ const { addSkills, listSkills } = require('../src/skills');
6
+ const { displayQueue, resetQueue } = require('../src/orchestrator');
7
+
8
+ const args = process.argv.slice(2);
9
+ const command = args[0];
10
+ const subArg = args[1];
11
+
12
+ const commands = {
13
+ init: {
14
+ fn: init,
15
+ description: 'Initialize .blueprint directory in current project'
16
+ },
17
+ update: {
18
+ fn: update,
19
+ description: 'Update agents, templates, and rituals (preserves your content)'
20
+ },
21
+ 'add-skills': {
22
+ fn: () => addSkills(subArg || 'all'),
23
+ description: 'Install recommended skills for an agent (or all)'
24
+ },
25
+ skills: {
26
+ fn: () => listSkills(subArg),
27
+ description: 'List recommended skills for agents'
28
+ },
29
+ queue: {
30
+ fn: () => {
31
+ if (subArg === 'reset') {
32
+ resetQueue();
33
+ console.log('Queue has been reset.');
34
+ } else {
35
+ displayQueue();
36
+ }
37
+ },
38
+ description: 'Show queue status (use "reset" to clear)'
39
+ },
40
+ help: {
41
+ fn: showHelp,
42
+ description: 'Show this help message'
43
+ }
44
+ };
45
+
46
+ function showHelp() {
47
+ console.log(`
48
+ agent-workflow - Multi-agent workflow framework
49
+
50
+ Usage: agent-workflow <command> [options]
51
+
52
+ Commands:
53
+ init Initialize .blueprint directory in current project
54
+ update Update agents, templates, and rituals (preserves your content)
55
+ add-skills [agent] Install recommended skills for an agent (alex, cass, nigel, codey, all)
56
+ skills [agent] List recommended skills for agents
57
+ queue Show current queue state for /implement-feature pipeline
58
+ queue reset Clear the queue and reset all state
59
+ help Show this help message
60
+
61
+ Examples:
62
+ npx agent-workflow init
63
+ npx agent-workflow update
64
+ npx agent-workflow add-skills all
65
+ npx agent-workflow add-skills codey
66
+ npx agent-workflow skills
67
+ npx agent-workflow queue
68
+ npx agent-workflow queue reset
69
+ `);
70
+ }
71
+
72
+ async function main() {
73
+ if (!command || command === 'help' || command === '--help' || command === '-h') {
74
+ showHelp();
75
+ process.exit(0);
76
+ }
77
+
78
+ const cmd = commands[command];
79
+ if (!cmd) {
80
+ console.error(`Unknown command: ${command}`);
81
+ console.error('Run "agent-workflow help" for usage information.');
82
+ process.exit(1);
83
+ }
84
+
85
+ try {
86
+ await cmd.fn();
87
+ } catch (error) {
88
+ console.error(`Error: ${error.message}`);
89
+ process.exit(1);
90
+ }
91
+ }
92
+
93
+ main();
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "orchestr8",
3
+ "version": "2.1.3",
4
+ "description": "Multi-agent workflow framework for automated feature development",
5
+ "main": "src/index.js",
6
+ "bin": {
7
+ "orchestr8": "bin/cli.js"
8
+ },
9
+ "scripts": {
10
+ "test": "node --test"
11
+ },
12
+ "keywords": [
13
+ "agent",
14
+ "workflow",
15
+ "ai",
16
+ "automation",
17
+ "claude",
18
+ "feature-development"
19
+ ],
20
+ "author": "NewmanJustice",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/NewmanJustice/agent-workflow.git"
24
+ },
25
+ "license": "MIT",
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "files": [
30
+ "bin",
31
+ "src",
32
+ ".blueprint",
33
+ "SKILL.md"
34
+ ]
35
+ }
package/src/index.js ADDED
@@ -0,0 +1,5 @@
1
+ const { init } = require('./init');
2
+ const { update } = require('./update');
3
+ const { addSkills, listSkills, AGENT_SKILLS } = require('./skills');
4
+
5
+ module.exports = { init, update, addSkills, listSkills, AGENT_SKILLS };