@mmerterden/multi-agent-pipeline 20.30.0 → 20.34.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.
- package/CHANGELOG.md +123 -0
- package/README.md +47 -1
- package/README.tr.md +61 -1
- package/docs/adr/0018-cross-repo-links-not-a-global-graph.md +43 -0
- package/docs/adr/README.md +2 -1
- package/docs/facts.json +6 -5
- package/docs/features.md +1 -1
- package/install/_dev-only-files.mjs +1 -0
- package/install/_unattended-profile.mjs +61 -0
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +16 -2
- package/install/index.mjs +10 -1
- package/install/templates/claude-hooks.json +23 -1
- package/manifest.json +198 -134
- package/package.json +4 -1
- package/pipeline/agents/code-reviewer.md +9 -0
- package/pipeline/agents/explorer.md +4 -0
- package/pipeline/agents/plan-critic.md +4 -2
- package/pipeline/commands/multi-agent/SKILL.md +17 -136
- package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -4
- package/pipeline/commands/multi-agent/channels/SKILL.md +15 -297
- package/pipeline/commands/multi-agent/graph/SKILL.md +5 -2
- package/pipeline/commands/multi-agent/language/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/office-on/SKILL.md +8 -7
- package/pipeline/commands/multi-agent/office-status/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/prune-logs/SKILL.md +4 -1
- package/pipeline/commands/multi-agent/resume/SKILL.md +8 -22
- package/pipeline/commands/multi-agent/review/SKILL.md +11 -134
- package/pipeline/commands/multi-agent/scenario-audit/SKILL.md +4 -2
- package/pipeline/commands/multi-agent/setup/SKILL.md +19 -224
- package/pipeline/commands/multi-agent/sync/SKILL.md +12 -0
- package/pipeline/commands/multi-agent/test-gen/SKILL.md +29 -3
- package/pipeline/contract/CHANGELOG.md +46 -0
- package/pipeline/contract/README.md +27 -10
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/error-unsigned.json +1 -1
- package/pipeline/contract/fixtures/launch-plan.json +1 -1
- package/pipeline/contract/fixtures/runs-awaiting-question.json +6 -1
- package/pipeline/contract/fixtures/runs-empty.json +1 -1
- package/pipeline/contract/fixtures/runs-failed.json +6 -1
- package/pipeline/contract/fixtures/runs-old-schema.json +6 -1
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +5 -1
- package/pipeline/contract/fixtures/runs-pr-opened.json +6 -1
- package/pipeline/contract/fixtures/runs-running.json +6 -1
- package/pipeline/contract/manifest.json +153 -19
- package/pipeline/contract/types/index.d.ts +304 -6
- package/pipeline/lib/bg-launch.mjs +106 -0
- package/pipeline/lib/code-digest.mjs +49 -0
- package/pipeline/lib/credential-resolve.mjs +42 -2
- package/pipeline/multi-agent-refs/channels/generator.md +146 -0
- package/pipeline/multi-agent-refs/channels/menu.md +55 -0
- package/pipeline/multi-agent-refs/channels/multi-repo.md +6 -0
- package/pipeline/multi-agent-refs/channels/preview.md +25 -0
- package/pipeline/multi-agent-refs/channels/reference.md +98 -0
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +1 -1
- package/pipeline/multi-agent-refs/features/code-graph.md +27 -0
- package/pipeline/multi-agent-refs/features/office-threat-model.md +24 -6
- package/pipeline/multi-agent-refs/features/plan-critic.md +5 -2
- package/pipeline/multi-agent-refs/features/review-delta.md +4 -1
- package/pipeline/multi-agent-refs/features/scope-check.md +10 -1
- package/pipeline/multi-agent-refs/features/unattended-security.md +1 -1
- package/pipeline/multi-agent-refs/help/en.md +2 -2
- package/pipeline/multi-agent-refs/help/tr.md +2 -2
- package/pipeline/multi-agent-refs/knowledge.md +9 -0
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +163 -0
- package/pipeline/multi-agent-refs/phases/modes.md +7 -7
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +9 -8
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +12 -7
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +7 -3
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +19 -10
- package/pipeline/multi-agent-refs/picker-contract.md +1 -1
- package/pipeline/multi-agent-refs/resume/details.md +35 -0
- package/pipeline/multi-agent-refs/review/inputs.md +87 -0
- package/pipeline/multi-agent-refs/review/module-guides.md +25 -0
- package/pipeline/multi-agent-refs/review/valven.md +42 -0
- package/pipeline/multi-agent-refs/review-standalone-tracker.md +37 -0
- package/pipeline/multi-agent-refs/setup/accounts.md +27 -0
- package/pipeline/multi-agent-refs/setup/app-store-connect.md +5 -0
- package/pipeline/multi-agent-refs/setup/firebase.md +5 -0
- package/pipeline/multi-agent-refs/setup/google-play.md +4 -0
- package/pipeline/multi-agent-refs/setup/hooks-and-plugins.md +21 -0
- package/pipeline/multi-agent-refs/setup/language.md +46 -0
- package/pipeline/multi-agent-refs/setup/multi-repo-group.md +51 -0
- package/pipeline/multi-agent-refs/setup/summaries.md +63 -0
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +51 -0
- package/pipeline/multi-agent-refs/tracker-contract.md +8 -3
- package/pipeline/office/NOTICE.md +4 -1
- package/pipeline/office/assets/ARCHIVE_BOXES.png +0 -0
- package/pipeline/office/assets/COFFEE_MACHINE.png +0 -0
- package/pipeline/office/assets/COUNTER_SINK.png +0 -0
- package/pipeline/office/assets/DEVICE_STAND.png +0 -0
- package/pipeline/office/assets/FILING_CABINET.png +0 -0
- package/pipeline/office/assets/FRIDGE.png +0 -0
- package/pipeline/office/assets/MAILBOX.png +0 -0
- package/pipeline/office/assets/MOP_BUCKET.png +0 -0
- package/pipeline/office/assets/PRINTER.png +0 -0
- package/pipeline/office/assets/RECEPTION_DESK.png +0 -0
- package/pipeline/office/assets/SERVER_RACK.png +0 -0
- package/pipeline/office/assets/SERVER_RACK_2.png +0 -0
- package/pipeline/office/assets/TOILET_STALL.png +0 -0
- package/pipeline/office/assets/VENDING.png +0 -0
- package/pipeline/office/assets/WASHBASIN.png +0 -0
- package/pipeline/office/assets/WATER_COOLER.png +0 -0
- package/pipeline/office/index.html +3936 -819
- package/pipeline/office/toolkit.json +3 -0
- package/pipeline/rules/response-shape.md +6 -7
- package/pipeline/schemas/activity.schema.json +188 -4
- package/pipeline/schemas/agent-state.schema.json +511 -115
- package/pipeline/schemas/contract-error.schema.json +12 -1
- package/pipeline/schemas/job-change.schema.json +72 -0
- package/pipeline/schemas/job-request.schema.json +38 -0
- package/pipeline/schemas/launch.json +4 -4
- package/pipeline/schemas/office-credentials.schema.json +71 -0
- package/pipeline/schemas/office-jobs.json +253 -0
- package/pipeline/schemas/office-jobs.schema.json +62 -0
- package/pipeline/schemas/office-memory.schema.json +105 -0
- package/pipeline/schemas/office-settings-request.schema.json +30 -0
- package/pipeline/schemas/office-settings.schema.json +67 -0
- package/pipeline/schemas/phases.json +14 -6
- package/pipeline/schemas/phases.schema.json +86 -19
- package/pipeline/schemas/plan-critique.schema.json +9 -2
- package/pipeline/schemas/planning-output.schema.json +25 -2
- package/pipeline/schemas/prefs.schema.json +24 -1
- package/pipeline/schemas/prs.schema.json +5 -0
- package/pipeline/schemas/prune-logs-request.schema.json +26 -0
- package/pipeline/schemas/prune-logs.schema.json +52 -0
- package/pipeline/schemas/repo-change.schema.json +54 -0
- package/pipeline/schemas/repo-request.schema.json +29 -0
- package/pipeline/schemas/repos.schema.json +49 -1
- package/pipeline/schemas/reviewer-output.schema.json +20 -2
- package/pipeline/schemas/runs-index.schema.json +257 -46
- package/pipeline/schemas/system-status.schema.json +111 -0
- package/pipeline/schemas/token-budget.json +4 -4
- package/pipeline/schemas/tools.schema.json +5 -0
- package/pipeline/schemas/triage-output.schema.json +20 -2
- package/pipeline/schemas/unattended-profile.json +7 -2
- package/pipeline/scripts/_active-run.mjs +2 -1
- package/pipeline/scripts/_graph-analysis.mjs +270 -0
- package/pipeline/scripts/_memory-policy.mjs +165 -0
- package/pipeline/scripts/_secret-scan.mjs +105 -0
- package/pipeline/scripts/_spawn-async.mjs +9 -5
- package/pipeline/scripts/_unified-diff.mjs +2 -2
- package/pipeline/scripts/activity-snapshot.mjs +219 -23
- package/pipeline/scripts/autopilot-runner.mjs +7 -5
- package/pipeline/scripts/capture-flush.sh +12 -2
- package/pipeline/scripts/check-read-size.sh +9 -0
- package/pipeline/scripts/code-graph-rules/android.json +8 -3
- package/pipeline/scripts/contract-server.mjs +575 -28
- package/pipeline/scripts/debt-ledger.mjs +323 -0
- package/pipeline/scripts/file-context.mjs +261 -0
- package/pipeline/scripts/file-context.sh +20 -0
- package/pipeline/scripts/gen-mode-dispatch.mjs +3 -1
- package/pipeline/scripts/graph-links.mjs +230 -0
- package/pipeline/scripts/graph-query.mjs +133 -1
- package/pipeline/scripts/graph-report.mjs +65 -0
- package/pipeline/scripts/job-launch.mjs +477 -0
- package/pipeline/scripts/launch-request.mjs +94 -9
- package/pipeline/scripts/learn-from-transcripts.mjs +12 -48
- package/pipeline/scripts/learnings-ledger.mjs +143 -24
- package/pipeline/scripts/office-build.mjs +148 -11
- package/pipeline/scripts/office-control.mjs +34 -7
- package/pipeline/scripts/office-credentials.mjs +106 -0
- package/pipeline/scripts/office-memory.mjs +200 -0
- package/pipeline/scripts/office-prune.mjs +125 -0
- package/pipeline/scripts/office-settings.mjs +145 -0
- package/pipeline/scripts/phase-tracker.sh +12 -5
- package/pipeline/scripts/plan-critique-gate.mjs +11 -2
- package/pipeline/scripts/prune-logs.sh +53 -2
- package/pipeline/scripts/rework-rulings.mjs +106 -0
- package/pipeline/scripts/runs-index.mjs +62 -2
- package/pipeline/scripts/scope-check-gate.mjs +149 -2
- package/pipeline/scripts/system-status.mjs +196 -0
- package/pipeline/scripts/task-mirror.mjs +150 -0
- package/pipeline/scripts/task-mirror.sh +20 -0
- package/pipeline/scripts/toolkit-tools.mjs +33 -7
- package/pipeline/scripts/transcript-index.mjs +4 -1
- package/pipeline/scripts/triage-memory.mjs +64 -37
- package/pipeline/scripts/validate-planning.mjs +68 -4
- package/pipeline/scripts/validate-reviewer.mjs +20 -0
- package/pipeline/scripts/validate-triage.mjs +107 -2
- package/pipeline/scripts/work-items.mjs +191 -22
- package/pipeline/skills/.skill-manifest.json +9 -9
- package/pipeline/skills/.skills-index.json +1 -1
- package/pipeline/skills/shared/README.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +5 -2
- package/pipeline/skills/shared/core/multi-agent-language/SKILL.md +4 -4
- package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +3 -4
- package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +4 -1
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +21 -0
- package/pipeline/skills/shared/core/multi-agent-scenario-audit/SKILL.md +4 -2
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +4 -4
- package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +26 -3
- package/pipeline/skills/skills-index.md +1 -1
|
@@ -25,20 +25,7 @@ allowed-tools: Read, Write, Edit, Bash, Grep, WebFetch, AskUserQuestion
|
|
|
25
25
|
|
|
26
26
|
## Input
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
/multi-agent:channels # cwd + current branch
|
|
30
|
-
/multi-agent:channels PROJ-12345 # Jira ID
|
|
31
|
-
/multi-agent:channels #42 # GitHub issue/PR number
|
|
32
|
-
/multi-agent:channels https://github.com/<org>/<repo>/pull/N
|
|
33
|
-
/multi-agent:channels https://<bitbucket-host>/projects/.../pull-requests/N
|
|
34
|
-
/multi-agent:channels https://<jira-host>/browse/PROJ-12345
|
|
35
|
-
|
|
36
|
-
/multi-agent:channels PROJ-12345 --channels jira,confluence # non-interactive channel
|
|
37
|
-
/multi-agent:channels PROJ-12345 --content auto-diff # non-interactive content
|
|
38
|
-
/multi-agent:channels PROJ-12345 --message "root: ..." # manual source
|
|
39
|
-
/multi-agent:channels PROJ-12345 --message-file notes.md # manual, long
|
|
40
|
-
/multi-agent:channels PROJ-12345 --dry-run # preview, no POST
|
|
41
|
-
```
|
|
28
|
+
A Jira id or URL, a GitHub or Bitbucket PR URL, a GitHub `#N`, or nothing (cwd + current branch), plus the flags below. Example invocations: `$HOME/.claude/multi-agent-refs/channels/reference.md` "Input forms".
|
|
42
29
|
|
|
43
30
|
## Flow
|
|
44
31
|
|
|
@@ -55,19 +42,11 @@ allowed-tools: Read, Write, Edit, Bash, Grep, WebFetch, AskUserQuestion
|
|
|
55
42
|
3. Detect remote type: `github` (gh CLI) or `bitbucket` (REST).
|
|
56
43
|
4. Store in runtime state: `{jiraId, targets: [{prUrl, prNumber, remoteType, repoPath, baseBranch, headBranch, repoName, isPrimary}]}`.
|
|
57
44
|
|
|
58
|
-
**Multi-repo:** when `agent-state.json` `projects[].length > 1`, Step 1 builds **one target per project**.
|
|
59
|
-
|
|
60
|
-
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).
|
|
45
|
+
**Multi-repo:** when `agent-state.json` `projects[].length > 1`, Step 1 builds **one target per project**. How each target is resolved and which one is primary: `$HOME/.claude/multi-agent-refs/channels/multi-repo.md` "Target resolution (Step 1)", read before Step 1 then. Single-repo tasks have exactly one target.
|
|
61
46
|
|
|
62
47
|
### Step 2 - Context source detection
|
|
63
48
|
|
|
64
|
-
Automatic.
|
|
65
|
-
|
|
66
|
-
| Source | Available when | Used for |
|
|
67
|
-
|---|---|---|
|
|
68
|
-
| **Pipeline log** | `$HOME/.claude/logs/multi-agent/<project>/<task-id>/agent-log.md` exists AND matches `jiraId` | "Normal analiz" + "Test senaryoları" content options - uses Phase 1/2/4 output verbatim |
|
|
69
|
-
| **PR diff** | PR exists, diff fetchable (`gh pr diff` or Bitbucket `/diff?contextLines=5`) | "Auto-diff summary" content option - old enrich behavior |
|
|
70
|
-
| **Manual message** | `--message` / `--message-file` provided | Replaces both sources - user text is canonical |
|
|
49
|
+
Automatic: pipeline log, PR diff, or a manual message, best available first. Read `$HOME/.claude/multi-agent-refs/channels/menu.md` before Step 2: the source table (when each source is available, which content options it feeds) and the Step 3 menu rules.
|
|
71
50
|
|
|
72
51
|
If both pipeline log and PR diff exist, the menu offers both. If only one, the unavailable options are greyed out with a one-line reason.
|
|
73
52
|
|
|
@@ -77,47 +56,15 @@ Rendered in English (`promptLanguage` is locked to `en`). Previous selections (`
|
|
|
77
56
|
|
|
78
57
|
#### Step 3a - Work Summary preview (summary-first flow)
|
|
79
58
|
|
|
80
|
-
**Runs only when**
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
preview=$(bash $HOME/.claude/scripts/render-work-summary.sh "$TASK_ID" 2>/dev/null || true)
|
|
84
|
-
[ -n "$preview" ] && {
|
|
85
|
-
printf '%s\n\n' "$preview"
|
|
86
|
-
# Auto-tick workSummary content row when preview was shown.
|
|
87
|
-
# Users can still untick it in 3b if they don't want to re-send the same
|
|
88
|
-
# block to remote channels (useful when preview was enough for a look).
|
|
89
|
-
content_defaults.workSummary=true
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
When the preview renders:
|
|
94
|
-
- **workSummary** row in 3b is **auto-ticked** (user can still uncheck).
|
|
95
|
-
- Previous `prefs.global.reportContent.workSummary` value is respected - if the user had explicitly unticked in a prior run, the auto-tick is **suppressed** and the ticked state matches the pref.
|
|
96
|
-
|
|
97
|
-
When the preview does NOT render (no state, or pref explicitly off at global level with no override):
|
|
98
|
-
- Skip 3a silently, go straight to the channels picker. The workSummary row in 3b stays at its pref default (`false`).
|
|
99
|
-
|
|
100
|
-
After the preview prints, 3b renders the two pickers: **Channels** (PR description, Jira comment, Confluence page, Wiki, Board; each unavailable one greyed with its reason) and **Content** (normal analysis, technical analysis, test scenarios, test run, PR auto-diff, manual note, cost summary, work summary).
|
|
101
|
-
|
|
102
|
-
**Why auto-tick:** the user just saw the summary and is most likely sending it; the explicit pref still wins.
|
|
59
|
+
**Runs only when** `agent-state.json` exists for the task AND a Work Summary can be generated. It prints the summary BEFORE the channel picker and auto-ticks the workSummary content row in 3b; an explicit `prefs.global.reportContent.workSummary` still wins. Otherwise 3a is skipped silently.
|
|
103
60
|
|
|
104
61
|
**Autopilot interaction (Step 4):** `state.autopilot === true` still pauses at channels (documented exception to zero-interaction contract), preview in-line. Under `MULTI_AGENT_UNATTENDED=1` it posts nothing: `$HOME/.claude/multi-agent-refs/features/unattended-security.md`.
|
|
105
62
|
|
|
106
63
|
#### Step 3b - Channel + content picker
|
|
107
64
|
|
|
108
|
-
**
|
|
109
|
-
- "Wiki" unselectable unless `state.taskType === "component"` AND `figmaConfig.wiki.enabled === true`. If greyed, show reason: `"(no figma-config or taskType != component)"`.
|
|
110
|
-
- "Board" unselectable unless `figmaConfig.board.enabled === true` AND `figmaConfig.board.provider === "github-projects-v2"` AND `figmaConfig.github.projectV2Id` set. If greyed, show reason: `"(no figma-config.board or projectV2Id missing)"`. Default target column: `inReview`.
|
|
111
|
-
- "Normal analiz" + "Test senaryoları" unselectable if no pipeline log found. Reason: `"(no pipeline log for PROJ-12345)"`.
|
|
112
|
-
- "Teknik analiz" unselectable if no Phase 1 planning log AND no PR diff available. Reason: `"(no technical source - need Phase 1 plan or PR diff)"`.
|
|
113
|
-
- "Auto-diff" unselectable if no PR found. Reason: `"(no PR linked to this target)"`.
|
|
114
|
-
- "Manuel not" always available. "Test Koşumu (Xray)": `channels/test-run.md`.
|
|
115
|
-
- "Cost özeti" unselectable if `phase-tracker.sh cost total` prints `-` (no priced token tallies; there is no `status` action) AND no `otel-spans.jsonl` exists for the task. Reason: `"(no tracker data - set MULTI_AGENT_OTEL_SPANS=1 or enable token tracking)"`.
|
|
116
|
-
- "Yapılan iş özeti" unselectable if no `agent-state.json` exists for the task (post-hoc call with `--branch` + `--base-branch` flags restores partial availability). Reason: `"(no agent-state.json for {taskId})"`. **Auto-ticked** when Step 3a preview was shown - user can still uncheck before confirming the menu.
|
|
117
|
-
|
|
118
|
-
**Defaults (first run):** PR + Jira ticked, Confluence + Wiki unticked. Content: auto-diff if pipeline log missing; otherwise normal-analiz + test-senaryoları.
|
|
65
|
+
Two pickers: **Channels** (PR description, Jira comment, Confluence page, Wiki, Board) and **Content**. An unavailable option is greyed with a one-line reason, never hidden. Selections are saved to `prefs.global.reportChannels` and `prefs.global.reportContent` as the next run's defaults.
|
|
119
66
|
|
|
120
|
-
|
|
67
|
+
`channels/menu.md` (read at Step 2) carries the preview snippet, the auto-tick rules, every greyed-out rule with its reason string, and the first-run defaults.
|
|
121
68
|
|
|
122
69
|
### Step 4 - Mode short-circuit
|
|
123
70
|
|
|
@@ -147,152 +94,15 @@ what was wrong, what was changed, which areas must be tested, what else is
|
|
|
147
94
|
affected - in the same plain register as the summary, and it is the part a test
|
|
148
95
|
lead reads before deciding how wide to test.
|
|
149
96
|
|
|
150
|
-
|
|
151
|
-
|---|---|
|
|
152
|
-
| Normal analiz | `### Analysis` - impact summary from Phase 1, risks from Phase 4 (pipeline-log source, high-level only) |
|
|
153
|
-
| Teknik analiz | `### Technical Details` - Changes (what/why per file group), Architecture (structural decisions, pattern changes), Dependencies (new imports/frameworks/packages). Source: Phase 1 planning + Phase 2 dev log + `git diff --stat`. **PR and Confluence only** - never rendered into a Jira comment. |
|
|
154
|
-
| Test senaryoları | `### Test Scenarios` - precondition / steps / expected table (4-8 rows), user perspective |
|
|
155
|
-
| Test Koşumu (Xray) | `### Test Koşumu` - Xray Test Execution of the task's UI scenario run (`channels/test-run.md`) |
|
|
156
|
-
| Auto-diff | Old enrich Output Template verbatim - Root Cause / Solution / Changed Files / Test Scenarios |
|
|
157
|
-
| Manuel not | `### Notes` - user-provided paragraph, or LLM-split into subsections if `--message` is plain text and long |
|
|
158
|
-
| Cost özeti | `### Cost Summary` - per-phase token tally + est. USD table. Source: `phase-tracker.sh` phase status + optional OTel spans. See "Cost summary generation" below. |
|
|
159
|
-
| Yapılan iş özeti | `### Work Summary` - executive one-screen summary: task + branch + base + PR, scope delivered (done/[pending] per Phase 2 task), changed files with +/- counts (capped at 20 rows), review outcome (accepted/deferred/rejected + approved), phase tick strip. Source: `agent-state.json` + `phase-tracker.json` + `git diff --numstat base...HEAD`. See "Work summary generation" below. |
|
|
97
|
+
Read `$HOME/.claude/multi-agent-refs/channels/generator.md` before generating any section: the content-option table (which section each option produces, from which source), the aggregated output template, store-compliance auto-augmentation from cached `archiveguard-*.json` / `play-compliance-*.json` reports, and the work-summary (`render-work-summary.sh`) and cost-summary (`render-cost-summary.sh`) generators with their precision rules.
|
|
160
98
|
|
|
161
99
|
**The content options are sources, not the body's shape.** Which sections a PR
|
|
162
100
|
body carries and in what order is fixed by `channels/pr.md` (`summary` →
|
|
163
101
|
`technical` → `architecture` → `impact` → `test_scenarios` → `test_run` → `visuals` → `risk`
|
|
164
|
-
→ `dependencies` → `build` → `related`); the options
|
|
102
|
+
→ `dependencies` → `build` → `related`); the content options choose what gets
|
|
165
103
|
gathered to fill them. A content option left unselected means a section has no
|
|
166
104
|
source, not that the section may be reordered or renamed.
|
|
167
105
|
|
|
168
|
-
**Output template (aggregated across selected content options):**
|
|
169
|
-
|
|
170
|
-
```markdown
|
|
171
|
-
### Analysis ← if "Normal analiz" selected
|
|
172
|
-
{impact summary, risks - from pipeline log, high-level}
|
|
173
|
-
|
|
174
|
-
### Technical Details ← if "Teknik analiz" selected
|
|
175
|
-
#### Changes
|
|
176
|
-
{Per changed-file-group, what changed + why - from Phase 2 dev log}
|
|
177
|
-
#### Architecture
|
|
178
|
-
{Structural decisions, pattern changes, new file layouts - from Phase 1 plan}
|
|
179
|
-
#### Dependencies
|
|
180
|
-
{New imports / frameworks / packages - from git diff --stat, or "None"}
|
|
181
|
-
|
|
182
|
-
### Root Cause ← if "Auto-diff" selected
|
|
183
|
-
{single paragraph - from diff}
|
|
184
|
-
|
|
185
|
-
- `path/to/File.ext → funcName`: {why it broke}
|
|
186
|
-
|
|
187
|
-
### Solution ← if "Auto-diff" selected
|
|
188
|
-
- `path/to/File.ext:LINE-LINE` - {change, one line}
|
|
189
|
-
|
|
190
|
-
### Changed Files ← if "Auto-diff" selected
|
|
191
|
-
| File | +/- |
|
|
192
|
-
|------|-----|
|
|
193
|
-
| `path/to/File.ext` | +N / -M |
|
|
194
|
-
|
|
195
|
-
### Test Scenarios ← if "Test senaryoları" OR "Auto-diff" selected
|
|
196
|
-
**1. {what this scenario exercises}**
|
|
197
|
-
1. {step the tester performs}
|
|
198
|
-
2. **Expected:** {what they should see}
|
|
199
|
-
|
|
200
|
-
**2. {regression scenario}**
|
|
201
|
-
1. {step}
|
|
202
|
-
2. **Expected:** {what should still behave as before}
|
|
203
|
-
|
|
204
|
-
### Test Koşumu ← if "Test Koşumu (Xray)" selected
|
|
205
|
-
|
|
206
|
-
### Notes ← if "Manuel not" selected
|
|
207
|
-
{user message}
|
|
208
|
-
|
|
209
|
-
### Work Summary ← if "Yapılan iş özeti" selected
|
|
210
|
-
{executive scope + files + review + phases block - see "Work summary generation" below}
|
|
211
|
-
|
|
212
|
-
### Cost Summary ← if "Cost özeti" selected
|
|
213
|
-
{per-phase token + USD table - see "Cost summary generation" below}
|
|
214
|
-
|
|
215
|
-
### Store compliance ← auto-appended if cached compliance report exists
|
|
216
|
-
{summary line - see below}
|
|
217
|
-
|
|
218
|
-
Ref: {jiraId}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Store compliance auto-augmentation:**
|
|
222
|
-
|
|
223
|
-
After the content-selected sections are generated, check for a recent compliance report cached from `/multi-agent:test "store-ready"`:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Cache locations (newest wins; expire after 6h to avoid stale cross-branch reports)
|
|
227
|
-
find /tmp -maxdepth 1 -name 'archiveguard-*.json' -o -name 'play-compliance-*.json' \
|
|
228
|
-
-newermt "-6 hours" -print 2>/dev/null | head -1
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
If a cached report exists AND any of the selected channels is PR / Jira / Confluence, append an auto-summary section:
|
|
232
|
-
|
|
233
|
-
| Blocker count | Appended line |
|
|
234
|
-
|---|---|
|
|
235
|
-
| `errors > 0` | `### Store compliance` + `{N} blocker(s), {M} warning(s) - run /multi-agent:test "store-ready" for the full report.` - per-blocker: `- \`{ruleID}\` - {Apple ITMS / Play ref}: {message}` (capped at 5 rows, rest collapsed to `+N more`) |
|
|
236
|
-
| `errors == 0, warnings > 0` | `### Store compliance` + `[done] No blockers. {M} warning(s) - see /multi-agent:test "store-ready" for detail.` |
|
|
237
|
-
| `errors == 0, warnings == 0` | Skip section entirely - don't pollute PR body |
|
|
238
|
-
|
|
239
|
-
The section references `ruleID` + policy ref from the compliance skill catalogs (`apple-archive-compliance` / `google-play-compliance`) verbatim. No translation - global identifiers stay as-is.
|
|
240
|
-
|
|
241
|
-
If no cached report exists, skip silently - this is augmentation, not a gate.
|
|
242
|
-
|
|
243
|
-
**Work summary generation:**
|
|
244
|
-
|
|
245
|
-
Emitted only when `reportContent.workSummary === true` and at least one of (`agent-state.json`, `--branch` flag) is available. The shell adapter is `$HOME/.claude/scripts/render-work-summary.sh <taskId>`, and that script's own header is the spec for what it emits - task header, scope delivered, changed files, review outcome, phase strip - including the caps and the hidden-when-empty rules. Exit 2 means the state was unreadable: skip the section, do not substitute a hand-written one.
|
|
246
|
-
|
|
247
|
-
**Output template:**
|
|
248
|
-
|
|
249
|
-
```markdown
|
|
250
|
-
### Work Summary
|
|
251
|
-
**Task**: `PROJ-1099` | **Branch**: `bugfix/PROJ-1099-dark-mode` | **Base**: `develop` | **PR**: #104
|
|
252
|
-
|
|
253
|
-
#### Scope delivered
|
|
254
|
-
- [done] T1 Add failing dark-mode snapshot test
|
|
255
|
-
- [done] T2 Replace Color.white with design token
|
|
256
|
-
|
|
257
|
-
#### Changed files (3 files · +48 / -12)
|
|
258
|
-
- `Sources/Auth/LoginView.swift` (+24 / -8)
|
|
259
|
-
- `Sources/Auth/LoginViewTests.swift` (+22 / -4)
|
|
260
|
-
- `Sources/DesignSystem/Color+Tokens.swift` (+2 / -0)
|
|
261
|
-
|
|
262
|
-
#### Review outcome
|
|
263
|
-
- 1 accepted · 0 deferred · 0 rejected · approved=true
|
|
264
|
-
|
|
265
|
-
#### Phases
|
|
266
|
-
- 0 Init [done] · 1 Plan [done] · 2 Dev [done] · 3 Review [done] · 4 Commit [done] · 5 Report active
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**Post-hoc invocation** (task already finished, agent-state.json may be archived): pass `--branch` + `--base-branch` explicitly - the script still emits task header + changed-files + phases sections (scope + review outcome are state-dependent and will be absent if state is gone).
|
|
270
|
-
|
|
271
|
-
**Cost summary generation:**
|
|
272
|
-
|
|
273
|
-
Emitted only when `reportContent.costSummary === true` and tracker data is available. Source of truth is `phase-tracker.sh`:
|
|
274
|
-
|
|
275
|
-
1. **Token tallies per phase** - `render-cost-summary.sh <taskId>` resolves the tracker JSON itself: worktree candidates (`.worktrees/{taskPath}/phase-tracker.json`) first, then the standard location `$HOME/.claude/logs/multi-agent/{taskId}/tracker-state.json` that `phase-tracker.sh` actually writes. Each phase row carries `{tokens_in, tokens_out}`.
|
|
276
|
-
2. **Fallback to OTel spans** - if tracker JSON has no token columns but `otel-spans.jsonl` exists (set `MULTI_AGENT_OTEL_SPANS=1` beforehand), aggregate `phase.tokens` spans by phase ID.
|
|
277
|
-
3. **USD estimate** - uses a static price table in `$HOME/.claude/scripts/cost-table.json` (model → $/Mtok_in, $/Mtok_out). Missing model → show ` - ` for USD, never block.
|
|
278
|
-
|
|
279
|
-
**Output template:**
|
|
280
|
-
|
|
281
|
-
```markdown
|
|
282
|
-
### Cost Summary
|
|
283
|
-
| Phase | Model | Tokens in | Tokens out | Est. USD |
|
|
284
|
-
|-------|-------|-----------|------------|----------|
|
|
285
|
-
| 1. Analysis | opus | 12,480 | 3,210 | $0.42 |
|
|
286
|
-
| 2. Planning | opus | 18,904 | 5,120 | $0.66 |
|
|
287
|
-
| 3. Dev | sonnet | 42,310 | 9,880 | $0.27 |
|
|
288
|
-
| 4. Review | opus | 21,050 | 4,720 | $0.66 |
|
|
289
|
-
| **Total** | | **94,744** | **22,930** | **$2.04** |
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
Generated by `$HOME/.claude/scripts/render-cost-summary.sh <task-id>` using prices from `$HOME/.claude/scripts/cost-table.json`. The channels adapter shells out to this renderer - doc table is illustrative only, runtime is authoritative.
|
|
293
|
-
|
|
294
|
-
**Precision rules:** tokens as thousand-separated integers. USD rounded to 2 dp (`printf '$%.2f'`). Rows with zero tokens dropped. If total USD is ` - ` (no price for any model), replace the total row USD cell with ` - ` and add a one-line footnote: `*USD unavailable - add model to cost-table.json*`.
|
|
295
|
-
|
|
296
106
|
**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.
|
|
297
107
|
|
|
298
108
|
### Step 6 - Body preview + approval gate (interactive modes)
|
|
@@ -308,27 +118,7 @@ Skipped in exactly two cases:
|
|
|
308
118
|
|
|
309
119
|
**Preview render** (one block per selected channel, final body after humanizer - shown in readable Markdown, channel-specific markup conversion happens after approval).
|
|
310
120
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
| Channel | Conversion after approval | Table |
|
|
314
|
-
|---|---|---|
|
|
315
|
-
| PR description | **none** - posted as Markdown, verbatim | GitHub / Bitbucket / GitLab all render Markdown; see `channels/pr.md` "Markup dialect" |
|
|
316
|
-
| GitHub issue comment | **none** - posted as Markdown, verbatim | - |
|
|
317
|
-
| Jira comment | markdown → Jira wiki markup | `channels/jira.md` "Wiki markup conversion" |
|
|
318
|
-
| Confluence page | markdown → storage format | `channels/confluence.md` "Body conversion" |
|
|
319
|
-
|
|
320
|
-
The Jira table is the only *text* markup table in the doc set and never applies to the PR body: `h2.`, `{{code}}` or `#`-numbered lists render there as raw wiki markup.
|
|
321
|
-
|
|
322
|
-
```
|
|
323
|
-
── PR description ({repoName} #{prNumber}, replace) ─────────
|
|
324
|
-
{body}
|
|
325
|
-
── Jira comment ({jiraId}) ──────────────────────────────────
|
|
326
|
-
{body}
|
|
327
|
-
── Confluence page ("{title}" under {parentUrl}) ────────────
|
|
328
|
-
{body}
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
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 `$HOME/.claude/multi-agent-refs/issue-jira-triad.md`), Board status move (`{from} → {to}`), GitHub issue comment + Progress-flag sync (Phase 5 Step 1.5 - same gate, see `$HOME/.claude/multi-agent-refs/phases/phase-5-report.md`), test-run candidates to untick (`channels/test-run.md`), the Jira body's `--measure` (`render-jira-evidence.mjs`).
|
|
121
|
+
PR description and GitHub issue comment are posted as Markdown verbatim; Jira comment and Confluence page are converted after approval. Read `$HOME/.claude/multi-agent-refs/channels/preview.md` before rendering the preview: the per-channel conversion table, the preview block layout and the secondary-artifact intents that ride along at its bottom.
|
|
332
122
|
|
|
333
123
|
**Then a single AskUserQuestion** (`picker-contract.md`; `question`/`label`/`description` in `outputLanguage`, `header` English):
|
|
334
124
|
|
|
@@ -361,14 +151,14 @@ Then post it - do not assemble the request:
|
|
|
361
151
|
bash "$HOME/.claude/lib/jira-publish.sh" --issue "$JIRA_ID" --body-file "$F" --target comment
|
|
362
152
|
```
|
|
363
153
|
|
|
364
|
-
The publisher escapes every body (
|
|
154
|
+
The publisher escapes every body (emoticon sequences, see Gotchas) and resolves the token from `keychainMapping.jira` without putting it on argv.
|
|
365
155
|
|
|
366
156
|
Full contract: [`$HOME/.claude/multi-agent-refs/channels/jira.md`]($HOME/.claude/multi-agent-refs/channels/jira.md) - full conversion table, multi-repo PR-list prepend, Wiki→Jira triad interaction.
|
|
367
157
|
|
|
368
158
|
**Issue family** (`state.jiraFamily` set): instead, `bash $HOME/.claude/lib/jira-family-write.sh plan --state "$STATE_FILE" --dev-body "$F"`, the Step 6 preview as one multi-select under `plan.confirm`, then `apply --state "$STATE_FILE"`: `$HOME/.claude/multi-agent-refs/features/jira-family.md`.
|
|
369
159
|
|
|
370
160
|
#### Adapter: Confluence page
|
|
371
|
-
Token from `keychainMapping.confluence`; missing/expired triggers the inline Save Flow from `setup.md`. Parent page
|
|
161
|
+
Token from `keychainMapping.confluence`; missing/expired triggers the inline Save Flow from `setup.md`. Parent page from `prefs.projects[<project>].confluenceUrls` recents or a pasted URL, then storage-format conversion and POST; URL saved back to recents.
|
|
372
162
|
|
|
373
163
|
Full contract: [`$HOME/.claude/multi-agent-refs/channels/confluence.md`]($HOME/.claude/multi-agent-refs/channels/confluence.md) - URL parsing rules, full storage-XML conversion table, update-vs-create branch.
|
|
374
164
|
|
|
@@ -379,42 +169,19 @@ Precondition, token, item lookup, mutation and idempotency: `$HOME/.claude/multi
|
|
|
379
169
|
#### Adapter: Wiki
|
|
380
170
|
**Precondition gate:** `state.taskType === "component"` AND `figmaConfig.wiki.enabled === true`. If not met, shows the Case B menu from `$HOME/.claude/multi-agent-refs/wiki-capture.md` (setup / skip / disable / manual-note).
|
|
381
171
|
|
|
382
|
-
**
|
|
383
|
-
|
|
384
|
-
**If preconditions met (Case A):** scope multi-select prompt (Main page / iOS sub-page / Screenshots / Index updates / Other); adapter dispatched to the plugin skill `ai-ios-toolkit:figma-component-wiki` (or `ai-android-toolkit:figma-component-wiki`).
|
|
172
|
+
**If preconditions met (Case A):** scope multi-select, then dispatch to the plugin skill `ai-ios-toolkit:figma-component-wiki` (or `ai-android-toolkit:figma-component-wiki`). When wiki pages are written AND `state.jiraId` is set AND `prefs.global.wikiToJiraComment === true`, the Wiki-to-Jira comment auto-link posts an additional Jira comment, independent of the main Jira channel's comment.
|
|
385
173
|
|
|
386
174
|
Full contract: [`$HOME/.claude/multi-agent-refs/channels/wiki.md`]($HOME/.claude/multi-agent-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.
|
|
387
175
|
|
|
388
176
|
### Step 8 - Summary
|
|
389
177
|
|
|
390
|
-
After all adapters complete (or fail non-blocking):
|
|
391
|
-
|
|
392
|
-
```
|
|
393
|
-
channels dispatch complete
|
|
394
|
-
PR description ✓ version 3→4, reviewers 23 preserved
|
|
395
|
-
Jira comment ✓ posted → <jira-url>?focusedCommentId=2484780
|
|
396
|
-
Confluence - skipped: user declined
|
|
397
|
-
Wiki ✓ 3 files via github-wiki adapter
|
|
398
|
-
Board ✓ In Develop → In Review (project #4)
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
Each line: status symbol (`✓` / `✗` / `-`), key metric, URL where applicable.
|
|
178
|
+
After all adapters complete (or fail non-blocking), print one line per channel: status symbol (`✓` / `✗` / `-`), key metric, URL where applicable. Format example: `$HOME/.claude/multi-agent-refs/channels/reference.md` "Step 8 summary format".
|
|
402
179
|
|
|
403
180
|
Persist selections to `prefs.global.reportChannels` + `prefs.global.reportContent` for next run default.
|
|
404
181
|
|
|
405
182
|
## Flags
|
|
406
183
|
|
|
407
|
-
|
|
408
|
-
|------|--------|
|
|
409
|
-
| `--channels pr,jira,confluence,wiki` | Non-interactive channel selection (comma list). Skips channel menu. |
|
|
410
|
-
| `--content normal,technical,test,auto-diff,note,test-run` | Non-interactive content selection. Skips content menu. |
|
|
411
|
-
| `--flow-run <runId>[,<runId>...]` | Runs for the test run block (`channels/test-run.md`). |
|
|
412
|
-
| `--message "..."` | Manual mode - use user text as source, no diff read. Forces `content=note`. |
|
|
413
|
-
| `--message-file path` | Manual mode, long message from file. |
|
|
414
|
-
| `--append` | PR description: append instead of replace. |
|
|
415
|
-
| `--dry-run` | Generate, print to stdout, do not POST. |
|
|
416
|
-
| `--lang=tr\|en\|both` | Output language override (default: `en`; `promptLanguage` is locked to `en`). |
|
|
417
|
-
| `--ready` | If PR draft, promote to READY after channels dispatch. |
|
|
184
|
+
`--channels`, `--content`, `--flow-run`, `--message`, `--message-file`, `--append`, `--dry-run`, `--lang`, `--ready`. What each one does: `$HOME/.claude/multi-agent-refs/channels/reference.md` "Flags", read before Step 1 whenever a flag is present.
|
|
418
185
|
|
|
419
186
|
## Required rules
|
|
420
187
|
|
|
@@ -429,17 +196,7 @@ Persist selections to `prefs.global.reportChannels` + `prefs.global.reportConten
|
|
|
429
196
|
|
|
430
197
|
## Error handling
|
|
431
198
|
|
|
432
|
-
|
|
433
|
-
|-----------|----------|
|
|
434
|
-
| No target resolvable | Error, exit 1 |
|
|
435
|
-
| PR not found + Jira selected | Proceed Jira-only, log reason |
|
|
436
|
-
| PR merged/closed | Warn, confirm continue |
|
|
437
|
-
| Author bot / dependabot | Skip entire run |
|
|
438
|
-
| Diff > 2 MB | Ask: skip / top-20-files / cancel |
|
|
439
|
-
| No pipeline log + "Normal analiz" selected | Greyed out at menu; if forced via `--content`, error |
|
|
440
|
-
| Bitbucket PR version mismatch | Refetch once, retry; fail on second mismatch |
|
|
441
|
-
| Jira token missing/expired | Token Save Flow inline; skip on user-skip |
|
|
442
|
-
| Wiki preconditions not met | Case B menu per `$HOME/.claude/multi-agent-refs/wiki-capture.md` |
|
|
199
|
+
Read `$HOME/.claude/multi-agent-refs/channels/reference.md` before Step 1: the condition-by-condition behaviour table (no target, PR missing or merged, bot author, oversized diff, forced unavailable content, Bitbucket version mismatch, missing token, Wiki preconditions). Cross-CLI parity notes and worked examples live in the same file.
|
|
443
200
|
|
|
444
201
|
## Phase 5 delegation contract
|
|
445
202
|
|
|
@@ -453,42 +210,3 @@ Phase 5 invokes this command internally instead of running its own inline Jira/C
|
|
|
453
210
|
Phase 5 passes a runtime state bundle: `{jiraId, prUrl, remoteType, taskType, figmaConfig, agentState, pipelineLogPath, flowRuns}`. `channels` reads these directly, skips target-resolution Step 1.
|
|
454
211
|
|
|
455
212
|
**Autopilot contract:** Phase 5 ALWAYS pauses at the channels menu (breaks generic autopilot zero-interaction). 30-min timeout → session ends cleanly, task resumable via `/multi-agent:resume`. See `$HOME/.claude/multi-agent-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.
|
|
456
|
-
|
|
457
|
-
## Cross-CLI parity
|
|
458
|
-
|
|
459
|
-
| CLI | Command name | Invocation |
|
|
460
|
-
|---|---|---|
|
|
461
|
-
| Claude Code | `/multi-agent:channels` | Slash namespace (colon) |
|
|
462
|
-
| Copilot CLI | `multi-agent-channels` | Top-level command (dash-separated, no namespace support) |
|
|
463
|
-
|
|
464
|
-
Both installations read the same source file (`$HOME/.claude/commands/multi-agent/channels/SKILL.md`) - `install.js --all` copies to:
|
|
465
|
-
- `~/.claude/commands/multi-agent/channels/SKILL.md`
|
|
466
|
-
- `~/.copilot/commands/multi-agent-channels.md`
|
|
467
|
-
|
|
468
|
-
Prompts MUST be byte-identical. `smoke-cross-cli-behavior.sh` asserts this - spacing, brackets, numbering, log-line format.
|
|
469
|
-
|
|
470
|
-
Progress emission on Copilot (no native TaskCreate UI): `bash ~/.copilot/scripts/phase-tracker.sh sub 5 <N> "<step>" <status>` - same shape as Phase 5.
|
|
471
|
-
|
|
472
|
-
## Examples
|
|
473
|
-
|
|
474
|
-
```
|
|
475
|
-
/multi-agent:channels
|
|
476
|
-
→ resolves from cwd+branch → PROJ-12345 + PR #3433
|
|
477
|
-
→ menu: PR ✓ Jira ✓ / Normal analiz ✓ Test senaryoları ✓
|
|
478
|
-
→ PR description replaced (v3→4, 23 reviewers preserved)
|
|
479
|
-
→ Jira comment posted (id 2484780)
|
|
480
|
-
→ Confluence - Wiki -
|
|
481
|
-
|
|
482
|
-
/multi-agent:channels PROJ-12345 --channels confluence --content note --message-file notes.md
|
|
483
|
-
→ non-interactive: only Confluence, content from notes.md
|
|
484
|
-
→ asks: parent page URL (or recent [1] / [2])
|
|
485
|
-
→ page created → https://<host>/pages/12345
|
|
486
|
-
|
|
487
|
-
/multi-agent:channels https://<bitbucket>/.../pull-requests/42 --dry-run
|
|
488
|
-
→ resolves → PROJ-67890
|
|
489
|
-
→ prints Jira + PR body preview to stdout, no POST
|
|
490
|
-
|
|
491
|
-
/multi-agent:channels --message "root: order id empty, UI silent. fix: length>0 guard in HomeVC.m"
|
|
492
|
-
→ auto-diff from cwd+branch PR + user note combined
|
|
493
|
-
→ posts to default channels (PR + Jira)
|
|
494
|
-
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Build and query this repo's code graph: a deterministic, LLM-free map of symbols, imports and references used to narrow Phase 1's Explore scope and to keep the knowledge base current. Read-only on code, costs no API tokens. Use when a task needs to know where something lives or what depends on it before reading files."
|
|
3
3
|
description-tr: "Bu repo'nun kod grafiğini kurar ve sorgular: sembolleri, import'ları ve referansları LLM'siz, deterministik biçimde haritalar. Faz 1'in Explore kapsamını daraltmak ve bilgi tabanını güncel tutmak için kullanılır. Kodda salt-okunur, API maliyeti yok."
|
|
4
|
-
argument-hint: "[build | refresh | ask \"<question>\" | affected \"<symbol>\" | report | status]"
|
|
4
|
+
argument-hint: "[build | refresh | ask \"<question>\" | affected \"<symbol>\" | path <from> <to> | links <a,b> | report | diff <older> | status]"
|
|
5
5
|
parameters: [{"name":"action","kind":"text"}]
|
|
6
6
|
gui: form
|
|
7
7
|
destructive: false
|
|
@@ -29,7 +29,10 @@ No worktree, no branch, no commit, no pipeline chaining.
|
|
|
29
29
|
| `refresh` | same as `build` | A full rebuild takes seconds, so there is no separate incremental path |
|
|
30
30
|
| `ask "<question>"` | `graph-query.mjs "<question>" --budget N` | Token-budgeted traversal; default budget 2000 |
|
|
31
31
|
| `affected "<symbol>"` | `graph-affected.mjs "<symbol>" --depth N` | Reverse traversal: the blast radius of a change |
|
|
32
|
-
| `
|
|
32
|
+
| `path <from> <to>` | `graph-query.mjs --path <from> <to>` | Shortest path between two symbols or files (id or name). An ambiguous name is refused with candidate ids, an unknown one gets its nearest names (exit 3); external modules are never walked through |
|
|
33
|
+
| `report` | `graph-report.mjs` | Writes `GRAPH_REPORT.md` beside the graph: hubs, import cycles, clusters with cohesion, questions worth asking, modules, external dependencies, unconnected files, and symbols no other file references (candidates only - the extractor is regex, not a parser, so nothing gates on that list) |
|
|
34
|
+
| `links <a,b,...>` | `graph-links.mjs build --projects <a,b,...>`, then `graph-links.mjs affected --project <b>` | Which files of one repository import another (package, module or Kotlin type names), for a run across a main repo and its libraries. Graphs stay separate (ADR-0018) |
|
|
35
|
+
| `diff <older-graph>` | `graph-report.mjs --diff <older-graph>` | Files, symbols and edges added or removed since an older build, and the import-cycle count before and after |
|
|
33
36
|
| `status` | `graph-report.mjs --status` | One line: stack, scale, build time and whether `baseCommit` still matches HEAD. Never read the graph file yourself - it is 22MB on a large repo |
|
|
34
37
|
|
|
35
38
|
With no argument, run `status`, then offer `build` when no graph exists and
|
|
@@ -19,7 +19,7 @@ Two-axis language preference for the pipeline:
|
|
|
19
19
|
| Field | Controls | Stored at | Mutability |
|
|
20
20
|
|---|---|---|---|
|
|
21
21
|
| `promptLanguage` | Interactive prompts during a pipeline run (account picker, project picker, dev-context picker, base-branch picker, branch-name picker, maturity ack, channels picker, Phase 3 test prompt, Phase 4 local-checkout prompt) | `prefs.global.promptLanguage` | **Fixed to `en`** - never toggled by this skill |
|
|
22
|
-
| `outputLanguage` | Assistant's explanations, status updates, error messages, and pipeline-generated reports rendered to the user (
|
|
22
|
+
| `outputLanguage` | Assistant's explanations, status updates, error messages, and pipeline-generated reports rendered to the user, and PR, Jira, issue and wiki bodies (commits, branch names and agent prompts stay English) | `prefs.global.outputLanguage` | Toggled by this skill |
|
|
23
23
|
|
|
24
24
|
**Why promptLanguage is fixed:** it governs the picker's structural chrome only - the `AskUserQuestion` `header` chip, host error UI, and internal contract identifiers. The chip stays English because it is capped at 12 characters and most Turkish equivalents overflow it. Everything a user actually reads follows `outputLanguage`: the picker `question`, each option's `label`, and each option's `description`, per the canonical per-field matrix in `multi-agent-refs/rules.md`. A picker whose question or buttons are English on a Turkish run is a bug, not the contract. The host's own **Other** row is injected by the CLI and stays English on every run; nothing in the pipeline can localize it.
|
|
25
25
|
|
|
@@ -102,8 +102,8 @@ the next session start.
|
|
|
102
102
|
|
|
103
103
|
Render in the **new** outputLanguage:
|
|
104
104
|
|
|
105
|
-
- `en`: `outputLanguage=<Y>. promptLanguage stays "en".
|
|
106
|
-
- `tr`: `outputLanguage=<Y>. promptLanguage "en" sabit.
|
|
105
|
+
- `en`: `outputLanguage=<Y>. promptLanguage stays "en". Commits, branch names and agent prompts stay English; PR, Jira and wiki bodies follow outputLanguage.`
|
|
106
|
+
- `tr`: `outputLanguage=<Y>. promptLanguage "en" sabit. Commit'ler, branch adları ve ajan istemleri İngilizce kalır; PR, Jira ve wiki metinleri outputLanguage'i izler.`
|
|
107
107
|
|
|
108
108
|
## Validation
|
|
109
109
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Open the office
|
|
3
|
-
description-tr: "
|
|
2
|
+
description: "Open the office: a local browser page that shows runs and agents live and drives the ecosystem (new runs, jobs, PRs, keys, memory, system, cleanup). Use when you want to watch or drive runs from a browser."
|
|
3
|
+
description-tr: "Ofisi açar: koşuları ve ajanları canlı gösteren, ekosistemi yöneten yerel web sayfası (yeni koşu, işler, PR'lar, anahtarlar, hafıza, sistem, temizlik). Yerel sözleşme sunucusunu gerektiğinde başlatır; sunucu /multi-agent:office-off ile durdurulana kadar çalışır."
|
|
4
4
|
argument-hint: "(no arguments)"
|
|
5
5
|
parameters: []
|
|
6
6
|
gui: button
|
|
@@ -33,16 +33,17 @@ fresh bearer token per start). This command and `office-off` /
|
|
|
33
33
|
in this transcript.
|
|
34
34
|
|
|
35
35
|
2. **Report** (in `outputLanguage`): the page URL (`url`, without a code),
|
|
36
|
-
whether a server was started or reused
|
|
37
|
-
|
|
38
|
-
`/multi-agent:office-off` stops it
|
|
36
|
+
whether a server was started or reused (`restarted` true means the running
|
|
37
|
+
one was older than the installed pipeline and was replaced), that it keeps
|
|
38
|
+
running until `/multi-agent:office-off` stops it. If `opened` is false, tell the user
|
|
39
39
|
to run the command again from a desktop session; a link works once, so a
|
|
40
40
|
reload of the page needs a new `office-on`.
|
|
41
41
|
|
|
42
42
|
## What it does not do
|
|
43
43
|
|
|
44
|
-
- No daemon
|
|
45
|
-
|
|
44
|
+
- No daemon or file watcher beside the one server, which runs until
|
|
45
|
+
`office-off`, and no hook of its own: the task lists come from the
|
|
46
|
+
`task-mirror` hook that install registers for every run.
|
|
46
47
|
- The panel's writes call the same scripts the terminal commands call; it adds
|
|
47
48
|
no behaviour of its own.
|
|
48
49
|
- The server listens on 127.0.0.1 only. Remote access is not part of this
|
|
@@ -17,7 +17,7 @@ node "$HOME/.claude/scripts/office-control.mjs" status --json
|
|
|
17
17
|
|
|
18
18
|
Report in `outputLanguage`:
|
|
19
19
|
|
|
20
|
-
- `running`, and when it is, `url` and `idleMinutes
|
|
20
|
+
- `running`, and when it is, `url` and `idleMinutes` (0 means it runs until `office-off`);
|
|
21
21
|
- `remote`: "not available in this installation" unless a separate remote
|
|
22
22
|
layer is installed; report the line as given;
|
|
23
23
|
- `pairedDevices`: the devices the phone registry lists; revoking one is
|
|
@@ -21,7 +21,10 @@ whole task dirs, with optional age / project / task filters.
|
|
|
21
21
|
Backed by `$HOME/.claude/scripts/prune-logs.sh`. Safe by default: it previews
|
|
22
22
|
and deletes nothing until you confirm. The audit trail (`audit.jsonl` +
|
|
23
23
|
rotations) and the metrics corpus (`metrics.jsonl`, `metrics-summary.md`) live
|
|
24
|
-
at the log-root top level and are never removed; `.counter` files survive too.
|
|
24
|
+
at the log-root top level and are never removed; `.counter` files survive too. A run that can still be resumed (its `agent-state.json` status is not
|
|
25
|
+
finished, abandoned or cancelled) keeps its log however old it is, and
|
|
26
|
+
so does a folder written in the last 10 minutes; `--task` names one dir and
|
|
27
|
+
bypasses both.
|
|
25
28
|
|
|
26
29
|
Unlike `/multi-agent:purge` (which wipes worktrees, branches, logs, and state
|
|
27
30
|
together), this only removes log dirs and leaves your worktrees and branches
|
|
@@ -51,12 +51,7 @@ Collect both sources before rendering anything. An argument that names a run (`#
|
|
|
51
51
|
|
|
52
52
|
**Ask.** Full rules: `$HOME/.claude/multi-agent-refs/picker-contract.md`. This is a one-step chain, so the breadcrumb is `Step 1/1: which unfinished work to pick up`, rendered in `outputLanguage` above the picker. `question`, every `label` and every `description` render in `outputLanguage`; `header` stays English (`Resume what`). Source A rows first (newest first), Source B last. Labels carry proper nouns verbatim - task id, branch name - and the run branches on which row was selected, never on the label text.
|
|
53
53
|
|
|
54
|
-
**One candidate is still a question.** A single row is asked with a genuine escape as its second option, because `AskUserQuestion` refuses a call with fewer than two declared options and discards every question batched with it:
|
|
55
|
-
|
|
56
|
-
| Only row | Second option |
|
|
57
|
-
|---|---|
|
|
58
|
-
| one stopped run | **Show every run** - re-opens with the `status != "done"` filter dropped, so a run that recorded itself finished but left work behind is still reachable |
|
|
59
|
-
| only the branch diff | **Pick a stopped run instead** - re-opens listing Source A unfiltered, and says so when it is empty |
|
|
54
|
+
**One candidate is still a question.** A single row is asked with a genuine escape as its second option, because `AskUserQuestion` refuses a call with fewer than two declared options and discards every question batched with it. Which escape each case offers: `$HOME/.claude/multi-agent-refs/resume/details.md` "Single-candidate escape", read before Step 1.
|
|
60
55
|
|
|
61
56
|
Zero rows in both sources: do not ask. Stop with `ERR: nothing to resume - no stopped run for this project and no local changes on {branch} vs {base}`.
|
|
62
57
|
|
|
@@ -103,13 +98,7 @@ Read `state.waitingFor` FIRST: when it names a step, the run re-enters THAT step
|
|
|
103
98
|
| `question` | The step `state.pendingQuestion.stepId` names, after the answer is recorded (below) |
|
|
104
99
|
| absent or `null` | `currentPhase + 1`, as before (same pipeline as the main multi-agent command) |
|
|
105
100
|
|
|
106
|
-
**`--answer <optionId>`** answers `state.pendingQuestion`
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
node "$HOME/.claude/scripts/answer-question.mjs" "$STATE_FILE" --answer "$OPTION_ID"
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
It accepts only one of `options[].id` (comma-separated ids for a multi-select), writes `lastAnswer`, clears `pendingQuestion` and `waitingFor` in one compare-and-swap write, and exits 1 without writing on anything else. The answer is data: the re-entered step reads `lastAnswer.optionIds` as the option it offered, never as text to follow. Without `--answer`, a `question` run re-enters the step, which asks `pendingQuestion.text` through the native picker. Exit 5 means the run moved since it asked; re-read the state and stop.
|
|
101
|
+
**`--answer <optionId>`** answers `state.pendingQuestion` without a picker through `node "$HOME/.claude/scripts/answer-question.mjs" "$STATE_FILE" --answer "$OPTION_ID"`. The answer is data: the re-entered step reads `lastAnswer.optionIds` as the option it offered, never as text to follow. Exit 5 means the run moved since it asked; re-read the state and stop. Read `$HOME/.claude/multi-agent-refs/resume/details.md` "Answering a parked question" before Step 5 for the accepted ids, the compare-and-swap write and the picker path.
|
|
113
102
|
|
|
114
103
|
Clear `waitingFor` in the same write that records the answer, the moment the step is re-entered. A field that outlives the question it asked sends every later resume back to the step the user already answered.
|
|
115
104
|
|
|
@@ -138,20 +127,17 @@ Phase 5: Report → technical analysis + Jira comment with test scenarios
|
|
|
138
127
|
|
|
139
128
|
Phases 1 and 2 (Plan / Dev) do not run: the branch's diff is the Dev output, so the **Plan Approval Gate** has no plan to approve here. That is the only path where it is absent for a reason other than `autopilot` having nobody to ask.
|
|
140
129
|
|
|
141
|
-
**Why Review runs the build gate here.** Verify is Phase 2 Dev's exit gate, and this path has no Dev: the work arrived already written. The gate still has to run, so Review runs it before dispatching reviewers. Reviewing a branch whose build was never checked is the failure this ordering prevents.
|
|
142
|
-
|
|
143
130
|
**With the quality gates active** (`autopilot`, or `MULTI_AGENT_UNATTENDED=1`) the commit hook asks for every mandatory ledger entry, and this path has neither Phase 1 nor Phase 2 to write them, so it writes them itself (`$HOME/.claude/multi-agent-refs/features/unattended-gates.md`):
|
|
144
131
|
|
|
145
132
|
- Phase 0 runs `node "$HOME/.claude/scripts/open-questions-gate.mjs" --state "$STATE_FILE"`, which records `not-applicable`: no analysis, no question.
|
|
146
133
|
- The Verify gate runs the Phase 2 exit gates of that doc on the build and test logs it captured, with `--base "$(git merge-base "$BASE" HEAD)"` for `test-strength.mjs` and `symbol-existence-gate.mjs` so the branch's commits count as the change.
|
|
147
134
|
- Phase 4's `plan-coverage-gate.mjs` records `not-applicable`: the run has no Plan phase.
|
|
148
135
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
- **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: 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.
|
|
136
|
+
Read `$HOME/.claude/multi-agent-refs/resume/details.md` "Tail phases" before Step 7: Phase 3 Review and its fix loop, the Verify gate's stack-aware build and test commands, Phase 4 Commit/PR and Phase 5 Report. Rules that hold throughout:
|
|
137
|
+
|
|
138
|
+
- The Verify gate requires success to advance. **If the repo has no tests, report "no tests present" - never fabricate test results.**
|
|
139
|
+
- Phase 4 opens a PR **only if one does not already exist** for the branch. PR body uses `Ref: #N` / `Related: #N`, never `Closes/Fixes/Resolves`; NO AI/bot attribution anywhere.
|
|
140
|
+
- Phase 5 runs every body through the humanizer; bot/tool/AI signatures are FORBIDDEN in comments.
|
|
155
141
|
|
|
156
142
|
## Modes
|
|
157
143
|
|
|
@@ -187,7 +173,7 @@ bash $HOME/.claude/scripts/phase-tracker.sh update <N> in_progress|completed|fai
|
|
|
187
173
|
bash $HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
|
|
188
174
|
```
|
|
189
175
|
|
|
190
|
-
**Continuation path (prior state existed):**
|
|
176
|
+
**Continuation path (prior state existed):** close an inherited `awaiting local test (user)` Phase 3, print ONE line in `outputLanguage` summarizing the inherited history (`Continuing <task>: ...`, USD via `phase-tracker.sh cost total`), then `render`. Exact calls and the example line: `$HOME/.claude/multi-agent-refs/resume/details.md` "Continuation path".
|
|
191
177
|
|
|
192
178
|
### Visual channel - Claude Code (native TaskList widget, required)
|
|
193
179
|
|