@magnusekdahl/parallix 1.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 (123) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/LICENSE +661 -0
  3. package/README.md +196 -0
  4. package/config/agents.json +25 -0
  5. package/config/agents.local.json.template +8 -0
  6. package/config/state-map.json +4 -0
  7. package/config/state-map.json.template +31 -0
  8. package/config/workflow.config.schema.json +98 -0
  9. package/data/.gitkeep +0 -0
  10. package/docs/adr/0031-ai-agent-instruction-boundary-and-command-floor.md +114 -0
  11. package/docs/adr/0032-mission-refinement-state-and-usage-budget-signals.md +135 -0
  12. package/docs/adr/0034-module-and-skill-invocation-model.md +202 -0
  13. package/docs/adr/0036-mission-sizing-and-dependency-wave-heuristics.md +79 -0
  14. package/docs/adr/0037-ai-workflow-coordination-architecture.md +162 -0
  15. package/docs/adr/0041-integration-pipeline-gates.md +165 -0
  16. package/docs/adr/0042-workflow-cli-color-rendering-approach.md +106 -0
  17. package/docs/adr/0043-git-target-resolution-strategy.md +185 -0
  18. package/docs/adr/0044-workflow-distribution-model.md +277 -0
  19. package/docs/adr/0045-parallax-branch-model.md +182 -0
  20. package/docs/adr/0046-npm-publish-process-and-security.md +138 -0
  21. package/docs/adr/index.md +20 -0
  22. package/docs/agents.md +212 -0
  23. package/docs/authority-reference.md +298 -0
  24. package/docs/forgejo-setup.md +31 -0
  25. package/docs/migration/extraction.md +61 -0
  26. package/docs/migration/task-classification.md +36 -0
  27. package/docs/operator-setup.md +76 -0
  28. package/docs/readme-rewrite-benchmark.md +188 -0
  29. package/docs/use-cases.md +105 -0
  30. package/examples/README.md +62 -0
  31. package/examples/run-enterprise-tarball-workflow-smoke.sh +257 -0
  32. package/examples/run-verify-env-smoke.sh +40 -0
  33. package/index.js +250 -0
  34. package/lib/README.md +13 -0
  35. package/lib/agents/agents.js +867 -0
  36. package/lib/agents/claude-telemetry.js +233 -0
  37. package/lib/agents/claude.js +139 -0
  38. package/lib/agents/codex-telemetry.js +202 -0
  39. package/lib/agents/codex.js +219 -0
  40. package/lib/agents/limit-hit.js +252 -0
  41. package/lib/agents/mistral-telemetry.js +44 -0
  42. package/lib/agents/mistral.js +68 -0
  43. package/lib/agents/opencode-export.js +110 -0
  44. package/lib/agents/opencode-telemetry.js +356 -0
  45. package/lib/agents/opencode.js +218 -0
  46. package/lib/agents/stage-telemetry.js +37 -0
  47. package/lib/commands/active.js +625 -0
  48. package/lib/commands/checkpoint.js +76 -0
  49. package/lib/commands/config.js +39 -0
  50. package/lib/commands/coverage-gate.js +358 -0
  51. package/lib/commands/diff.js +119 -0
  52. package/lib/commands/draft.js +854 -0
  53. package/lib/commands/handoff.js +501 -0
  54. package/lib/commands/integrate.js +1528 -0
  55. package/lib/commands/mission-start.js +246 -0
  56. package/lib/commands/rebase.js +597 -0
  57. package/lib/commands/repair-handoff.js +227 -0
  58. package/lib/commands/resolve-conflict.js +109 -0
  59. package/lib/commands/review.js +13 -0
  60. package/lib/commands/setup-review.js +13 -0
  61. package/lib/commands/setup.js +3 -0
  62. package/lib/commands/stats-backfill.js +395 -0
  63. package/lib/commands/stats.js +1601 -0
  64. package/lib/commands/status.js +183 -0
  65. package/lib/commands/verify.js +1 -0
  66. package/lib/core/fmt.js +202 -0
  67. package/lib/core/git.js +73 -0
  68. package/lib/core/gitignore.js +110 -0
  69. package/lib/core/mission-utils.js +1017 -0
  70. package/lib/core/persistent-data-migration.js +201 -0
  71. package/lib/core/product-config.js +508 -0
  72. package/lib/core/runtime-matrix.js +82 -0
  73. package/lib/core/spawn-tee.js +173 -0
  74. package/lib/core/state-map.js +89 -0
  75. package/lib/core/storage.js +165 -0
  76. package/lib/core/verification.js +149 -0
  77. package/lib/index.js +77 -0
  78. package/lib/review/rebase.js +163 -0
  79. package/lib/review/review-adapter.js +135 -0
  80. package/lib/review/review-artifacts.js +619 -0
  81. package/lib/review/review-commands.js +1375 -0
  82. package/lib/review/review-events.js +1007 -0
  83. package/lib/review/review-loop.js +1004 -0
  84. package/lib/review/review-polling.js +141 -0
  85. package/lib/review/review-prompts.js +212 -0
  86. package/lib/review/review-state.js +280 -0
  87. package/lib/review/review.js +96 -0
  88. package/lib/tools/backlog.js +680 -0
  89. package/lib/tools/forgejo.js +1585 -0
  90. package/lib/tools/gatekeeper.js +106 -0
  91. package/lib/tools/sessions.js +74 -0
  92. package/lib/tools/setup-review.js +1053 -0
  93. package/package.json +56 -0
  94. package/prompts/act-on-review-verbose.md +20 -0
  95. package/prompts/act-on-review.md +22 -0
  96. package/prompts/draft.md +20 -0
  97. package/prompts/execute.md +24 -0
  98. package/prompts/portfolio.md +30 -0
  99. package/prompts/review-verbose.md +20 -0
  100. package/prompts/review.md +17 -0
  101. package/px.js +236 -0
  102. package/templates/AGENTS-snippet.md +14 -0
  103. package/templates/AGENTS.md.template +34 -0
  104. package/templates/CLAUDE.md.template +27 -0
  105. package/templates/CODEX.md.template +38 -0
  106. package/templates/MISTRAL.md.template +24 -0
  107. package/templates/claude-commands/act-on-review.md +3 -0
  108. package/templates/claude-commands/area-review.md +3 -0
  109. package/templates/claude-commands/draft.md +6 -0
  110. package/templates/claude-commands/execute.md +6 -0
  111. package/templates/claude-commands/integrate.md +4 -0
  112. package/templates/claude-commands/portfolio.md +5 -0
  113. package/templates/claude-commands/review.md +4 -0
  114. package/templates/codex/config.toml +6 -0
  115. package/templates/mission-scaffold.md +39 -0
  116. package/templates/vibe/skills/act-on-review/SKILL.md +16 -0
  117. package/templates/vibe/skills/area-review/SKILL.md +16 -0
  118. package/templates/vibe/skills/draft/SKILL.md +16 -0
  119. package/templates/vibe/skills/execute/SKILL.md +16 -0
  120. package/templates/vibe/skills/integrate/SKILL.md +16 -0
  121. package/templates/vibe/skills/portfolio/SKILL.md +21 -0
  122. package/templates/vibe/skills/review/SKILL.md +16 -0
  123. package/tools/setup-forgejo-docker.sh +84 -0
