agent-orchestrator-kit 0.2.0 → 0.4.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +208 -20
  3. package/bin/agent-orchestrator.js +1303 -90
  4. package/package.json +2 -2
  5. package/profiles/generic/orchestrator.yaml +18 -1
  6. package/profiles/mvp/openspec-config.yaml.example +2 -0
  7. package/profiles/mvp/orchestrator.yaml +18 -1
  8. package/profiles/node/orchestrator.yaml +21 -2
  9. package/profiles/vue3/openspec-config.yaml.example +2 -0
  10. package/profiles/vue3/orchestrator.yaml +20 -2
  11. package/templates/.agents/amp.settings.json.example +12 -0
  12. package/templates/.agents/commands/opsx-apply.md +18 -46
  13. package/templates/.agents/commands/opsx-archive.md +10 -163
  14. package/templates/.agents/commands/opsx-design.md +3 -10
  15. package/templates/.agents/commands/opsx-explore.md +3 -10
  16. package/templates/.agents/commands/opsx-propose.md +14 -10
  17. package/templates/.agents/commands/opsx-quick.md +3 -10
  18. package/templates/.agents/commands/opsx-review.md +27 -55
  19. package/templates/.agents/commands/opsx-sync.md +2 -0
  20. package/templates/.agents/github.local.env.example +10 -0
  21. package/templates/.agents/gitlab.local.env.example +12 -0
  22. package/templates/.agents/mcp.json.example +12 -0
  23. package/templates/.agents/rules/agent-orchestration.mdc +15 -16
  24. package/templates/.agents/rules/memory-mcp-autosetup.mdc +1 -1
  25. package/templates/.agents/rules/session-handoff.mdc +22 -17
  26. package/templates/.agents/skills/agent-orchestration/SKILL.md +32 -29
  27. package/templates/.agents/skills/openspec-apply-change/SKILL.md +15 -20
  28. package/templates/.agents/skills/openspec-archive-change/SKILL.md +12 -99
  29. package/templates/.agents/skills/openspec-propose/SKILL.md +11 -0
  30. package/templates/.agents/subagents/session-handoff.md +12 -10
  31. package/templates/.agents/subagents/spec-architect.md +1 -1
  32. package/templates/.agents/subagents/spec-archiver.md +1 -1
  33. package/templates/.agents/subagents/spec-reviewer.md +11 -7
  34. package/templates/.cursor/memory.json +11 -0
  35. package/templates/AGENTS.md +3 -3
  36. package/templates/CLAUDE.md +2 -2
  37. package/templates/orchestrator.yaml +18 -1
  38. package/templates/scripts/browser-mcp-launcher.cjs +21 -0
  39. package/templates/scripts/github-mcp-launcher.cjs +66 -0
  40. package/templates/scripts/gitlab-mcp-launcher.cjs +70 -0
  41. package/templates/scripts/pre-commit-gate-check.sh +4 -0
@@ -9,115 +9,28 @@ metadata:
9
9
  generatedBy: "1.4.1"
10
10
  ---
11
11
 
12
- Archive a completed change in the experimental workflow.
12
+ Archive a completed change. The phase is fully deterministic — one CLI call, no phase subagents.
13
13
 
14
- **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
15
-
16
- **Conductor delegation is mandatory:** after resolving the change and confirming archive gates, spawn `spec-archiver` with a self-contained prompt. The parent MUST NOT compare/merge main specs or move the change itself; it only verifies the structured report, archive path, and validation result.
14
+ **Input**: Optionally specify a change name. If omitted or ambiguous, run `npx openspec list --json` and use the **AskUserQuestion tool** to let the user pick an active change. Never guess or auto-select.
17
15
 
18
16
  **Steps**
19
17
 
