@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.
Files changed (142) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/README.md +57 -24
  3. package/README.tr.md +41 -8
  4. package/SECURITY.md +3 -3
  5. package/docs/architecture.md +41 -4
  6. package/docs/ecosystem.md +15 -13
  7. package/docs/facts.json +5 -4
  8. package/docs/features.md +59 -15
  9. package/install/_codex-agents.mjs +13 -8
  10. package/install/_common.mjs +24 -0
  11. package/install/_dev-only-files.mjs +4 -0
  12. package/install/_mcp-register.mjs +6 -2
  13. package/install/_rewrite-tree.mjs +197 -0
  14. package/install/codex.mjs +96 -180
  15. package/install/copilot.mjs +24 -54
  16. package/install/index.mjs +29 -11
  17. package/install/templates/codex-instructions.md +21 -5
  18. package/install/templates/copilot-instructions.md +21 -14
  19. package/manifest.json +2082 -0
  20. package/package.json +6 -2
  21. package/pipeline/commands/multi-agent/SKILL.md +5 -4
  22. package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -0
  23. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +31 -3
  24. package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +5 -1
  25. package/pipeline/commands/multi-agent/channels/SKILL.md +16 -8
  26. package/pipeline/commands/multi-agent/log/SKILL.md +2 -0
  27. package/pipeline/commands/multi-agent/stack/SKILL.md +1 -1
  28. package/pipeline/contract/manifest.json +1 -1
  29. package/pipeline/contract/types/index.d.ts +1 -0
  30. package/pipeline/lib/_jira-auth.sh +50 -78
  31. package/pipeline/lib/_service-account.sh +191 -0
  32. package/pipeline/lib/credential-inventory.sh +49 -37
  33. package/pipeline/lib/credential-store.sh +48 -3
  34. package/pipeline/lib/fetch-confluence.sh +76 -92
  35. package/pipeline/lib/fetch-crashlytics.sh +30 -59
  36. package/pipeline/lib/fetch-figma-annotations.sh +9 -9
  37. package/pipeline/lib/fetch-fortify.sh +77 -81
  38. package/pipeline/lib/fetch-graylog.sh +38 -77
  39. package/pipeline/lib/figma-mcp-refresh.sh +23 -4
  40. package/pipeline/lib/figma-screenshot.sh +7 -8
  41. package/pipeline/lib/figma-token.sh +39 -46
  42. package/pipeline/lib/host.mjs +138 -0
  43. package/pipeline/lib/host.sh +48 -0
  44. package/pipeline/lib/issue-fetcher.sh +25 -41
  45. package/pipeline/lib/jira-publish.sh +23 -21
  46. package/pipeline/lib/local-model.mjs +93 -0
  47. package/pipeline/lib/md2confluence-v3.py +37 -30
  48. package/pipeline/lib/model-dispatch.sh +41 -4
  49. package/pipeline/lib/model-resolve.mjs +58 -0
  50. package/pipeline/lib/post-pr-review.sh +38 -53
  51. package/pipeline/lib/reviewer-families.mjs +70 -0
  52. package/pipeline/lib/service-account.mjs +2131 -0
  53. package/pipeline/lib/service-account.sh +35 -0
  54. package/pipeline/lib/usage-token.mjs +64 -24
  55. package/pipeline/lib/usage-vocab.mjs +1 -1
  56. package/pipeline/lib/user-facing.mjs +11 -3
  57. package/pipeline/lib/vercel-deploy.sh +17 -26
  58. package/pipeline/multi-agent-refs/_entry-picker.md +62 -0
  59. package/pipeline/multi-agent-refs/analysis/intake.md +2 -0
  60. package/pipeline/multi-agent-refs/analysis/reusable-refs.md +1 -0
  61. package/pipeline/multi-agent-refs/analysis/unattended.md +135 -0
  62. package/pipeline/multi-agent-refs/autopilot-on/details.md +16 -0
  63. package/pipeline/multi-agent-refs/channels/generator.md +10 -2
  64. package/pipeline/multi-agent-refs/channels/menu.md +3 -1
  65. package/pipeline/multi-agent-refs/channels/preview.md +3 -1
  66. package/pipeline/multi-agent-refs/channels/reference.md +16 -2
  67. package/pipeline/multi-agent-refs/channels/report-file.md +188 -0
  68. package/pipeline/multi-agent-refs/cross-cli-contract.md +35 -27
  69. package/pipeline/multi-agent-refs/features/doctor.md +37 -11
  70. package/pipeline/multi-agent-refs/features/free-models.md +3 -3
  71. package/pipeline/multi-agent-refs/features/local-model.md +87 -0
  72. package/pipeline/multi-agent-refs/features/model-fallback.md +25 -10
  73. package/pipeline/multi-agent-refs/features/product-context.md +6 -5
  74. package/pipeline/multi-agent-refs/features/service-accounts.md +233 -0
  75. package/pipeline/multi-agent-refs/features/unattended-security.md +10 -1
  76. package/pipeline/multi-agent-refs/help/en.md +28 -1
  77. package/pipeline/multi-agent-refs/help/tr.md +28 -1
  78. package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +2 -1
  79. package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -1
  80. package/pipeline/multi-agent-refs/phases/modes.md +20 -1
  81. package/pipeline/multi-agent-refs/phases/phase-5-report.md +12 -10
  82. package/pipeline/multi-agent-refs/phases.md +4 -3
  83. package/pipeline/multi-agent-refs/review/panel.md +30 -18
  84. package/pipeline/multi-agent-refs/setup/discovery.md +17 -5
  85. package/pipeline/multi-agent-refs/setup/token-save-flow.md +21 -2
  86. package/pipeline/multi-agent-refs/sync/overview.md +11 -5
  87. package/pipeline/multi-agent-refs/tracker-contract.md +28 -10
  88. package/pipeline/office/index.html +3 -3
  89. package/pipeline/schemas/autopilot-config.schema.json +29 -4
  90. package/pipeline/schemas/hosts.json +512 -0
  91. package/pipeline/schemas/hosts.schema.json +310 -0
  92. package/pipeline/schemas/launch.json +22 -2
  93. package/pipeline/schemas/launch.schema.json +2 -1
  94. package/pipeline/schemas/phases.json +19 -1
  95. package/pipeline/schemas/phases.schema.json +8 -0
  96. package/pipeline/schemas/prefs.schema.json +331 -4
  97. package/pipeline/scripts/.doctor-mut.47076.mjs +2253 -0
  98. package/pipeline/scripts/_autopilot-config.mjs +67 -4
  99. package/pipeline/scripts/_autopilot-item.mjs +67 -0
  100. package/pipeline/scripts/_autopilot-outcomes.mjs +6 -0
  101. package/pipeline/scripts/_cost.mjs +75 -3
  102. package/pipeline/scripts/analysis-sources.mjs +22 -5
  103. package/pipeline/scripts/analysis-unattended.mjs +360 -0
  104. package/pipeline/scripts/anonymize-findings.mjs +3 -7
  105. package/pipeline/scripts/autopilot-arming.mjs +19 -10
  106. package/pipeline/scripts/autopilot-intake.mjs +124 -27
  107. package/pipeline/scripts/autopilot-menubar.swift +7 -0
  108. package/pipeline/scripts/autopilot-runner.mjs +77 -48
  109. package/pipeline/scripts/autopilot-status.sh +32 -9
  110. package/pipeline/scripts/bulk-read.sh +37 -5
  111. package/pipeline/scripts/confluence-readback.mjs +15 -7
  112. package/pipeline/scripts/cost-table.json +65 -25
  113. package/pipeline/scripts/doctor.mjs +119 -32
  114. package/pipeline/scripts/entry-mode.mjs +101 -0
  115. package/pipeline/scripts/estimate.mjs +30 -16
  116. package/pipeline/scripts/feedback-send.mjs +11 -8
  117. package/pipeline/scripts/gen-facts.mjs +7 -9
  118. package/pipeline/scripts/jira-attach.sh +23 -28
  119. package/pipeline/scripts/jira-search.sh +5 -21
  120. package/pipeline/scripts/launch-request.mjs +15 -9
  121. package/pipeline/scripts/migrate-prefs.mjs +56 -0
  122. package/pipeline/scripts/phase-tracker.sh +146 -38
  123. package/pipeline/scripts/priority-review.mjs +14 -7
  124. package/pipeline/scripts/product-context.mjs +26 -7
  125. package/pipeline/scripts/prune-logs.sh +4 -2
  126. package/pipeline/scripts/report-file.mjs +285 -0
  127. package/pipeline/scripts/rework-escalation.mjs +19 -4
  128. package/pipeline/scripts/service-read.mjs +19 -17
  129. package/pipeline/scripts/skill-siblings.mjs +17 -1
  130. package/pipeline/scripts/status-overview.mjs +20 -10
  131. package/pipeline/scripts/uninstall.mjs +145 -57
  132. package/pipeline/scripts/usage-register.mjs +34 -11
  133. package/pipeline/scripts/usage-report.mjs +31 -26
  134. package/pipeline/scripts/validate-triage.mjs +11 -1
  135. package/pipeline/scripts/work-items.mjs +25 -28
  136. package/pipeline/scripts/write-store-config.mjs +37 -11
  137. package/pipeline/skills/.skill-manifest.json +4 -4
  138. package/pipeline/skills/.skills-index.json +1 -1
  139. package/pipeline/skills/shared/core/multi-agent/SKILL.md +11 -3
  140. package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -0
  141. package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +11 -8
  142. package/pipeline/lib/credential-resolve.mjs +0 -75
