@mmerterden/multi-agent-pipeline 10.9.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/pipeline/commands/multi-agent/channels.md +42 -6
  5. package/pipeline/commands/multi-agent/finish.md +15 -6
  6. package/pipeline/commands/multi-agent/generate.md +34 -0
  7. package/pipeline/commands/multi-agent/help.md +10 -0
  8. package/pipeline/commands/multi-agent/manual-test.md +9 -2
  9. package/pipeline/commands/multi-agent/refs/channels/pr.md +1 -1
  10. package/pipeline/commands/multi-agent/refs/cross-cli-contract.md +7 -6
  11. package/pipeline/commands/multi-agent/refs/generate-issue.md +267 -0
  12. package/pipeline/commands/multi-agent/refs/keychain.md +12 -0
  13. package/pipeline/commands/multi-agent/refs/phases/phase-0-init.md +31 -2
  14. package/pipeline/commands/multi-agent/refs/phases/phase-3-dev.md +2 -0
  15. package/pipeline/commands/multi-agent/refs/phases/phase-4-review.md +2 -0
  16. package/pipeline/commands/multi-agent/refs/phases/phase-5-test.md +6 -1
  17. package/pipeline/commands/multi-agent/refs/phases/phase-7-report.md +5 -1
  18. package/pipeline/commands/multi-agent/refs/progress-contract.md +1 -0
  19. package/pipeline/commands/multi-agent/refs/tracker-contract.md +56 -13
  20. package/pipeline/commands/multi-agent/resume.md +6 -2
  21. package/pipeline/commands/multi-agent/sync.md +9 -9
  22. package/pipeline/commands/multi-agent.md +2 -0
  23. package/pipeline/lib/figma-mcp-refresh.sh +79 -0
  24. package/pipeline/preferences-template.json +2 -1
  25. package/pipeline/schemas/prefs.schema.json +11 -0
  26. package/pipeline/scripts/fixtures/install-layout.tsv +6 -6
  27. package/pipeline/scripts/phase-tracker.sh +134 -22
  28. package/pipeline/scripts/smoke-channels-approval-gate.sh +60 -0
  29. package/pipeline/scripts/smoke-generate-issue.sh +119 -0
  30. package/pipeline/scripts/smoke-phase-tracker.sh +69 -0
  31. package/pipeline/scripts/smoke-progress-contract.sh +9 -0
  32. package/pipeline/scripts/smoke-tasklist-ordering.sh +1 -0
  33. package/pipeline/scripts/smoke-token-preflight.sh +82 -0
  34. package/pipeline/scripts/smoke-tracker-contract.sh +62 -0
  35. package/pipeline/skills/.skills-index.json +13 -4
  36. package/pipeline/skills/shared/core/multi-agent/SKILL.md +2 -1
  37. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +4 -2
  38. package/pipeline/skills/shared/core/multi-agent-generate/SKILL.md +51 -0
  39. package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +2 -0
  40. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +5 -5
  41. package/pipeline/skills/skills-index.md +4 -3
package/CHANGELOG.md CHANGED
@@ -14,6 +14,176 @@ Internal file-layout changes that don't affect the slash-command surface are sti
14
14
 
15
15
  ---
16
16
 
