@magnusekdahl/parallix 1.3.4 → 1.5.126

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 (227) hide show
  1. package/NOTICES +1423 -0
  2. package/README.md +76 -103
  3. package/build/asset-manifest.json +129 -0
  4. package/{config → build/config}/agents.json +4 -8
  5. package/build/manifest.sha256 +40 -0
  6. package/build/migrations/0001-initial-schema.sql +91 -0
  7. package/build/migrations/0002-import-history.sql +16 -0
  8. package/build/migrations/0003-board-lane-events.sql +72 -0
  9. package/build/migrations/0004-mission-aggregate.sql +151 -0
  10. package/build/migrations/0005-mission-external-task-ref.sql +18 -0
  11. package/build/migrations/0005-repository-scoped-session-markers.sql +47 -0
  12. package/build/migrations/0006-session-markers.sql +35 -0
  13. package/build/migrations/0007-usage-statistics-identity.sql +60 -0
  14. package/build/migrations/0008-review-workflow-state.sql +61 -0
  15. package/build/migrations/0009-review-gate-retries.sql +16 -0
  16. package/build/migrations/0010-review-events-and-implementer-response.sql +64 -0
  17. package/build/migrations/0011-board-lane-events-repository-id.sql +89 -0
  18. package/build/migrations/0012-review-hook-retries.sql +11 -0
  19. package/build/migrations/0013-usage-statistics-thoughts-tokens.sql +11 -0
  20. package/build/migrations/0014-remove-usage-closed.sql +33 -0
  21. package/build/migrations/0015-current-work-latest-per-mission.sql +5 -0
  22. package/build/migrations/0016-review-drop-retry-counters.sql +21 -0
  23. package/build/migrations/0017-retire-mission-import-provenance.sql +5 -0
  24. package/build/migrations/0018-adhoc-mission-counter.sql +19 -0
  25. package/build/migrations/0019-custom-agent-leases.sql +12 -0
  26. package/build/package.json +5 -0
  27. package/{prompts/act-on-review.md → build/prompts/act-on-review-core.md} +6 -4
  28. package/build/prompts/act-on-review.md +1 -0
  29. package/{prompts/draft.md → build/prompts/draft-core.md} +8 -1
  30. package/build/prompts/execute-core.md +37 -0
  31. package/build/prompts/execute.md +0 -0
  32. package/build/prompts/review-core.md +71 -0
  33. package/build/prompts/review.md +0 -0
  34. package/build/px.mjs +1226 -0
  35. package/build/px.mjs.map +7 -0
  36. package/build/sbom.json +2155 -0
  37. package/build/templates/mission-scaffold.md +61 -0
  38. package/build/web/assets/index-B8Hv3ORh.js +9 -0
  39. package/build/web/assets/index-DYY4ROtr.css +1 -0
  40. package/build/web/index.html +13 -0
  41. package/build/web/manifest.json +20 -0
  42. package/package.json +56 -30
  43. package/CHANGELOG.md +0 -140
  44. package/config/agents.local.json.template +0 -8
  45. package/config/integration-pipelines.json +0 -14
  46. package/config/state-map.json.template +0 -31
  47. package/config/workflow.config.schema.json +0 -110
  48. package/docs/adr/0031-ai-agent-instruction-boundary-and-command-floor.md +0 -114
  49. package/docs/adr/0032-mission-refinement-state-and-usage-budget-signals.md +0 -137
  50. package/docs/adr/0034-module-and-skill-invocation-model.md +0 -202
  51. package/docs/adr/0036-mission-sizing-and-dependency-wave-heuristics.md +0 -81
  52. package/docs/adr/0037-ai-workflow-coordination-architecture.md +0 -162
  53. package/docs/adr/0041-integration-pipeline-gates.md +0 -165
  54. package/docs/adr/0042-workflow-cli-color-rendering-approach.md +0 -106
  55. package/docs/adr/0043-git-target-resolution-strategy.md +0 -185
  56. package/docs/adr/0044-workflow-distribution-model.md +0 -277
  57. package/docs/adr/0045-parallax-branch-model.md +0 -182
  58. package/docs/adr/0046-npm-publish-process-and-security.md +0 -138
  59. package/docs/adr/0047-per-mission-change-size-budget.md +0 -161
  60. package/docs/adr/0048-fail-closed-harness-defense-against-agent-hallucinations.md +0 -161
  61. package/docs/adr/index.md +0 -23
  62. package/docs/agents.md +0 -212
  63. package/docs/authority-reference.md +0 -328
  64. package/docs/doc-standards.md +0 -89
  65. package/docs/forgejo-setup.md +0 -55
  66. package/docs/migration/extraction.md +0 -61
  67. package/docs/migration/task-classification.md +0 -36
  68. package/docs/operator-setup.md +0 -76
  69. package/docs/readme-rewrite-benchmark.md +0 -188
  70. package/docs/use-cases.md +0 -149
  71. package/examples/README.md +0 -62
  72. package/examples/run-enterprise-tarball-workflow-smoke.sh +0 -257
  73. package/examples/run-verify-env-smoke.sh +0 -40
  74. package/index.js +0 -262
  75. package/lib/README.md +0 -13
  76. package/lib/agents/agents.js +0 -880
  77. package/lib/agents/agents.ts +0 -978
  78. package/lib/agents/claude-telemetry.js +0 -232
  79. package/lib/agents/claude-telemetry.ts +0 -233
  80. package/lib/agents/claude.js +0 -152
  81. package/lib/agents/claude.ts +0 -158
  82. package/lib/agents/codex-telemetry.js +0 -227
  83. package/lib/agents/codex-telemetry.ts +0 -205
  84. package/lib/agents/codex.js +0 -213
  85. package/lib/agents/codex.ts +0 -238
  86. package/lib/agents/limit-hit.js +0 -259
  87. package/lib/agents/limit-hit.ts +0 -262
  88. package/lib/agents/mistral-telemetry.js +0 -140
  89. package/lib/agents/mistral-telemetry.ts +0 -159
  90. package/lib/agents/mistral.js +0 -174
  91. package/lib/agents/mistral.ts +0 -224
  92. package/lib/agents/opencode-export.js +0 -158
  93. package/lib/agents/opencode-export.ts +0 -160
  94. package/lib/agents/opencode-telemetry.js +0 -372
  95. package/lib/agents/opencode-telemetry.ts +0 -350
  96. package/lib/agents/opencode.js +0 -355
  97. package/lib/agents/opencode.ts +0 -372
  98. package/lib/agents/stage-telemetry.js +0 -41
  99. package/lib/agents/stage-telemetry.ts +0 -47
  100. package/lib/commands/active.js +0 -642
  101. package/lib/commands/active.ts +0 -707
  102. package/lib/commands/checkpoint.js +0 -102
  103. package/lib/commands/checkpoint.ts +0 -79
  104. package/lib/commands/config.js +0 -76
  105. package/lib/commands/config.ts +0 -52
  106. package/lib/commands/coverage-gate.js +0 -408
  107. package/lib/commands/coverage-gate.ts +0 -367
  108. package/lib/commands/diff.js +0 -151
  109. package/lib/commands/diff.ts +0 -130
  110. package/lib/commands/draft.js +0 -920
  111. package/lib/commands/draft.ts +0 -1026
  112. package/lib/commands/handoff.js +0 -685
  113. package/lib/commands/handoff.ts +0 -705
  114. package/lib/commands/integrate.js +0 -1612
  115. package/lib/commands/integrate.ts +0 -1724
  116. package/lib/commands/mission-start.js +0 -313
  117. package/lib/commands/mission-start.ts +0 -268
  118. package/lib/commands/rebase.js +0 -667
  119. package/lib/commands/rebase.ts +0 -639
  120. package/lib/commands/repair-handoff.js +0 -363
  121. package/lib/commands/repair-handoff.ts +0 -373
  122. package/lib/commands/resolve-conflict.js +0 -137
  123. package/lib/commands/resolve-conflict.ts +0 -117
  124. package/lib/commands/review.js +0 -18
  125. package/lib/commands/review.ts +0 -19
  126. package/lib/commands/setup-review.js +0 -18
  127. package/lib/commands/setup-review.ts +0 -19
  128. package/lib/commands/setup.js +0 -9
  129. package/lib/commands/setup.ts +0 -7
  130. package/lib/commands/stats-backfill.js +0 -448
  131. package/lib/commands/stats-backfill.ts +0 -423
  132. package/lib/commands/stats.js +0 -2016
  133. package/lib/commands/stats.ts +0 -2135
  134. package/lib/commands/status.js +0 -246
  135. package/lib/commands/status.ts +0 -224
  136. package/lib/commands/verify.js +0 -12
  137. package/lib/commands/verify.ts +0 -7
  138. package/lib/core/fmt.js +0 -178
  139. package/lib/core/fmt.ts +0 -189
  140. package/lib/core/git.js +0 -140
  141. package/lib/core/git.ts +0 -146
  142. package/lib/core/gitignore.js +0 -73
  143. package/lib/core/gitignore.ts +0 -108
  144. package/lib/core/mission-utils.js +0 -1058
  145. package/lib/core/mission-utils.ts +0 -998
  146. package/lib/core/nels.js +0 -184
  147. package/lib/core/nels.ts +0 -189
  148. package/lib/core/persistent-data-migration.js +0 -285
  149. package/lib/core/persistent-data-migration.ts +0 -257
  150. package/lib/core/product-config.js +0 -460
  151. package/lib/core/product-config.ts +0 -518
  152. package/lib/core/runtime-matrix.js +0 -49
  153. package/lib/core/runtime-matrix.ts +0 -84
  154. package/lib/core/spawn-tee.js +0 -160
  155. package/lib/core/spawn-tee.ts +0 -202
  156. package/lib/core/state-map.js +0 -108
  157. package/lib/core/state-map.ts +0 -115
  158. package/lib/core/storage.js +0 -151
  159. package/lib/core/storage.ts +0 -182
  160. package/lib/core/subagent-limit.js +0 -27
  161. package/lib/core/subagent-limit.ts +0 -25
  162. package/lib/core/verification.js +0 -176
  163. package/lib/core/verification.ts +0 -200
  164. package/lib/index.js +0 -160
  165. package/lib/index.ts +0 -134
  166. package/lib/review/rebase.js +0 -168
  167. package/lib/review/rebase.ts +0 -188
  168. package/lib/review/review-adapter.js +0 -234
  169. package/lib/review/review-adapter.ts +0 -198
  170. package/lib/review/review-artifacts.js +0 -542
  171. package/lib/review/review-artifacts.ts +0 -622
  172. package/lib/review/review-commands.js +0 -1318
  173. package/lib/review/review-commands.ts +0 -1579
  174. package/lib/review/review-events.js +0 -716
  175. package/lib/review/review-events.ts +0 -954
  176. package/lib/review/review-loop.js +0 -1271
  177. package/lib/review/review-loop.ts +0 -1493
  178. package/lib/review/review-polling.js +0 -132
  179. package/lib/review/review-polling.ts +0 -194
  180. package/lib/review/review-prompts.js +0 -212
  181. package/lib/review/review-prompts.ts +0 -186
  182. package/lib/review/review-state.js +0 -325
  183. package/lib/review/review-state.ts +0 -353
  184. package/lib/review/review.js +0 -126
  185. package/lib/review/review.ts +0 -143
  186. package/lib/tools/backlog.js +0 -848
  187. package/lib/tools/backlog.ts +0 -835
  188. package/lib/tools/forgejo.js +0 -1659
  189. package/lib/tools/forgejo.ts +0 -1793
  190. package/lib/tools/gatekeeper.js +0 -134
  191. package/lib/tools/gatekeeper.ts +0 -124
  192. package/lib/tools/redgreen.js +0 -239
  193. package/lib/tools/redgreen.ts +0 -221
  194. package/lib/tools/sessions.js +0 -87
  195. package/lib/tools/sessions.ts +0 -81
  196. package/lib/tools/setup-review.js +0 -1083
  197. package/lib/tools/setup-review.ts +0 -1152
  198. package/prompts/act-on-review-verbose.md +0 -20
  199. package/prompts/execute.md +0 -24
  200. package/prompts/portfolio.md +0 -30
  201. package/prompts/review-verbose.md +0 -36
  202. package/prompts/review.md +0 -50
  203. package/px.js +0 -268
  204. package/templates/AGENTS-snippet.md +0 -14
  205. package/templates/AGENTS.md.template +0 -34
  206. package/templates/CLAUDE.md.template +0 -27
  207. package/templates/CODEX.md.template +0 -38
  208. package/templates/MISTRAL.md.template +0 -24
  209. package/templates/claude-commands/act-on-review.md +0 -3
  210. package/templates/claude-commands/area-review.md +0 -3
  211. package/templates/claude-commands/draft.md +0 -6
  212. package/templates/claude-commands/execute.md +0 -6
  213. package/templates/claude-commands/integrate.md +0 -4
  214. package/templates/claude-commands/portfolio.md +0 -5
  215. package/templates/claude-commands/review.md +0 -4
  216. package/templates/codex/config.toml +0 -6
  217. package/templates/mission-scaffold.md +0 -39
  218. package/templates/vibe/skills/act-on-review/SKILL.md +0 -16
  219. package/templates/vibe/skills/area-review/SKILL.md +0 -16
  220. package/templates/vibe/skills/draft/SKILL.md +0 -16
  221. package/templates/vibe/skills/execute/SKILL.md +0 -16
  222. package/templates/vibe/skills/integrate/SKILL.md +0 -16
  223. package/templates/vibe/skills/portfolio/SKILL.md +0 -21
  224. package/templates/vibe/skills/review/SKILL.md +0 -16
  225. package/tools/setup-forgejo-docker.sh +0 -87
  226. /package/{config → build/config}/state-map.json +0 -0
  227. /package/{data/.gitkeep → build/prompts/draft.md} +0 -0
