agent-orchestrator-kit 0.1.10 → 0.1.12

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +70 -4
  3. package/bin/agent-orchestrator.js +302 -4
  4. package/package.json +4 -2
  5. package/profiles/generic/orchestrator.yaml +7 -0
  6. package/profiles/mvp/orchestrator.yaml +7 -0
  7. package/profiles/node/orchestrator.yaml +7 -0
  8. package/profiles/vue3/orchestrator.yaml +6 -0
  9. package/templates/.agents/amp.settings.json.example +4 -0
  10. package/templates/.agents/commands/opsx-apply.md +3 -3
  11. package/templates/.agents/commands/opsx-archive.md +2 -2
  12. package/templates/.agents/commands/opsx-design.md +2 -2
  13. package/templates/.agents/commands/opsx-explore.md +2 -2
  14. package/templates/.agents/commands/opsx-propose.md +5 -5
  15. package/templates/.agents/commands/opsx-quick.md +2 -2
  16. package/templates/.agents/commands/opsx-review.md +3 -3
  17. package/templates/.agents/commands/opsx-sync.md +2 -2
  18. package/templates/.agents/figma.local.env.example +10 -0
  19. package/templates/.agents/mcp.json.example +4 -0
  20. package/templates/.agents/rules/agent-orchestration.mdc +1 -0
  21. package/templates/.agents/rules/cli-via-npm.mdc +40 -0
  22. package/templates/.agents/rules/figma-token-setup.mdc +35 -0
  23. package/templates/.agents/rules/openspec-workflow.mdc +8 -5
  24. package/templates/.agents/skills/agent-orchestration/SKILL.md +8 -7
  25. package/templates/.agents/skills/openspec-apply-change/SKILL.md +3 -3
  26. package/templates/.agents/skills/openspec-archive-change/SKILL.md +2 -2
  27. package/templates/.agents/skills/openspec-explore/SKILL.md +2 -2
  28. package/templates/.agents/skills/openspec-howto/SKILL.md +4 -0
  29. package/templates/.agents/skills/openspec-propose/SKILL.md +5 -5
  30. package/templates/.agents/skills/openspec-sync-specs/SKILL.md +2 -2
  31. package/templates/.agents/subagents/code-reviewer.md +1 -1
  32. package/templates/.agents/subagents/openspec-guide.md +2 -2
  33. package/templates/.agents/subagents/setup-doctor.md +2 -1
  34. package/templates/.github/workflows/agent-verify.yml +3 -3
  35. package/templates/.github/workflows/spec-verify.yml +3 -3
  36. package/templates/AGENTS.md +15 -3
  37. package/templates/CLAUDE.md +3 -2
  38. package/templates/orchestrator.yaml +15 -0
  39. package/templates/scripts/figma-mcp-launcher.cjs +67 -0
@@ -86,7 +86,7 @@ You have full context of the OpenSpec system. Use it naturally, don't force it.
86
86
 
87
87
  At the start, quickly check what exists:
88
88
  ```bash
89
- openspec list --json
89
+ npx openspec list --json
90
90
  ```
91
91
 
92
92
  This tells you:
@@ -108,7 +108,7 @@ Think freely. When insights crystallize, you might offer:
108
108
  If the user mentions a change or you detect one is relevant:
109
109
 
110
110
  1. **Resolve and read existing artifacts for context**
111
- - Run `openspec status --change "<name>" --json`.
111
+ - Run `npx openspec status --change "<name>" --json`.
112
112
  - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
113
113
  - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
114
114
 
@@ -31,13 +31,13 @@ When ready to implement, run /opsx:apply
31
31
 
32
32
  2. **Create the change directory**
33
33
  ```bash
34
- openspec new change "<name>"
34
+ npx openspec new change "<name>"
35
35
  ```
36
36
  This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
37
37
 
38
38
  3. **Get the artifact build order**
39
39
  ```bash
40
- openspec status --change "<name>" --json
40
+ npx openspec status --change "<name>" --json
41
41
  ```
42
42
  Parse the JSON to get:
43
43
  - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
@@ -53,7 +53,7 @@ When ready to implement, run /opsx:apply
53
53
  a. **For each artifact that is `ready` (dependencies satisfied)**:
54
54
  - Get instructions:
55
55
  ```bash
56
- openspec instructions <artifact-id> --change "<name>" --json
56
+ npx openspec instructions <artifact-id> --change "<name>" --json
57
57
  ```
