@mmerterden/multi-agent-pipeline 20.28.0 → 20.30.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 (186) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +19 -6
  3. package/README.tr.md +5 -5
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +7 -7
  7. package/install/catalog-history.json +1 -1
  8. package/install/claude.mjs +122 -1
  9. package/install/codex.mjs +2 -0
  10. package/install/copilot.mjs +13 -0
  11. package/install/templates/claude-hooks.json +30 -1
  12. package/manifest.json +189 -77
  13. package/package.json +2 -1
  14. package/pipeline/commands/multi-agent/analysis/SKILL.md +3 -1
  15. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +13 -15
  16. package/pipeline/commands/multi-agent/office-off/SKILL.md +27 -0
  17. package/pipeline/commands/multi-agent/office-on/SKILL.md +50 -0
  18. package/pipeline/commands/multi-agent/office-status/SKILL.md +29 -0
  19. package/pipeline/commands/multi-agent/resume/SKILL.md +2 -1
  20. package/pipeline/commands/multi-agent/serve/SKILL.md +4 -2
  21. package/pipeline/commands/multi-agent/stack/SKILL.md +15 -8
  22. package/pipeline/commands/multi-agent/steer/SKILL.md +10 -9
  23. package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
  24. package/pipeline/contract/CHANGELOG.md +62 -0
  25. package/pipeline/contract/README.md +52 -6
  26. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  27. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  28. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  29. package/pipeline/contract/manifest.json +367 -22
  30. package/pipeline/contract/types/index.d.ts +531 -4
  31. package/pipeline/lib/hook-registration.mjs +252 -0
  32. package/pipeline/lib/prefs-value.mjs +44 -0
  33. package/pipeline/lib/run-completion.mjs +148 -0
  34. package/pipeline/multi-agent-refs/analysis/render.md +4 -4
  35. package/pipeline/multi-agent-refs/cross-cli-contract.md +5 -4
  36. package/pipeline/multi-agent-refs/features/doctor.md +11 -0
  37. package/pipeline/multi-agent-refs/features/office-threat-model.md +91 -0
  38. package/pipeline/multi-agent-refs/help/en.md +3 -0
  39. package/pipeline/multi-agent-refs/help/tr.md +3 -0
  40. package/pipeline/multi-agent-refs/phases/operations.md +17 -0
  41. package/pipeline/multi-agent-refs/phases/phase-0-init.md +6 -2
  42. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +2 -2
  43. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +1 -1
  44. package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
  45. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +7 -6
  46. package/pipeline/multi-agent-refs/phases/phase-5-report.md +5 -4
  47. package/pipeline/office/NOTICE.md +42 -0
  48. package/pipeline/office/assets/BIN.png +0 -0
  49. package/pipeline/office/assets/BOOKSHELF.png +0 -0
  50. package/pipeline/office/assets/CACTUS.png +0 -0
  51. package/pipeline/office/assets/CLOCK.png +0 -0
  52. package/pipeline/office/assets/COFFEE.png +0 -0
  53. package/pipeline/office/assets/COFFEE_TABLE.png +0 -0
  54. package/pipeline/office/assets/CUSHIONED_BENCH.png +0 -0
  55. package/pipeline/office/assets/CUSHIONED_CHAIR_BACK.png +0 -0
  56. package/pipeline/office/assets/CUSHIONED_CHAIR_FRONT.png +0 -0
  57. package/pipeline/office/assets/CUSHIONED_CHAIR_SIDE.png +0 -0
  58. package/pipeline/office/assets/DESK_FRONT.png +0 -0
  59. package/pipeline/office/assets/DESK_SIDE.png +0 -0
  60. package/pipeline/office/assets/DOUBLE_BOOKSHELF.png +0 -0
  61. package/pipeline/office/assets/HANGING_PLANT.png +0 -0
  62. package/pipeline/office/assets/LARGE_PAINTING.png +0 -0
  63. package/pipeline/office/assets/LARGE_PLANT.png +0 -0
  64. package/pipeline/office/assets/PC_BACK.png +0 -0
  65. package/pipeline/office/assets/PC_FRONT_OFF.png +0 -0
  66. package/pipeline/office/assets/PC_FRONT_ON_1.png +0 -0
  67. package/pipeline/office/assets/PC_FRONT_ON_2.png +0 -0
  68. package/pipeline/office/assets/PC_FRONT_ON_3.png +0 -0
  69. package/pipeline/office/assets/PC_SIDE.png +0 -0
  70. package/pipeline/office/assets/PLANT.png +0 -0
  71. package/pipeline/office/assets/PLANT_2.png +0 -0
  72. package/pipeline/office/assets/POT.png +0 -0
  73. package/pipeline/office/assets/SMALL_PAINTING.png +0 -0
  74. package/pipeline/office/assets/SMALL_PAINTING_2.png +0 -0
  75. package/pipeline/office/assets/SMALL_TABLE_FRONT.png +0 -0
  76. package/pipeline/office/assets/SMALL_TABLE_SIDE.png +0 -0
  77. package/pipeline/office/assets/SOFA_BACK.png +0 -0
  78. package/pipeline/office/assets/SOFA_FRONT.png +0 -0
  79. package/pipeline/office/assets/SOFA_SIDE.png +0 -0
  80. package/pipeline/office/assets/TABLE_FRONT.png +0 -0
  81. package/pipeline/office/assets/WHITEBOARD.png +0 -0
  82. package/pipeline/office/assets/WOODEN_BENCH.png +0 -0
  83. package/pipeline/office/assets/WOODEN_CHAIR_BACK.png +0 -0
  84. package/pipeline/office/assets/WOODEN_CHAIR_FRONT.png +0 -0
  85. package/pipeline/office/assets/WOODEN_CHAIR_SIDE.png +0 -0
  86. package/pipeline/office/assets/char_0.png +0 -0
  87. package/pipeline/office/assets/char_1.png +0 -0
  88. package/pipeline/office/assets/char_2.png +0 -0
  89. package/pipeline/office/assets/char_3.png +0 -0
  90. package/pipeline/office/assets/char_4.png +0 -0
  91. package/pipeline/office/assets/char_5.png +0 -0
  92. package/pipeline/office/assets/floor_0.png +0 -0
  93. package/pipeline/office/assets/floor_1.png +0 -0
  94. package/pipeline/office/assets/floor_2.png +0 -0
  95. package/pipeline/office/assets/floor_3.png +0 -0
  96. package/pipeline/office/assets/floor_4.png +0 -0
  97. package/pipeline/office/assets/floor_5.png +0 -0
  98. package/pipeline/office/assets/floor_6.png +0 -0
  99. package/pipeline/office/assets/floor_7.png +0 -0
  100. package/pipeline/office/assets/floor_8.png +0 -0
  101. package/pipeline/office/assets/wall_0.png +0 -0
  102. package/pipeline/office/index.html +5319 -0
  103. package/pipeline/preferences-template.json +7 -0
  104. package/pipeline/rules/figma-pipeline.md +2 -0
  105. package/pipeline/schemas/activity-chat.schema.json +78 -0
  106. package/pipeline/schemas/activity-roles.json +48 -0
  107. package/pipeline/schemas/activity-roles.schema.json +49 -0
  108. package/pipeline/schemas/activity.schema.json +429 -0
  109. package/pipeline/schemas/agent-state.schema.json +20 -5
  110. package/pipeline/schemas/autopilot-on-request.schema.json +33 -0
  111. package/pipeline/schemas/autopilot-on.schema.json +111 -0
  112. package/pipeline/schemas/contract-error.schema.json +33 -3
  113. package/pipeline/schemas/issue-maturity.schema.json +68 -0
  114. package/pipeline/schemas/ledger.schema.json +202 -0
  115. package/pipeline/schemas/permissions.schema.json +47 -0
  116. package/pipeline/schemas/phases.json +3 -2
  117. package/pipeline/schemas/phases.schema.json +5 -1
  118. package/pipeline/schemas/prefs.schema.json +56 -0
  119. package/pipeline/schemas/prs.schema.json +73 -0
  120. package/pipeline/schemas/review-verdict-request.schema.json +20 -0
  121. package/pipeline/schemas/review-verdict.schema.json +62 -0
  122. package/pipeline/schemas/routine-delete.schema.json +59 -0
  123. package/pipeline/schemas/routines.schema.json +38 -0
  124. package/pipeline/schemas/run-evidence.schema.json +29 -0
  125. package/pipeline/schemas/run-results.schema.json +218 -0
  126. package/pipeline/schemas/runs-index.schema.json +1 -1
  127. package/pipeline/schemas/service-read.schema.json +58 -0
  128. package/pipeline/schemas/stack-change.schema.json +82 -0
  129. package/pipeline/schemas/stack-request.schema.json +33 -0
  130. package/pipeline/schemas/stack.schema.json +59 -0
  131. package/pipeline/schemas/steer-request.schema.json +25 -0
  132. package/pipeline/schemas/steer.schema.json +59 -0
  133. package/pipeline/schemas/tool-call-request.schema.json +19 -0
  134. package/pipeline/schemas/tool-call.schema.json +47 -0
  135. package/pipeline/schemas/tools.schema.json +60 -0
  136. package/pipeline/scripts/_active-run.mjs +158 -0
  137. package/pipeline/scripts/_autopilot-outcomes.mjs +1 -0
  138. package/pipeline/scripts/_cost.mjs +66 -1
  139. package/pipeline/scripts/_guard_rules.py +605 -0
  140. package/pipeline/scripts/_office-smoke-lib.sh +115 -0
  141. package/pipeline/scripts/_spawn-async.mjs +73 -0
  142. package/pipeline/scripts/_transcript-tail.mjs +274 -0
  143. package/pipeline/scripts/activity-snapshot.mjs +1027 -0
  144. package/pipeline/scripts/agent-guard.py +118 -7
  145. package/pipeline/scripts/agent-guard.sh +50 -3
  146. package/pipeline/scripts/argv-secret-scan.mjs +114 -0
  147. package/pipeline/scripts/autopilot-control.mjs +214 -9
  148. package/pipeline/scripts/autopilot-runner.mjs +8 -2
  149. package/pipeline/scripts/confirm-command.mjs +70 -0
  150. package/pipeline/scripts/contract-server.mjs +1178 -48
  151. package/pipeline/scripts/cost-analyze.mjs +2 -53
  152. package/pipeline/scripts/cost-table.json +1 -0
  153. package/pipeline/scripts/doctor.mjs +54 -0
  154. package/pipeline/scripts/evidence-gate.mjs +8 -4
  155. package/pipeline/scripts/gate-ledger.mjs +163 -7
  156. package/pipeline/scripts/office-build.mjs +89 -0
  157. package/pipeline/scripts/office-control.mjs +383 -0
  158. package/pipeline/scripts/office-ledger.mjs +409 -0
  159. package/pipeline/scripts/plan-coverage-gate.mjs +9 -8
  160. package/pipeline/scripts/pre-commit-check.sh +12 -0
  161. package/pipeline/scripts/routine-registry.mjs +42 -6
  162. package/pipeline/scripts/run-results.mjs +373 -0
  163. package/pipeline/scripts/run-scope-guard.mjs +188 -0
  164. package/pipeline/scripts/run-scope-guard.sh +23 -0
  165. package/pipeline/scripts/run-stop-guard.mjs +246 -0
  166. package/pipeline/scripts/run-stop-guard.sh +25 -0
  167. package/pipeline/scripts/service-read.mjs +244 -0
  168. package/pipeline/scripts/stack-toggle.mjs +285 -0
  169. package/pipeline/scripts/steer-run.mjs +97 -0
  170. package/pipeline/scripts/toolkit-tools.mjs +599 -0
  171. package/pipeline/scripts/uninstall.mjs +4 -0
  172. package/pipeline/scripts/validate-state.mjs +26 -0
  173. package/pipeline/scripts/work-items.mjs +304 -0
  174. package/pipeline/scripts/write-state.mjs +114 -0
  175. package/pipeline/skills/.skill-manifest.json +19 -7
  176. package/pipeline/skills/.skills-index.json +34 -1
  177. package/pipeline/skills/shared/README.md +6 -3
  178. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +13 -15
  179. package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +16 -0
  180. package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +22 -0
  181. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +17 -0
  182. package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +4 -2
  183. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +14 -6
  184. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +10 -9
  185. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  186. package/pipeline/skills/skills-index.md +4 -1
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: multi-agent-office-on
3
+ description: "Open the office panel: a local browser page with agents at work, their chats, cost ledger and new runs. Use when you want to watch or drive runs from a browser."
4
+ user-invocable: true
5
+ metadata:
6
+ language: en
7
+ ---
8
+
9
+ # multi-agent-office-on
10
+
11
+ Starts (or reuses) the local contract server with the installed panel page
12
+ and opens the browser at `/office` with a one-time code in the URL fragment
13
+ (10 seconds, one use), which the page trades for the token.
14
+
15
+ 1. `node "$HOME/.copilot/scripts/office-control.mjs" on --json`
16
+ 2. Report in `outputLanguage`: `url` (it carries no code), whether the server
17
+ was started or `reused`, that it stops after `idleMinutes` without a request
18
+ and after 8 hours in any case, and that `/multi-agent-office-off` stops it
19
+ now. If `opened` is false, say to run it again from a desktop session.
20
+
21
+ Never print the token, read the token file or pass `--print-token`. The server
22
+ listens on 127.0.0.1 only; remote access is not part of this installation.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: multi-agent-office-status
3
+ description: "Whether the office panel is running, its URL (never the token) and its last actions. Use when unsure if the panel is open."
4
+ user-invocable: true
5
+ metadata:
6
+ language: en
7
+ ---
8
+
9
+ # multi-agent-office-status
10
+
11
+ 1. `node "$HOME/.copilot/scripts/office-control.mjs" status --json`
12
+ 2. Report in `outputLanguage`: `running`, `url` and `idleMinutes`; the
13
+ `remote` line as given ("not available in this installation" unless a
14
+ separate remote layer is installed); `pairedDevices`; `recentActions`
15
+ (route, step, status, when; never a request body).
16
+
17
+ Never print the token or read the token file.
@@ -59,5 +59,7 @@ environment `launch.json` declares; the client starts the process.
59
59
  `POST /v1/runs/{id}/answer` accepts only an option the run's pending question