@@ -0,0 +1,33 @@
1
+ -- 0014-remove-usage-closed
2
+ -- Preserve non-empty historical completion markers only for the task-2367
3
+ -- one-off repair boundary, then remove the competing telemetry contract.
4
+ CREATE TABLE legacy_usage_completion_evidence (
5
+ usage_id INTEGER PRIMARY KEY,
6
+ repo TEXT NOT NULL,
7
+ mission TEXT NOT NULL,
8
+ closed TEXT NOT NULL
9
+ );
10
+ INSERT INTO legacy_usage_completion_evidence (usage_id, repo, mission, closed)
11
+ SELECT id, repo, mission, closed FROM usage_statistics
12
+ WHERE closed IS NOT NULL AND trim(closed) <> '';
13
+
14
+ CREATE TABLE usage_statistics_next (
15
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
16
+ date TEXT, repo TEXT NOT NULL DEFAULT '', mission TEXT NOT NULL DEFAULT '',
17
+ classification TEXT, implementer TEXT, pr_fix_rounds INTEGER, provider TEXT,
18
+ model TEXT, implementer_agent TEXT, reviewer_agent TEXT, stage TEXT DEFAULT 'default',
19
+ input_tokens INTEGER, output_tokens INTEGER, cached_tokens INTEGER,
20
+ context_tokens INTEGER, tool_calls INTEGER, openai_usage_before REAL,
21
+ openai_usage_after REAL, openai_usage_delta REAL, duration_minutes REAL,
22
+ cost_usd REAL, actor_key TEXT NOT NULL DEFAULT '', thoughts_tokens INTEGER
23
+ );
24
+ INSERT INTO usage_statistics_next SELECT id, date, repo, mission, classification,
25
+ implementer, pr_fix_rounds, provider, model, implementer_agent, reviewer_agent,
26
+ stage, input_tokens, output_tokens, cached_tokens, context_tokens, tool_calls,
27
+ openai_usage_before, openai_usage_after, openai_usage_delta, duration_minutes,
28
+ cost_usd, actor_key, thoughts_tokens FROM usage_statistics;
29
+ DROP TABLE usage_statistics;
30
+ ALTER TABLE usage_statistics_next RENAME TO usage_statistics;
31
+ CREATE INDEX idx_usage_statistics_mission ON usage_statistics(repo, mission, stage);
32
+ CREATE INDEX idx_usage_statistics_date ON usage_statistics(date);
33
+ CREATE UNIQUE INDEX idx_usage_statistics_identity ON usage_statistics(repo, mission, stage, actor_key);
@@ -0,0 +1,5 @@
1
+ -- 0015-current-work-latest-per-mission
2
+ -- Serves SqliteOperationalHistoryRepository.findLatestByTypePerMission(), the
3
+ -- board's bounded `mission.current-work` read.
4
+ CREATE INDEX IF NOT EXISTS idx_operational_history_current_work_mission_id
5
+ ON operational_history(event_type, json_extract(event_data, '$.missionId'), id DESC);
@@ -0,0 +1,21 @@
1
+ -- TASK-2377.04: drop the persisted review-level retry counters.
2
+ --
3
+ -- Migrations 0009 and 0012 added `gate_failure_retry_count` and
4
+ -- `hook_failure_retry_count` to carry the cumulative auto-bounce budgets of
5
+ -- the pre-kernel gate/hook bounces. The review loop now routes every
6
+ -- pre-review bounce through the rebound kernel, whose budget is per local
7
+ -- failure, in-memory, and persists nothing (ADR 0053: the kernel budget is
8
+ -- the only retry state that exists). The two columns are dead weight — a
9
+ -- second source of truth for a budget that no longer steers loop behavior —
10
+ -- and this forward-only migration drops them.
11
+ --
12
+ -- The per-round `mission_review_rounds.reviewer_retry_count` /
13
+ -- `implementer_retry_count` columns (0008) stay: ADR 0053 describes the
14
+ -- retry counters as round columns and historical values round-trip
15
+ -- unchanged.
16
+ --
17
+ -- The pre-review safety commit still records its hook identity for the
18
+ -- in-process rebase; nothing reads these columns after this migration.
19
+
20
+ ALTER TABLE mission_reviews DROP COLUMN gate_failure_retry_count;
21
+ ALTER TABLE mission_reviews DROP COLUMN hook_failure_retry_count;
@@ -0,0 +1,5 @@
1
+ -- Migration: 0017-retire-mission-import-provenance
2
+ -- Description: Remove the retired Mission compatibility import version snapshot.
3
+ -- Authority: operator-local only
4
+
5
+ DROP TABLE IF EXISTS import_mission_versions;
@@ -0,0 +1,19 @@
1
+ -- Migration: 0018-adhoc-mission-counter
2
+ -- DB-owned, repository-scoped identity for free-text adhoc intakes (task-2468).
3
+ --
4
+ -- Backlog-backed missions keep their identity in a Backlog task file. Adhoc
5
+ -- missions have no such file in an adhoc-only repository, so their identity is
6
+ -- minted here instead: a monotonic counter owned per repository, allocated
7
+ -- atomically, so `parallix-adhoc-<NNNN>` can never collide with, or be confused
8
+ -- for, Backlog.md task numbering. No content hash in the identity: slug,
9
+ -- mission id, branch, and worktree suffix all derive from this counter.
10
+ --
11
+ -- The counter row is intentionally sparse — only repository identity and the
12
+ -- last allocated number — because the adhoc identity is fully derivable from
13
+ -- it. It carries no status, assignee, or lifecycle column: a second lifecycle
14
+ -- authority must not be reachable by adding columns here.
15
+
16
+ CREATE TABLE IF NOT EXISTS adhoc_mission_counters (
17
+ repository_id TEXT PRIMARY KEY,
18
+ counter INTEGER NOT NULL DEFAULT 0 CHECK (counter >= 0)
19
+ );
@@ -0,0 +1,12 @@
1
+ -- Machine-scoped custom-agent admission leases (TASK-2475).
2
+ CREATE TABLE IF NOT EXISTS custom_agent_leases (
3
+ lease_id TEXT PRIMARY KEY,
4
+ repository_root TEXT NOT NULL,
5
+ capacity INTEGER,
6
+ launcher_pid INTEGER NOT NULL,
7
+ launcher_start_id TEXT,
8
+ child_pid INTEGER,
9
+ child_start_id TEXT,
10
+ created_at TEXT NOT NULL
11
+ );
12
+ CREATE INDEX IF NOT EXISTS custom_agent_leases_live ON custom_agent_leases(child_pid, launcher_pid);
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "@magnusekdahl/parallix",
3
+ "version": "1.5.126",
4
+ "type": "module"
5
+ }
@@ -1,3 +1,4 @@
1
+ # Act-on-review core
1
2
  Mode: act-on-review. Branch: {{branch}}.
