agent-orchestrator-kit 0.1.8 → 0.1.9
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/CHANGELOG.md +9 -0
- package/README.md +49 -2
- package/bin/agent-orchestrator.js +35 -7
- package/package.json +1 -1
- package/profiles/generic/orchestrator.yaml +5 -0
- package/profiles/mvp/orchestrator.yaml +6 -0
- package/profiles/node/orchestrator.yaml +5 -0
- package/profiles/vue3/orchestrator.yaml +5 -0
- package/templates/.agents/commands/opsx-design.md +127 -0
- package/templates/.agents/rules/agent-orchestration.mdc +8 -3
- package/templates/.agents/rules/openspec-workflow.mdc +3 -1
- package/templates/.agents/skills/agent-orchestration/SKILL.md +24 -5
- package/templates/AGENTS.md +12 -6
- package/templates/CLAUDE.md +4 -1
- package/templates/orchestrator.yaml +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.9] - 2026-07-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Design intake** — optional `/opsx:design` phase: captures Figma / export / screenshot / photo into `design-brief.md` + `assets/` (writes only those paths)
|
|
9
|
+
- **Role `design_intake`** in templates and all profiles (`generic`, `vue3`, `node`, `mvp`) with `pipeline.require_design_brief: false` (opt-in)
|
|
10
|
+
- **`gate-check` design brief gate** — when `require_design_brief: true` and `src/` changed, requires `design-brief.md` or `Design: none` in `proposal.md`
|
|
11
|
+
- **`status`** shows `brief: yes/no` for every active change
|
|
12
|
+
- **Docs** — AGENTS.md / CLAUDE.md / rules / agent-orchestration skill / README section for design intake and manual enable after `update`
|
|
13
|
+
|
|
5
14
|
## [0.1.8] - 2026-07-07
|
|
6
15
|
|
|
7
16
|
### Changed
|
package/README.md
CHANGED
|
@@ -411,13 +411,54 @@ Orchestration hard rules (review approval, one active change) used to rely entir
|
|
|
411
411
|
npx agent-orchestrator-kit status
|
|
412
412
|
```
|
|
413
413
|
|
|
414
|
-
Prints every active OpenSpec change with task progress (`N/M tasks`), review verdict (`APPROVE` / `REQUEST CHANGES` / `none`), and a `ready to archive` flag once all tasks are `[x]` — no more running `openspec status` per change by hand.
|
|
414
|
+
Prints every active OpenSpec change with task progress (`N/M tasks`), review verdict (`APPROVE` / `REQUEST CHANGES` / `none`), design brief (`brief: yes/no`), and a `ready to archive` flag once all tasks are `[x]` — no more running `openspec status` per change by hand.
|
|
415
415
|
|
|
416
416
|
```bash
|
|
417
417
|
npx agent-orchestrator-kit gate-check [change-name] [--src-glob src/] [--base HEAD~1]
|
|
418
418
|
```
|
|
419
419
|
|
|
420
|
-
Fails (non-zero exit) when `pipeline.require_spec_review: true`, the diff against `--base` touches `--src-glob`, and the active change has no `review.md` with `Verdict: APPROVE`. It degrades gracefully to exit 0 (with a message, not silently) when: `.agents/orchestrator.yaml` is missing, review
|
|
420
|
+
Fails (non-zero exit) when `pipeline.require_spec_review: true`, the diff against `--base` touches `--src-glob`, and the active change has no `review.md` with `Verdict: APPROVE`. When `pipeline.require_design_brief: true` and `src/` changed, it also requires `design-brief.md` (or a `Design: none` line in `proposal.md` for non-UI changes). It degrades gracefully to exit 0 (with a message, not silently) when: `.agents/orchestrator.yaml` is missing, neither review nor design brief is required, the diff can't be computed (e.g. shallow clone), or nothing under `--src-glob` changed. It also warns (never fails) when active changes exceed `pipeline.max_active_changes`. Both `agent-verify.yml` fragments (GitHub and GitLab) call `gate-check` automatically.
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
### Design intake: `/opsx:design`
|
|
425
|
+
|
|
426
|
+
Optional phase between explore and propose (or before apply) that captures design into a durable artifact so implement sessions do not depend on live Figma MCP:
|
|
427
|
+
|
|
428
|
+
```
|
|
429
|
+
/opsx:design add-login-form
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
Writes only:
|
|
433
|
+
- `openspec/changes/<name>/design-brief.md` — Source, Structure, Tokens, Reference images, Constraints, Confidence notes
|
|
434
|
+
- `openspec/changes/<name>/assets/` — reference PNGs
|
|
435
|
+
|
|
436
|
+
Source fallback: Figma MCP (one pass) → exported images → screenshots → photos. Raster sources must mark inferred values with confidence notes.
|
|
437
|
+
|
|
438
|
+
**Opt-in gate** (default off — existing projects unchanged):
|
|
439
|
+
|
|
440
|
+
```yaml
|
|
441
|
+
pipeline:
|
|
442
|
+
require_design_brief: true # gate-check fails without brief when src/ changed
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Non-UI changes: add this line to `proposal.md`:
|
|
446
|
+
|
|
447
|
+
```
|
|
448
|
+
Design: none
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Existing projects after `update`:** the command file `opsx-design.md` is installed automatically. Your `orchestrator.yaml` is never overwritten — add the role and flag manually if you want the gate:
|
|
452
|
+
|
|
453
|
+
```yaml
|
|
454
|
+
pipeline:
|
|
455
|
+
require_design_brief: false # set true to enforce
|
|
456
|
+
roles:
|
|
457
|
+
design_intake:
|
|
458
|
+
command: /opsx:design
|
|
459
|
+
mode: brief-only
|
|
460
|
+
model_hint: strong
|
|
461
|
+
```
|
|
421
462
|
|
|
422
463
|
---
|
|
423
464
|
|
|
@@ -441,6 +482,7 @@ project:
|
|
|
441
482
|
|
|
442
483
|
pipeline:
|
|
443
484
|
require_spec_review: true
|
|
485
|
+
require_design_brief: false # opt-in: require design-brief.md when src/ changed
|
|
444
486
|
max_active_changes: 1
|
|
445
487
|
archive_after_merge: true
|
|
446
488
|
|
|
@@ -631,6 +673,11 @@ openspec/ # Committed — spec-driven workflow
|
|
|
631
673
|
|
|
632
674
|
## Changelog
|
|
633
675
|
|
|
676
|
+
### 0.1.9
|
|
677
|
+
- Design intake — `/opsx:design` captures design into `design-brief.md` + `assets/` (Figma / export / screenshot / photo)
|
|
678
|
+
- Role `design_intake` + opt-in `pipeline.require_design_brief` (default `false`) in all profiles
|
|
679
|
+
- `gate-check` enforces design brief when enabled (`Design: none` opt-out for non-UI); `status` shows `brief: yes/no`
|
|
680
|
+
|
|
634
681
|
### 0.1.8
|
|
635
682
|
- README — Quickstart (new vs existing project) and upgrade guide for adopting `status`, `gate-check`, and GitHub Spec Verifier
|
|
636
683
|
|
|
@@ -178,14 +178,27 @@ function parseReviewVerdict(changeDir) {
|
|
|
178
178
|
return match ? match[1].trim() : 'unknown';
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
function parseDesignBrief(changeDir) {
|
|
182
|
+
return existsSync(join(changeDir, 'design-brief.md'));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function hasDesignOptOut(changeDir) {
|
|
186
|
+
const proposalPath = join(changeDir, 'proposal.md');
|
|
187
|
+
if (!existsSync(proposalPath)) return false;
|
|
188
|
+
const content = readFileSync(proposalPath, 'utf-8');
|
|
189
|
+
return /^Design:\s*none/mi.test(content);
|
|
190
|
+
}
|
|
191
|
+
|
|
181
192
|
function readPipelineConfig(projectDir) {
|
|
182
193
|
const orchPath = join(projectDir, '.agents', 'orchestrator.yaml');
|
|
183
194
|
if (!existsSync(orchPath)) return null;
|
|
184
195
|
const content = readFileSync(orchPath, 'utf-8');
|
|
185
196
|
const requireReviewMatch = content.match(/require_spec_review:\s*(true|false)/);
|
|
197
|
+
const requireBriefMatch = content.match(/require_design_brief:\s*(true|false)/);
|
|
186
198
|
const maxActiveMatch = content.match(/max_active_changes:\s*(\d+)/);
|
|
187
199
|
return {
|
|
188
200
|
requireSpecReview: requireReviewMatch ? requireReviewMatch[1] === 'true' : true,
|
|
201
|
+
requireDesignBrief: requireBriefMatch ? requireBriefMatch[1] === 'true' : false,
|
|
189
202
|
maxActiveChanges: maxActiveMatch ? parseInt(maxActiveMatch[1], 10) : null,
|
|
190
203
|
};
|
|
191
204
|
}
|
|
@@ -643,6 +656,7 @@ program
|
|
|
643
656
|
const changeDir = join(projectDir, 'openspec', 'changes', name);
|
|
644
657
|
const progress = parseTasksProgress(changeDir);
|
|
645
658
|
const verdict = parseReviewVerdict(changeDir);
|
|
659
|
+
const hasBrief = parseDesignBrief(changeDir);
|
|
646
660
|
const progressStr = progress ? `${progress.done}/${progress.total} tasks` : 'no tasks.md';
|
|
647
661
|
const verdictStr = verdict || 'none';
|
|
648
662
|
const readyToArchive = Boolean(progress && progress.total > 0 && progress.done === progress.total);
|
|
@@ -650,6 +664,7 @@ program
|
|
|
650
664
|
console.log(`\n${pc.bold(name)}`);
|
|
651
665
|
console.log(` tasks: ${progressStr}`);
|
|
652
666
|
console.log(` review: ${verdictStr}`);
|
|
667
|
+
console.log(` brief: ${hasBrief ? 'yes' : 'no'}`);
|
|
653
668
|
if (readyToArchive) log.ok('ready to archive');
|
|
654
669
|
}
|
|
655
670
|
console.log('');
|
|
@@ -670,7 +685,7 @@ program
|
|
|
670
685
|
return;
|
|
671
686
|
}
|
|
672
687
|
|
|
673
|
-
if (!config.requireSpecReview) {
|
|
688
|
+
if (!config.requireSpecReview && !config.requireDesignBrief) {
|
|
674
689
|
log.ok('review not required (pipeline.require_spec_review: false)');
|
|
675
690
|
return;
|
|
676
691
|
}
|
|
@@ -709,15 +724,28 @@ program
|
|
|
709
724
|
return;
|
|
710
725
|
}
|
|
711
726
|
|
|
712
|
-
|
|
713
|
-
|
|
727
|
+
if (config.requireSpecReview) {
|
|
728
|
+
const verdict = parseReviewVerdict(changeDir);
|
|
729
|
+
if (!(verdict && /^APPROVE/i.test(verdict))) {
|
|
730
|
+
log.err(`review gate failed — change "${target}" has ${verdict ? `verdict "${verdict}"` : 'no review.md'}`);
|
|
731
|
+
log.err(`Run /opsx:review ${target} and get an explicit APPROVE before apply/merge.`);
|
|
732
|
+
process.exitCode = 1;
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
714
735
|
log.ok(`review gate passed — ${target}: APPROVE`);
|
|
715
|
-
|
|
736
|
+
} else {
|
|
737
|
+
log.ok('review not required (pipeline.require_spec_review: false)');
|
|
716
738
|
}
|
|
717
739
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
740
|
+
if (config.requireDesignBrief) {
|
|
741
|
+
if (parseDesignBrief(changeDir) || hasDesignOptOut(changeDir)) {
|
|
742
|
+
log.ok(`design brief gate passed — ${target}`);
|
|
743
|
+
} else {
|
|
744
|
+
log.err(`design brief gate failed — change "${target}" has no design-brief.md`);
|
|
745
|
+
log.err(`Run /opsx:design ${target} (or add "Design: none" to proposal.md for non-UI changes).`);
|
|
746
|
+
process.exitCode = 1;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
721
749
|
});
|
|
722
750
|
|
|
723
751
|
program.parse();
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ project:
|
|
|
7
7
|
|
|
8
8
|
pipeline:
|
|
9
9
|
require_spec_review: true
|
|
10
|
+
require_design_brief: false
|
|
10
11
|
max_active_changes: 1
|
|
11
12
|
archive_after_merge: true
|
|
12
13
|
|
|
@@ -15,6 +16,10 @@ roles:
|
|
|
15
16
|
command: /opsx:explore
|
|
16
17
|
mode: read-only
|
|
17
18
|
model_hint: fast
|
|
19
|
+
design_intake:
|
|
20
|
+
command: /opsx:design
|
|
21
|
+
mode: brief-only
|
|
22
|
+
model_hint: strong
|
|
18
23
|
architect:
|
|
19
24
|
command: /opsx:propose
|
|
20
25
|
mode: specs-only
|
|
@@ -11,6 +11,7 @@ package_manager: npm
|
|
|
11
11
|
|
|
12
12
|
pipeline:
|
|
13
13
|
require_spec_review: false
|
|
14
|
+
require_design_brief: false
|
|
14
15
|
max_active_changes: 3
|
|
15
16
|
archive_after_merge: false
|
|
16
17
|
quick_mode_enabled: true
|
|
@@ -20,6 +21,11 @@ roles:
|
|
|
20
21
|
command: /opsx:explore
|
|
21
22
|
mode: read-only
|
|
22
23
|
model_hint: fast
|
|
24
|
+
design_intake:
|
|
25
|
+
command: /opsx:design
|
|
26
|
+
mode: brief-only
|
|
27
|
+
model_hint: strong
|
|
28
|
+
notes: "In quick mode, the same session may create the brief before propose+apply"
|
|
23
29
|
architect:
|
|
24
30
|
command: /opsx:propose
|
|
25
31
|
mode: specs-only
|
|
@@ -10,6 +10,7 @@ package_manager: npm
|
|
|
10
10
|
|
|
11
11
|
pipeline:
|
|
12
12
|
require_spec_review: true
|
|
13
|
+
require_design_brief: false
|
|
13
14
|
max_active_changes: 1
|
|
14
15
|
archive_after_merge: true
|
|
15
16
|
|
|
@@ -18,6 +19,10 @@ roles:
|
|
|
18
19
|
command: /opsx:explore
|
|
19
20
|
mode: read-only
|
|
20
21
|
model_hint: fast
|
|
22
|
+
design_intake:
|
|
23
|
+
command: /opsx:design
|
|
24
|
+
mode: brief-only
|
|
25
|
+
model_hint: strong
|
|
21
26
|
architect:
|
|
22
27
|
command: /opsx:propose
|
|
23
28
|
mode: specs-only
|
|
@@ -10,6 +10,7 @@ package_manager: npm
|
|
|
10
10
|
|
|
11
11
|
pipeline:
|
|
12
12
|
require_spec_review: true
|
|
13
|
+
require_design_brief: false
|
|
13
14
|
max_active_changes: 1
|
|
14
15
|
archive_after_merge: true
|
|
15
16
|
|
|
@@ -18,6 +19,10 @@ roles:
|
|
|
18
19
|
command: /opsx:explore
|
|
19
20
|
mode: read-only
|
|
20
21
|
model_hint: fast
|
|
22
|
+
design_intake:
|
|
23
|
+
command: /opsx:design
|
|
24
|
+
mode: brief-only
|
|
25
|
+
model_hint: strong
|
|
21
26
|
architect:
|
|
22
27
|
command: /opsx:propose
|
|
23
28
|
mode: specs-only
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /opsx-design
|
|
3
|
+
id: opsx-design
|
|
4
|
+
category: Workflow
|
|
5
|
+
description: Capture design from any source into a durable design brief for an OpenSpec change
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Capture design into a durable brief for an OpenSpec change. One-shot intake from Figma, exports, screenshots, or photos — then apply never needs live design tools.
|
|
9
|
+
|
|
10
|
+
**IMPORTANT: You must NEVER edit any file in `src/` or any source code. You may write only `openspec/changes/<name>/design-brief.md` and files under `openspec/changes/<name>/assets/`.**
|
|
11
|
+
|
|
12
|
+
**Input**: Optionally specify a change name (e.g., `/opsx:design add-login-form`). If omitted, auto-select if one active change exists, otherwise list and ask. If the change does not exist yet, create the change directory when writing the brief (after explore chose the name).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
### 1. Select the change
|
|
19
|
+
|
|
20
|
+
If name provided — use it. Otherwise:
|
|
21
|
+
- Run `openspec list --json` to list active changes.
|
|
22
|
+
- Auto-select if only one exists.
|
|
23
|
+
- Ask the user if ambiguous.
|
|
24
|
+
|
|
25
|
+
Announce: "Design intake for change: **<name>**"
|
|
26
|
+
|
|
27
|
+
### 2. Choose source (fallback ladder)
|
|
28
|
+
|
|
29
|
+
Use the first available source; do not climb the ladder twice:
|
|
30
|
+
|
|
31
|
+
1. **Figma MCP** — one pass only (`get_design_context` / screenshot / metadata). Capture everything needed immediately; never call Figma again during later apply.
|
|
32
|
+
2. **Exported images** — PNG/SVG already in the repo or attached by the user.
|
|
33
|
+
3. **Screenshots** — UI captures (desktop/mobile).
|
|
34
|
+
4. **Photos** — physical mockups or whiteboard photos.
|
|
35
|
+
|
|
36
|
+
Ask the user for the source if unclear. Prefer Figma when a `figma.com` URL is given.
|
|
37
|
+
|
|
38
|
+
### 3. Capture into assets/
|
|
39
|
+
|
|
40
|
+
Save reference images under `openspec/changes/<name>/assets/`:
|
|
41
|
+
- Prefer compressed PNG; ~1–2 images per breakpoint
|
|
42
|
+
- Do not commit raw video, PSD, or huge originals
|
|
43
|
+
- Name files clearly: `desktop.png`, `mobile.png`, `hero-detail.png`
|
|
44
|
+
|
|
45
|
+
### 4. Write design-brief.md
|
|
46
|
+
|
|
47
|
+
Create or overwrite `openspec/changes/<name>/design-brief.md` using this template:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Design Brief
|
|
51
|
+
|
|
52
|
+
**Change:** <name>
|
|
53
|
+
**Captured:** <ISO date>
|
|
54
|
+
|
|
55
|
+
## Source
|
|
56
|
+
|
|
57
|
+
- Type: Figma | export | screenshot | photo
|
|
58
|
+
- URL / path: <figma URL or file path>
|
|
59
|
+
- File key / node ids: <if Figma>
|
|
60
|
+
- Capture date: <ISO date>
|
|
61
|
+
- Notes: <auth, branch, frame names>
|
|
62
|
+
|
|
63
|
+
## Structure
|
|
64
|
+
|
|
65
|
+
- Layout hierarchy (sections, regions, key components)
|
|
66
|
+
- Responsive breakpoints if known
|
|
67
|
+
- Navigation / interaction notes relevant to implementation
|
|
68
|
+
|
|
69
|
+
## Tokens
|
|
70
|
+
|
|
71
|
+
- Colors: <hex or token names>
|
|
72
|
+
- Typography: <families, sizes, weights>
|
|
73
|
+
- Spacing: <scale or measured gaps>
|
|
74
|
+
- Radii / shadows / borders: <as observed>
|
|
75
|
+
|
|
76
|
+
## Reference images
|
|
77
|
+
|
|
78
|
+
- `assets/<file>` — <what it shows>
|
|
79
|
+
|
|
80
|
+
## Constraints
|
|
81
|
+
|
|
82
|
+
- Must match: <hard constraints from design>
|
|
83
|
+
- Out of scope / approximate OK: <soft areas>
|
|
84
|
+
- Non-UI change? If this change has no UI, put `Design: none` in `proposal.md` instead of this brief.
|
|
85
|
+
|
|
86
|
+
## Confidence notes
|
|
87
|
+
|
|
88
|
+
- Measured / from Figma: <list>
|
|
89
|
+
- Inferred (screenshot/photo): mark each inferred value with a confidence marker, e.g. `~8px (medium confidence)` or `color ≈ #1a1a1a (low confidence)`
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 5. Confidence markers for raster sources
|
|
93
|
+
|
|
94
|
+
When the source is a **screenshot** or **photo** (not Figma MCP / vector export):
|
|
95
|
+
- Do not present guessed spacing, colors, or type sizes as facts
|
|
96
|
+
- Mark every inferred token/value with a confidence note in **Confidence notes** and inline in **Tokens** where useful
|
|
97
|
+
- Prefer ranges or approximations over fake precision
|
|
98
|
+
|
|
99
|
+
### 6. Handoff
|
|
100
|
+
|
|
101
|
+
Output a short summary:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
## Design Intake Complete
|
|
105
|
+
|
|
106
|
+
**Change:** <name>
|
|
107
|
+
**Brief:** openspec/changes/<name>/design-brief.md
|
|
108
|
+
**Assets:** N file(s) under assets/
|
|
109
|
+
|
|
110
|
+
### Next
|
|
111
|
+
- Continue with `/opsx:propose <name>` if artifacts are missing
|
|
112
|
+
- Or `/opsx:apply <name>` — Implementer must use the brief, not live Figma MCP
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
For non-UI changes: do not invent a brief. Tell the Architect to add a line `Design: none` in `proposal.md` so `gate-check` can opt out when `require_design_brief: true`.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Guardrails
|
|
120
|
+
|
|
121
|
+
- **Never** edit source code or `src/`
|
|
122
|
+
- **Never** edit `tasks.md`, `review.md`, or other OpenSpec artifacts except creating the change folder if needed for the brief
|
|
123
|
+
- **May write only** `openspec/changes/<name>/design-brief.md` and `openspec/changes/<name>/assets/*`
|
|
124
|
+
- **Never** rely on a second Figma MCP pass later — store everything in the brief now
|
|
125
|
+
- **Never** tell apply sessions to open live Figma; point them at the brief + assets
|
|
126
|
+
- Keep `assets/` small (compressed PNG, few files)
|
|
127
|
+
- Ask for clarification only if the source is missing or unreadable
|
|
@@ -5,10 +5,11 @@ alwaysApply: true
|
|
|
5
5
|
|
|
6
6
|
# Agent Orchestration Rules
|
|
7
7
|
|
|
8
|
-
This project uses a spec-driven
|
|
8
|
+
This project uses a spec-driven role pipeline. Read `.agents/orchestrator.yaml` for config.
|
|
9
9
|
|
|
10
10
|
## Role Commands
|
|
11
11
|
- `/opsx:explore` → read-only thinking, no code
|
|
12
|
+
- `/opsx:design <name>` → writes only `design-brief.md` + `assets/` (optional design intake)
|
|
12
13
|
- `/opsx:propose <name>` → creates `openspec/changes/<name>/` artifacts only
|
|
13
14
|
- `/opsx:review <name>` → read-only spec review, writes `review.md`, outputs Approve or Request Changes
|
|
14
15
|
- `/opsx:apply <name>` → writes `src/`, marks `tasks.md [x]` (blocked if no review when `require_spec_review: true`)
|
|
@@ -18,13 +19,17 @@ This project uses a spec-driven 5-role pipeline. Read `.agents/orchestrator.yaml
|
|
|
18
19
|
## Session Rules
|
|
19
20
|
- One active change at a time (unless mvp profile: up to 3)
|
|
20
21
|
- Each role = new chat session (except `/opsx:quick` combines propose+apply)
|
|
21
|
-
- No code in explore or review sessions
|
|
22
|
+
- No code in explore, design, or review sessions
|
|
23
|
+
- Design Intake may write only `openspec/changes/<name>/design-brief.md` and `assets/`
|
|
22
24
|
- No apply without review when `pipeline.require_spec_review: true` — check `review.md` or Approve in context
|
|
25
|
+
- When `require_design_brief: true` and the change touches UI — need `design-brief.md`, or `Design: none` in `proposal.md` for non-UI
|
|
26
|
+
- Apply uses the design brief, not live Figma MCP
|
|
23
27
|
- After apply: build + lint before PR
|
|
24
28
|
- After merge: run `/opsx:archive` (when `archive_after_merge: true`)
|
|
25
29
|
|
|
26
30
|
## Never
|
|
27
31
|
- Mix propose and apply in one session
|
|
28
|
-
- Edit `src/` during explore or review
|
|
32
|
+
- Edit `src/` during explore, design, or review
|
|
29
33
|
- Skip spec review before apply
|
|
34
|
+
- Call live Figma MCP during apply when a design brief exists
|
|
30
35
|
- Leave changes un-archived after merge
|
|
@@ -5,7 +5,7 @@ alwaysApply: true
|
|
|
5
5
|
|
|
6
6
|
# OpenSpec Workflow (/opsx)
|
|
7
7
|
|
|
8
|
-
`/opsx:explore`, `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `/opsx:sync`, `/opsx:review`, `/opsx:quick` — AI workflow commands, not source code.
|
|
8
|
+
`/opsx:explore`, `/opsx:design`, `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `/opsx:sync`, `/opsx:review`, `/opsx:quick` — AI workflow commands, not source code.
|
|
9
9
|
|
|
10
10
|
## File Locations
|
|
11
11
|
|
|
@@ -15,12 +15,14 @@ alwaysApply: true
|
|
|
15
15
|
| Skills | `.agents/skills/` |
|
|
16
16
|
| Specs (source of truth) | `openspec/specs/` |
|
|
17
17
|
| Active changes | `openspec/changes/` |
|
|
18
|
+
| Design brief | `openspec/changes/<name>/design-brief.md` + `assets/` |
|
|
18
19
|
| Project config | `openspec/config.yaml` |
|
|
19
20
|
| Orchestration config | `.agents/orchestrator.yaml` |
|
|
20
21
|
|
|
21
22
|
## Command → Skill Mapping
|
|
22
23
|
|
|
23
24
|
- `/opsx:explore` → skill `openspec-explore` (thinking only)
|
|
25
|
+
- `/opsx:design <name>` → command `opsx-design` (writes design-brief.md + assets/)
|
|
24
26
|
- `/opsx:propose <name>` → skill `openspec-propose`
|
|
25
27
|
- `/opsx:review <name>` → command `opsx-review` (read-only, writes review.md)
|
|
26
28
|
- `/opsx:apply` → skill `openspec-apply-change`
|
|
@@ -3,7 +3,7 @@ name: agent-orchestration
|
|
|
3
3
|
description: >
|
|
4
4
|
Spec-driven AI agent pipeline orchestration built on OpenSpec. Load when deciding which
|
|
5
5
|
role/command to use, how to handoff between phases, which model to pick, or when a session
|
|
6
|
-
should stop and a new one start. Commands: /opsx:explore, /opsx:propose, /opsx:review,
|
|
6
|
+
should stop and a new one start. Commands: /opsx:explore, /opsx:design, /opsx:propose, /opsx:review,
|
|
7
7
|
/opsx:apply, /opsx:archive, /opsx:quick.
|
|
8
8
|
disable-model-invocation: false
|
|
9
9
|
allowed-tools: Bash, Read
|
|
@@ -17,13 +17,16 @@ is the primary source of wasted tokens and failed implementations.
|
|
|
17
17
|
## Pipeline
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
explore → propose → review → apply → verify → archive
|
|
20
|
+
explore → [design] → propose → review → apply → verify → archive
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
`[design]` is optional (`/opsx:design`) — capture UI into `design-brief.md` + `assets/` so apply does not depend on live Figma.
|
|
24
|
+
|
|
23
25
|
**MVP profile** (`require_spec_review: false`):
|
|
24
26
|
```
|
|
25
27
|
explore → quick (propose+apply) → verify → archive (optional)
|
|
26
28
|
```
|
|
29
|
+
In quick mode the same session may create the design brief before propose+apply.
|
|
27
30
|
|
|
28
31
|
Read `.agents/orchestrator.yaml` for project-specific config (language, flags, MCP, review gate).
|
|
29
32
|
|
|
@@ -32,6 +35,7 @@ Read `.agents/orchestrator.yaml` for project-specific config (language, flags, M
|
|
|
32
35
|
| Role | Command | Mode | Model hint | Allowed output |
|
|
33
36
|
|------|---------|------|------------|----------------|
|
|
34
37
|
| Explorer | `/opsx:explore` | read-only | fast | chat only |
|
|
38
|
+
| Design Intake | `/opsx:design <name>` | brief-only | strong | `design-brief.md`, `assets/` |
|
|
35
39
|
| Architect | `/opsx:propose <name>` | specs-only | strong | `openspec/changes/` |
|
|
36
40
|
| Spec Reviewer | `/opsx:review <name>` | read-only | medium | `review.md`, Approve / Request Changes |
|
|
37
41
|
| Implementer | `/opsx:apply <name>` | code | strong | `src/`, `tasks.md [x]` |
|
|
@@ -40,6 +44,19 @@ Read `.agents/orchestrator.yaml` for project-specific config (language, flags, M
|
|
|
40
44
|
|
|
41
45
|
## Handoff Protocol
|
|
42
46
|
|
|
47
|
+
### explore → design (optional)
|
|
48
|
+
Exit Explorer into Design Intake when:
|
|
49
|
+
- Change has UI and a Figma URL, export, screenshot, or photo is available
|
|
50
|
+
- kebab-case change name chosen
|
|
51
|
+
|
|
52
|
+
Start Design Intake with:
|
|
53
|
+
```
|
|
54
|
+
/opsx:design <name>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### design → propose
|
|
58
|
+
Exit Design Intake when `design-brief.md` (+ `assets/`) is written. Non-UI changes: skip design and put `Design: none` in `proposal.md` when `require_design_brief: true`.
|
|
59
|
+
|
|
43
60
|
### explore → propose
|
|
44
61
|
Exit Explorer when:
|
|
45
62
|
- Problem is stated in 3–5 sentences
|
|
@@ -57,7 +74,6 @@ Context from explore:
|
|
|
57
74
|
- Non-goals: ...
|
|
58
75
|
- Draft acceptance: ...
|
|
59
76
|
```
|
|
60
|
-
|
|
61
77
|
### propose → review
|
|
62
78
|
Exit Architect when:
|
|
63
79
|
```bash
|
|
@@ -74,7 +90,7 @@ Before apply, check `.agents/orchestrator.yaml`:
|
|
|
74
90
|
|
|
75
91
|
If Request Changes — fix artifacts, re-run `/opsx:review`.
|
|
76
92
|
|
|
77
|
-
This is no longer only a chat convention: `agent-orchestrator-kit gate-check` runs in CI (both `agent-verify.yml` fragments) and fails the pipeline if `src/` changed without an approved `review.md` — a forgotten or skipped review is caught at merge time, not just at apply time.
|
|
93
|
+
This is no longer only a chat convention: `agent-orchestrator-kit gate-check` runs in CI (both `agent-verify.yml` fragments) and fails the pipeline if `src/` changed without an approved `review.md` — a forgotten or skipped review is caught at merge time, not just at apply time. When `require_design_brief: true`, the same command also requires `design-brief.md` (or `Design: none` in `proposal.md`).
|
|
78
94
|
|
|
79
95
|
### apply → verify
|
|
80
96
|
Exit Implementer when:
|
|
@@ -82,6 +98,7 @@ Exit Implementer when:
|
|
|
82
98
|
- `npm run build` (or project build cmd) exits 0
|
|
83
99
|
- `npm run lint` exits 0
|
|
84
100
|
- Commit ready
|
|
101
|
+
- UI work followed `design-brief.md` — do **not** open live Figma MCP in the apply session
|
|
85
102
|
|
|
86
103
|
### verify → archive
|
|
87
104
|
After PR merged + CI green:
|
|
@@ -93,7 +110,7 @@ After PR merged + CI green:
|
|
|
93
110
|
|
|
94
111
|
**Start of each session:**
|
|
95
112
|
1. Announce role: "Starting Spec Reviewer session for change: <name>"
|
|
96
|
-
2. Run `agent-orchestrator-kit status` (or `openspec list`) — confirm active change limit (`max_active_changes` in orchestrator.yaml) and see task/review progress for every active change at a glance
|
|
113
|
+
2. Run `agent-orchestrator-kit status` (or `openspec list`) — confirm active change limit (`max_active_changes` in orchestrator.yaml) and see task/review/brief progress for every active change at a glance
|
|
97
114
|
3. Read `orchestrator.yaml` for project config and review gate
|
|
98
115
|
|
|
99
116
|
**During session:**
|
|
@@ -111,6 +128,7 @@ After PR merged + CI green:
|
|
|
111
128
|
| Phase | Use case | Recommended |
|
|
112
129
|
|-------|----------|-------------|
|
|
113
130
|
| explore | Q&A, brainstorm | fast (rush/flash) |
|
|
131
|
+
| design | Vision / layout capture | strong (vision-capable) |
|
|
114
132
|
| propose | Architecture decisions | strong (opus/sonnet) |
|
|
115
133
|
| review | Artifact analysis | medium or strong |
|
|
116
134
|
| apply complex | Multi-file refactor | strong |
|
|
@@ -146,6 +164,7 @@ At start of new session: read relevant entities to restore context without re-ex
|
|
|
146
164
|
|-------------|--------|
|
|
147
165
|
| Explore + propose in one chat | Architect has stale exploration context |
|
|
148
166
|
| Apply without review | ~60% chance of rework |
|
|
167
|
+
| Live Figma MCP in apply session | Token/quota loss; context not durable across sessions |
|
|
149
168
|
| All tasks in one apply session | Context overload; model drifts |
|
|
150
169
|
| No archive after merge | Next propose has stale domain specs |
|
|
151
170
|
| Strong model on lint fixes | 5–10x cost with no quality gain |
|
package/templates/AGENTS.md
CHANGED
|
@@ -8,9 +8,11 @@ Every feature follows the same cycle regardless of stack or IDE.
|
|
|
8
8
|
## Pipeline
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
explore → propose → review → apply → verify → archive
|
|
11
|
+
explore → [design] → propose → review → apply → verify → archive
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
`[design]` is optional — run `/opsx:design` when the change has UI and you need a durable design brief (Figma, screenshot, or photo). Skip for non-UI work; use `Design: none` in `proposal.md` when `require_design_brief: true`.
|
|
15
|
+
|
|
14
16
|
Each phase runs in a **separate agent session** with a dedicated role, model hint, and permissions.
|
|
15
17
|
Never mix phases in one chat — this is the single most important rule.
|
|
16
18
|
|
|
@@ -19,6 +21,7 @@ Never mix phases in one chat — this is the single most important rule.
|
|
|
19
21
|
| Role | Command | Mode | Model hint |
|
|
20
22
|
|------|---------|------|------------|
|
|
21
23
|
| Explorer | `/opsx:explore` | read-only | fast |
|
|
24
|
+
| Design Intake | `/opsx:design <name>` | writes `design-brief.md` + `assets/` only | strong |
|
|
22
25
|
| Architect | `/opsx:propose <name>` | writes `openspec/changes/` only | strong |
|
|
23
26
|
| Spec Reviewer | `/opsx:review <name>` | read-only | medium/strong |
|
|
24
27
|
| Implementer | `/opsx:apply <name>` | writes `src/` | strong |
|
|
@@ -28,13 +31,13 @@ Verifier runs on **GitHub Actions** (default) or **GitLab** via `prebuild` → `
|
|
|
28
31
|
|
|
29
32
|
With `init --ci gitlab --spec-verify` or `init --ci github --spec-verify`, an **AI Spec Verifier** also runs on MRs/PRs changing `src/`: an Amp agent checks the changed code against `openspec/specs/` and a **BLOCKED verdict fails the pipeline** (gate `spec-verify-blocking` in `.agents/orchestrator.yaml`).
|
|
30
33
|
|
|
31
|
-
Both CI fragments also run `agent-orchestrator-kit gate-check` — a deterministic check that fails the pipeline when `src/` changed but the active change has no `review.md` with `Verdict: APPROVE` (when `require_spec_review: true`). Run `agent-orchestrator-kit status` at the start of any session to see task progress, review verdict, and archive readiness for every active change without querying `openspec` per change.
|
|
34
|
+
Both CI fragments also run `agent-orchestrator-kit gate-check` — a deterministic check that fails the pipeline when `src/` changed but the active change has no `review.md` with `Verdict: APPROVE` (when `require_spec_review: true`), and optionally requires `design-brief.md` (when `require_design_brief: true`, unless `proposal.md` has `Design: none`). Run `agent-orchestrator-kit status` at the start of any session to see task progress, review verdict, design brief, and archive readiness for every active change without querying `openspec` per change.
|
|
32
35
|
|
|
33
36
|
## Hard Rules
|
|
34
37
|
|
|
35
38
|
- **One active change per developer** at a time.
|
|
36
39
|
- **No apply without spec-review approval** (explicit Approve in chat).
|
|
37
|
-
- **No code edits** during explore or spec-review sessions.
|
|
40
|
+
- **No code edits** during explore, design-intake, or spec-review sessions.
|
|
38
41
|
- **Archive after every merge** (`/opsx:archive`).
|
|
39
42
|
- **Always run local build/lint** before opening a PR.
|
|
40
43
|
|
|
@@ -42,7 +45,9 @@ Both CI fragments also run `agent-orchestrator-kit gate-check` — a determinist
|
|
|
42
45
|
|
|
43
46
|
| Transition | Gate |
|
|
44
47
|
|------------|------|
|
|
45
|
-
| explore →
|
|
48
|
+
| explore → design | UI change needs a brief; change name chosen |
|
|
49
|
+
| explore → propose | Decision brief written; change name chosen (skip design if non-UI) |
|
|
50
|
+
| design → propose | `design-brief.md` (+ `assets/`) written |
|
|
46
51
|
| propose → review | `openspec validate --strict` passes ✓ |
|
|
47
52
|
| review → apply | Reviewer writes explicit **Approve** — enforced in CI by `gate-check` |
|
|
48
53
|
| apply → verify | All `tasks.md` checkboxes `[x]`; local build OK |
|
|
@@ -53,9 +58,10 @@ Both CI fragments also run `agent-orchestrator-kit gate-check` — a determinist
|
|
|
53
58
|
| Role | Attach (`@`) |
|
|
54
59
|
|------|-------------|
|
|
55
60
|
| Explorer | `@openspec/specs/` + relevant `@src/` subtree |
|
|
56
|
-
|
|
|
61
|
+
| Design Intake | design source (Figma URL / images) + `@openspec/changes/<name>/` |
|
|
62
|
+
| Architect | `@openspec/config.yaml` + explore brief (+ `@design-brief.md` if present) |
|
|
57
63
|
| Reviewer | entire `@openspec/changes/<name>/` |
|
|
58
|
-
| Implementer | `@openspec/changes/<name>/tasks.md` |
|
|
64
|
+
| Implementer | `@openspec/changes/<name>/tasks.md` + `@openspec/changes/<name>/design-brief.md` |
|
|
59
65
|
|
|
60
66
|
## Configuration
|
|
61
67
|
|
package/templates/CLAUDE.md
CHANGED
|
@@ -24,6 +24,7 @@ Use `/skill-name` or let Claude auto-load based on context.
|
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
/opsx:explore — think through ideas (read-only, no code)
|
|
27
|
+
/opsx:design — capture design into design-brief.md + assets/ (optional)
|
|
27
28
|
/opsx:propose — create change artifacts
|
|
28
29
|
/opsx:review — spec review (read-only, no code)
|
|
29
30
|
/opsx:apply — implement tasks
|
|
@@ -34,7 +35,8 @@ Use `/skill-name` or let Claude auto-load based on context.
|
|
|
34
35
|
|
|
35
36
|
- Check `.agents/orchestrator.yaml` for project-specific pipeline config.
|
|
36
37
|
- One active change at a time — run `openspec list` to confirm.
|
|
37
|
-
- No code edits in explore or review mode.
|
|
38
|
+
- No code edits in explore, design, or review mode.
|
|
39
|
+
- Design Intake writes only `design-brief.md` and `assets/` — never `src/`.
|
|
38
40
|
- After completing apply: run build/lint before declaring done.
|
|
39
41
|
- Use `openspec validate --all --strict` to verify change artifacts.
|
|
40
42
|
|
|
@@ -43,6 +45,7 @@ Use `/skill-name` or let Claude auto-load based on context.
|
|
|
43
45
|
| What | Where |
|
|
44
46
|
|------|-------|
|
|
45
47
|
| Active changes | `openspec/changes/` |
|
|
48
|
+
| Design brief | `openspec/changes/<name>/design-brief.md` + `assets/` |
|
|
46
49
|
| Specs (source of truth) | `openspec/specs/` |
|
|
47
50
|
| Project config | `openspec/config.yaml` |
|
|
48
51
|
| Orchestration config | `.agents/orchestrator.yaml` |
|
|
@@ -9,6 +9,7 @@ package_manager: npm
|
|
|
9
9
|
|
|
10
10
|
pipeline:
|
|
11
11
|
require_spec_review: true
|
|
12
|
+
require_design_brief: false
|
|
12
13
|
max_active_changes: 1
|
|
13
14
|
archive_after_merge: true
|
|
14
15
|
|
|
@@ -17,6 +18,10 @@ roles:
|
|
|
17
18
|
command: /opsx:explore
|
|
18
19
|
mode: read-only
|
|
19
20
|
model_hint: fast
|
|
21
|
+
design_intake:
|
|
22
|
+
command: /opsx:design
|
|
23
|
+
mode: brief-only
|
|
24
|
+
model_hint: strong
|
|
20
25
|
architect:
|
|
21
26
|
command: /opsx:propose
|
|
22
27
|
mode: specs-only
|