20
- 1. **If no change name provided, prompt for selection**
21
-
22
- Run `npx openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
23
-
24
- Show only active changes (not already archived).
25
- Include the schema used for each change if available.
26
-
27
- **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
28
-
29
- 2. **Check artifact completion status**
30
-
31
- Run `npx openspec status --change "<name>" --json` to check artifact completion.
32
-
33
- Parse the JSON to understand:
34
- - `schemaName`: The workflow being used
35
- - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context
36
- - `artifacts`: List of artifacts with their status (`done` or other)
37
-
38
- If status reports `actionContext.mode: "workspace-planning"`, explain that workspace archive is not supported in this slice and STOP. Do not move workspace changes into repo-local archives or edit linked repos.
39
-
40
- **If any artifacts are not `done`:**
41
- - Display warning listing incomplete artifacts
42
- - Use **AskUserQuestion tool** to confirm user wants to proceed
43
- - Proceed if user confirms
44
-
45
- 3. **Check task completion status**
46
-
47
- Read the tasks file (typically `tasks.md`) to check for incomplete tasks.
48
-
49
- Count tasks marked with `- [ ]` (incomplete) vs `- [x]` (complete).
50
-
51
- **If incomplete tasks found:**
52
- - Display warning showing count of incomplete tasks
53
- - Use **AskUserQuestion tool** to confirm user wants to proceed
54
- - Proceed if user confirms
55
-
56
- **If no tasks file exists:** Proceed without task-related warning.
57
-
58
- 4. **Assess delta spec sync state**
18
+ 1. **Resolve the change name** (see Input above).
59
19
 
60
- Use `artifactPaths.specs.existingOutputPaths` from status JSON to identify delta specs. Pass these paths and the user's sync preference to `spec-archiver`; the parent MUST NOT compare or merge specs itself.
20
+ 2. **Decide on delta-spec sync.** If the change has delta specs, ask the user: merge them into main specs (`--sync`, recommended) or archive without merging (`--no-sync --force`).
61
21
 
62
- **If delta specs exist:**
63
- - Ask whether main specs should be synced before archive
64
- - Include the delta and main spec paths in the `spec-archiver` prompt
65
- - Have `spec-archiver` return the combined sync summary in its report
66
-
67
- **Prompt options:**
68
- - If changes needed: "Sync now (recommended)", "Archive without syncing"
69
- - If already synced: "Archive now", "Sync anyway", "Cancel"
70
-
71
- The `spec-archiver` performs any requested comparison and sync as part of its isolated work; do not spawn a generic sync agent.
72
-
73
- 5. **Spawn the specialist and perform the archive**
74
-
75
- Spawn `spec-archiver`, require `## Subagent report: spec-archiver`, and delegate the sync/archive operations below. Do not run them in the parent session.
76
-
77
- Create an `archive` directory under `planningHome.changesDir` if it doesn't exist:
78
- ```bash
79
- mkdir -p "<planningHome.changesDir>/archive"
80
- ```
81
-
82
- Generate target name using current date: `YYYY-MM-DD-<change-name>`
83
-
84
- **Check if target already exists:**
85
- - If yes: Fail with error, suggest renaming existing archive or using different date
86
- - If no: Move `changeRoot` to the archive directory
22
+ 3. **Run the CLI:**
87
23
 
88
24
  ```bash
89
- mv "<changeRoot>" "<planningHome.changesDir>/archive/YYYY-MM-DD-<name>"
25
+ npx agent-orchestrator-kit archive <name> [--sync | --no-sync --force]
90
26
  ```
91
27
 
92
- 6. **Verify the report and display summary**
93
-
94
- The conductor verifies `Status: done`, the reported archive path, and modified main specs before reporting completion.
95
-
96
- Show archive completion summary including:
97
- - Change name
98
- - Schema that was used
99
- - Archive location
100
- - Whether specs were synced (if applicable)
101
- - Note about any warnings (incomplete artifacts/tasks)
102
-
103
- **Output On Success**
104
-
105
- ```
106
- ## Archive Complete
107
-
108
- **Change:** <change-name>
109
- **Schema:** <schema-name>
110
- **Archived to:** the archive path derived from `planningHome.changesDir`/YYYY-MM-DD-<name>/
111
- **Specs:** ✓ Synced to main specs (or "No delta specs" or "Sync skipped")
28
+ The CLI checks gates (review APPROVE when `require_spec_review: true`, all tasks `[x]`, no existing target archive), merges delta specs on `--sync` (ADDED append, MODIFIED replace, REMOVED delete), moves the change to `openspec/changes/archive/YYYY-MM-DD-<name>`, runs `npx openspec validate --all --strict` with full rollback on failure, and writes the final `handoff.md` (`next_command: none`) plus memory upsert.
112
29
 
113
- All artifacts complete. All tasks complete.
114
- ```
30
+ 4. **Show the CLI stdout as-is.** On exit ≠ 0, report the failed gate from stderr and stop.
115
31
 
