forgedock 1.52.0 → 1.54.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 (233) hide show
  1. package/.claude-plugin/marketplace.json +51 -0
  2. package/README.md +8 -2
  3. package/bin/auth/app-manifest.mjs +89 -0
  4. package/bin/auth/app-manifest.test.mjs +75 -0
  5. package/bin/auth/app-token.mjs +256 -0
  6. package/bin/auth/app-token.test.mjs +232 -0
  7. package/bin/brand.mjs +7 -0
  8. package/bin/config-history.mjs +151 -0
  9. package/bin/config-schema.mjs +115 -0
  10. package/bin/demo.mjs +65 -11
  11. package/bin/engine/outcome-codes.mjs +9 -3
  12. package/bin/engine/telemetry-seam.mjs +11 -3
  13. package/bin/engine/telemetry-seam.test.mjs +17 -0
  14. package/bin/engine-cli.mjs +110 -36
  15. package/bin/experiment.mjs +58 -6
  16. package/bin/first-run.mjs +122 -0
  17. package/bin/forge-utils.mjs +6 -2
  18. package/bin/forgedock.mjs +138 -142
  19. package/bin/help-text.mjs +144 -0
  20. package/bin/hooks/pre-tool-use.mjs +7 -0
  21. package/bin/journey.mjs +82 -83
  22. package/bin/lean/acceptance.mjs +313 -0
  23. package/bin/lean/acceptance.test.mjs +215 -0
  24. package/bin/lean/account-watch.mjs +28 -0
  25. package/bin/lean/account-watch.test.mjs +30 -0
  26. package/bin/lean/activation.mjs +38 -0
  27. package/bin/lean/activation.test.mjs +36 -1
  28. package/bin/lean/basered.mjs +115 -0
  29. package/bin/lean/basered.test.mjs +66 -0
  30. package/bin/lean/batch-health.mjs +114 -7
  31. package/bin/lean/batch-health.test.mjs +87 -1
  32. package/bin/lean/batch.mjs +41 -2
  33. package/bin/lean/batch.test.mjs +115 -11
  34. package/bin/lean/branchlock.mjs +54 -0
  35. package/bin/lean/branchlock.test.mjs +49 -0
  36. package/bin/lean/ceiling.mjs +72 -0
  37. package/bin/lean/ceiling.test.mjs +54 -0
  38. package/bin/lean/checkpoint-reconcile.mjs +43 -0
  39. package/bin/lean/checkpoint-reconcile.test.mjs +95 -0
  40. package/bin/lean/ci-budget.mjs +366 -0
  41. package/bin/lean/ci-budget.test.mjs +167 -0
  42. package/bin/lean/conformance.e2e.test.mjs +8 -1
  43. package/bin/lean/conformance.mjs +269 -38
  44. package/bin/lean/conformance.test.mjs +280 -7
  45. package/bin/lean/context.mjs +35 -6
  46. package/bin/lean/context.test.mjs +27 -1
  47. package/bin/lean/depcache.mjs +25 -1
  48. package/bin/lean/depcache.test.mjs +26 -0
  49. package/bin/lean/e2e.mjs +18 -2
  50. package/bin/lean/e2e.test.mjs +26 -1
  51. package/bin/lean/effects.mjs +47 -14
  52. package/bin/lean/execution.mjs +19 -3
  53. package/bin/lean/execution.test.mjs +63 -0
  54. package/bin/lean/facts.mjs +3 -3
  55. package/bin/lean/facts.test.mjs +5 -0
  56. package/bin/lean/findinglabel.mjs +16 -0
  57. package/bin/lean/findinglabel.test.mjs +39 -0
  58. package/bin/lean/fixround.mjs +14 -0
  59. package/bin/lean/fixround.test.mjs +25 -2
  60. package/bin/lean/gh-assoc.test.mjs +2 -1
  61. package/bin/lean/integration.mjs +100 -9
  62. package/bin/lean/integration.test.mjs +98 -0
  63. package/bin/lean/issuewatch-parity.mjs +64 -0
  64. package/bin/lean/issuewatch-parity.test.mjs +127 -0
  65. package/bin/lean/issuewatch-release.mjs +6 -2
  66. package/bin/lean/issuewatch-release.test.mjs +17 -1
  67. package/bin/lean/issuewatch.mjs +45 -6
  68. package/bin/lean/issuewatch.test.mjs +3 -2
  69. package/bin/lean/lanelock.mjs +14 -0
  70. package/bin/lean/lean.mjs +473 -100
  71. package/bin/lean/lean.test.mjs +686 -33
  72. package/bin/lean/light.mjs +48 -7
  73. package/bin/lean/light.test.mjs +37 -3
  74. package/bin/lean/limits.test.mjs +142 -9
  75. package/bin/lean/mechfix.mjs +124 -0
  76. package/bin/lean/mechfix.test.mjs +75 -0
  77. package/bin/lean/orchestrate-cancel.test.mjs +143 -0
  78. package/bin/lean/orchestrate.mjs +116 -28
  79. package/bin/lean/phaseledger.mjs +47 -5
  80. package/bin/lean/phaseledger.test.mjs +30 -1
  81. package/bin/lean/postdeploy-check.test.mjs +39 -0
  82. package/bin/lean/precheck.mjs +23 -4
  83. package/bin/lean/precheck.test.mjs +14 -1
  84. package/bin/lean/prereq.mjs +28 -0
  85. package/bin/lean/prereq.test.mjs +20 -0
  86. package/bin/lean/probe.mjs +4 -2
  87. package/bin/lean/prodparity.mjs +52 -0
  88. package/bin/lean/prodparity.test.mjs +67 -0
  89. package/bin/lean/prompts.mjs +77 -19
  90. package/bin/lean/quota.mjs +39 -0
  91. package/bin/lean/recovery.test.mjs +11 -1
  92. package/bin/lean/relaxation.mjs +73 -0
  93. package/bin/lean/relaxation.test.mjs +54 -0
  94. package/bin/lean/release-io.test.mjs +42 -0
  95. package/bin/lean/release-postmerge.mjs +125 -0
  96. package/bin/lean/release-preflight.mjs +58 -0
  97. package/bin/lean/release-preflight.test.mjs +114 -0
  98. package/bin/lean/release-rehearsal.mjs +64 -0
  99. package/bin/lean/release-rehearsal.test.mjs +93 -0
  100. package/bin/lean/release-review.e2e.test.mjs +77 -0
  101. package/bin/lean/release-review.mjs +254 -0
  102. package/bin/lean/release-review.test.mjs +307 -0
  103. package/bin/lean/release-snapshot.mjs +188 -0
  104. package/bin/lean/release-snapshot.test.mjs +190 -0
  105. package/bin/lean/release.mjs +296 -0
  106. package/bin/lean/release.test.mjs +387 -0
  107. package/bin/lean/render.mjs +1 -1
  108. package/bin/lean/replan.mjs +184 -0
  109. package/bin/lean/replan.test.mjs +110 -0
  110. package/bin/lean/resume.mjs +9 -7
  111. package/bin/lean/resume.test.mjs +16 -0
  112. package/bin/lean/rotator.mjs +150 -31
  113. package/bin/lean/rotator.test.mjs +105 -2
  114. package/bin/lean/sandbox-remote.mjs +9 -2
  115. package/bin/lean/schedd.mjs +83 -5
  116. package/bin/lean/schedd.test.mjs +108 -7
  117. package/bin/lean/selfreview.mjs +94 -0
  118. package/bin/lean/selfreview.test.mjs +58 -1
  119. package/bin/lean/selftest-gate.mjs +22 -0
  120. package/bin/lean/selftest-gate.test.mjs +18 -1
  121. package/bin/lean/selftest-journey.mjs +234 -0
  122. package/bin/lean/selftest-journey.test.mjs +130 -0
  123. package/bin/lean/selftest-live.mjs +2 -1
  124. package/bin/lean/seqlease.mjs +35 -1
  125. package/bin/lean/seqlease.test.mjs +15 -0
  126. package/bin/lean/seqreserve.e2e.test.mjs +135 -0
  127. package/bin/lean/seqreserve.mjs +73 -0
  128. package/bin/lean/seqreserve.test.mjs +134 -0
  129. package/bin/lean/sequence.mjs +35 -6
  130. package/bin/lean/seqversioned.mjs +147 -0
  131. package/bin/lean/stagestamp.mjs +28 -0
  132. package/bin/lean/stagestamp.test.mjs +32 -0
  133. package/bin/lean/surfaces.mjs +75 -0
  134. package/bin/lean/surfaces.test.mjs +59 -0
  135. package/bin/lean/toolplace.mjs +28 -0
  136. package/bin/lean/toolplace.test.mjs +24 -0
  137. package/bin/lean/toolstats.mjs +3 -1
  138. package/bin/lean/toolstats.test.mjs +11 -0
  139. package/bin/lean/validatebest.mjs +28 -0
  140. package/bin/lean/validatebest.test.mjs +27 -0
  141. package/bin/lean/verifier.mjs +3 -2
  142. package/bin/lean/verify.mjs +2 -1
  143. package/bin/lean/verify.test.mjs +6 -0
  144. package/bin/pool/agent.mjs +27 -4
  145. package/bin/pool/docker.mjs +5 -0
  146. package/bin/pool/router.mjs +74 -28
  147. package/bin/prereqs.mjs +111 -0
  148. package/bin/replay-timelapse.mjs +149 -0
  149. package/bin/review-staging.mjs +123 -16
  150. package/bin/review-staging.test.mjs +18 -0
  151. package/bin/runner.mjs +43 -6
  152. package/bin/splash-install.mjs +157 -0
  153. package/bin/stats/aggregate.mjs +8 -1
  154. package/bin/stats/conformance-outcomes.mjs +289 -0
  155. package/bin/stats/conformance-outcomes.test.mjs +274 -0
  156. package/bin/stats/depth.mjs +275 -0
  157. package/bin/stats/depth.test.mjs +158 -0
  158. package/bin/stats/efficiency.mjs +26 -5
  159. package/bin/stats/efficiency.test.mjs +45 -1
  160. package/bin/stats/experiment.mjs +7 -5
  161. package/bin/stats/first-review.mjs +77 -0
  162. package/bin/stats/first-review.test.mjs +36 -0
  163. package/bin/stats/firstmerge.mjs +40 -0
  164. package/bin/stats/firstmerge.test.mjs +41 -0
  165. package/bin/stats/github-source.mjs +53 -15
  166. package/bin/stats/index.mjs +147 -9
  167. package/bin/stats/local-source.mjs +12 -0
  168. package/bin/stats/origin.mjs +80 -0
  169. package/bin/stats/origin.test.mjs +58 -0
  170. package/bin/stats/query.mjs +69 -0
  171. package/bin/stats/render.mjs +3 -1
  172. package/bin/stats/scoreboard.mjs +137 -0
  173. package/bin/stats/scoreboard.test.mjs +87 -0
  174. package/bin/stats/selffiled.mjs +52 -0
  175. package/bin/stats/selffiled.test.mjs +71 -0
  176. package/bin/stats/stats.test.mjs +80 -0
  177. package/bin/tui.mjs +3 -2
  178. package/commands/bootstrap.md +15 -14
  179. package/commands/deploy-pr.md +18 -3
  180. package/commands/forge-stats.md +1 -1
  181. package/commands/forgedock-ci-setup.md +28 -0
  182. package/commands/forgedock-init.md +4 -5
  183. package/commands/issue.md +2 -0
  184. package/commands/milestone.md +9 -1
  185. package/commands/orchestrate.md +1 -1
  186. package/commands/replay.md +2 -0
  187. package/commands/review-pr-agents/security.md +4 -0
  188. package/commands/review-pr-staging.md +6 -1
  189. package/commands/work-on/build.md +4 -6
  190. package/commands/work-on/close.md +8 -0
  191. package/docs/CONFIG.md +170 -18
  192. package/docs/ISSUE-WATCH.md +25 -0
  193. package/docs/OUTCOME-CODES.md +4 -0
  194. package/docs/REPLAY.md +9 -0
  195. package/docs/SELFTEST.md +11 -0
  196. package/docs/STATS.md +61 -0
  197. package/docs/TELEMETRY.md +1 -1
  198. package/docs/eval/README.md +6 -0
  199. package/docs/eval/adversarial-bench.md +68 -0
  200. package/docs/eval/corpus/adversarial-v1.json +285 -0
  201. package/docs/eval/feature-bench.md +42 -0
  202. package/docs/eval/feature-specs/crud-auth/journeys/notes-crud-isolated.mjs +21 -0
  203. package/docs/eval/feature-specs/crud-auth/journeys/register-login.mjs +12 -0
  204. package/docs/eval/feature-specs/crud-auth/spec.md +15 -0
  205. package/docs/site/start-a-new-project.md +2 -1
  206. package/package.json +5 -2
  207. package/plugins/forgedock-splash/.claude-plugin/plugin.json +10 -0
  208. package/plugins/forgedock-splash/README.md +27 -0
  209. package/plugins/forgedock-splash/hooks/hooks.json +1 -0
  210. package/plugins/forgedock-splash/hooks/register.tsx +74 -0
  211. package/plugins/forgedock-splash/hooks/scene.ts +222 -0
  212. package/plugins/forgedock-splash/types/index.d.ts +10 -0
  213. package/pool/README.md +1 -1
  214. package/pool/image/cs-cred +14 -1
  215. package/scripts/backfill-finding-labels.mjs +50 -0
  216. package/scripts/backfill-finding-labels.test.mjs +36 -0
  217. package/scripts/bench-adversarial.mjs +216 -0
  218. package/scripts/bench-feature.mjs +170 -0
  219. package/scripts/bench-lightlane.mjs +2 -2
  220. package/scripts/bootstrap-create.mjs +2 -2
  221. package/scripts/bootstrap-validate.mjs +35 -2
  222. package/scripts/check-spec-size.sh +4 -3
  223. package/scripts/check-spec-size.test.sh +3 -0
  224. package/scripts/doctor-pipeline-state.sh +21 -6
  225. package/scripts/file-deferred-followups.sh +59 -251
  226. package/scripts/file-deferred-followups.test.sh +85 -206
  227. package/scripts/followup-route.mjs +12 -0
  228. package/scripts/owner-route-parity.test.sh +17 -1
  229. package/scripts/plan-validate-live.mjs +40 -6
  230. package/scripts/review-pr-side-effects.test.sh +40 -0
  231. package/scripts/review-pr-staging-scope.test.sh +1 -1
  232. package/scripts/review-staging-post.sh +23 -0
  233. package/scripts/review-staging-post.test.sh +8 -0
