@mmerterden/multi-agent-pipeline 20.11.1 → 20.13.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 (71) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +1 -1
  3. package/README.tr.md +1 -1
  4. package/docs/facts.json +2 -2
  5. package/install/_common.mjs +1 -1
  6. package/install/_plugin-skills.mjs +13 -9
  7. package/install/catalog-history.json +1 -1
  8. package/install/claude.mjs +9 -0
  9. package/install/codex.mjs +12 -12
  10. package/manifest.json +74 -67
  11. package/package.json +5 -5
  12. package/pipeline/agents/code-reviewer.md +1 -1
  13. package/pipeline/commands/multi-agent/SKILL.md +1 -0
  14. package/pipeline/commands/multi-agent/analysis/SKILL.md +7 -3
  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 +6 -0
  18. package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +1 -0
  19. package/pipeline/commands/multi-agent/doctor/SKILL.md +6 -0
  20. package/pipeline/commands/multi-agent/feedback/SKILL.md +2 -2
  21. package/pipeline/commands/multi-agent/forget/SKILL.md +1 -0
  22. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -0
  23. package/pipeline/commands/multi-agent/kill/SKILL.md +1 -0
  24. package/pipeline/commands/multi-agent/model/SKILL.md +7 -0
  25. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +1 -0
  26. package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +1 -0
  27. package/pipeline/commands/multi-agent/review/SKILL.md +5 -0
  28. package/pipeline/commands/multi-agent/review-analysis/SKILL.md +7 -2
  29. package/pipeline/commands/multi-agent/sync/SKILL.md +5 -6
  30. package/pipeline/lib/agent-model-sync.mjs +95 -0
  31. package/pipeline/lib/analysis-jira-write.sh +81 -27
  32. package/pipeline/lib/analysis-quality.mjs +261 -0
  33. package/pipeline/lib/analysis-sections.mjs +105 -0
  34. package/pipeline/lib/jira-epic-link.sh +54 -0
  35. package/pipeline/lib/model-rung.sh +7 -0
  36. package/pipeline/multi-agent-refs/analysis/locked.md +4 -4
  37. package/pipeline/multi-agent-refs/analysis/redesign.md +3 -1
  38. package/pipeline/multi-agent-refs/analysis/render.md +20 -21
  39. package/pipeline/multi-agent-refs/analysis/resolve.md +1 -1
  40. package/pipeline/multi-agent-refs/analysis/review.md +16 -3
  41. package/pipeline/multi-agent-refs/analysis/synthesis.md +10 -2
  42. package/pipeline/multi-agent-refs/analysis-template-corporate.md +44 -9
  43. package/pipeline/multi-agent-refs/analysis-template.md +21 -14
  44. package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -0
  45. package/pipeline/multi-agent-refs/features/analysis-jira.md +69 -19
  46. package/pipeline/multi-agent-refs/features/doctor.md +10 -0
  47. package/pipeline/multi-agent-refs/features/model-fallback.md +10 -0
  48. package/pipeline/multi-agent-refs/features/phone-api.md +1 -1
  49. package/pipeline/multi-agent-refs/features/unattended-security.md +2 -2
  50. package/pipeline/multi-agent-refs/features/usage-reporting.md +13 -0
  51. package/pipeline/schemas/analysis-spec.schema.json +22 -0
  52. package/pipeline/schemas/prefs.schema.json +22 -1
  53. package/pipeline/scripts/analysis-story-body.mjs +210 -0
  54. package/pipeline/scripts/analysis-story-tree.mjs +73 -12
  55. package/pipeline/scripts/analysis-tickets-writeback.mjs +101 -0
  56. package/pipeline/scripts/build-references.mjs +14 -1
  57. package/pipeline/scripts/confluence-readback.mjs +148 -0
  58. package/pipeline/scripts/doctor.mjs +48 -0
  59. package/pipeline/scripts/jira-wiki-escape.mjs +40 -0
  60. package/pipeline/scripts/migrate-prefs.mjs +14 -0
  61. package/pipeline/scripts/unattended_policy.py +12 -5
  62. package/pipeline/scripts/usage-report.mjs +84 -9
  63. package/pipeline/scripts/validate-analysis-doc.mjs +120 -70
  64. package/pipeline/skills/.skill-manifest.json +8 -8
  65. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +6 -1
  66. package/pipeline/skills/shared/core/multi-agent-analysis-jira/SKILL.md +56 -6
  67. package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +6 -0
  68. package/pipeline/skills/shared/core/multi-agent-doctor/SKILL.md +6 -0
  69. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +5 -0
  70. package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +5 -0
  71. package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -0