17
+ ## [11.0.0] - 2026-07-07
18
+
19
+ Breaking: the two issue creators `generate-task` and `generate-bug` are merged
20
+ into a single `generate` command. The command surface shrinks from 37 to 36
21
+ commands, so this is a major bump per the versioning policy (a renamed/removed
22
+ command is a breaking surface change).
23
+
24
+ - **New `/multi-agent:generate`** asks the issue type (Task / Bug / Story) at the
25
+ start of every run, then mines the project's recent same-type issues for
26
+ conventions and drafts the issue.
27
+ - **Standard template baseline with auto-sizing.** Each type has a fixed section
28
+ skeleton (Task/Story: Detailed Description, Scope, Acceptance Criteria, Test
29
+ Scenarios; Bug: Detailed Description, Steps to Reproduce, Expected/Actual
30
+ Result, Environment). Conditional sections (Design Reference, API Contract /
31
+ Swagger, Screenshots, Notes) render only when their trigger is present - no
32
+ empty placeholder headings, nothing invented.
33
+ - **Test Scenarios pulled from Jira convention.** Detects linked Xray/Zephyr test
34
+ issues or a dominant test-scenario heading style and reuses it; falls back to an
35
+ AC-derived skeleton the user edits.
36
+ - **Swagger / API Contract section.** When a Swagger/OpenAPI URL or contract is
37
+ given, fetches only the referenced endpoints (method + path + key fields) and
38
+ links the spec. No full-spec crawl; failures degrade to link-only.
39
+ - **Removed** `generate-task` and `generate-bug` on both CLIs (Claude Code +
40
+ Copilot) and the plugin skill set. The shared `refs/generate-issue.md` flow is
41
+ now 12 steps with a dedicated type-selection step; the hard approval gate is
42
+ unchanged.
43
+
44
+ ## [10.12.0] - 2026-07-06
45
+
46
+ Two trust upgrades: every external channel post now shows a plan-mode-style
47
+ preview + approval gate before anything is written (autopilot posts directly),
48
+ and Phase 0 gains a proactive token expiry pre-flight with silent Figma MCP
49
+ renewal via OAuth refresh grant.
50
+
51
+ ### Added
52
+
53
+ - **Channels Step 6 body preview + approval gate** (dispatch → Step 7,
54
+ summary → Step 8) - interactive runs render
55
+ every selected channel's final body (PR description, Jira comment,
56
+ Confluence page, Wiki, Board move, GitHub issue comment) and ask
57
+ Approve & post / Edit (loop) / Skip channels / Cancel before dispatch.
58
+ Bypassed only by autopilot and `--dry-run`. What is posted is byte-identical
59
+ to the approved preview; regeneration after approval re-runs the gate.
60
+ Phase 7 Step 1.5 (issue comment + progress flags) routes through the same
61
+ gate. Contract: `smoke-channels-approval-gate.sh`.
62
+ - **Phase 0 Step 0.7 token expiry pre-flight** - probes every token the run
63
+ will need (jira/github/bitbucket/confluence/figma/figma_mcp) with one cheap
64
+ call each (cached via `serviceStatus`, TTL 300s) and resolves expiry AT INIT
65
+ instead of on the first mid-run 401. Figma MCP is the critical path: silent
66
+ renewal first, then an init-time question (Regenerate now via script / Save
67
+ Flow / Continue degraded). Autopilot never prompts - silent renewal or
68
+ logged degrade. Contract: `smoke-token-preflight.sh`.
69
+ - **`lib/figma-mcp-refresh.sh`** - silent Figma MCP (`figu_`) renewal via
70
+ OAuth refresh grant: reads `<key>_Refresh` from the Keychain + client
71
+ credentials from the `.figma-oauth.json` next to
72
+ `prefs.global.tokenScripts.figma_mcp`, saves the new access (and rotated
73
+ refresh) token back. Status lines only - token values never printed.
74
+ Live-verified end-to-end (renewed + mcp.figma.com probe 200).
75
+ - **`prefs.global.tokenScripts`** (schema + template) - maps service ids to
76
+ user-owned token generation scripts; personal paths stay in the local
77
+ preferences file, never in synced command files.
78
+ - **keychain.md Figma MCP lifecycle section** - refresh-entry convention,
79
+ silent-renewal-first rule, generation-script escalation, init cross-ref.
80
+
81
+ ### Fixed
82
+
83
+ - Copilot parity catch-ups the 10.11.0 sweep missed: `multi-agent-sync/SKILL.md`
84
+ inventory 35 -> 37 + list, `multi-agent-help/SKILL.md` generator entries
85
+ (EN + TR), `multi-agent-channels/SKILL.md` flow now includes the approval
86
+ gate (steps 6-8). `smoke-generate-issue.sh` now asserts the SKILL-side
87
+ counts too.
88
+ - `figma-mcp-refresh.sh` form fields sent via `--data-urlencode` (robust to
89
+ special characters in tokens); re-verified live.
90
+
91
+ ## [10.11.0] - 2026-07-06
92
+
93
+ Jira issue generators: `/multi-agent:generate-task` and `/multi-agent:generate-bug` create standards-compliant Jira issues by learning the target project's own conventions before drafting, with a hard preview + approval gate before anything is created.
94
+
95
+ ### Added
96
+
97
+ - **`/multi-agent:generate-task` + `/multi-agent:generate-bug`** - one-shot
98
+ Jira issue creators (no worktree, no commits, no pipeline chaining). Inputs:
99
+ optional free-text description + optional Figma URL; both asked
100
+ interactively when missing.
101
+ - **Convention mining** - samples the project's 30 most recent same-type
102
+ issues (JQL) and adopts the team's summary prefix pattern, dominant
103
+ description heading set, top labels/components, and priority norm.
104
+ createmeta discovery surfaces required custom fields (allowedValues become
105
+ picker options) and detects Sprint/Epic/Team fields generically by
106
+ `schema.custom` id.
107
+ - **Active-sprint placement** - Agile REST board + `sprint?state=active`
108
+ detection; the user chooses active sprint vs backlog. Sprint assignment
109
+ happens post-create via `POST /rest/agile/1.0/sprint/{id}/issue`
110
+ (field-id-agnostic). No board / no active sprint degrades to backlog with
111
+ an explicit note.
112
+ - **Hard approval gate** - a full draft preview (every field + complete
113
+ description) renders before create; Approve / Edit (loop) / Cancel. The
114
+ gate has no bypass: no autopilot variant exists for these commands.
115
+ Genuinely unknown fields (component, epic, priority, labels, assignee,
116
+ sprint, required customs, missing Bug repro/environment) are asked, never
117
+ invented.
118
+ - **Figma context (optional)** - the 3-tier chain (MCP -> REST PAT -> user
119
+ screenshot) resolves frame name + node id for a Design Reference section,
120
+ a remote link on the created issue, and an opt-in screenshot attachment.
121
+ Standalone command, so MCP use is allowed (analysis-class); Figma failures
122
+ never block issue creation.
123
+ - **Language rule** - issue summary + description follow
124
+ `prefs.global.outputLanguage` (intentional exception to the
125
+ external-payloads-English default; the issue is authored for the user's
126
+ team). Documented in both command files and the shared ref.
127
+ - **Shared flow ref** `refs/generate-issue.md` - single 11-step contract
128
+ consumed by both commands via profile blocks (`ISSUE_TYPE`, default
129
+ sections, JQL filter); UTF-8 verbatim POST path (`jq --rawfile` +
130
+ `--data-binary @file`) and humanizer pass reused from the Jira channel
131
+ adapter.
132
+ - **Smoke gate** `smoke-generate-issue.sh` - 66 assertions: file/frontmatter
133
+ presence, profile declarations, approval-gate markers, endpoint markers,
134
+ UTF-8 path, section vocabulary, 37-command count consistency across
135
+ dispatcher/contract/sync/help, forbidden-string scan.
136
+
137
+ ### Changed
138
+
139
+ - Command inventory 35 -> 37 across `cross-cli-contract.md`, `sync.md`,
140
+ dispatcher routing/loading tables, `help.md` (EN + TR), README.
141
+
142
+ ## [10.10.0] - 2026-07-03
143
+
144
+ Live tracker UX: per-tile cost, a real "currently doing X" line, and tracker continuity across the local-test handover. Shaped by a market sweep of 2026 agent-UX practice (transparency-first live status; per-step cost visibility).
145
+
146
+ ### Added
147
+
148
+ - **`phase-tracker.sh now <N> "<text>"`** - dedicated live current-action
149
+ line for the active phase (quiet: writes `meta.Now`, never renders, 60-char
150
+ cap). The bordered card shows it as `Now: <text>` under the active tile.
151
+ - **`phase-tracker.sh cost <N>|total`** - single pricing implementation
152
+ (cost-table.json rates, cached tokens at the discounted cacheRead rate,
153
+ floored to cents; `-` when unpriceable). The completion narration line,
154
+ the card, and finish's summary all reuse it - no more inline USD math.
155
+ - **Per-tile est. USD + cached footer on the bash card.** Tiles render
156
+ `<elapsed> · <tok> tok · ~$<usd>` when the phase has a priced model; the
157
+ footer adds total USD and cached tokens. Render survives a missing cost
158
+ table. Tiles now sort by numeric phase id so continuation sets stay ordered.
159
+ - **Progress-line mirror rule** (tracker-contract "Active phase" +
160
+ progress-contract cross-link): every normal-tier `→ verb object` line is
161
+ mirrored to the active phase - `TaskUpdate activeForm` on Claude Code,
162
+ `now` elsewhere - so the tracker always answers "what is it doing right
163
+ now". Throttled: canonical lines only, dedupe, no renders.
164
+ - **Completion tile suffix (Claude Code):** on phase completion the tile
165
+ subject gains the spend (`Phase 3: Dev · ~35k tok · ~$0.58`); subject edits
166
+ do not reorder tiles.
167
+ - **Tracker continuity across the local-test handover.** Phase 5 and
168
+ `/multi-agent:manual-test` mark the waiting state
169
+ (`now 5 "awaiting local test (user)"`); `/multi-agent:finish` now runs
170
+ load-or-continue instead of an unconditional `init` - prior phase 0-3
171
+ history (elapsed, tokens, USD) survives, Phase 5 is closed with a Result
172
+ meta, the Claude Code TaskList is rebuilt from state, and one line
173
+ summarizes the inherited history (`Continuing <id>: phases 0-3 finished
174
+ earlier (12m, 38.4k tok, ~$0.74)`). `add` is idempotent to make this safe.
175
+ - **`/multi-agent:resume` rebuilds the phase tiles** from `tracker-state.json`
176
+ (the contract documented it; the command now actually does it).
177
+ - **Phase 0 + 7 token forwarding**: the clarifier call and the Phase 7 report
178
+ compose call forward tokens to the tracker, completing all 8 tiles.
179
+
180
+ ### Fixed
181
+
182
+ - Tracker doc drift: the `tokens` action's 4th `[cached]` arg and the `model`
183
+ action are now documented in the contract and the script usage text.
184
+
185
+ ---
186
+
17
187
  ## [10.9.0] - 2026-07-03