58
58
  - The instructions JSON includes:
59
59
  - `context`: Project background (constraints for you - do NOT include in output)
@@ -68,7 +68,7 @@ When ready to implement, run /opsx:apply
68
68
  - Show brief progress: "Created <artifact-id>"
69
69
 
70
70
  b. **Continue until all `applyRequires` artifacts are complete**
71
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
71
+ - After creating each artifact, re-run `npx openspec status --change "<name>" --json`
72
72
  - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
73
73
  - Stop when all `applyRequires` artifacts are done
74
74
 
@@ -78,7 +78,7 @@ When ready to implement, run /opsx:apply
78
78
 
79
79
  5. **Show final status**
80
80
  ```bash
81
- openspec status --change "<name>"
81
+ npx openspec status --change "<name>"
82
82
  ```
83
83
 
84
84
  **Output**
@@ -31,7 +31,7 @@ Quick mode for **small changes, demos, and hypothesis testing**. Combines propos
31
31
  2. **Create change (minimal artifacts)**
32
32
 
33
33
  ```bash
34
- openspec new change "<name>"
34
+ npx openspec new change "<name>"
35
35
  ```
36
36
 
37
37
  Create **lightweight** artifacts (no delta specs unless user asks):
@@ -44,7 +44,7 @@ Quick mode for **small changes, demos, and hypothesis testing**. Combines propos
44
44
  3. **Validate**
45
45
 
46
46
  ```bash
47
- openspec validate <name> --strict --type change
47
+ npx openspec validate <name> --strict --type change
48
48
  ```
49
49
 
50
50
  4. **Apply immediately**
@@ -18,7 +18,7 @@ Review an OpenSpec change. Read artifacts, validate structure, output Approve or
18
18
  ### 1. Select the change
19
19
 
20
20
  If name provided — use it. Otherwise:
21
- - Run `openspec list --json` to list active changes.
21
+ - Run `npx openspec list --json` to list active changes.
22
22
  - Auto-select if only one exists.
23
23
  - Ask the user with AskUserQuestion if ambiguous.
24
24
 
@@ -27,7 +27,7 @@ Announce: "Reviewing change: **<name>**"
27
27
  ### 2. Validate structure
28
28
 
29
29
  ```bash
30
- openspec validate <name> --strict --type change
30
+ npx openspec validate <name> --strict --type change
31
31
  ```
32
32
 
33
33
  If ✗ — list each error and immediately output **Request Changes** with the validation errors. Stop here.
@@ -35,7 +35,7 @@ If ✗ — list each error and immediately output **Request Changes** with the v
35
35
  ### 3. Read all artifacts
36
36
 
37
37
  ```bash
38
- openspec status --change "<name>" --json
38
+ npx openspec status --change "<name>" --json
39
39
  ```
40
40
 
41
41
  Read every file from `artifactPaths`:
@@ -15,7 +15,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
15
15
 
16
16
  1. **If no change name provided, prompt for selection**
17
17
 
18
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
18
+ Run `npx openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
19
19
 
20
20
  Show changes that have delta specs (under `specs/` directory).
21
21
 
@@ -25,7 +25,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
25
25
 
26
26
  Run:
27
27
  ```bash
