@mmerterden/multi-agent-pipeline 19.1.4 → 20.1.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 (137) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +19 -36
  3. package/README.tr.md +18 -35
  4. package/SECURITY.md +3 -3
  5. package/docs/adr/0002-instruction-driven-flag.md +6 -5
  6. package/docs/adr/0005-lazy-phase-docs.md +2 -2
  7. package/docs/adr/0008-installer-modularization-and-secret-leak-defense.md +1 -0
  8. package/docs/adr/0009-claude-stack-skills-plugin-only.md +1 -1
  9. package/docs/adr/0010-own-code-graph.md +5 -4
  10. package/docs/adr/0011-dormant-ci.md +10 -1
  11. package/docs/adr/0012-macos-only.md +2 -2
  12. package/docs/adr/0013-lsp-code-intelligence.md +2 -2
  13. package/docs/adr/0014-six-phase-consolidation.md +9 -9
  14. package/docs/adr/0015-one-pipeline-no-depth-answer.md +83 -0
  15. package/docs/adr/0016-the-run-shape-is-asked-not-typed.md +69 -0
  16. package/docs/adr/README.md +18 -16
  17. package/docs/architecture.md +2 -2
  18. package/docs/ecosystem.md +5 -5
  19. package/docs/facts.json +7 -9
  20. package/docs/features.md +4 -5
  21. package/docs/token-budget-history.md +1 -1
  22. package/install/_codex-agents.mjs +1 -1
  23. package/install/_common.mjs +9 -1
  24. package/install/templates/copilot-instructions.md +7 -16
  25. package/manifest.json +133 -129
  26. package/package.json +1 -1
  27. package/pipeline/agents/code-reviewer.md +2 -2
  28. package/pipeline/agents/dev-critic.md +5 -5
  29. package/pipeline/agents/security-auditor.md +80 -72
  30. package/pipeline/commands/figma-to-swiftui.md +1 -1
  31. package/pipeline/commands/multi-agent/SKILL.md +7 -9
  32. package/pipeline/commands/multi-agent/analysis/SKILL.md +2 -0
  33. package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +2 -0
  34. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +2 -0
  35. package/pipeline/commands/multi-agent/autopilot/SKILL.md +2 -0
  36. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +2 -0
  37. package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +1 -1
  38. package/pipeline/commands/multi-agent/build-optimize/SKILL.md +2 -0
  39. package/pipeline/commands/multi-agent/channels/SKILL.md +2 -2
  40. package/pipeline/commands/multi-agent/create-jira/SKILL.md +2 -0
  41. package/pipeline/commands/multi-agent/design-check/SKILL.md +1 -1
  42. package/pipeline/commands/multi-agent/diff-explain/SKILL.md +1 -1
  43. package/pipeline/commands/multi-agent/forget/SKILL.md +2 -0
  44. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +4 -2
  45. package/pipeline/commands/multi-agent/help/SKILL.md +23 -27
  46. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +5 -4
  47. package/pipeline/commands/multi-agent/issue/SKILL.md +2 -0
  48. package/pipeline/commands/multi-agent/jira/SKILL.md +2 -0
  49. package/pipeline/commands/multi-agent/language/SKILL.md +2 -0
  50. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +2 -0
  51. package/pipeline/commands/multi-agent/purge/SKILL.md +2 -0
  52. package/pipeline/commands/multi-agent/resume/SKILL.md +177 -48
  53. package/pipeline/commands/multi-agent/save/SKILL.md +2 -0
  54. package/pipeline/commands/multi-agent/scan/SKILL.md +2 -2
  55. package/pipeline/commands/multi-agent/security-review/SKILL.md +52 -0
  56. package/pipeline/commands/multi-agent/stack/SKILL.md +2 -0
  57. package/pipeline/commands/multi-agent/sync/SKILL.md +7 -8
  58. package/pipeline/commands/multi-agent/test-screenshots/SKILL.md +2 -0
  59. package/pipeline/commands/multi-agent/uninstall/SKILL.md +2 -0
  60. package/pipeline/lib/repo-hygiene.sh +1 -1
  61. package/pipeline/multi-agent-refs/analysis/render.md +1 -1
  62. package/pipeline/multi-agent-refs/analysis/resolve.md +1 -1
  63. package/pipeline/multi-agent-refs/analysis/synthesis.md +1 -1
  64. package/pipeline/multi-agent-refs/analysis-template.md +1 -1
  65. package/pipeline/multi-agent-refs/component-dispatch.md +5 -13
  66. package/pipeline/multi-agent-refs/cross-cli-contract.md +14 -15
  67. package/pipeline/multi-agent-refs/features/external-context-injection.md +2 -0
  68. package/pipeline/multi-agent-refs/features/review-delta.md +1 -1
  69. package/pipeline/multi-agent-refs/features/review-multi-repo.md +3 -3
  70. package/pipeline/multi-agent-refs/features/security-audit.md +55 -0
  71. package/pipeline/multi-agent-refs/features/skill-conformance.md +1 -1
  72. package/pipeline/multi-agent-refs/features/visual-evidence.md +2 -1
  73. package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
  74. package/pipeline/multi-agent-refs/generate-issue.md +2 -0
  75. package/pipeline/multi-agent-refs/issue-jira-triad.md +2 -0
  76. package/pipeline/multi-agent-refs/keychain.md +2 -0
  77. package/pipeline/multi-agent-refs/knowledge.md +0 -7
  78. package/pipeline/multi-agent-refs/outside-the-pipeline.md +1 -1
  79. package/pipeline/multi-agent-refs/payload-contracts.md +1 -1
  80. package/pipeline/multi-agent-refs/phases/modes.md +33 -109
  81. package/pipeline/multi-agent-refs/phases/operations.md +2 -0
  82. package/pipeline/multi-agent-refs/phases/phase-0-init.md +23 -42
  83. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +7 -18
  84. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +13 -44
  85. package/pipeline/multi-agent-refs/phases/phase-3-review.md +28 -37
  86. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +6 -6
  87. package/pipeline/multi-agent-refs/phases/phase-5-report.md +3 -3
  88. package/pipeline/multi-agent-refs/phases.md +9 -11
  89. package/pipeline/multi-agent-refs/progress-contract.md +1 -1
  90. package/pipeline/multi-agent-refs/readiness-review.md +2 -0
  91. package/pipeline/multi-agent-refs/rules.md +1 -1
  92. package/pipeline/multi-agent-refs/threat-model.md +39 -0
  93. package/pipeline/multi-agent-refs/tracker-contract.md +9 -40
  94. package/pipeline/multi-agent-refs/wiki-capture.md +3 -2
  95. package/pipeline/preferences-template.json +2 -2
  96. package/pipeline/rules/figma-pipeline.md +1 -1
  97. package/pipeline/schemas/agent-state.schema.json +28 -10
  98. package/pipeline/schemas/migrations/prefs-2.7.0-to-2.8.0.mjs +33 -0
  99. package/pipeline/schemas/phases.json +4 -26
  100. package/pipeline/schemas/prefs.schema.json +5 -9
  101. package/pipeline/schemas/reviewer-output.schema.json +99 -2
  102. package/pipeline/schemas/security-finding.schema.json +144 -0
  103. package/pipeline/scripts/_stack-routing.mjs +1 -0
  104. package/pipeline/scripts/cost-table.json +1 -1
  105. package/pipeline/scripts/gc-abandoned.sh +16 -9
  106. package/pipeline/scripts/gc-refs.sh +1 -1
  107. package/pipeline/scripts/gen-mode-dispatch.mjs +11 -41
  108. package/pipeline/scripts/migrate-prefs.mjs +18 -17
  109. package/pipeline/scripts/phase-tracker.sh +2 -2
  110. package/pipeline/scripts/phase0-exit-gate.mjs +1 -1
  111. package/pipeline/scripts/plan-coverage-gate.mjs +3 -3
  112. package/pipeline/scripts/render-work-summary.sh +7 -4
  113. package/pipeline/scripts/run-aggregator.mjs +1 -1
  114. package/pipeline/scripts/usage-report.mjs +0 -2
  115. package/pipeline/scripts/worktree-finalize.sh +2 -2
  116. package/pipeline/skills/.skill-manifest.json +17 -21
  117. package/pipeline/skills/.skills-index.json +6 -39
  118. package/pipeline/skills/shared/README.md +5 -8
  119. package/pipeline/skills/shared/core/multi-agent/SKILL.md +11 -15
  120. package/pipeline/skills/shared/core/multi-agent-autopilot-status/SKILL.md +1 -1
  121. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +13 -16
  122. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +2 -3
  123. package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +51 -15
  124. package/pipeline/skills/shared/core/multi-agent-scan/SKILL.md +2 -2
  125. package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +29 -0
  126. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +7 -7
  127. package/pipeline/skills/shared/external/security-review/SKILL.md +64 -0
  128. package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +53 -0
  129. package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +56 -0
  130. package/pipeline/skills/skills-index.md +3 -6
  131. package/pipeline/commands/multi-agent/local/SKILL.md +0 -132
  132. package/pipeline/commands/multi-agent/local-autopilot/SKILL.md +0 -142
  133. package/pipeline/commands/multi-agent/resume-local/SKILL.md +0 -114
  134. package/pipeline/commands/security-review.md +0 -6
  135. package/pipeline/skills/shared/core/multi-agent-local/SKILL.md +0 -41
  136. package/pipeline/skills/shared/core/multi-agent-local-autopilot/SKILL.md +0 -55
  137. package/pipeline/skills/shared/core/multi-agent-resume-local/SKILL.md +0 -51