@@ -4,33 +4,45 @@
4
4
 
5
5
  ## Reviewers
6
6
 
7
- Every host runs three reviewers; only the second slot differs, because GPT-5.4 exists on Copilot and Codex but not on Claude Code, where Opus fills it.
8
-
9
- **Claude Code (3 in parallel while the fable rung is on, 2 while it is off):**
10
- - Agent 1: `claude-fable-5-2` → security + architecture (only when `REVIEW_RUNG` is `fable`)
11
- - Agent 2: `claude-opus-5-5` → edge cases, alternate perspective
12
- - Agent 3: `claude-sonnet-5-5` → general quality
13
-
14
- **Copilot CLI (3 in parallel):**
15
- - Agent 1: `claude-opus-4.7` → security + architecture (Fable is not offered on Copilot CLI)
16
- - Agent 2: `gpt-5.4` → edge cases, alternate perspective
17
- - Agent 3: `claude-sonnet-4.6` → general quality
18
-
19
- **Codex CLI (3 in parallel, single vendor):**
20
- - Agent 1: `gpt-5.6` @ `xhigh` → security + architecture
21
- - Agent 2: `gpt-5.4` @ `high` → edge cases, alternate perspective
22
- - Agent 3: `gpt-5.6` @ `medium` → general quality
7
+ The panel below is generated from the host registry (`schemas/hosts.json`); only
8
+ the second slot differs between hosts, because GPT-5.4 is reachable on two of
9
+ them and not on Claude Code, where Opus fills it.
10
+
11
+ <!-- hosts:panel -->
12
+ **Claude Code** (3 in parallel, one vendor):
13
+ - Agent 1: the `fable` rung -> security + architecture
14
+ - Agent 2: the `opus` rung -> edge cases, alternate perspective
15
+ - Agent 3: the `sonnet` rung -> general quality
16
+ - Triage: the `fable` rung
17
+
18
+ **Copilot CLI** (3 in parallel, two vendors):
19
+ - Agent 1: `claude-opus-4.7` -> security + architecture
20
+ - Agent 2: `gpt-5.4` -> edge cases, alternate perspective
21
+ - Agent 3: `claude-sonnet-4.6` -> general quality
22
+ - Triage: `claude-opus-4.7`
23
+
24
+ **Codex CLI** (3 in parallel, one vendor):
25
+ - Agent 1: `gpt-5.6` @ `xhigh` -> security + architecture
26
+ - Agent 2: `gpt-5.4` @ `high` -> edge cases, alternate perspective
27
+ - Agent 3: `gpt-5.6` @ `medium` -> general quality
28
+ - Triage: `gpt-5.6` @ `max`
29
+
30
+ **Local model** (1 in parallel, one vendor):
31
+ - Agent 1: `local` -> security + architecture
32
+ - Triage: `local`
33
+ <!-- /hosts -->
23
34
 