60
60
  offered. `POST /v1/runs/{id}/kill` and `POST /v1/gc` act only on a second
61
61
  request carrying the single-use confirm token the first one returned, and a
62
- kill never deletes the remote branch or the logs. Autopilot can be turned off
63
- over HTTP, never on.
62
+ kill never deletes the remote branch or the logs. Autopilot on, a stack change
63
+ and a routine removal take the same two steps, accept no browser origin but
64
+ the server's own page, and are tagged `local-only` for any future remote
65
+ carrier.
@@ -100,13 +100,21 @@ for ARG in "$@"; do
100
100
  done
101
101
  ```
102
102
 
103
- After resolving `$ON`, edit `.claude/settings.json` (create `{ "enabledPlugins": {} }` if absent) so that:
104
- - every plugin in `$ON` is set to `true`,
105
- - every stack toolkit **not** in `$ON` is set to `false` (leave non-`@multi-agent-plugins` entries untouched),
106
- - `ai-common-toolkit@multi-agent-plugins` and `ai-analyst-toolkit@multi-agent-plugins` are always `true`,
107
- - every `ai-*-engineering-toolkit@multi-agent-plugins` key is **deleted** (retired names).
103
+ Then write it with the one writer of these rules (the office panel's
104
+ `POST /v1/stack` calls the same script):
108
105
 
109
- Use the Read + Edit/Write tools (JSON must stay valid). Then print the resulting `enabledPlugins` block and run step 5 (Copilot/Codex refresh offer).
106
+ ```bash
107
+ node "$HOME/.claude/scripts/stack-toggle.mjs" set --repo "$PWD" "$@" --json
108
+ ```
109
+
110
+ `stack-toggle.mjs` applies the write rules above (selection `true`, every other
111
+ stack toolkit `false`, `ai-common-toolkit` and `ai-analyst-toolkit` always
112
+ `true`, retired `ai-*-engineering-toolkit` keys deleted, `xcode-integration@xcode-apple`
113
+ following `ios` when the Apple marketplace is linked, every other key kept),
114
+ writes the file atomically and prints the resulting `enabledPlugins`. It refuses
115
+ an empty selection and an unknown stack (exit 1) and never hand-edits the JSON.
116
+ `stack-toggle.mjs status --repo "$PWD" --json` is the read for status mode.
117
+ Then print the resulting `enabledPlugins` block and run step 5 (Copilot/Codex refresh offer).
110
118
 
111
119
  ## Notes
112
120
 
@@ -70,18 +70,19 @@ is being replaced.
70
70
  and `$INSTRUCTION` the text from step 3:
71
71
 
72
72
  ```bash