package/CHANGELOG.md CHANGED
@@ -16,6 +16,57 @@ Internal file-layout changes that don't affect the slash-command surface are sti
16
16
 
17
17
  ## [Unreleased]
18
18
 
19
+ ## [20.13.0] - 2026-10-01
20
+
21
+ ### Added
22
+
23
+ - Every destructive command (`kill`, `forget`, `garbage-collect`, `prune-logs`, `prune-prompts`, `autopilot-off`, alongside `purge` and `uninstall`) carries `disable-model-invocation: true`, so it runs only when the user types it. Confirm-only commands such as `sync` stay model-invocable. `test/command-contract.test.mjs` holds the rule, and `cross-cli-contract.md` records it with the decision to keep command-only frontmatter keys at the top level.
24
+ - `lint-skills.mjs` requires a routing clause ("use when ...") in every command description, as it already did for skills, and warns when a command on its Gotchas list has no `## Gotchas` section.
25
+ - `## Gotchas` sections near the top of `analysis`, `analysis-jira`, `autopilot`, `doctor`, `review` and `review-analysis`, mirrored into their Copilot skills.
26
+ - `validate-analysis-doc.mjs` warns on vague wording (`fast`, `appropriately`, `etc.`, `gerektiğinde`, `vb.` and similar) in id-bearing requirement rows (`BR-`, `IG-`, `FG-`); `--strict` turns it into a failure. Code spans and summary prose are not read.
27
+ - `smoke-personal-data.sh` also reads a machine-local pattern list (`~/.claude/personal-data-patterns.txt`, or `MA_PERSONAL_DATA_PATTERNS`), so names that must never ship are guarded without being written into the shipped tree.
28
+ - `pipeline/lib/analysis-sections.mjs` holds the section and table-row readers the validator uses, plus the per-profile location of the redesign artefacts.
29
+ - `argument-hint` on the root `/multi-agent` command and on the Copilot `multi-agent-setup` skill.
30
+ - `/multi-agent:analysis-jira` writes a full story description built from the document: the user story, up to 8 acceptance criteria (the G/W/T column or the rule; functional requirements plus alternative and exception flows on the corporate profile), redesign rows for the story's section, and links to the analysis page, the design and the API spec. Missing parts become body warnings and are never filled in. The preview shows every body in full; `--brief` keeps the one-line view.
31
+ - `escapeJiraWiki()` and `wikiLink()` in `jira-wiki-escape.mjs`: document text is escaped before it reaches wiki markup, and links accept http and https only.
32
+ - `--epic KEY` links the stories to an existing epic: `parent` on Cloud, the discovered Epic Link field on Server and Data Center (`issueTree.epicLinkMode`, `issueTree.epicLinkFieldId`). With no field found, the stories are created unlinked and the writer warns.
33
+ - `issueTree.cloneByChannel` creates one linked clone per channel in `channelComponents`, with its own label and component; `cloneLinkType` names the link.
34
+ - `analysis-tickets-writeback.mjs` writes a `## Tickets` table (story, key, sources, channel) into the analysis document between markers, idempotently; updating the Confluence page is a separate approval.
35
+ - `analysis-story-tree.mjs --page-url URL` links the published analysis page from every story.
36
+ - `validate-analysis-doc.mjs` gains six document-quality checks, in `pipeline/lib/analysis-quality.mjs`: `exception-flow` (a corporate use case with a main flow states its exception flow; missing warns on a draft and fails a final document, `Yok: <reason>` is an accepted answer), `scope-overlap` (an item both goal and non-goal fails), `cited-undefined` (a `BR`/`CB`/`IG`/`UC`/`FG` id the text cites but no table row or heading defines fails), `design-frame-unmapped` (a Figma frame outside every corporate use case warns), `business-layer-technical` (a file path or endpoint in global Part A warns; `<details>` blocks and redesign evidence tables are not read) and `missing-inputs` (a final document with a non-empty missing-inputs panel warns).
37
+ - `build-references.mjs --missing-panel` prints the sources the run could not read as the panel at the top of the document; the render places it above Section 1.
38
+ - `confluence-readback.mjs` reads a published page back and reports each document heading missing from the page and each embedded image that is not attached. The analysis render runs it after every publish and reports a mismatch without republishing.
39
+ - Draft pages carry `[TASLAK]` / `[DRAFT]` in their title until the document is final; the corporate `titleFormat` accepts a `{status}` placeholder.
40
+ - The corporate use-case table has an `İstisna Akışı / Exception Flow` row, the traceability matrix gains `Ekran` and `Test` columns, and Section 20 gains `Kategori` and `Karar` columns with one row per question. Multi-service use cases also get a sequence diagram.
41
+ - Synthesis proposes edge-case candidates from the evidence (`state.analysisSpec.edgeCandidates[]`); only accepted ones enter the document. The global API request body shows types instead of sample values and names each field's source, and the document head carries an "at a glance" line of counts.
42
+ - The analysis review verdict ends with `Publish ready`, an ordered `Fix first` list and a `Verified OK` line.
43
+
44
+ ### Fixed
45
+
46
+ - The corporate profile has a layout for redesign documents: `2.1.1` current behaviour, `2.3.1` difference list and `5.(N+4).1` endpoint mapping, and the validator looks the artefacts up by profile. A corporate document with `redesign: true` previously had no sections the validator would accept.
47
+ - The analysis refs agree with each other: 36 Locked decisions everywhere (the command and `resolve.md` said 35 and 31); section numbers are canonical and keep gaps everywhere (the command and `render.md` said numbering re-flows); the `review.md` verdict example uses the rubric's own class names. `test/analysis-refs-consistency.test.mjs` keeps them aligned.
48
+ - The global Section 20 table carries an `ID` column with `AS-NN` values, which the closure gate pairs on.
49
+ - `feedback` and `review-analysis` descriptions say when to use them.
50
+ - The analysis-jira writer searches for clone labels before creating, so a re-run with `cloneByChannel` no longer creates the clones again. A node found on the site is recorded in the ledger as `exists`.
51
+ - Codex receives stack-plugin skills with their `$HOME/.claude/...` paths retargeted, like the pipeline's own skills.
52
+ - The analysis render resolves `CONFLUENCE_BASE_URL` from `prefs.global.hosts.confluence` before publishing.
53
+ - No analysis file says section numbers re-flow: the global template's omission rule, `synthesis.md`, `analysis-resolve` and the validator all state canonical numbers with gaps, and the consistency test also matches "re-flowed".
54
+
55
+ ## [20.12.0] - 2026-10-01
56
+
57
+ ### Added
58
+
59
+ - `usage-report.mjs` records the outcome of every send attempt in `~/.claude/logs/multi-agent/usage-last-send.json`: `accepted`, `not-accepted`, `rejected` with the status code, `redirected` with the host it pointed to, `failed`, or `skipped` with its reason. It carries the run id, the event and the endpoint host, never the token. Any outcome other than `accepted` also prints one line on stderr. Previously the response was discarded, so a failed send left no trace on the panel or the machine.
60
+ - `/multi-agent:doctor` gains the `usage-report` check: it reads that record and turns anything but `accepted` into a WARN with the step that fixes it.
61
+ - `lib/agent-model-sync.mjs`: the installed agents whose `preferredModel` is `fable` (code-reviewer, plan-critic, the iOS, Android and backend architects) have their `model:` line written from `modelFallback.fableEnabled`, `fable` when on and `opus` when off. `/multi-agent:model on|off` re-applies it on every flip and the installer on every install, so the one switch covers agents spawned without an explicit model as well as routed dispatches. Sources keep `model: fable`; `/multi-agent:sync` normalizes the repo copy back with `--fable-on`.
62
+
63
+ ### Fixed
64
+
65
+ - `migrate-prefs.mjs` rewrites a `usageLog.endpoint` on `mmerterden.vercel.app` to `mmerterden.com`. The platform host answers every request with a 308, which the usage clients never follow.
66
+ - The unattended guard resolves a directory's worktree root once per decision instead of up to three times, which cuts a program-provenance check from seven git calls to five.
67
+ - `test/unattended-guard.test.mjs` is now `test/unattended-guard.serial.mjs` and runs after the parallel `test/*.test.mjs` pool. Inside the pool its guard decisions could outlast the guard's 5-second internal deadline, and the guard fails closed when that happens.
68
+ - Lockfile: `brace-expansion` 5.0.12 and `fast-uri` 3.1.8 (transitive), which clears the high and moderate advisories the scorecard gates on.
69
+
19
70
  ## [20.11.1] - 2026-09-29
