@mmerterden/multi-agent-pipeline 20.12.0 → 20.15.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 (183) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +8 -6
  3. package/README.tr.md +8 -6
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +4 -4
  7. package/install/_common.mjs +1 -1
  8. package/install/_plugin-skills.mjs +13 -9
  9. package/install/catalog-history.json +1 -1
  10. package/install/codex.mjs +12 -12
  11. package/manifest.json +186 -120
  12. package/package.json +1 -1
  13. package/pipeline/commands/multi-agent/SKILL.md +1 -0
  14. package/pipeline/commands/multi-agent/analysis/SKILL.md +17 -82
  15. package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +57 -7
  16. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +2 -2
  17. package/pipeline/commands/multi-agent/autopilot/SKILL.md +8 -23
  18. package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +25 -45
  19. package/pipeline/commands/multi-agent/channels/SKILL.md +11 -63
  20. package/pipeline/commands/multi-agent/design-check/SKILL.md +43 -178
  21. package/pipeline/commands/multi-agent/diff-explain/SKILL.md +2 -0
  22. package/pipeline/commands/multi-agent/doctor/SKILL.md +6 -0
  23. package/pipeline/commands/multi-agent/estimate/SKILL.md +65 -0
  24. package/pipeline/commands/multi-agent/feedback/SKILL.md +2 -2
  25. package/pipeline/commands/multi-agent/forget/SKILL.md +1 -0
  26. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -0
  27. package/pipeline/commands/multi-agent/help/SKILL.md +5 -546
  28. package/pipeline/commands/multi-agent/kill/SKILL.md +14 -18
  29. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +1 -0
  30. package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +1 -0
  31. package/pipeline/commands/multi-agent/refactor/SKILL.md +7 -76
  32. package/pipeline/commands/multi-agent/review/SKILL.md +5 -0
  33. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +8 -3
  34. package/pipeline/commands/multi-agent/scenario-audit/SKILL.md +79 -0
  35. package/pipeline/commands/multi-agent/serve/SKILL.md +6 -3
  36. package/pipeline/commands/multi-agent/setup/SKILL.md +12 -365
  37. package/pipeline/commands/multi-agent/status/SKILL.md +2 -0
  38. package/pipeline/commands/multi-agent/store-ready/SKILL.md +56 -184
  39. package/pipeline/commands/multi-agent/sync/SKILL.md +14 -267
  40. package/pipeline/contract/CHANGELOG.md +52 -0
  41. package/pipeline/contract/README.md +41 -1
  42. package/pipeline/contract/build.mjs +49 -7
  43. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  44. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  45. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  46. package/pipeline/contract/fixtures/launch-plan.json +1 -2
  47. package/pipeline/contract/fixtures/runs-awaiting-question.json +10 -3
  48. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  49. package/pipeline/contract/fixtures/runs-failed.json +19 -6
  50. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +25 -8
  51. package/pipeline/contract/fixtures/runs-pr-opened.json +25 -8
  52. package/pipeline/contract/fixtures/runs-running.json +31 -4
  53. package/pipeline/contract/frozen/toolbox.json +13 -0
  54. package/pipeline/contract/manifest.json +112 -10
  55. package/pipeline/contract/types/index.d.ts +186 -17
  56. package/pipeline/lib/analysis-jira-write.sh +81 -27
  57. package/pipeline/lib/analysis-quality.mjs +261 -0
  58. package/pipeline/lib/analysis-sections.mjs +105 -0
  59. package/pipeline/lib/claude-sessions.mjs +93 -0
  60. package/pipeline/lib/credential-resolve.mjs +39 -0
  61. package/pipeline/lib/gc-report.sh +64 -0
  62. package/pipeline/lib/jira-epic-link.sh +54 -0
  63. package/pipeline/lib/unattended-settings-location.mjs +4 -0
  64. package/pipeline/lib/workspace-trust.mjs +73 -0
  65. package/pipeline/multi-agent-refs/analysis/intake.md +5 -3
  66. package/pipeline/multi-agent-refs/analysis/locked.md +12 -11
  67. package/pipeline/multi-agent-refs/analysis/redesign.md +3 -1
  68. package/pipeline/multi-agent-refs/analysis/render.md +24 -24
  69. package/pipeline/multi-agent-refs/analysis/resolve.md +1 -1
  70. package/pipeline/multi-agent-refs/analysis/resume.md +37 -0
  71. package/pipeline/multi-agent-refs/analysis/reusable-refs.md +25 -0
  72. package/pipeline/multi-agent-refs/analysis/review.md +16 -3
  73. package/pipeline/multi-agent-refs/analysis/synthesis.md +10 -2
  74. package/pipeline/multi-agent-refs/analysis-template-corporate.md +44 -9
  75. package/pipeline/multi-agent-refs/analysis-template.md +21 -14
  76. package/pipeline/multi-agent-refs/channels/board.md +17 -0
  77. package/pipeline/multi-agent-refs/channels/multi-repo.md +15 -0
  78. package/pipeline/multi-agent-refs/cross-cli-contract.md +8 -4
  79. package/pipeline/multi-agent-refs/design-check/build-launch.md +14 -0
  80. package/pipeline/multi-agent-refs/design-check/compare.md +44 -0
  81. package/pipeline/multi-agent-refs/design-check/drive-capture.md +35 -0
  82. package/pipeline/multi-agent-refs/design-check/export.md +37 -0
  83. package/pipeline/multi-agent-refs/design-check/figma-mapping.md +11 -0
  84. package/pipeline/multi-agent-refs/design-check/init-inventory.md +56 -0
  85. package/pipeline/multi-agent-refs/design-check/mcp-currency-gate.md +41 -0
  86. package/pipeline/multi-agent-refs/features/analysis-jira.md +69 -19
  87. package/pipeline/multi-agent-refs/features/analysis-outline.md +55 -0
  88. package/pipeline/multi-agent-refs/features/analysis-sources.md +60 -0
  89. package/pipeline/multi-agent-refs/help/en.md +273 -0
  90. package/pipeline/multi-agent-refs/help/tr.md +271 -0
  91. package/pipeline/multi-agent-refs/orchestrator/operations.md +99 -0
  92. package/pipeline/multi-agent-refs/orchestrator/phase-0-projects.md +72 -0
  93. package/pipeline/multi-agent-refs/orchestrator/phase-3-user-test.md +40 -0
  94. package/pipeline/multi-agent-refs/orchestrator/phase-4-5-projects.md +68 -0
  95. package/pipeline/multi-agent-refs/orchestrator/skill-loading.md +99 -0
  96. package/pipeline/multi-agent-refs/phases/phase-0-init.md +3 -2
  97. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +1 -1
  98. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +1 -1
  99. package/pipeline/multi-agent-refs/picker-contract.md +29 -0
  100. package/pipeline/multi-agent-refs/refactor/drift.md +49 -0
  101. package/pipeline/multi-agent-refs/refactor/run-errors.md +46 -0
  102. package/pipeline/multi-agent-refs/setup/discovery.md +84 -0
  103. package/pipeline/multi-agent-refs/setup/figma.md +27 -0
  104. package/pipeline/multi-agent-refs/setup/identity-routing.md +60 -0
  105. package/pipeline/multi-agent-refs/setup/token-save-flow.md +201 -0
  106. package/pipeline/multi-agent-refs/store-ready/build.md +49 -0
  107. package/pipeline/multi-agent-refs/store-ready/gate-1-static.md +37 -0
  108. package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +31 -0
  109. package/pipeline/multi-agent-refs/store-ready/preflight.md +50 -0
  110. package/pipeline/multi-agent-refs/store-ready/report.md +40 -0
  111. package/pipeline/multi-agent-refs/sync/codex.md +43 -0
  112. package/pipeline/multi-agent-refs/sync/dev-toolkit.md +174 -0
  113. package/pipeline/multi-agent-refs/sync/stack-plugins.md +51 -0
  114. package/pipeline/multi-agent-refs/tracker-contract.md +29 -4
  115. package/pipeline/schemas/agent-state.schema.json +13 -4
  116. package/pipeline/schemas/analysis-spec.schema.json +76 -2
  117. package/pipeline/schemas/autopilot-off-request.schema.json +20 -0
  118. package/pipeline/schemas/autopilot-off.schema.json +24 -0
  119. package/pipeline/schemas/autopilot-status.schema.json +63 -0
  120. package/pipeline/schemas/contract-error.schema.json +13 -2
  121. package/pipeline/schemas/gc-request.schema.json +31 -0
  122. package/pipeline/schemas/gc.schema.json +116 -0
  123. package/pipeline/schemas/kill-request.schema.json +22 -0
  124. package/pipeline/schemas/kill.schema.json +118 -0
  125. package/pipeline/schemas/launch-plan.schema.json +11 -2
  126. package/pipeline/schemas/launch-request.schema.json +7 -2
  127. package/pipeline/schemas/launch.json +65 -4
  128. package/pipeline/schemas/launch.schema.json +23 -8
  129. package/pipeline/schemas/prefs.schema.json +25 -4
  130. package/pipeline/schemas/repos.schema.json +39 -0
  131. package/pipeline/schemas/resume-request.schema.json +37 -0
  132. package/pipeline/schemas/run-log.schema.json +32 -0
  133. package/pipeline/schemas/run-questions.json +5 -1
  134. package/pipeline/schemas/run-questions.schema.json +1 -1
  135. package/pipeline/schemas/runs-index.schema.json +59 -3
  136. package/pipeline/scripts/_run-paths.mjs +8 -2
  137. package/pipeline/scripts/analysis-conform-coverage.mjs +96 -0
  138. package/pipeline/scripts/analysis-sources.mjs +264 -0
  139. package/pipeline/scripts/analysis-story-body.mjs +210 -0
  140. package/pipeline/scripts/analysis-story-tree.mjs +73 -12
  141. package/pipeline/scripts/analysis-tickets-writeback.mjs +101 -0
  142. package/pipeline/scripts/autopilot-control.mjs +223 -0
  143. package/pipeline/scripts/autopilot-runner.mjs +14 -39
  144. package/pipeline/scripts/build-references.mjs +19 -2
  145. package/pipeline/scripts/confluence-readback.mjs +129 -0
  146. package/pipeline/scripts/contract-server.mjs +373 -7
  147. package/pipeline/scripts/doctor.mjs +5 -2
  148. package/pipeline/scripts/estimate.mjs +223 -0
  149. package/pipeline/scripts/gate-ledger.mjs +64 -3
  150. package/pipeline/scripts/gc-plan.mjs +288 -0
  151. package/pipeline/scripts/gc-refs.sh +33 -2
  152. package/pipeline/scripts/gc-tmp.sh +33 -2
  153. package/pipeline/scripts/gc-worktrees.sh +42 -3
  154. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -24
  155. package/pipeline/scripts/jira-wiki-escape.mjs +40 -0
  156. package/pipeline/scripts/launch-request.mjs +182 -10
  157. package/pipeline/scripts/phase-tracker.sh +62 -1
  158. package/pipeline/scripts/run-kill.mjs +232 -0
  159. package/pipeline/scripts/run-log.mjs +111 -0
  160. package/pipeline/scripts/runs-index.mjs +177 -11
  161. package/pipeline/scripts/scenario-audit.mjs +245 -0
  162. package/pipeline/scripts/validate-analysis-doc.mjs +204 -76
  163. package/pipeline/skills/.skill-manifest.json +27 -19
  164. package/pipeline/skills/shared/README.md +5 -3
  165. package/pipeline/skills/shared/core/multi-agent/SKILL.md +51 -450
  166. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +13 -2
  167. package/pipeline/skills/shared/core/multi-agent-analysis-jira/SKILL.md +56 -6
  168. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +6 -0
  169. package/pipeline/skills/shared/core/multi-agent-autopilot-off/SKILL.md +26 -44
  170. package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +31 -127
  171. package/pipeline/skills/shared/core/multi-agent-doctor/SKILL.md +6 -0
  172. package/pipeline/skills/shared/core/multi-agent-estimate/SKILL.md +61 -0
  173. package/pipeline/skills/shared/core/multi-agent-kill/SKILL.md +14 -19
  174. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +7 -76
  175. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +6 -1
  176. package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +6 -1
  177. package/pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md +1 -1
  178. package/pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md +1 -1
  179. package/pipeline/skills/shared/core/multi-agent-scenario-audit/SKILL.md +77 -0
  180. package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +6 -3
  181. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +206 -324
  182. package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +5 -0
  183. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +4 -4
