@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
@@ -9,12 +9,13 @@
9
9
  * {"appStoreConnect": {"keyIdService", "issuerIdService", "privateKeyService"},
10
10
  * "googlePlay": {"serviceAccountService"}}
11
11
  *
12
- * This writes that file from the pipeline's own keychainMapping, so the two
13
- * never name different items. Each service name is the mapping value, else the
14
- * standard `${USER}_...` name. A store is written only when every one of its
15
- * items exists; existence is asked through `credential-store.sh probe`, which
16
- * sends the value to /dev/null, so no secret passes through this process.
17
- * Top-level keys other than the two stores are preserved.
12
+ * This writes that file from the items this machine's own accounts name (the
13
+ * account resolver's itemNames), so the two never name different items. Each
14
+ * service name is the account's item, else the standard `${USER}_...` name. A
15
+ * store is written only when every one of its items exists; existence is asked
16
+ * through `credential-store.sh probe`, which sends the value to /dev/null, so
17
+ * no secret passes through this process. Top-level keys other than the two
18
+ * stores are preserved.
18
19
  *
19
20
  * Paths: preferences at MULTI_AGENT_PREFS or ~/.claude/multi-agent-preferences.json
20
21
  * (the default credential-store.sh uses); the reference file at
@@ -45,6 +46,7 @@ import { homedir } from "node:os";
45
46
  import { dirname, join } from "node:path";
46
47
  import { fileURLToPath } from "node:url";
47
48
  import { prefsPath as sharedPrefsPath } from "../lib/prefs-value.mjs";
49
+ import { itemNames } from "../lib/service-account.mjs";
48
50
  import { exitOnHelp } from "../lib/cli-help.mjs";
49
51
 
50
52
  exitOnHelp(import.meta.url);
@@ -56,22 +58,34 @@ export const STORES = Object.freeze({
56
58
  appStoreConnect: [
57
59
  {
58
60
  logical: "appstore_connect_key_id",
61
+ service: "appstore_connect",
62
+ slot: "key_id",
59
63
  field: "keyIdService",
60
64
  standard: "AppStoreConnect_Key_Id",
61
65
  },
62
66
  {
63
67
  logical: "appstore_connect_issuer_id",
68
+ service: "appstore_connect",
69
+ slot: "issuer_id",
64
70
  field: "issuerIdService",
65
71
  standard: "AppStoreConnect_Issuer_Id",
66
72
  },
67
73
  {
68
74
  logical: "appstore_connect_private_key",
75
+ service: "appstore_connect",
76
+ slot: "private_key",
69
77
  field: "privateKeyService",
70
78
  standard: "AppStoreConnect_Private_Key",
71
79
  },
72
80
  ],
73
81
  googlePlay: [
74
- { logical: "google_play", field: "serviceAccountService", standard: "GooglePlay_Access_Json" },
82
+ {
83
+ logical: "google_play",
84
+ service: "google_play",
85
+ slot: "service_account_json",
86
+ field: "serviceAccountService",
87
+ standard: "GooglePlay_Access_Json",
88
+ },
75
89
  ],
76
90
  });
77
91
 
@@ -92,14 +106,26 @@ export function storeConfigPath(env = process.env) {
92
106
  );
93
107
  }
94
108
 
109
+ /**
110
+ * The store item each of these slots is named by, keyed as the STORES rows
111
+ * ask for it. Names only: the store is never read here, and an account that
112
+ * names nothing simply leaves its row to the standard `${USER}_...` name.
113
+ */
95
114
  export function readMapping(path) {
115
+ const out = {};
116
+ let named;
96
117
  try {
97
- const prefs = JSON.parse(readFileSync(path, "utf8"));
98
- const km = prefs?.global?.keychainMapping;
99
- return km && typeof km === "object" ? km : {};
118
+ named = itemNames(JSON.parse(readFileSync(path, "utf8")));
100
119
  } catch {
101
- return {};
120
+ return out;
102
121
  }
122
+ for (const items of Object.values(STORES)) {
123
+ for (const item of items) {
124
+ const found = named.find((x) => x.service === item.service && x.slot === item.slot);
125
+ if (found) out[item.logical] = found.item;
126
+ }
127
+ }
128
+ return out;
103
129
  }