24
35
  When `REVIEW_RUNG` is anything but `fable`, Agent 1 is dropped on Claude Code and the panel is Agent 2 + Agent 3.
25
36
 
26
37
  ## Store compliance
27
38
 
28
39
  | Platform | Trigger files | Catalog |
29
- |---|---|---|
40
+ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
30
41
  | iOS | `**/Info.plist`, `**/PrivacyInfo.xcprivacy`, `**/*.entitlements`, `**/*App.swift`, `**/AppDelegate*.swift`, `**/SceneDelegate*.swift`, `**/project.pbxproj` | `$HOME/.claude/skills/apple-archive-compliance/SKILL.md` - 18 rules + ITMS refs |
31
42
  | Android | `**/AndroidManifest.xml`, `**/build.gradle(.kts)`, `**/proguard-rules.pro`, `**/network_security_config.xml` | `$HOME/.claude/skills/google-play-compliance/SKILL.md` - 21 rules + Play policy refs |
32
43
 
33
44
  Each finding gets the `ruleID` from the catalog plus the platform policy ref:
45
+
34
46
  - iOS: `(apple-archive-compliance / info-plist - Guideline 5.1.1)`
35
47
  - Android: `(google-play-compliance / dangerous-permissions - Policy - Permissions)`
36
48
 