18
188
 
19
189
  ### Added
package/README.md CHANGED
@@ -63,7 +63,7 @@ The discipline behind all of this — bounded loops, evidence gates, token-budge
63
63
  | Local | `/multi-agent:local "task"` | Full pipeline, current branch (no worktree) |
64
64
  | Finish | `/multi-agent:finish` | Run the review→test→commit→report tail over local work |
65
65
 
66
- Helpers: `setup`, `status`, `resume #N`, `review`, `test`, `channels`, `stack`, `update`, `sync`, `jira`, `issue`, `analysis`. Full list: `/multi-agent:help`.
66
+ Helpers: `setup`, `status`, `resume #N`, `review`, `test`, `channels`, `stack`, `update`, `sync`, `jira`, `issue`, `analysis`, `generate-task`, `generate-bug`. Full list: `/multi-agent:help`.
67
67
 
68
68
  ## Stacks
69
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmerterden/multi-agent-pipeline",
3
- "version": "10.9.0",
3
+ "version": "11.0.0",
4
4
  "description": "8-phase AI development pipeline with full orchestration on Claude Code and Copilot CLI. Analysis, planning, TDD, CLI-aware parallel review with consensus surfacing + Fable triage, default-FAIL evidence gates, secret + intent guards, per-phase cost ledger, persistent learnings memory, wiki generation, commit automation. Token-preserving uninstall.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -34,7 +34,7 @@ Target resolution is identical to the pre-existing enrich flow - any of the 6