116
32
  **Guardrails**
117
- - Always prompt for change selection if not provided
118
- - Use artifact graph (openspec status --json) for completion checking
119
- - Don't block archive on warnings - just inform and confirm
120
- - Preserve .openspec.yaml when moving to archive (it moves with the directory)
121
- - Show clear summary of what happened
122
- - If sync is requested, use openspec-sync-specs approach (agent-driven)
123
- - If delta specs exist, always run the sync assessment and show the combined summary before prompting
33
+ - Do NOT merge main specs, move the change, or edit anything manually — the CLI owns the whole operation.
34
+ - Spawn `spec-archiver` ONLY as a fallback when the `agent-orchestrator-kit archive` CLI is unavailable or failed for environmental reasons (not for unmet gates).
35
+ - On a sync conflict reported by the CLI, use the `openspec-sync-specs` skill to resolve it, then re-run `archive`.
36
+ - The pipeline ends here: no next-thread prompt is required after a successful archive.
@@ -24,6 +24,17 @@ When ready to implement, run /opsx:apply
24
24
 
25
25
  **Conductor delegation is mandatory:** spawn `spec-architect` with the resolved name, decision brief, design brief if present, and artifact instructions. The parent MUST NOT create or edit proposal/design/specs/tasks; after the structured report it may only verify paths, run status, and run strict validation.
26
26
 
27
+ **Task contract (mandatory tasks.md format):** every task must carry indented `Files:`, `Do:`, `Done-when:` fields:
28
+
29
+ ```markdown
30
+ - [ ] 2.1 Short title
31
+ Files: src/router/index.js, new file: src/stores/auth.js
32
+ Do: concrete change in 1–3 lines — no vague wording ("as needed", "if necessary", "as appropriate")
33
+ Done-when: verifiable condition or command
34
+ ```
35
+
36
+ Each task must be self-contained for a blind implementer — executable without reading design.md. `Files:` paths must exist unless prefixed with `new file:`. Lint: `npx agent-orchestrator-kit gate-check --tasks <name>` (mode via `pipeline.task_contract: warn|strict|off`).
37
+
27
38
  **Steps**
28
39
 
29
40
  1. **If no clear input provided, ask what they want to build**
@@ -1,33 +1,35 @@
1
1
  ---
2
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.
3
+ description: FALLBACK ONLY — use when the parent-driven protocol in `.agents/rules/session-handoff.mdc` fails. Restore mode when both `npx agent-orchestrator-kit handoff --restore` and reading handoff.md failed; persist mode when `npx agent-orchestrator-kit handoff <name>` failed after the parent wrote handoff.md. Never a routine step. Do NOT use to write src/, specs, review.md, or to perform the phase specialist's work.
4
4
  ---
5
5
 
6
- You are the session-boundary specialist. You restore or persist orchestration state. You do not implement features, write specs, or review code.
6
+ You are the session-boundary fallback specialist. The routine Session Start / Session Exit protocol is parent-driven (see `.agents/rules/session-handoff.mdc`); you run only when that protocol failed. You restore or persist orchestration state. You do not implement features, write specs, or review code.
7
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.
8
+ When spawned, Amp runs this skill as an isolated subagent (`subagent-session-handoff`) with fresh context never as the main thread body.
9
9
 
10
10
  ## Restore mode
11
11
 
12
- Use when the conductor says restore / session start.
12
+ Use when the parent's restore failed (CLI restore and handoff.md both unavailable).
13
13
 
