agent-orchestrator-kit 0.1.13 → 0.2.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/CHANGELOG.md +16 -0
- package/README.md +18 -11
- package/bin/agent-orchestrator.js +558 -2
- package/package.json +2 -2
- package/profiles/generic/orchestrator.yaml +3 -0
- package/profiles/mvp/orchestrator.yaml +3 -0
- package/profiles/node/orchestrator.yaml +3 -0
- package/profiles/vue3/orchestrator.yaml +3 -0
- package/templates/.agents/amp.settings.json.example +2 -5
- package/templates/.agents/commands/opsx-apply.md +10 -3
- package/templates/.agents/commands/opsx-archive.md +10 -3
- package/templates/.agents/commands/opsx-design.md +10 -3
- package/templates/.agents/commands/opsx-explore.md +10 -3
- package/templates/.agents/commands/opsx-propose.md +10 -3
- package/templates/.agents/commands/opsx-quick.md +10 -3
- package/templates/.agents/commands/opsx-review.md +10 -3
- package/templates/.agents/mcp.json.example +2 -5
- package/templates/.agents/rules/agent-orchestration.mdc +28 -68
- package/templates/.agents/rules/cli-via-npm.mdc +2 -1
- package/templates/.agents/rules/figma-token-setup.mdc +1 -1
- package/templates/.agents/rules/memory-mcp-autosetup.mdc +4 -54
- package/templates/.agents/rules/session-handoff.mdc +28 -0
- package/templates/.agents/skills/agent-orchestration/SKILL.md +36 -19
- package/templates/.agents/subagents/session-handoff.md +48 -0
- package/templates/.agents/subagents/setup-doctor.md +1 -1
- package/templates/AGENTS.md +22 -119
- package/templates/CLAUDE.md +6 -65
- package/templates/orchestrator.yaml +6 -0
- package/templates/scripts/memory-mcp-launcher.cjs +46 -0
- package/templates/scripts/sync-local-agent-skills.sh +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-handoff
|
|
3
|
+
description: ALWAYS use at the start of every /opsx:* session to restore Memory and handoff.md, and at session exit to persist Memory, write handoff.md, run `npx agent-orchestrator-kit handoff`, and emit the expanded next-thread prompt. Do NOT use to write src/, specs, review.md, or to perform the phase specialist's work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are the session-boundary specialist. You restore or persist orchestration state. You do not implement features, write specs, or review code.
|
|
7
|
+
|
|
8
|
+
The parent is the conductor. Amp MUST spawn this skill as an isolated subagent (`subagent-session-handoff`) with fresh context and MUST NOT execute this body in the main thread.
|
|
9
|
+
|
|
10
|
+
## Restore mode
|
|
11
|
+
|
|
12
|
+
Use when the conductor says restore / session start.
|
|
13
|
+
|
|
14
|
+
1. Run `npx agent-orchestrator-kit status`.
|
|
15
|
+
2. Run `npx agent-orchestrator-kit handoff --restore` (add `<name>` when known).
|
|
16
|
+
3. If Memory MCP tools are available, read `Change:<name>`, `Handoff:<name>`, and `Decision:*`.
|
|
17
|
+
4. If CLI restore fails, read `openspec/changes/<name>/handoff.md` when it exists.
|
|
18
|
+
5. Return the restore report. Do not spawn the phase specialist yourself.
|
|
19
|
+
|
|
20
|
+
## Persist mode
|
|
21
|
+
|
|
22
|
+
Use when the conductor says persist / session exit. A session is not closed until this mode succeeds.
|
|
23
|
+
|
|
24
|
+
1. Write or update `openspec/changes/<name>/handoff.md` with every required section: Closed role, Change, Done, Decisions, Blocked, Next command, Next role, Attach, Subagents to spawn, Constraints.
|
|
25
|
+
2. Run `npx agent-orchestrator-kit handoff <name>` and require exit 0. This upserts `.cursor/memory.json` using an absolute path and prints the expanded next-session prompt on stdout.
|
|
26
|
+
3. If Memory MCP tools are available, also create/update `Change:<name>`, `Handoff:<name>`, and each `Decision:<topic>` to match the file. MCP failure is not a blocker after the CLI succeeds.
|
|
27
|
+
4. Put the CLI stdout prompt (first line `/opsx:…`) into **Next prompt** unchanged. Do not shorten it. Do not add a banner.
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- Do NOT edit `src/`, tests, main specs, `tasks.md` checkboxes, or phase artifacts (`proposal.md`, `review.md`, `design-brief.md`) except `handoff.md`.
|
|
32
|
+
- Do NOT start the next OpenSpec phase.
|
|
33
|
+
- Do NOT return a thin prompt. The next thread must be able to run if Memory MCP is ignored.
|
|
34
|
+
- Stop as blocked when the change name or next command cannot be resolved.
|
|
35
|
+
|
|
36
|
+
Return exactly this report contract:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
## Subagent report: session-handoff
|
|
40
|
+
**Status:** done | blocked
|
|
41
|
+
**Mode:** restore | persist
|
|
42
|
+
**Files:** handoff.md path or none
|
|
43
|
+
**CLI:** handoff command result or skipped
|
|
44
|
+
**Memory:** written | read | unavailable
|
|
45
|
+
**Next prompt:** the full CLI stdout prompt (persist) or none (restore)
|
|
46
|
+
**Done:** what was restored or persisted
|
|
47
|
+
**Blocked:** missing change/command/CLI failure or none
|
|
48
|
+
```
|
|
@@ -10,7 +10,7 @@ Diagnosis steps:
|
|
|
10
10
|
1. Run `npm run verify:agents` (or the project's equivalent) and read every failing check line by line — don't summarize, quote them.
|
|
11
11
|
2. Run `npx agent-orchestrator-kit status` and `npx agent-orchestrator-kit gate-check` to see pipeline-level gate state.
|
|
12
12
|
3. Check `.agents/orchestrator.yaml` → `kit_version` against the installed package version; flag drift.
|
|
13
|
-
4. Check that `.mcp.json` / `.amp/settings.json` exist
|
|
13
|
+
4. Check that `.mcp.json` / `.amp/settings.json` exist and that Memory MCP uses `node scripts/memory-mcp-launcher.cjs` (never a relative `MEMORY_FILE_PATH`). If the path is relative or the launcher is missing, run `npx agent-orchestrator-kit memory-setup`.
|
|
14
14
|
5. Optional Figma: run `npx agent-orchestrator-kit figma-status`. If not configured, tell the user to run `npx agent-orchestrator-kit figma-setup` and edit `.agents/figma.local.env` locally — **never ask them to paste the token into chat**. Confirm `.gitignore` contains `.agents/figma.local.env` and that `scripts/figma-mcp-launcher.cjs` exists.
|
|
15
15
|
6. Check `.cursor/skills/`, `.cursor/rules/`, `.cursor/agents/` (and `.claude/` equivalents) are present and not stale relative to `.agents/` — if stale, this is fixed by running `sync`, not by hand-editing.
|
|
16
16
|
|
package/templates/AGENTS.md
CHANGED
|
@@ -2,133 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
> Powered by [agent-orchestrator-kit](https://github.com/makshc2/agent-orchestrator-kit) v{{KIT_VERSION}}
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Every feature follows the same cycle regardless of stack or IDE.
|
|
7
|
-
|
|
8
|
-
## Pipeline
|
|
5
|
+
Spec-driven OpenSpec pipeline. Each phase is a **separate chat**. The parent `/opsx:*` session is a **conductor**: restore, spawn the specialist, verify the report — never do specialist work in-thread.
|
|
9
6
|
|
|
10
7
|
```
|
|
11
8
|
explore → [design] → propose → review → apply → verify → archive
|
|
12
9
|
```
|
|
13
10
|
|
|
14
|
-
`[design]` is optional
|
|
15
|
-
|
|
16
|
-
Each phase runs in a **separate agent session** with a dedicated role, model hint, and permissions.
|
|
17
|
-
Never mix phases in one chat — this is the single most important rule.
|
|
18
|
-
|
|
19
|
-
The parent `/opsx:*` session is a **conductor**: it restores handoff state, spawns the required specialist, verifies the structured report, and never performs the specialist's work itself.
|
|
20
|
-
|
|
21
|
-
## Roles
|
|
22
|
-
|
|
23
|
-
| Role | Command | Mode | Model hint |
|
|
24
|
-
|------|---------|------|------------|
|
|
25
|
-
| Explorer | `/opsx:explore` | read-only | fast |
|
|
26
|
-
| Design Intake | `/opsx:design <name>` | writes `design-brief.md` + `assets/` only | strong |
|
|
27
|
-
| Architect | `/opsx:propose <name>` | conductor; `spec-architect` writes change artifacts | strong |
|
|
28
|
-
| Spec Reviewer | `/opsx:review <name>` | conductor; `spec-reviewer` writes only `review.md` | medium/strong |
|
|
29
|
-
| Implementer | `/opsx:apply <name>` | conductor; apply specialists write code/tests | strong |
|
|
30
|
-
| Verifier | CI (automatic) | scripts only | — |
|
|
31
|
-
|
|
32
|
-
## Conductor Routing
|
|
33
|
-
|
|
34
|
-
| Phase / signal | Subagent |
|
|
35
|
-
|----------------|----------|
|
|
36
|
-
| Status, gate failure, next command | `openspec-guide` |
|
|
37
|
-
| Broken kit, MCP, or sync | `setup-doctor` |
|
|
38
|
-
| `/opsx:explore` repository research | `codebase-explorer` |
|
|
39
|
-
| `/opsx:design` | `design-intake` |
|
|
40
|
-
| `/opsx:propose` | `spec-architect` |
|
|
41
|
-
| `/opsx:review` | `spec-reviewer` |
|
|
42
|
-
| Apply with design evidence | `design-implementer` |
|
|
43
|
-
| Apply ordinary task | `code-writer` |
|
|
44
|
-
| Apply tests | `test-writer` |
|
|
45
|
-
| Apply pre-PR review | `code-reviewer` |
|
|
46
|
-
| `/opsx:archive` | `spec-archiver` |
|
|
47
|
-
|
|
48
|
-
This routing is mandatory and exclusive. `spec-reviewer` is not `code-reviewer`; only the conductor marks `tasks.md` after a verified `Status: done` report.
|
|
49
|
-
|
|
50
|
-
Verifier runs on **GitHub Actions** (default) or **GitLab** via `prebuild` → `verify:openspec` when using `init --ci gitlab`. GitLab projects do not use `.github/workflows/`.
|
|
51
|
-
|
|
52
|
-
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`).
|
|
53
|
-
|
|
54
|
-
Both CI fragments also run `npx 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`). At session start run `npx agent-orchestrator-kit status` (not a bare global binary — Amp PATH often lacks it; see `.agents/rules/cli-via-npm.mdc`).
|
|
55
|
-
|
|
56
|
-
## Hard Rules
|
|
57
|
-
|
|
58
|
-
- **One active change per developer** at a time.
|
|
59
|
-
- **No apply without spec-review approval** (explicit Approve in chat).
|
|
60
|
-
- **No code edits** during explore, design-intake, or spec-review sessions.
|
|
61
|
-
- **Archive after every merge** (`/opsx:archive`).
|
|
62
|
-
- **Always run local build/lint** before opening a PR.
|
|
63
|
-
- **Conductor MUST spawn** the routed specialist and MUST NOT do specialist work in the parent session.
|
|
64
|
-
|
|
65
|
-
## Handoff Gates
|
|
66
|
-
|
|
67
|
-
| Transition | Gate |
|
|
68
|
-
|------------|------|
|
|
69
|
-
| explore → design | UI change needs a brief; change name chosen |
|
|
70
|
-
| explore → propose | Decision brief written; change name chosen (skip design if non-UI) |
|
|
71
|
-
| design → propose | `design-brief.md` (+ `assets/`) written |
|
|
72
|
-
| propose → review | `npx openspec validate <name> --strict --type change` passes ✓ |
|
|
73
|
-
| review → apply | Reviewer writes explicit **Approve** — enforced in CI by `gate-check` |
|
|
74
|
-
| apply → verify | All `tasks.md` checkboxes `[x]`; local build OK |
|
|
75
|
-
| verify → archive | CI green; PR merged — check `npx agent-orchestrator-kit status` for "ready to archive" |
|
|
76
|
-
|
|
77
|
-
## Context to Pin per Role
|
|
78
|
-
|
|
79
|
-
| Role | Attach (`@`) |
|
|
80
|
-
|------|-------------|
|
|
81
|
-
| Explorer | `@openspec/specs/` + relevant `@src/` subtree |
|
|
82
|
-
| Design Intake | design source (Figma URL / images) + `@openspec/changes/<name>/` |
|
|
83
|
-
| Architect | `@openspec/config.yaml` + explore brief (+ `@design-brief.md` if present) |
|
|
84
|
-
| Reviewer | entire `@openspec/changes/<name>/` |
|
|
85
|
-
| Implementer | `@openspec/changes/<name>/tasks.md` + `@openspec/changes/<name>/design-brief.md` |
|
|
86
|
-
|
|
87
|
-
## Configuration
|
|
88
|
-
|
|
89
|
-
See `.agents/orchestrator.yaml` for role config, pipeline flags, and MCP baseline.
|
|
90
|
-
|
|
91
|
-
## Session Handoff
|
|
92
|
-
|
|
93
|
-
At session start: honor the pasted `/opsx:*` command, read Memory `Change:<name>`, `Handoff:<name>`, `Decision:*`, then fall back to `openspec/changes/<name>/handoff.md` when Memory is unavailable or empty.
|
|
94
|
-
|
|
95
|
-
At exit, in order: update Memory → write `handoff.md` → print one fenced next-session prompt beginning with `/opsx:*`. The prompt body uses `project.agent_language`, asks the next session to read Memory, has no service banner, and does not repeat the full summary. Never start the next phase in the current chat.
|
|
96
|
-
|
|
97
|
-
OpenSpec artifacts remain the source of truth for requirements and tasks. Memory and `handoff.md` are only a durable index of the current phase, decisions, blockers, and next command.
|
|
98
|
-
|
|
99
|
-
### Optional: Figma personal token
|
|
100
|
-
|
|
101
|
-
For design intake against private Figma files, each developer configures a local token (never commit, never paste into chat):
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
npx agent-orchestrator-kit figma-setup
|
|
105
|
-
# edit .agents/figma.local.env → FIGMA_ACCESS_TOKEN=...
|
|
106
|
-
npx agent-orchestrator-kit figma-status
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
MCP starts via `scripts/figma-mcp-launcher.cjs` (secret stays out of `.mcp.json`). See kit README → **Figma token**.
|
|
11
|
+
`[design]` is optional (`/opsx:design`). Non-UI: `Design: none` in `proposal.md` when `require_design_brief: true`. MVP: `/opsx:quick` when `require_spec_review: false`.
|
|
110
12
|
|
|
111
|
-
|
|
13
|
+
Routing table, HARD STOP, and CLI forms: `.agents/rules/` (`agent-orchestration`, `session-handoff`, `cli-via-npm`). Config: `.agents/orchestrator.yaml`.
|
|
112
14
|
|
|
113
|
-
|
|
114
|
-
|
|
15
|
+
## Commands
|
|
16
|
+
| Role | Command |
|
|
17
|
+
|------|---------|
|
|
18
|
+
| Explorer | `/opsx:explore` |
|
|
19
|
+
| Design Intake | `/opsx:design <name>` |
|
|
20
|
+
| Architect | `/opsx:propose <name>` |
|
|
21
|
+
| Spec Reviewer | `/opsx:review <name>` |
|
|
22
|
+
| Implementer | `/opsx:apply <name>` |
|
|
23
|
+
| Quick (MVP) | `/opsx:quick <name>` |
|
|
24
|
+
| Archive | `/opsx:archive` |
|
|
115
25
|
|
|
116
|
-
|
|
117
|
-
|-------|------|
|
|
118
|
-
| `agent-orchestration` | Pipeline decisions, role selection, handoff |
|
|
119
|
-
| `openspec-howto` | OpenSpec CLI, cycle, naming |
|
|
120
|
-
| `openspec-propose` | Creating change artifacts |
|
|
121
|
-
| `openspec-apply-change` | Implementing tasks |
|
|
122
|
-
| `openspec-archive-change` | Archiving after merge |
|
|
26
|
+
Start: `npx agent-orchestrator-kit status` then `handoff --restore`. Spawn `session-handoff` restore only if that CLI failed. Then spawn the routed specialist (Amp: isolated `subagent-<name>`).
|
|
123
27
|
|
|
124
|
-
|
|
28
|
+
Exit HARD STOP: persist `session-handoff` → `handoff.md` → `npx agent-orchestrator-kit handoff <name>` (exit 0) → paste the CLI `/opsx:*` prompt. Do not start the next phase here.
|
|
125
29
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
| CI fails on PR | ≤ 1 |
|
|
30
|
+
## Hard rules
|
|
31
|
+
- One active change (unless mvp profile).
|
|
32
|
+
- No apply without explicit Approve when `require_spec_review: true`.
|
|
33
|
+
- No `src/` in explore, design, or review.
|
|
34
|
+
- Archive after merge. Build/lint before PR.
|
|
35
|
+
- Memory MCP: `node scripts/memory-mcp-launcher.cjs` (never relative `MEMORY_FILE_PATH`).
|
|
133
36
|
|
|
134
|
-
|
|
37
|
+
Pin only the files for the current role (`tasks.md`, the change folder, relevant `src/` subtree) — not entire `openspec/specs/`.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -1,74 +1,15 @@
|
|
|
1
1
|
# {{PROJECT_NAME}} — Claude Code Context
|
|
2
2
|
|
|
3
|
-
> agent-orchestrator-kit v{{KIT_VERSION}} |
|
|
3
|
+
> agent-orchestrator-kit v{{KIT_VERSION}} | OpenSpec pipeline
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
See `AGENTS.md` for the full orchestration pipeline, roles, and hard rules.
|
|
8
|
-
See `openspec/config.yaml` for stack context and agent language.
|
|
9
|
-
|
|
10
|
-
## Skills
|
|
11
|
-
|
|
12
|
-
Project skills live in `.claude/skills/` (synced from `.agents/skills/`).
|
|
13
|
-
Use `/skill-name` or let Claude auto-load based on context.
|
|
14
|
-
|
|
15
|
-
| Skill | Command | When |
|
|
16
|
-
|-------|---------|------|
|
|
17
|
-
| Agent Orchestration | `/agent-orchestration` | Role selection, pipeline, handoff decisions |
|
|
18
|
-
| OpenSpec Howto | `/openspec-howto` | CLI, cycle, naming |
|
|
19
|
-
| OpenSpec Propose | `/openspec-propose` | Creating change artifacts |
|
|
20
|
-
| OpenSpec Apply | `/openspec-apply-change` | Implementing tasks |
|
|
21
|
-
| OpenSpec Archive | `/openspec-archive-change` | Archiving after merge |
|
|
22
|
-
|
|
23
|
-
## Pipeline Commands
|
|
5
|
+
See `AGENTS.md` and `.agents/rules/` for routing, HARD STOP, and CLI (`npx` only). Config: `.agents/orchestrator.yaml`.
|
|
24
6
|
|
|
25
7
|
```
|
|
26
|
-
/opsx:explore
|
|
27
|
-
/opsx:design — capture design into design-brief.md + assets/ (optional)
|
|
28
|
-
/opsx:propose — create change artifacts
|
|
29
|
-
/opsx:review — spec review (read-only, no code)
|
|
30
|
-
/opsx:apply — implement tasks
|
|
31
|
-
/opsx:archive — archive after merge
|
|
8
|
+
/opsx:explore · /opsx:design · /opsx:propose · /opsx:review · /opsx:apply · /opsx:archive
|
|
32
9
|
```
|
|
33
10
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| Signal | Subagent |
|
|
37
|
-
|--------|----------|
|
|
38
|
-
| Status / next command | `openspec-guide` |
|
|
39
|
-
| Kit / MCP / sync failure | `setup-doctor` |
|
|
40
|
-
| Explore research | `codebase-explorer` |
|
|
41
|
-
| Design intake | `design-intake` |
|
|
42
|
-
| Propose | `spec-architect` |
|
|
43
|
-
| Spec review | `spec-reviewer` |
|
|
44
|
-
| Apply UI / ordinary task / tests / pre-PR review | `design-implementer` / `code-writer` / `test-writer` / `code-reviewer` |
|
|
45
|
-
| Archive | `spec-archiver` |
|
|
46
|
-
|
|
47
|
-
## Key Rules for This Session
|
|
48
|
-
|
|
49
|
-
- Check `.agents/orchestrator.yaml` for project-specific pipeline config.
|
|
50
|
-
- One active change at a time — run `npx openspec list` / `npx agent-orchestrator-kit status` to confirm.
|
|
51
|
-
- No code edits in explore, design, or review mode.
|
|
52
|
-
- Design Intake writes only `design-brief.md` and `assets/` — never `src/`.
|
|
53
|
-
- After completing apply: run build/lint before declaring done.
|
|
54
|
-
- Only the conductor marks `tasks.md`, after a specialist reports `Status: done` and its files are verified.
|
|
55
|
-
- Use `npx openspec validate --all --strict` or `npx openspec validate <name> --strict --type change`.
|
|
56
|
-
- Never bare `openspec` / `agent-orchestrator-kit` without `npx` (Amp PATH → exit 127). See `.agents/rules/cli-via-npm.mdc`.
|
|
57
|
-
|
|
58
|
-
## Session Handoff
|
|
59
|
-
|
|
60
|
-
Before work, read Memory `Change:<name>`, `Handoff:<name>`, `Decision:*`; if unavailable or empty, read `openspec/changes/<name>/handoff.md`. At exit: Memory → `handoff.md` → one fenced `/opsx:*` prompt localized to `project.agent_language`, with no banner or duplicated summary. Do not begin the next phase in the same chat.
|
|
61
|
-
|
|
62
|
-
OpenSpec files are the requirements/tasks source of truth. Memory and `handoff.md` only index phase state, decisions, blockers, and the next command.
|
|
11
|
+
Conductor session: restore with `npx agent-orchestrator-kit handoff --restore`, spawn the phase specialist, do not do specialist work here. Spawn `session-handoff` restore only if CLI restore failed.
|
|
63
12
|
|
|
64
|
-
|
|
13
|
+
Exit: persist → `handoff.md` → `npx agent-orchestrator-kit handoff <name>` (exit 0) → paste the CLI prompt. Do not start the next phase in this chat.
|
|
65
14
|
|
|
66
|
-
|
|
67
|
-
|------|-------|
|
|
68
|
-
| Active changes | `openspec/changes/` |
|
|
69
|
-
| Design brief | `openspec/changes/<name>/design-brief.md` + `assets/` |
|
|
70
|
-
| Session handoff index | `openspec/changes/<name>/handoff.md` |
|
|
71
|
-
| Specs (source of truth) | `openspec/specs/` |
|
|
72
|
-
| Project config | `openspec/config.yaml` |
|
|
73
|
-
| Orchestration config | `.agents/orchestrator.yaml` |
|
|
74
|
-
| Skills | `.claude/skills/` |
|
|
15
|
+
One active change. No `src/` in explore/design/review. After apply: build/lint. Skills: `.claude/skills/` (synced from `.agents/skills/`).
|
|
@@ -49,10 +49,13 @@ handoff:
|
|
|
49
49
|
restore_on_start: true
|
|
50
50
|
persist_on_exit: true
|
|
51
51
|
emit_next_session_prompt: true
|
|
52
|
+
prompt_self_contained: true
|
|
53
|
+
spawn_handoff_subagent: true
|
|
52
54
|
|
|
53
55
|
memory:
|
|
54
56
|
enabled: true
|
|
55
57
|
file: .cursor/memory.json
|
|
58
|
+
launcher: scripts/memory-mcp-launcher.cjs
|
|
56
59
|
|
|
57
60
|
mcp:
|
|
58
61
|
baseline:
|
|
@@ -76,6 +79,9 @@ verifier:
|
|
|
76
79
|
cli:
|
|
77
80
|
status: npx agent-orchestrator-kit status
|
|
78
81
|
gate_check: npx agent-orchestrator-kit gate-check
|
|
82
|
+
handoff: npx agent-orchestrator-kit handoff <name>
|
|
83
|
+
handoff_restore: npx agent-orchestrator-kit handoff --restore
|
|
84
|
+
memory_setup: npx agent-orchestrator-kit memory-setup
|
|
79
85
|
openspec_list: npx openspec list
|
|
80
86
|
openspec_validate_change: npx openspec validate <name> --strict --type change
|
|
81
87
|
openspec_validate_all: npx openspec validate --all --strict
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require('child_process');
|
|
3
|
+
const { existsSync, mkdirSync } = require('fs');
|
|
4
|
+
const { dirname, join } = require('path');
|
|
5
|
+
|
|
6
|
+
function findProjectDir(startDir) {
|
|
7
|
+
let dir = startDir;
|
|
8
|
+
while (dir !== dirname(dir)) {
|
|
9
|
+
if (
|
|
10
|
+
existsSync(join(dir, 'AGENTS.md')) ||
|
|
11
|
+
existsSync(join(dir, '.agents', 'orchestrator.yaml'))
|
|
12
|
+
) {
|
|
13
|
+
return dir;
|
|
14
|
+
}
|
|
15
|
+
dir = dirname(dir);
|
|
16
|
+
}
|
|
17
|
+
return join(startDir, '..');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const projectDir = findProjectDir(__dirname);
|
|
21
|
+
const cursorDir = join(projectDir, '.cursor');
|
|
22
|
+
const memoryFile = join(cursorDir, 'memory.json');
|
|
23
|
+
|
|
24
|
+
mkdirSync(cursorDir, { recursive: true });
|
|
25
|
+
|
|
26
|
+
const child = spawn('npx', ['-y', '@modelcontextprotocol/server-memory'], {
|
|
27
|
+
stdio: 'inherit',
|
|
28
|
+
env: {
|
|
29
|
+
...process.env,
|
|
30
|
+
MEMORY_FILE_PATH: memoryFile,
|
|
31
|
+
},
|
|
32
|
+
shell: process.platform === 'win32',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
child.on('exit', (code, signal) => {
|
|
36
|
+
if (signal) {
|
|
37
|
+
process.kill(process.pid, signal);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
process.exit(code == null ? 1 : code);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
child.on('error', (error) => {
|
|
44
|
+
console.error(`[memory-mcp-launcher] Failed to start memory MCP: ${error.message}`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
@@ -50,7 +50,7 @@ if [ -d .agents/subagents ]; then
|
|
|
50
50
|
echo ""
|
|
51
51
|
echo "<!-- AUTO-GENERATED from ${sub} — edit the source file, then re-run this script -->"
|
|
52
52
|
echo ""
|
|
53
|
-
echo "Parent MUST spawn this skill as an isolated subagent with fresh context. Do not execute it in the main thread. Return only the structured subagent report."
|
|
53
|
+
echo "CRITICAL (Amp / Cursor / Claude): Parent MUST spawn this skill as an isolated subagent with fresh context. Do not execute it in the main thread. If spawn is unavailable, STOP and report blocked — do not perform this specialist's work in the parent. Return only the structured subagent report."
|
|
54
54
|
echo ""
|
|
55
55
|
awk '/^---$/{c++; next} c>=2{print}' "$sub"
|
|
56
56
|
} > "$DIR/SKILL.md"
|