34
34
 
35
35
  ## Flow
36
36
 
37
- `resolve target → fetch context → menu (or flags) → generator → humanizer → dispatch → summary`. Channels: Jira comment, Confluence page, Wiki pages, PR description, Board status (GitHub Projects v2).
37
+ `resolve target → fetch context → menu (or flags) → generator → humanizer → approval → dispatch → summary`. Channels: Jira comment, Confluence page, Wiki pages, PR description, Board status (GitHub Projects v2).
38
38
 
39
39
  ### Step 1 - Target resolution
40
40
 
@@ -49,7 +49,7 @@ Target resolution is identical to the pre-existing enrich flow - any of the 6
49
49
 
50
50
  **Multi-repo:** when `agent-state.json` `projects[].length > 1`, Step 1 builds **one target per project**. Each project's PR is resolved via `pr` field in its projects[] entry; if missing, the Jira/Issue link query returns multiple PRs (one per repo) - all are added to `targets[]`. The project at `projects[0]` (or whose name matches `state.project`) is marked `isPrimary: true`; others are `isPrimary: false`.
51
51
 
52
- For single-repo tasks, `targets` has exactly one entry. The rest of the flow is target-aware: Step 5 generates one body, Step 6 dispatches to each target, with cross-links (see below).
52
+ For single-repo tasks, `targets` has exactly one entry. The rest of the flow is target-aware: Step 5 generates one body, Step 7 dispatches to each target, with cross-links (see below).
53
53
 
54
54
  ### Step 2 - Context source detection
55
55
 
@@ -298,9 +298,44 @@ Generated by `pipeline/scripts/render-cost-summary.sh <task-id>` using prices fr
298
298
 
299
299
  **Target length rule:** full body fits one screen on a typical laptop (< 80 lines). Auto-diff summary capped at 5 lines per section. No framework-theory paragraphs, no numbered "why this approach" lists.
300
300
 
301
- ### Step 6 - Channel dispatch
301
+ ### Step 6 - Body preview + approval gate (interactive modes)
302
302
 