73
- printf '{"pendingSteer":{"text":%s,"at":"%s","appliedAt":null,"appliedPhase":null}}' \
74
- "$(node -e 'process.stdout.write(JSON.stringify(process.argv[1]))' "$INSTRUCTION")" \
75
- "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
76
- | node $HOME/.claude/scripts/write-state.mjs "$STATE_FILE"
73
+ node "$HOME/.claude/scripts/steer-run.mjs" "$STATE_FILE" --text "$INSTRUCTION"
77
74
  ```
78
75
 
79
- The instruction is JSON-encoded by `node -e`, not by hand: it is arbitrary
80
- user text, and a quote or newline in it would otherwise produce invalid JSON
81
- or, worse, a payload that merges into fields nobody meant to touch.
76
+ `steer-run.mjs` takes the same lock `write-state.mjs` owns and merges
77
+ `pendingSteer` (`text`, `at`, `appliedAt: null`, `appliedPhase: null`) into
78
+ the state; the instruction is passed as one argument and JSON-encoded by the
79
+ script, never by hand, so a quote or newline in it cannot produce invalid
80
+ JSON or a payload that merges into other fields. It refuses a finished run
81
+ (exit 1) and prints the unconsumed instruction it replaced, if any. The
82
+ office panel's `POST /v1/runs/{id}/steer` calls the same function.
82
83
 
83
- Exit 2 (lock timeout) → the task is mid-write. Retry once, then report it
84
- rather than forcing the write.
84
+ Exit 2 (usage) or a lock timeout → the task is mid-write. Retry once, then
85
+ report it rather than forcing the write.
85
86
 
86
87
  6. **Confirm**: `🧭 Steer queued for #N - applies at the entry to Phase {N+1}`