@@ -0,0 +1,188 @@
1
+ # README rewrite benchmark — how credible developer-tool READMEs open
2
+
3
+ **Purpose:** Establish what a skeptical engineer expects to see in the first screen of
4
+ a developer-tool README, so the Parallix rewrite (task-1336) borrows proven structure
5
+ without copying the hype patterns that would undercut its credibility.
6
+
7
+ **Method:** Seven comparable projects were inspected — AI coding agents, agent
8
+ frameworks, and CLI developer tools that compete for the same first-glance attention
9
+ Parallix needs to win. For each: opening headline/tagline pattern, first-paragraph
10
+ structure, what the README leads with (features / problem / example / screenshot /
11
+ install / docs), quickstart depth, how credibility and caveats are handled, what is
12
+ worth borrowing, and what should *not* be copied because it would make Parallix less
13
+ credible.
14
+
15
+ The benchmark is descriptive of the prevailing patterns these projects use; it is not a
16
+ line-by-line transcription. The decisions column is the actionable output.
17
+
18
+ ---
19
+
20
+ ## 1. Aider (`Aider-AI/aider`)
21
+
22
+ - **Headline/tagline:** "Aider is AI pair programming in your terminal." A one-line
23
+ capability statement, no adjectives.
24
+ - **First paragraph:** What it is + the concrete loop it runs ("edit code in your local
25
+ git repo … works with your existing files"). Names Git as a first-class concept
26
+ immediately.
27
+ - **Leads with:** Capability statement, then a short feature list, then install. A
28
+ recorded terminal cast (asciinema) sits near the top.
29
+ - **Quickstart depth:** Very shallow path to value — `pip install aider-install` →
30
+ `aider --model …` → start editing. Two or three commands to a working session.
31
+ - **Credibility/caveats:** Strong proof signal — leaderboard/benchmark numbers (SWE-style
32
+ edit benchmarks), explicit "works best with" model guidance, and an honest note that
33
+ results vary by model. Git auto-commit behavior is stated up front so it is not a
34
+ surprise.
35
+ - **Borrow:** The one-line capability headline; naming Git as a first-class concept in the
36
+ first paragraph; a shallow two-to-three-command path to a first result; stating a
37
+ potentially surprising default behavior up front.
38
+ - **Avoid:** Leading the page with benchmark leaderboards — Parallix has *one* measured
39
+ figure with heavy caveats (`docs/use-cases.md` UC-1), not a maintained benchmark, so a
40
+ leaderboard-style flex would over-claim. Keep the measurement, drop the leaderboard
41
+ framing.
42
+
43
+ ## 2. Goose (`block/goose`)
44
+
45
+ - **Headline/tagline:** Positions as "an open-source, extensible AI agent that goes beyond
46
+ code suggestions" — it frames against the *limitation of the adjacent category*
47
+ (autocomplete/suggestions) rather than listing its own features first.
48
+ - **First paragraph:** What it is + who builds it (Block) + the differentiator (executes
49
+ tasks, not just suggests). Establishes credibility by association and by contrast.
50
+ - **Leads with:** Problem/positioning contrast, then capabilities, then install. Polished
51
+ but still text-first above the fold.
52
+ - **Quickstart depth:** Medium — a CLI install plus a desktop option; a few steps to a
53
+ running agent, with provider/key setup called out.
54
+ - **Credibility/caveats:** Corporate backing is the main trust signal; extension/MCP
55
+ ecosystem implies durability. Lighter on hard limitation statements.
56
+ - **Borrow:** Positioning *against the adjacent category* ("goes beyond suggestions") is
57
+ exactly the move Parallix needs — define against "a single coding agent run directly,"
58
+ not against nothing. Naming who is behind it builds trust.
59
+ - **Avoid:** Leaning on corporate backing as the trust signal (Parallix is a solo,
60
+ alpha, local-first project — claiming institutional weight would be dishonest). Replace
61
+ that trust signal with cited code/tests and stated caveats instead.
62
+
63
+ ## 3. OpenCode (`opencode-ai/opencode` / sst)
64
+
65
+ - **Headline/tagline:** "The AI coding agent built for the terminal." A
66
+ built-for-*audience* tagline — it names the user (terminal-native developers) inside the
67
+ tagline itself.
68
+ - **First paragraph:** Short — what it is and the audience, then straight to a visual and
69
+ install. Provider-agnostic ("works with any model") is stated early as a differentiator.
70
+ - **Leads with:** Tagline → screenshot/TUI image → install. Heavily visual above the fold.
71
+ - **Quickstart depth:** Shallow — a single curl/npm install line and a run command.
72
+ - **Credibility/caveats:** Provider-agnosticism and a clean TUI are the implicit proof;
73
+ caveats are light.
74
+ - **Borrow:** Naming the audience inside the positioning ("for operators comfortable with
75
+ Git and CLI"); stating provider-agnosticism (Parallix's multi-family support is a
76
+ genuine parallel — codex/claude/mistral/qwen).
77
+ - **Avoid:** The screenshot-first above-the-fold — Parallix's mission is explicitly *out
78
+ of scope* for screenshots/demos (task-1336 Out of Scope), and a CLI workflow harness is
79
+ better shown by a command-flow block than a TUI image. Lead with text and a fenced
80
+ command example instead.
81
+
82
+ ## 4. Get Shit Done — `gsd` (agentic CLI task runner)
83
+
84
+ - **Headline/tagline:** Blunt, outcome-named tagline (the tool name *is* the promise).
85
+ Plain-spoken, anti-hype voice.
86
+ - **First paragraph:** States the pain ("you keep re-explaining context to your agent")
87
+ before the solution. Problem-first.
88
+ - **Leads with:** Problem statement → the workflow it imposes (structured tasks/plans) →
89
+ install.
90
+ - **Quickstart depth:** Shallow-to-medium; an install line and a first command that
91
+ produces a plan/task artifact.
92
+ - **Credibility/caveats:** Plain voice itself is the credibility signal — it reads like an
93
+ engineer wrote it for engineers, not a marketing team. Limitations stated casually but
94
+ honestly.
95
+ - **Borrow:** Problem-first opening (state the pain before the mechanism); the structured
96
+ workflow framing (tasks/plans as durable artifacts) is the closest analog to Parallix
97
+ missions/checkpoints; the plain anti-hype engineer voice is the exact tone target.
98
+ - **Avoid:** Over-casual voice that drifts into jokes — Parallix's audience is a
99
+ *skeptical engineering manager*, so keep the plain voice but stay precise and sober.
100
+
101
+ ## 5. Continue (`continuedev/continue`)
102
+
103
+ - **Headline/tagline:** "the leading open-source AI code assistant" — a category-leadership
104
+ claim plus what it is.
105
+ - **First paragraph:** What it is + where it runs (IDE extensions) + extensibility. Names
106
+ the integration surface immediately.
107
+ - **Leads with:** Capability + ecosystem, screenshots/GIFs of the IDE experience, then
108
+ install per-IDE.
109
+ - **Quickstart depth:** Medium — install the extension, configure a model, use it; more
110
+ setup than a pure CLI.
111
+ - **Credibility/caveats:** Open-source + large ecosystem as trust; a "leading" superlative
112
+ that only works because adoption backs it.
113
+ - **Borrow:** Naming the integration surface early (for Parallix: Git worktrees + your
114
+ existing CI gate, not an IDE).
115
+ - **Avoid:** The "leading" superlative — Parallix is alpha with one measured window; any
116
+ leadership/superlative claim fails the falsifiability bar (task-1336 Success Criteria,
117
+ ADR 039 Part 2). Also avoid IDE-centric framing: Parallix is explicitly *not* an IDE
118
+ (it is a CLI workflow harness), and the "What Parallix is not" section must say so.
119
+
120
+ ## 6. Codex CLI (`openai/codex`)
121
+
122
+ - **Headline/tagline:** "a coding agent that runs locally on your computer." Local-first
123
+ capability statement.
124
+ - **First paragraph:** What it is + local execution + a one-line install. Emphasizes
125
+ running in your terminal against your repo.
126
+ - **Leads with:** Capability → install → a short usage example. Sandbox/approval behavior
127
+ is documented near the top because it affects trust.
128
+ - **Quickstart depth:** Shallow — one install command, one run command.
129
+ - **Credibility/caveats:** Documents sandboxing and approval modes early — security posture
130
+ *is* the caveat handling. Honest about what it will and won't touch.
131
+ - **Borrow:** Local-first stated as a feature, not an apology ("local-first developer
132
+ workflow"); documenting safety/boundary behavior (for Parallix: review gate, verification
133
+ gates, what it will not auto-merge) as a trust signal rather than fine print.
134
+ - **Avoid:** Nothing major to avoid; the trap here is matching its polish/scope claims —
135
+ Parallix should not imply a comparable maturity. State alpha status plainly.
136
+
137
+ ## 7. Cline (`cline/cline`)
138
+
139
+ - **Headline/tagline:** Capability + autonomy framing ("can use your CLI and editor"),
140
+ with explicit human-in-the-loop language ("with your permission").
141
+ - **First paragraph:** What it does + the explicit approval model. Autonomy is paired with
142
+ a control statement in the same breath.
143
+ - **Leads with:** Capability → permission/approval model → screenshots → install.
144
+ - **Quickstart depth:** Shallow (marketplace install).
145
+ - **Credibility/caveats:** The *headline pairing* of "autonomous" with "with your
146
+ permission" is the credibility move — it pre-empts the "is this a runaway agent?"
147
+ objection in the first sentence.
148
+ - **Borrow:** Pairing capability with a control statement up front — Parallix should pair
149
+ "runs multiple agents" with "behind a forced review step and your own verification
150
+ gates" so the autonomy fear is answered immediately. This directly informs the "What
151
+ Parallix is not … not a magic autonomous engineer" section.
152
+ - **Avoid:** Marketplace/IDE-install framing (not applicable to a CLI harness).
153
+
154
+ ---
155
+
156
+ ## Cross-cutting findings
157
+
158
+ 1. **Every credible README states what the tool *is* in one line, in the first sentence,
159
+ with zero internal jargon.** None of the seven opens with its own internal
160
+ abstractions. → Parallix must not open with "authority stack / state-map / adapter
161
+ internals."
162
+ 2. **The strongest openers are problem-first or contrast-first** (Goose, gsd, Cline) — they
163
+ define against the adjacent category or name the pain before the mechanism. → Parallix
164
+ leads with "running several AI coding agents directly against one repo clobbers the
165
+ working tree" before describing missions/worktrees.
166
+ 3. **Shallow quickstart wins.** Two-to-three commands to a first result is the norm. →
167
+ Parallix's Quick start must be a short, honest path: `npm pack` + global install + a
168
+ first mission command, no enterprise walkthrough.
169
+ 4. **Caveats build trust when stated early and specifically** (Aider benchmarks + "varies
170
+ by model", Codex sandbox, Cline permission). → Parallix turns its *honesty* into the
171
+ trust signal: alpha, local-first, npm-pack-only, one measured window that eroded, review
172
+ coverage caveats — all cited.
173
+ 5. **Superlatives and leaderboards only work with adoption/benchmarks behind them**
174
+ (Continue "leading", Aider leaderboard). Parallix has neither at scale → no
175
+ superlatives, no "2× forever"; use the single cited figure *with* its caveats.
176
+
177
+ ## Structure decision
178
+
179
+ The task-1336-specified structure (positioning line → Why Parallix? → What it does → The
180
+ core workflow → Quick start → Example → Use cases → What Parallix is not → Current status →
181
+ Documentation → Development → License) **matches the prevailing credible pattern** and is
182
+ adopted as-is. It is problem-first (Why Parallix? early, per finding 2), keeps the
183
+ quickstart shallow and high (finding 3), and dedicates explicit sections to caveats ("What
184
+ Parallix is not", "Current status") per finding 4. No competitor revealed a clearly
185
+ superior structure that would justify deviating, so **no stop-rule escalation is
186
+ triggered**. The one adaptation from the benchmark: lead the page with a fenced
187
+ command-flow / example block rather than a screenshot (findings re OpenCode/Continue),
188
+ since screenshots are out of scope and a CLI harness is better shown as commands.
@@ -0,0 +1,105 @@
1
+ # Parallix — Primary Use-Case Inventory (evidence-backed)
2
+
3
+ **Author role:** Skeptical PM doing discovery, not advocacy.
4
+ **Question answered:** Which use cases does Parallix actually support today, and which are strong enough for public positioning?
5
+ **Method:** Every claim is sourced to repository code, tests, or configs — never to a README assertion — and any throughput claim is tied to the visualBoard measured retro figures *with their caveats*. See [CP-1.md](CP-1.md) for the raw evidence base.
6
+
7
+ > **How to read a confidence level.**
8
+ > **Confirmed** = the capability is executable code *and* exercised by a passing test cited by path.
9
+ > **Partial** = the mechanism exists in code but enforcement, coverage, or measured value is incomplete (caveat stated).
10
+ > **Aspirational** = documented intent only; not delivered today. All aspirational items live in their own section (§3).
11
+
12
+ ---
13
+
14
+ ## 1. Confirmed and Partial use cases
15
+
16
+ Each use case carries the four required parts: **(P) persona/buyer**, **(B) before→after pain**, **(E) non-README evidence**, **(C) confidence + one-line justification.**
17
+
18
+ ### UC-1 — Run several AI coding agents on one repo at once without them clobbering each other
19
+
20
+ - **(P)** Solo maintainer or small-team lead driving more than one AI coding agent against a single repository.
21
+ - **(B)** *Before:* two agents in one working tree fight over the index, branch, and uncommitted files, so you serialize them (one agent idle while the other runs) or you hand-manage `git worktree` and branch naming yourself. *After:* each mission is given its own branch (`mission/<slug>`) and its own sibling checkout (`../<repo>-<slug>`) automatically, so N agents make progress independently and each lands by squash-merge.
22
+ - **(E)** Worktree + branch creation is code: `lib/commands/draft.js:133` (mission branch name), `:135` (`ensureMissionBranch`), `:138-139` (`ensureWorktree` at the sibling path); pattern declared in `workflow.config.json` (`adapters.missions.worktreePattern: "../<repo>-<slug>"`, `branchPrefix: "mission/"`). Tested: `test/draft.test.js` — `ensureWorktree creates worktree when target directory is absent`, `ensureMissionBranch creates branch from main when absent`. **Measured value:** the observed mission-output gain depends on the comparison surface. In strict user-value terms, the visualBoard parallel-model periods ranged from `0.44/day` to `0.58/day` over a `0.28/day` human baseline — roughly **+57% to +107%** (`../visualBoard/docs/missions/2026/ai-workflow-retrospective-since-october/EVALUATION_SUMMARY.md:46-52`, `../visualBoard/docs/missions/2026/task-1023/RETROSPECTIVE_P5.md:20-30`). A later productized workflow window recorded **58 completed missions in 15 days** — about **27/week** or `~3.86/day` — which is roughly **+1,280%** versus the same `0.28/day` baseline if you frame the comparison as total completed mission throughput in a setup where the buyer no longer has to build the AI-SDLC machinery first (`../visualBoard/docs/missions/2026/task-1247/research.md:55-75`). The later Q2 normalization keeps the user-value story in the middle of that spread, at `0.54/day` in P4 and `0.48/day` in P6 (`../visualBoard/docs/missions/2026/task-1099/RETROSPECTIVE_Q2_2026.md:18-29`). **Caveats that travel with the range:** the low-end user-value periods carried heavy AI-workflow overhead (34% in the early summary; 85% AI-SDLC mix in P5), C2/external review coverage was only 7% against a 100% rule (`EVALUATION_SUMMARY.md:66`), the comparison METR study found AI *slowed* experienced devs 19% and carries a model-currency caveat (`:70-72`), and the high-end `27/week` figure is a different mission-output metric from user-value/day.
23
+ - **(C)** **Confirmed** for the mechanic (worktree/branch isolation is tested code); the throughput *value* is **measured but caveated** — real and attributable to the parallel model, but highly dependent on whether you measure user-value delivery only or general completed-mission output in a productized workflow.
24
+
25
+ ### UC-2 — Don't lose a run when one AI provider hits its usage cap
26
+
27
+ - **(P)** Anyone driving agents on metered/rate-limited LLM subscriptions (Claude, Codex/GPT, Mistral, local Qwen).
28
+ - **(B)** *Before:* the agent prints "usage limit reached", the run dies, and you babysit it — manually restarting later or hand-switching to a different model. *After:* the limit message is pattern-detected, that agent family is written to a timed blocklist, and the run retries with the next eligible, unblocked family; only when all are exhausted does it fail loudly.
29
+ - **(E)** Per-family limit regexes: `lib/agents/limit-hit.js:8-36`; selection honoring eligibility + blocklist + env override: `lib/agents/agents.js:382` (`selectAgent`), `:340-348` (`isAgentBlocked` for permanent/timed/`blocked:false`). Tested: `test/agents-limit-hit.test.js` — `startAgent persists a block via updateAgentBlock when limit-hit detector fires`, `startAgent throws when every eligible agent hits the limit`, `startAgent does not loop forever when WORKFLOW_AGENT is pinned and that agent hits limit`.
30
+ - **(C)** **Confirmed** — detection, timed-block persistence, and next-agent retry are each covered by named passing tests.
31
+
32
+ ### UC-3 — Resume a long agent task exactly where it stopped, deterministically
33
+
34
+ - **(P)** Operator running multi-step missions that outlast a single session or context window, possibly across machines.
35
+ - **(B)** *Before:* a crashed or context-exhausted agent leaves you reconstructing what was already done by re-reading diffs. *After:* every checkpoint runs the gate, commits a checkpoint document, and pushes it with a literal `Next action:` line, so a later session (or a different agent) resumes from a written instruction rather than a guess.
36
+ - **(E)** `lib/commands/checkpoint.js:41-47` (gate runs first), `:56-58` (`checkpoint(<slug>): <cp>` commit + `Next action:` body), `:67` (push). Handoff refuses to proceed without a checkpoint and auto-generates a minimal `CP-1.md` with a valid Goal Check when none exists: `lib/commands/handoff.js:92-102`. Tested: `test/handoff.test.js` (checkpoint discovery + auto-remediation).
37
+ - **(C)** **Confirmed** — the commit/push + `Next action:` contract is code and the handoff path is tested.
38
+
39
+ ### UC-4 — Require a second review pass before merge (different AI preferred, same-family fallback when no other is runnable)
40
+
41
+ - **(P)** Lead who distrusts single-agent self-approval — exactly the unverified-AI risk METR quantifies.
42
+ - **(B)** *Before:* the agent that wrote the change also declares it done; nobody independent looks. *After:* review is a separate workflow step whose reviewer selection actively excludes the implementer (preferring a different agent family, falling back to the same family only when no other is runnable), and a self-approval is explicitly skipped at the provider and flagged as requiring a different agent or a human.
43
+ - **(E)** Self-approval guard: `lib/review/review-commands.js:902` ("self-approval POST skipped. A different agent or a human must post the formal provider approval"). Reviewer selection *excludes the implementer* to prefer a different family — `lib/review/review-loop.js:427` (`selectAgent('review', { exclude: new Set([implementer]) })`) — but the same step has an **explicit same-family fallback**: when no different-family agent is runnable/unblocked it sets `reviewer = implementer` with source `single-family-fallback` (`lib/review/review-loop.js:484-485`). So review is a *separate step that prefers, but does not guarantee, a different agent*. (Note: `config/agents.json:9-20` lists the **same** four families for `active` and `review` — there is no separate reviewer pool; separation comes only from the runtime implementer-exclusion above.) Review loop with bounded attempts: `lib/review/review-loop.js:281` (`maxAttempts`).
44
+ - **(C)** **Partial.** The *mechanism* (separate step + code-level self-approval block + implementer-exclusion at reviewer selection) exists in `test/review.test.js`, but two honesty constraints hold it below Confirmed: (a) the guarantee is incomplete *by design* — reviewer selection falls back to the *same* family when no other is runnable (`review-loop.js:484-485`), and measured C2 review coverage was only **7%** against the 100% rule (`EVALUATION_SUMMARY.md:66`); (b) that test suite is **timing-flaky** — it is async-poll/timeout-sensitive and non-deterministic across runs (observed both all-pass and 11–15 failures depending on machine load), so it is not a dependable green signal. Position this as "forces a second, preferentially-different review pass," **not** "guarantees a different reviewer or coverage."
45
+
46
+ ### UC-5 — Adopt the mission workflow without rewriting your existing CI
47
+
48
+ - **(P)** Team with an established `make`/`npm`/script-based verification setup that wants the mission lifecycle without replacing its gate.
49
+ - **(B)** *Before:* workflow tools assume their own gate runner, so adopting them means re-plumbing verification. *After:* the gate is a configured shell command with `{{area}}` substitution and a **no-op default** — declare your existing command in `workflow.config.json` and it runs verbatim; declare nothing and verification is a documented no-op pass rather than an invented gate.
50
+ - **(E)** `lib/core/verification.js:5-11` (no-op notice when unconfigured), `:25-31` (`{{area}}` substitution), `:34` (`runVerificationGate`). This repo configures `npm test` / area `all` (`workflow.config.json` `adapters.verification`). Tested: `test/verification.test.js`.
51
+ - **(C)** **Confirmed** — adapter resolution, substitution, and the no-op default are tested code.
52
+
53
+ ### UC-6 — See which agent family actually pays off, across every repo one runtime drives
54
+
55
+ - **(P)** Operator/buyer deciding which paid agent subscriptions to keep or cut.
56
+ - **(B)** *Before:* no durable, cross-repo record of how each agent performs, so the keep/cut decision is a hunch. *After:* a single parallix-owned `stats.csv` accumulates per-agent telemetry (`classification, implementer, pr_fix_rounds`, plus an extended 21-column schema) across every repository one runtime drives, keyed so the same mission in different repos stays distinct.
57
+ - **(E)** `lib/commands/stats.js:14` (legacy 5-col schema), `:21-30` (extended schema). Tested: `test/stats.test.js` — `upsertStatsRow writes the workflow stats schema and updates existing missions idempotently`, `task-1314: upsertStatsRow keys on (repo, mission, stage) so same mission in different repos stays distinct`. The kind of agent-comparison this enables is demonstrated in `../visualBoard/docs/missions/2026/task-1023/RETROSPECTIVE_P5.md:198-243` (per-family PRs, reviews/PR, durations).
58
+ - **(C)** **Partial.** Schema and CSV upsert are tested, but the value is bounded: the richest per-agent comparison in the evidence came from Forgejo PR data, not `stats.csv`, and two of four families record honest zeros for token usage (`opencode`/local Qwen and `mistral`/vibe telemetry are zeroed by design, per `README.md:230-231` describing `opencode-telemetry.js`/`mistral-telemetry.js`). So cross-agent *cost/value* comparison is complete only for `codex` and `claude` today.
59
+
60
+ ---
61
+
62
+ ## 2. Ranking — top 3 for immediate public positioning
63
+
64
+ Ranked by *credibility as a public claim given cited evidence*, each naming the single competing tool/workflow a user would otherwise reach for, and each carrying a claim that is **only true of Parallix** given the evidence.
65
+
66
+ | Rank | Use case | What the user reaches for instead | The claim only Parallix can make (with evidence) |
67
+ |---|---|---|---|
68
+ | **1** | UC-1 Parallel multi-agent execution | A single Cursor / Claude Code / Aider session run serially, or hand-rolled `git worktree` juggling | It is the *specific* mechanic an internal retro measured as the only one to beat a human baseline, with observed mission-output gains ranging from roughly **+57%** on strict user-value delivery up to about **+1,280%** on later completed-mission throughput in a productized setup (`EVALUATION_SUMMARY.md:46-52`, `RETROSPECTIVE_P5.md:20-30`, `task-1247/research.md:55-75`). No generic AI tool ships that attached measurement. |
69
+ | **2** | UC-2 Usage-limit auto-failover across families | Manually restarting with a different model when you hit a cap | Family-specific limit detection → timed blocklist → retry-next-eligible is a tested control loop (`limit-hit.js:8-36`, `test/agents-limit-hit.test.js`), not a retry button. |
70
+ | **3** | UC-4 Second review gate (prefers a different agent family, with same-family fallback) | Single-agent self-review, or waiting on a human PR reviewer | A self-approval is *code-blocked* and rerouted to a different family or human (`review-commands.js:902`), and reviewer selection actively excludes the implementer family (`review-loop.js:427`). (Marked Partial — there is a documented same-family fallback at `review-loop.js:484-485`, so this is "forces a second *attempt*," not "guarantees a different agent or coverage.") |
71
+
72
+ **Genericness check (value-bar §3):** strike "Parallix" and substitute any other AI coding tool — rank 1 fails to read identically because the +57% to +107% user-value figures, and the later +1,280% completed-mission figure, are specific repository data; rank 2 fails because per-family limit regexes + timed blocklist is a named tested behavior, not a generic "retry"; rank 3 fails because a code-level self-approval block is specific behavior, not a slogan.
73
+
74
+ **Feature-list strike check (value-bar §1):** removing every Parallix-internal noun still leaves a user situation in each top-3: (1) "run several AI agents on one repo at once without them overwriting each other"; (2) "when one provider hits its cap mid-task, continue on another automatically"; (3) "a second review pass by a preferentially different AI is forced before the author's own approval counts (though same-family fallback applies when no other agent is available)."
75
+
76
+ ---
77
+
78
+ ## 3. Aspirational / not-yet-supported (do NOT position as live)
79
+
80
+ - **Public distribution (registry/Homebrew/Docker/signed binaries/CI-release automation).** Explicitly out of the near-term model — supported path is a local `npm pack` + global install only (`README.md:281-285`, cited here as the thing being *tested*, corroborated by `package.json:10-11` `publishConfig.access: "restricted"`). **Aspirational.**
81
+ - **"Sustained 2× throughput at scale."** The observed range is context-dependent, not flat. Strict user-value throughput moved between `0.44/day` (+57%) and `0.58/day` (+107%), while a later productized window reached about `27/week` (`~3.86/day`, roughly +1,280% vs `0.28/day`) on completed-mission throughput (`RETROSPECTIVE_P5.md:20-30`, `RETROSPECTIVE_Q2_2026.md:18-29`, `task-1247/research.md:55-75`). A "consistently 2× faster" claim is **Aspirational** and hides the fact that these are different mission-output measures.
82
+ - **Full structured telemetry for all four agent families.** `mistral`/`vibe` telemetry is blocked in-environment and records honest zeros, tracked as follow-up (`README.md:231`). Cross-agent cost comparison for all families is **Aspirational** until those sources exist.
83
+
84
+ ---
85
+
86
+ ## 4. Red-team (required adversarial self-review)
87
+
88
+ The two weakest use cases and the single strongest objection a skeptical senior PM would raise against each:
89
+
90
+ 1. **UC-4 (Cross-agent review) is the weakest "confirmed-sounding" claim.**
91
+ *Objection:* "Even framed as a 'second-agent review gate that prefers a different family,' you still rank it as a differentiator — but the eligibility config lists the *same* families for `active` and `review` (`config/agents.json:9-20`), reviewer selection has a documented same-family fallback (`review-loop.js:484-485`), and your own cited retro puts real C2 coverage at **7%** against a 100% rule (`EVALUATION_SUMMARY.md:66`). The separation is preferential and best-effort, so even the softened claim leans on a control that often doesn't bind."
92
+ *How the evidence answers it:* It mostly concedes. The *self-approval block* (`review-commands.js:902`) and the *implementer-exclusion at reviewer selection* (`review-loop.js:427`) are real and present, so the mechanism is honestly "supported/forced at the point of approval." But it is not a guarantee: `config/agents.json:9-20` lists the **same** families for `active` and `review` (no dedicated reviewer pool), and there is an explicit **same-family fallback** (`review-loop.js:484-485`) when no other family is runnable. That is exactly why UC-4 is marked **Partial** and kept out of any "guarantee" framing. A PM should ship it as "forces a second review attempt by a *preferentially* different agent," not as a coverage or different-agent guarantee.
93
+
94
+ 2. **UC-6 (Cross-repo agent telemetry) over-reaches on value.**
95
+ *Objection:* "Your richest agent comparison (`RETROSPECTIVE_P5.md:198-243`) came from Forgejo PR data, not `stats.csv`, and two of four families log zero tokens by design. So 'know which agent pays off' is true only for codex and claude — the CSV alone can't make the buyer's decision you imply."
96
+ *How the evidence answers it:* It partially answers. The schema and idempotent upsert are tested (`test/stats.test.js`), so the *plumbing* claim holds; but the *decision-grade comparison* claim is bounded to families with structured telemetry. UC-6 is marked **Partial** with that boundary stated, and it is deliberately excluded from the top-3.
97
+
98
+ ---
99
+
100
+ ## 5. Limitations & honesty constraints (carried into any downstream positioning)
101
+
102
+ - Throughput framing is permitted **only** with the cited observed ranges and their metric labels: `0.44-0.58/day` over a `0.28/day` baseline for user-value throughput, or `58 missions / 15 days` (`~27/week`, `~3.86/day`) for later completed-mission throughput. Do not blur those into one number. All such framing must travel with its caveats (34% overhead in the early summary, 7% C2 coverage, METR −19%/model-currency, P5 erosion under 85% AI-SDLC mix). A bare "2× faster" is a defect.
103
+ - The README is treated as the artifact under test, never as proof — every value claim above is anchored to code/tests/configs/measured retro data.
104
+ - visualBoard's human baseline carries acknowledged confounds (2022 codebase was simpler); rate comparisons are directional (`EVALUATION_SUMMARY.md:9`). The latest metrics-bearing retro is `../visualBoard/docs/missions/2026/task-1099/RETROSPECTIVE_Q2_2026.md`, which reports P4 `0.54/day`, P5 `0.44/day`, and P6 `0.48/day`.
105
+ - History coverage backing this analysis: parallix — 14 `MISSION.md` files + 25 backlog tasks (≥10 ✓); visualBoard — `EVALUATION_SUMMARY.md`, `RETROSPECTIVE.md`, `BENCHMARK.md`, `RETROSPECTIVE_P5.md` among 18 retro files (≥3 ✓).
@@ -0,0 +1,62 @@
1
+ # parallix examples
2
+
3
+ These examples use the provisional `px` runner from inside a **caller-supplied**
4
+ target repository. They contain no fixed workstation paths, no sibling worktree
5
+ names, no npm global install directory, no local registry URL, and they copy no
6
+ `parallix/` source into the target repo.
7
+
8
+ In every command below:
9
+
10
+ - `PARALLIX_DIR` is the directory holding the parallix runtime when running
11
+ `node "$PARALLIX_DIR/px.js"` directly.
12
+ - `TARGET_REPO` is a repository path **you** supply, then `cd` into before
13
+ running `px`.
14
+
15
+ ## Read-only environment check
16
+
17
+ Runs `verify-env` which answers "Can I use this repo?" with an explicit verdict:
18
+
19
+ ```sh
20
+ cd "$TARGET_REPO"
21
+ node "$PARALLIX_DIR/px.js" verify-env
22
+ ```
23
+
24
+ On a healthy repo the output ends with `[PASS] Environment verdict: USABLE`.
25
+ On a blocked repo (e.g. invalid `workflow.config.json`) it exits 1 and prints `[FAIL] Environment verdict: NOT USABLE` followed by remediation steps.
26
+
27
+ ## Record a mission review event (writes only under the target repo)
28
+
29
+ ```sh
30
+ cd "$TARGET_REPO"
31
+ node "$PARALLIX_DIR/px.js" review-event my-slug --type human_note --actor reviewer \
32
+ --content "example note" --skip-git
33
+ ```
34
+
35
+ ## Runnable smoke
36
+
37
+ `run-verify-env-smoke.sh` creates a throwaway target repo with `mktemp -d`,
38
+ runs `verify-env` against it, and cleans up. It takes the parallix directory as
39
+ an optional first argument (defaults to the directory containing this package's
40
+ `px.js`):
41
+
42
+ ```sh
43
+ ./run-verify-env-smoke.sh # uses the bundled px.js
44
+ ./run-verify-env-smoke.sh /path/to/parallix/workflow
45
+ ```
46
+
47
+ ## Enterprise tarball transfer smoke
48
+
49
+ `run-enterprise-tarball-workflow-smoke.sh` proves the enterprise transfer shape:
50
+ it packs `parallix/` with `npm pack` into a throwaway transfer dir, then
51
+ `npm install -g`s the tarball into an **isolated** global prefix (via
52
+ `npm_config_prefix`, so it never touches the machine's real global install) and
53
+ drives a throwaway target repo through `config`, `status`, `draft`, `handoff`,
54
+ and `review-event` using the resulting `px` command. It asserts exactly one `px`
55
+ is installed and that its `px.js` lives in the global prefix — never inside the
56
+ target repo or mission worktree — then cleans up after itself:
57
+
58
+ ```sh
59
+ ./run-enterprise-tarball-workflow-smoke.sh
60
+ ```
61
+
62
+ See `../README.md` for the canonical packaging and install commands.
@@ -0,0 +1,257 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ PACKAGE_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
6
+ PACKAGE_VERSION="$(node -p "require('$PACKAGE_ROOT/package.json').version")"
7
+ SLUG="${1:-task-enterprise-hello}"
8
+ TRANSFER_DIR="$(mktemp -d "${TMPDIR:-/tmp}/px-enterprise-transfer-XXXXXX")"
9
+ RUNTIME_DIR="$(mktemp -d "${TMPDIR:-/tmp}/px-enterprise-runtime-XXXXXX")"
10
+ TARGET_REPO="$(mktemp -d "${TMPDIR:-/tmp}/px-enterprise-target-XXXXXX")"
11
+ REMOTE_REPO="$(mktemp -d "${TMPDIR:-/tmp}/px-enterprise-origin-XXXXXX")"
12
+ FAKE_AGENT_BIN="$(mktemp -d "${TMPDIR:-/tmp}/px-enterprise-agent-bin-XXXXXX")"
13
+ FAKE_AGENT="$FAKE_AGENT_BIN/codex"
14
+
15
+ cleanup() {
16
+ git -C "$TARGET_REPO" worktree remove "../$(basename "$TARGET_REPO")-$SLUG" --force >/dev/null 2>&1 || true
17
+ rm -rf "$TRANSFER_DIR" "$RUNTIME_DIR" "$TARGET_REPO" "$REMOTE_REPO" "$FAKE_AGENT_BIN"
18
+ }
19
+ trap cleanup EXIT
20
+
21
+ chmod 700 "$TRANSFER_DIR" "$RUNTIME_DIR" "$TARGET_REPO" "$REMOTE_REPO" "$FAKE_AGENT_BIN"
22
+
23
+ cat > "$FAKE_AGENT" <<'AGENT'
24
+ #!/usr/bin/env bash
25
+ set -euo pipefail
26
+
27
+ slug="${PX_ENTERPRISE_SMOKE_SLUG:?PX_ENTERPRISE_SMOKE_SLUG is required}"
28
+ year="${PX_ENTERPRISE_SMOKE_YEAR:?PX_ENTERPRISE_SMOKE_YEAR is required}"
29
+ mission_dir="docs/missions/$year/$slug"
30
+ task_file="$(find backlog/tasks -maxdepth 1 -type f -name "*$slug*.md" | head -n 1)"
31
+
32
+ mkdir -p "$mission_dir"
33
+
34
+ if [ -f "$mission_dir/MISSION.md" ]; then
35
+ cat > "$mission_dir/MISSION.md" <<EOF
36
+ # Mission: Hello World parallix Proof ($slug)
37
+
38
+ ## Goal
39
+ Create one hello-world file through the packaged parallix workflow.
40
+
41
+ ## Why Now
42
+ This proves the enterprise tarball can run against a separate target repository.
43
+
44
+ ## Scope
45
+ - Create hello.txt with one tested line.
46
+
47
+ ## Out of Scope
48
+ - Production deploys.
49
+
50
+ ## Success Criteria
51
+ - [ ] hello.txt contains "hello from px enterprise smoke".
52
+
53
+ ## Risks and Assumptions
54
+ - Fake local agent is used only for package smoke proof.
55
+
56
+ ## Checkpoints
57
+ - CP 1: Create hello.txt and record proof.
58
+
59
+ ## Gates
60
+ - [ ] ./scripts/verify-local.sh docs
61
+
62
+ ## Restricted Areas
63
+ - Do not run production deploy scripts.
64
+
65
+ ## Stop Rules
66
+ - Stop if the package runtime is copied into the target repo.
67
+ EOF
68
+ fi
69
+
70
+ if [ -n "$task_file" ]; then
71
+ cat > "$task_file" <<EOF
72
+ ---
73
+ id: ${slug^^}
74
+ title: Hello world package proof
75
+ status: refined
76
+ assignee:
77
+ - codex
78
+ created_date: '2026-06-05 00:00'
79
+ labels:
80
+ - ai_sdlc
81
+ ---
82
+
83
+ ## Description
84
+
85
+ Create a hello-world file through packaged parallix in this example repo.
86
+ EOF
87
+ fi
88
+
89
+ cat > hello.txt <<'EOF'
90
+ hello from px enterprise smoke
91
+ EOF
92
+
93
+ cat > "$mission_dir/CP-1.md" <<'EOF'
94
+ # CP-1: Hello world package proof
95
+
96
+ ## Summary
97
+
98
+ The packaged parallix `px` runner created this checkpoint in a temporary target
99
+ repository while the parallix runtime stayed outside the target repository.
100
+
101
+ ## Goal Check
102
+
103
+ | Goal | Status | Evidence |
104
+ |---|---|---|
105
+ | hello.txt created | DONE | hello.txt contains the expected smoke text. |
106
+
107
+ Next action: handoff the temporary mission for review.
108
+ EOF
109
+ AGENT
110
+ chmod +x "$FAKE_AGENT"
111
+
112
+ git init --bare "$REMOTE_REPO" >/dev/null
113
+ git -C "$TARGET_REPO" init -b main >/dev/null
114
+ git -C "$TARGET_REPO" config user.email "px-enterprise@example.invalid"
115
+ git -C "$TARGET_REPO" config user.name "Px Enterprise Smoke"
116
+ git -C "$TARGET_REPO" remote add origin "$REMOTE_REPO"
117
+
118
+ mkdir -p "$TARGET_REPO/backlog/tasks" "$TARGET_REPO/scripts" "$TARGET_REPO/docs/missions"
119
+ cat > "$TARGET_REPO/backlog/tasks/$SLUG - hello-world.md" <<EOF
120
+ ---
121
+ id: ${SLUG^^}
122
+ title: Hello world package proof
123
+ status: backlog
124
+ assignee: []
125
+ created_date: '2026-06-05 00:00'
126
+ labels:
127
+ - ai_sdlc
128
+ ---
129
+
130
+ ## Description
131
+
132
+ Create a hello-world file through packaged parallix in this example repo.
133
+ EOF
134
+
135
+ cat > "$TARGET_REPO/scripts/verify-local.sh" <<'VERIFY'
136
+ #!/usr/bin/env bash
137
+ set -euo pipefail
138
+ area="${1:-docs}"
139
+ case "$area" in
140
+ docs|all)
141
+ find docs -name '*.md' -print >/dev/null
142
+ ;;
143
+ *)
144
+ ;;
145
+ esac
146
+ exit 0
147
+ VERIFY
148
+ chmod +x "$TARGET_REPO/scripts/verify-local.sh"
149
+
150
+ cat > "$TARGET_REPO/workflow.config.json" <<'CONFIG'
151
+ {
152
+ "product": {
153
+ "name": "Enterprise Px Smoke"
154
+ },
155
+ "adapters": {
156
+ "tasks": { "provider": "backlog-md", "storage": "backlog" },
157
+ "missions": {
158
+ "baseDir": "docs/missions",
159
+ "branchPrefix": "mission/",
160
+ "worktreePattern": "../<repo>-<slug>"
161
+ },
162
+ "verification": {
163
+ "command": "./scripts/verify-local.sh {{area}}",
164
+ "defaultArea": "docs"
165
+ },
166
+ "review": { "provider": "none" },
167
+ "agents": {}
168
+ }
169
+ }
170
+ CONFIG
171
+
172
+ git -C "$TARGET_REPO" add -A
173
+ git -C "$TARGET_REPO" commit -m "example: install backlog hello world ticket" >/dev/null
174
+ git -C "$TARGET_REPO" push -u origin main >/dev/null
175
+
176
+ PACK_JSON="$(npm pack "$PACKAGE_ROOT" --json --pack-destination "$TRANSFER_DIR")"
177
+ TARBALL="$(node -e "const p=JSON.parse(process.argv[1]); console.log(p[0].filename)" "$PACK_JSON")"
178
+ TARBALL_PATH="$TRANSFER_DIR/$TARBALL"
179
+ SHA256="$(sha256sum "$TARBALL_PATH" | awk '{print $1}')"
180
+
181
+ # The enterprise runtime is `npm install -g <tarball>`, which puts a single `px`
182
+ # on PATH and replaces any prior install. RUNTIME_DIR is an isolated global
183
+ # prefix so this smoke never touches the machine's real global install.
184
+ npm_config_prefix="$RUNTIME_DIR" npm install -g "$TARBALL_PATH" >/dev/null 2>&1
185
+ export PATH="$FAKE_AGENT_BIN:$RUNTIME_DIR/bin:$PATH"
186
+
187
+ VERSION_OUTPUT="$(px --version)"
188
+
189
+ (
190
+ export PX_ENTERPRISE_SMOKE_SLUG="$SLUG"
191
+ export PX_ENTERPRISE_SMOKE_YEAR="2026"
192
+ export WORKFLOW_AGENT="codex"
193
+ cd "$TARGET_REPO"
194
+ px config >/dev/null
195
+ px status "$SLUG" >/dev/null
196
+ px draft "$SLUG" >/dev/null
197
+ )
198
+
199
+ MISSION_WORKTREE="$(dirname "$TARGET_REPO")/$(basename "$TARGET_REPO")-$SLUG"
200
+
201
+ (
202
+ export PX_ENTERPRISE_SMOKE_SLUG="$SLUG"
203
+ export PX_ENTERPRISE_SMOKE_YEAR="2026"
204
+ export WORKFLOW_AGENT="codex"
205
+ cd "$MISSION_WORKTREE"
206
+ px handoff "$SLUG" --no-gate >/dev/null
207
+ )
208
+
209
+ (
210
+ cd "$MISSION_WORKTREE"
211
+ px review-event "$SLUG" \
212
+ --type human_note \
213
+ --actor px-enterprise-smoke \
214
+ --content "packaged px enterprise smoke completed" \
215
+ --timestamp "2026-06-05T120000" \
216
+ --skip-git >/dev/null
217
+ )
218
+
219
+ test -f "$MISSION_WORKTREE/hello.txt"
220
+ grep -q "hello from px enterprise smoke" "$MISSION_WORKTREE/hello.txt"
221
+ test -f "$MISSION_WORKTREE/docs/missions/2026/$SLUG/CP-1.md"
222
+ test -f "$MISSION_WORKTREE/docs/missions/2026/$SLUG/review-events/2026-06-05T120000-human_note-1-px-enterprise-smoke.md"
223
+ test ! -d "$TARGET_REPO/parallix"
224
+ test ! -d "$MISSION_WORKTREE/parallix"
225
+ grep -q "parallix $PACKAGE_VERSION" <<<"$VERSION_OUTPUT"
226
+
227
+ # Exactly one px must be installed in the global prefix, and its px.js must live
228
+ # there -- never inside the target repo or mission worktree. This is the single
229
+ # runtime + runtime/target boundary assertion.
230
+ INSTALL_COUNT="$(find "$RUNTIME_DIR/lib/node_modules" -maxdepth 1 -name parallix -type d | wc -l)"
231
+ test "$INSTALL_COUNT" -eq 1 || { echo "FAIL: expected exactly one px install, found $INSTALL_COUNT" >&2; exit 1; }
232
+
233
+ PX_JS="$(sed -n 's/^px: //p' <<<"$VERSION_OUTPUT")"
234
+ test -n "$PX_JS"
235
+ grep -q "node_modules/parallix/px.js" <<<"$PX_JS"
236
+ case "$PX_JS" in
237
+ "$RUNTIME_DIR"/*) : ;; # expected: under the global prefix
238
+ "$TARGET_REPO"/*|"$MISSION_WORKTREE"/*)
239
+ echo "FAIL: px.js resolved inside target/worktree: $PX_JS" >&2
240
+ exit 1
241
+ ;;
242
+ *)
243
+ echo "FAIL: px.js resolved outside the global prefix: $PX_JS" >&2
244
+ exit 1
245
+ ;;
246
+ esac
247
+
248
+ cat <<EOF
249
+ PASS enterprise tarball workflow smoke
250
+ transfer_dir=$TRANSFER_DIR
251
+ target_repo=$TARGET_REPO
252
+ mission_worktree=$MISSION_WORKTREE
253
+ tarball=$TARBALL_PATH
254
+ px_js=$PX_JS
255
+ sha256=$SHA256
256
+ version=$(head -n 1 <<<"$VERSION_OUTPUT")
257
+ EOF