104
130
 
105
131
  export function serviceName(mapping, item, user) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-11-13T14:56:51Z",
3
+ "generatedAt": "2026-11-16T18:57:02Z",
4
4
  "skillCount": 258,
5
5
  "entries": [
6
6
  {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  {
27
27
  "path": "shared/core/multi-agent-analysis/SKILL.md",
28
- "sha256": "a3eeeee1ccb9e4e4f1a4f8d0537263c5cc70fda7ce1e2c202d40fcc831b9e308"
28
+ "sha256": "aff332d981fe977f01b190df7a24bc7e9ea6005c77542415cc10feb7cb792526"
29
29
  },
30
30
  {
31
31
  "path": "shared/core/multi-agent-autopilot-off/SKILL.md",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  {
51
51
  "path": "shared/core/multi-agent-channels/SKILL.md",
52
- "sha256": "94ee57622a4066d988e57ce346be033d4b3ee00d67f5891ccc0d5c3538742779"
52
+ "sha256": "78f14705da370e7646b069da35958bbb835b20dc7a2cb63cd85db3de78e3ded7"
53
53
  },
54
54
  {
55
55
  "path": "shared/core/multi-agent-clean-disk/SKILL.md",
@@ -337,7 +337,7 @@
337
337
  },
338
338
  {
339
339
  "path": "shared/core/multi-agent/SKILL.md",
340
- "sha256": "be85b49c6699db2869564c8453c1387ecd5c73bdbeeb45d7e3bcf0b02a74c65c"
340
+ "sha256": "9cd4c70f6e1aa6833522287918523e82d4245577e117f8509af51070848d897a"
341
341
  },
342
342
  {
343
343
  "path": "shared/external/accessibility-compliance-accessibility-audit/SKILL.md",
@@ -1214,7 +1214,7 @@
1214
1214
  },
1215
1215
  {
1216
1216
  "name": "multi-agent-channels",
1217
- "description": "Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch.",
1217
+ "description": "Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT. Also writes the run's report to a local file on every run, whatever the channels did. Use to post or redo a run's report; Phase 5 delegates here, or ",
1218
1218
  "platform": null,
1219
1219
  "group": "core",
1220
1220
  "plugin": null,
@@ -52,10 +52,18 @@ pref_model="$(awk '/^preferredModel:/ {print $2; exit}' "$persona_file")"
52
52
  override="${PHASE_MODEL_OVERRIDE:-}"
53
53
  routed="${override:-$("$HOME/.claude/lib/model-dispatch.sh" subagent --persona "$persona" --phase "$currentPhase" --task-kind "$taskType" --default "${pref_model:-opus}" 2>/dev/null)}"
54
54
  resolved_model="${routed:-${pref_model:-opus}}"
55
- export CLAUDE_CODE_SUBAGENT_MODEL="$resolved_model" # Copilot CLI also passes it as --model
55
+ export CLAUDE_CODE_SUBAGENT_MODEL="$resolved_model"
56
56
  ```
57
57
 
58
- **Precedence:** per-dispatch `PHASE_MODEL_OVERRIDE` > `prefs.global.modelRouting` rule > persona `preferredModel` > global default (`opus`). Anthropic-only: features/model-fallback.md "Routing at dispatch". Simple text tasks ask `model-dispatch.sh delegate --default host` first; `free` means `multi-agent:llm_delegate`, never for code, plans, reviews or triage (`$HOME/.claude/multi-agent-refs/features/free-models.md`).
58
+ The last line is this host's way of handing a child its model and is the only
59
+ host-specific step: elsewhere the same rung is passed as a flag on the CLI call
60
+ or as a field on the spawn call, and one host also carries a reasoning effort
61
+ and a ceiling on how many children run at once. The table of all of them, and
62
+ what each host's personas are written in, is
63
+ `$HOME/.claude/multi-agent-refs/features/model-fallback.md` "Routing at
64
+ dispatch". Resolve the rung the same way everywhere; only that last line moves.
65
+
66
+ **Precedence:** per-dispatch `PHASE_MODEL_OVERRIDE` > `prefs.global.modelRouting` rule > persona `preferredModel` > global default (`opus`). A rule naming a rung this host does not offer is skipped and the next one answers: features/model-fallback.md "Routing at dispatch". Simple text tasks ask `model-dispatch.sh delegate --default host` first; `free` means `multi-agent:llm_delegate`, never for code, plans, reviews or triage (`$HOME/.claude/multi-agent-refs/features/free-models.md`).
59
67
 
60
68
  Skill injection (`prefs.global.dynamicSkillLoading`): read `$HOME/.claude/multi-agent-refs/orchestrator/skill-loading.md` when it is on or when composing a sub-agent prompt.
61
69
 
@@ -66,7 +74,7 @@ Run phases sequentially, log every step to `agent-log.md`, and on a failure mark
66
74
  ### Canonical phase labels (TaskCreate + banner)
67
75
 
68
76
  | # | Label |
69
- |---|---|
77
+ | --- | -------------------- |
70
78
  | 0 | Phase 0: Init |
71
79
  | 1 | Phase 1: Plan |
72
80
  | 2 | Phase 2: Dev |
@@ -19,6 +19,8 @@ ACCESS_LINE=$(node "$HOME/.copilot/scripts/usage-access.mjs"); ACCESS_RC=$?
19
19
 
20
20
  **Input**: $ARGUMENTS (optional analysis name, e.g. `"OrderStatus"`)
21
21
 
22
+ `<tracker-ref> autopilot` is not a name: it is the unattended form continuous mode launches for an item carrying the repo's analysis label (`analysisGithubLabel` / `analysisJiraLabel`). It is its own declared mode (`phases.json` `modes.analysis-autopilot`) and asks nothing: Phase 0 answers every question from the item, the repo and the preferences, or parks on it with the reason. The side-effect contract is unchanged - the run stops at the document, which is what the queue records as `doc-delivered`.
23
+
22
24
  `check <doc.md>` / `refresh <doc.md>` is not a name: compare the document with its sources, or redraft from the stale ones. Read `$HOME/.claude/multi-agent-refs/features/analysis-sources.md` and follow it instead of the steps below.
23
25
 
24
26
  `conform <doc.md>` is not a name: map an existing document onto a template without changing what it says. Follow `$HOME/.claude/multi-agent-refs/features/analysis-outline.md` instead of the steps below.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: multi-agent-channels
3
- description: "Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch."
3
+ description: "Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT. Also writes the run's report to a local file on every run, whatever the channels did. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch."
4
4
  user-invocable: true
5
- argument-hint: '<Jira-id | PR-url | #N | Jira-url> [--channels pr,jira,confluence,wiki] [--content normal,technical,test,auto-diff,note,test-run] [--flow-run <runId>[,<runId>...]] [--message "..."] [--message-file path] [--dry-run] [--append] [--ready]'
5
+ argument-hint: '<Jira-id | PR-url | #N | Jira-url> [--channels pr,jira,confluence,wiki] [--content normal,technical,test,auto-diff,note,test-run] [--flow-run <runId>[,<runId>...]] [--message "..."] [--message-file path] [--dry-run] [--append] [--ready] [--file-only]'
6
6
  metadata:
7
7
  language: en
8
8
  ---
@@ -19,18 +19,20 @@ ACCESS_LINE=$(node "$HOME/.copilot/scripts/usage-access.mjs"); ACCESS_RC=$?
19
19
 
20
20
  Single entry point for posting a task report to Jira, Confluence, Wiki (component-only) and the PR description. Phase 5 delegates here; users also invoke it post-hoc by Jira ID / PR URL / branch. Copilot CLI: `multi-agent-channels <target>`; Claude Code: `/multi-agent:channels <target>`. Prompts are byte-identical between the two (`smoke-cross-cli-behavior.sh`).
21
21
 
22
+ Every run that composes a body also writes it to `task-report.md` beside the run's `agent-log.md`. That file is not a channel and has no setting: it is what a machine with no tracker, an unattended run and a cancelled menu are left with. Contract: `channels/report-file.md`.
23
+
22
24
  References under `$HOME/.claude/multi-agent-refs/channels/` are installed with Claude Code. Before step 1, read `reference.md` there: input forms, flags, target resolution, the mode table, error handling, examples and the Phase 5 delegation contract.
23
25
 
24
26
  ## Flow
25
27
 
26
28
  1. **Target resolution**: classify the argument (Jira id / url, GitHub or Bitbucket PR URL, `#N`, empty = cwd + branch), resolve Jira <-> PR, detect the remote type. A Phase 5 call passes a state bundle and skips this step.
27
29
  2. **Context source**: pipeline log (`$HOME/.claude/logs/multi-agent/<project>/<task-id>/agent-log.md`), PR diff, or `--message`. Read `channels/menu.md`.
28
- 3. **Menu (multi-select)**: channels + content, pre-ticked from `prefs.global.reportChannels` / `prefs.global.reportContent`; unavailable rows greyed with a reason (`menu.md`).
29
- 4. **Mode short-circuit**: `--channels` + `--content` skip the menu. Autopilot always pauses at the menu.
30
- 5. **Generator**: one section per content source, humanizer per channel. Read `channels/generator.md`.
30
+ 3. **Menu (multi-select)**: channels + content, pre-ticked from `prefs.global.reportChannels` / `prefs.global.reportContent`; unavailable rows greyed with a reason (`menu.md`). One line above the picker says the report file is always written, and where; zero channels ticked is a valid selection and means file-only.
31
+ 4. **Mode short-circuit**: `--channels` + `--content` skip the menu, and `--file-only` skips the menu, the gate and the dispatch. Autopilot always pauses at the menu.
32
+ 5. **Generator**: one section per content source, humanizer per channel. Read `channels/generator.md`. After the humanizer, write the report file (`report-file.mjs write`), before step 6; it always carries one PR-shaped body.
31
33
  6. **Body preview + approval gate**: interactive runs render every final body and ask Approve & post / Edit (loop) / Skip channels / Cancel BEFORE any external write. Skipped only by autopilot and `--dry-run`. What is posted is byte-identical to the approved preview. Read `channels/preview.md`.
32
- 7. **Dispatch**: parallel adapters, never before the gate resolves.
33
- 8. **Summary**: one status line per adapter; persist the selections to prefs.
34
+ 7. **Dispatch**: parallel adapters, never before the gate resolves. The report file is not an adapter and no adapter failure affects it.
35
+ 8. **Summary**: one status line per adapter, then the `Report file` row last; persist the selections to prefs.
34
36
 
35
37
  ## Channel adapters
36
38
 
@@ -63,13 +65,14 @@ After the content sections, a cached `archiveguard-*.json` or `play-compliance-*
63
65
  - Humanizer per channel; no `<!-- channels:start -->` markers; every body item cites a file / symbol / line.
64
66
  - Adapter failures are non-blocking.
65
67
  - Approval before post: autopilot and `--dry-run` are the only bypasses.
68
+ - Report file every run: written whenever a body was composed, never gated, never posted; `--dry-run` is the only case that composes and does not write.
66
69
  - Target length under 80 lines; auto-diff capped at 5 lines per section.
67
70
 
68
71
  ## Autopilot and unattended
69
72
 
70
73
  Phase 5 always pauses at the channels menu: a 30-min timeout ends the session cleanly, resumable via `/multi-agent:resume` (`refs/phases/modes.md`).
71
74
 
72
- **Unattended (`MULTI_AGENT_UNATTENDED=1`): channels posts nothing.** Phase 5 records `step1.status = "deferred-to-runner"`, and a direct invocation stops before the menu with that status. The autopilot runner publishes only through its own opt-in, and the guard blocks every publisher script and `gh` / `curl` write under the variable. Contract: `$HOME/.claude/multi-agent-refs/features/unattended-security.md`.
75
+ **Unattended (`MULTI_AGENT_UNATTENDED=1`): channels posts nothing.** It still runs with `--file-only`, so the report lands under `LOGS_ROOT`. Phase 5 records `step1.status = "deferred-to-runner"`, and a direct invocation stops before the menu with that status. The autopilot runner publishes only through its own opt-in, and the guard blocks every publisher script and `gh` / `curl` write under the variable. Contract: `$HOME/.claude/multi-agent-refs/features/unattended-security.md`.
73
76
 
74
77
  ## Progress on Copilot
75
78
 
@@ -1,75 +0,0 @@
1
- /**
2
- * credential-resolve.mjs - a token for a Node script, without argv.
3
- *
4
- * Resolution order matches md2confluence-v3.py: the credential store under the
5
- * logical key `prefs.global.keychainMapping.<name>`, then an environment
6
- * variable. The value is read from the store's stdout and only ever travels in a
7
- * request header.
8
- *
9
- * @module pipeline/lib/credential-resolve
10
- */
11
-
12
- import { existsSync } from "node:fs";
13
- import { execFile, spawnSync } from "node:child_process";
14
- import { homedir } from "node:os";
15
- import { join } from "node:path";
16
- import { loadGlobalPrefs, prefsFileIn, prefsPath } from "./prefs-value.mjs";
17
-
18
- /**
19
- * @param {string} name - logical credential name, e.g. "confluence" or "figma"
20
- * @param {string} envVar - environment fallback, e.g. "CONFLUENCE_TOKEN"
21
- * @returns {string|null}
22
- */
23
- export function resolveToken(name, envVar) {
24
- const home = homedir();
25
- const store = join(home, ".claude", "lib", "credential-store.sh");
26
- const prefs = prefsFileIn(home);
27
- if (existsSync(store) && existsSync(prefs)) {
28
- try {
29
- const key = loadGlobalPrefs(prefs)?.keychainMapping?.[name];
30
- if (key) {
31
- const r = spawnSync("bash", [store, "get", key], { encoding: "utf8", timeout: 10_000 });
32
- const token = (r.stdout || "").trim();
33
- if (r.status === 0 && token) return token;
34
- }
35
- } catch {
36
- // fall through to the environment
37
- }
38
- }
39
- return process.env[envVar] || null;
40
- }
41
-
42
- /**
43
- * resolveToken for a request path: the store is read without blocking the
44
- * event loop and given a deadline, so a store waiting on an unlock prompt
45
- * yields "no token" instead of stalling the caller.
46
- *
47
- * @param {string} name
48
- * @param {string} envVar
49
- * @param {{timeoutMs?: number}} [opts]
50
- * @returns {Promise<string|null>}
51
- */
52
- export async function resolveTokenAsync(
53
- name,
54
- envVar,
55
- { timeoutMs = 5000, env = process.env } = {},
56
- ) {
57
- const home = env.HOME || homedir();
58
- const store = join(home, ".claude", "lib", "credential-store.sh");
59
- const prefs = prefsPath(env);
60
- if (existsSync(store) && existsSync(prefs)) {
61
- const key = loadGlobalPrefs(prefs)?.keychainMapping?.[name] ?? null;
62
- if (key) {
63
- const token = await new Promise((resolve) => {
64
- execFile(
65
- "bash",
66
- [store, "get", key],
67
- { encoding: "utf8", timeout: timeoutMs, killSignal: "SIGKILL", env },
68
- (err, stdout) => resolve(err ? "" : String(stdout || "").trim()),
69
- );
70
- });
71
- if (token) return token;
72
- }
73
- }
74
- return env[envVar] || null;
75
- }