28
- openspec status --change "<name>" --json
28
+ npx openspec status --change "<name>" --json
29
29
  ```
30
30
 
31
31
  If status reports `actionContext.mode: "workspace-planning"`, explain that workspace spec sync is not supported in this slice and STOP. Do not fall back to repo-local paths or edit linked repos.
@@ -0,0 +1,10 @@
1
+ # Figma Personal Access Token (local only — never commit this file)
2
+ # Create: Figma → Settings → Security → Personal access tokens
3
+ # Recommended scopes: file content read (as needed for your org)
4
+ #
5
+ # 1. Copy: cp .agents/figma.local.env.example .agents/figma.local.env
6
+ # 2. Paste your token below (do NOT paste it into AI chat)
7
+ # 3. Restart Cursor / Amp after saving
8
+ # 4. Check: npx agent-orchestrator-kit figma-status
9
+
10
+ FIGMA_ACCESS_TOKEN=
@@ -6,6 +6,10 @@
6
6
  "env": {
7
7
  "MEMORY_FILE_PATH": ".cursor/memory.json"
8
8
  }
9
+ },
10
+ "figma": {
11
+ "command": "node",
12
+ "args": ["scripts/figma-mcp-launcher.cjs"]
9
13
  }
10
14
  }
11
15
  }
@@ -26,6 +26,7 @@ This project uses a spec-driven role pipeline. Read `.agents/orchestrator.yaml`
26
26
  - Apply uses the design brief, not live Figma MCP
27
27
  - After apply: build + lint before PR
28
28
  - After merge: run `/opsx:archive` (when `archive_after_merge: true`)
29
+ - CLI: `npx agent-orchestrator-kit status`, `npx openspec …` — never bare globals (see `cli-via-npm.mdc`)
29
30
 
30
31
  ## Never
31
32
  - Mix propose and apply in one session
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: Always invoke OpenSpec and agent-orchestrator-kit via npx/npm (Amp + Cursor PATH)
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # CLI via npx / npm (Cursor + Amp)
7
+
8
+ Amp Code і багато агентських shell **не мають** глобальних `openspec`, `agent-orchestrator-kit`, `rg` у PATH → exit **127**.
9
+ Не викликай голі бінарні імена. Завжди з кореня репо (де є `package.json` / `node_modules/`):
10
+
11
+ ## Обов’язкові форми
12
+
13
+ | Замість (ламає Amp) | Використовуй |
14
+ |---------------------|--------------|
15
+ | `agent-orchestrator-kit status` | `npx agent-orchestrator-kit status` (або `npm run agent:status`, якщо script є) |
16
+ | `agent-orchestrator-kit gate-check` | `npx agent-orchestrator-kit gate-check` (або `npm run agent:gate-check`) |
17
+ | `openspec list` | `npx openspec list` (або `npm run openspec:list`) |
18
+ | `openspec validate --strict` | **ніколи без цілі** → `npx openspec validate <name> --strict --type change` |
19
+ | `openspec validate --all --strict` | `npx openspec validate --all --strict` (або `npm run openspec:validate` / `verify:openspec`) |
20
+ | `openspec status --change X` | `npx openspec status --change "X"` |
21
+ | `rg …` | IDE Grep / читання файлів; не покладайся на глобальний `rg` |
22
+
23
+ ## Session start
24
+
25
+ ```bash
26
+ npx agent-orchestrator-kit status
27
+ npx openspec list
28
+ ```
29
+
30
+ ## Validate перед review / apply
31
+
32
+ ```bash
33
+ npx openspec validate "<change-name>" --strict --type change
34
+ ```
35
+
36
+ ## Правила
37
+
38
+ - Якщо exit **127** — одразу `npx` / `npm run`, не повторюй голу команду.
39
+ - `openspec validate --strict` без `<name>` / `--all` / `--changes` — помилка контракту.
40
+ - CI вже використовує `npx …` — локальні агенти мають робити так само.
@@ -0,0 +1,35 @@
1
+ ---
2
+ description: Figma personal access token setup — local env file, never ask for token in chat
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Figma Token Setup
7
+
8
+ Optional Figma access for design intake (`/opsx:design`) uses a **local Personal Access Token**.
9
+
10
+ ## Where the token lives
11
+
12
+ | File | Git |
13
+ |------|-----|
14
+ | `.agents/figma.local.env` | **ignored** — real token |
15
+ | `.agents/figma.local.env.example` | committed — template |
16
+
17
+ Key: `FIGMA_ACCESS_TOKEN=`
18
+
19
+ ## Developer setup (tell the user this — never ask them to paste the token here)
20
+
21
+ ```bash
22
+ cp .agents/figma.local.env.example .agents/figma.local.env
23
+ # edit .agents/figma.local.env in the IDE and paste the token
24
+ npx agent-orchestrator-kit figma-status
25
+ ```
26
+
27
+ Restart Cursor / Amp after saving. MCP starts via `scripts/figma-mcp-launcher.cjs` (no secret in `.mcp.json`).
28
+
29
+ ## Agent rules
30
+
31
+ - **NEVER** ask the user to paste a Figma token into chat
32
+ - Check with `npx agent-orchestrator-kit figma-status` (yes/no only)
33
+ - If missing → point to `.agents/figma.local.env` + README “Figma token” section
34
+ - Use live Figma only in design-intake; apply uses `design-brief.md`
35
+ - Optional REST dump: `npx agent-orchestrator-kit figma-fetch --file <key> --nodes <id> --out openspec/changes/<name>/assets/figma-nodes.json`
@@ -30,13 +30,16 @@ alwaysApply: true
30
30
  - `/opsx:archive` → skill `openspec-archive-change`
31
31
  - `/opsx:sync` → skill `openspec-sync-specs`
32
32
 
33
- ## CLI (read-only)
33
+ ## CLI (via npx — never bare binaries)
34
+
35
+ See also `.agents/rules/cli-via-npm.mdc`.
34
36
 
35
37
  ```bash