20
71
 
21
72
  ### Changed
package/README.md CHANGED
@@ -17,7 +17,7 @@ Runs natively on Claude Code, Copilot CLI and Codex CLI. macOS only. Zero runtim
17
17
  ### Prerequisites
18
18
 
19
19
  - **Node.js >= 20.11** - required; the pipeline's own tooling runs on it.
20
- - **`jq`** - required for nine paths, optional for the rest. 89 shell files call it. The nine that publish or decide - the autopilot queue, Jira comments, PR reviews, issue updates, the plan file, both Figma fetchers, log search and Jira auth - refuse with exit 3 rather than run, because a missing `jq` renders as empty DATA and the work carries on with it. Everywhere else it still degrades. The install prints a note when it is missing.
20
+ - **`jq`** - required for nine paths, optional for the rest. 90 shell files call it. The nine that publish or decide - the autopilot queue, Jira comments, PR reviews, issue updates, the plan file, both Figma fetchers, log search and Jira auth - refuse with exit 3 rather than run, because a missing `jq` renders as empty DATA and the work carries on with it. Everywhere else it still degrades. The install prints a note when it is missing.
21
21
  - **`gh`** - for GitHub issue and PR work. Its built-in `--jq` is independent of the `jq` binary.
22
22
 
23
23
  ## Quick Start