@@ -66,7 +78,7 @@ default: option 1
66
78
  `post-pr-review.sh` reads `agent-state.review.{input, findings, iterationNumber, headCommitSha}`, decides APPROVE vs NEEDS_WORK from the decision rule, posts one inline comment per accepted blocking + important finding (in `outputLanguage`), then sets the review state via the provider's API:
67
79
 
68
80
  | Provider | Inline comment | State |
69
- |---|---|---|
81
+ | ------------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
70
82
  | `github` | `gh api -X POST /repos/{o}/{r}/pulls/{n}/comments` (path + line + commit_id) | `gh pr review --approve` / `--request-changes` |
71
83
  | `bitbucket-server` | `POST /pull-requests/{n}/comments` with `anchor: { path, line, lineType:"ADDED", fileType:"TO" }` | `PUT /pull-requests/{n}/participants/{user}` body `{"status":"APPROVED"}` or `{"status":"NEEDS_WORK"}` |
72
84
 
@@ -2,12 +2,24 @@
2
2
 
3
3
  Instead of checking only hardcoded key names, discover ALL user keys and intelligently map them to services. Uses `credential-store.sh list`:
4
4
 
5
- **1a. Discover all keys:**
5
+ **1a. Discover all keys - two passes:**
6
+
6
7
  ```bash
7
- DISCOVERED=$(~/.claude/lib/credential-store.sh list 2>/dev/null | grep -i "^${USER}" | sort -u)
8
- echo "$DISCOVERED"
8
+ DISCOVERED_ALL=$(~/.claude/lib/credential-store.sh list 2>/dev/null | sort -u)
9
+ DISCOVERED=$(printf '%s\n' "$DISCOVERED_ALL" | grep -i "^${USER}")
9
10
  ```
10
11
 