@@ -0,0 +1,144 @@
1
+ // SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
2
+ // SPDX-License-Identifier: AGPL-3.0-or-later
3
+ /**
4
+ * Help text and user-facing error wording (#5303). Pure functions so the text is unit-testable (bin/forgedock.mjs runs
5
+ * its router on import). `topLevelHelp` is what `forgedock --help` prints: at most 10 everyday commands in plain
6
+ * language, one screen. `fullHelp` is `forgedock help --all`: every command, grouped by purpose.
7
+ */
8
+ import { TAGLINE } from "./brand.mjs";
9
+ import { wrap } from "./guide.mjs";
10
+
11
+ /** The everyday commands, in plain language. Keep to 10 or fewer. */
12
+ export const EVERYDAY_COMMANDS = [
13
+ ["setup", "Guided setup: install ForgeDock and configure this repo"],
14
+ ["run-issue <issue>", "Turn one GitHub issue into a reviewed, merged pull request"],
15
+ ["orchestrate <issue...>", "Work on several issues at once, in dependency order"],
16
+ ["watch", "Live view of what each agent is doing"],
17
+ ["status", "Show ForgeDock state for this directory"],
18
+ ["release", "Promote staging to your main branch as one reviewed release"],
19
+ ["stats", "Cost, time and quality report from your GitHub history"],
20
+ ["doctor", "Check the installation and fix what it can"],
21
+ ["guide", "How the workflow fits together, in one screen"],
22
+ ["uninstall", "Remove ForgeDock commands"],
23
+ ];
24
+
25
+ /** `npx forgedock setup` is the same as bare `npx forgedock`; the router maps it (see bin/forgedock.mjs). */
26
+ export function topLevelHelp({ width = 100 } = {}) {
27
+ const pad = Math.max(...EVERYDAY_COMMANDS.map(([c]) => c.length)) + 2;
28
+ const lines = [`ForgeDock: ${TAGLINE}`, "", "Usage: npx forgedock <command>", "", "Everyday commands"];
29
+ for (const [cmd, desc] of EVERYDAY_COMMANDS) {
30
+ const wrapped = wrap(desc, Math.max(20, width - 2 - pad), " ".repeat(2 + pad));
31
+ lines.push(` ${cmd.padEnd(pad)}${wrapped.join("\n")}`);
32
+ }
33
+ lines.push("", "More:", " npx forgedock help --all every command, grouped by purpose", " npx forgedock guide how the workflow fits together");
34
+ return lines.join("\n");
35
+ }
36
+
37
+ export const FULL_COMMAND_GROUPS = [
38
+ ["Set up", [
39
+ ["npx forgedock", "Guided setup: install commands + configure repo (default)"],
40
+ ["npx forgedock guide", "How the workflow fits together: core commands, issue -> staging -> main, where a run ends, how to resume"],
41
+ ["npx forgedock install", "Install commands to ~/.claude/"],
42
+ ["npx forgedock init", "Generate forge.yaml config for your project"],
43
+ ["npx forgedock init --minimal", "Generate a minimal forge.yaml (required sections only)"],
44
+ ["npx forgedock enable [dir]", "Activate ForgeDock in a directory"],
45
+ ["npx forgedock disable [dir]", "Opt a directory out of ForgeDock"],
46
+ ["npx forgedock demo", "Set up a risk-free demo repo and print next steps"],
47
+ ["npx forgedock first-run", "On this repo: propose 3 small issues, file them on approval, run one to a PR (stats --first-merge reports time to first merged PR)"],
48
+ ["npx forgedock labels [setup] [--repo owner/repo] [--domain a,b,c]", "Bootstrap ForgeDock-managed labels on a GitHub repo, plus optional per-repo domain labels (idempotent)"],
49
+ ["npx forgedock config migrate [dir]", "Backfill missing optional sections into an existing forge.yaml (idempotent)"],
50
+ ["npx forgedock config history | diff <n> | rollback <n> | record [reason] | import-bak [--delete]", "Versioned forge.yaml: list its saved versions, diff or roll back to one, record the current one, import old .bak files"],
51
+ ["npx forgedock auth login [--byo] [--broker-url URL] [--client-id ID] [--installation N] [--org ORG] | status | logout", "Sign in as a GitHub App so pipeline calls use a short-lived installation token instead of your own gh auth (the broker URL must be https)"],
52
+ ["npx forgedock doctor", "Check installation health"],
53
+ ["npx forgedock doctor --fix", "Auto-fix deterministic issues (symlinks, hook, labels, legacy block) and reclaim ForgeDock-owned leftovers (forge.yaml hygiene TTLs)"],
54
+ ["npx forgedock doctor --verbose", "Also show internal and legacy checks (FORGE_HOME, Playwright MCP, version-gated features, resource hygiene)"],
55
+ ["npx forgedock doctor --lanes", "Lane preflight: pool token, pool agent version, PATH shim loops, gh --json fields; prints every check pass/fail"],
56
+ ["npx forgedock update", "Pull latest & reinstall"],
57
+ ["npx forgedock uninstall", "Remove commands"],
58
+ ["npx forgedock opencode install", "Install token-efficient native OpenCode commands"],
59
+ ["npx forgedock opencode status", "Check the OpenCode adapter"],
60
+ ["npx forgedock opencode uninstall", "Remove ForgeDock-owned OpenCode files"],
61
+ ["npx forgedock version", "Print the installed version and check for updates"],
62
+ ["npx forgedock help", "Show this help"],
63
+ ]],
64
+ ["Run work", [
65
+ ["npx forgedock run <cmd> [args]", "Run a command headlessly (local claude CLI or Anthropic API)"],
66
+ ["npx forgedock bootstrap <idea|docs> [--dry-run] [--spike <path>] | --plan <plan.json> [--dry-run]", "Headless /bootstrap: idea to orchestrate-ready backlog (--dry-run previews milestones, titles, DAG and estimated agent cost without GitHub writes); --plan validates and creates (or previews) a plan, and re-running resumes from GitHub"],
67
+ ["npx forgedock run-issue <issue> [--lane <lane>] [--lane-override] [--path core|full] [--retry] [--wait-lease]", "Work one issue from claim to merge (the lane comes from the issue: its milestone, else staging; --lane only asserts it). --retry reopens a failed run, or one needing a human once the label is cleared; --wait-lease waits for another holder of the issue; exit status 75 means deferred, nothing was lost"],
68
+ ["npx forgedock plan validate --live [--repo owner/repo] [--json]", "Re-run the bootstrap dependency-order rules on live GitHub state: each cross-milestone Depends-on edge is ok, held or invalid (fails on invalid)"],
69
+ ["npx forgedock orchestrate <issue...> [--parallel K] [--lane L]", "Work on several issues with bounded concurrency and Depends-on ordering; each issue on its own lane, cross-lane dependencies reported"],
70
+ ["npx forgedock orchestrate --resume <id> [N...] | --set-parallel <id> K | --set-max-remote <id> N | --set-placement <id> remote|hybrid|local | --add <id> N... | --requeue <id> N... [--reason \"...\"] | --cancel <id> | --hold <id> N... | --release <id> N... | --show-env <id> | --set-env <id> KEY=VAL | --unset-env <id> KEY", "Reattach to a running or finished batch (a finished one replays its report, an interrupted one resumes), change its concurrency or placement live, add, requeue, hold or release single issues, stop one batch without stopping the background scheduler, or print, set or unset the batch environment (secrets redacted; applies to newly started lanes)"],
71
+ ["npx forgedock triage <issue...> [--lane L] [--dry-run]", "Already-fixed pre-filter: close issues a merged PR or green CI already resolved; print the rest"],
72
+ ["npx forgedock probe [issue...] [--dry-run]", "Run declared acceptance probes for closed issues whose fix is on the default branch; a fail reopens the issue"],
73
+ ["npx forgedock acceptance check|run|gate", "Feature-level acceptance: validate an epic's journeys, run them on the milestone branch, gate ship/close on a green run"],
74
+ ["npx forgedock check [--base REF] [--json]", "Run the lane's frozen validate commands and change-scoped pre-PR checks locally in this worktree, as the engine will (no GitHub, no Actions)"],
75
+ ["npx forgedock milestone train <slug...> [--parallel-milestones N] | --resume <id> | --insert <id> <slug> [--before s|--after s] | --show <id>", "Unattended multi-milestone train: one durable state file (order, active set, lifecycle), typed STOP reasons, resumable; never edits forge.yaml"],
76
+ ["npx forgedock issue-watch run [--name <w>] [--repo owner/repo] [--once] [--dry-run] | status [--name <w>]", "Named, scoped, capped watches (forge.yaml issue_watch.watches) that claim matching open issues into lanes or one long-lived orchestrate batch, or (mode: release) pool them and cut themed releases; see docs/ISSUE-WATCH.md"],
77
+ ["npx forgedock prod-watch run [--repo owner/repo] [--once] [--interval <s>] [--dry-run] | status", "Production-side watcher (forge.yaml prod_watch): read-only signal sources -> triage -> governor -> issues, kill-switch file, owner digest; see docs/PROD-WATCH.md"],
78
+ ["npx forgedock ci budget [--repo owner/repo] [--json] [--digest] [--propose [--base REF]] [--set-mode MODE] [--budget MINUTES] [--reserve PCT] [--plan PLAN]", "Actions-minutes budget: month-to-date usage, projection and where CI runs (remote or local-first); sets the mode and budget"],
79
+ ["npx forgedock replan apply --amendment N --repo owner/repo", "After an amendment merged, re-evaluate the open sibling issues held behind it"],
80
+ ["npx forgedock resume-stalled [--dry-run]", "Fleet stall recovery: re-dispatch issues whose run stopped holding its claim"],
81
+ ]],
82
+ ["Watch and report", [
83
+ ["npx forgedock status [dir]", "Show ForgeDock state for a directory"],
84
+ ["npx forgedock guards list [--path p] [--json] | backfill --since <date> [--dry-run]", "Fix guards: list the records (test files + protected hunks of merged fixes) covering a path, or build them for already-merged runs"],
85
+ ["npx forgedock limits show | clear <id>|--all", "Show or clear per-account usage-limit holds shared by orchestrate batches"],
86
+ ["npx forgedock decisions list [--stale] [--refresh]", "List anchored decisions (FORGE:DECISION); --stale shows those with an anchor missing on the base"],
87
+ ["npx forgedock watch [--repo owner/repo]", "Live per-agent orchestration view (Ctrl+C to exit)"],
88
+ ["npx forgedock report [--days 30] [--md] [--json]", "30-day pipeline impact receipts for your repo"],
89
+ ["npx forgedock stats [--since <ver|date>] [--repo owner/repo] [--json] [--refresh]", "Version-over-version cost/time/flow/review/gate report from GitHub telemetry (no model)"],
90
+ ["npx forgedock stats --self-filed [--repo R] [--since D]", "Share of new issues the pipeline filed itself, by kind, against the 15% target (#5207)"],
91
+ ["npx forgedock stats --conformance-outcomes [--repo owner/repo] [--since <date>] [--window-days 7] [--replay <pr,...> --enforce-domains <list>]", "Read-only: do conformance blocks predict post-merge defects (2x2 per repo, failure kind and risk surface; --replay a PR list against an enforce config)"],
92
+ ["npx forgedock stats --depth [--since <ver|date>] [--min-n N] [--offline] [--repo owner/repo] [--json]", "Light-eligible vs ineligible lane outcomes, by reason/signal, and the #5052 light-lane promotion verdict"],
93
+ ["npx forgedock stats --first-merge [--repo owner/repo]", "Setup start to first merged PR for a first-run repo, against the 15 min target (#5290)"],
94
+ ["npx forgedock replay --timelapse <batch|epic> [--repo owner/repo] [--out dir] [--format gif|mp4] [--duration 30-90]", "Read-only 30-90 s time-lapse (frames, vhs tape, GIF/MP4 when vhs is installed) of a recorded batch or epic from the lifecycle event log"],
95
+ ["npx forgedock stats --origin [--repo R] [--since D] [--json]", "Requested vs pipeline-generated issues by origin, how pipeline-found ones closed, and their cost share (#5294)"],
96
+ ]],
97
+ ["Release", [
98
+ ["npx forgedock selftest [--static] | --live --repo <owner/sandbox> [--lang node|python] [--pr <N>] | --journey [--repo <owner/sandbox>] [--pr <N>] [--update-snapshots]", "Live contract harness: drives the real gh, git and orchestrate through a disposable sandbox repo (steps create, add, body, resume, merge, remote, cleanup) plus a static check of every gh --json field list; exits non-zero naming the failed step; --pr posts the FORGE:SELFTEST result the staging->main review requires; --journey runs the packed CLI as a new user (clean environment, then a sandbox repo to a merged PR) and posts FORGE:JOURNEY; see docs/SELFTEST.md"],
99
+ ["npx forgedock review-staging [<PR>] [--thorough] [--json]", "Staging->main review pre-dispatch: route marker, open-finding gate, scope, prepare, roster; writes one reviewer brief per domain"],
100
+ ["npx forgedock review-staging [<PR>] --finalize --test-gate-output <file>", "Staging->main review post-dispatch: delivery, test-gate verdict, extract/classify/file-prepare; prints the findings to file"],
101
+ ["npx forgedock review-staging [<PR>] --summary [--filed <N>]...", "Staging->main review Phase 8: verdict and summary comment with the FORGE:GATE_PASS / FORGE:GATE_FAILURE marker"],
102
+ ["npx forgedock release [--repo owner/repo] [--merge] [--watch] [--resume <id>] | release verify <sha> [--repo owner/repo]", "Staging->default release as one resumable job: preflight, release PR, review, fixes, promotion (stops at GATE_PASS unless --merge or release.auto_merge), post-merge; release.mode: snapshot cuts release/<id> from staging (lanes keep merging, fixes are cherry-picked, FORGE:RELEASE records them); verify checks a release head against that record"],
103
+ ]],
104
+ ["Maintenance and hosting", [
105
+ ["npx forgedock fix-close-reasons <owner/repo> [--milestone <m>] [--apply]", "Re-close issues that were closed not planned but carry workflow:merged or workflow:decomposed (delivered, not dropped) as completed, with a comment; dry run unless --apply; workflow:invalid issues are never touched"],
106
+ ["npx forgedock sched show | cap <N>|--clear | weight <owner/repo> <N>|--clear", "Show the host lane registry, set the host-wide lane cap shared by orchestrate batches, or set a repo's share of slots within a priority (default equal)"],
107
+ ["npx forgedock schedd [status | watchdog]", "Host scheduler daemon hosting every orchestrate batch (auto-spawned by orchestrate; run in the foreground for a systemd-user unit); status shows its pid, batches and last tick; watchdog restarts a stalled daemon"],
108
+ ["npx forgedock pool router [install] | enroll [--cpus N --mem GB] | status | upgrade [agent] | remove <agent>", "Built-in remote compute pool: run the router (foreground, or install it as a user service), print the one-time install command for a host, list agents, upgrade or remove them"],
109
+ ["npx forgedock gc [--apply] [--older-than 6h] [--docker] [--worktrees] [--branches] [--tmp] [--processes] [--sandboxes]", "Report (dry-run default) and reclaim ForgeDock-owned leftovers: stale run ledgers, labelled containers/volumes, agent worktrees, abandoned branches, scratch files, orphaned processes and sandboxes; unowned resources and unpushed work are only reported"],
110
+ ]],
111
+ ];
112
+
113
+ export const FLAG_ROWS = [
114
+ ["--fast", "Skip animation/motion"],
115
+ ["--manual", "Plain text prompts instead of the review screen (init)"],
116
+ ["--verbose", "Show detection sources for every field (init)"],
117
+ ["--minimal", "Generate a minimal forge.yaml with required sections only (init)"],
118
+ ["--refresh-context", "Regenerate review.context/tech_stack from manifests and show a diff for approval (init)"],
119
+ ["--no-splash", "Skip installing the startup splash plugin during setup (or set FORGEDOCK_NO_SPLASH=1)"],
120
+ ["--version, -v", "Print the installed version and check for updates"],
121
+ ];
122
+
123
+ /** Every command, grouped by purpose (`forgedock help --all`). */
124
+ export function fullHelp({ width = 100 } = {}) {
125
+ const lines = [`ForgeDock: ${TAGLINE}`, "", "Usage: npx forgedock <command> (npx forgedock help for the everyday commands)"];
126
+ for (const [name, rows] of FULL_COMMAND_GROUPS) {
127
+ lines.push("", name);
128
+ for (const [cmd, desc] of rows) {
129
+ lines.push(` ${cmd}`, ...wrap(desc, width - 6, " ").map((l, i) => (i === 0 ? " " + l : l)));
130
+ }
131
+ }
132
+ lines.push("", "Flags");
133
+ for (const [flag, desc] of FLAG_ROWS) lines.push(` ${flag.padEnd(20)}${desc}`);
134
+ return lines.join("\n");
135
+ }
136
+
137
+ /** User-facing run-issue errors: what happened, why, and the one command that fixes it. No engine terms. */
138
+ export const USER_ERRORS = {
139
+ noRepoOrchestrate: "Can't tell which GitHub repository this is, because this directory has no GitHub remote. Run it inside a clone of the repository, or add --repo owner/name.",
140
+ recoverUnsupported: "--recover only works with the default pipeline. Drop --recover, or drop --path full.",
141
+ noRepo: "Can't tell which GitHub repository this is, because this directory has no GitHub remote. Run it inside a clone of the repository, or add --repo owner/name.",
142
+ retryUnsupported: "That option only works with the legacy pipeline. A normal rerun already resumes from the open pull request or pushed branch, so drop the option, or add --path full to use it.",
143
+ laneRequired: "--lane is required with --path full, so a run never targets production by accident. Add --lane staging (or --lane milestone/<slug>).",
144
+ };
@@ -1479,6 +1479,13 @@ function checkMainCheckoutMutation(command) {
1479
1479
  }