87
88
 
@@ -33,7 +33,7 @@ Run all steps automatically:
33
33
  ```
34
34
  Step 0: DOCTOR node $HOME/.claude/scripts/doctor.mjs - exit 2 or 4 STOPS the sync
35
35
  Step 1: DETECT Compare timestamps, find stale targets
36
- Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 66 sub-command skills)
36
+ Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 69 sub-command skills)
37
37
  Step 2b: CODEX Claude Code -> Codex CLI (1 router skill + sub-command specs as refs + agent TOML)
38
38
  Step 3: REPO Claude Code -> pipeline repo (genericized, personal data scrub)
39
39
  Step 3d: DEV-TOOLKIT Companion MCP server -> detect movement, ship gates, commit + publish
@@ -229,14 +229,14 @@ When invoked with the `release` argument:
229
229
  |-------------|-------------|
230
230
  | `~/.claude/commands/multi-agent/{cmd}/SKILL.md` | `~/.copilot/skills/multi-agent-{cmd}/SKILL.md` |
231
231
 
232
- **66 commands are synced** (canonical inventory - must match `cross-cli-contract.md` section 1; drift = contract violation):
232
+ **69 commands are synced** (canonical inventory - must match `cross-cli-contract.md` section 1; drift = contract violation):
233
233
 
234
234
  ```