12
+ `DISCOVERED` is the conventional set: the standard key names are
13
+ `{USER}_{Service}_{Type}`, so an item whose name starts with the username is
14
+ almost certainly one of ours and is offered first. `DISCOVERED_ALL` is every
15
+ item the store lists, and it is what Steps 3 and 4 actually search. A token
16
+ saved before this pipeline existed - `work_jira_pat`, `JiraPAT_2024` - does
17
+ not start with the username, and narrowing the search to the prefixed set is how
18
+ setup comes to ask a person for a credential they already have on the machine.
19
+
20
+ Neither list is ever printed in full: the keyword match decides what a person is
21
+ shown, and an item name is not a value but it is still theirs.
22
+
11
23
  **1b. Search keywords (per service):**
12
24
 
13
25
  Standard key names - the ones to use when creating a NEW key - live in `$HOME/.claude/multi-agent-refs/keychain.md` "Standard key names"; read the name for a service from there. Existing keys under other names are perfectly valid, which is what these keywords are for.
@@ -45,7 +57,7 @@ For each service in the table above, follow this order:
45
57
 
46
58
  1. **Check standard key** -> `~/.claude/lib/credential-store.sh get "<standard_key>" 2>/dev/null`
47
59
  - Found (non-empty stdout, exit 0) -> auto-map, done
48
- 3. **Search discovered keys** -> filter `$DISCOVERED` by the service's search keywords (case-insensitive)
60
+ 3. **Search discovered keys** -> filter `$DISCOVERED_ALL` by the service's search keywords (case-insensitive). When several match, a `$DISCOVERED` entry is listed above the rest: a conventionally named item is the likelier one, but it is not the only candidate.
49
61
  - Exactly 1 match -> show: `"Found '${matched_key}' for ${service} - use this? (enter=yes / n=skip)"` -> if yes, map it
50
62
  - Multiple matches -> show numbered list, user picks:
51
63
  ```
@@ -75,7 +87,7 @@ For each service in the table above, follow this order:
75
87
  - Cap at 10 candidates, sorted by relevance (shortest edit distance to service keywords)
76
88
  - If 0 candidates even after broad search -> MISSING (truly not in keychain)
77
89
 
78
- **Important:** Steps 3-4 search the FULL `$DISCOVERED` list (both passes from 1a), not just user-prefixed entries. This catches tokens saved under any naming convention.
90
+ **Important:** Steps 3 and 4 search `$DISCOVERED_ALL`, not `$DISCOVERED`. Searching only the user-prefixed set is what makes setup ask for a credential the machine already holds under a name it did not recognise.
79
91
 
80
92
  **1d. Check preferences for existing mapping:**
81
93
 
@@ -115,7 +115,14 @@ For GitHub (special case):
115
115
 
116
116
  Update `prefs.global.keychainMapping.{service}` with the key name.
117
117
  Update `identity.servicePatMap.{service}` with the key name.
118
- Update `serviceStatus.{service} = { ok: true, checkedAt: <now> }`.
118
+
119
+ **Do not write `serviceStatus.{service}` here.** Saving a token is not evidence
120
+ that it works, and `ok: true` is read as evidence: `autopilot-arming.mjs`
121
+ refuses to arm on a recorded failure and treats an absent record as "not probed
122
+ yet", so a `true` written at save time is the one value that cannot be told
123
+ apart from a successful probe. A hosted service also has no host yet at this
124
+ point, so there is nothing to probe against. The probe belongs after Step 3.5,
125
+ where it is described.
119
126
 
120
127
  **→ Next: if `{service}` is `jira` / `confluence` / `bitbucket` / `fortify` / `graylog` AND the corresponding
121
128
  `prefs.global.hosts.{service}` is unset, run Step 3.5 (Host Prompt) inline before
@@ -145,7 +152,19 @@ Service host - needed to build API URLs for this token.
145
152
  {Service} host (e.g. jira.example.com): ___
146
153
  ```
147
154
 