1480
1480
  for (const hit of mutatingGitHits(tokens)) {
1481
1481
  const targetDir = hit.dir === null ? baseDir : resolvePath(baseDir, hit.dir);
1482
+ // #5333: refs/stash is shared by every worktree of the repo; a lane builder (FORGE_LANE_WORKTREE, set by the engine) must not touch it.
1483
+ if (hit.name === "git stash" && process.env.FORGE_LANE_WORKTREE === "1") {
1484
+ return (
1485
+ "BLOCKED: `git stash` in a lane worktree: the stash stack is shared by every lane of this repo, so a pop can apply another lane's files.\n" +
1486
+ "Use a WIP commit instead (`git add -A && git commit -m wip`); `git stash list` and `git stash show` stay allowed.\n"
1487
+ );
1488
+ }
1482
1489
  if (!isMainCheckout(targetDir)) continue;
1483
1490
  if (hit.branches) {
1484
1491
  // Ref-only verb: only the checked-out branch matters; unresolvable (detached HEAD, error) = allow.
package/bin/journey.mjs CHANGED
@@ -12,6 +12,7 @@
12
12
 
13
13
  import { existsSync, lstatSync, readFileSync, writeFileSync, renameSync, unlinkSync } from "fs";
14
14
  import { join, basename } from "path";
15
+ import { backupToHistory } from "./config-history.mjs";
15
16
 
16
17
  // ---------------------------------------------------------------------------
17
18
  // forge.yaml generation (Task 4)
@@ -505,6 +506,14 @@ export function backupExisting(outputPath) {
505
506
  return { backupName: basename(baseBak) };
506
507
  }
507
508
 
509
+ /**
510
+ * Setup/agent edit of forge.yaml (#5315): record the current file as a config-history version (~/.forge/config-history/<repo>/)
511
+ * and move it away, instead of leaving a forge.yaml.bak in the repo. Same return shape as backupExisting.
512
+ */
513
+ export function backupForgeYaml(outputPath, reason = "setup") {
514
+ return backupToHistory(outputPath, reason);
515
+ }
516
+
508
517
  /**
509
518
  * Lightweight forge.yaml presence/shape check for the install receipt
510
519
  * (Issue #1946) — no YAML parser dependency, mirrors the regex-based
@@ -623,6 +632,7 @@ import {
623
632
  colorMode, motionEnabled, CHROME_STOPS, HERO_MARK, COMPACT_MARK, sleep,
624
633
  } from "./cinema.mjs";
625
634
  import { detectEnvironment, wslPathToWindows } from "./env-detect.mjs";
635
+ import { checkPrereqs, formatNotReady, offerInstall } from "./prereqs.mjs";
626
636
 
627
637
  // ---------------------------------------------------------------------------
628
638
  // URL opener (default openFn implementation — injectable for tests)
@@ -712,7 +722,7 @@ const dimLine = (ctx, s) => (ctx.mode === "none" ? s : `\x1b[2m${s}\x1b[22m`);
712
722
  * and the journey continues — advisory, never fatal. Includes informational
713
723
  * Platform/WSL/Shell rows (via env-detect.mjs) after the pass/fail checks —
714
724
  * those three always report `ok: true`, they surface state rather than gate it.
715
- * @returns {Promise<{ checks: Array<{name, ok, detail, fix?}>, ghReady: boolean }>}
725
+ * @returns {Promise<{ checks: Array<{name, ok, detail, fix?, blocking?}>, ghReady: boolean, blocking: Array }>}
716
726
  */
717
727
  export async function preflight(ctx) {
718
728
  const { stdout: w } = ctx;
@@ -721,61 +731,16 @@ export async function preflight(ctx) {
721
731
  w.write("\n " + ember("F O R G E D O C K", ctx.mode) + "\n");
722
732
  w.write(" " + dimLine(ctx, `──── ${getLogoTagline("install")} ────────────────────`) + "\n\n");
723
733
 
724
- const rows = [
725
- {
726
- label: "Node",
727
- run: async () => {
728
- const major = Number(ctx.nodeVersion.split(".")[0]);
729
- return major >= 18
730
- ? { ok: true, detail: `v${ctx.nodeVersion}` }
731
- : { ok: false, detail: `v${ctx.nodeVersion} — need ≥18`, fix: ["Upgrade Node: https://nodejs.org/"] };
732
- },
733
- },
734
- {
735
- label: "git",
736
- run: async () => {
737
- try {
738
- const v = ctx.exec("git", ["--version"]);
739
- return { ok: true, detail: v.replace(/^git version\s*/, "") };
740
- } catch {
741
- return { ok: false, detail: "not found", fix: ["Install git: https://git-scm.com/downloads"] };
742
- }
743
- },
744
- },
745
- {
746
- label: "Claude Code",
747
- run: async () => {
748
- const claudeDir = claudeDirOf(ctx);
749
- return existsSync(claudeDir)
750
- ? { ok: true, detail: `${claudeDir} found` }
751
- : { ok: false, detail: `${claudeDir} not found`, fix: ["Install Claude Code: https://claude.com/claude-code"] };
752
- },
753
- },
754
- {
755
- label: "GitHub CLI",
756
- run: async () => {
757
- try {
758
- ctx.exec("gh", ["--version"]);
759
- } catch {
760
- return {
761
- ok: false,
762
- detail: "not found",
763
- fix: ["Install gh: https://cli.github.com/", "Windows: winget install GitHub.cli"],
764
- };
765
- }
766
- try {
767
- ctx.exec("gh", ["auth", "status"]);
768
- return { ok: true, detail: "authenticated" };
769
- } catch {
770
- return { ok: false, detail: "not authenticated", fix: ["Run: gh auth login"] };
771
- }
772
- },
773
- },
774
- ];
734
+ // One list shared with `doctor` (prereqs.mjs, #5302). Probed once, shown as rows.
735
+ const prereqs = checkPrereqs({ exec: ctx.exec, nodeVersion: ctx.nodeVersion, claudeDir: claudeDirOf(ctx), platform: ctx.platform });
736
+ const rows = prereqs.map((p) => ({
737
+ label: p.label,
738
+ run: async () => (p.ok ? { ok: true, detail: p.detail } : { ok: false, detail: p.detail, fix: p.fix }),
739
+ }));
775
740
 
776
741
  // Environment reveal rows (platform/WSL/shell) — informational only, never
777
742
  // fail the preflight. Appended after the existing 4 checks so `named[3]`
778
- // (GitHub CLI, used for `ghReady` below) keeps its index.
743
+ // (GitHub CLI, used for `ghReady` below) keeps its index; yq follows it.
779
744
  const envInfo = detectEnvironment({ platform: ctx.platform, env: ctx.env, release: ctx.release });
780
745
  rows.push(
781
746
  {
@@ -799,8 +764,8 @@ export async function preflight(ctx) {
799
764
  );
800
765
 
801
766
  const results = await revealRows(rows, { mode: ctx.mode, motion: ctx.motion, writer: w });
802
- const named = rows.map((r, i) => ({ name: r.label, ...results[i] }));
803
- return { checks: named, ghReady: named[3].ok };
767
+ const named = rows.map((r, i) => ({ name: r.label, ...results[i], ...(prereqs[i] ? { label: prereqs[i].label, blocking: prereqs[i].blocking, auto: prereqs[i].auto, id: prereqs[i].id } : {}) }));
768
+ return { checks: named, ghReady: named[3].ok, blocking: named.filter((c) => c.blocking) };
804
769
  }
805
770
 
806
771
  // ---------------------------------------------------------------------------
@@ -2486,6 +2451,7 @@ export async function forge(ctx) {
2486
2451
  import { detectConfig } from "./init-detect.mjs";
2487
2452
  import { enrich, resolveEnrichBackend } from "./init-enrich.mjs";
2488
2453
  import { isClaudeCliAvailable } from "./runner.mjs";
2454
+ import { installSplash } from "./splash-install.mjs";
2489
2455
  import { annotatedReviewScreen, box, confirm, getLogoTagline, input, select } from "./tui.mjs";
2490
2456
  import {
2491
2457
  defaultExec as repoExec, listOwners, listAppInstallations, ownerCoverageWarning,
@@ -2748,20 +2714,15 @@ export async function review(ctx, draft, description) {
2748
2714
  extraFields,
2749
2715
  });
2750
2716
 
2751
- // Hard-fail on unresolved identity placeholders when OVERWRITING an
2752
- // existing config (forge#1850 spec item 4): never destroy a working
2753
- // forge.yaml in favor of one that can't address a repo. A brand-new
2754
- // (non-existing) config is allowed to write placeholders — that's the
2755
- // existing, already-flagged (# TODO comments) greenfield-setup path, and
2756
- // there's nothing valuable to lose. Checked AFTER the review screen so an
2757
- // interactive edit that fixes the field still passes.
2758
- if (hasExisting && (accepted.owner === "your-github-org" || accepted.repo === "your-repo-name")) {
2759
- w.write("\n Could not determine the GitHub owner/repo for this project.\n");
2760
- w.write(" " + dimLine(ctx, "Run this inside the target git repository, or edit those fields before accepting.") + "\n");
2717
+ // Never write placeholder identity (#5302; overwrite case: forge#1850 item 4): a config that can't address
2718
+ // a repo is worse than none. Checked AFTER the review screen so an interactive edit that fixes the field passes.
2719
+ if (accepted.owner === "your-github-org" || accepted.repo === "your-repo-name") {
2720
+ w.write("\n Could not determine the GitHub owner/repo for this project" + (hasExisting ? "." : " — forge.yaml not written.") + "\n");
2721
+ w.write(" " + dimLine(ctx, "Run this inside a git repository with a GitHub origin, then run: npx forgedock init") + "\n");
2761
2722
  return { written: false, todoCount: 0, backupName: null, aborted: true };
2762
2723
  }
2763
2724
 
2764
- const backup = backupExisting(outputPath);
2725
+ const backup = backupForgeYaml(outputPath, "setup review");
2765
2726
  if (backup) w.write(` Backed up: forge.yaml → ${backup.backupName}\n`);
2766
2727
 
2767
2728
  const { todoCount } = writeForgeYaml(accepted, accepted.lowConfidenceKeys, outputPath);
@@ -2772,6 +2733,20 @@ export async function review(ctx, draft, description) {
2772
2733
  // Act V — Forged (Task 8)
2773
2734
  // ---------------------------------------------------------------------------
2774
2735
 
2736
+ /**
2737
+ * The single recommended command after a green setup (#5304). Order: install
2738
+ * the App (#5295), merge a first PR on the user's own repo (#5290), then the
2739
+ * demo. The first two flows are not shipped yet, so flip their availability
2740
+ * here when they land.
2741
+ * @param {{appFlow?: boolean, firstPrFlow?: boolean}} [avail]
2742
+ * @returns {{command: string, why: string}}
2743
+ */
2744
+ export function pickNextStep({ appFlow = false, firstPrFlow = false } = {}) {
2745
+ if (appFlow) return { command: "npx forgedock install-app", why: "give ForgeDock its own bot identity and rate limit" };
2746
+ if (firstPrFlow) return { command: "npx forgedock first-pr", why: "merge your first PR on your own repo" };
2747
+ return { command: "npx forgedock demo --run", why: "watch a PR merge on a risk-free demo repo (uses your Claude Code login)" };
2748
+ }
2749
+
2775
2750
  /**
2776
2751
  * Act V: quench flash on the compact mark, receipt with real elapsed time,
2777
2752
  * next-steps box.
@@ -2803,21 +2778,8 @@ export function celebrate(ctx, summary) {
2803
2778
  if (summary.isMinimal) {
2804
2779
  w.write(" " + dimLine(ctx, "see docs/CONFIG.md for optional sections") + "\n");
2805
2780
  }
2806
- w.write(
2807
- box(
2808
- [
2809
- ` 1. install GitHub App — github.com/apps/rapiercraft-forgedock`,
2810
- ` 2. run npx forgedock labels setup — bootstrap GitHub labels`,
2811
- ` 3. run npx forgedock doctor — verify the install is green`,
2812
- ` 4. open claude in this repo`,
2813
- ` 5. run /issue <title> then /work-on <number>`,
2814
- ` 6. run npx forgedock run-issue <N> — drive an issue via the durable engine`,
2815
- ` 7. run npx forgedock watch — monitor pipeline state`,
2816
- ` 8. run npx forgedock guide — how the workflow fits together`,
2817
- ],
2818
- { title: "what's next" },
2819
- ),
2820
- );
2781
+ const next = pickNextStep();
2782
+ w.write(box([` ${next.command}`, ` ${next.why}`], { title: "next step" }));
2821
2783
  w.write(" " + dimLine(ctx, "not for you? npx forgedock uninstall removes everything · full command list: npx forgedock help") + "\n");
2822
2784
  w.write(" " + dimLine(ctx, "docs: github.com/RapierCraftStudios/ForgeDock · ⭐ a star is the whole marketing budget") + "\n\n");
2823
2785
  }
@@ -3056,6 +3018,27 @@ export async function maybeOfferDemo(ctx) {
3056
3018
  }
3057
3019
  }
3058
3020
 
3021
+ /**
3022
+ * #5290: offer the guided first run (propose small issues on this repo, run one to a PR). Default no; skipped
3023
+ * without a TTY or with --fast. Best-effort: never fails the install.
3024
+ */
3025
+ export async function maybeOfferFirstRun(ctx) {
3026
+ const isTTY = ctx.isTTY ?? process.stdin.isTTY === true;
3027
+ if (!isTTY || ctx.argv.includes("--fast")) return { offered: false };
3028
+ try {
3029
+ if (!(await ctx.confirmFn("Find 3 small issues in this repo and run one to a PR now?", false))) {
3030
+ ctx.stdout.write(" " + dimLine(ctx, "Skipped, try it anytime: npx forgedock first-run") + "\n");
3031
+ return { offered: true, ran: false };
3032
+ }
3033
+ const runFirstRunFn = ctx.runFirstRunFn ?? (async (o) => (await import("./first-run.mjs")).runFirstRun(o));
3034
+ const { runFromCli } = await import("./engine-cli.mjs");
3035
+ await runFirstRunFn({ cwd: ctx.cwd, exec: ctx.exec, confirmFn: ctx.confirmFn, runIssueFn: (n) => runFromCli([String(n)]), startedMs: ctx.startedAt });
3036
+ return { offered: true, ran: true };
3037
+ } catch {
3038
+ return { offered: true, ran: false };
3039
+ }
3040
+ }
3041
+
3059
3042
  // ---------------------------------------------------------------------------
3060
3043
  // The full journey (Task 8)
3061
3044
  // ---------------------------------------------------------------------------
@@ -3083,25 +3066,41 @@ export async function runJourney(ctx) {
3083
3066
  };
3084
3067
  process.on("SIGINT", onSigint);
3085
3068
  try {
3086
- await preflight(ctx);
3069
+ const pre = await preflight(ctx);
3070
+ // #5302: a missing blocking prerequisite ends setup here: nothing is installed or written, no success banner.
3071
+ let missing = pre.blocking;
3072
+ if (missing.length > 0) {
3073
+ const installed = await offerInstall(missing, { confirmFn: ctx.confirmFn, write: (t) => ctx.stdout.write(t) });
3074
+ if (installed.length > 0) {
3075
+ missing = checkPrereqs({ exec: ctx.exec, nodeVersion: ctx.nodeVersion, claudeDir: claudeDirOf(ctx), platform: ctx.platform }).filter((p) => p.blocking);
3076
+ }
3077
+ }
3078
+ if (missing.length > 0) {
3079
+ ctx.stdout.write(formatNotReady(missing) + "\n");
3080
+ return 1;
3081
+ }
3087
3082
  // Persist the toolset into ~/.forge/ before linking anything (#1943): when
3088
3083
  // not skipped (git-clone installs are exempt), reassign ctx.forgeHome so
3089
3084
  // every symlink/hook path forge() creates below originates from the
3090
3085
  // stable copy, not the ephemeral npm/npx/git source. Stashed on ctx so
3091
3086
  // forge()'s reporting block can surface the outcome (see isEphemeralCachePath
3092
3087
  // advisory extension above).
3088
+ const splashPkgRoot = ctx.forgeHome;
3093
3089
  const persistResult = await persistHome(ctx);
3094
3090
  ctx.persistHomeResult = persistResult;
3095
3091
  if (!persistResult.skipped) {
3096
3092
  ctx.forgeHome = persistResult.forgeHome;
3097
3093
  }
3098
3094
  const forged = await forge(ctx);
3095
+ const splash = installSplash({ pkgRoot: splashPkgRoot, home: ctx.home, env: ctx.env, argv: ctx.argv, exec: ctx.splashExec });
3096
+ if (splash.line) ctx.stdout.write(` ${splash.status === "installed" || splash.status === "already-installed" ? "✔" : "!"} ${splash.line}\n\n`);
3099
3097
  const { draft, description } = await setupAfterRead(ctx, await read(ctx));
3100
3098
  const reviewed = await review(ctx, draft, description);
3101
3099
  const connected = await connect(ctx);
3102
- celebrate(ctx, { ...reviewed, ...connected, total: forged.total, hookStatus: forged.hookStatus, scriptsResult: forged.scriptsResult });
3100
+ if (!reviewed.aborted) celebrate(ctx, { ...reviewed, ...connected, total: forged.total, hookStatus: forged.hookStatus, scriptsResult: forged.scriptsResult });
3103
3101
  await writeInstallReceipt(ctx, { forged });
3104
3102
  if (!reviewed.aborted) await maybeOfferDemo(ctx);
3103
+ if (!reviewed.aborted) await maybeOfferFirstRun(ctx);
3105
3104
  return reviewed.aborted ? 1 : 0;
3106
3105
  } finally {
3107
3106
  process.removeListener("SIGINT", onSigint);