package/README.tr.md CHANGED
@@ -17,7 +17,7 @@ Claude Code, Copilot CLI ve Codex CLI üzerinde native çalışır. Yalnızca ma
17
17
  ### Önkoşullar
18
18
 
19
19
  - **Node.js >= 20.11** - zorunlu; pipeline'ın kendi araçları bunun üzerinde koşuyor.
20
- - **`jq`** - dokuz yol için zorunlu, geri kalanı için opsiyonel. 89 kabuk dosyası ona başvuruyor. Yayınlayan ya da karar veren dokuzu - autopilot kuyruğu, Jira yorumları, PR review'ları, issue güncellemeleri, plan dosyası, iki Figma fetcher'ı, log araması ve Jira auth - `jq` yokken çalışmak yerine exit 3 ile reddediyor, çünkü eksik bir `jq` boş VERİ olarak görünür ve iş onunla devam eder. Diğer yerlerde `jq` olmadan da çalışıyor, yalnızca daha az şey yapıyor. Kurulum, eksikse bir not basıyor.
20
+ - **`jq`** - dokuz yol için zorunlu, geri kalanı için opsiyonel. 90 kabuk dosyası ona başvuruyor. Yayınlayan ya da karar veren dokuzu - autopilot kuyruğu, Jira yorumları, PR review'ları, issue güncellemeleri, plan dosyası, iki Figma fetcher'ı, log araması ve Jira auth - `jq` yokken çalışmak yerine exit 3 ile reddediyor, çünkü eksik bir `jq` boş VERİ olarak görünür ve iş onunla devam eder. Diğer yerlerde `jq` olmadan da çalışıyor, yalnızca daha az şey yapıyor. Kurulum, eksikse bir not basıyor.
21
21
  - **`gh`** - GitHub issue ve PR işleri için. Kendi dahili `--jq`'su, `jq` ikilisinden bağımsız.