235
235
  analysis, analysis-jira, analysis-resolve, autopilot, autopilot-off,
236
236
  autopilot-on, autopilot-status, bug-bash, build-optimize, channels, complaint-analysis,
237
237
  create-jira, design-check, diff-explain, doctor, estimate, feedback, forget,
238
238
  garbage-collect, graph, help, ios-coding-standard, issue, jira, kill,
239
- language, log, manual-test, model, postmortem, prune-logs,
239
+ language, log, manual-test, model, office-off, office-on, office-status, postmortem, prune-logs,
240
240
  prune-prompts, purge, refactor, research, resume, review,
241
241
  review-analysis, review-issue, review-jira, route-off, route-on,
242
242
  route-status, routines, save, scaffold, scan, scenario-audit, search,
@@ -3,7 +3,7 @@
3
3
  > Auto-generated by `pipeline/scripts/build-skills-index.mjs` - do not hand-edit.
4
4
  > Regenerate with `node pipeline/scripts/build-skills-index.mjs`.
5
5
 
6
- **234 skills** across 2 groups.
6
+ **237 skills** across 2 groups.
7
7
 
8
8
  | Group | Name | Platform | Description |
9
9
  |-------|------|----------|-------------|
@@ -130,6 +130,9 @@
130
130
  | core | `multi-agent-log` | - | Show the agent-log.md for the given task. With no ID, shows the most recent task. Use when asked what a task did, or to read its log. |
131
131
  | core | `multi-agent-manual-test` | - | Switch to the active task's branch and prepare it for manual testing in Xcode. Phase 3 user-test step, standalone (the UI Bug Hunter lives a |
132
132
  | core | `multi-agent-model` | - | Turn the top model rung on or off and keep the cost ledger's pricing in step with it. Use when asked to enable or disable Fable, or which mo |
133
+ | core | `multi-agent-office-off` | - | Close the office panel and stop its local server. Use when done with the panel. |
134
+ | core | `multi-agent-office-on` | - | Open the office panel: a local browser page with agents at work, their chats, cost ledger and new runs. Use when you want to watch or drive |
135
+ | core | `multi-agent-office-status` | - | Whether the office panel is running, its URL (never the token) and its last actions. Use when unsure if the panel is open. |
133
136
  | core | `multi-agent-postmortem` | - | Post-mortem of a run from its session transcripts: loops, stalls, root-cause hypotheses on file:line, fixes. Read-only, redacted. Use when a |
134
137
  | core | `multi-agent-prune-logs` | - | Delete per-task project logs under ~/.claude/logs/multi-agent (filter by age/project/task). Audit trail + metrics are preserved. Dry-run fir |
135
138
  | core | `multi-agent-prune-prompts` | - | Zero-base prompt review: measure the always-on instruction footprint, classify every rule block, propose keep/trial-removal/delete; applies |