@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Review - PR picker and diff fetch (Steps 1a and 2)
|
|
2
|
+
|
|
3
|
+
> Loaded by `review/SKILL.md` Steps 1a and 2. The SKILL keeps when each step runs, the autopilot fallback and the per-PR loop; this file carries the list commands, the picker fields and the per-provider fetch commands.
|
|
4
|
+
|
|
5
|
+
## Step 1a - No-input PR picker
|
|
6
|
+
|
|
7
|
+
**List open PRs across both providers** (a provider contributes nothing if its token/CLI is absent - never hard-fail on one provider):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# GitHub: current repo's open PRs + the user's own/requested open PRs across repos.
|
|
11
|
+
gh pr list --state open --json number,title,url,headRefName,author,updatedAt 2>/dev/null # current repo
|
|
12
|
+
gh search prs --state open --review-requested=@me --json number,title,url,repository,updatedAt 2>/dev/null
|
|
13
|
+
gh search prs --state open --author=@me --json number,title,url,repository,updatedAt 2>/dev/null
|
|
14
|
+
|
|
15
|
+
# Bitbucket Server: for each configured bitbucket repo (prefs recentRepos / dev-context),
|
|
16
|
+
# resolve creds via credential-store (see Step 2 bitbucket block) then:
|
|
17
|
+
# GET https://$host/rest/api/1.0/projects/$KEY/repos/$slug/pull-requests?state=OPEN&role=REVIEWER
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Merge into one deduped list, each row labeled with its provider and PR URL; sort by `updatedAt` desc. If the merged list is EMPTY -> tell the user "no open PRs found", fall back to branch mode, and continue.
|
|
21
|
+
|
|
22
|
+
**Select** - follow `$HOME/.claude/multi-agent-refs/picker-contract.md` (breadcrumb narrator line before the prompt), then `AskUserQuestion` `multiSelect: true`:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
question (outputLanguage): "Hangi PR('lar)ı review edeyim?"
|
|
26
|
+
header (English): "Review PRs"
|
|
27
|
+
options: one per open PR -> label "#<N> <short title>", description (outputLanguage): "<repo> · <provider> · <headRef>"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Each selected option maps back to a full `agent-state.review.input` descriptor (provider + orgRepo / bb coordinates + prNumber + raw URL), exactly as Step 1 would have parsed an explicit URL. Then **loop Steps 2-7 once per selected PR** (independent review + post each). If the user selects none, fall back to branch mode.
|
|
31
|
+
|
|
32
|
+
## Step 2 - Fetch the diff
|
|
33
|
+
|
|
34
|
+
**branch mode:**
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git diff origin/develop...{ref}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**pr mode - github:**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
gh pr diff "$pr_number" --repo "$org_repo" > /tmp/multi-agent-review-${TASK_ID}-diff.patch
|
|
44
|
+
# Also capture the head commit SHA for GitHub inline-comment anchors
|
|
45
|
+
# (POST .../pulls/{n}/comments requires commit_id):
|
|
46
|
+
HEAD_SHA=$(gh api "/repos/$org_repo/pulls/$pr_number" --jq .head.sha)
|
|
47
|
+
printf '%s\n' "$HEAD_SHA" > /tmp/multi-agent-review-${TASK_ID}-head.sha
|
|
48
|
+
# Persist into agent-state - post-pr-review.sh reads it from there.
|
|
49
|
+
tmp_state=$(mktemp)
|
|
50
|
+
jq --arg sha "$HEAD_SHA" '.review.headCommitSha = $sha' "$AGENT_STATE" > "$tmp_state" \
|
|
51
|
+
&& mv "$tmp_state" "$AGENT_STATE"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**pr mode - bitbucket-server:**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Resolve credentials via prefs.global.keychainMapping (never hardcode key names).
|
|
58
|
+
. "$HOME/.claude/lib/credential-store-resolver.sh" \
|
|
59
|
+
|| . "$HOME/.copilot/lib/credential-store-resolver.sh"
|
|
60
|
+
resolve_credential_store
|
|
61
|
+
USER_KEY=$(jq -r '.global.keychainMapping.bitbucket_user' "$HOME/.claude/multi-agent-preferences.json")
|
|
62
|
+
TOKEN_KEY=$(jq -r '.global.keychainMapping.bitbucket_token' "$HOME/.claude/multi-agent-preferences.json")
|
|
63
|
+
BB_USER=$("$CRED_STORE" get "$USER_KEY")
|
|
64
|
+
BB_TOKEN=$("$CRED_STORE" get "$TOKEN_KEY")
|
|
65
|
+
|
|
66
|
+
DIFF_FILE="/tmp/multi-agent-review-${TASK_ID}-diff.patch"
|
|
67
|
+
http=$(curl -sS -m 60 --config <(printf 'user = "%s:%s"\n' "$BB_USER" "$BB_TOKEN") -H "Accept: text/plain" \
|
|
68
|
+
"https://$bb_server_host/rest/api/1.0/projects/$bb_project_key/repos/$bb_repo_slug/pull-requests/$pr_number/diff?contextLines=10" \
|
|
69
|
+
-o "$DIFF_FILE" -w '%{http_code}')
|
|
70
|
+
if [ "$http" != "200" ]; then
|
|
71
|
+
echo "review: Bitbucket diff fetch failed (HTTP $http) - error body in $DIFF_FILE" >&2
|
|
72
|
+
rm -f "$DIFF_FILE"
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The `credential-store.sh` wrapper reads the macOS Keychain (`security`).
|
|
78
|
+
|
|
79
|
+
## Input matrix
|
|
80
|
+
|
|
81
|
+
| Input | Mode | PR action |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| no args (interactive) | PR picker (open GitHub + Bitbucket PRs, multi-select) | inline comments + approve/needs-work, per selected PR |
|
|
84
|
+
| no args (autopilot / no PRs) | branch (current) | none - chat only |
|
|
85
|
+
| `feature/foo` | branch (named) | none - chat only |
|
|
86
|
+
| `#N`, `repo#N`, GitHub PR URL | pr (github) | inline comments + approve/needs-work |
|
|
87
|
+
| Bitbucket Server PR URL | pr (bitbucket-server) | inline comments + approve/needs-work |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Review - Module review guide discovery (Step 2b)
|
|
2
|
+
|
|
3
|
+
> Loaded by `review/SKILL.md` Step 2b. The SKILL keeps what a guide is, the reviewer-prompt injection and the scope rule; this file carries the discovery walk and the PR-mode probe.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# Changed file paths from the patch:
|
|
7
|
+
grep -E '^\+\+\+ b/' "$DIFF_FILE" | sed 's|^+++ b/||' | sort -u > /tmp/multi-agent-review-${TASK_ID}-paths.txt
|
|
8
|
+
|
|
9
|
+
# For each changed path, walk its directory chain up to the repo root and
|
|
10
|
+
# collect guide files matching: CLAUDE.md, *-CLAUDE.md, AGENTS.md.
|
|
11
|
+
# Root-level CLAUDE.md/AGENTS.md are excluded - the host CLI already loads those.
|
|
12
|
+
guides=()
|
|
13
|
+
while IFS= read -r p; do
|
|
14
|
+
d=$(dirname "$p")
|
|
15
|
+
while [ "$d" != "." ] && [ "$d" != "/" ]; do
|
|
16
|
+
for g in "$d"/CLAUDE.md "$d"/*-CLAUDE.md "$d"/AGENTS.md; do
|
|
17
|
+
[ -e "$g" ] && guides+=("$g")
|
|
18
|
+
done
|
|
19
|
+
d=$(dirname "$d")
|
|
20
|
+
done
|
|
21
|
+
done < /tmp/multi-agent-review-${TASK_ID}-paths.txt
|
|
22
|
+
# dedupe, cap at 5 (log any dropped so truncation is never silent)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Existence checks are resolved against the local checkout when the cwd is the target repo. In PR mode without a local checkout, probe the candidate paths via the provider API instead (`gh api /repos/{o}/{r}/contents/{path}?ref={headSha}` / Bitbucket `GET /projects/{KEY}/repos/{slug}/browse/{path}?at={headSha}`) and fetch the matching files' raw content the same way. No hit → step is a silent no-op.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Review - Valven delivery-rule gate (Step 2c)
|
|
2
|
+
|
|
3
|
+
> Loaded by `review/SKILL.md` Step 2c. The SKILL keeps the not-measured rule and the NEEDS WORK rule; this file carries the per-input gate arguments, the checkout-vs-diff-file choice, and the handling of every rule family. Rule definitions: `$HOME/.claude/multi-agent-refs/features/valven.md`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
VG_FILE="/tmp/multi-agent-review-${TASK_ID}-valven.json"
|
|
7
|
+
VG_ARGS=(--mode review --out "$VG_FILE")
|
|
8
|
+
case "$kind/$provider" in
|
|
9
|
+
branch/local)
|
|
10
|
+
VG_ARGS+=(--repo . --base origin/develop --head "$ref") ;;
|
|
11
|
+
pr/github)
|
|
12
|
+
node "$HOME/.claude/scripts/pr-timeline.mjs" --repo "$org_repo" --pr "$pr_number" \
|
|
13
|
+
--out "/tmp/multi-agent-review-${TASK_ID}-pr.json" # gh pr view + ready time + bot-typed reviews
|
|
14
|
+
jq -r '.body // ""' "/tmp/multi-agent-review-${TASK_ID}-pr.json" > "/tmp/multi-agent-review-${TASK_ID}-body.md"
|
|
15
|
+
jq -r '.commits[] | "\(.authoredDate)\t\(.messageHeadline)"' "/tmp/multi-agent-review-${TASK_ID}-pr.json" > "/tmp/multi-agent-review-${TASK_ID}-commits.txt"
|
|
16
|
+
VG_ARGS+=(--branch "$(jq -r .headRefName "/tmp/multi-agent-review-${TASK_ID}-pr.json")"
|
|
17
|
+
--pr-body-file "/tmp/multi-agent-review-${TASK_ID}-body.md"
|
|
18
|
+
--commits-file "/tmp/multi-agent-review-${TASK_ID}-commits.txt"
|
|
19
|
+
--pr-meta-file "/tmp/multi-agent-review-${TASK_ID}-pr.json") ;;
|
|
20
|
+
pr/bitbucket-server)
|
|
21
|
+
# Same credentials as Step 2. PR: fromRef.displayId + description; commits: values[].message.
|
|
22
|
+
# Write the description to ...-body.md, one "<ISO authorTimestamp>\t<first message line>" per commit to ...-commits.txt,
|
|
23
|
+
# and the timeline to ...-meta.json (features/valven.md, "Development Behaviors"). Then:
|
|
24
|
+
VG_ARGS+=(--branch "$BB_FROM_REF" --pr-body-file "/tmp/multi-agent-review-${TASK_ID}-body.md"
|
|
25
|
+
--commits-file "/tmp/multi-agent-review-${TASK_ID}-commits.txt"
|
|
26
|
+
--pr-meta-file "/tmp/multi-agent-review-${TASK_ID}-meta.json") ;;
|
|
27
|
+
esac
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For PR input: when the cwd is a checkout of the same repo, `git fetch origin "<headRef>"` (this moves no HEAD) and add `--repo . --base "origin/<baseRef>" --head FETCH_HEAD`, so sizes and the rework ratio come from history. Otherwise add `--diff-file "$DIFF_FILE"`; the rework rule then reports `not-measured`, which is stated in the summary rather than read as a pass.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
node "$HOME/.claude/scripts/valven-gate.mjs" "${VG_ARGS[@]}" >/dev/null
|
|
34
|
+
VG_RC=$? # 0 clean, 1 findings, 2 could not run
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- Exit 2: print the stderr line and continue the review with `Valven: not measured (<reason>)` in the Step 6 summary. Never print it as passed.
|
|
38
|
+
- The gate's `findings[]` join the reviewer findings at Step 5 with `tag: valven`. They are measurements, so triage accepts them unless the task is exempt; an accepted `important` or `blocking` one makes the Step 7 decision NEEDS WORK.
|
|
39
|
+
- When `splitRequired` is true, run `node "$HOME/.claude/scripts/valven-split.mjs" --repo . --base "origin/<baseRef>" --head <head>` (plan only, no `--apply`) where a checkout exists, and append the slice table (branch, lines, files) to the `VLV-SIZE-01` finding's `fix`.
|
|
40
|
+
- When `VLV-AGE-01`, `VLV-BEHIND-01` or `VLV-TRACE-03` fires and a checkout exists, put the `valven-port.mjs` plan (same base and head, no `--apply`) in the finding's `fix` as `$HOME/.claude/multi-agent-refs/features/valven.md`, "Old work", lists it.
|
|
41
|
+
- The registry's judgement rules (`rules:` block: `VLV-SCOPE-02`, `VLV-PRDESC-02`) go into every reviewer prompt in Step 3, with the PR body when one exists. Each reviewer returns a verdict per ID.
|
|
42
|
+
- `VLV-CYCLE-01..03` are `suggestion` findings with a Valven score and never set NEEDS WORK alone; `VLV-PICKUP-01` is `important` for no reviewer, a `suggestion` for an old draft. Branch input reports them `not-measured`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Standalone review: its own tracker record
|
|
2
|
+
|
|
3
|
+
A standalone review (the command seeded a `review-` id, so no pipeline run
|
|
4
|
+
owns this session) registers itself, so its progress shows wherever runs
|
|
5
|
+
are read (the office panel, `/multi-agent:status`). Inside a pipeline run the
|
|
6
|
+
run's own tracker already covers it; skip this block.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
case "$TASK_ID" in review-*)
|
|
10
|
+
S="${LOGS_ROOT:-$HOME/.claude/logs/multi-agent}/$TASK_ID"; mkdir -p "$S"
|
|
11
|
+
printf '{"taskId":"%s","mode":"review","status":"in_progress","currentPhase":0}' "$TASK_ID" \
|
|
12
|
+
| node "$HOME/.claude/scripts/write-state.mjs" "$S/agent-state.json" >/dev/null
|
|
13
|
+
export MULTI_AGENT_TASK_ID="$TASK_ID"
|
|
14
|
+
bash "$HOME/.claude/scripts/phase-tracker.sh" init "$TASK_ID"
|
|
15
|
+
for p in "0:Input" "1:Diff" "2:Reviewers" "3:Triage" "4:Report"; do
|
|
16
|
+
bash "$HOME/.claude/scripts/phase-tracker.sh" add "${p%%:*}" "${p#*:}"
|
|
17
|
+
done
|
|
18
|
+
bash "$HOME/.claude/scripts/phase-tracker.sh" update 0 in_progress ;;
|
|
19
|
+
esac
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Step 1 (1, 1a) is tracker step 0, step 2 (2-2c) step 1, steps 3-4b step 2,
|
|
23
|
+
step 5 step 3 and steps 6-7 step 4: `update <N> in_progress` on entry and `completed` on exit. Each later
|
|
24
|
+
call runs in a new shell where `$TASK_ID` is no longer set, so it carries the
|
|
25
|
+
review's id written out literally (the `review-...` value the registration
|
|
26
|
+
used) and refuses the global pointer, which another run's `init` can move:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
MULTI_AGENT_TASK_ID=review-1 MULTI_AGENT_STRICT_TASK_ID=1 \
|
|
30
|
+
bash "$HOME/.claude/scripts/phase-tracker.sh" update 2 completed
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
After step 7 a standalone review closes its record with the same `write-state.mjs` call and
|
|
34
|
+
`"status":"complete","currentPhase":4`.
|
|
35
|
+
|
|
36
|
+
Reviewer token counts (`phase-tracker.sh tokens <N> ...`) go under step 2
|
|
37
|
+
(Reviewers); inside a pipeline run they go under the run's Review phase.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Setup - Per-account hosts and auto-learned fields
|
|
2
|
+
|
|
3
|
+
> Loaded by `setup/SKILL.md` Step 3.6 and its auto-learned-fields note. The SKILL keeps when Step 3.6 runs and the autopilot skip; this file carries the prompt, the saved shape and the resolver precedence, plus the fields the pipeline learns from use instead of asking.
|
|
4
|
+
|
|
5
|
+
## Per-account host overrides (Step 3.6)
|
|
6
|
+
|
|
7
|
+
Use case: a single user with two corporate identities (e.g. agency + client). Each account points at its own Jira host - `prefs.global.hosts.jira` can hold only one default, so per-account overrides win for the rest.
|
|
8
|
+
|
|
9
|
+
For each non-default account, ask once:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Account {label} has Jira/Bitbucket tokens but no host override yet.
|
|
13
|
+
Use the global default ({hosts.jira}) or set a per-account host?
|
|
14
|
+
|
|
15
|
+
1) Use global default
|
|
16
|
+
2) Set per-account host
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If `2`, prompt for `jiraHost` / `bitbucketHost` / `confluenceHost` (each optional). Save to `prefs.global.accounts[]` as `{ \"id\": \"client-x\", \"jiraHost\": \"client-x.atlassian.net\", \"bitbucketHost\": \"bitbucket.client-x.com\" }`.
|
|
20
|
+
|
|
21
|
+
`account-resolver.sh` reads this on every invocation; per-account override wins over `global.hosts.*`. Skip this step on autopilot - `accounts[]` stays empty until the user opts in via `/multi-agent:setup accounts`.
|
|
22
|
+
|
|
23
|
+
## Auto-learned fields
|
|
24
|
+
|
|
25
|
+
**Jira Project Key**: auto-learned from pipeline usage. User runs `/multi-agent ABC-123` → `ABC` is extracted and saved to `prefs.global.defaultJiraKey` (first ever) and `prefs.projects[{project}].jiraProjectKeys` (per-project). Multiple keys accumulate over time - most recent first, deduped. Phase 0 Step 1 (Parse Input) handles extraction.
|
|
26
|
+
|
|
27
|
+
**Git Identity**: auto-learned from token onboarding. Each token saved in Step 3 triggers an identity prompt (see Token Save Flow Step C). No separate identity setup step.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
- [Apple ID + app-specific password](#apple-id-app-specific-password)
|
|
6
6
|
- [Multi-provider accounts](#multi-provider-accounts)
|
|
7
7
|
- [Verify + expiry](#verify-expiry)
|
|
8
|
+
- [Step 3b in one paragraph](#step-3b-in-one-paragraph)
|
|
8
9
|
<!-- /toc -->
|
|
9
10
|
|
|
10
11
|
Loaded on demand by `/multi-agent:setup` Step 3b (iOS only, optional). The SKILL.md carries the step intro; this file is the full flow.
|
|
@@ -149,3 +150,7 @@ the resolved tier. A credential that resolves but is rejected (401/403) follows
|
|
|
149
150
|
Expired-token decision in `refs/keychain.md` Rule 1 - Regenerate / Use a
|
|
150
151
|
different token / Skip and continue - never a silent drop. Regenerating the API
|
|
151
152
|
key repeats steps 2 to 5 with the new file.
|
|
153
|
+
|
|
154
|
+
## Step 3b in one paragraph
|
|
155
|
+
|
|
156
|
+
Runs inside Step 3. Every part of the API key lives in the Keychain, the `.p8` included: ask for the `.p8` as a path, validate it BEFORE saving with `node "$HOME/.claude/scripts/probe-store-key.mjs" --asc ...` (exit 0 only), map `appstore_connect_private_key`, store it from the file with `credential-store.sh set appstore_connect_private_key - < <AuthKey_<keyId>.p8>`, run `node "$HOME/.claude/scripts/write-store-config.mjs"`, then offer (picker, default keep) to delete the file. `store_asc_*` and `ios_testflight_validate` then read the key from the Keychain. The five entries, the tier picker and the probes: `$HOME/.claude/multi-agent-refs/setup/app-store-connect.md`. On Skip, nothing is written.
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- [4. appId discovery](#4-appid-discovery)
|
|
8
8
|
- [5. v1alpha, and what to do when it breaks](#5-v1alpha-and-what-to-do-when-it-breaks)
|
|
9
9
|
- [6. Skipping](#6-skipping)
|
|
10
|
+
- [Step 3c in one paragraph](#step-3c-in-one-paragraph)
|
|
10
11
|
<!-- /toc -->
|
|
11
12
|
|
|
12
13
|
Loaded on demand by `/multi-agent:setup` Step 3c (optional, any platform). The SKILL.md carries the step intro; this file is the full flow.
|
|
@@ -158,3 +159,7 @@ are simply not enriched, and the run says so rather than pretending it looked.
|
|
|
158
159
|
Never lead with "paste the stack trace yourself" - that is tier 3, and offering
|
|
159
160
|
the last resort first trains the user to skip the durable fix (`refs/keychain.md`
|
|
160
161
|
Rule 2).
|
|
162
|
+
|
|
163
|
+
## Step 3c in one paragraph
|
|
164
|
+
|
|
165
|
+
Runs inside Step 3. Measure first - `bash "$HOME/.claude/lib/fetch-crashlytics.sh" --probe` answers `tier-1-ready` / `tier-1-no-grant` / `malformed` / `unreachable` - then ask by that answer, never blind. Store the JSON as issued; never base64 it. Skip writes nothing. Then offer appId discovery: `bash "$HOME/.claude/scripts/firebase-app-discovery.sh" <repo> --json` reads the pairs the repo already carries, for `firebase.accounts[].apps[]` - it saves a round trip per run; skipping costs nothing. The picker, both tiers, the role-request wording and the v1alpha caveat: `$HOME/.claude/multi-agent-refs/setup/firebase.md`.
|
|
@@ -68,3 +68,7 @@ toolkit then reports Google Play as configured from the Keychain, and
|
|
|
68
68
|
|
|
69
69
|
The JSON stays on disk unless the user asks otherwise: Google issues a new key on
|
|
70
70
|
request, so the file is not the only copy the way a `.p8` is.
|
|
71
|
+
|
|
72
|
+
## Step 3d in one paragraph
|
|
73
|
+
|
|
74
|
+
Runs inside Step 3, only when the target repo is Android. One entry, `google_play`: the service-account JSON the toolkit's `store_play_*` tools use, which lets `/multi-agent:store-ready` run Android Gate 2. Ask for the JSON's path, validate BEFORE saving with `node "$HOME/.claude/scripts/probe-store-key.mjs" --play --service-account <path>`, map `google_play`, then `credential-store.sh set google_play - < <path>` and `write-store-config.mjs`. Account prerequisites, the picker and the probe hints: `$HOME/.claude/multi-agent-refs/setup/google-play.md`. Skip writes nothing.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Setup - Enforcement hooks (Step 8) and stack plugins (Step 9)
|
|
2
|
+
|
|
3
|
+
> Loaded by `setup/SKILL.md` Steps 8 and 9. The SKILL keeps what is offered and the commands; this file carries the merge rules for the hooks template and how the stack answer is read. Read it before Step 8.
|
|
4
|
+
|
|
5
|
+
## Step 8 - Hook merge rules
|
|
6
|
+
|
|
7
|
+
- Ask (picker): "Install the pipeline's hooks into `~/.claude/settings.json`?" Default Yes.
|
|
8
|
+
- On Yes, deep-merge EVERY event in the template's `hooks` object (merging `PreToolUse` alone drops the capture hooks); keep existing hooks, never duplicate a matcher calling the same script.
|
|
9
|
+
- Say only the three gates are hookable (no run-specific arguments); the rest are phase-enforced.
|
|
10
|
+
- Say the read-size gate stays inert until `prefs.global.bulkRead.mode` is set; recommend `observe` first (why, and the Phase 3 exemption: `picker-contract.md`).
|
|
11
|
+
|
|
12
|
+
## Step 9 - Reading the stack answer
|
|
13
|
+
|
|
14
|
+
Ask the detector, then derive. No marker list here: a second list is a second
|
|
15
|
+
answer, and it drifts from the detector.
|
|
16
|
+
|
|
17
|
+
Report `MA_STACK_WHY` with the result. `ai-common-toolkit` and
|
|
18
|
+
`ai-analyst-toolkit` are in every answer, the empty one included: neither is
|
|
19
|
+
stack-specific. **No marker matched is an answer** - those two, not a guess.
|
|
20
|
+
A name the marketplace does not carry is dropped with `dropped[]` naming it,
|
|
21
|
+
so a toolkit that was never shipped is caught before it fails to load.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Setup Step 0 - Language Selection (full contract)
|
|
2
|
+
|
|
3
|
+
> Loaded by `setup/SKILL.md` Step 0. The SKILL keeps the order (this question comes first) and the fixed-English rules; this file carries the two language axes, the exact prompt, validation, the confirmation lines and the unknown-input rule. Read it before Step 0. Pickers follow `$HOME/.claude/multi-agent-refs/picker-contract.md`.
|
|
4
|
+
|
|
5
|
+
Ask BEFORE anything else, so every subsequent setup prompt and the rest of the pipeline honour the choice. The pipeline has two language axes:
|
|
6
|
+
|
|
7
|
+
| Axis | What it controls | Configurable? |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `promptLanguage` | Picker chrome only: the `AskUserQuestion` `header` chip, host error UI, internal contract identifiers | **No - fixed to `en`.** The chip is capped at 12 chars, which most Turkish equivalents overflow. |
|
|
10
|
+
| `outputLanguage` | The assistant's non-interactive explanations, status updates, error messages, and pipeline-generated reports rendered to the user | Yes - set here and changeable later via `/multi-agent:language <en\|tr>` |
|
|
11
|
+
|
|
12
|
+
`promptLanguage` is seeded as `"en"` and never offered to the user. Commits, branch names, PR title prefixes, reviewer and triage prompts and agent-log.md stay English; PR, Jira, issue and wiki bodies follow `outputLanguage` (`multi-agent-refs/rules.md`, Language Application).
|
|
13
|
+
|
|
14
|
+
#### Step 0 prompt - `outputLanguage`
|
|
15
|
+
|
|
16
|
+
The setup wizard asks one question (English UI per skill-prompt rules):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Which language should the assistant use for ITS OWN explanations,
|
|
20
|
+
status updates, and pipeline-generated reports?
|
|
21
|
+
|
|
22
|
+
1) English
|
|
23
|
+
2) Türkçe
|
|
24
|
+
|
|
25
|
+
Select (1-2):
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Rules:**
|
|
29
|
+
|
|
30
|
+
- **Already set in prefs** → skip silently. User can change later with `/multi-agent:language <en|tr>` or `/multi-agent:language output <en|tr>`.
|
|
31
|
+
- **New value** → validate against the schema enum (`en`, `tr`), write `prefs.global.outputLanguage` via atomic rename, force `prefs.global.promptLanguage = "en"`, then echo a confirmation in the just-chosen `outputLanguage`:
|
|
32
|
+
- `en`: `outputLanguage=<Y>. promptLanguage stays "en". Commits, branch names and reviewer prompts stay English; PR, Jira and wiki bodies follow outputLanguage.`
|
|
33
|
+
- `tr`: `outputLanguage=<Y>. promptLanguage "en" sabit. Commit'ler, branch adları ve review istemleri İngilizce kalır; PR, Jira ve wiki metinleri outputLanguage'i izler.`
|
|
34
|
+
- **Unknown input** → re-ask once, then abort setup with a hint pointing to `/multi-agent:language`.
|
|
35
|
+
|
|
36
|
+
From this point forward, every prompt in Steps 1-6 below follows the canonical
|
|
37
|
+
per-field matrix in `$HOME/.claude/multi-agent-refs/rules.md` ("Language Application"):
|
|
38
|
+
`question`, `label` and `description` render in `outputLanguage`; `header` stays
|
|
39
|
+
English. Wizard status and the post-setup summary follow `outputLanguage`. Commits,
|
|
40
|
+
branch names and agent prompts stay English; PR, Jira, issue and wiki bodies
|
|
41
|
+
follow `outputLanguage`.
|
|
42
|
+
|
|
43
|
+
> `promptLanguage` governs only the button and chip chrome, never the question a
|
|
44
|
+
> user reads. Rendering a whole prompt in English "per the fixed
|
|
45
|
+
> `promptLanguage`" contradicts the matrix above and produces half-English
|
|
46
|
+
> pickers on Turkish runs.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Setup Step 6 - Remember as Multi-Repo Group (full contract)
|
|
2
|
+
|
|
3
|
+
> Loaded by `setup/SKILL.md` Step 6. The SKILL keeps the trigger and the skip condition; this file carries the prompt, the auto-name heuristic, the saved shape, the LRU + dedup rules and the skip rules. Read it before Step 6.
|
|
4
|
+
|
|
5
|
+
After Step 5, if the user picked **2 or more** repos, offer to remember the combination as a named group. Phase 0's project picker surfaces saved groups at the top, so a multi-repo task ("update token resolver in `common` + `uicomponents`") becomes a single keypress next time.
|
|
6
|
+
|
|
7
|
+
Auto-skipped if Step 5 was skipped or fewer than 2 repos were selected.
|
|
8
|
+
|
|
9
|
+
**Prompt:**
|
|
10
|
+
```
|
|
11
|
+
Step 6 - Remember as a multi-repo group (optional)
|
|
12
|
+
You picked 2 repos: Checkout, UIComponents.
|
|
13
|
+
|
|
14
|
+
Save this combo for one-tap selection in Phase 0?
|
|
15
|
+
Group name (Enter for auto): [Checkout + UIComponents]
|
|
16
|
+
Skip with 'n'.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Auto-name heuristic** (suggested but editable):
|
|
20
|
+
- 2 repos → `"<repoA> + <repoB>"`
|
|
21
|
+
- 3-4 repos → `"<repoA>, <repoB>, <repoC>(+1)"`
|
|
22
|
+
- 5+ repos → `"<repoA> + <count-1> more"`
|
|
23
|
+
|
|
24
|
+
Repo identifiers in the label are the human label from `recentProjects` (basename of the path, not the full path), so groups stay readable.
|
|
25
|
+
|
|
26
|
+
**Save** (matches schema `global.recentGroups[]` shape - `repos` required, `label` / `count` / `lastUsed` optional):
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"global": {
|
|
31
|
+
"recentGroups": [
|
|
32
|
+
{
|
|
33
|
+
"label": "Checkout + UIComponents",
|
|
34
|
+
"repos": ["~/dev/Checkout", "~/dev/UIComponents"],
|
|
35
|
+
"count": 1,
|
|
36
|
+
"lastUsed": "2026-04-15T21:08:00Z"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**LRU + dedup rules:**
|
|
44
|
+
- New group → unshift to front of `recentGroups`.
|
|
45
|
+
- Same set of `repos` already exists (order-independent compare) → bump existing entry to front, increment its `count`, update `lastUsed`. Do NOT create a duplicate.
|
|
46
|
+
- Schema cap is 10 entries; oldest LRU entries past the cap are dropped.
|
|
47
|
+
|
|
48
|
+
**Skip rules:**
|
|
49
|
+
- Single-repo selection → step is a no-op (no group needed for one repo).
|
|
50
|
+
- User answers `n` → not saved; the picker still works for one-time use, and a future Phase 0 selection of the same combo will re-prompt.
|
|
51
|
+
- Step 5 skipped → Step 6 is also skipped (no selection to remember).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Setup - Summary layouts
|
|
2
|
+
|
|
3
|
+
> Loaded by `setup/SKILL.md` Steps 2 and 4 and its setup-from-scratch note. Each section is the layout the wizard prints at that point.
|
|
4
|
+
|
|
5
|
+
## Step 2 discovery summary
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Keychain Token Discovery (${USER}):
|
|
9
|
+
|
|
10
|
+
Jira -> ${USER}_Jira_Access_Token
|
|
11
|
+
GitHub -> ${USER}_Github
|
|
12
|
+
Figma -> ${USER}_Figma_Access_Token
|
|
13
|
+
Firebase -> ${USER}_Firebase_Access_Json
|
|
14
|
+
Confluence -> MISSING
|
|
15
|
+
Jenkins -> MISSING
|
|
16
|
+
---
|
|
17
|
+
Git identities: check preferences file (see Step 3)
|
|
18
|
+
|
|
19
|
+
Mapped: 8 | Missing: 4
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Step 4 final status
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
All tokens present. Pipeline ready to use.
|
|
26
|
+
|
|
27
|
+
Optional per-project features (configured on first use, nothing to do now):
|
|
28
|
+
• Phase 5 Report Step 2 Wiki - auto-generates component wiki pages + Figma
|
|
29
|
+
screenshots. Activates when (a) task is a component AND (b) a Figma token
|
|
30
|
+
is in Keychain. Four adapters supported: submodule / in-repo / github-wiki
|
|
31
|
+
/ separate-repo. First run asks: use auto-detected path, use a custom
|
|
32
|
+
path, skip once, or disable for this project (persisted).
|
|
33
|
+
• channels - post-hoc multi-channel reporter (Jira/Confluence/Wiki/PR), works on any branch with an open PR.
|
|
34
|
+
• Default reviewers - auto-fetched from Bitbucket default-reviewers endpoint
|
|
35
|
+
or GitHub CODEOWNERS on first PR.
|
|
36
|
+
|
|
37
|
+
Next step:
|
|
38
|
+
/multi-agent "PROJ-12345" -> start your first task
|
|
39
|
+
/multi-agent help -> full usage guide
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Setup from scratch
|
|
43
|
+
|
|
44
|
+
To set up multi-agent on a new machine:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
1. Install the toolkit:
|
|
48
|
+
npx @{npm-scope}/multi-agent-pipeline install
|
|
49
|
+
|
|
50
|
+
2. Start setup:
|
|
51
|
+
/multi-agent setup
|
|
52
|
+
|
|
53
|
+
3. Interactive flow:
|
|
54
|
+
-> Token scan (shows what is missing)
|
|
55
|
+
-> Git Identity creation (name + email)
|
|
56
|
+
-> Inline commands for missing tokens
|
|
57
|
+
-> Final verification
|
|
58
|
+
|
|
59
|
+
4. Ready:
|
|
60
|
+
/multi-agent "PROJ-12345"
|
|
61
|
+
/multi-agent "https://github.com/.../issues/42"
|
|
62
|
+
/multi-agent "bug description"
|
|
63
|
+
```
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
- [Token Save Flow (reusable)](#token-save-flow-reusable)
|
|
5
5
|
- [Step 3.5 - Host Prompt (embedded in Token Save Flow)](#step-35---host-prompt-embedded-in-token-save-flow)
|
|
6
6
|
- [Step 3.7 - Repository read binding (embedded in Token Save Flow)](#step-37---repository-read-binding-embedded-in-token-save-flow)
|
|
7
|
+
- [Identity learning (Step 3)](#identity-learning-step-3)
|
|
8
|
+
- [Inline Token Save Pattern](#inline-token-save-pattern)
|
|
7
9
|
<!-- /toc -->
|
|
8
10
|
|
|
9
11
|
This flow is used in TWO contexts:
|
|
@@ -223,3 +225,52 @@ Repository hosts this token may be sent to for read-only clone and fetch
|
|
|
223
225
|
Save the answer, lowercased, to `prefs.global.credentialHosts.{logical-key}`
|
|
224
226
|
(an array of hostnames). Empty leaves the key unbound. `/multi-agent:setup hosts`
|
|
225
227
|
re-opens it.
|
|
228
|
+
|
|
229
|
+
## Identity learning (Step 3)
|
|
230
|
+
|
|
231
|
+
Each token save triggers an identity prompt:
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
Token saved. Which git identity uses this token?
|
|
235
|
+
|
|
236
|
+
Existing identities:
|
|
237
|
+
1. Ada Lovelace <ada@example.com>
|
|
238
|
+
2. Ada Lovelace <ada@personal.com>
|
|
239
|
+
n. Create new identity
|
|
240
|
+
|
|
241
|
+
Select:
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
- First token ever → no existing identities → asks name + email → creates identity → maps token
|
|
245
|
+
- Subsequent tokens → pick existing or create new → maps token to that identity's `servicePatMap`
|
|
246
|
+
- Multiple accounts per platform supported (e.g. two GitHub tokens, each mapped to a different identity)
|
|
247
|
+
- Identity is stored in `prefs.global.identities[]`, token-to-identity binding in `identity.servicePatMap`
|
|
248
|
+
|
|
249
|
+
**Legacy compatibility**: If `prefs.global.gitIdentities` (deprecated) is present, `migrate-prefs.mjs` renames it to `identities` automatically.
|
|
250
|
+
|
|
251
|
+
## Inline Token Save Pattern
|
|
252
|
+
|
|
253
|
+
All tokens go through `~/.claude/lib/credential-store.sh` (Python helper and label/service attributes: `setup/SKILL.md` "Setup").
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# PAT / API Key / JSON contents (from clipboard)
|
|
257
|
+
pbpaste | ~/.claude/lib/credential-store.sh set "<SERVICE_NAME>" -
|
|
258
|
+
pbcopy < /dev/null # clear clipboard
|
|
259
|
+
|
|
260
|
+
# Non-secret value typed inline (a secret on argv is visible to ps and lands in shell history)
|
|
261
|
+
~/.claude/lib/credential-store.sh set "<SERVICE_NAME>" "<VALUE>"
|
|
262
|
+
|
|
263
|
+
# Key file from disk (the .p8, the Google Play JSON; or when the clipboard is unavailable)
|
|
264
|
+
~/.claude/lib/credential-store.sh set "<SERVICE_NAME>" - < /path/to/file.json
|
|
265
|
+
|
|
266
|
+
# Read - a JSON value comes back exactly as it was stored, newlines included
|
|
267
|
+
~/.claude/lib/credential-store.sh get "<SERVICE_NAME>"
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
For maximum stdin hygiene (the secret never lands on argv / shell history), use the Python helper directly with the `-` sentinel:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
pbpaste | ~/.claude/scripts/keychain.py set "<SERVICE_NAME>" -
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
The shell driver auto-delegates `get`/`set`/`delete` to the deterministic Python helper at `$HOME/.claude/scripts/keychain.py` (Python 3 stdlib only, no external deps). The Python path writes both `-l` (label) and `-s` (service) attributes so items are findable regardless of how callers look them up. Set `KEYCHAIN_DELEGATE=0` to force the raw shell path.
|
|
@@ -93,7 +93,7 @@ Phases by mode:
|
|
|
93
93
|
| `/multi-agent` | 0,1,2,3,4,5 |
|
|
94
94
|
| answered local at Step 5b | 0,1,2,3,4,5 (the user test needs a worktree checkout and local has none, so that STEP inside Review is skipped - the phase is not) |
|
|
95
95
|
| `/multi-agent:autopilot` | 0,1,2,3,4,5 (autopilot drops the interactive user test inside Review) |
|
|
96
|
-
| `/multi-agent:analysis` | 0,1,3,4,5
|
|
96
|
+
| `/multi-agent:analysis` | 0,1,2,3,4,5 under its own names (`schemas/phases.json` `modes.analysis.names`: Intake, Evidence, Synthesis, Review, Publish, Report) |
|
|
97
97
|
|
|
98
98
|
Every entry registers its whole set in one batch: the set is a property of the command, known before the tracker boots.
|
|
99
99
|
|
|
@@ -404,7 +404,7 @@ call for call, so a reader that is not the host (`runs-index.mjs`, and every
|
|
|
404
404
|
client behind the contract server) sees the same list under the same phase:
|
|
405
405
|
|
|
406
406
|
```bash
|
|
407
|
-
bash $HOME/.claude/scripts/phase-tracker.sh task <N> <task_id> pending|in_progress|completed \
|
|
407
|
+
bash $HOME/.claude/scripts/phase-tracker.sh task <N> <task_id> pending|in_progress|completed|deleted \
|
|
408
408
|
[--subject "<subject>"] [--active-form "<activeForm>"]
|
|
409
409
|
```
|
|
410
410
|
|
|
@@ -416,10 +416,15 @@ bash $HOME/.claude/scripts/phase-tracker.sh task <N> <task_id> pending|in_progre
|
|
|
416
416
|
|
|
417
417
|
`<N>` is the phase the task belongs to: the phase in progress when it was
|
|
418
418
|
created. A new task needs `--subject`; an update may pass the status alone and
|
|
419
|
-
keeps the subject and active form it had. Phase tiles themselves are not
|
|
419
|
+
keeps the subject and active form it had. `deleted` takes the task off the list, as a native `TaskUpdate` with status `deleted` does. Phase tiles themselves are not
|
|
420
420
|
mirrored: the phase list already is the state file. The call is quiet (it
|
|
421
421
|
renders nothing), so it never replaces the host's own update; it records it.
|
|
422
422
|
|
|
423
|
+
On Claude Code the `task-mirror.sh` PostToolUse hook makes this call itself
|
|
424
|
+
for every `TaskCreate` and `TaskUpdate` of the session bound to the run, under
|
|
425
|
+
the phase in progress, and leaves phase tiles out. A manual `task` call on top
|
|
426
|
+
of it is harmless: the second write sets the same values.
|
|
427
|
+
|
|
423
428
|
## Resume behaviour
|
|
424
429
|
|
|
425
430
|
When `/multi-agent:resume <task_id>` is called:
|
|
@@ -4,7 +4,10 @@ The office page (`index.html`, built from `pipeline/office-src` by
|
|
|
4
4
|
`pipeline/scripts/office-build.mjs`) draws sprites from pixel-agents
|
|
5
5
|
(https://github.com/pixel-agents-hq/pixel-agents, commit b1bafd0): the six
|
|
6
6
|
character sheets, the floor and wall tiles and the furniture, kept unchanged
|
|
7
|
-
in `assets/`.
|
|
7
|
+
in `assets/`. The company furniture (kitchen, restroom, server room, archive,
|
|
8
|
+
reception, lab and mail room pieces) is this project's own drawing: its
|
|
9
|
+
sources are the pixel grids in `pipeline/office-art`, which the build renders
|
|
10
|
+
into `assets/` with the pixel-agents palette. pixel-agents'
|
|
8
11
|
characters are based on JIK-A-4's MetroCity free top-down character pack
|
|
9
12
|
(https://jik-a-4.itch.io/metrocity-free-topdown-character-pack), released
|
|
10
13
|
under CC0 1.0.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|