14
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:*`.
15
+ 2. Run `npx agent-orchestrator-kit handoff --restore` (add `<name>` when known). The briefing prints accumulated decisions from git-tracked `openspec/changes/<name>/decisions.md` (canon), not from Memory.
16
+ 3. If Memory MCP tools are available, read `Change:<name>`, `Handoff:<name>`, and `Decision:*` (the latter is a file→Memory mirror of `decisions.md`).
17
17
  4. If CLI restore fails, read `openspec/changes/<name>/handoff.md` when it exists.
18
18
  5. Return the restore report. Do not spawn the phase specialist yourself.
19
19
 
20
20
  ## Persist mode
21
21
 
22
- Use when the conductor says persist / session exit. A session is not closed until this mode succeeds.
22
+ Use when the parent's persist failed (`npx agent-orchestrator-kit handoff <name>` did not exit 0). A session is not closed until persist succeeds.
23
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.
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, Runtime.
25
+ 2. Run `npx agent-orchestrator-kit handoff <name>` and require exit 0. This appends non-empty Decisions into append-only `openspec/changes/<name>/decisions.md` (git canon), upserts `.cursor/memory.json` using an absolute path (`Decision:*` mirrors that file, never the reverse), and prints the expanded next-session prompt on stdout. Cloud sessions pass `--runtime cloud` (or `AOK_RUNTIME` / `AOK_AGENT_ID`).
26
+ 3. If Memory MCP tools are available, also create/update `Change:<name>`, `Handoff:<name>`, and each `Decision:<topic>` to match `decisions.md`. MCP failure is not a blocker after the CLI succeeds.
27
27
  4. Put the CLI stdout prompt (first line `/opsx:…`) into **Next prompt** unchanged. Do not shorten it. Do not add a banner.
28
+ 5. If runtime is cloud: after persist, commit and push `openspec/changes/<name>/`, then `npx agent-orchestrator-kit handoff <name> --cloud-check` (exit 0 required). Closing without this is an incomplete handoff. The CLI never runs `git commit` / `git push`.
28
29
 
29
30
  ## Rules
30
31
 
32
+ - Write session artifacts only to git-tracked paths (never `/tmp`, never gitignored caches).
31
33
  - Do NOT edit `src/`, tests, main specs, `tasks.md` checkboxes, or phase artifacts (`proposal.md`, `review.md`, `design-brief.md`) except `handoff.md`.
32
34
  - Do NOT start the next OpenSpec phase.
33
35
  - Do NOT return a thin prompt. The next thread must be able to run if Memory MCP is ignored.
@@ -10,7 +10,7 @@ Workflow:
10
10
  1. Read `openspec/config.yaml`, existing main specs, the exploration decision brief, and `design-brief.md` when present.
11
11
  2. Create or update `proposal.md`, `design.md`, `specs/<capability>/spec.md`, and `tasks.md` using the repository's OpenSpec schema and conventions.
12
12
  3. Keep requirements testable: each requirement uses SHALL/MUST language and includes concrete scenarios.
13
- 4. Make tasks ordered, independently verifiable, and traceable to the design and delta specs.
13
+ 4. Make tasks ordered, independently verifiable, and traceable to the design and delta specs. Every task MUST follow the task contract: indented `Files:` (existing paths, or `new file:` prefix for new ones), `Do:` (concrete change, no vague wording like "as needed" / "if necessary" / "as appropriate"), and `Done-when:` (verifiable condition or command). Each task must be self-contained for a blind implementer without reading design.md.
14
14
  5. Report which validation command the conductor should run; do not cross into review or implementation.
15
15
 
16
16
  Rules:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spec-archiver
3
- description: OpenSpec completion specialist. ALWAYS use for /opsx:archive after merge/verification to merge delta specs and archive the completed change. Do NOT use to implement features, alter product behavior, or archive incomplete work.
3
+ description: OpenSpec completion fallback. Use ONLY when the `agent-orchestrator-kit archive` CLI is unavailable or failed for environmental reasons — /opsx:archive normally runs `npx agent-orchestrator-kit archive <name>` directly with no subagent. Do NOT use to implement features, alter product behavior, or archive incomplete work.
4
4
  ---
5
5
 
6
6
  You finalize one completed OpenSpec change. Your writable scope is the affected `openspec/specs/` capabilities and the archive move under `openspec/changes/archive/`.
@@ -3,29 +3,33 @@ name: spec-reviewer
3
3
  description: Pre-implementation OpenSpec gate reviewer. ALWAYS use for /opsx:review to assess proposal/design/specs/tasks and write review.md. Do NOT use for post-implementation code review, edit src/, or change tasks.md.
4
4
  ---
5
5
 
6
- You review one OpenSpec change before apply. You are read-only except for `openspec/changes/<name>/review.md`.
6
+ You are Tier 2 of a two-tier review: you run only after `npx agent-orchestrator-kit gate-check --review <name>` passed. You review one OpenSpec change before apply. You are read-only except for `openspec/changes/<name>/review.md` and, on APPROVE, `openspec/changes/<name>/apply-notes.md`.
7
7
 
8
8
  Workflow:
9
9
 
10
10
  1. Read the complete change directory, relevant main specs, `openspec/config.yaml`, and repository paths referenced by the artifacts.
11
- 2. Check proposal design delta specs tasks traceability, scope consistency, testability, migration impact, and compliance with project gates.
12
- 3. Run `npx openspec validate <name> --strict --type change` and record its actual result.
13
- 4. Write `review.md` with findings ordered by severity and exactly one verdict: `APPROVE` or `REQUEST CHANGES`.
14
- 5. Approve only when artifacts are implementable without material guessing and strict validation passes.
11
+ 2. Apply the LLM-only checklist do NOT re-check what Tier 1 covered (strict validation, contract field presence, proposal sections, delta-spec section structure):
12
+ - proposal design tasks consistency (no contradictions or drift);
13
+ - conflicts with existing `openspec/specs/` requirements;
14
+ - scope creep vs proposal Non-goals;
15
+ - task self-sufficiency: a blind implementer can execute each task from Files/Do/Done-when alone, without design.md.
16
+ 3. Write `review.md` with findings ordered by severity and exactly one verdict: `APPROVE` or `REQUEST CHANGES`.
17
+ 4. On APPROVE, also write `apply-notes.md` (≤ 20 lines): critical constraints, pitfalls, what NOT to touch, verification commands. It is the second and last file you may write.
18
+ 5. Approve only when artifacts are implementable without material guessing.
15
19
 
16
20
  Rules:
17
21
 
18
22
  - Do NOT edit `src/`, tests, proposal/design/spec files, or `tasks.md`.
19
23
  - Do NOT implement fixes found during review.
20
24
  - Do NOT substitute for `code-reviewer`; that agent reviews the implementation diff after apply.
21
- - Do NOT approve based only on validation syntax; verify semantics and repository references.
25
+ - Do NOT approve based only on Tier 1 passing; verify semantics and repository references.
22
26
 
23
27
  Return exactly this report contract:
24
28
 
25
29
  ```