303
- For each selected **channel**, call the corresponding adapter. Adapters run **in parallel** - one failure does not block others.
303
+ Plan-mode-style gate: the user sees exactly what will be posted BEFORE any external write. Runs after the generator + humanizer, before Step 7 dispatch, in every interactive invocation - menu mode AND `--channels`/`--content` flag mode alike (flags pick the targets, they do not waive the content approval).
304
+
305
+ Skipped in exactly two cases:
306
+
307
+ | Case | Why |
308
+ |---|---|
309
+ | Autopilot (`state.autopilot === true` or `MULTI_AGENT_AUTOPILOT=1`) | Explicit consent for side-effect creation - posts directly with prefs/flag selections, zero interaction |
310
+ | `--dry-run` | Already prints without posting; a question would be redundant |
311
+
312
+ **Preview render** (one block per selected channel, final body after humanizer - shown in readable Markdown, channel-specific markup conversion happens after approval):
313
+
314
+ ```
315
+ ── PR description ({repoName} #{prNumber}, replace) ─────────
316
+ {body}
317
+ ── Jira comment ({jiraId}) ──────────────────────────────────
318
+ {body}
319
+ ── Confluence page ("{title}" under {parentUrl}) ────────────
320
+ {body}
321
+ ```
322
+
323
+ Secondary artifacts ride along as one-line intents at the bottom of the preview: Wiki page list, wiki → Jira triad comment (when Wiki is selected and the triad is active per `refs/issue-jira-triad.md`), Board status move (`{from} → {to}`), GitHub issue comment + Progress-flag sync (Phase 7 Step 1.5 - same gate, see `refs/phases/phase-7-report.md`).
324
+
325
+ **Then a single AskUserQuestion** (`question`/`description` in `outputLanguage`; `label`/`header` English):
326
+
327
+ | Option | Behavior |
328
+ |---|---|
329
+ | `Approve & post` | Step 7 dispatches every previewed body verbatim |
330
+ | `Edit` | Free-text "which channel, what should change" → apply → re-render the FULL preview → re-ask (loop, no cap) |
331
+ | `Skip channels` | multiSelect which channels to drop this run → re-render remaining → re-ask |
332
+ | `Cancel` | Abort dispatch entirely - nothing posted anywhere. Internal capture (agent-log, knowledge) is unaffected |
333
+
334
+ **Hard rule:** what is posted is byte-identical to the approved preview (markup conversion excepted). Any body regeneration after approval invalidates the approval and re-runs the gate. Persisting channel prefs (Step 8) still happens on `Cancel` - selection memory and content approval are independent.
335
+
336
+ ### Step 7 - Channel dispatch
337
+
338
+ For each selected **channel**, call the corresponding adapter. Adapters run **in parallel** - one failure does not block others. Dispatch NEVER starts before the Step 6 gate resolves (`Approve & post`), except in the two documented skip cases (autopilot, `--dry-run`).
304
339
 
305
340
  **Multi-repo dispatch:** When `state.projects[].length > 1`, the dispatcher delegates per-channel rendering to `~/.claude/lib/channels-multi-repo.sh`:
306
341
 
@@ -358,7 +393,7 @@ Full contract: [`refs/channels/confluence.md`](refs/channels/confluence.md) -
358
393
 
359
394
  Full contract: [`refs/channels/wiki.md`](refs/channels/wiki.md) - all four `figma-config.wiki.mode` adapters (submodule / in-repo / github-wiki / separate-repo), full Case A scope menu, screenshot quadrant gate.
360
395
 
361
- ### Step 7 - Summary
396
+ ### Step 8 - Summary
362
397
 
363
398
  After all adapters complete (or fail non-blocking):
364
399
 
@@ -397,6 +432,7 @@ Persist selections to `prefs.global.reportChannels` + `prefs.global.reportConten
397
432
  - **No markers** - channels does a full replace each run; no `<!-- channels:start -->` bookmarks.
398
433
  - **Every body item references a symbol/file/line** from diff or pipeline log. No generic "tested the feature" sentences.
399
434
  - **Adapter failures are non-blocking** - one channel failing does not abort others. Final summary shows per-adapter status.
435
+ - **Approval before post** - interactive runs never write to an external channel without the Step 6 preview + approval. Autopilot and `--dry-run` are the only bypasses.
400
436
 
401
437
  ## Error handling
402
438
 
@@ -423,7 +459,7 @@ Phase 7 invokes this command internally instead of running its own inline Jira/C
423
459
 
424
460
  Phase 7 passes a runtime state bundle: `{jiraId, prUrl, remoteType, taskType, figmaConfig, agentState, pipelineLogPath}`. `channels` reads these directly, skips target-resolution Step 1.
425
461
 
426
- **Autopilot contract:** Phase 7 ALWAYS pauses at the channels menu (breaks generic autopilot zero-interaction). 30-min timeout → session ends cleanly, task resumable via `/multi-agent:resume`. See `refs/phases/modes.md` for full contract.
462
+ **Autopilot contract:** Phase 7 ALWAYS pauses at the channels menu (breaks generic autopilot zero-interaction). 30-min timeout → session ends cleanly, task resumable via `/multi-agent:resume`. See `refs/phases/modes.md` for full contract. The Step 6 body preview + approval gate follows the same split: interactive runs approve the composed bodies before dispatch; autopilot posts directly after the menu resolves.
427
463
 
428
464
  ## Cross-CLI parity
429
465
 
@@ -65,25 +65,34 @@ Phases 1-3 (Analysis / Planning / Dev) are skipped by design - `finish` treats
65
65
 
66
66
  ## Required: Phase Tracker Contract
67
67
 
68
- **The phase tracker is mandatory.** Full spec: [`refs/tracker-contract.md`](./refs/tracker-contract.md). `finish` registers only its active phase set - `0:Init 4:Review 5:Build+Test 6:Commit 7:Report` (phases 1-3 are not part of the finish set; do not register tiles for them).
68
+ **The phase tracker is required.** Full spec: [`refs/tracker-contract.md`](./refs/tracker-contract.md). `finish` registers its active phase set - `0:Init 4:Review 5:Build+Test 6:Commit 7:Report` - but NEVER resets a tracker that an earlier run already built (load-or-continue; contract section "Continuation runs"):
69
69
 
70
70
  ```bash
