@mmerterden/multi-agent-pipeline 20.33.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 +43 -0
- package/README.md +2 -1
- package/README.tr.md +2 -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 +5 -4
- package/docs/features.md +1 -1
- package/install/_dev-only-files.mjs +1 -0
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +9 -2
- package/install/templates/claude-hooks.json +12 -1
- package/manifest.json +98 -75
- package/package.json +3 -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/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/resume/SKILL.md +8 -22
- package/pipeline/commands/multi-agent/review/SKILL.md +7 -131
- package/pipeline/commands/multi-agent/setup/SKILL.md +19 -224
- package/pipeline/contract/README.md +5 -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 +1 -1
- 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/knowledge.md +9 -0
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +163 -0
- 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 +6 -3
- 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/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/office/index.html +12 -7
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/response-shape.md +6 -7
- package/pipeline/schemas/agent-state.schema.json +18 -0
- package/pipeline/schemas/phases.json +4 -4
- 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/reviewer-output.schema.json +20 -2
- package/pipeline/schemas/token-budget.json +4 -4
- package/pipeline/schemas/triage-output.schema.json +20 -2
- 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/_unified-diff.mjs +2 -2
- 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 +36 -15
- 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/graph-links.mjs +230 -0
- package/pipeline/scripts/graph-query.mjs +133 -1
- package/pipeline/scripts/graph-report.mjs +65 -0
- package/pipeline/scripts/learn-from-transcripts.mjs +12 -48
- package/pipeline/scripts/learnings-ledger.mjs +143 -24
- package/pipeline/scripts/plan-critique-gate.mjs +11 -2
- package/pipeline/scripts/rework-rulings.mjs +106 -0
- package/pipeline/scripts/scope-check-gate.mjs +149 -2
- 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/skills/.skill-manifest.json +5 -5
- 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-review/SKILL.md +2 -0
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +4 -4
|
@@ -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,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.
|