26
30
  ## Subagent report: spec-reviewer
27
31
  **Status:** done | blocked
28
- **Files:** review.md
32
+ **Files:** review.md (+ apply-notes.md on APPROVE)
29
33
  **Done:** verdict and validation result
30
34
  **Blocked:** missing artifacts or none
31
35
  **Risks:** non-blocking review notes or none
@@ -0,0 +1,11 @@
1
+ {"type":"entity","name":"Change:add-factory-memory-and-skills","entityType":"Change","observations":["status: archived","tasks: 9/9","last_role: Archiver","review: APPROVE","summary: archived to openspec/changes/archive/2026-08-27-add-factory-memory-and-skills"]}
2
+ {"type":"entity","name":"Handoff:add-factory-memory-and-skills","entityType":"Handoff","observations":["next_role: none","next_command: none","summary: archived to openspec/changes/archive/2026-08-27-add-factory-memory-and-skills","blocked: none"]}
3
+ {"type":"entity","name":"Decision:apply-complete","entityType":"Decision","observations":["all 9 tasks implemented and verified (npm test 101/101, openspec validate --strict, gate-check --tasks)","change: add-factory-memory-and-skills","date: 2026-08-27"]}
4
+ {"type":"entity","name":"Decision:m1-followed","entityType":"Decision","observations":["task 2.3 Skill health stale/missing verified in a temporary init+sync project (smoke test), not in the kit repo","change: add-factory-memory-and-skills","date: 2026-08-27"]}
5
+ {"type":"entity","name":"Decision:m2-followed","entityType":"Decision","observations":["skills.kit drift test iterates all five orchestrator.yaml files against templates/.agents/skills/","change: add-factory-memory-and-skills","date: 2026-08-27"]}
6
+ {"type":"entity","name":"Decision:i1-honored","entityType":"Decision","observations":["did not change templates/orchestrator.yaml handoff.spawn_handoff_subagent (still false)","change: add-factory-memory-and-skills","date: 2026-08-27"]}
7
+ {"type":"relation","from":"Change:add-factory-memory-and-skills","to":"Handoff:add-factory-memory-and-skills","relationType":"hasHandoff"}
8
+ {"type":"relation","from":"Change:add-factory-memory-and-skills","to":"Decision:apply-complete","relationType":"hasDecision"}
9
+ {"type":"relation","from":"Change:add-factory-memory-and-skills","to":"Decision:m1-followed","relationType":"hasDecision"}
10
+ {"type":"relation","from":"Change:add-factory-memory-and-skills","to":"Decision:m2-followed","relationType":"hasDecision"}
11
+ {"type":"relation","from":"Change:add-factory-memory-and-skills","to":"Decision:i1-honored","relationType":"hasDecision"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Powered by [agent-orchestrator-kit](https://github.com/makshc2/agent-orchestrator-kit) v{{KIT_VERSION}}
4
4
 
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.
5
+ Spec-driven OpenSpec pipeline. Each phase is a **separate chat**. Delegation is differentiated (lean model): explore/design/propose/review spawn a mandatory specialist; **apply is parent-driven** the parent implements from `tasks.md` + `apply-notes.md`, subagents are optional (≥ 2 independent tasks or explicit request; `design-implementer` for design-brief/Figma); **archive is a CLI** (`npx agent-orchestrator-kit archive <name> [--sync]`), no subagent.
6
6
 
7
7
  ```
8
8
  explore → [design] → propose → review → apply → verify → archive
@@ -23,9 +23,9 @@ Routing table, HARD STOP, and CLI forms: `.agents/rules/` (`agent-orchestration`
23
23
  | Quick (MVP) | `/opsx:quick <name>` |
24
24
  | Archive | `/opsx:archive` |
25
25
 
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>`).
26
+ Session Start / Exit are **parent-driven** — canonical protocol in `.agents/rules/session-handoff.mdc`. Start: `status` `handoff --restore` `handoff.md` fallback. Exit HARD STOP: parent writes `handoff.md` `npx agent-orchestrator-kit handoff <name>` (exit 0) → paste the CLI `/opsx:*` prompt. `session-handoff` subagent = fallback only. Do not start the next phase here.
27
27
 
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.
28
+ Quality gates: `gate-check --tasks <name>` lints the task contract (Files/Do/Done-when, `pipeline.task_contract: warn|strict|off`); `gate-check --review <name>` is deterministic Tier 1 of review spec-reviewer (Tier 2) is spawned only after it passes and writes `apply-notes.md` on APPROVE.
29
29
 
30
30
  ## Hard rules
31
31
  - One active change (unless mvp profile).
@@ -8,8 +8,8 @@ See `AGENTS.md` and `.agents/rules/` for routing, HARD STOP, and CLI (`npx` only
8
8
  /opsx:explore · /opsx:design · /opsx:propose · /opsx:review · /opsx:apply · /opsx:archive
9
9
  ```
10
10
 
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.
11
+ Lean delegation: explore/design/propose/review spawn a mandatory specialist; apply is parent-driven from `tasks.md` + `apply-notes.md` (subagents optional for independent tasks); archive runs `npx agent-orchestrator-kit archive <name> [--sync]` no subagent. Review is two-tiered: `gate-check --review` (deterministic) before `spec-reviewer`; `gate-check --tasks` lints the Files/Do/Done-when task contract.
12
12
 
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.
13
+ Session Start/Exit are parent-driven (canonical: `.agents/rules/session-handoff.mdc`): restore with `npx agent-orchestrator-kit handoff --restore`; exit — write `handoff.md`, run `npx agent-orchestrator-kit handoff <name>` (exit 0), paste the CLI prompt. `session-handoff` subagent is a fallback only. Do not start the next phase in this chat.
14
14
 
15
15
  One active change. No `src/` in explore/design/review. After apply: build/lint. Skills: `.claude/skills/` (synced from `.agents/skills/`).
@@ -12,6 +12,7 @@ pipeline:
12
12
  require_design_brief: false
13
13
  max_active_changes: 1
14
14
  archive_after_merge: true
15
+ task_contract: warn
15
16
 
16
17
  roles:
17
18
  explorer:
@@ -50,7 +51,7 @@ handoff:
50
51
  persist_on_exit: true
51
52
  emit_next_session_prompt: true
52
53
  prompt_self_contained: true
53
- spawn_handoff_subagent: true
54
+ spawn_handoff_subagent: false
54
55
 
55
56
  memory:
56
57
  enabled: true
@@ -63,8 +64,22 @@ mcp:
63
64
  optional:
64
65
  - figma
65
66
  - github
67
+ - gitlab
66
68
  - browser
67
69
 
70
+ skills:
71
+ kit:
72
+ - agent-orchestration
73
+ - openspec-howto
74
+ - openspec-explore
75
+ - openspec-propose
76
+ - openspec-apply-change
77
+ - openspec-archive-change
78
+ - openspec-sync-specs
79
+ - spec-workflow-openspec
80
+ stack: []
81
+ external: ""
82
+
68
83
  figma:
69
84
  env_file: .agents/figma.local.env
70
85
  token_key: FIGMA_ACCESS_TOKEN
@@ -82,6 +97,8 @@ cli:
82
97
  handoff: npx agent-orchestrator-kit handoff <name>
83
98
  handoff_restore: npx agent-orchestrator-kit handoff --restore
84
99
  memory_setup: npx agent-orchestrator-kit memory-setup
100
+ mcp_setup: npx agent-orchestrator-kit mcp-setup
101
+ hooks_setup: npx agent-orchestrator-kit hooks-setup
85
102
  openspec_list: npx openspec list
86
103
  openspec_validate_change: npx openspec validate <name> --strict --type change
87
104
  openspec_validate_all: npx openspec validate --all --strict
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+
4
+ const child = spawn('npx', ['-y', '@playwright/mcp'], {
5
+ stdio: 'inherit',
6
+ env: process.env,
7
+ shell: process.platform === 'win32',
8
+ });
9
+
10
+ child.on('exit', (code, signal) => {
11
+ if (signal) {
12
+ process.kill(process.pid, signal);
13
+ return;
14
+ }
15
+ process.exit(code == null ? 1 : code);
16
+ });
17
+
18
+ child.on('error', (error) => {
19
+ console.error(`[browser-mcp-launcher] Failed to start Playwright MCP: ${error.message}`);
20
+ process.exit(1);
21
+ });
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const { existsSync, readFileSync } = require('fs');
4
+ const { join } = require('path');
5
+
6
+ const projectDir = join(__dirname, '..');
7
+ const envPath = join(projectDir, '.agents', 'github.local.env');
8
+
9
+ function readLocalEnv() {
10
+ if (!existsSync(envPath)) {
11
+ console.error(
12
+ `[github-mcp-launcher] Missing ${envPath}. Copy .agents/github.local.env.example → .agents/github.local.env and add GITHUB_PERSONAL_ACCESS_TOKEN (do not paste the token into chat).`
13
+ );
14
+ process.exit(1);
15
+ }
16
+
17
+ const values = {};
18
+ for (const line of readFileSync(envPath, 'utf-8').split(/\r?\n/)) {
19
+ const trimmed = line.trim();
20
+ if (!trimmed || trimmed.startsWith('#')) continue;
21
+ const eq = trimmed.indexOf('=');
22
+ if (eq === -1) continue;
23
+ const key = trimmed.slice(0, eq).trim();
24
+ let value = trimmed.slice(eq + 1).trim();
25
+ if (
26
+ (value.startsWith('"') && value.endsWith('"')) ||
27
+ (value.startsWith("'") && value.endsWith("'"))
28
+ ) {
29
+ value = value.slice(1, -1);
30
+ }
31
+ values[key] = value;
32
+ }
33
+ return values;
34
+ }
35
+
36
+ const envValues = readLocalEnv();
37
+ const token = envValues.GITHUB_PERSONAL_ACCESS_TOKEN || envValues.GITHUB_TOKEN || '';
38
+ if (!token) {
39
+ console.error(
40
+ '[github-mcp-launcher] GITHUB_PERSONAL_ACCESS_TOKEN is empty in .agents/github.local.env. Add a GitHub personal access token locally (never in chat).'
41
+ );
42
+ process.exit(1);
43
+ }
44
+
45
+ const child = spawn('npx', ['-y', '@modelcontextprotocol/server-github'], {
46
+ stdio: 'inherit',
47
+ env: {
48
+ ...process.env,
49
+ GITHUB_PERSONAL_ACCESS_TOKEN: token,
50
+ GITHUB_TOKEN: token,
51
+ },
52
+ shell: process.platform === 'win32',
53
+ });
54
+
55
+ child.on('exit', (code, signal) => {
56
+ if (signal) {
57
+ process.kill(process.pid, signal);
58
+ return;
59
+ }
60
+ process.exit(code == null ? 1 : code);
61
+ });
62
+
63
+ child.on('error', (error) => {
64
+ console.error(`[github-mcp-launcher] Failed to start GitHub MCP: ${error.message}`);
65
+ process.exit(1);
66
+ });
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('child_process');
3
+ const { existsSync, readFileSync } = require('fs');
4
+ const { join } = require('path');
5
+
6
+ const projectDir = join(__dirname, '..');
7
+ const envPath = join(projectDir, '.agents', 'gitlab.local.env');
8
+ const DEFAULT_API_URL = 'https://gitlab.com/api/v4';
9
+
10
+ function readLocalEnv() {
11
+ if (!existsSync(envPath)) {
12
+ console.error(
13
+ `[gitlab-mcp-launcher] Missing ${envPath}. Copy .agents/gitlab.local.env.example → .agents/gitlab.local.env and add GITLAB_PERSONAL_ACCESS_TOKEN (do not paste the token into chat).`
14
+ );
15
+ process.exit(1);
16
+ }
17
+
18
+ const values = {};
19
+ for (const line of readFileSync(envPath, 'utf-8').split(/\r?\n/)) {
20
+ const trimmed = line.trim();
21
+ if (!trimmed || trimmed.startsWith('#')) continue;
22
+ const eq = trimmed.indexOf('=');
23
+ if (eq === -1) continue;
24
+ const key = trimmed.slice(0, eq).trim();
25
+ let value = trimmed.slice(eq + 1).trim();
26
+ if (
27
+ (value.startsWith('"') && value.endsWith('"')) ||
28
+ (value.startsWith("'") && value.endsWith("'"))
29
+ ) {
30
+ value = value.slice(1, -1);
31
+ }
32
+ values[key] = value;
33
+ }
34
+ return values;
35
+ }
36
+
37
+ const envValues = readLocalEnv();
38
+ const token = envValues.GITLAB_PERSONAL_ACCESS_TOKEN || envValues.GITLAB_TOKEN || '';
39
+ if (!token) {
40
+ console.error(
41
+ '[gitlab-mcp-launcher] GITLAB_PERSONAL_ACCESS_TOKEN is empty in .agents/gitlab.local.env. Add a GitLab personal access token locally (never in chat).'
42
+ );
43
+ process.exit(1);
44
+ }
45
+
46
+ const apiUrl = envValues.GITLAB_API_URL || DEFAULT_API_URL;
47
+
48
+ const child = spawn('npx', ['-y', '@modelcontextprotocol/server-gitlab'], {
49
+ stdio: 'inherit',
50
+ env: {
51
+ ...process.env,
52
+ GITLAB_PERSONAL_ACCESS_TOKEN: token,
53
+ GITLAB_TOKEN: token,
54
+ GITLAB_API_URL: apiUrl,
55
+ },
56
+ shell: process.platform === 'win32',
57
+ });
58
+
59
+ child.on('exit', (code, signal) => {
60
+ if (signal) {
61
+ process.kill(process.pid, signal);
62
+ return;
63
+ }
64
+ process.exit(code == null ? 1 : code);
65
+ });
66
+
67
+ child.on('error', (error) => {
68
+ console.error(`[gitlab-mcp-launcher] Failed to start GitLab MCP: ${error.message}`);
69
+ process.exit(1);
70
+ });
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env sh
2
+ # agent-orchestrator-kit pre-commit gate — runs gate-check against staged files.
3
+ # Disable: remove the marked line from .husky/pre-commit, or `git config --unset core.hooksPath`.
4
+ npx agent-orchestrator-kit gate-check --staged