@@ -72,46 +72,12 @@ Roll the high-impact + low/med-effort survivors into the Step 4 plan as band-A i
72
72
 
73
73
  Some skills/components in this project (or in the marketplace plugins it ships) were derived from an upstream source. Upstream keeps evolving - it fixes bugs and adds features. This step detects upstream drift so we can decide whether to pull the improvements back.
74
74
 
75
- The upstream mapping is **configuration, never hardcoded** (it can reference private sources, so it stays out of the shipped skill). Read it from `~/.claude/multi-agent-preferences.json` at `global.derivedSkillSources` (an array). Each entry:
76
-
77
- ```jsonc
78
- {
79
- "label": "<human name for this derivation>",
80
- "localPath": "<repo-relative dir where our derived copy lives>",
81
- "upstreamMarketplace": "<installed marketplace name>", // resolved under ~/.claude/plugins/cache/<marketplace>/
82
- "upstreamPlugin": "<plugin name>",
83
- "upstreamSkills": ["<skill-a>", "<skill-b>"], // the upstream skills we took
84
- "derivedFromVersion": "<x.y.z>", // the version we last synced from
85
- "upstreamVersionSource": "marketplace.json", // which manifest is authoritative; default marketplace.json
86
- "upstreamLocalClone": "<optional path>", // working copy of the upstream repo, preferred over the cache
87
- "upstreamRepoUrl": "<optional https url>" // used when neither a clone nor the marketplace is available
88
- }
89
- ```
90
-
91
- **The plugin cache is a mirror, not the authority.** `~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/` only holds whatever the last `claude plugin marketplace update` fetched. Reading it as the current upstream version is how this step reported "up to date" while the derivation was four releases behind: the cache sat at 0.2.1 and upstream was at 0.4.1. Resolve in the order below and never let the cache alone produce an "up to date" verdict.
92
-
93
- **Which manifest carries the version** is `upstreamVersionSource`, default `marketplace.json`. That is what a marketplace consumer actually resolves, and some upstreams keep per-plugin `plugin.json` versions deliberately unused - reading those records a version nobody ships. An entry here was recorded at 0.7.0 from `plugin.json` while the upstream marketplace said 0.6.0 and its CHANGELOG stated in as many words that `plugin.json` is not used.
94
-
95
- Procedure:
96
- 1. If `global.derivedSkillSources` is missing or empty -> **skip** this step and report "no derived-skill sources configured" (nothing to check). Never invent a source.
97
- 2. For each entry, resolve the current upstream version, in this order, stopping at the first that answers:
98
- - **`upstreamLocalClone`** if set: read `<clone>/.claude-plugin/<upstreamVersionSource>`. Also run `git -C <clone> fetch --dry-run` (or compare against `@{u}`) and say so when the clone is itself behind, so a stale working copy is not silently trusted either.
99
- - **`upstreamRepoUrl`**: read the same manifest over the API (`gh api` / `WebFetch`). A private upstream can 404 for the currently active account even when the repo exists - that is an unreachable result, not a "no drift" result.
100
- - **Plugin cache** under `~/.claude/plugins/cache/<upstreamMarketplace>/<upstreamPlugin>/*/`: last resort only. When the cache is the only source that answered, report the entry as **`unverified (cache only)`**, never as "up to date", and add a plan item to configure `upstreamLocalClone`.
101
- - If nothing is reachable, record the entry as "upstream unreachable" and move on (do not fail the whole run).
102
- 3. Compare the resolved upstream version to `derivedFromVersion`:
103
- - equal, from an authoritative source -> "up to date" (no drift)
104
- - equal, from the cache only -> "unverified (cache only)"
105
- - newer -> **drift**: read the CHANGELOG entries between the two versions, and diff each `upstreamSkills` SKILL.md (+ any templates) against our `localPath` copy. Summarize what changed upstream (bug fixes, new sections, new templates, renamed inputs). Ignore changelog entries that only touch skills outside `upstreamSkills` - they are not ours to port.
106
- 4. Emit the drift table (plan band D):
107
-
108
- ```
109
- | Derivation | Our copy (localPath) | Derived-from | Upstream now | Drift | What changed upstream |
110
- |------------|----------------------|--------------|--------------|-------|-----------------------|
111
- | <label> | <path> | 0.2.1 | 0.3.0 | YES | <changelog + diff summary> |
112
- ```
75
+ Rules that hold for every entry:
76
+ - The upstream mapping is **configuration, never hardcoded**: `global.derivedSkillSources` in `~/.claude/multi-agent-preferences.json`. Missing or empty -> **skip** and report "no derived-skill sources configured". Never invent a source.
77
+ - **The plugin cache is a mirror, not the authority.** Never let the cache alone produce an "up to date" verdict; report it as **`unverified (cache only)`**. An unreachable upstream is recorded as "upstream unreachable" and the run continues.
78
+ - Each drifted entry becomes a band-D plan item. Do not auto-apply upstream changes - they go through Step 5 approval like everything else, and after porting, bump the entry's `derivedFromVersion`.
113
79
 