71
- # Phase 0, first shell call (every CLI):
72
- bash $HOME/.claude/scripts/phase-tracker.sh init "$TASK_ID"
71
+ # Phase 0, first shell call (every CLI). init ONLY when no prior state exists -
72
+ # a task handed off from Phase 5 ("awaiting local test") keeps its full
73
+ # phase 0-3 history (elapsed, tokens, USD).
74
+ STATE="$HOME/.claude/logs/multi-agent/${TASK_ID}/tracker-state.json"
75
+ if [ ! -f "$STATE" ]; then
76
+ bash $HOME/.claude/scripts/phase-tracker.sh init "$TASK_ID"
77
+ fi
73
78
  for p in "0:Init" "4:Review" "5:Build+Test" "6:Commit" "7:Report"; do
74
- bash $HOME/.claude/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}"
79
+ bash $HOME/.claude/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}" # idempotent: existing phases keep their history
75
80
  done
76
81
  bash $HOME/.claude/scripts/phase-tracker.sh update 0 in_progress
77
82
 
78
83
  # Every phase boundary (every CLI):
79
84
  bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|failed|skipped
80
85
  # After every LLM call (every CLI):
81
- bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out>
86
+ bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
82
87
  ```
83
88
 
89
+ **Continuation path (prior state existed):** (1) if Phase 5 was left `in_progress` with `Now: awaiting local test (user)`, mark it `update 5 completed` + `meta 5 Result "local test done (user)"` before finish's own work (finish re-opens it with `update 5 in_progress` when its Build+Test 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`.
90
+
84
91
  ### Visual channel - Claude Code (native TaskList widget, required)
85
92
 
86
- Register one tile per phase in **strict creation 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: `refs/tracker-contract.md` "TaskCreate ordering (strict)".
93
+ 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: `refs/tracker-contract.md` "TaskCreate ordering (strict)".
94
+
95
+ 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".
87
96
 
88
97
  ### Visual channel - Copilot CLI / plain shell
89
98
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: "Create a standards-compliant Jira issue (Task / Bug / Story): asks the type, mines project conventions, drafts from a standard template with auto-sizing sections, full preview + explicit approval before create."
3
+ argument-hint: "[\"<free-text description>\"] [figma-url] [swagger-url] - all optional, asked interactively when missing"
4
+ ---
5
+
6
+ # multi-agent generate - Standards-Compliant Jira Issue Creator
7
+
8
+ **Input**: $ARGUMENTS
9
+
10
+ Creates exactly one Jira issue, and only after explicit approval. The issue type (Task / Bug / Story) is asked at the start of every run. No branches, no commits, no worktrees, no pipeline chaining. The draft learns the target project's conventions from its recent same-type issues (summary format, labels, components, priority norms, test-scenario style) and offers active-sprint placement when a sprint is running.
11
+
12
+ > **Language**: instruction prose here is English. AskUserQuestion `question`/`description` and the issue content (summary + description) follow `prefs.global.outputLanguage` - an intentional exception to the "external payloads stay English" default, because the issue is authored for the user's team. `label`/`header` stay English.
13
+
14
+ ## Issue types
15
+
16
+ Type is chosen at step [3/11] via AskUserQuestion (never inferred silently). Each type has a standard template baseline; sections auto-size (see `refs/generate-issue.md` for the full A/C matrix and inclusion rules).
17
+
18
+ | Type | Always-present sections | Conditional sections (included only when their trigger is present) |
19
+ |---|---|---|
20
+ | `Task` | Detailed Description, Scope, Acceptance Criteria, Test Scenarios | API Contract / Swagger, Design Reference, Screenshots, Notes |
21
+ | `Bug` | Detailed Description, Steps to Reproduce, Expected Result, Actual Result, Environment | Screenshots / Logs, Regression / Test Scenario, API Contract, Design Reference, Notes |
22
+ | `Story` | User Story, Detailed Description, Scope, Acceptance Criteria, Test Scenarios | API Contract / Swagger, Design Reference, Screenshots, Dependencies / Notes |
23
+
24
+ ## Flow
25
+
26
+ Read `$HOME/.claude/commands/multi-agent/refs/generate-issue.md` and execute the 11-step shared flow. Non-negotiables restated:
27
+
28
+ - Ask the user (AskUserQuestion) for the issue type first, then about every genuinely unknown field - component, epic, priority, labels, assignee, sprint vs backlog, required custom fields.
29
+ - A conditional section renders only when its trigger is present (Figma URL, pasted screenshot/log, Swagger URL/contract, real Notes content). No empty placeholder headings; content the user did not supply and mining could not derive is never invented.
30
+ - Step [8/11] full preview + approval gate always runs. `Approve` / `Edit` (loop) / `Cancel`. No bypass exists.
31
+
32
+ ## Error paths
33
+
34
+ See `refs/generate-issue.md` Error paths. No command-specific additions.
@@ -111,6 +111,7 @@ Post-Hoc & Side-Channel:
111
111
  /multi-agent:analysis ["analysis-name"] Feature-spec analysis (Figma + Swagger + Confluence + repos) → per-platform v3 doc (23-section Full / 7-section Lite)