2
3
  Mission: {{missionPath}}
3
4
 
@@ -8,15 +9,16 @@ Latest reviewer outcome was: {{review_outcome}}
8
9
  Entrypoint: {{act_on_review_entrypoint}}
9
10
 
10
11
  Minimum loop contract:
12
+ - Before acting on findings, compact the implementation context and reload the locked mission goal and scope; committed checkpoint or gate evidence when present; current review round and disposition; unresolved findings and implementer resolutions; and the exact revision under review. This requirement applies even when `MISSION.md` declares no gates.
11
13
  - Load the locked mission at `{{missionPath}}` and `AGENTS.md` before acting.
12
- - Read the review outcome and findings from `missions/{{slug}}/review-events/` — the latest `reviewer_outcome-*` file has the verdict and `reviewer_findings-*` has the findings. Alternatively, read `missions/{{slug}}/review-state.json` for the current round/phase/disposition.
14
+ - Read the review outcome and findings from `missions/{{slug}}/review-events/` — the latest `reviewer_outcome-*` file has the verdict and `reviewer_findings-*` has the findings.
15
+ - Get the current round, phase, and disposition from `px status {{slug}}`, which reports them on its `Review:` line. That line is projected from the operator database, which is the authority for review-loop state. Do not read `review-state.json` to learn the round or phase; it is a compatibility artifact, not the source of truth, and it may lag the database.
13
16
  - For each finding: fix, push back (with a clear reason), or park (record in a tracked follow-up such as a Backlog task).
