@mmerterden/multi-agent-pipeline 23.7.0 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/README.md +57 -24
- package/README.tr.md +41 -8
- package/SECURITY.md +3 -3
- package/docs/architecture.md +41 -4
- package/docs/ecosystem.md +15 -13
- package/docs/facts.json +5 -4
- package/docs/features.md +59 -15
- package/install/_codex-agents.mjs +13 -8
- package/install/_common.mjs +24 -0
- package/install/_dev-only-files.mjs +4 -0
- package/install/_mcp-register.mjs +6 -2
- package/install/_rewrite-tree.mjs +197 -0
- package/install/codex.mjs +96 -180
- package/install/copilot.mjs +24 -54
- package/install/index.mjs +29 -11
- package/install/templates/codex-instructions.md +21 -5
- package/install/templates/copilot-instructions.md +21 -14
- package/manifest.json +2082 -0
- package/package.json +6 -2
- package/pipeline/commands/multi-agent/SKILL.md +5 -4
- package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +31 -3
- package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/channels/SKILL.md +16 -8
- package/pipeline/commands/multi-agent/log/SKILL.md +2 -0
- package/pipeline/commands/multi-agent/stack/SKILL.md +1 -1
- package/pipeline/contract/manifest.json +1 -1
- package/pipeline/contract/types/index.d.ts +1 -0
- package/pipeline/lib/_jira-auth.sh +50 -78
- package/pipeline/lib/_service-account.sh +191 -0
- package/pipeline/lib/credential-inventory.sh +49 -37
- package/pipeline/lib/credential-store.sh +48 -3
- package/pipeline/lib/fetch-confluence.sh +76 -92
- package/pipeline/lib/fetch-crashlytics.sh +30 -59
- package/pipeline/lib/fetch-figma-annotations.sh +9 -9
- package/pipeline/lib/fetch-fortify.sh +77 -81
- package/pipeline/lib/fetch-graylog.sh +38 -77
- package/pipeline/lib/figma-mcp-refresh.sh +23 -4
- package/pipeline/lib/figma-screenshot.sh +7 -8
- package/pipeline/lib/figma-token.sh +39 -46
- package/pipeline/lib/host.mjs +138 -0
- package/pipeline/lib/host.sh +48 -0
- package/pipeline/lib/issue-fetcher.sh +25 -41
- package/pipeline/lib/jira-publish.sh +23 -21
- package/pipeline/lib/local-model.mjs +93 -0
- package/pipeline/lib/md2confluence-v3.py +37 -30
- package/pipeline/lib/model-dispatch.sh +41 -4
- package/pipeline/lib/model-resolve.mjs +58 -0
- package/pipeline/lib/post-pr-review.sh +38 -53
- package/pipeline/lib/reviewer-families.mjs +70 -0
- package/pipeline/lib/service-account.mjs +2131 -0
- package/pipeline/lib/service-account.sh +35 -0
- package/pipeline/lib/usage-token.mjs +64 -24
- package/pipeline/lib/usage-vocab.mjs +1 -1
- package/pipeline/lib/user-facing.mjs +11 -3
- package/pipeline/lib/vercel-deploy.sh +17 -26
- package/pipeline/multi-agent-refs/_entry-picker.md +62 -0
- package/pipeline/multi-agent-refs/analysis/intake.md +2 -0
- package/pipeline/multi-agent-refs/analysis/reusable-refs.md +1 -0
- package/pipeline/multi-agent-refs/analysis/unattended.md +135 -0
- package/pipeline/multi-agent-refs/autopilot-on/details.md +16 -0
- package/pipeline/multi-agent-refs/channels/generator.md +10 -2
- package/pipeline/multi-agent-refs/channels/menu.md +3 -1
- package/pipeline/multi-agent-refs/channels/preview.md +3 -1
- package/pipeline/multi-agent-refs/channels/reference.md +16 -2
- package/pipeline/multi-agent-refs/channels/report-file.md +188 -0
- package/pipeline/multi-agent-refs/cross-cli-contract.md +35 -27
- package/pipeline/multi-agent-refs/features/doctor.md +37 -11
- package/pipeline/multi-agent-refs/features/free-models.md +3 -3
- package/pipeline/multi-agent-refs/features/local-model.md +87 -0
- package/pipeline/multi-agent-refs/features/model-fallback.md +25 -10
- package/pipeline/multi-agent-refs/features/product-context.md +6 -5
- package/pipeline/multi-agent-refs/features/service-accounts.md +233 -0
- package/pipeline/multi-agent-refs/features/unattended-security.md +10 -1
- package/pipeline/multi-agent-refs/help/en.md +28 -1
- package/pipeline/multi-agent-refs/help/tr.md +28 -1
- package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +2 -1
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -1
- package/pipeline/multi-agent-refs/phases/modes.md +20 -1
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +12 -10
- package/pipeline/multi-agent-refs/phases.md +4 -3
- package/pipeline/multi-agent-refs/review/panel.md +30 -18
- package/pipeline/multi-agent-refs/setup/discovery.md +17 -5
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +21 -2
- package/pipeline/multi-agent-refs/sync/overview.md +11 -5
- package/pipeline/multi-agent-refs/tracker-contract.md +28 -10
- package/pipeline/office/index.html +3 -3
- package/pipeline/schemas/autopilot-config.schema.json +29 -4
- package/pipeline/schemas/hosts.json +512 -0
- package/pipeline/schemas/hosts.schema.json +310 -0
- package/pipeline/schemas/launch.json +22 -2
- package/pipeline/schemas/launch.schema.json +2 -1
- package/pipeline/schemas/phases.json +19 -1
- package/pipeline/schemas/phases.schema.json +8 -0
- package/pipeline/schemas/prefs.schema.json +331 -4
- package/pipeline/scripts/.doctor-mut.47076.mjs +2253 -0
- package/pipeline/scripts/_autopilot-config.mjs +67 -4
- package/pipeline/scripts/_autopilot-item.mjs +67 -0
- package/pipeline/scripts/_autopilot-outcomes.mjs +6 -0
- package/pipeline/scripts/_cost.mjs +75 -3
- package/pipeline/scripts/analysis-sources.mjs +22 -5
- package/pipeline/scripts/analysis-unattended.mjs +360 -0
- package/pipeline/scripts/anonymize-findings.mjs +3 -7
- package/pipeline/scripts/autopilot-arming.mjs +19 -10
- package/pipeline/scripts/autopilot-intake.mjs +124 -27
- package/pipeline/scripts/autopilot-menubar.swift +7 -0
- package/pipeline/scripts/autopilot-runner.mjs +77 -48
- package/pipeline/scripts/autopilot-status.sh +32 -9
- package/pipeline/scripts/bulk-read.sh +37 -5
- package/pipeline/scripts/confluence-readback.mjs +15 -7
- package/pipeline/scripts/cost-table.json +65 -25
- package/pipeline/scripts/doctor.mjs +119 -32
- package/pipeline/scripts/entry-mode.mjs +101 -0
- package/pipeline/scripts/estimate.mjs +30 -16
- package/pipeline/scripts/feedback-send.mjs +11 -8
- package/pipeline/scripts/gen-facts.mjs +7 -9
- package/pipeline/scripts/jira-attach.sh +23 -28
- package/pipeline/scripts/jira-search.sh +5 -21
- package/pipeline/scripts/launch-request.mjs +15 -9
- package/pipeline/scripts/migrate-prefs.mjs +56 -0
- package/pipeline/scripts/phase-tracker.sh +146 -38
- package/pipeline/scripts/priority-review.mjs +14 -7
- package/pipeline/scripts/product-context.mjs +26 -7
- package/pipeline/scripts/prune-logs.sh +4 -2
- package/pipeline/scripts/report-file.mjs +285 -0
- package/pipeline/scripts/rework-escalation.mjs +19 -4
- package/pipeline/scripts/service-read.mjs +19 -17
- package/pipeline/scripts/skill-siblings.mjs +17 -1
- package/pipeline/scripts/status-overview.mjs +20 -10
- package/pipeline/scripts/uninstall.mjs +145 -57
- package/pipeline/scripts/usage-register.mjs +34 -11
- package/pipeline/scripts/usage-report.mjs +31 -26
- package/pipeline/scripts/validate-triage.mjs +11 -1
- package/pipeline/scripts/work-items.mjs +25 -28
- package/pipeline/scripts/write-store-config.mjs +37 -11
- package/pipeline/skills/.skill-manifest.json +4 -4
- package/pipeline/skills/.skills-index.json +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +11 -3
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -0
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +11 -8
- package/pipeline/lib/credential-resolve.mjs +0 -75
|
@@ -84,7 +84,7 @@ genuine outage - it falls through to the normal phase-error path (pause ->
|
|
|
84
84
|
resume), since there is nothing left to step down to. The mechanism is the existing per-dispatch override:
|
|
85
85
|
set `PHASE_MODEL_OVERRIDE=<fallback>` before dispatch (the orchestrator exports
|
|
86
86
|
`CLAUDE_CODE_SUBAGENT_MODEL` on Claude Code, or passes `--model` on Copilot
|
|
87
|
-
CLI). Persona frontmatter stays the source of truth for the
|
|
87
|
+
CLI). Persona frontmatter stays the source of truth for the _preferred_ model;
|
|
88
88
|
the override is per-dispatch and leaves files untouched.
|
|
89
89
|
|
|
90
90
|
## Prefs knob
|
|
@@ -105,7 +105,7 @@ predate this field still get the second downgrade step):
|
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
| Field | Meaning |
|
|
108
|
-
|
|
108
|
+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
109
109
|
| `enabled` | Master switch. `false` = always dispatch the persona's `preferredModel`, fail loudly on error. |
|
|
110
110
|
| `modelFallback.fableEnabled` | Whether the `fable` rung exists at all on Claude Code. **Ships `false`.** `false` starts every `preferredModel: fable` persona on `opus`; `/multi-agent:fable-on` opts the top rung back in and `/multi-agent:fable-off` takes it out. A cost control that defaults to on is not a control. See "Turning the fable rung off" below. |
|
|
111
111
|
| `premiumTierUntil` | ISO date (`YYYY-MM-DD`) or `null`. When set and today is **after** this date, every `preferredModel` dispatch is downgraded to `fallbackModel` unless the user re-confirms (see Date gate). Use when the top tier is included in a plan only until a known date. |
|
|
@@ -123,7 +123,7 @@ recover from. That distinction is why it is checked before them.
|
|
|
123
123
|
Scope is Claude Code only, and the reason differs per host:
|
|
124
124
|
|
|
125
125
|
| Host | Effect of `fableEnabled: false` | Why |
|
|
126
|
-
|
|
126
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
127
127
|
| Claude Code | Every `preferredModel: fable` persona (`ios/android/backend-architect`, `code-reviewer`, triage) starts on `opus` | This is the only host where the rung means Fable 5.2 |
|
|
128
128
|
| Copilot CLI | none | Fable is not offered there; its personas never sat on this rung |
|
|
129
129
|
| Codex CLI | none, deliberately | The `fable` rung there means `gpt-5.6 @ xhigh`, a different model on a different account. Switching it off from a knob named after an Anthropic model would surprise a Codex user, so it does not |
|
|
@@ -213,6 +213,18 @@ per-phase `model` field already carries the override).
|
|
|
213
213
|
|
|
214
214
|
## Routing at dispatch
|
|
215
215
|
|
|
216
|
+
How a dispatch hands a child its model differs per host, and the registry
|
|
217
|
+
(`schemas/hosts.json`) holds the mapping. This table is generated from it:
|
|
218
|
+
|
|
219
|
+
<!-- hosts:dispatch -->
|
|
220
|
+
| Host | Model | Effort | Required | Children at once | Personas |
|
|
221
|
+
|---|---|---|---|---|---|
|
|
222
|
+
| Claude Code | export `CLAUDE_CODE_SUBAGENT_MODEL` | - | - | no stated ceiling | `.claude/agents/*.md` |
|
|
223
|
+
| Copilot CLI | pass `--model` | - | - | no stated ceiling | `.copilot/agents/*.md` |
|
|
224
|
+
| Codex CLI | `model` on the spawn call | `reasoning_effort` | `fork_turns: none` | 3 | `.codex/agents/*.toml` |
|
|
225
|
+
| Local model | `model` on the spawn call | - | `fork_turns: none` | 1 | `.codex-local/agents/*.toml` |
|
|
226
|
+
<!-- /hosts -->
|
|
227
|
+
|
|
216
228
|
`$HOME/.claude/lib/model-dispatch.sh` turns `prefs.global.modelRouting` into a
|
|
217
229
|
rung. Three call sites ask it: the subagent dispatch contract in
|
|
218
230
|
`skills/shared/core/multi-agent/SKILL.md`, `bulk-read.sh`, and the `delegate`
|
|
@@ -228,16 +240,19 @@ Two limits are enforced by the script rather than written here and hoped for:
|
|
|
228
240
|
- **A rule may not turn the fable rung on.** With `modelFallback.fableEnabled`
|
|
229
241
|
false, a rule preferring `fable` falls past it to the next rung. Otherwise
|
|
230
242
|
`/multi-agent:fable-off` would have a second door.
|
|
231
|
-
- **A
|
|
232
|
-
the
|
|
233
|
-
|
|
243
|
+
- **A rung this host does not offer is refused.** The preferences file is
|
|
244
|
+
shared across every CLI on the machine, so a rule naming a rung only one of
|
|
245
|
+
them carries is a normal thing for the router to find. It answers from the
|
|
246
|
+
host it is installed under: a rung absent from that host's ladder, or one
|
|
247
|
+
whose model belongs to a provider the host does not dispatch, is skipped and
|
|
248
|
+
the rule's next rung answers, with the reason on stderr.
|
|
234
249
|
- **`free` only where the pipeline makes the call, and only when switched on.**
|
|
235
250
|
The `free` rung (provider `free-chain`) answers at `bulk-read` and `delegate`
|
|
236
251
|
while `modelRouting.free.enabled` is true (`route-on --free`), ahead of the
|
|
237
252
|
matched rule's rungs. Its callers keep their own default as the fallback,
|
|
238
253
|
because the toolkit answers `ESCALATE_TO_CLAUDE` whenever no free answer
|
|
239
|
-
survives verification.
|
|
240
|
-
everywhere: no call site speaks it.
|
|
254
|
+
survives verification. A rung priced for a provider this host does not
|
|
255
|
+
dispatch is refused everywhere: no call site here speaks it.
|
|
241
256
|
|
|
242
257
|
Strategies change the order of the candidate rungs, never the set: `task-fit`
|
|
243
258
|
tries the cheapest first by `cost-table.json` price, and `cost-ceiling` does the
|
|
@@ -268,7 +283,7 @@ promoted policy; the decision's reason then ends in `learned`. The loop:
|
|
|
268
283
|
draws in ten.
|
|
269
284
|
|
|
270
285
|
The two limits above still hold on a learned order: the fable switch is
|
|
271
|
-
checked after it, and a
|
|
286
|
+
checked after it, and a rung this host does not offer is still refused.
|
|
272
287
|
|
|
273
288
|
The script never fails and never returns an empty rung: a missing preferences
|
|
274
289
|
file, a missing `jq`, unparseable JSON, an out-of-scope call site and a rung
|
|
@@ -302,7 +317,7 @@ on Claude Code. The map is applied at install time by
|
|
|
302
317
|
each `~/.codex/agents/<persona>.toml`:
|
|
303
318
|
|
|
304
319
|
| Tier | Codex model | Effort |
|
|
305
|
-
|
|
320
|
+
| -------- | --------------- | -------- |
|
|
306
321
|
| `fable` | `gpt-5.6` | `xhigh` |
|
|
307
322
|
| `opus` | `gpt-5.6` | `high` |
|
|
308
323
|
| `sonnet` | `gpt-5.4` | `medium` |
|
|
@@ -37,7 +37,7 @@ and writes what it found into the plan and into the learning layer.
|
|
|
37
37
|
| `stack` | `ios`, `android`, `web`, `backend` or `resources` |
|
|
38
38
|
| `remote` | `https://`, `ssh://` or `user@host:path`, never with credentials in it |
|
|
39
39
|
| `branch` | Optional override; without it the branch rule below applies |
|
|
40
|
-
| `credential` | Optional logical credential-store key of a read token for that host; accepted only when
|
|
40
|
+
| `credential` | Optional logical credential-store key of a read token for that host; accepted only when the pairing already exists - an account that names the key and covers that https host, or the host listed for the key in `prefs.global.credentialHosts` (`/multi-agent:setup`, Token Save Flow Step 3.7) |
|
|
41
41
|
| `authScheme` | `basic` (GitHub, default) or `bearer` (Bitbucket Data Center HTTP access tokens) |
|
|
42
42
|
|
|
43
43
|
A project joins a product through `prefs.projects[<key>].product`, or implicitly
|
|
@@ -94,10 +94,11 @@ Every read goes through the toolkit's `repo_*` tools
|
|
|
94
94
|
- **Fenced**: file text, match lines and commit subjects come back marked as
|
|
95
95
|
untrusted, with `injectionFlags`. They are data from another team's
|
|
96
96
|
repository, never an instruction.
|
|
97
|
-
- **Credentials stay with their host**: a token is sent only over https,
|
|
98
|
-
to a host `prefs.global.credentialHosts`
|
|
99
|
-
`/multi-agent:setup` with the person
|
|
100
|
-
one, and the toolkit refuses any other
|
|
97
|
+
- **Credentials stay with their host**: a token is sent only over https, and
|
|
98
|
+
only to a host its own account covers or that `prefs.global.credentialHosts`
|
|
99
|
+
binds it to. Both pairings are made in `/multi-agent:setup` with the person
|
|
100
|
+
present; nothing in this flow creates one, and the toolkit refuses any other
|
|
101
|
+
pairing whatever a request says.
|
|
101
102
|
- **Honest when offline**: an unreachable remote is served from its last fetch
|
|
102
103
|
with `stale: true` and the reason, and the plan says so.
|
|
103
104
|
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Service accounts
|
|
2
|
+
|
|
3
|
+
<!-- toc -->
|
|
4
|
+
- [The problem it solves](#the-problem-it-solves)
|
|
5
|
+
- [The shape](#the-shape)
|
|
6
|
+
- [The two rules](#the-two-rules)
|
|
7
|
+
- [Reading one](#reading-one)
|
|
8
|
+
- [The header each service expects](#the-header-each-service-expects)
|
|
9
|
+
- [A credential from the environment](#a-credential-from-the-environment)
|
|
10
|
+
- [A credential named after its account](#a-credential-named-after-its-account)
|
|
11
|
+
- [Refusals](#refusals)
|
|
12
|
+
- [Migration](#migration)
|
|
13
|
+
- [The gate that keeps it the only reader](#the-gate-that-keeps-it-the-only-reader)
|
|
14
|
+
- [What is not here yet](#what-is-not-here-yet)
|
|
15
|
+
<!-- /toc -->
|
|
16
|
+
|
|
17
|
+
One credential, described in one place: which service it belongs to, where it
|
|
18
|
+
may be sent, and which credential-store items hold it.
|
|
19
|
+
|
|
20
|
+
## The problem it solves
|
|
21
|
+
|
|
22
|
+
Split across `global.hosts`, `global.keychainMapping` and
|
|
23
|
+
`global.identities[].servicePatMap`, a credential is three unrelated lookups:
|
|
24
|
+
a host from one, a store item name from another, sometimes an identity-specific
|
|
25
|
+
item from a third. Nothing joins them, so nothing is in a position to notice
|
|
26
|
+
when one account's host is handed another account's token. A person with two
|
|
27
|
+
GitHub accounts, or a production and a test Jira, has no way to say which token
|
|
28
|
+
belongs to which, and
|
|
29
|
+
`keychainMapping` has room for exactly one of each.
|
|
30
|
+
|
|
31
|
+
## The shape
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"global": {
|
|
36
|
+
"serviceAccounts": [
|
|
37
|
+
{
|
|
38
|
+
"id": "jira-acme",
|
|
39
|
+
"service": "jira",
|
|
40
|
+
"label": "Acme Jira",
|
|
41
|
+
"default": true,
|
|
42
|
+
"identityId": "alice",
|
|
43
|
+
"scope": { "host": "jira.acme.example", "extraHosts": [] },
|
|
44
|
+
"secrets": { "token": "Acme_Jira_Access_Token" }
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"serviceOptOuts": []
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`secrets` holds item **names**, never values. `id` is how run state, flags and
|
|
53
|
+
the audit trail name an account, so it never changes once written. `label` is
|
|
54
|
+
what a person reads in a picker. `scope` says where the secret may go; what it
|
|
55
|
+
accepts depends on the service:
|
|
56
|
+
|
|
57
|
+
| Kind | Services | Scope | Where the secret may be sent |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| hosted | jira, confluence, bitbucket, fortify, graylog, jenkins | `host` required, `extraHosts`; graylog also `environment` | the account's own hosts |
|
|
60
|
+
| vendor | github, npm | `host` names another instance; github also `owners` | the vendor's hosts, or the named instance |
|
|
61
|
+
| vendor-fixed | figma, firebase, google_play, appstore_connect | firebase and google_play take `projectId` | a fixed list the account cannot widen |
|
|
62
|
+
| local | figma_mcp, vercel, claude_oauth, supabase | none | nowhere: handed to a local tool |
|
|
63
|
+
| endpoint | usage_ingest | none | the host in `global.usageLog.endpoint` |
|
|
64
|
+
|
|
65
|
+
## The two rules
|
|
66
|
+
|
|
67
|
+
**A secret is never produced without a destination that was checked.** A request
|
|
68
|
+
that names no host gets a refusal, not the default account. A host no account
|
|
69
|
+
covers gets a refusal, not the nearest match. "I do not know which token this
|
|
70
|
+
host wants" and "here is the token I had" are different answers, and the second
|
|
71
|
+
one is how a token reaches a host it was never issued for.
|
|
72
|
+
|
|
73
|
+
**An unmigrated file resolves identically.** While `serviceAccounts` is absent
|
|
74
|
+
the same entries are derived in memory from the flat keys. A missing array is
|
|
75
|
+
not a refusal; it is the old shape, read the new way.
|
|
76
|
+
|
|
77
|
+
## Reading one
|
|
78
|
+
|
|
79
|
+
Everything goes through `$HOME/.claude/lib/service-account.mjs`, or
|
|
80
|
+
`service-account.sh` for shell callers, which execs the same module.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
service-account.sh select --service jira --url https://jira.acme.example/rest
|
|
84
|
+
service-account.sh token --service jira --url https://jira.acme.example/rest
|
|
85
|
+
service-account.sh list --service github
|
|
86
|
+
service-account.sh check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`token` writes the raw secret to stdout with no trailing newline. Everything
|
|
90
|
+
else writes one JSON line. On a refusal stdout is empty and one JSON line goes
|
|
91
|
+
to stderr, carrying `reason`, a sentence of `message`, and a `remedy` naming the
|
|
92
|
+
one thing to do next.
|
|
93
|
+
|
|
94
|
+
`items` lists every store item name the accounts refer to, with the account and
|
|
95
|
+
slot that refers to it. Names only, never values: it is the one listing that is
|
|
96
|
+
safe to print, and it stays that way by never reading the store at all.
|
|
97
|
+
|
|
98
|
+
`curl-config` is how a secret reaches an outbound request: the URL, a scheme
|
|
99
|
+
lock and the header live in one curl config, and redirects are refused, so
|
|
100
|
+
nothing can point curl elsewhere between the check and the request.
|
|
101
|
+
|
|
102
|
+
Shell callers get the same four things from `lib/_service-account.sh`, which is
|
|
103
|
+
sourced rather than run: `sa_cfg` writes a config only curl reads and removes it
|
|
104
|
+
when the shell exits, `sa_host` gives the host of the chosen account, `sa_token`
|
|
105
|
+
is there for the few callers that cannot use a config, and `sa_explain` turns a
|
|
106
|
+
refusal into a sentence. A fetcher that builds its own `-H "Authorization: ..."`
|
|
107
|
+
is a fetcher that can carry it through a redirect.
|
|
108
|
+
|
|
109
|
+
## The header each service expects
|
|
110
|
+
|
|
111
|
+
The scheme is a fact about the service, not a choice at the call site:
|
|
112
|
+
|
|
113
|
+
| scheme | header |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `bearer` (default) | `Authorization: Bearer <token>` |
|
|
116
|
+
| `basic` | `Authorization: Basic base64(<username slot>:<token>)` |
|
|
117
|
+
| `basic-token-user` | `Authorization: Basic base64(<token>:)` |
|
|
118
|
+
| `basic-or-bearer` | basic when the account carries a username, bearer when it does not |
|
|
119
|
+
| `figma-pat` | `X-Figma-Token: <token>` |
|
|
120
|
+
| `fortify-token` | `Authorization: FortifyToken base64(<token>)` |
|
|
121
|
+
|
|
122
|
+
`basic` reads the username through the store, because that slot holds an item
|
|
123
|
+
name like every other one. Reading it as the username itself would send the
|
|
124
|
+
store's item name as the login and fail like a wrong password.
|
|
125
|
+
|
|
126
|
+
## A credential from the environment
|
|
127
|
+
|
|
128
|
+
A CI job, a container, and a person trying the pipeline before running setup all
|
|
129
|
+
supply a credential the same way: an environment variable. The resolver answers
|
|
130
|
+
from one when a variable holds something, as an account called `env:<service>`.
|
|
131
|
+
|
|
132
|
+
It is not a worse secret, but it is a differently bound one, because nobody said
|
|
133
|
+
which host it belongs to. So it reaches only what is already known: a host a
|
|
134
|
+
configured account covers, the vendor's own hosts, whatever its own `*_HOST`
|
|
135
|
+
variable names, and loopback. It never wins a destination a configured account
|
|
136
|
+
also covers, and it never becomes the default.
|
|
137
|
+
|
|
138
|
+
Loopback is also the one place `http` is allowed, for any credential. A local
|
|
139
|
+
model server, a mock and a dev instance all live at `127.0.0.1` with no
|
|
140
|
+
certificate, and refusing them outright is what pushes people to turn the check
|
|
141
|
+
off for everything; loopback is the one destination with no network to carry
|
|
142
|
+
the request, so there is nothing on the wire to protect. Everywhere else `http`
|
|
143
|
+
is `insecure-url`, refused before the store is touched. The destination rule is
|
|
144
|
+
unchanged underneath: a loopback address still has to be one the account names.
|
|
145
|
+
|
|
146
|
+
The URL in that config is one this module serialized, never the string it was
|
|
147
|
+
handed. The two differ more than they look: the URL parser silently removes
|
|
148
|
+
tab, CR and LF and rewrites a backslash as a slash, while a curl config is read
|
|
149
|
+
a line at a time. `https://good.example/x` followed by a newline and
|
|
150
|
+
`url = https://evil.example/` names `good.example` to a host check and is two
|
|
151
|
+
`url` directives to curl - and the `header` line applies to both. So a URL
|
|
152
|
+
carrying a control character or a backslash is refused outright, by
|
|
153
|
+
`normalizeHost`, before anything is selected; and `curl-config` parses the URL a
|
|
154
|
+
second time and checks its hostname against the host the secret was bound to.
|
|
155
|
+
|
|
156
|
+
## A credential named after its account
|
|
157
|
+
|
|
158
|
+
A team that holds one credential per instance tells them apart by naming the
|
|
159
|
+
store item after the account: the short id, then the provider, then the rest
|
|
160
|
+
(`b_jira_access_token` for account `b`). `global.accounts[]` carries that
|
|
161
|
+
account's hosts under the same id.
|
|
162
|
+
|
|
163
|
+
Neither half names the other, so the pairing is made at the one moment both are
|
|
164
|
+
in hand: a request that asks by item name. The id read out of the name picks
|
|
165
|
+
the entry, and that entry supplies the single host the item may be sent to -
|
|
166
|
+
its own `jiraHost` / `bitbucketHost` / `confluenceHost`, or the host the file
|
|
167
|
+
names for the service when the entry declares none. An id the file does not
|
|
168
|
+
list is `unknown-account`, never the default account: resolving it to whichever
|
|
169
|
+
account came first is the pairing this module exists to refuse.
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
--item B_Jira_Access_Token -> account jira-b, host jira.b.example.com
|
|
173
|
+
--item B_Jira_Access_Token --host jira.example.com
|
|
174
|
+
-> no-account-for-target
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The second line is the point: B's credential does not reach A's host because a
|
|
178
|
+
caller asked for it.
|
|
179
|
+
|
|
180
|
+
## Refusals
|
|
181
|
+
|
|
182
|
+
| reason | exit | when |
|
|
183
|
+
|---|---|---|
|
|
184
|
+
| `invalid-request` | 3 | no such service, slot, or sub-command |
|
|
185
|
+
| `not-configured` | 1 | nothing configured for this service (carries `optedOut`) |
|
|
186
|
+
| `unknown-account` | 1 | an id no account carries |
|
|
187
|
+
| `slot-missing` | 1 | the account has nothing in that slot |
|
|
188
|
+
| `secret-missing` | 1 | the item it names is not in the store |
|
|
189
|
+
| `store-unavailable` | 2 | no credential backend on this machine |
|
|
190
|
+
| `store-error` | 4 | the backend failed |
|
|
191
|
+
| `secret-locked` | 5 | the store is locked |
|
|
192
|
+
| `prefs-unreadable` | 6 | the preferences file does not parse |
|
|
193
|
+
| `invalid-config` | 6 | the accounts do not hold together |
|
|
194
|
+
| `destination-required` | 7 | a secret was asked for with no destination |
|
|
195
|
+
| `insecure-url` | 7 | not https outside loopback, or userinfo in the URL |
|
|
196
|
+
| `host-mismatch` | 7 | a named account, and a destination outside it |
|
|
197
|
+
| `no-account-for-target` | 7 | no account covers the destination |
|
|
198
|
+
| `identity-mismatch` | 7 | every match belongs to another identity |
|
|
199
|
+
| `not-sendable` | 7 | an outbound request for a local-only credential |
|
|
200
|
+
| `ambiguous` | 8 | several fit and nothing tells them apart |
|
|
201
|
+
| `needs-pairing` | 8 | the account has a secret but no host yet |
|
|
202
|
+
|
|
203
|
+
## Migration
|
|
204
|
+
|
|
205
|
+
`migrate-prefs.mjs` derives the array from the flat keys, and will not guess.
|
|
206
|
+
Where the file holds one token and one host for a service, that is the only
|
|
207
|
+
pairing the data allows and it is written. Where it holds more of either and
|
|
208
|
+
nothing says which goes with which, the entry is written with `unresolved`
|
|
209
|
+
instead of a host; the resolver refuses it and setup asks a person which host it
|
|
210
|
+
belongs to. Skipping the question asks again next run - only the explicit
|
|
211
|
+
permanent choice stops it.
|
|
212
|
+
|
|
213
|
+
The flat keys stay. `keychainMapping`, `hosts` and `credentialHosts` remain the
|
|
214
|
+
projection of each service's default account, so the toolkit server and people's
|
|
215
|
+
own scripts keep reading the same answers. `writeAccounts` is the only writer of
|
|
216
|
+
`serviceAccounts`, and it writes the array and the keys it projects into in one
|
|
217
|
+
replacement.
|
|
218
|
+
|
|
219
|
+
## The gate that keeps it the only reader
|
|
220
|
+
|
|
221
|
+
`lint-credential-reads.mjs` counts the lines that still read `keychainMapping`,
|
|
222
|
+
`credentialHosts` or `global.hosts`, or call the credential store, outside the
|
|
223
|
+
resolver. It is a per-file ratchet against
|
|
224
|
+
`pipeline/scripts/fixtures/credential-reads-baseline.txt`: a file may carry
|
|
225
|
+
fewer than its baseline, never more, and a file absent from the baseline may
|
|
226
|
+
carry none. The resolver is the join only while it is the only reader - a caller
|
|
227
|
+
that looks a key up itself has reintroduced the gap for its own request.
|
|
228
|
+
|
|
229
|
+
## What is not here yet
|
|
230
|
+
|
|
231
|
+
The entity, the resolver, the migration and the gate are in. Callers are moving
|
|
232
|
+
over a batch at a time, and the baseline is what says how far that has got. The
|
|
233
|
+
"add another account" flow in setup, and the picker that uses it, come after.
|
|
@@ -930,6 +930,12 @@ base, title and body, records `state.publish`, and the attempt is
|
|
|
930
930
|
push it again, and not parked, because the step left is a person's and needs
|
|
931
931
|
neither the worktree nor the repo's queue slot.
|
|
932
932
|
|
|
933
|
+
An analysis item never reaches any of this. Its queue label says the work is a
|
|
934
|
+
document, the publish step returns before it reads a request, and the attempt is
|
|
935
|
+
`doc-delivered`: terminal, because the document is the delivery. Nothing is
|
|
936
|
+
pushed and no pull request is opened for it, by this path or any other - the
|
|
937
|
+
guard blocks both for every unattended run.
|
|
938
|
+
|
|
933
939
|
Every process the publish step starts runs with `MULTI_AGENT_UNATTENDED` and
|
|
934
940
|
`MULTI_AGENT_SESSION_ID` removed and `GIT_TERMINAL_PROMPT=0`. The runner is not
|
|
935
941
|
the agent: these are spawns, not tool calls, so no hook sees them, and the
|
|
@@ -947,7 +953,10 @@ step with `autopilot-publish.mjs --session <id> --state <agent-state.json>
|
|
|
947
953
|
## Phase 5 and channels
|
|
948
954
|
|
|
949
955
|
Under the variable Phase 5 skips external delivery (`deferred-to-runner`) and
|
|
950
|
-
`channels` posts nothing.
|
|
956
|
+
`channels` posts nothing. It still runs with `--file-only`: the local report
|
|
957
|
+
file is written under `LOGS_ROOT`, which is already an `allowWrite` entry. It is
|
|
958
|
+
not a post, nothing outside the machine sees it, and no runner step depends on
|
|
959
|
+
it (`channels/report-file.md`). After the PR opened, and only then, the runner posts
|
|
951
960
|
what `~/.claude/autopilot/config.json` opts into
|
|
952
961
|
(`schemas/autopilot-config.schema.json`), once, through the existing scripts:
|
|
953
962
|
|
|
@@ -13,6 +13,10 @@ Start here:
|
|
|
13
13
|
5. /multi-agent:help This page
|
|
14
14
|
|
|
15
15
|
A task is a Jira key or URL, a GitHub issue URL, #N, repo#N or free text.
|
|
16
|
+
Typing /multi-agent on its own asks which kind it is, instead of this page, and
|
|
17
|
+
the same goes for a bare /multi-agent:analysis. A modifier with no task
|
|
18
|
+
(autopilot on its own) still prints what it needs, and an unattended run
|
|
19
|
+
started with no task stops instead of waiting for an answer.
|
|
16
20
|
Each command's own page has the detail: ~/.claude/commands/multi-agent/<name>/SKILL.md
|
|
17
21
|
|
|
18
22
|
------------------------------
|
|
@@ -29,7 +33,7 @@ Develop
|
|
|
29
33
|
/multi-agent:steer #id "..." Correct a running task at its next phase
|
|
30
34
|
/multi-agent:kill #id Stop a run and delete its worktree; logs kept
|
|
31
35
|
/multi-agent:manual-test [#id] Check out the branch, test it, answer ok or fix
|
|
32
|
-
/multi-agent:channels [KEY|#N] Post the report: Jira, Confluence, Wiki, PR
|
|
36
|
+
/multi-agent:channels [KEY|#N] Post the report: Jira, Confluence, Wiki, PR; and to a file
|
|
33
37
|
|
|
34
38
|
A run asks where the branch lives (worktree or project root). Autopilot
|
|
35
39
|
picks a worktree, and still stops at the Phase 5 channels menu.
|
|
@@ -46,6 +50,12 @@ Continuous mode
|
|
|
46
50
|
agent-queue label. agent-queue:1 .. agent-queue:9 set the order
|
|
47
51
|
(agent-queue:1 first). Change the label and assignee in autopilot-on.
|
|
48
52
|
|
|
53
|
+
Analysis has a queue of its own, on its own label: agent-analysis, per
|
|
54
|
+
repository as analysisGithubLabel and analysisJiraLabel. An item there is
|
|
55
|
+
analysed unattended and ends at the document, recorded as doc-delivered; it
|
|
56
|
+
never opens a pull request. The two labels have to differ, and a repository
|
|
57
|
+
that gives both the same value is refused.
|
|
58
|
+
|
|
49
59
|
Jira and GitHub
|
|
50
60
|
|
|
51
61
|
/multi-agent:jira Pick one of your open Jira items and start a run
|
|
@@ -113,6 +123,21 @@ Setup
|
|
|
113
123
|
/multi-agent:stack [ids...] Enable stack plugins for this repo
|
|
114
124
|
/multi-agent:scaffold <stack> <name> New project from a stack's scaffold
|
|
115
125
|
|
|
126
|
+
Install targets, one per host: --claude, --copilot, --codex, --local, --all.
|
|
127
|
+
--local is the Codex engine pointed at a model served from this machine, in
|
|
128
|
+
a tree of its own (~/.codex-local). It needs a server that speaks the OpenAI
|
|
129
|
+
Responses API (POST /v1/responses); Ollama 0.13.4 or newer serves it, and
|
|
130
|
+
other servers are a question about that server. Record the model in
|
|
131
|
+
prefs.global.localModel (baseUrl, model, contextWindow); doctor's local-model
|
|
132
|
+
check reads it. There the model rungs collapse to that one model, review is
|
|
133
|
+
one reviewer, one child runs at a time, and autopilot is not offered.
|
|
134
|
+
|
|
135
|
+
Every token belongs to a service account (prefs.global.serviceAccounts) that
|
|
136
|
+
says which host it may be sent to. No secret is produced without a
|
|
137
|
+
destination, and the host has to match exactly: a subdomain of a configured
|
|
138
|
+
host is refused rather than allowed. A file with no accounts in it resolves
|
|
139
|
+
the same way, because the entries are derived from the older keys.
|
|
140
|
+
|
|
116
141
|
Routines
|
|
117
142
|
|
|
118
143
|
/multi-agent:save [name] Save a recurring job as /multi-agent:<name>
|
|
@@ -164,4 +189,6 @@ Plugins and tools (call them directly)
|
|
|
164
189
|
Not registered means a silent no-op.
|
|
165
190
|
|
|
166
191
|
Logs: $HOME/.claude/logs/multi-agent/{project}/{task-id}/
|
|
192
|
+
agent-log.md (what the run did) and task-report.md (the report, written
|
|
193
|
+
every run whether or not a channel took it)
|
|
167
194
|
```
|
|
@@ -13,6 +13,10 @@ Buradan başla:
|
|
|
13
13
|
5. /multi-agent:help Bu sayfa
|
|
14
14
|
|
|
15
15
|
Görev bir Jira anahtarı ya da URL'i, GitHub issue URL'i, #N, repo#N veya düz metin olabilir.
|
|
16
|
+
Tek başına /multi-agent yazınca bu sayfa yerine hangisi olduğunu sorar. Aynı
|
|
17
|
+
soru tek başına yazılan analiz komutunda da çıkar: /multi-agent:analysis.
|
|
18
|
+
Görevsiz bir ek (tek başına autopilot) yine ne gerektiğini yazar; gözetimsiz
|
|
19
|
+
koşu görevsiz başlatılırsa cevap beklemeden durur.
|
|
16
20
|
Ayrıntı her komutun kendi sayfasında: ~/.claude/commands/multi-agent/<ad>/SKILL.md
|
|
17
21
|
|
|
18
22
|
------------------------------
|
|
@@ -29,7 +33,7 @@ Geliştir
|
|
|
29
33
|
/multi-agent:steer #id "..." Koşan işi düzelt; sonraki fazda uygulanır
|
|
30
34
|
/multi-agent:kill #id Koşuyu durdur, worktree'yi sil; log'lar kalır
|
|
31
35
|
/multi-agent:manual-test [#id] Branch'e geç, test et, "ok" ya da "fix" de
|
|
32
|
-
/multi-agent:channels [KEY|#N] Raporu gönder: Jira, Confluence, Wiki, PR
|
|
36
|
+
/multi-agent:channels [KEY|#N] Raporu gönder: Jira, Confluence, Wiki, PR; ayrıca dosyaya
|
|
33
37
|
|
|
34
38
|
Koşu branch'in nerede duracağını sorar: worktree ya da proje kökü.
|
|
35
39
|
Autopilot worktree seçer. Faz 5'teki kanal menüsünde yine de durur.
|
|
@@ -46,6 +50,12 @@ Sürekli mod
|
|
|
46
50
|
Jira maddelerini alır. Sırayı agent-queue:1 .. agent-queue:9 belirler
|
|
47
51
|
(önce agent-queue:1). Etiketi ve atananı autopilot-on'da değiştir.
|
|
48
52
|
|
|
53
|
+
Analizin kendi kuyruğu ve kendi etiketi var: agent-analysis; repo bazında
|
|
54
|
+
analysisGithubLabel ve analysisJiraLabel. Oradaki madde analiz komutunu
|
|
55
|
+
gözetimsiz koşturur ve dokümanda biter; kuyruk bunu doc-delivered diye yazar,
|
|
56
|
+
PR açılmaz. İki etiket farklı olmak zorunda; ikisine
|
|
57
|
+
aynı değeri veren repo reddedilir.
|
|
58
|
+
|
|
49
59
|
Jira ve GitHub
|
|
50
60
|
|
|
51
61
|
/multi-agent:jira Açık Jira maddelerinden birini seç, koşuyu başlat
|
|
@@ -113,6 +123,21 @@ Kurulum
|
|
|
113
123
|
/multi-agent:stack [id...] Bu repo için stack plugin'lerini aç
|
|
114
124
|
/multi-agent:scaffold <stack> <ad> Stack'in iskeletinden yeni proje
|
|
115
125
|
|
|
126
|
+
Her host için bir kurulum hedefi: --claude, --copilot, --codex, --local, --all.
|
|
127
|
+
--local, bu makinede sunulan bir modele bağlanan Codex motorudur; kendi
|
|
128
|
+
ağacına kurulur (~/.codex-local). Sunucunun OpenAI Responses API'sini
|
|
129
|
+
konuşması gerekir (POST /v1/responses); Ollama 0.13.4 ve sonrası bunu sunar,
|
|
130
|
+
başka sunucular için cevap o sunucuya bağlıdır. Modeli
|
|
131
|
+
prefs.global.localModel içine yaz (baseUrl, model, contextWindow); doctor'ın
|
|
132
|
+
local-model kontrolü bunu okur. Orada model basamakları tek modele iner,
|
|
133
|
+
review tek reviewer'dır, aynı anda tek çocuk koşar ve autopilot sunulmaz.
|
|
134
|
+
|
|
135
|
+
Her token, nereye gönderilebileceğini söyleyen bir servis hesabına bağlıdır
|
|
136
|
+
(prefs.global.serviceAccounts). Hedefi olmayan istek sır almaz ve host birebir
|
|
137
|
+
eşleşmek zorundadır: tanımlı bir host'un alt alan adı kabul değil, ret alır.
|
|
138
|
+
İçinde hesap bulunmayan dosya da aynı cevabı verir; girdiler eski
|
|
139
|
+
anahtarlardan türetilir.
|
|
140
|
+
|
|
116
141
|
Rutinler
|
|
117
142
|
|
|
118
143
|
/multi-agent:save [ad] Sık yaptığın işi /multi-agent:<ad> olarak kaydet
|
|
@@ -164,4 +189,6 @@ Plugin'ler ve araçlar (doğrudan çağır)
|
|
|
164
189
|
Kayıtlı değilse sessizce hiçbir şey yapmaz.
|
|
165
190
|
|
|
166
191
|
Log'lar: $HOME/.claude/logs/multi-agent/{project}/{task-id}/
|
|
192
|
+
agent-log.md (koşu ne yaptı) ve task-report.md (rapor; bir kanal
|
|
193
|
+
alsın almasın her koşuda yazılır)
|
|
167
194
|
```
|
|
@@ -45,7 +45,8 @@ All types enter the same Phase 0 flow.
|
|
|
45
45
|
| `purge` | User-only: name `/multi-agent-purge` for the user to type; that skill deletes ALL worktrees, branches, logs, state and the counter |
|
|
46
46
|
| `review` | Skip phases 0-3, review the current diff only |
|
|
47
47
|
| `autopilot` flag | Add to any pipeline command: skip user confirmations except destructive ops |
|
|
48
|
-
|
|
|
48
|
+
| `help` | Usage guide |
|
|
49
|
+
| No args | Ask (`_entry-picker.md`), then route the answer. A modifier with no task prints usage; an unattended run refuses |
|
|
49
50
|
|
|
50
51
|
Every task gets an auto-incremented short ID (`#1`, `#2`), stored in `agent-state.json`.
|
|
51
52
|
|
|
@@ -72,7 +72,8 @@ The full tables behind the dispatcher's compact routing table. Route first, then
|
|
|
72
72
|
| `language [en\|tr]` | Show or set the assistant `outputLanguage` (explanations and chat replies). `promptLanguage` is locked to `en` and is not toggleable. No arg = show current `outputLanguage`. With `en` or `tr` = set and persist `outputLanguage`. Commits and branch names stay English; PR, Jira and wiki bodies follow it. |
|
|
73
73
|
| `setup` | Keychain token + Git Identity onboarding |
|
|
74
74
|
| `autopilot` | Skip user confirmations, auto commit/PR |
|
|
75
|
-
|
|
|
75
|
+
| `help` | Show usage guide |
|
|
76
|
+
| No args | Ask (`_entry-picker.md`), then route the answer. A modifier with no task prints usage; an unattended run refuses |
|
|
76
77
|
|
|
77
78
|
### Loading
|
|
78
79
|
|
|
@@ -75,6 +75,8 @@ The generic "zero-interaction" contract covers Phases 0-4 only. Phase 5 channels
|
|
|
75
75
|
- **30-minute timeout** - if user does not respond, session ends cleanly:
|
|
76
76
|
- External delivery aborted (no silent apply - prevents accidental Jira comments / Confluence pages).
|
|
77
77
|
- Internal capture (`agent-log.md`, telemetry, knowledge base) STILL runs.
|
|
78
|
+
- The report file is written from prefs content (`--file-only`) as part of that
|
|
79
|
+
capture: a timeout is the person not answering, not the work being worthless.
|
|
78
80
|
- State persisted as `{phase: 5, waitingFor: "user-channels-choice", channelsTimeout: true}`.
|
|
79
81
|
- Resume: `/multi-agent:resume <task-id>` re-opens menu with same inputs.
|
|
80
82
|
- Post-hoc `/multi-agent:channels <task>` never times out - user invoked it explicitly.
|
|
@@ -98,7 +100,24 @@ Phase 0: Intake -> Phase 1: Evidence -> Phase 2: Synthesis -> Phase 3: Review ->
|
|
|
98
100
|
| 4 Publish | Local file / Confluence / Jira. Locked 6 still forbids `git add` and `git commit` |
|
|
99
101
|
| 5 Report | Channels, same as every mode |
|
|
100
102
|
|
|
101
|
-
|
|
103
|
+
### The unattended form (`analysis-autopilot`)
|
|
104
|
+
|
|
105
|
+
`/multi-agent:analysis <tracker-ref> autopilot` is its own declared mode
|
|
106
|
+
(`phases.json` `modes.analysis-autopilot`: the same six slots, the same step
|
|
107
|
+
names, `autopilot: true`, `commits: false`). It is the shape an unattended queue
|
|
108
|
+
launches for a tracker item carrying the repo's analysis label, and it ends at
|
|
109
|
+
`doc-delivered` rather than at a pull request. Still no worktree: isolation buys
|
|
110
|
+
nothing when no code is written, and Locked 6 forbids `git add` and `git commit`
|
|
111
|
+
in every analysis mode.
|
|
112
|
+
|
|
113
|
+
Every intake question is **derived from evidence or parked**, never defaulted and
|
|
114
|
+
never asked: what each one answers and from which evidence is
|
|
115
|
+
[`analysis/unattended.md`]($HOME/.claude/multi-agent-refs/analysis/unattended.md),
|
|
116
|
+
and a question that evidence cannot settle parks the run with the reason rather
|
|
117
|
+
than guessing a document nobody agreed to. The Phase 3.3 bucket rule is
|
|
118
|
+
unchanged (searches still run; a gap the user alone could close is stamped and
|
|
119
|
+
recorded in Section 20), and Phase 3.5 resolves to the local file only - an
|
|
120
|
+
unattended run publishes nothing outside the machine.
|
|
102
121
|
|
|
103
122
|
**Where the document lands.** Drafts go to `/tmp/analysis-<slug>-<ts>/` first, then the Phase 4 picker decides: Local writes `<repo>/analysis/<feature>-<platform>.md` uncommitted, Confluence posts the page, Jira updates the description. In the full pipeline the same engine writes into the worktree instead and `prefs.global.analysisPhase.commitDoc` decides whether it rides along with the commit.
|
|
104
123
|
|
|
@@ -7,13 +7,10 @@ Progress per `$HOME/.claude/multi-agent-refs/progress-contract.md`: channels dis
|
|
|
7
7
|
|
|
8
8
|
## Sub-step Tracking (required)
|
|
9
9
|
|
|
10
|
-
Phase 5 has **3 ordered sub-steps** (external delivery lives under channels)
|
|
10
|
+
Phase 5 has **3 ordered sub-steps** (external delivery lives under channels), registered by `add` from `schemas/phases.json`.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
bash ~/.claude/scripts/phase-tracker.sh update 5 in_progress
|
|
14
|
-
bash ~/.claude/scripts/phase-tracker.sh sub 5 1 Channels-Dispatch pending
|
|
15
|
-
bash ~/.claude/scripts/phase-tracker.sh sub 5 2 Log+Telemetry pending
|
|
16
|
-
bash ~/.claude/scripts/phase-tracker.sh sub 5 3 Knowledge+Memory pending
|
|
17
14
|
```
|
|
18
15
|
|
|
19
16
|
On entry: `phase-tracker.sh sub 5 <N> "<name>" in_progress`. On exit: `completed` / `failed` / `skipped` / `timeout`.
|
|
@@ -37,11 +34,16 @@ Phase 5 builds a state bundle and invokes `/multi-agent:channels` (Claude Code)
|
|
|
37
34
|
> **Local-only short-circuit**: when `state.offlineOnly == true` (all repos
|
|
38
35
|
> are local - see Phase 0), Step 1 is **skipped entirely**. No channels menu,
|
|
39
36
|
> no Jira/Wiki/Confluence/PR adapters, no autopilot pause. The tracker
|
|
40
|
-
> records `step1.status = "
|
|
41
|
-
> the internal capture sub-steps
|
|
42
|
-
>
|
|
37
|
+
> records `step1.status = "file-only"`, channels runs once with `--file-only`,
|
|
38
|
+
> and the internal capture sub-steps continue. Reports: `agent-log.md` and
|
|
39
|
+
> `task-report.md` on disk (`channels/report-file.md`).
|
|
43
40
|
|
|
44
|
-
> **Unattended** (`MULTI_AGENT_UNATTENDED=1`):
|
|
41
|
+
> **Unattended** (`MULTI_AGENT_UNATTENDED=1`): external delivery is
|
|
42
|
+
> `deferred-to-runner` (`features/unattended-security.md`); channels still runs
|
|
43
|
+
> with `--file-only`, so the report lands under `LOGS_ROOT`.
|
|
44
|
+
|
|
45
|
+
> **If the access check stops channels** (`ACCESS_RC` 3), Phase 5 records
|
|
46
|
+
> `report file not written` and continues its internal capture; it never halts.
|
|
45
47
|
|
|
46
48
|
### State bundle passed to channels
|
|
47
49
|
|
|
@@ -301,7 +303,7 @@ Full report: $HOME/.claude/logs/multi-agent/{project}/{task-id}/agent-log.md
|
|
|
301
303
|
|
|
302
304
|
Plan row: `plan-attachment.mjs line --state "$STATE_FILE"`, omitted when it prints nothing.
|
|
303
305
|
|
|
304
|
-
Tracker: `phase-tracker.sh sub 5 2 "Log+
|
|
306
|
+
Tracker: `phase-tracker.sh sub 5 2 "Log + telemetry" completed`.
|
|
305
307
|
|
|
306
308
|
## Step 3 - Knowledge Capture (incremental learning)
|
|
307
309
|
|
|
@@ -347,7 +349,7 @@ bash $HOME/.claude/scripts/memory-save.sh "$PROJECT_ROOT" --from-json memory-syn
|
|
|
347
349
|
- **user**: only if the user disclosed new context about their role, expertise, or team layout
|
|
348
350
|
- **Otherwise return `[]`** - blank is the correct default. Do not save derivable facts (code structure, git history, command outputs).
|
|
349
351
|
|
|
350
|
-
Tracker: `phase-tracker.sh sub 5 3 "Knowledge+
|
|
352
|
+
Tracker: `phase-tracker.sh sub 5 3 "Knowledge + memory" completed`.
|
|
351
353
|
|
|
352
354
|
Log: "Phase 5: Knowledge captured ({N} entries to {files})"
|
|
353
355
|
|
|
@@ -121,14 +121,15 @@ After every LLM call (counts are additive; skipping this is why runs end with du
|
|
|
121
121
|
$HOME/.claude/scripts/phase-tracker.sh tokens <N> <in> <out> [cached]
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Sub-steps are registered by `add`, from the `steps` list each phase declares in `schemas/phases.json` - a phase arrives with `<N>.1`, `<N>.2`, `<N>.3` already on it. Phases move their own:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
$HOME/.claude/scripts/phase-tracker.sh sub <N> 1 "<sub name>" pending # register
|
|
128
127
|
$HOME/.claude/scripts/phase-tracker.sh sub <N> 1 "<sub name>" in_progress # advance
|
|
129
128
|
$HOME/.claude/scripts/phase-tracker.sh sub <N> 1 "<sub name>" completed # done
|
|
130
129
|
```
|
|
131
130
|
|
|
131
|
+
The same call registers a step that is not in the contract (Phase 4's integration build, Phase 5's issue comment). Dev declares no steps: its sub-steps are Phase 1's plan tasks, attached by `phase-tracker.sh plan 2`. Each `sub` prints a `-- NEXT (required) --` block with this host's mirror call, as `update` does.
|
|
132
|
+
|
|
132
133
|
State persists at `$HOME/.claude/logs/multi-agent/<task_id>/tracker-state.json` - atomic writes mean concurrent worktrees don't corrupt each other.
|
|
133
134
|
|
|
134
135
|
### Optional banner (single-event flair)
|
|
@@ -145,7 +146,7 @@ Banner status enum on `end`: `done` | `failed` | `skipped`. Anything else exits
|
|
|
145
146
|
|
|
146
147
|
### TaskCreate registration (Claude Code - required)
|
|
147
148
|
|
|
148
|
-
In Claude Code the agent MUST register one TaskCreate tile per phase at Phase 0 startup, with each subject copied verbatim
|
|
149
|
+
In Claude Code the agent MUST register one TaskCreate tile per ROW that `phase-tracker.sh tiles` prints at Phase 0 startup, with each subject copied verbatim (`Phase 1 Plan`, ` 1.2 Exploration`; never a renamed or merged phase such as `Analysis + Plan`). The rows are the phases the current COMMAND runs (`/multi-agent` and the autopilot entries = 0..5, `:analysis` = 0/1/3/4/5) and, indented under each, that phase's declared sub-steps. Capture the `taskId` of every phase row, persist it via `phase-tracker.sh meta <N> tasklist_id "<taskId>"` so `:resume` can rebuild the widget.
|
|
149
150
|
|
|
150
151
|
Per phase boundary:
|
|
151
152
|
|