36
- openspec list
37
- openspec validate <name> --strict --type change
38
- openspec status --change "<name>" --json
39
- openspec instructions apply --change "<name>" --json
38
+ npx openspec list
39
+ npx openspec validate "<name>" --strict --type change
40
+ npx openspec status --change "<name>" --json
41
+ npx openspec instructions apply --change "<name>" --json
42
+ npx agent-orchestrator-kit status
40
43
  ```
41
44
 
42
45
  Do NOT search for opsx in `src/` — nothing there.
@@ -77,9 +77,10 @@ Context from explore:
77
77
  ### propose → review
78
78
  Exit Architect when:
79
79
  ```bash
80
- openspec validate <name> --strict --type change # must pass ✓
81
- openspec status --change "<name>" # applyRequires artifacts all done
80
+ npx openspec validate <name> --strict --type change # must pass ✓
81
+ npx openspec status --change "<name>" # applyRequires artifacts all done
82
82
  ```
83
+ (Use `npx` / `npm run` — bare `openspec` / `agent-orchestrator-kit` often exit 127 in Amp. See `cli-via-npm.mdc`.)
83
84
 
84
85
  ### review → apply
85
86
  Exit Reviewer only when verdict is explicit **APPROVE ✓** and `review.md` written.
@@ -90,7 +91,7 @@ Before apply, check `.agents/orchestrator.yaml`:
90
91
 
91
92
  If Request Changes — fix artifacts, re-run `/opsx:review`.
92
93
 
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`).
94
+ This is no longer only a chat convention: `npx 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`).
94
95
 
95
96
  ### apply → verify
96
97
  Exit Implementer when:
@@ -110,7 +111,7 @@ After PR merged + CI green:
110
111
 
111
112
  **Start of each session:**