17
+ - If a finding is a rebasing artifact caused by branch stale-ness rather than this mission's diff, push back with the rationale: `Not a mission change - will be resolved by parallix rebase.`
14
18
  - Update the checkpoint document if needed, run the relevant gate, and commit before handoff.
15
19
  - Write `{{artifactDir}}/{{slug}}-round-resolution.md` with `fixed_items`, `pushed_back_items`, `parked_items`, and `blocked_reason` (when blocked).
16
- - Write `{{artifactDir}}/{{slug}}-review-disposition.txt` with one of `CHANGES_MADE|PUSHBACK_ALL|PARKED|BLOCKED`.
20
+ - Write `{{artifactDir}}/{{slug}}-review-disposition.txt` with one of `CHANGES_MADE|PUSHBACK_ALL|PARKED|BLOCKED`. `PUSHBACK_ALL` records your response to every remaining finding and sends the mission back to the active reviewer for the next formal decision; it is not an approval.
17
21
  - Do not post to Forgejo directly; the workflow loop consumes the artifacts.
18
22
  - In standalone mode (no Forgejo), the review loop reads your artifacts directly — no CLI commands needed.
19
23
 
20
24
  Safety: If {{review_outcome}} is not approved AND you cannot read the review outcome, DO NOT post PUSHBACK_ALL. Post BLOCKED instead.