148
- Save to `prefs.global.hosts.{service}`. For Fortify, also ask `Fortify project version ids (optional, comma-separated - e.g. 1234,5678)` → `prefs.global.fortify.versionIds`. A ticket naming only an instance id carries no version, so the lookup silently no-ops without these; URL-referenced findings resolve either way.
155
+ Save to `prefs.global.hosts.{service}`.
156
+
157
+ **Then probe once, and record what it says.** With the token saved and the host
158
+ known, run `bash "$HOME/.claude/lib/credential-inventory.sh" --key {service}`
159
+ and write `serviceStatus.{service} = { ok: <probe result>, checkedAt: <now> }`,
160
+ with `error` on a failure. A probe that cannot run at all - no host for a hosted
161
+ service, no network - writes nothing, because "I did not check" and "I checked
162
+ and it worked" are different answers and only one of them is true. A failure is
163
+ reported in one line and does not undo the save: the token is stored, the person
164
+ is told it did not answer, and the Expired-token decision in
165
+ `$HOME/.claude/multi-agent-refs/keychain.md` is what they run next.
166
+
167
+ For Fortify, also ask `Fortify project version ids (optional, comma-separated - e.g. 1234,5678)` → `prefs.global.fortify.versionIds`. A ticket naming only an instance id carries no version, so the lookup silently no-ops without these; URL-referenced findings resolve either way.
149
168
 
150
169
  For Jira, **discover the project keys instead of asking the user to recall them.** The token is already saved and the host is already known, so ask Jira which projects this person actually works in - a corporate instance has thousands of projects, and a typed key is a typo waiting to route branches and new issues at the wrong board:
151
170
 
@@ -7,14 +7,20 @@ publishes.
7
7
  ## Targets
8
8
 
9
9
  | # | Target | Path | Direction |
10
- |---|-------|-----|-----|
10
+ | --- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
11
11
  | 1 | Claude Code (source of truth) | `~/.claude/commands/multi-agent/` + `~/.claude/multi-agent-refs/` + `~/.claude/agents/` + `~/.claude/scripts/` + `~/.claude/lib/` | source |
12
- | 2 | Copilot CLI | `~/.copilot/copilot-instructions.md` + `~/.copilot/skills/` | <- from Claude |
12
+ | 2 | Copilot CLI | `~/.copilot/copilot-instructions.md` + `~/.copilot/skills/` + `~/.copilot/multi-agent-refs/` | <- from Claude (path-rewritten) |
13
13
  | 2b | Codex CLI | `~/.codex/AGENTS.md` + `~/.codex/skills/multi-agent/` + `~/.codex/multi-agent-refs/` + `~/.codex/agents/*.toml` | <- from Claude (path-rewritten) |
14
+ | 2c | Local model | `~/.codex-local/AGENTS.md` + `~/.codex-local/skills/multi-agent/` + `~/.codex-local/multi-agent-refs/` + `~/.codex-local/agents/*.toml` | <- from Claude (path-rewritten), only when the tree exists |
14
15
  | 3 | multi-agent-pipeline repo | `~/multi-agent-pipeline/pipeline/` | <- from Claude (genericized) |
15
16
  | 4 | Website | `{owner}/{website-host}` | <- version + features |
16
17
  | 5 | multi-agent MCP server | resolved from `prefs.global.devToolkit` or the `mcpServers` registration | own repo: gate, commit, publish |
17
18
 
19
+ A host tree that is not there is not created by a sync: installing a host is
20
+ `/multi-agent:setup`'s decision and the user's, and a sync that created one
21
+ would enrol a machine in a host nobody asked for. Target 2c is therefore
22
+ skipped, not failed, when `~/.codex-local` is absent.
23
+
18
24
  ## Sync rules (Claude <-> Copilot)
19
25
 
20
26
  1. **Read first** - understand every target's current state before making any change
@@ -34,7 +40,7 @@ publishes.
34
40
  ## Keychain Token Access
35
41
 
36
42
  | Operation | Token Source |
