agent-orchestrator-kit 0.1.12 → 0.1.14
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 +23 -0
- package/README.md +65 -32
- package/bin/agent-orchestrator.js +559 -1
- package/package.json +2 -2
- package/profiles/generic/orchestrator.yaml +6 -0
- package/profiles/mvp/orchestrator.yaml +6 -0
- package/profiles/node/orchestrator.yaml +6 -0
- package/profiles/vue3/orchestrator.yaml +6 -0
- package/templates/.agents/amp.settings.json.example +2 -5
- package/templates/.agents/commands/opsx-apply.md +22 -4
- package/templates/.agents/commands/opsx-archive.md +28 -7
- package/templates/.agents/commands/opsx-design.md +28 -5
- package/templates/.agents/commands/opsx-explore.md +19 -2
- package/templates/.agents/commands/opsx-propose.md +29 -6
- package/templates/.agents/commands/opsx-quick.md +25 -2
- package/templates/.agents/commands/opsx-review.md +27 -4
- package/templates/.agents/mcp.json.example +2 -5
- package/templates/.agents/rules/agent-orchestration.mdc +46 -0
- package/templates/.agents/rules/cli-via-npm.mdc +2 -1
- package/templates/.agents/rules/memory-mcp-autosetup.mdc +34 -14
- package/templates/.agents/rules/session-handoff.mdc +46 -0
- package/templates/.agents/skills/agent-orchestration/SKILL.md +91 -17
- package/templates/.agents/skills/openspec-apply-change/SKILL.md +7 -4
- package/templates/.agents/skills/openspec-archive-change/SKILL.md +13 -7
- package/templates/.agents/skills/openspec-explore/SKILL.md +4 -2
- package/templates/.agents/skills/openspec-propose/SKILL.md +14 -6
- package/templates/.agents/subagents/code-reviewer.md +12 -1
- package/templates/.agents/subagents/code-writer.md +13 -2
- package/templates/.agents/subagents/codebase-explorer.md +31 -0
- package/templates/.agents/subagents/design-implementer.md +13 -2
- package/templates/.agents/subagents/design-intake.md +31 -0
- package/templates/.agents/subagents/openspec-guide.md +12 -1
- package/templates/.agents/subagents/session-handoff.md +48 -0
- package/templates/.agents/subagents/setup-doctor.md +12 -3
- package/templates/.agents/subagents/spec-architect.md +32 -0
- package/templates/.agents/subagents/spec-archiver.md +31 -0
- package/templates/.agents/subagents/spec-reviewer.md +32 -0
- package/templates/.agents/subagents/test-writer.md +13 -2
- package/templates/AGENTS.md +37 -3
- package/templates/CLAUDE.md +24 -0
- package/templates/orchestrator.yaml +9 -0
- package/templates/scripts/memory-mcp-launcher.cjs +46 -0
- package/templates/scripts/sync-local-agent-skills.sh +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.14] - 2026-08-13
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **`session-handoff` subagent** — mandatory restore at session start and persist at session exit (Amp: isolated `subagent-session-handoff`)
|
|
11
|
+
- **`npx agent-orchestrator-kit handoff <name>`** — validates `handoff.md`, upserts `.cursor/memory.json` with an absolute path, prints an expanded self-contained next-thread prompt in `project.agent_language`
|
|
12
|
+
- **`npx agent-orchestrator-kit memory-setup`** — installs `scripts/memory-mcp-launcher.cjs` and rewrites Cursor/Amp Memory MCP away from relative `MEMORY_FILE_PATH`
|
|
13
|
+
- Always-apply rule `.agents/rules/session-handoff.mdc` with HARD STOP gates Amp cannot treat as optional
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Next-session prompt is now a full operating brief (Done, Decisions, Blocked, attach, which subagent to spawn, Amp isolation, exit HARD STOP) so the next thread works even if Memory MCP is ignored
|
|
17
|
+
- Amp `subagent-*` wrappers require STOP if spawn is unavailable instead of running specialist work in the main thread
|
|
18
|
+
- Memory MCP examples and init/sync use the launcher instead of `npx` + relative path
|
|
19
|
+
|
|
20
|
+
## [0.1.13] - 2026-08-13
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **Pipeline subagent conductor** — every `/opsx:*` parent session now delegates through an exclusive phase/signal routing table, with five new stage specialists for explore, design, propose, spec review, and archive (`codebase-explorer`, `design-intake`, `spec-architect`, `spec-reviewer`, `spec-archiver`)
|
|
24
|
+
- **Durable session handoff** — sessions restore and persist `Change:*`, `Handoff:*`, and `Decision:*` Memory entities, mirror state in `openspec/changes/<name>/handoff.md`, and emit one next-session prompt in `project.agent_language` (no service banner, no duplicated summary)
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Amp `subagent-*` wrappers now require isolated fresh-context execution and return only a structured specialist report
|
|
28
|
+
- OpenSpec commands, orchestration rules, skills, profiles, and documentation now enforce conductor-only task marking and phase separation
|
|
29
|
+
|
|
7
30
|
## [0.1.12] - 2026-07-21
|
|
8
31
|
|
|
9
32
|
### Added
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ A portable kit that installs a **role-separated AI pipeline** into any project:
|
|
|
13
13
|
explore → [design] → propose → review → apply → verify → archive
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Each role runs in a **separate agent session
|
|
16
|
+
Each role runs in a **separate agent session**. The parent `/opsx:*` session is a conductor: it restores state, spawns the routed specialist, verifies its report, and does not perform specialist work itself. OpenSpec files remain the requirements/tasks source of truth; Memory MCP and `openspec/changes/<name>/handoff.md` index phase state and the next command.
|
|
17
17
|
|
|
18
18
|
**Figma PAT setup (v0.1.11+)** — local `.agents/figma.local.env` + MCP launcher (token never in chat / committed MCP JSON). See [Figma token](#figma-token-optional).
|
|
19
19
|
|
|
@@ -27,10 +27,28 @@ Each role runs in a **separate agent session** with dedicated permissions, model
|
|
|
27
27
|
| `test-writer` | Automated tests for recently changed code |
|
|
28
28
|
| `setup-doctor` | Orchestrator / MCP / sync diagnosis and repair |
|
|
29
29
|
| `design-implementer` | Pixel-accurate Figma / screenshot → production UI |
|
|
30
|
+
| `codebase-explorer` | Read-only repository investigation for explore |
|
|
31
|
+
| `design-intake` | Design source → durable brief + assets |
|
|
32
|
+
| `spec-architect` | Proposal, design, delta specs, and tasks |
|
|
33
|
+
| `spec-reviewer` | Pre-apply artifact gate + `review.md` |
|
|
34
|
+
| `spec-archiver` | Delta merge and completed-change archive |
|
|
35
|
+
| `session-handoff` | Restore/persist Memory + `handoff.md` + expanded next-thread prompt |
|
|
36
|
+
|
|
37
|
+
The conductor uses one exclusive route per signal:
|
|
38
|
+
|
|
39
|
+
| Phase / signal | Subagent |
|
|
40
|
+
|----------------|----------|
|
|
41
|
+
| Status / gates / next command | `openspec-guide` |
|
|
42
|
+
| Session start restore / session exit persist | `session-handoff` |
|
|
43
|
+
| Kit / MCP / sync repair | `setup-doctor` |
|
|
44
|
+
| Explore repository research | `codebase-explorer` |
|
|
45
|
+
| Design / propose / spec review | `design-intake` / `spec-architect` / `spec-reviewer` |
|
|
46
|
+
| Apply UI / ordinary task / tests / pre-PR review | `design-implementer` / `code-writer` / `test-writer` / `code-reviewer` |
|
|
47
|
+
| Archive | `spec-archiver` |
|
|
30
48
|
|
|
31
49
|
- **Cursor** → `.cursor/agents/` (native subagents)
|
|
32
50
|
- **Claude Code** → `.claude/agents/` (native subagents)
|
|
33
|
-
- **Amp Code** → auto-generated `subagent-*` skill wrappers in `.agents/skills
|
|
51
|
+
- **Amp Code** → auto-generated `subagent-*` skill wrappers in `.agents/skills/`; each wrapper requires the parent to spawn an isolated subagent, never execute it in the main thread
|
|
34
52
|
|
|
35
53
|
Works with:
|
|
36
54
|
- [Cursor](https://cursor.sh) — via `.cursor/rules/` + `.cursor/skills/` + `.cursor/agents/`
|
|
@@ -55,7 +73,7 @@ npx agent-orchestrator-kit@latest init --profile generic --ci gitlab --spec-veri
|
|
|
55
73
|
|
|
56
74
|
See [Installation](#installation) for profile/CI options.
|
|
57
75
|
|
|
58
|
-
**🔄 Already have the kit installed? Upgrade to latest (
|
|
76
|
+
**🔄 Already have the kit installed? Upgrade to latest (hardened handoff CLI + Memory launcher in v0.1.14+, conductor in v0.1.13+, Figma PAT in v0.1.11+):**
|
|
59
77
|
|
|
60
78
|
```bash
|
|
61
79
|
npx agent-orchestrator-kit@latest update
|
|
@@ -146,9 +164,9 @@ your-project/
|
|
|
146
164
|
│ ├── orchestrator.yaml
|
|
147
165
|
│ ├── mcp.json.example # Cursor MCP template
|
|
148
166
|
│ ├── amp.settings.json.example # Amp MCP template
|
|
149
|
-
│ ├── commands/ #
|
|
150
|
-
│ ├── rules/ #
|
|
151
|
-
│ ├── subagents/ #
|
|
167
|
+
│ ├── commands/ # /opsx:* role commands
|
|
168
|
+
│ ├── rules/ # auto-applied orchestration rules
|
|
169
|
+
│ ├── subagents/ # 12 stage/custom subagents (Cursor/Claude/Amp)
|
|
152
170
|
│ └── skills/
|
|
153
171
|
│ ├── agent-orchestration/ # Pipeline orchestration
|
|
154
172
|
│ ├── openspec-howto/
|
|
@@ -169,8 +187,8 @@ your-project/
|
|
|
169
187
|
| Orchestration | 5-role pipeline, `AGENTS.md`, `orchestrator.yaml`, review command |
|
|
170
188
|
| OpenSpec skills | All 7 skills for `/opsx:*` workflow |
|
|
171
189
|
| IDE sync | Cursor + Claude Code sync script (`--delete` semantics — removes stale skills/subagents) |
|
|
172
|
-
| Subagents |
|
|
173
|
-
| CLI gates | `npx agent-orchestrator-kit status` / `gate-check` — deterministic review-gate
|
|
190
|
+
| Subagents | 12 exclusive routes: guide/setup/session-handoff, explore/design/propose/review/archive stage agents, and apply implementation/test/code-review agents — native in Cursor + Claude Code, isolated Amp `subagent-*` wrappers |
|
|
191
|
+
| CLI gates | `npx agent-orchestrator-kit status` / `gate-check` / `handoff` / `memory-setup` — deterministic review-gate and session-handoff (always via `npx`; see `cli-via-npm.mdc`) |
|
|
174
192
|
| CI | `agent-verify.yml` — GitHub (default) or GitLab fragment + `prebuild` hook, both run `gate-check` |
|
|
175
193
|
| AI Spec Verifier | `spec-verify.yml` + verifier scripts — GitLab or GitHub, opt-in (`--spec-verify`) |
|
|
176
194
|
| MCP templates | Memory MCP for Cursor and Amp |
|
|
@@ -205,7 +223,7 @@ cp .agents/amp.settings.json.example .amp/settings.json
|
|
|
205
223
|
|
|
206
224
|
Or run `./scripts/sync-local-agent-skills.sh` — it creates `.amp/settings.json` automatically.
|
|
207
225
|
|
|
208
|
-
**Subagents in Amp:**
|
|
226
|
+
**Subagents in Amp:** the kit exposes every `.agents/subagents/<name>.md` as an auto-generated `subagent-<name>` skill. The conductor MUST run the wrapper as an isolated subagent with fresh context and MUST NOT execute its body in the main thread. Edit only the source file and re-run `sync` to regenerate wrappers.
|
|
209
227
|
|
|
210
228
|
4. Use commands directly:
|
|
211
229
|
|
|
@@ -237,7 +255,7 @@ Switch modes in Amp CLI: `Ctrl+O` → `mode`.
|
|
|
237
255
|
- `.claude/skills/` — all skills from `.agents/skills/` (excluding Amp `subagent-*` wrappers)
|
|
238
256
|
- `.claude/agents/` — custom subagents from `.agents/subagents/` (native Claude Code subagents)
|
|
239
257
|
3. Skills are auto-loaded by Claude Code from `.claude/skills/`.
|
|
240
|
-
4. Invoke
|
|
258
|
+
4. Invoke `/opsx:*` or the orchestration skill. The conductor delegates using the mandatory phase/signal routing table rather than relying on description-only selection.
|
|
241
259
|
|
|
242
260
|
**CLAUDE.md tiers used:**
|
|
243
261
|
- Project level: `.claude/CLAUDE.md` (synced from `CLAUDE.md`)
|
|
@@ -262,10 +280,10 @@ You can add `context: fork` to explore/review skills for isolated subagent sessi
|
|
|
262
280
|
2. Creates:
|
|
263
281
|
- `.cursor/skills/` — all skills
|
|
264
282
|
- `.cursor/rules/` — `.mdc` rule files
|
|
265
|
-
- `.cursor/agents/` — custom subagents
|
|
283
|
+
- `.cursor/agents/` — all 12 custom/stage subagents
|
|
266
284
|
- `.mcp.json` — from `mcp.json.example` (if not present)
|
|
267
285
|
3. Rules are applied automatically per `alwaysApply: true`.
|
|
268
|
-
4.
|
|
286
|
+
4. `/opsx:*` sessions use the mandatory conductor routing table to spawn subagents. Add project-specific subagents in `.agents/subagents/`, add an exclusive route, and re-run sync.
|
|
269
287
|
|
|
270
288
|
**Memory + optional Figma MCP for Cursor** (`.mcp.json`):
|
|
271
289
|
|
|
@@ -273,9 +291,8 @@ You can add `context: fork` to explore/review skills for isolated subagent sessi
|
|
|
273
291
|
{
|
|
274
292
|
"mcpServers": {
|
|
275
293
|
"memory": {
|
|
276
|
-
"command": "
|
|
277
|
-
"args": ["
|
|
278
|
-
"env": { "MEMORY_FILE_PATH": ".cursor/memory.json" }
|
|
294
|
+
"command": "node",
|
|
295
|
+
"args": ["scripts/memory-mcp-launcher.cjs"]
|
|
279
296
|
},
|
|
280
297
|
"figma": {
|
|
281
298
|
"command": "node",
|
|
@@ -295,6 +312,8 @@ Token lives in `.agents/figma.local.env` — see [Figma token](#figma-token-opti
|
|
|
295
312
|
**Model:** fast/cheap.
|
|
296
313
|
**Purpose:** Understand the problem. Surface options. Choose a direction.
|
|
297
314
|
|
|
315
|
+
The conductor spawns `codebase-explorer` for repository investigation and stays read-only.
|
|
316
|
+
|
|
298
317
|
**Exit criteria (before starting Architect):**
|
|
299
318
|
- Problem stated in 3–5 sentences
|
|
300
319
|
- 2–3 solution options + recommendation
|
|
@@ -313,6 +332,8 @@ Token lives in `.agents/figma.local.env` — see [Figma token](#figma-token-opti
|
|
|
313
332
|
**Model:** strong reasoning.
|
|
314
333
|
**Purpose:** Create all change artifacts: proposal, design, tasks, delta specs.
|
|
315
334
|
|
|
335
|
+
The conductor spawns `spec-architect`; it does not write artifacts in the parent session.
|
|
336
|
+
|
|
316
337
|
**Exit gate:**
|
|
317
338
|
```bash
|
|
318
339
|
npx openspec validate <name> --strict --type change # must be ✓
|
|
@@ -330,6 +351,8 @@ npx openspec validate <name> --strict --type change # must be ✓
|
|
|
330
351
|
**Model:** medium or strong.
|
|
331
352
|
**Purpose:** Review artifacts. Output **Approve ✓** or **Request Changes ✗**.
|
|
332
353
|
|
|
354
|
+
The conductor spawns `spec-reviewer` (not `code-reviewer`) and verifies its `review.md`.
|
|
355
|
+
|
|
333
356
|
Checks:
|
|
334
357
|
- Acceptance criteria are testable
|
|
335
358
|
- Tasks ≤ ~2 hours each
|
|
@@ -346,7 +369,7 @@ Checks:
|
|
|
346
369
|
|
|
347
370
|
### Role 4: Implementer — `/opsx:apply <name>`
|
|
348
371
|
|
|
349
|
-
**Mode:**
|
|
372
|
+
**Mode:** conductor; routed specialists write `src/` and tests. Only the conductor marks `tasks.md [x]` after a verified `Status: done` report.
|
|
350
373
|
**Model:** strong. Use fast for simple mechanical tasks.
|
|
351
374
|
**Purpose:** Implement tasks. One session = 1–3 tasks (not all 15 at once).
|
|
352
375
|
|
|
@@ -640,21 +663,18 @@ npx agent-orchestrator-kit figma-setup
|
|
|
640
663
|
|
|
641
664
|
## Memory MCP — Shared State Between Sessions
|
|
642
665
|
|
|
643
|
-
Each role starts a fresh session. Memory MCP
|
|
666
|
+
Each role starts a fresh session. OpenSpec artifacts remain the source of truth; Memory MCP and `openspec/changes/<name>/handoff.md` are the phase index used to resume without re-explanation.
|
|
644
667
|
|
|
645
668
|
**Standard entities to save:**
|
|
646
669
|
|
|
647
670
|
```
|
|
648
|
-
Change:add-bulk-export status: spec-approved, tasks: 0/7
|
|
671
|
+
Change:add-bulk-export status: spec-approved, tasks: 0/7, last_role: reviewer, review: APPROVE
|
|
649
672
|
Decision:export-format chosen: xlsx, reason: matches existing reports
|
|
650
|
-
|
|
651
|
-
|
|
673
|
+
Handoff:add-bulk-export next_role: implementer, next_command: /opsx:apply add-bulk-export,
|
|
674
|
+
session_count: 2, summary: ..., blocked: none
|
|
652
675
|
```
|
|
653
676
|
|
|
654
|
-
At
|
|
655
|
-
```
|
|
656
|
-
What do we know about Change:add-bulk-export?
|
|
657
|
-
```
|
|
677
|
+
Every `/opsx:*` session restores via `npx agent-orchestrator-kit handoff --restore`, then Memory `Change:<name>`, `Handoff:<name>`, `Decision:*`, falling back to `handoff.md` if Memory is unavailable. At exit it MUST spawn `session-handoff`, write `handoff.md`, run `npx agent-orchestrator-kit handoff <name>` (upserts `.cursor/memory.json` with an absolute path), and paste the CLI stdout prompt. The prompt is self-contained — Amp often skips Memory MCP, so the next thread must be able to work from the pasted text alone. Never configure Memory with a relative `MEMORY_FILE_PATH`; use `scripts/memory-mcp-launcher.cjs` (`npx agent-orchestrator-kit memory-setup`). The next phase always starts in a new chat.
|
|
658
678
|
|
|
659
679
|
## Amp Code — Deep Integration Notes
|
|
660
680
|
|
|
@@ -667,21 +687,22 @@ Amp is the **primary target** of this kit. It reads `.agents/skills/` and `AGENT
|
|
|
667
687
|
| `AGENTS.md` subtree loading | Per-domain AGENTS.md in `openspec/` subtree |
|
|
668
688
|
| `.agents/skills/` | All orchestration + domain skills |
|
|
669
689
|
| `mcp.json` in skill dir | Lazy MCP loading (Memory only when needed) |
|
|
670
|
-
| Subagents |
|
|
690
|
+
| Subagents | Conductor routing + isolated `subagent-*` wrappers |
|
|
671
691
|
| Amp modes (rush/smart/deep) | Per-role model hints in AGENTS.md |
|
|
672
692
|
|
|
673
|
-
**Amp
|
|
693
|
+
**Amp generated wrapper** (`.agents/skills/subagent-codebase-explorer/SKILL.md`):
|
|
674
694
|
|
|
675
695
|
```yaml
|
|
676
696
|
---
|
|
677
|
-
name:
|
|
678
|
-
description:
|
|
679
|
-
disable-model-invocation: false
|
|
680
|
-
allowed-tools: Read, Bash
|
|
697
|
+
name: subagent-codebase-explorer
|
|
698
|
+
description: Read-only repository research specialist...
|
|
681
699
|
---
|
|
700
|
+
|
|
701
|
+
CRITICAL (Amp / Cursor / Claude): Parent MUST spawn this skill as an isolated subagent with fresh context.
|
|
702
|
+
Do not execute it in the main thread. If spawn is unavailable, STOP and report blocked.
|
|
682
703
|
```
|
|
683
704
|
|
|
684
|
-
|
|
705
|
+
The conductor invokes the wrapper in isolation and consumes only its structured report.
|
|
685
706
|
|
|
686
707
|
**Team workflow with Amp:**
|
|
687
708
|
|
|
@@ -750,11 +771,23 @@ CLAUDE.md # Committed — synced to .claude/CLAUDE.md
|
|
|
750
771
|
openspec/ # Committed — spec-driven workflow
|
|
751
772
|
config.yaml # Project context for AI
|
|
752
773
|
specs/ # Source of truth after archive
|
|
753
|
-
changes/ # Active work
|
|
774
|
+
changes/ # Active work; <name>/handoff.md indexes session state
|
|
754
775
|
```
|
|
755
776
|
|
|
756
777
|
## Changelog
|
|
757
778
|
|
|
779
|
+
### 0.1.14
|
|
780
|
+
- **HARD STOP session handoff** — `session-handoff` subagent at start/exit; Amp isolated `subagent-session-handoff`
|
|
781
|
+
- **`handoff` CLI** — writes `handoff.md`, upserts `.cursor/memory.json` with an absolute path, prints an expanded self-contained next-thread prompt
|
|
782
|
+
- **`memory-setup` + `memory-mcp-launcher.cjs`** — never a relative `MEMORY_FILE_PATH` (Amp was reading the wrong graph)
|
|
783
|
+
- Next-thread prompt includes role, spawn instructions, Done/Decisions/Blocked, and exit HARD STOP
|
|
784
|
+
|
|
785
|
+
### 0.1.13
|
|
786
|
+
- Pipeline **conductor**: `/opsx:*` parent spawns the routed specialist and does not do that work itself
|
|
787
|
+
- Five new stage subagents: `codebase-explorer`, `design-intake`, `spec-architect`, `spec-reviewer`, `spec-archiver`
|
|
788
|
+
- Session handoff: Memory → `handoff.md` → next-session prompt in `project.agent_language` (read Memory on start)
|
|
789
|
+
- Amp `subagent-*` wrappers must run as isolated subagents, not in the main thread
|
|
790
|
+
|
|
758
791
|
### 0.1.12
|
|
759
792
|
- `figma-fetch --depth <n>` for large frames
|
|
760
793
|
- Write large Figma JSON as raw API text (avoids `Invalid string length` on huge trees)
|