112
112
  /multi-agent:analysis-resolve [doc] Resolve Section 20 open questions of an analysis doc, one at a time with source-labeled candidates
113
113
  /multi-agent:build-optimize iOS-only Xcode build perf wrapper → benchmark + analyze + recommend-first .build-benchmark/optimization-plan.md
114
+ /multi-agent:generate ["desc"] [figma-url] [swagger-url] Create a Jira Task/Bug/Story matching team conventions (asks type + mining + active sprint + auto-sizing sections + preview & approval)
114
115
  /multi-agent:diff-explain Map a Phase 4 triage finding back to specific diff lines
115
116
  /multi-agent:search Cross-task log search with smart ranking; --semantic queries triage corpus
116
117
  /multi-agent:scan Skill security scan against tiered pattern catalog
@@ -220,6 +221,10 @@ Examples:
220
221
  # Review current diff only
221
222
  /multi-agent:review
222
223
 
224
+ # Create a Jira issue that matches team conventions (preview + approval before create)
225
+ /multi-agent:generate "Profile screen empty state" https://figma.com/design/abc?node-id=1-2
226
+ /multi-agent:generate "Login crash on iOS 17, see attached log"
227
+
223
228
  ------------------------------------------------------------
224
229
 
225
230
  Logs: $HOME/.claude/logs/multi-agent/{project}/{task-id}/
@@ -318,6 +323,7 @@ Post-Hoc & Side-Channel:
318
323
  /multi-agent:analysis ["analysis-name"] Feature-spec analizi (Figma + Swagger + Confluence + repolar) → platform başına v3 doküman (23 bölüm Full / 7 bölüm Lite)
319
324
  /multi-agent:analysis-resolve [doc] Analiz dokümanının Bölüm 20 açık sorularını kaynak etiketli adaylarla teker teker çözer
320
325
  /multi-agent:build-optimize iOS-only Xcode build performance wrapper → benchmark + analiz + recommend-first .build-benchmark/optimization-plan.md
326
+ /multi-agent:generate ["açıklama"] [figma-url] [swagger-url] Takım standartlarına uygun Jira Task/Bug/Story oluştur (tip sorar + convention mining + aktif sprint + auto-sizing bölümler + önizleme & onay)
321
327
  /multi-agent:diff-explain Phase 4 triage bulgusunu diff satırlarına eşle
322
328
  /multi-agent:search Task log'larında akıllı arama; --semantic triage corpus'unu sorgular
323
329
  /multi-agent:scan Skill güvenlik taraması (tiered pattern catalog)