112
113
  1. Announce role: "Starting Spec Reviewer session for change: <name>"
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
114
+ 2. Run `npx agent-orchestrator-kit status` (or `npx 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
114
115
  3. Read `orchestrator.yaml` for project config and review gate
115
116
 
116
117
  **During session:**
@@ -151,12 +152,12 @@ At start of new session: read relevant entities to restore context without re-ex
151
152
  ## Orchestration Checklist (per change)
152
153
 
153
154
  - [ ] explore session closed before propose started
154
- - [ ] `openspec validate --strict` passed before review
155
+ - [ ] `npx openspec validate <name> --strict --type change` passed before review
155
156
  - [ ] explicit **Approve** received before apply (when `require_spec_review: true`)
156
157
  - [ ] `review.md` with `Verdict: APPROVE` exists (when review required)
157
158
  - [ ] all tasks `[x]` + build OK before PR
158
- - [ ] `agent-orchestrator-kit gate-check` passes locally before pushing (mirrors the CI gate)
159
- - [ ] `/opsx:archive` run after merge — `agent-orchestrator-kit status` shows "ready to archive"
159
+ - [ ] `npx agent-orchestrator-kit gate-check` passes locally before pushing (mirrors the CI gate)
160
+ - [ ] `/opsx:archive` run after merge — `npx agent-orchestrator-kit status` shows "ready to archive"
160
161
 
161
162
  ## Anti-patterns
162
163
 
@@ -20,13 +20,13 @@ Implement tasks from an OpenSpec change.
20
20
  If a name is provided, use it. Otherwise:
21
21
  - Infer from conversation context if the user mentioned a change
22
22
  - Auto-select if only one active change exists
23
- - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
23
+ - If ambiguous, run `npx openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
24
24
 
25
25
  Always announce: "Using change: <name>" and how to override (e.g., `/opsx:apply <other>`).
26
26
 
27
27
  2. **Check status to understand the schema**
28
28
  ```bash
29
- openspec status --change "<name>" --json
29
+ npx openspec status --change "<name>" --json
30
30
  ```
31
31
  Parse the JSON to understand:
32
32
  - `schemaName`: The workflow being used (e.g., "spec-driven")
@@ -36,7 +36,7 @@ Implement tasks from an OpenSpec change.
36
36
  3. **Get apply instructions**
37
37
 
38
38
  ```bash
39
- openspec instructions apply --change "<name>" --json
39
+ npx openspec instructions apply --change "<name>" --json
40
40
  ```
41
41
 
42
42
  This returns:
@@ -17,7 +17,7 @@ Archive a completed change in the experimental workflow.
17
17
 
18
18
  1. **If no change name provided, prompt for selection**
19
19
 
20
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
20
+ Run `npx openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
21
21
 
22
22
  Show only active changes (not already archived).
23
23
  Include the schema used for each change if available.
@@ -26,7 +26,7 @@ Archive a completed change in the experimental workflow.
26
26
 
27
27
  2. **Check artifact completion status**
28
28
 
29
- Run `openspec status --change "<name>" --json` to check artifact completion.
29
+ Run `npx openspec status --change "<name>" --json` to check artifact completion.
30
30
 
31
31
  Parse the JSON to understand:
32
32
  - `schemaName`: The workflow being used
@@ -83,7 +83,7 @@ You have full context of the OpenSpec system. Use it naturally, don't force it.
83
83
 
84
84
  At the start, quickly check what exists:
85
85
  ```bash
86
- openspec list --json
86
+ npx openspec list --json
87
87
  ```
88
88
 
89
89
  This tells you:
@@ -103,7 +103,7 @@ Think freely. When insights crystallize, you might offer:
103
103
  If the user mentions a change or you detect one is relevant:
104
104
 
105
105
  1. **Resolve and read existing artifacts for context**
106
- - Run `openspec status --change "<name>" --json`.
106
+ - Run `npx openspec status --change "<name>" --json`.
107
107
  - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
108
108
  - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
109
109
 
@@ -55,6 +55,10 @@ openspec/
55
55
 
56
56
  ## CLI (read-only — не змінює код)
57
57
 
58
+ Завжди `npx openspec …` або `npm run openspec:*` / `npx agent-orchestrator-kit …`.
59
+ Голі `openspec` / `agent-orchestrator-kit` у Amp часто дають exit **127**.
60
+ Див. `.agents/rules/cli-via-npm.mdc`. Ніколи `openspec validate --strict` без `<name>` / `--all`.
61
+
58
62
  | Команда | Навіщо |
59
63
  |---------|--------|
60
64
  | `list` | Активні changes або specs |
@@ -35,13 +35,13 @@ When ready to implement, run /opsx:apply
35
35
 
36
36
  2. **Create the change directory**
37
37
  ```bash
38
- openspec new change "<name>"
38
+ npx openspec new change "<name>"
39
39
  ```
40
40
  This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
41
41
 
42
42
  3. **Get the artifact build order**
43
43
  ```bash
44
- openspec status --change "<name>" --json
44
+ npx openspec status --change "<name>" --json
45
45
  ```
46
46
  Parse the JSON to get:
47
47
  - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
@@ -57,7 +57,7 @@ When ready to implement, run /opsx:apply
57
57
  a. **For each artifact that is `ready` (dependencies satisfied)**:
58
58
  - Get instructions:
59
59
  ```bash
60
- openspec instructions <artifact-id> --change "<name>" --json
60
+ npx openspec instructions <artifact-id> --change "<name>" --json
61
61
  ```
62
62
  - The instructions JSON includes:
63
63
  - `context`: Project background (constraints for you - do NOT include in output)
@@ -72,7 +72,7 @@ When ready to implement, run /opsx:apply
72
72
  - Show brief progress: "Created <artifact-id>"
73
73
 
74
74
  b. **Continue until all `applyRequires` artifacts are complete**
75
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
75
+ - After creating each artifact, re-run `npx openspec status --change "<name>" --json`
76
76
  - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
77
77
  - Stop when all `applyRequires` artifacts are done
78
78
 
@@ -82,7 +82,7 @@ When ready to implement, run /opsx:apply
82
82
 
83
83
  5. **Show final status**
84
84
  ```bash
85
- openspec status --change "<name>"
85
+ npx openspec status --change "<name>"
86
86
  ```
87
87
 
88
88
  **Output**
@@ -19,7 +19,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
19
19
 
20
20
  1. **If no change name provided, prompt for selection**
21
21
 
22
- Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
22
+ Run `npx openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
23
23
 
24
24
  Show changes that have delta specs (under `specs/` directory).
25
25
 
@@ -29,7 +29,7 @@ This is an **agent-driven** operation - you will read delta specs and directly e
29
29
 
30
30
  Run:
31
31
  ```bash
32
- openspec status --change "<name>" --json
32
+ npx openspec status --change "<name>" --json
33
33
  ```
34
34
 
35
35
  If status reports `actionContext.mode: "workspace-planning"`, explain that workspace spec sync is not supported in this slice and STOP. Do not fall back to repo-local paths or edit linked repos.
@@ -8,7 +8,7 @@ You are a read-only reviewer. You never edit files. Your review is advisory —
8
8
  Steps:
9
9
 
10
10
  1. Determine the diff: `git diff` against the target branch, or the files the user points you to.
11
- 2. Identify the active OpenSpec change (`openspec list --json`, or ask if ambiguous). Read `openspec/changes/<name>/proposal.md`, `design.md`, and every touched `specs/*/spec.md`.
11
+ 2. Identify the active OpenSpec change (`npx openspec list --json`, or ask if ambiguous). Read `openspec/changes/<name>/proposal.md`, `design.md`, and every touched `specs/*/spec.md`.
12
12
  3. Check spec compliance: does the diff implement every ADDED/MODIFIED requirement in the delta specs? Does it avoid touching anything marked out of scope? Flag missing or extra behavior explicitly, quoting the requirement.
13
13
  4. Check stack conventions from `.agents/orchestrator.yaml` (`project.stack`) — e.g. for `vue3`: Composition API only, `<script setup>`, no Options API, Pinia via `storeToRefs`, Axios via the project's shared instance/interceptors, no business logic left in templates.
14
14
  5. Check task hygiene: does `tasks.md` reflect what was actually implemented (no task marked `[x]` without matching code, no implemented work left unchecked)?
@@ -10,8 +10,8 @@ You are a read-only guide for the OpenSpec + agent-orchestrator-kit pipeline (`e
10
10
  On every invocation:
11
11
 
12
12
  1. Read `.agents/orchestrator.yaml` — note `pipeline.require_spec_review`, `pipeline.require_design_brief`, `pipeline.max_active_changes`, and `pipeline.archive_after_merge`.
13
- 2. Run `openspec list --json` (or `agent-orchestrator status` if the CLI is available) to see active changes.
14
- 3. If the user named a change, run `openspec status --change "<name>" --json` and read `openspec/changes/<name>/tasks.md` and `review.md` directly for ground truth.
13
+ 2. Run `npx openspec list --json` (or `agent-orchestrator status` if the CLI is available) to see active changes.
14
+ 3. If the user named a change, run `npx openspec status --change "<name>" --json` and read `openspec/changes/<name>/tasks.md` and `review.md` directly for ground truth.
15
15
  4. Map what you find to the correct next command:
16
16
  - No `proposal.md` yet → `/opsx:propose <name>`
17
17
  - `require_design_brief: true`, UI-touching change, no `design-brief.md`, no `Design: none` in `proposal.md` → `/opsx:design <name>`
@@ -11,7 +11,8 @@ Diagnosis steps:
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
13
  4. Check that `.mcp.json` / `.amp/settings.json` exist (copy from their `.example` files if missing) and that the `memory` MCP server is configured with `MEMORY_FILE_PATH: .cursor/memory.json`.
14
- 5. 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.
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
+ 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.
15
16
 
16
17
  Fix, in this priority order, applying only safe/reversible changes:
17
18
 
@@ -9,13 +9,13 @@ jobs:
9
9
  verify:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v4
12
+ - uses: actions/checkout@v5
13
13
  with:
14
14
  fetch-depth: 0
15
15
 
16
- - uses: actions/setup-node@v4
16
+ - uses: actions/setup-node@v5
17
17
  with:
18
- node-version: 20
18
+ node-version: 22
19
19
 
20
20
  - name: Detect package manager
21
21
  id: pm
@@ -30,13 +30,13 @@ jobs:
30
30
  spec-verify:
31
31
  runs-on: ubuntu-latest
32
32
  steps:
33
- - uses: actions/checkout@v4
33
+ - uses: actions/checkout@v5
34
34
  with:
35
35
  fetch-depth: 0
36
36
 
37
- - uses: actions/setup-node@v4
37
+ - uses: actions/setup-node@v5
38
38
  with:
39
- node-version: 20
39
+ node-version: 22
40
40
 
41
41
  - name: Install Amp CLI
42
42
  run: npm install -g @sourcegraph/amp@latest
@@ -31,7 +31,7 @@ Verifier runs on **GitHub Actions** (default) or **GitLab** via `prebuild` → `
31
31
 
32
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`).
33
33
 
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.
34
+ 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`).
35
35
 
36
36
  ## Hard Rules
37
37
 
@@ -48,10 +48,10 @@ Both CI fragments also run `agent-orchestrator-kit gate-check` — a determinist
48
48
  | explore → design | UI change needs a brief; change name chosen |
49
49
  | explore → propose | Decision brief written; change name chosen (skip design if non-UI) |
50
50
  | design → propose | `design-brief.md` (+ `assets/`) written |
51
- | propose → review | `openspec validate --strict` passes ✓ |
51
+ | propose → review | `npx openspec validate <name> --strict --type change` passes ✓ |
52
52
  | review → apply | Reviewer writes explicit **Approve** — enforced in CI by `gate-check` |
53
53
  | apply → verify | All `tasks.md` checkboxes `[x]`; local build OK |
54
- | verify → archive | CI green; PR merged — check `agent-orchestrator status` for "ready to archive" |
54
+ | verify → archive | CI green; PR merged — check `npx agent-orchestrator-kit status` for "ready to archive" |
55
55
 
56
56
  ## Context to Pin per Role
57
57
 
@@ -67,6 +67,18 @@ Both CI fragments also run `agent-orchestrator-kit gate-check` — a determinist
67
67
 
68
68
  See `.agents/orchestrator.yaml` for role config, pipeline flags, and MCP baseline.
69
69
 
70
+ ### Optional: Figma personal token
71
+
72
+ For design intake against private Figma files, each developer configures a local token (never commit, never paste into chat):
73
+
74
+ ```bash
75
+ npx agent-orchestrator-kit figma-setup
76
+ # edit .agents/figma.local.env → FIGMA_ACCESS_TOKEN=...
77
+ npx agent-orchestrator-kit figma-status
78
+ ```
79
+
80
+ MCP starts via `scripts/figma-mcp-launcher.cjs` (secret stays out of `.mcp.json`). See kit README → **Figma token**.
81
+
70
82
  ## Skills & Commands
71
83
 
72
84
  All skills live in `.agents/skills/` (committed to git).
@@ -34,11 +34,12 @@ Use `/skill-name` or let Claude auto-load based on context.
34
34
  ## Key Rules for This Session
35
35
 
36
36
  - Check `.agents/orchestrator.yaml` for project-specific pipeline config.
37
- - One active change at a time — run `openspec list` to confirm.
37
+ - One active change at a time — run `npx openspec list` / `npx agent-orchestrator-kit status` to confirm.
38
38
  - No code edits in explore, design, or review mode.
39
39
  - Design Intake writes only `design-brief.md` and `assets/` — never `src/`.
40
40
  - After completing apply: run build/lint before declaring done.
41
- - Use `openspec validate --all --strict` to verify change artifacts.
41
+ - Use `npx openspec validate --all --strict` or `npx openspec validate <name> --strict --type change`.
42
+ - Never bare `openspec` / `agent-orchestrator-kit` without `npx` (Amp PATH → exit 127). See `.agents/rules/cli-via-npm.mdc`.
42
43
 
43
44
  ## File Locations
44
45
 
@@ -55,10 +55,25 @@ mcp:
55
55
  baseline:
56
56
  - memory
57
57
  optional:
58
+ - figma
58
59
  - github
59
60
  - browser
60
61
 
62
+ figma:
63
+ env_file: .agents/figma.local.env
64
+ token_key: FIGMA_ACCESS_TOKEN
65
+ mcp_launcher: scripts/figma-mcp-launcher.cjs
66
+
61
67
  verifier:
62
68
  lint_command: "npm run lint"
63
69
  build_command: "npm run build"
64
70
  test_command: ""
71
+
72
+ # Amp/Cursor often lack global bins — agents must use npx/npm (see .agents/rules/cli-via-npm.mdc)
73
+ cli:
74
+ status: npx agent-orchestrator-kit status
75
+ gate_check: npx agent-orchestrator-kit gate-check
76
+ openspec_list: npx openspec list
77
+ openspec_validate_change: npx openspec validate <name> --strict --type change
78
+ openspec_validate_all: npx openspec validate --all --strict
79
+ openspec_status: npx openspec status --change <name> --json