114
- 5. For each drifted entry, add a band-D plan item: "port upstream <plugin> <version> changes into <localPath>", with the specific skills to update. Do not auto-apply upstream changes - they go through Step 5 approval like everything else, and after porting, bump the entry's `derivedFromVersion`.
80
+ Full procedure: `$HOME/.claude/multi-agent-refs/refactor/drift.md`. Read it when `global.derivedSkillSources` has at least one entry (entry schema, source resolution order, version manifest, comparison, band-D table).
115
81
 
116
82
  ## Step 0c: DEV-TOOLKIT - current MCP practice for the companion toolkit
117
83
 
@@ -121,44 +87,9 @@ Full procedure - resolution (configuration first, never a hardcoded path; skip
121
87
 
122
88
  ## Step 0d: RUN-ERRORS - what the pipeline actually failed on
123
89
 
124
- Before speculating about improvements, read what real runs already failed on. When usage logging is enabled, every terminated run appends its errors to a local ledger:
125
-
126
- ```bash
127
- LEDGER="$HOME/.claude/logs/multi-agent/errors-ledger.jsonl"
128
- [ -f "$LEDGER" ] || echo "no run-error ledger yet - skip band F"
129
- ```
130
-
131
- Each line is one run: `{ t, id, u, c, rp, ph, v, errs[] }`. The `errs[]` entries are cause tags (`<phase>:<cause>` halt reasons, `phase-<id>-failed`, `run-failed`).
132
-
133
- 1. Read the ledger (best-effort; a missing or unreadable file means skip band F, not a failure).
134
- 2. Group by error tag. For each tag compute: occurrences, distinct users affected, distinct repos, the phase it usually strikes, first + last seen, and which pipeline versions it spans (a tag that persists across versions is unfixed; one that stopped at a version is already resolved - do not re-raise it).
135
- 3. Rank by `occurrences x users-affected`. A failure that recurs across users or tasks is lived evidence, not a hypothesis - it outranks a speculative improvement.
136
- 4. For each surviving tag, trace it to the phase doc / script that emits that cause and propose the concrete fix.
137
-
138
- This band mirrors the admin dashboard's "Gelişim alanları" panel, but reads the local ledger so it needs no auth and works offline. If `$ARGUMENTS` names a focus area, still read the ledger - a recurring run error in that area is the strongest possible signal.
139
-
140
- Then read what the transcripts themselves record, which is the half no model noticed:
141
-
142
- ```bash
143
- node "$HOME/.claude/scripts/learn-from-transcripts.mjs" --json
144
- ```
145
-
146
- It correlates rather than interprets - a failed read against the read that then worked, an identical invocation that kept failing, a search that was too narrow, a call the user refused twice, a file too big to read whole. Dry run by default; `--apply` writes them to the learnings ledger as `source: transcript-mining` and renders a marked block in `CLAUDE.local.md`. Zero candidates alongside a non-zero `toolResultsExamined` means there was nothing to find; zero of both means the read is broken.
147
-
148
- Output (plan band F):
149
-
150
- ```
151
- | # | Error tag | Occurrences | Users | Usual phase | Versions | Root cause (file) | Fix | In plan? |
152
- |---|-----------|-------------|-------|-------------|----------|-------------------|-----|----------|
153
- | 1 | 4:reviewer-json-invalid | 12 | 3 | 4 | 14.x-15.x | reviewer prompt lets prose leak | tighten schema instruction in phase-3-review.md | Yes (P0) |
154
- | 2 | phase-3-failed | 5 | 2 | 3 | 15.0.x | build step misses a stack toolchain | add preflight in phase-2-dev.md | Yes (P1) |
155
- ```
156
-
157
- Rules for this band:
90
+ Before speculating about improvements, read what real runs already failed on. When usage logging is enabled, every terminated run appends its errors to a local ledger at `$HOME/.claude/logs/multi-agent/errors-ledger.jsonl`. A missing, unreadable or empty ledger means skip band F silently - it is additive signal, never a gate. If `$ARGUMENTS` names a focus area, still read the ledger - a recurring run error in that area is the strongest possible signal. A tag that stopped recurring after a version bump is resolved: report it, do not re-raise it. Never quote a user's identity as blame.
158
91
 
159
- - The ledger is evidence of the past, not a spec. A tag that stopped recurring after a version bump is resolved - report it as resolved, do not add a plan item.
160
- - Never quote a user's identity as blame. The `u` field is for counting distinct affected users, not for naming anyone in the plan.
161
- - If the ledger is empty or absent, skip band F silently - it is additive signal, never a gate.
92
+ Full procedure: `$HOME/.claude/multi-agent-refs/refactor/run-errors.md`. Read it when the ledger exists (record shape, grouping and ranking, transcript mining, band-F table).
162
93
 
163
94
  ## Step 0e: BACKLOG - friction this pipeline already noticed
164
95
 
@@ -26,6 +26,11 @@ Skip Phase 0-3 and review a diff only. Five input shapes, two providers:
26
26
 
27
27
  Branch-mode runs print to chat only. PR-mode runs print to chat AND post the verdict to the PR per `$HOME/.claude/multi-agent-refs/channels/pr-review-actions.md`: per-finding inline comments + an explicit approve / needs-work state. **No monolithic advisory comment** is ever posted.
28
28
 
29
+ ## Gotchas
30
+
31
+ - The counterpart-repo comparison needs exactly one resolved candidate. With several, an unattended run skips it silently, so an autopilot review can have no cross-platform section.
32
+ - The counterpart's stack comes from marker files, never from the repo name.
33
+
29
34
  ## Steps
30
35
 
31
36
  ### 0. Session bootstrap - TASK_ID + tmp cleanup
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Review a written analysis document instead of a diff: resolve it from a path, a Confluence page or a Jira issue, run the deterministic gates first, then a parallel model review. Findings cite the Locked rule they break. Never edits the document."
3
- description-tr: "Diff yerine yazılmış analiz dokümanını review eder: yol, Confluence sayfası veya Jira issue'sundan getirir, önce deterministik geçitleri koşar, sonra paralel model review. Bulgular ihlal edilen Locked kuralını gösterir. Dokümanı düzenlemez."
2
+ description: "Review a written analysis document instead of a diff: resolve it from a path, a Confluence page or a Jira issue, run the deterministic gates first, then a parallel model review. Findings cite the Locked rule they break. Never edits the document. Use when an analysis needs judging before development starts."
3
+ description-tr: "Diff yerine yazılmış analiz dokümanını review eder: yol, Confluence sayfası veya Jira issue'sundan getirir, önce deterministik geçitleri koşar, sonra paralel model review. Bulgular ihlal edilen Locked kuralını gösterir. Dokümanı düzenlemez. Bir analizin geliştirme başlamadan önce değerlendirilmesi gerektiğinde kullanılır."
4
4
  argument-hint: "[path | Confluence URL | pageId | JIRA-KEY] [--state <state.json>] - optional; with no argument, pick from recent analyses"
5
5
  parameters: [{"name":"target","kind":"text"},{"name":"--state","kind":"path"}]
6
6
  gui: form
@@ -14,6 +14,11 @@ confirm: none
14
14
 
15
15
  `/multi-agent:review` judges a diff. This judges the document that diff was supposed to come from, before anyone writes the code it describes. No worktree, no branch, no commit, and the reviewed document is never edited in place.
16
16
 
17
+ ## Gotchas
18
+
19
+ - Validator ERRORs are Blockers and WARNs are Important, unless the document states why the warned-about item is acceptable.
20
+ - Every rubric class is printed, with `none` when empty. A class missing from the verdict did not run; it is not a clean result.
21
+
17
22
  ## Flow
18
23
 
19
24
  Read `$HOME/.claude/multi-agent-refs/analysis/review.md` and execute it:
@@ -27,7 +32,7 @@ Read `$HOME/.claude/multi-agent-refs/analysis/review.md` and execute it:
27
32
 
28
33
  ## Why it cites Locked decisions
29
34
 
30
- The analysis flow already declares 36 Locked decisions and two deterministic validators. A reviewer that says "I would have written this differently" gives the author nothing to act on; one that says "Locked 33: the Confluence page is in the evidence record but not in Section 21" gives them a fix and a reason. Findings that map to no rule are still allowed, but they are marked as judgement, not dressed up as a violation.
35
+ The analysis flow already declares 37 Locked decisions and two deterministic validators. A reviewer that says "I would have written this differently" gives the author nothing to act on; one that says "Locked 33: the Confluence page is in the evidence record but not in Section 21" gives them a fix and a reason. Findings that map to no rule are still allowed, but they are marked as judgement, not dressed up as a violation.
31
36
 
32
37
  ## What it never does
33
38
 
@@ -0,0 +1,79 @@
1
+ ---
2
+ description: "Audit test scenarios from a CSV against the code: mark each PRESENT, PARTIAL, ABSENT or UNCLEAR, every PRESENT backed by a file:line that resolves at HEAD. Read-only. Use when a test set or acceptance list has to be checked against what the code does."
3
+ description-tr: "Test senaryolarını koda karşı denetler: CSV'deki (ya da CSV'ye aktarılmış Jira test setindeki) her senaryo için kodun onu nerede karşıladığını bulur ve VAR, KISMEN, YOK ya da BELİRSİZ olarak işaretler; her VAR, HEAD'de çözülen bir dosya:satır ile desteklenir. Salt-okunur."
4
+ allowed-tools: Bash, Read, Grep, AskUserQuestion
5
+ argument-hint: "<scenarios.csv> [--repo <path>]"
6
+ parameters: [{"name":"scenarios","kind":"path","required":true},{"name":"--repo","kind":"path"}]
7
+ gui: form
8
+ destructive: false
9
+ confirm: none
10
+ not-for: test, manual-test, review
11
+ ---
12
+
13
+ # multi-agent scenario-audit
14
+
15
+ **Input**: $ARGUMENTS
16
+
17
+ Checks a list of test scenarios against a repository and says, per scenario,
18
+ whether the code implements it. The judgement is yours; the evidence rule is
19
+ the script's. Nothing is written and nothing leaves the machine.
20
+
21
+ Script: `$HOME/.claude/scripts/scenario-audit.mjs`.
22
+
23
+ ## Gotchas
24
+
25
+ - A verdict without a resolving `file:line` is not PRESENT. `verify` turns it into UNCLEAR and says why; do not argue with it, find the line.
26
+ - ABSENT is a claim about a search. Record the terms you searched; an ABSENT with no terms becomes UNCLEAR.
27
+ - Scenario text is usually business language and the code is not. Search for identifiers, localization keys, endpoint paths and error codes, not for the scenario's words.
28
+ - The audit reads HEAD. Uncommitted work is not seen; say so when the working tree is dirty.
29
+
30
+ ## Step 1 - Inventory
31
+
32
+ The scenarios file is a CSV with an id column and a title column (`id`/`no`/`key`,
33
+ `title`/`scenario`/`senaryo`/`başlık`; optional `steps`/`adımlar` and
34
+ `expected`/`beklenen`). Comma or semicolon. A Jira test set is exported to this
35
+ shape first.
36
+
37
+ ```bash
38
+ node "$HOME/.claude/scripts/scenario-audit.mjs" inventory --csv "<scenarios.csv>" > /tmp/ma-scenarios.json
39
+ ```
40
+
41
+ Exit 2 names the missing column. With no `--repo`, the repository is the
42
+ current directory; confirm it in one line before searching.
43
+
44
+ ## Step 2 - Search
45
+
46
+ For each scenario, write the code-level terms that would implement it into
47
+ `/tmp/ma-terms.json` (`{"<id>": ["term", ...]}`), then:
48
+
49
+ ```bash
50
+ node "$HOME/.claude/scripts/scenario-audit.mjs" search --terms /tmp/ma-terms.json --repo "<repo>"
51
+ ```
52
+
53
+ Read the candidate lines it returns. A term nothing matched is listed under
54
+ `missing`; try a second term before concluding anything.
55
+
56
+ ## Step 3 - Verdict
57
+
58
+ Write `/tmp/ma-verdicts.json`: `[{id, status, citations, searched, note}]`.
59
+
60
+ | Status | When | Needs |
61
+ |---|---|---|
62
+ | `PRESENT` | the code does what the scenario expects | `citations`: the `file:line` that does it |
63
+ | `PARTIAL` | part of it, e.g. the happy path without the error case | `citations`, and `note` saying what is missing |
64
+ | `ABSENT` | nothing implements it | `searched`: the terms that found nothing relevant |
65
+ | `UNCLEAR` | the code exists but its behaviour cannot be told from reading | `note` |
66
+
67
+ ```bash
68
+ node "$HOME/.claude/scripts/scenario-audit.mjs" verify --csv "<scenarios.csv>" \
69
+ --verdicts /tmp/ma-verdicts.json --repo "<repo>" --lang "<outputLanguage>"
70
+ ```
71
+
72
+ ## Step 4 - Report
73
+
74
+ Print the table `verify` produced, verbatim, and its count line. Then the
75
+ scenarios that moved to UNCLEAR during verification, with the reason. State
76
+ which verdicts rest on a resolved citation (mechanical) and that the reading of
77
+ the code behind them is judgement.
78
+
79
+ **Stop. No issue, no comment, no worktree.**
@@ -56,7 +56,10 @@ Or leave it: it exits on its own when idle.
56
56
  ## What it will not do
57
57
 
58
58
  There is no route that merges, marks ready, runs a command or starts a host.
59
- `POST /v1/launch` validates a launch request, writes it (0600) and returns the
60
- argv and environment `launch.json` declares; the client starts the process.
59
+ `POST /v1/launch` and `POST /v1/runs/{id}/resume` return the argv and
60
+ environment `launch.json` declares; the client starts the process.
61
61
  `POST /v1/runs/{id}/answer` accepts only an option the run's pending question
62
- offered.
62
+ offered. `POST /v1/runs/{id}/kill` and `POST /v1/gc` act only on a second
63
+ request carrying the single-use confirm token the first one returned, and a
64
+ kill never deletes the remote branch or the logs. Autopilot can be turned off
65
+ over HTTP, never on.