@@ -427,6 +433,10 @@ Quality & Telemetry (advisory, default açık - prefs.global.* ile kapatılabi
427
433
  # Sadece mevcut diff'i review et
428
434
  /multi-agent:review
429
435
 
436
+ # Takım standartlarına uygun Jira issue oluştur (oluşturmadan önce önizleme + onay)
437
+ /multi-agent:generate "Profil ekranı empty state" https://figma.com/design/abc?node-id=1-2
438
+ /multi-agent:generate "iOS 17'de login crash, log ekte"
439
+
430
440
  ------------------------------------------------------------
431
441
 
432
442
  Log'lar: $HOME/.claude/logs/multi-agent/{project}/{task-id}/
@@ -22,6 +22,13 @@ Lets you switch to the task branch for manual testing in Xcode before the PR is
22
22
  git checkout {branch-name}
23
23
  ```
24
24
 
25
+ Then mark the tracker as waiting (this CONTINUES the task's existing `tracker-state.json`; never `init` here - see `refs/tracker-contract.md` "Continuation runs"). On Claude Code in a fresh session, first rebuild the TaskList from state per the same contract:
26
+ ```bash
27
+ bash $HOME/.claude/scripts/phase-tracker.sh update 5 in_progress
28
+ bash $HOME/.claude/scripts/phase-tracker.sh now 5 "awaiting local test (user)"
29
+ bash $HOME/.claude/scripts/phase-tracker.sh render
30
+ ```
31
+
25
32
  4. **Tell the user how to test**:
26
33
  ```
27
34
  🧪 Switched to branch: {branch-name}
@@ -39,5 +46,5 @@ Lets you switch to the task branch for manual testing in Xcode before the PR is
39
46
  5. **Wait for the user's reply**
40
47
 
41
48
  6. **Branch on the answer**:
42
- - **OK** → recreate the worktree, continue to Phase 6
43
- - **Fix needed** → recreate the worktree, apply the fix
49
+ - **OK** → `phase-tracker.sh update 5 completed` + `phase-tracker.sh meta 5 Result "local test passed (user)"`, recreate the worktree, continue to Phase 6
50
+ - **Fix needed** → `phase-tracker.sh now 5 "applying fix: <summary>"`, recreate the worktree, apply the fix
@@ -120,7 +120,7 @@ Single-repo tasks return one entry from `channels-multi-repo.sh targets ...` wit
120
120
  The Bitbucket REST API returns `409 Conflict` if `version` is stale. Adapter behaviour:
121
121
 
122
122
  1. Refetch PR JSON, retry the PUT once with the new `version`.
123
- 2. Second mismatch → fail this adapter, log reason, return `{status: "failed", reason: "version conflict"}`. Other adapters keep running - non-blocking by Step 6 contract.
123
+ 2. Second mismatch → fail this adapter, log reason, return `{status: "failed", reason: "version conflict"}`. Other adapters keep running - non-blocking by Step 7 contract.
124
124
 
125
125
  ## Flags that affect this adapter
126
126
 
@@ -6,19 +6,20 @@
6
6
 
7
7
  ---
8
8
 
9
- ## 1. Command Inventory (35 commands)
9
+ ## 1. Command Inventory (36 commands)
10
10
 
11
11
  ```
12
12
  analysis, analysis-resolve, autopilot, build-optimize, channels, delete, dev,
13
13
  dev-autopilot, dev-local, dev-local-autopilot, diff-explain, finish, garbage-collect,
14
- help, issue, jira, kill, language, local, local-autopilot, log, manual-test,
15
- prune-logs, purge, refactor, resume, review, scan, search, setup, stack, status,
16
- sync, test, update
14
+ generate, help, issue, jira, kill, language, local,
15
+ local-autopilot, log, manual-test, prune-logs, purge, refactor, resume, review,
16
+ scan, search, setup, stack, status, sync, test, update
17
17
  ```
18
18
 
19
19
  Categories:
20
20
 
21
21
  - **Interactive pickers** (single-purpose, not modes): `jira`, `issue`
22
+ - **Issue generator** (one-shot, no worktree, asks type Task/Bug/Story, hard approval gate before create): `generate`
22
23
  - **Full 8-phase modes**: `autopilot`, `local`, `local-autopilot`
23
24
  - **Fast modes** (Init -> Dev(Opus) -> Commit -> Report): `dev`, `dev-autopilot`, `dev-local`, `dev-local-autopilot`
24
25
  - **Tail modes** (run the pipeline tail over already-done local work): `finish`
@@ -29,7 +30,7 @@ Categories:
29
30
 
30
31
  ### 1.1 Figma component subphase skills
31
32
 
32
- In addition to the 35 top-level multi-agent commands, the figma-to-component pipeline ships platform-specific skills that multi-agent dispatches from Phase 3 (see `refs/component-dispatch.md`). The structure is **platform-parallel iOS + Android with a shared common pool**:
33
+ In addition to the 36 top-level multi-agent commands, the figma-to-component pipeline ships platform-specific skills that multi-agent dispatches from Phase 3 (see `refs/component-dispatch.md`). The structure is **platform-parallel iOS + Android with a shared common pool**:
33
34
 
34
35
  | Location | Skill count | Purpose |
35
36
  |---|---|---|
@@ -311,7 +312,7 @@ For clipboard ops, callers still gate with `if command -v pbpaste >/dev/null; th
311
312
 
312
313
  This contract is validated by:
313
314
 
314
- - `smoke-cross-cli-behavior.sh` - asserts all 35 commands behave identically, pulls from Section 2 (placeholder vocab), Section 5 (argument parsing), Section 6 (output formats); also regression-locks the 6-persona agent deployment
315
+ - `smoke-cross-cli-behavior.sh` - asserts all 36 commands behave identically, pulls from Section 2 (placeholder vocab), Section 5 (argument parsing), Section 6 (output formats); also regression-locks the 6-persona agent deployment
315
316
  - `smoke-commands-skills-parity.sh` (50 assertions) - enforces colon-form command ↔ dash-form skill directory parity
316
317
  - `smoke-compliance-skills.sh` (45 assertions) - enforces store-compliance skill catalog + 4 consumer wiring
317
318
  - `smoke-personal-data.sh` - extended in 0.5.5 to treat deprecated placeholders (`{github-username}`, `{your-website}`, `{website-repo}`) as leaks; adds `mmerterden` to public-handle blocklist for generic docs