22
22
 
23
23
  ## Hızlı Başlangıç
package/docs/facts.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Generated by pipeline/scripts/gen-facts.mjs. Do not hand-edit: the site reads this, and a number edited here instead of at its source is the drift this file removes.",
3
- "generatedAt": "2026-09-29",
4
- "version": "20.11.1",
3
+ "generatedAt": "2026-10-01",
4
+ "version": "20.13.0",
5
5
  "phaseSchema": 2,
6
6
  "phases": [
7
7
  {
@@ -591,7 +591,7 @@ export function removePipelineAgentFiles(destDir, agentsSrc) {
591
591
  * @param {string} rel path relative to the copy root, posix-separated
592
592
  * @returns {boolean}
593
593
  */
594
- function isCopyJunk(rel) {
594
+ export function isCopyJunk(rel) {
595
595
  return (
596
596
  rel === ".DS_Store" ||
597
597
  rel.endsWith("/.DS_Store") ||
@@ -182,10 +182,18 @@ export function pluginsToDeliver(home, platformFlag) {
182
182
  * @param {"ios"|"android"|"all"} opts.platformFlag
183
183
  * @param {string} opts.label - host label for log lines
184
184
  * @param {Set<string>} [opts.skipNames] - PIPELINE-owned skill names; a plugin skill matching one is delivered plugin-prefixed rather than dropped
185
+ * @param {(from: string, to: string) => void} [opts.copy] - copies one skill directory; a host whose paths differ from Claude Code's passes a rewriting copy
185
186
  * @returns {{copied: number, renamed: string[], collided: number, plugins: string[], missing: string[]}}
186
187
  */
187
188
  export function installAuthoredPluginSkills(opts) {
188
- const { home, dest, platformFlag, label, skipNames = new Set() } = opts;
189
+ const {
190
+ home,
191
+ dest,
192
+ platformFlag,
193
+ label,
194
+ skipNames = new Set(),
195
+ copy = (from, to) => copyDir(from, to, {}),
196
+ } = opts;
189
197
  const { names: wanted, source: selectionSource } = pluginsToDeliver(home, platformFlag);
190
198
 
191
199
  let copied = 0;
@@ -257,7 +265,7 @@ export function installAuthoredPluginSkills(opts) {
257
265
  // Wipe before copy: `copyDir` only adds, so a file the plugin dropped upstream
258
266
  // would linger in the installed skill and keep being read as current.
259
267
  wipeDir(to);
260
- copyDir(from, to, {});
268
+ copy(from, to);
261
269
  copied += countFiles(from);
262
270
  perPlugin++;
263
271
  }
@@ -315,13 +323,9 @@ export function installAuthoredPluginSkills(opts) {
315
323
  /**
316
324
  * Skill names the PIPELINE owns, derived from its source tree.
317
325
  *
318
- * This is what `skipNames` should be. Callers used to pass a snapshot of
319
- * whatever was already installed (a now-deleted `existingSkillNames(dest)`) - which
320
- * did protect pipeline skills from being shadowed by a plugin, but also meant a
321
- * plugin skill was copied exactly once and then frozen: on the second install its
322
- * own name was "already there", so it was skipped, forever. A stale plugin skill
323
- * then outlives every upstream fix in it, which is how a reference to a path the
324
- * plugin no longer names survived in an installed tree.
326
+ * This is what `skipNames` should be. A snapshot of the destination would also
327
+ * match plugin skills from a previous install, so each would be copied once and
328
+ * then skipped on every later install, frozen against upstream fixes.
325
329
  *
326
330
  * Deriving from the source keeps the shadowing protection (a plugin still cannot
327
331
  * overwrite a pipeline skill) while letting plugin skills refresh on every install.