37
- |-------|---------------|
43
+ | --------------------------------- | ------------------------------------------------------------------------------------------------- |
38
44
  | `gh` CLI (personal) | `{owner}` gh auth (Keychain) |
39
45
  | `gh` CLI (work) | `{user}_<work-label>` gh auth (Keychain) - see `prefs.global.accounts[]` |
40
46
  | npm publish | `NODE_AUTH_TOKEN` - `GITHUB_TOKEN` in CI, Keychain PAT locally |
@@ -47,14 +53,14 @@ gh auth switch --user {owner} # for personal repos
47
53
  ## Website files (Step 4)
48
54
 
49
55
  | File | What to sync |
50
- |-------|--------------|
56
+ | ---------------------- | -------------------------------------------------------- |
51
57
  | `src/lib/i18n.tsx` | Phase count, model count, feature descriptions (EN + TR) |
52
58
  | `src/data/projects.ts` | Version number, tagline, description, feature list |
53
59
 
54
60
  ## Sub-command paths
55
61
 
56
62
  | Claude Code | Copilot CLI |
57
- |-------------|-------------|
63
+ | ----------------------------------------------- | ---------------------------------------------- |
58
64
  | `~/.claude/commands/multi-agent/{cmd}/SKILL.md` | `~/.copilot/skills/multi-agent-{cmd}/SKILL.md` |
59
65
 
60
66
  **Claude -> Copilot**: add SKILL.md frontmatter (`name`, `description`, `user-invocable: true`, `argument-hint`)
@@ -118,7 +118,7 @@ For each `TaskCreate` line `phase-tracker.sh tiles` prints, IN THAT ORDER:
118
118
  bash phase-tracker.sh meta 0 tasklist_id "<taskId>"
119
119
  ```
120
120
 
121
- **The subject is the tracker's line, verbatim.** `phase-tracker.sh tiles` prints each subject from the phase names the command registered (`0:Init 1:Plan 2:Dev 3:Review 4:Commit 5:Report` for a full run). Copy it as printed: no task-id prefix, no renamed, merged or annotated phase (`Analysis + Plan`, `Review + Verify`). What a phase does inside goes in `activeForm` or a sub-step tile, never in the phase name. A tile that disagrees with the tracker is a second, wrong progress record.
121
+ **The subject is the tracker's line, verbatim.** `phase-tracker.sh tiles` prints each subject from the phase names the command registered (`0:Init 1:Plan 2:Dev 3:Review 4:Commit 5:Report` for a full run) and, indented under each, that phase's sub-steps. Copy every row as printed, two leading spaces included: no task-id prefix, no renamed, merged or annotated phase (`Analysis + Plan`, `Review + Verify`). What a phase does inside goes in `activeForm` or a sub-step tile, never in the phase name. A tile that disagrees with the tracker is a second, wrong progress record.
122
122
 
123
123
  The `tasklist_id` meta field is persisted so that `:resume` can rebuild the TaskList from the state file in a fresh session. On Claude Code the `task-mirror.sh` PostToolUse hook records it from every phase tile's TaskCreate result, replacing an id an earlier session left (so a resume's new ids land too), and tells the model when a tile is created after a higher-numbered phase's tile in the same session. The explicit `meta` call stays in the pattern: it is what the other hosts have, and on Claude Code it writes the same value.
124
124
 
@@ -352,14 +352,31 @@ bash $HOME/.claude/scripts/phase-tracker.sh meta <N> "<key>" "<value>"
352
352
 
353
353
  Meta keys are overwritten - values update as the pipeline progresses.
354
354
 
355
- ### 7. Sub-phase (optional, e.g. Phase 1 explorers)
355
+ ### 7. Sub-steps - declared by the contract, moved by the phase
356
356
 
357
- There is no nested TaskList for sub-phases - sub-progress is reflected in `activeForm` plus a `sub` record in the state file.
357
+ Each phase declares its sub-steps in `schemas/phases.json` (`steps`), and
358
+ `phase-tracker.sh add` registers them, so a phase reaches the widget with
359
+ `<N>.1`, `<N>.2`, `<N>.3` already under it. A step registered from the contract
360
+ is a property of the phase set and reaches the widget whether or not the phase
361
+ later announces it; one a phase has to announce before it exists reaches the
362
+ widget only when that call is made.
363
+
364
+ There is no nested task list on any host. A sub-step is a row of its own,
365
+ indented two spaces inside the subject, and its number rides in that string
366
+ (` 3.2 Review panel`) because the widget renders one string per row and no
367
+ field beside it.
368
+
369
+ The phase moves its own steps as it reaches them, and registers one the contract
370
+ does not declare the same way:
358
371
 
359
372
  ```bash