21
-
22
- Graphify-first: before acting on findings, check if `graphify-out/graph.json` exists. If it does, use `graphify query` and `graphify path` to understand affected code areas before making changes. Run `graphify update .` after modifying code.
@@ -0,0 +1 @@
1
+ Graphify-first: before acting on findings, check if `graphify-out/graph.json` exists. If it does, use `graphify query` and `graphify path` to understand affected code areas before making changes. Run `graphify update .` after modifying code.
@@ -1,3 +1,4 @@
1
+ # Draft core
1
2
  Mode: draft. Do not implement the mission — produce the mission contract document only.
2
3
  Mission slug: {{slug}}
3
4
  Mission path: {{missionPath}}
@@ -25,11 +26,17 @@ Drafting requirements:
25
26
  - preserve `{{taskPath}}`: update content as needed but do not delete, rename, or move the file
26
27
  - do not edit the backlog `assignee` field; the workflow records ownership itself
27
28
  - Refinement Signals section must use net engineering lines (NEL) bucket format (`Predicted NEL bucket: Small (0–80) / Medium (81–235) / Large (235+)`) and must NOT use the old agent-percentage-usage format
29
+ - Every generated `MISSION.md` MUST keep the scaffolded `### Checkpoint Documentation Requirements` block under `## Checkpoints` and fill it with concrete instructions for the implementer.
30
+ - That block must tell the agent to use the exact heading `## Goal Check` and the 3-column table `| Criterion | Evidence | Status |`.
31
+ - That block must lead with durable evidence forms Parallix verifies today: exact test names, ADR references, test file paths, and recognized repo commands/paths such as backticked `npm ...`, `node ...`, `git ...`, `px ...`, or `./...`. It may mention file:line references parenthetically as accepted but discouraged because line numbers rot.
32
+ - That block must make the weak-agent failure mode explicit: raw `stat`/`ls` output or generic prose alone is not enough; pair shell output with one of the accepted references above.
33
+ - Every `## Gates` checklist item must contain only the exact runnable repository command (for example, `- [ ] ./scripts/verify-local.sh all`). Optional Markdown backticks around the whole command are allowed.
34
+ - Never append outcome or explanatory prose to a gate command, including phrases such as "passes on the final tree". Put outcome expectations in Success Criteria or checkpoint documentation instead.
28
35
 