@@ -1,142 +0,0 @@
1
- ---
2
- description: "Full pipeline + local + autopilot - no worktree, no confirmations; runs all 6 phases end-to-end on the current branch. Use when the full pipeline should run on the current branch with no worktree and no prompts."
3
- description-tr: "Tam pipeline + lokal + autopilot - worktree yok, onay yok; 6 fazı mevcut branch üzerinde uçtan uca koşar (kullanıcı testi Review'ın içinde, autopilot'ta atlanır)."
4
- argument-hint: '"task" - issue URL, Jira ID, free-text, or #id (for resume)'
5
- allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, WebFetch, WebSearch, Skill
6
- ---
7
-
8
- # multi-agent local-autopilot - Full Pipeline, Local Branch, Autonomous
9
-
10
- **Input**: $ARGUMENTS
11
-
12
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` renders its `question`, option `label`s and option `description`s in `outputLanguage`; only `header` stays English (<=12-char chip); external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
13
-
14
- Run the full pipeline **without a worktree** and **with every confirmation skipped**. All six phases execute. The user test inside Phase 3 Review is skipped - there is no worktree to check out from and no interaction to have - but it stopped being a phase of its own in v19.0.0, so nothing is dropped from the set. The `autopilot + local` combination - vs `/multi-agent:autopilot` the only difference is no worktree (work stays on the current branch); vs `/multi-agent:local` the only difference is zero interaction.
15
-
16
- ## Matrix (which one should I use?)
17
-
18
- | Command | Pipeline | Worktree | Confirmations |
19
- |---|---|---|---|
20
- | `/multi-agent "task"` | 6 phases, user test offered | ✅ | ✅ (interactive) |
21
- | `/multi-agent:autopilot "task"` | 6 phases, user test skipped | ✅ | ❌ (autopilot) |
22
- | `/multi-agent:local "task"` | 6 phases, user test offered | ❌ | ✅ (interactive) |
23
- | **`/multi-agent:local-autopilot "task"`** | **6 phases, user test skipped** | **❌** | **❌ (autopilot)** |
24
-
25
- Depth is a separate axis, asked at Phase 0 Step 7.5 rather than encoded in the command name: Full runs every phase above, Short runs Dev → Review → Test → Commit → Report. The two autopilot rows never ask and always run Full.
26
-
27
- ## What changes
28
-
29
- **vs `/multi-agent:autopilot`**: no worktree is created; work stays on the current branch. The task runs in the same editor / IDE session - no second folder.
30
-
31
- **vs `/multi-agent:local`**: Phase 2 Plan Approval Gate is skipped (the safety classifier still runs) and Phase 4 commit / PR runs without confirmation. Both modes already skip Phase 5 (User Test) because neither has a worktree, so the same seven phases execute - review / triage / build discipline are preserved.
32
-
33
- ## When to use it
34
-
35
- - You want full-pipeline discipline (parallel review + triage) on a small task but want to step away from the keyboard
36
- - Single repo + simple branch - the worktree overhead is unnecessary; autopilot + local = clean flow
37
- - Repro-to-fix loop: try things quickly in the local folder, then fire the pipeline forget-and-go on the same branch
38
-
39
- ## When NOT to use it
40
-
41
- - Multiple parallel tasks - you lose worktree isolation; branch collisions
42
- - Security-path or schema-migration changes - the Phase 2 safety classifier auto-pauses (`autopilotSafetyGate`, default on)
43
- - Multi-repo - `--local` is locked to a single repo
44
-
45
- ## Never skipped (even with autopilot + local)
46
-
47
- - 🔴 **Review-blocking finding** → auto fix + rebuild (max 3 retries)
48
- - 💥 **Build failure** → auto fix + rebuild (max 3 retries, then pause)
49
- - 🛡️ **Safety classifier pause** - for high-risk plans, asks once for manual confirmation even in autopilot
50
- - ⚠️ **Kill / Purge** → always asks for confirmation (destructive)
51
-
52
- ## Usage
53
-
54
- ```bash
55
- /multi-agent:local-autopilot "{JIRA-KEY}-12345"
56
- /multi-agent:local-autopilot https://github.com/org/repo/issues/316
57
- /multi-agent:local-autopilot "LoginView dark mode fix"
58
- /multi-agent:local-autopilot "#3" # resume a stopped task in local-autopilot mode
59
- ```
60
-
61
- ## Steps
62
-
63
- 1. **Parse input** - standard multi-agent input formats.
64
- 2. **Set both flags** - write `"autopilot": true` and `"local": true` into `agent-state.json`.
65
- 3. **Launch the multi-agent pipeline** - Phase 0 worktree step is skipped (local contract), Phase 2/5/6 confirmations are skipped (autopilot contract), Phase 4 safety classifier runs.
66
- 4. **On error** - after 3 failed retries, pause and ask the user.
67
-
68
- ## Delegation
69
-
70
- Orchestrator routing: the routing table in `$HOME/.claude/commands/multi-agent/SKILL.md` resolves `local-autopilot` as the union of the `local` + `autopilot` mode mixins. Contract details: `$HOME/.claude/multi-agent-refs/phases/phase-0-init.md` Step 6 (local branch) + `$HOME/.claude/multi-agent-refs/phases/phase-1-plan.md` Step 5 (autopilot gate skip + safety classifier).
71
- ## Required: outward-facing payload contracts
72
-
73
- Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
74
-
75
- ## Required: Phase Tracker Contract
76
-
77
- **The phase tracker is mandatory** - the agent cannot skip it. Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md).
78
-
79
- > **Autopilot mode:** user confirmations are skipped. The tracker is still mandatory - autopilot agent calls cannot skip it; skipping breaks `smoke-tracker-contract.sh`.
80
-
81
- > **Local mode:** no worktree is created, work happens on the current branch. Phase 0 Init still calls `init` - the `--local` flag is stored in tracker-state.json, and `:resume` restores the correct CWD.
82
-
83
- Two channels run in parallel at every phase boundary:
84
-
85
- 1. **State channel** (every CLI, identical): `phase-tracker.sh` writes to `tracker-state.json`. Drives `:resume`, `:log`, `:status`.
86
- 2. **Visual channel** (CLI-specific): native widget on Claude Code, ANSI render on every other CLI. Without it the user sees no phase progress.
87
-
88
- ```bash
89
- # Phase 0, very first shell call (every CLI):
90
- bash $HOME/.claude/scripts/phase-tracker.sh init "$TASK_ID"
91
- for p in "0:Init" "1:Plan" "2:Dev" "3:Review" "4:Commit" "5:Report"; do
92
- bash $HOME/.claude/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}"
93
- done
94
- bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
95
-
96
- # Every phase boundary (every CLI):
97
- bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
98
-
99
- # After every LLM call (every CLI):
100
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
101
- ```
102
-
103
- ### Visual channel - Claude Code (native TaskList widget, required)
104
-
105
- In Claude Code the agent MUST also drive the native TaskList widget so the user sees a sticky phase tile stack - this is the only progress signal Claude Code surfaces. Skipping these calls is the #1 source of "I don't see any phases" complaints.
106
-
107
- **TaskCreate ordering (strict)**: All TaskCreate calls in a registration batch fire in strict phase-number order BEFORE any TaskUpdate in that batch, and a later batch only ever appends phases numbered above everything already registered. The native widget renders by creation order, not by phase number - out-of-order calls produce visually scrambled tile stacks (e.g. `1 ✓ · 2 ✓ · 4 ✓ · 0 ▶ · 3 ☐`) even when the underlying state is correct. Pre-marking phases as completed/skipped before Phase 0 starts is FORBIDDEN - register the tile in order, then flip status via TaskUpdate when the phase actually short-circuits. Full contract in `$HOME/.claude/multi-agent-refs/tracker-contract.md` section "TaskCreate ordering (strict)".
108
-
109
- ```text
110
- # Register one tile per phase, capture the taskId, persist it:
111
- for each phase in 0:Init, 1:Plan, 2:Dev, 3:Review, 4:Commit, 5:Report:
112
- TaskCreate({ subject: "Phase <N>: <Name>", activeForm: "<doing-form>" })
113
- -> returns taskId
114
- bash $HOME/.claude/scripts/phase-tracker.sh meta <N> tasklist_id "<taskId>"
115
-
116
- # Phase entry - flip the tile to in_progress alongside the state update:
117
- TaskUpdate({ taskId: <saved>, status: "in_progress" })
118
- bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress
119
-
120
- # Active sub-step inside a phase - update activeForm so the spinner header reflects what's happening now:
121
- TaskUpdate({ taskId: <saved>, activeForm: "Editing TopBarView.swift" })
122
-
123
- # Phase exit - flip to completed/failed/skipped on both channels:
124
- TaskUpdate({ taskId: <saved>, status: "completed" })
125
- bash $HOME/.claude/scripts/phase-tracker.sh update <N> completed
126
- ```
127
-
128
- `--local autopilot` mode TaskCreates all 6 phases (no phase is skipped).
129
-
130
- #### TaskCreate ordering (strict)
131
-
132
- **All TaskCreate calls in a batch fire in strict phase-number order BEFORE any TaskUpdate is applied.** For `--local autopilot` that means: Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5. The native widget renders by creation order, not by phase number - out-of-order calls produce visually scrambled tile stacks. Full ordering contract in `$HOME/.claude/multi-agent-refs/tracker-contract.md` section "TaskCreate ordering (strict)".
133
-
134
- ### Visual channel - Copilot CLI / plain shell
135
-
136
- These CLIs have no TaskList widget. After every state change the agent calls render, which prints a bordered ANSI card as the last tool result so the user sees an updated phase table:
137
-
138
- ```bash
139
- bash $HOME/.claude/scripts/phase-tracker.sh render
140
- ```
141
-
142
- Do NOT call TaskCreate on these CLIs - the tool does not exist and the call fails.
@@ -1,114 +0,0 @@
1
- ---
2
- description: "Continue already-done LOCAL work through the pipeline tail: Review (with its build gate) → Commit/PR → Report (technical analysis + Jira test-scenario comment). No dev phase. Use when local work is already done and only review, build, commit and reporting remain."
3
- description-tr: "Halihazırda bitmiş LOKAL işi pipeline kuyruğundan geçirir: Review (build kapısıyla) → Commit/PR → Report (teknik analiz + Jira test-senaryosu yorumu). Dev fazı yok."
4
- allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, WebFetch, WebSearch, Skill
5
- ---
6
-
7
- # multi-agent resume-local - Take Existing Branch Work Through the Pipeline Tail
8
-
9
- > **Language (read FIRST)**: Before any status output, read `prefs.global.outputLanguage` and render every conversational line in it. `AskUserQuestion` renders its `question`, option `label`s and option `description`s in `outputLanguage`; only `header` stays English (<=12-char chip); external payload bodies follow `outputLanguage` too (identifiers, commit messages, branch names stay English). Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
10
-
11
- You already did the work locally - wrote code on the current branch and maybe tested it by hand, or committed it outside the pipeline entirely. (As of v14.0.0 a Short run reviews its own output, so this command is for work that had no pipeline run behind it, not a patch for a mode that skipped review.) `/multi-agent:resume-local` picks up from there and runs the **pipeline tail** over that existing local work in one command: parallel review, a build + test success gate, commit/push + PR, then the technical analysis and a **Jira comment with test scenarios**. It does NOT re-develop - Analysis / Planning / Dev (phases 1-3) are intentionally skipped; the diff already on the branch IS the input.
12
-
13
- ## When to use it
14
-
15
- - You ran `:local` and answered Short (which skips Review + Test) and now want the full quality tail on the same branch.
16
- - You hand-coded or hand-tested a change and want review + build/test + PR + Jira write-up without re-running dev.
17
- - You want the "reviewed, built, tested, PR'd, documented on Jira" finish with a single command.
18
-
19
- ## When NOT to use it
20
-
21
- - You haven't written the change yet - use `/multi-agent` or `/multi-agent:local`.
22
- - You only want the review, nothing else - use `/multi-agent:review`. Only the report/channels - `/multi-agent:channels`. Only device UI testing - `/multi-agent:test` / `/multi-agent:manual-test`.
23
-
24
- ## Input
25
-
26
- ```bash
27
- /multi-agent:resume-local # current branch vs its base; resolve Jira id from branch name
28
- /multi-agent:resume-local PROJ-12345 # bind to an explicit Jira id for the Phase 5 comment
29
- /multi-agent:resume-local --base develop # override the base branch for the diff
30
- /multi-agent:resume-local autopilot # no gate prompts: auto-fix blocking findings, auto-PR, auto-comment
31
- ```
32
-
33
- ## Pipeline
34
-
35
- ```
36
- Phase 0: Init → project/branch detect, resolve base + diff (work-already-done), Jira id, state (NO worktree)
37
- Phase 3: Review → the Verify gate first (stack-aware build + existing tests; SUCCESS required), then
38
- parallel review (Fable + Opus + Sonnet) + Fable triage
39
- Phase 4: Commit → commit remaining local changes + push + open PR if none exists
40
- Phase 5: Report → technical analysis + Jira comment with test scenarios (channels: Jira / PR / Confluence / Wiki)
41
- ```
42
-
43
- Phases 1-2 (Plan / Dev) are skipped by design - `ship` treats the current branch's local changes as the Phase 2 output.
44
-
45
- **Why Review runs the build gate here.** Verify is Phase 2 Dev's exit gate since v19.0.0, and this mode has no Dev: the work arrived already written. The gate still has to run, so Review runs it before dispatching reviewers, which is what Review Stage 1 did before the consolidation. Reviewing a branch whose build was never checked is the failure this ordering prevents.
46
-
47
- ## Phase 0 - Context resolution (finish-specific)
48
-
49
- 1. **Project + branch:** detect project (cwd), current branch (`git branch --show-current`). No worktree; work stays on the current branch.
50
- 2. **Base + diff:** resolve base branch in order: `--base <arg>` → `figma-config.project.baseBranch` → `develop` → the branch's upstream/merge-base. The **work under review** is `git diff <base>...HEAD` PLUS uncommitted working-tree changes (`git status`). Abort with a clear message if the diff is empty (`ERR: no local work to finish on <branch> vs <base>`).
51
- 3. **Task binding:** Jira id from the `--`/positional arg, else parse the branch name (`bugfix/PROJ-XXXX` / `feature/PROJ-XXXX`); `taskType` inferred from the diff (bugfix/feature/refactor/chore) for the report wording. GitHub issue `#N` from branch/arg when present.
52
- 4. **Prior state (optional):** if an `agent-state.json` / tracker-state exists for this branch (left by a prior `:local` run), load its analysis summary + Jira/issue binding to enrich the report; otherwise synthesize a minimal state over the diff. Never require a prior full-pipeline run.
53
- 5. Persist state under `.claude/logs/multi-agent/{project}/{taskId}/` (same as `--local`).
54
-
55
- ## Phase execution (reuse the existing phase contracts)
56
-
57
- - **Phase 3 Review** - run per `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` against the resolved diff: deterministic gates (Step 1.x), stack-specific parallel reviewers (Fable + Opus + Sonnet on Claude Code; GPT + Opus + Sonnet on Copilot CLI), Fable triage → `triage.accepted`. Blocking/important accepted findings:
58
- - interactive: present them and ask (`AskUserQuestion`) whether to fix now (loop back through a minimal Phase-3-style TDD fix) or proceed;
59
- - `autopilot` (or `prefs.global.resumeLocal.autoFix == true`): auto-fix accepted blocking/important findings, then re-review the fix, before advancing.
60
- - **Phase 3 Verify gate** - the **automated success gate** (this is what "build+test success" means here; the interactive device user-test is `/multi-agent:manual-test`). Stack-aware: build via `figma-config.build` (iOS scheme / Android gradle / detected backend/web build) and run the existing test suite if present (`swift test` / `xcodebuild test` / `./gradlew test` / `pytest` / `npm test` / `vitest`). Require success to advance; on failure, surface logs and (interactive) stop or (autopilot) attempt a bounded fix loop. **If the repo has no tests, report "no tests present" - never fabricate test results.**
61
- - **Phase 4 Commit/PR** - per `$HOME/.claude/multi-agent-refs/phases/phase-4-commit.md`: stage + commit any remaining local changes with a conventional message (`{type}(scope): desc [{JIRA_KEY}-{id}]`), push, and open a PR **only if one does not already exist** for the branch. PR body per `$HOME/.claude/multi-agent-refs/rules.md "External System Outputs"` and `$HOME/.claude/rules/git-conventions.md` - `Ref: #N` / `Related: #N`, never `Closes/Fixes/Resolves`; NO AI/bot attribution anywhere.
62
- - **Phase 5 Report** - per `$HOME/.claude/multi-agent-refs/phases/phase-5-report.md` + `channels.md`: produce the **technical analysis** and **test scenarios**, then post to the configured channels. Default content for `ship`: a Jira **comment** carrying the technical analysis + the test scenarios (and, when the PR was opened, the PR description). Every body runs through the humanizer; bot/tool/AI signatures are FORBIDDEN in comments.
63
-
64
- ## Modes
65
-
66
- - **interactive** (default): stops at the Phase 4 gate when there are blocking/important findings; asks before committing/PR when appropriate.
67
- - **`autopilot`**: no prompts - auto-fix accepted blocking/important findings, auto-commit/push/PR, auto-post the Jira comment. Mirrors `local-autopilot`.
68
-
69
- ## Required: outward-facing payload contracts
70
-
71
- Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
72
-
73
- ## Required: Phase Tracker Contract
74
-
75
- **The phase tracker is required.** Full spec: [`$HOME/.claude/multi-agent-refs/tracker-contract.md`]($HOME/.claude/multi-agent-refs/tracker-contract.md). `ship` registers its active phase set - `0:Init 3:Review 4:Commit 5:Report` - but NEVER resets a tracker that an earlier run already built (load-or-continue; contract section "Continuation runs"):
76
-
77
- ```bash
78
- # Phase 0, first shell call (every CLI). init ONLY when no prior state exists -
79
- # a task handed off from the user test inside Phase 3 ("awaiting local test")
80
- # keeps its full phase 0-2 history (elapsed, tokens, USD).
81
- STATE="$HOME/.claude/logs/multi-agent/${TASK_ID}/tracker-state.json"
82
- if [ ! -f "$STATE" ]; then
83
- bash $HOME/.claude/scripts/phase-tracker.sh init "$TASK_ID"
84
- fi
85
- for p in "0:Init" "3:Review" "4:Commit" "5:Report"; do
86
- bash $HOME/.claude/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}" # idempotent: existing phases keep their history
87
- done
88
- bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
89
-
90
- # Every phase boundary (every CLI):
91
- bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
92
- # After every LLM call (every CLI):
93
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
94
- ```
95
-
96
- **Continuation path (prior state existed):** (1) if Phase 3 was left `in_progress` with `Now: awaiting local test (user)`, mark it `update 3 completed` + `meta 3 Result "local test done (user)"` before finish's own work (finish re-opens it with `update 3 in_progress` when its Verify gate runs; elapsed keeps the original `started_at`, which is expected); (2) print ONE line in `outputLanguage` summarizing the inherited history, e.g. `Continuing PROJ-12345: phases 0-3 finished earlier (12m, 38.4k tok, ~$0.74)` (USD via `phase-tracker.sh cost total`); (3) `render`.
97
-
98
- ### Visual channel - Claude Code (native TaskList widget, required)
99
-
100
- Fresh state: register one tile per phase in strict phase-number order (`0 → 4 → 5 → 6 → 7`) BEFORE any TaskUpdate, capture each `taskId`, persist via `phase-tracker.sh meta <N> tasklist_id "<taskId>"`, then flip status with `TaskUpdate` at each boundary. Out-of-order TaskCreate scrambles the tile stack. Full contract: `$HOME/.claude/multi-agent-refs/tracker-contract.md` "TaskCreate ordering (strict)".
101
-
102
- Continuation: rebuild the FULL TaskList from the state file (completed 0-3 tiles included) in phase order before any `TaskUpdate`, refreshing every `tasklist_id` meta - same as the contract's "Resume behaviour".
103
-
104
- ### Visual channel - Copilot CLI / plain shell
105
-
106
- No TaskList widget. After every state change call `bash $HOME/.claude/scripts/phase-tracker.sh render` (prints the bordered ANSI phase table as the last tool result). Do NOT call TaskCreate on these CLIs.
107
-
108
- ## Examples
109
-
110
- ```bash
111
- /multi-agent:local "PROJ-12345" # develop locally, then answer Short at the depth question
112
- # ... you inspect / hand-test the change ...
113
- /multi-agent:resume-local # now: review + build/test + PR + Jira analysis & test scenarios
114
- ```
@@ -1,6 +0,0 @@
1
- ---
2
- description: Deep security audit on iOS project code
3
- allowed-tools: Read, Glob, Grep, Agent, Bash(git:*), Bash(grep:*)
4
- ---
5
-
6
- Alias for Phase 4 Reviewer 1 (Opus + security-auditor agent). Invocation: `/multi-agent:review` then select security focus; or invoke directly via Agent tool with subagent_type=security-auditor.
@@ -1,41 +0,0 @@
1
- ---
2
- name: multi-agent-local
3
- language: en
4
- description: "Full pipeline in local mode - no worktree, runs directly on the current branch. Use when the full pipeline should run on the current branch without creating a worktree."
5
- user-invocable: true
6
- ---
7
-
8
- # multi-agent local - Full Pipeline, Local Branch
9
-
10
- Runs the full 6-phase pipeline (normal mode - including the Plan Approval Gate + parallel review + triage) on the current branch **without creating a worktree**. The dedicated equivalent of the `multi-agent "task" --local` flag form.
11
-
12
- ## When to use it
13
-
14
- - You do not want an extra open worktree - if an editor/IDE is open in the same folder, it is not disrupted
15
- - You are already on the correct branch and just want to apply the pipeline discipline
16
- - Small project / prototype - worktree overhead is unnecessary
17
-
18
- ## When NOT to use it
19
-
20
- - Multiple tasks in parallel at the same time - worktree isolation is lost
21
- - Multi-repo task - `--local` locks to a single repo
22
-
23
- ## Pipeline
24
-
25
- The same 6 phases as the normal pipeline: Init → Analysis → Planning → Dev → Review → Test → Commit → Report. Only Phase 0 Step 8 (workspace creation) continues on the current branch instead of a worktree; the `state.projects[*].worktreePath` field stays `null`.
26
-
27
- ## Delegation
28
-
29
- Delegates to the orchestrator skill (`multi-agent/SKILL.md`) with the `--local` flag. The Phase 0 Step 6 worktree step is skipped; all other phase contracts apply as is (Plan Approval Gate, three-reviewer review, triage, secret scan, PR creation).
30
-
31
- ## Examples
32
-
33
- ```bash
34
- multi-agent-local "PROJ-12345" # Jira
35
- multi-agent-local "#42" # GitHub issue
36
- multi-agent-local "LoginView dark mode fix" # Free-text
37
- ```
38
-
39
- ## Required: outward-facing payload contracts
40
-
41
- Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
@@ -1,55 +0,0 @@
1
- ---
2
- name: multi-agent-local-autopilot
3
- language: en
4
- description: "Full pipeline + local + autopilot - no worktree, no confirmations, all 6 phases run end-to-end on the current branch. Use when the full pipeline should run on the current branch with no worktree and no prompts."
5
- user-invocable: true
6
- argument-hint: '"task" - issue URL, Jira ID, free-text, or #id (for resume)'
7
- ---
8
-
9
- # multi-agent-local-autopilot - Full Pipeline, Local Branch, Autonomous
10
-
11
- **Input**: $ARGUMENTS
12
-
13
- Runs the full 6-phase pipeline **without creating a worktree** + **skipping all confirmations**. The `autopilot + local` combination. Byte-identical behavior to `/multi-agent:local-autopilot` (Claude Code colon-form).
14
-
15
- ## Matrix (which one should I use?)
16
-
17
- | Command | Pipeline | Worktree | Confirmation |
18
- |---|---|---|---|
19
- | `multi-agent "task"` | Full 6 phases | ✅ | ✅ (interactive) |
20
- | `multi-agent-autopilot "task"` | Full 6 phases | ✅ | ❌ |
21
- | `multi-agent-local "task"` | Full 6 phases | ❌ | ✅ |
22
- | **`multi-agent-local-autopilot "task"`** | **Full 6 phases** | **❌** | **❌** |
23
-
24
- Depth is a separate axis, asked at Phase 0 Step 7.5 rather than encoded in the command name: Full runs every phase above, Short runs Dev → Review → Test → Commit → Report. The two autopilot rows never ask and always run Full.
25
-
26
- ## What changes
27
-
28
- - The Phase 0 Step 6 worktree step is skipped (local contract)
29
- - The Phase 2 Plan Approval Gate is skipped (autopilot contract) - `state.autopilot === true`
30
- - The Phase 3 test prompt is skipped, Phase 4 commit/PR does not wait for confirmation
31
- - **v7.0.0+**: The Phase 2 safety classifier (`classify-plan-safety.mjs`) always runs; if the score is ≥ 50 it asks for a single manual confirmation even in autopilot (`prefs.global.autopilotSafetyGate`, default on)
32
-
33
- ## What is NEVER skipped
34
-
35
- - 🔴 Review blocking → Automatic fix + rebuild (max 3 retries)
36
- - 💥 Build fail → Automatic fix + rebuild (max 3 retries, then pause)
37
- - 🛡️ Safety classifier pause → manual confirmation when a high-risk plan is detected
38
- - ⚠️ Kill/Purge → Always asks for confirmation (destructive)
39
-
40
- ## Examples
41
-
42
- ```bash
43
- multi-agent-local-autopilot "PROJ-12345"
44
- multi-agent-local-autopilot https://github.com/org/repo/issues/316
45
- multi-agent-local-autopilot "LoginView dark mode fix"
46
- multi-agent-local-autopilot "#3"
47
- ```
48
-
49
- ## Delegation
50
-
51
- The orchestrator skill (`multi-agent/SKILL.md`) takes the `--local` + `"autopilot": true` state flags together. Contract: `refs/phases/phase-0-init.md` Step 6 (local branch) + `refs/phases/phase-1-plan.md` Step 5 (gate skip) + Step 5c (safety classifier, v7.0.0+).
52
-
53
- ## Required: outward-facing payload contracts
54
-
55
- Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.
@@ -1,51 +0,0 @@
1
- ---
2
- name: multi-agent-resume-local
3
- language: en
4
- description: "Continue already-done LOCAL work through the pipeline tail: Review (with its build gate) → Commit/PR → Report (technical analysis + Jira test-scenario comment). No dev phase. Use when local work is already done and only review, build, commit and reporting remain."
5
- user-invocable: true
6
- ---
7
-
8
- # multi-agent resume-local - Take Existing Branch Work Through the Pipeline Tail
9
-
10
- You already wrote (and maybe hand-tested) the change on the current branch, or committed it outside the pipeline entirely. `ship` picks up from there and runs the **pipeline tail** over that existing work in one command, without re-developing. (As of v14.0.0 a Short run reviews its own output, so this is for work with no pipeline run behind it.)
11
-
12
- ## Pipeline
13
-
14
- ```
15
- Phase 0: Init → project/branch detect, resolve base + diff (work already done), Jira id, state (NO worktree)
16
- Phase 3: Review → the Verify gate first (stack-aware build + existing tests; SUCCESS required), then
17
- parallel review (Fable + Opus + Sonnet) + Fable triage
18
- Phase 4: Commit → commit remaining changes + push + open PR if none exists
19
- Phase 5: Report → technical analysis + Jira comment with test scenarios (channels: Jira / PR / Confluence / Wiki)
20
- ```
21
-
22
- Phases 1-2 (Plan / Dev) are skipped by design - the branch's local diff IS the Phase 2 output. The build that Dev's exit gate would have run happens inside Review instead, because there is no Dev run to inherit a log from.
23
-
24
- ## When to use it
25
-
26
- - After a `:local` run answered Short (which skips Review + Test) to run the full quality tail on the same branch.
27
- - After hand-coding / hand-testing a change, to get review + build/test + PR + Jira write-up without re-running dev.
28
-
29
- ## When NOT to use it
30
-
31
- - Change not written yet → `multi-agent` / `multi-agent:local`.
32
- - Only the review → `multi-agent:review`; only report/channels → `multi-agent:channels`; only device UI test → `multi-agent:test` / `multi-agent:manual-test`.
33
-
34
- ## Input
35
-
36
- ```bash
37
- multi-agent resume-local # current branch vs base; Jira id from branch name
38
- multi-agent resume-local PROJ-12345 # explicit Jira id for the Phase 5 comment
39
- multi-agent resume-local --base develop # override base branch for the diff
40
- multi-agent resume-local autopilot # no gate prompts: auto-fix, auto-PR, auto-comment
41
- ```
42
-
43
- ## Notes
44
-
45
- - Build+Test is the automated success gate (not the interactive device user-test - that is `multi-agent:manual-test`). If the repo has no tests, it reports "no tests present" - never fabricates results.
46
- - Commit/PR follows house rules: conventional message, `Ref: #N` (never Closes/Fixes), NO AI/bot attribution. PR opened only if one does not already exist.
47
- - Full phase contract lives in the Claude Code command `commands/multi-agent/ship/SKILL.md`; this skill is the Copilot-CLI counterpart.
48
-
49
- ## Required: outward-facing payload contracts
50
-
51
- Before writing anything outward-facing - PR body, Jira comment, Confluence page, closing report - load `$HOME/.claude/multi-agent-refs/payload-contracts.md`. It names the canonical section set for each payload, the markup dialect per surface (PR body is Markdown, Jira is wiki markup - mixing them is a defect), and the token/duration numbers the closing report must carry. Improvising a payload shape from memory is the most common failure of the short modes.