360
373
  bash $HOME/.claude/scripts/phase-tracker.sh sub <N> <sub_id> "<sub name>" in_progress
361
374
  ```
362
375
 
376
+ Every `sub` prints a `-- NEXT (required) --` block with this host's mirror call,
377
+ exactly as `update` does. `activeForm` stays what it was - the live
378
+ current-action line inside the step, not a substitute for the row:
379
+
363
380
  ```text
364
381
  TaskUpdate({taskId: <phase_task>, activeForm: "Running explorer: repo-map"})
365
382
  ```
@@ -379,17 +396,18 @@ starts and finishes it.
379
396
 
380
397
  **A rebuild, not an append.** Creation order is the only ordering the native
381
398
  widget has - there is no parent field and no insert - so steps arriving at
382
- Phase 2 cannot be appended without landing after Phase 5. `tiles` detects that
383
- sub-steps exist and asks for the list to be deleted and recreated. That is one
384
- rebuild at one boundary, and it is the same thing Resume already does below for
385
- a different reason.
399
+ Phase 2 cannot be appended without landing after Phase 5. `plan` therefore ends
400
+ in `tiles --rebuild`, which asks for the list to be deleted and recreated. That
401
+ is one rebuild at one boundary, and it is the same thing Resume already does
402
+ below for a different reason. Every other phase's steps are registered by `add`
403
+ before any tile exists, so they go out with the first batch and cost no rebuild.
386
404
 
387
405
  **Per host, with what each one actually has:**
388
406
 
389
407
  | Host | How the plan arrives | Dependencies |
390
408
  |---|---|---|
391
409
  | Claude Code | `TaskCreate` per row, the steps indented inside the subject string | `TaskUpdate(..., addBlockedBy: [...])`, a second pass because a tile cannot be blocked by one that does not exist yet |
392
- | Codex | `update_plan` re-read from `subjects`, which now includes the steps | No dependency concept. The `(bekliyor: t1)` suffix inside the step text is where that survives |
410
+ | Codex | `update_plan` re-read from `tiles`, whose payload carries the steps as plan steps of their own | No dependency concept. The `(waiting on: t1)` suffix inside the step text is where that survives |
393
411
  | Copilot CLI | The card, which has drawn sub-phases with tree glyphs since they existed | Same suffix, on the card row |
394
412
 
395
413
  The dependency lines name tiles by their subject, never by the plan's own `t1` /
@@ -429,8 +447,8 @@ of it is harmless: the second write sets the same values.
429
447
 
430
448
  When `/multi-agent:resume <task_id>` is called:
431
449
  1. The state file is loaded and the phase list is read.
432
- 2. `TaskCreate` is called again for every phase (new task IDs are issued for the new session).
433
- 3. Each phase's status is re-applied via `TaskUpdate` based on the state file.
450
+ 2. `TaskCreate` is called again for every row `phase-tracker.sh tiles` prints, sub-steps included (new task IDs are issued for the new session).
451
+ 3. Each row's status is re-applied via `TaskUpdate` based on the state file.
434
452
  4. The active phase is determined and the agent picks up where it left off.
435
453
 
436
454
  The `tasklist_id` meta from the previous session is replaced with the new IDs during resume.