29
36
  Bug-labeled missions (regression-test-first / "lock the bug"):
30
37
  - this section applies only when the backlog task at `{{taskPath}}` carries a `bug` label (in addition to its `ai_sdlc` or `user_value` classification). If there is no `bug` label, ignore this section entirely.
31
38
  - make the **first checkpoint** the authoring of a failing reproduction test that locks the bug before any fix is written. Describe in that checkpoint: the test file location (under `test/`), the reproduction scenario, and the assertion that fails at the mission's parent commit (red) and will pass once the fix lands (green).
32
- - record the reproduction test's path in `{{missionPath}}` on its own line in the exact form `Reproduction-Test: <path>` (e.g. `Reproduction-Test: test/task-1354-repro.test.js`). The handoff red→green gate reads this line to locate the test, so it must be present and accurate.
39
+ - record the reproduction test's path in `{{missionPath}}` on its own line in the exact form `Reproduction-Test: <path>` (e.g. `Reproduction-Test: test/task-1354-repro.test.ts`). The handoff red→green gate reads this line to locate the test, so it must be present and accurate.
33
40
  - do not author the fix during draft — the reproduction test and its `Reproduction-Test:` declaration are the only bug-specific drafting outputs.
34
41
 
35
42
  Graphify-first: before drafting, check if `graphify-out/graph.json` exists. If it does, run `graphify query "{{slug}} mission scope and dependencies"` to understand the codebase context before filling in the mission contract. After drafting, run `graphify update .` if you modified any code files.
@@ -0,0 +1,37 @@
1
+ # Execute core
2
+ Mode: execute after lock.
3
+ Mission: {{missionPath}}
4
+ Mission dir: {{missionDir}}
5
+ Slug: {{slug}}
6
+ Backlog task: {{taskPath}}
7
+
8
+ Harness preflight already confirmed:
9
+ - branch/worktree shape
10
+ - mission doc presence
11
+ - Backlog task presence
12
+
13
+ Execution requirements:
14
+ - execute checkpoint-by-checkpoint per the contract in `{{missionPath}}`
15
+ - after each completed checkpoint, write `CP-N.md` in `{{missionDir}}` containing: a summary of work done, a Goal Check table with durable evidence such as runnable project commands, test names, decision-record references, or test paths, and a non-generic `Next action:` line
16
+ - Completing a checkpoint is **non-terminal**: after committing its `CP-N.md`, immediately continue to the next incomplete checkpoint declared in the mission. Do not send a final response or exit merely because one checkpoint is complete; break large checkpoints into safe slices and keep progressing.
17
+ - You may terminate this execution only when exactly one of these conditions applies: (a) every declared checkpoint is committed and every mission-declared gate passes, (b) a mission stop rule applies, or (c) a genuine external dependency blocks progress. Checkpoint size, uncertainty, or needing further investigation are not terminal conditions.
18
+ - Keep Goal Check evidence durable: prefer stable file references and commands that can be rerun against the committed tree. Do not claim that `git diff HEAD` proves a committed change—its expected output is empty after committing. If historical diff evidence is needed, state the exact non-HEAD baseline or describe the observed change without implying that an empty post-commit diff will reproduce it.
19
+ - the final checkpoint document MUST contain a Goal Check table citing real, durable evidence such as runnable project commands, test names, decision-record references, or test paths
20
+ - **Heading requirement:** Use the exact section header `## Goal Check`.
21
+ - **Goal Check table format:** Use a 3-column pipe-delimited markdown table: `| Criterion | Evidence | Status |` followed by a separator row `|---|---|---|`, then one evidence row per criterion.
22
+ - **Accepted evidence forms** (each row's Evidence column must cite at least one verifiable reference from this list):
23
+ 1. **Runnable project commands or stable paths** — e.g., `` `make test` ``, `` `go test ./...` ``, or `` `tests/integration/` ``
24
+ 2. **Test names** — e.g., `"saving a record preserves its identifier"` (must match a test name found in the project)
25
+ 3. **Decision-record references** — e.g., `ADR 0048` (when the project uses ADRs or an equivalent decision record)
26
+ 4. **Test paths** — e.g., `tests/integration/` (must be an existing test path)
27
+ 5. **File:line references** — accepted when needed, but line numbers eventually rot; prefer the forms above
28
+ - **Not sufficient by themselves:** raw `stat`/`ls` output or generic prose claims. You may include them as supporting context, but the same Evidence cell must also cite at least one accepted reference from the list above.
29
+ - verify all mission-declared Gates pass before handoff
30
+ - Immediately after **each successful mission-declared Gate**, compact your working context before starting the next gate, checkpoint work, or handoff work. Reload only the locked mission goal and scope plus committed checkpoint or successful-gate evidence that is present. Do not compact for a failed gate: retain its failure diagnostic while repairing it.
31
+ - preserve `{{taskPath}}`: update mission-relevant content as needed but do not delete, rename, or move the file
32
+ - do not change the Backlog task's status, assignee, labels, or lifecycle metadata, and do not run `px active`, `px review`, or `px integrate`; Parallix performs lifecycle transitions itself
33
+ - do not hand off to review if `{{missionPath}}` or checkpoint documents are uncommitted
34
+
35
+ Graphify-first: before executing, check if `graphify-out/graph.json` exists. If it does, use `graphify query "<question>"` for codebase questions, `graphify path "<A>" "<B>"` for relationships, and `graphify explain "<concept>"` for focused concepts. Read `graphify-out/GRAPH_REPORT.md` only for broad architecture review. Run `graphify update .` after modifying code. If `graphify-out/wiki/index.md` exists, use it for broad navigation.
36
+
37
+ {{checkpoint_context}}
File without changes
@@ -0,0 +1,71 @@
1
+ # Review core
2
+ Mode: review. No code changes, commits, repo-state edits, or implementer behavior.
3
+ Mission: {{missionPath}}
4
+ Attempt: {{attempt}}. Focus: {{focus}}.
5
+ Entrypoint: {{review_entrypoint}}
6
+
7
+ Load before reviewing:
8
+ - `AGENTS.md`
9
+ - locked mission at `{{missionPath}}`
10
+ - final checkpoint document, if present
11
+ - diff: `git diff {{reviewBaseline}}..HEAD`
12
+ - review history: `px status {{slug}}`, whose `Review:` block reports the current round, phase, and disposition, then each recorded round with its reviewer and implementer families, verdict, comment, findings, fixes, and pushbacks. This is projected from the operator database, not from your own context.
13
+
14
+ Review history is not optional context:
15
+ - You may not be the agent family that reviewed the previous round. When a family is usage-blocked the workflow reroutes the launch, so the round-1 reviewer's context is simply gone. `px status {{slug}}` is how that continuity is preserved.
16
+ - Do not re-raise a finding a previous round already settled. If the implementer fixed it, verify the fix instead of restating the finding. If the implementer pushed back, engage with their rationale — accept it, or explain specifically why it does not hold.
17
+ - Treat a `PUSHBACK_ALL` in the history as a response awaiting your decision, not as an approval and not as a fresh set of findings.
18
+
19
+ Minimum loop contract:
20
+ - When `{{attempt}}` is 2 or later, before beginning this review round compact the prior-round working context. Reload the locked mission goal and scope; committed checkpoint or gate evidence when present; current round and disposition; unresolved findings and implementer resolutions; and the exact post-rebase revision and review baseline shown by `git diff {{reviewBaseline}}..HEAD`. This review-loop compaction is independent of `MISSION.md` gates.
21
+ - Load the locked mission at `{{missionPath}}` and `AGENTS.md` before reviewing.
22
+ - The block below reports which controls the workflow has already executed for this mission and which it has not, derived from machine records rather than from anyone's prose. Do not re-run a listed command whose recorded status is `passed`; cite the recorded result from this block instead. Re-running is permitted only when the block reports no recorded gate result, reports a `failed` status, reports a control as not yet run, or the command you need is not listed here.
23
+ {{completedControls}}
24
+ - Do not invoke `px` yourself, with one exception: `px status {{slug}}` is read-only and is the required way to load review history. Never run any other `px` subcommand.
25
+ - Review as an independent senior engineer. Approve only if the mission is satisfied, verification is credible for the risk level, and the diff is safe to integrate.
26
+ - Request changes for actionable issues introduced or materially worsened by this mission.
27
+ - Findings must be grounded in `git diff {{reviewBaseline}}..HEAD`, mission/checkpoint evidence, or inability to identify the reviewed revision.
28
+ - PR metadata, commit ancestry, and historical commits outside `git diff {{reviewBaseline}}..HEAD` are context only. They must not produce a mission finding, request-changes verdict, or workflow block unless the mission introduced or materially worsened the inconsistency, or the review surface cannot identify the exact reviewed revision.
29
+ - Confirm the final checkpoint document in the mission directory contains a Goal Check table citing real, durable evidence such as backticked commands, test names, ADR references, or test file paths.
30
+ - Treat checkpoint evidence as a record of the work at the time it was performed. A command such as `git diff HEAD` is expected to be empty after a checkpoint is committed; that alone is not a finding. Flag evidence only when it is materially false, unverifiable from the committed tree, or conceals a mission change. Prefer the mission diff against `{{reviewBaseline}}` and stable file/test evidence when checking claims.
31
+ - Write findings to `{{artifactDir}}/{{slug}}-review-findings.md`, outcome to `{{artifactDir}}/{{slug}}-review-outcome.md`, and verdict to `{{artifactDir}}/{{slug}}-review-verdict.txt`.
32
+
33
+ Rebasing Artifacts:
34
+ - Ignore diff entries that are only present because the branch is behind `{{primaryBranch}}` and will be resolved by parallix rebase before integration.
35
+ - Treat missing files that were added on `{{primaryBranch}}`, deletions that already happened on `{{primaryBranch}}`, and similar stale-baseline noise as rebasing artifacts, not mission changes.
36
+ - If a questioned change disappears when compared to the mission's actual parent or merge-base and the mission did not introduce it, do not file a finding for it.
37
+ - Still flag real scope or correctness problems when this mission actually changes the file; only ignore branch stale-ness that is not a mission change.
38
+
39
+ Check:
40
+ - mission scope and acceptance criteria
41
+ - final checkpoint claims vs actual diff
42
+ - correctness and regressions
43
+ - tests / gates / verification evidence
44
+ - security and unsafe operations
45
+ - integration with existing code, config, APIs, schemas, docs, or workflows
46
+ - maintainability issues that materially affect future work
47
+
48
+ - Artifact handoff is mandatory: your final chat response does **not** submit a review. Before stopping, create all three files: `{{artifactDir}}/{{slug}}-review-findings.md`, `{{artifactDir}}/{{slug}}-review-outcome.md`, and `{{artifactDir}}/{{slug}}-review-verdict.txt`.
49
+ - Write findings to `{{artifactDir}}/{{slug}}-review-findings.md`, then write the outcome and verdict files alongside it.
50
+ - The findings file must contain findings (write `No findings.` when approving). For request-changes, give every finding a parser-stable heading such as `## F1: summary`, `## F2: summary`; round-prefixed headings such as `## R3-1` are invalid. The outcome file must state `Outcome: approve` or `Outcome: request-changes`. The verdict file must contain exactly `approve` or `request-changes` and a newline. `comment` is not valid.
51
+ - After writing them, run `ls -l {{artifactDir}}/{{slug}}-review-findings.md {{artifactDir}}/{{slug}}-review-outcome.md {{artifactDir}}/{{slug}}-review-verdict.txt` and read back the verdict file. If any file is absent or the verdict is not exact, fix the files before stopping.
52
+ - Do not call px directly, the workflow will do that for you — except for the read-only `px status {{slug}}` above, which you must run to load review history
53
+ - Do not post to Forgejo directly; `px review {{slug}} --start` or `--submit` publishes the artifacts.
54
+ - Do not edit repo files; do not switch into implementer behavior.
55
+ - Graphify-first: before reviewing, check if `graphify-out/graph.json` exists. If it does, run `graphify query "review {{slug}} for correctness and completeness"` to get a graph-based view of the mission scope before examining the diff.
56
+
57
+ Separation of duties — you are the reviewer, not the implementer. Stay in review-only mode:
58
+
59
+ You MUST NOT:
60
+ - Edit, create, or delete any repo source, config, test, or doc file to fix a problem — report it as a finding instead of touching the file
61
+ - Fix bugs, refactor, complete unfinished work, or otherwise "improve" the diff under review; reviewing is not implementing
62
+ - Run branch-history operations: no rebase, squash, amend, `git reset`, force-push, or branch deletion
63
+ - Run merge or PR operations: no merge, push, opening/closing/merging PRs, or posting to Forgejo directly
64
+ - Mutate workflow state: do not write or edit checkpoint documents, mission artifacts, act-on-review files, or any review-loop/review-state files
65
+
66
+ You MUST:
67
+ - Review the full mission diff, confirm the final checkpoint's goal-check evidence, and write the findings, outcome, and verdict artifacts
68
+
69
+ You MAY (these writes are the sole exceptions to "no repo edits"):
70
+ - Write to the artifact directory `{{artifactDir}}` (findings, outcome, verdict)
71
+ - Create temporary diagnostic files under `/tmp`.
File without changes