@magnusekdahl/parallix 1.5.125 → 1.5.171

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.
package/NOTICES CHANGED
@@ -1,4 +1,4 @@
1
- THIRD-PARTY NOTICES for @magnusekdahl/parallix 1.5.125
1
+ THIRD-PARTY NOTICES for @magnusekdahl/parallix 1.5.171
2
2
 
3
3
  @magnusekdahl/parallix itself is licensed under AGPL-3.0-or-later; see LICENSE.
4
4
 
package/README.md CHANGED
@@ -105,7 +105,7 @@ px active task-042
105
105
  px integrate task-042
106
106
  ```
107
107
 
108
- Parallix runs on built-in defaults with no config file; `px setup` writes one when you want to declare your own verification gate or mission layout. See the [configuration reference](docs/config.md) for the supported overrides and their defaults. The verification gate that runs at each phase is whatever you declare in `workflow.config.json`. In this repo that dispatcher is `./scripts/verify-local.sh {{area}}`: earlier phases use the fast general suite, while `px integrate` calls `verify-local.sh integrate`, which resolves repo-side integration gates from `config/integration-pipelines.json` and runs the stricter pre-merge checks there.
108
+ Parallix runs on built-in defaults with no config file; `px setup` writes one when you want to declare your own verification gate or mission layout. See the [configuration reference](docs/config.md) for the supported overrides and their defaults. The verification gate that runs at each phase is whatever you declare in `workflow.config.json`. In this repo, earlier phases use the fast general suite; `px integrate` runs the stricter pre-integration gates declared in `workflow.config.json`. Independent gates can run concurrently, while a gate that consumes an artifact waits for its producer. In a terminal, integration shows one row per configured gate and lets you inspect its isolated output; failures expand their output automatically. Local SonarQube Cloud analysis waits for fresh coverage from the same mission checkout; the service decision and reconsideration triggers are in [ADR 0060](docs/adr/0060-per-worktree-sonarqube-analysis-identity.md). The Cloud scan entrypoint shared with GitHub is `npm run sonar` (config in `sonar-project.properties`; the operator token is exported, never committed).
109
109
 
110
110
  When a mission goes wrong and you want to start it over, `px cancel <slug> --yes`
111
111
  retires it: it deletes that one mission's lifecycle rows from the operator
@@ -116,6 +116,34 @@ The same action sits behind a confirmation on the TUI board (`Shift+X`) and on
116
116
  the web board (the `cancel ✕` button). See the [board guide](docs/tui-board.md)
117
117
  for the details.
118
118
 
119
+ `px lead` works down the board's "needs your attention" queue — the same list
120
+ the board shows you. For each item it presses the action the board already
121
+ advertises (`px active`, `px review`, …), the same command you would, and when
122
+ that does not clear the item it starts a fresh agent in that mission's worktree
123
+ with what the board reported, asking it to work out why progress stopped and
124
+ restore a state the normal workflow can continue from. An item only counts as
125
+ cleared when the board stops asking about it, never because an agent said so.
126
+
127
+ Attempts are counted per failure, like every other retry budget here: the same
128
+ attention reason surviving `--budget` agents (2 by default) is escalated with
129
+ what was observed, while a genuinely different failure gets its own attempts. An
130
+ item that clears and comes back is stuck again and is worked afresh. Liveness is
131
+ rechecked before anything is dispatched, so a mission whose agent is running is
132
+ left alone even when the board ranks its failed gate above that; the recovery
133
+ agent starts a new session rather than resuming the stuck one, and its token
134
+ usage is recorded against the mission like any other launch. One mission's
135
+ running agent never stops the rest of the queue from being worked.
136
+
137
+ One exception, always: an item asking for integration is left for you. The
138
+ supervisor never integrates anything, and there is no path from it to
139
+ `px integrate`; a recovery agent may not weaken a gate, manufacture a review, or
140
+ absorb a defect that belongs to your primary branch either.
141
+
142
+ Without `--once` it keeps going until the queue drains, polling every `--poll`
143
+ seconds (60 by default), so it holds the terminal the way a watch command does;
144
+ `--once` takes a single pass and exits. `--dry-run` prints the queue without
145
+ acting, and naming missions narrows the run to those.
146
+
119
147
  ## Optional integrations
120
148
 
121
149
  Both are optional integrations, and each one is wired independently of the other.
@@ -156,6 +184,14 @@ This is a tool for a local-first developer workflow on one machine, driven by an
156
184
  - [`AGENTS.md`](AGENTS.md) — hard rules, restricted actions, and verification entrypoints.
157
185
  - `docs/adr/` — architecture decision records, including ADR 0044 (distribution model) and ADR 0048 (the fail-closed harness defence inventory cited above).
158
186
 
187
+ ## Built with Parallix
188
+
189
+ Parallix is developed using Parallix itself. Changes are broken into bounded missions, implemented in isolated worktrees, checked by repository-owned verification, reviewed in a separate agent pass — preferentially by a different agent family — and integrated only after human inspection. This repository is therefore both the product and a continuously exercised test case for the workflow it provides.
190
+
191
+ The maintainer owns product direction, architecture, acceptance criteria, release/review decisions, and the final integration decision. Coding agents are implementation and review tools: they may investigate the codebase, draft plans, implement bounded changes, run checks, and review diffs, but they do not autonomously decide what the product should become or merge their own work.
192
+
193
+ Because the workflow uses task-scoped execution identities, agent-created intermediate commits may carry mission-specific authorship. Responsibility for the architecture and for what ultimately lands in main remains with the maintainer. Architectural decisions are recorded in docs/adr/, while AGENTS.md and the repository verification configuration define the constraints and gates agents work within.
194
+
159
195
  ## Development
160
196
 
161
197
  ```sh
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "key": "prompts/act-on-review-core.md",
14
- "sha256": "c7931a2b30343eb509e6d06c8c71d6f0591fbe9bca9029ae8f88781858c8e26c"
14
+ "sha256": "677c3ead4d810656bd0993ee8a1db2170b42bd94505d52620c0dcdc4e9f5ca4f"
15
15
  },
16
16
  {
17
17
  "key": "prompts/act-on-review.md",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "key": "prompts/draft-core.md",
22
- "sha256": "f5565ff259a2c830e8853573f7a774fb2ce21e1631d457a025d63ebcf9f4ea6a"
22
+ "sha256": "4f53057f8bef0343d163c9b8a6539601ecc34462cb20195bf93acaf09e355a35"
23
23
  },
24
24
  {
25
25
  "key": "prompts/draft.md",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "key": "prompts/execute-core.md",
30
- "sha256": "51b16691ee421a55c5a2da30e62fb8e41c910a5e1e3a16ea45ed6f67aa5e031f"
30
+ "sha256": "e64b8a610f0d93ccfecb0178406127ff29d6ae3e4b29e3c15155ea68143805a4"
31
31
  },
32
32
  {
33
33
  "key": "prompts/execute.md",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "key": "prompts/review-core.md",
38
- "sha256": "7be9123246e77e669d0bbd7c1f6c6f436f58af0c216cb4ee43fd82824b344bbf"
38
+ "sha256": "3559ac4927931b1869c892626b68ca72d3dcb43eee15f335ac456f404244172d"
39
39
  },
40
40
  {
41
41
  "key": "prompts/review.md",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "key": "migrations/0007-usage-statistics-identity.sql",
78
- "sha256": "0bba52d7101501a2a2bc95d20abed97f52bae10670bdf15e55c5d09c391315b3"
78
+ "sha256": "1f251890704f1decbc6732f64fddabe89a98231d4a2b7eae443f0a1f847f5fb4"
79
79
  },
80
80
  {
81
81
  "key": "migrations/0008-review-workflow-state.sql",
@@ -124,6 +124,30 @@
124
124
  {
125
125
  "key": "migrations/0019-custom-agent-leases.sql",
126
126
  "sha256": "07559cd5363f01a309d028673e6dcb9e222a848fae79c57d2fee9001589da19d"
127
+ },
128
+ {
129
+ "key": "migrations/0020-mission-execution-context.sql",
130
+ "sha256": "39f48ffde5a766f82b4c59725a6bf49750496e6f2efa92b983b2c4756a3cf314"
131
+ },
132
+ {
133
+ "key": "migrations/0021-mission-brief-and-declared-gates.sql",
134
+ "sha256": "6e8112f6674086f47403172e3a5f3506d1e1ed6defb0e05b2bd00dea66f84858"
135
+ },
136
+ {
137
+ "key": "migrations/0022-mission-reproduction-test.sql",
138
+ "sha256": "3e8eea659412485b30b9417f0b1894ade89ad83f0bf905964e5908e3d03ca89f"
139
+ },
140
+ {
141
+ "key": "migrations/0023-rename-mission-brief-constraints.sql",
142
+ "sha256": "a0c669ba6c6883bb498c59eb8a8a1688dc445de56520a22d7c0302b4a2fbf8b0"
143
+ },
144
+ {
145
+ "key": "migrations/0024-mission-success-criteria-and-predicted-nel.sql",
146
+ "sha256": "811f8d5856a66b2daf88f5a586b6ce03eae7e9acf95aa9c6c733399dd2679057"
147
+ },
148
+ {
149
+ "key": "migrations/0025-mission-dependencies.sql",
150
+ "sha256": "90b784413abbe8643d02ea84103a15909def367fb80f1eedbac4ba50abc90535"
127
151
  }
128
152
  ]
129
153
  }
@@ -1,4 +1,4 @@
1
- 2e6369b99697e6aaebc09838469bc8a4e546739bc39b05df7818a593a1ff320c asset-manifest.json
1
+ d8fa2f0ae552ea45c0978c5d37f5405aaafa5d8aec9b1e6120cec53b3492bd83 asset-manifest.json
2
2
  c380d909ddf757f9bbe5136d79652a19396ae69068d144e2b6031ed4b7fb4b78 config/agents.json
3
3
  6a4ec47387d1240e32967dc8e4ce54a15d69df2676b7a96ff72baafe996fef7d config/state-map.json
4
4
  30a76fa3839753ddbfe312428dd1b7285ac1b8d0bd678fc79c79018ec6154f69 migrations/0001-initial-schema.sql
@@ -8,7 +8,7 @@ d4080e33cb1a77e504188dbdafa0765ddf3391d99e1d81a76ab3a5ce3b9b40f2 migrations/000
8
8
  c92e3addb896b7f93221e70bf69c7eed70e94832921ef0177e28abf283639458 migrations/0005-mission-external-task-ref.sql
9
9
  2c6318e475a40ecac6489bbd6b4bafc3fb5af80cfc8760dbff88b073fd694673 migrations/0005-repository-scoped-session-markers.sql
10
10
  f06bf2ae50ba8e1ed51b1cb643b5f6dc739f107bb8b7cabc7d511b5f42087433 migrations/0006-session-markers.sql
11
- 0bba52d7101501a2a2bc95d20abed97f52bae10670bdf15e55c5d09c391315b3 migrations/0007-usage-statistics-identity.sql
11
+ 1f251890704f1decbc6732f64fddabe89a98231d4a2b7eae443f0a1f847f5fb4 migrations/0007-usage-statistics-identity.sql
12
12
  02d772850468eb5b064080ca1fcb35100cfaf21cbeed4fe6a877278ab3b87148 migrations/0008-review-workflow-state.sql
13
13
  905cbf1fdfbd357cc705ceb4762170ad6d649424bfc977dd4b241a31fa9e642d migrations/0009-review-gate-retries.sql
14
14
  c8f9327fe161bfdea6a7e56ad3fab2c1bc97a30989da3cb1236c35d9d672d07a migrations/0010-review-events-and-implementer-response.sql
@@ -21,20 +21,26 @@ a08063b188a91e901d462f73f4f154c98d85068324cef45eb144250e5000051a migrations/001
21
21
  f46823014782c22a9e40b486958770d2b5f7e7180fc9fe6be961a791cca97b50 migrations/0017-retire-mission-import-provenance.sql
22
22
  3560376d8e31e0b8fc527509211378a839ba24ef5e5e5fac9ee6dadc06c172c2 migrations/0018-adhoc-mission-counter.sql
23
23
  07559cd5363f01a309d028673e6dcb9e222a848fae79c57d2fee9001589da19d migrations/0019-custom-agent-leases.sql
24
- 62c26e2f57c4ef262c6fbe2686f169afb35e6f10f670edf1e6a35f8de0e4c6d5 package.json
25
- c7931a2b30343eb509e6d06c8c71d6f0591fbe9bca9029ae8f88781858c8e26c prompts/act-on-review-core.md
24
+ 39f48ffde5a766f82b4c59725a6bf49750496e6f2efa92b983b2c4756a3cf314 migrations/0020-mission-execution-context.sql
25
+ 6e8112f6674086f47403172e3a5f3506d1e1ed6defb0e05b2bd00dea66f84858 migrations/0021-mission-brief-and-declared-gates.sql
26
+ 3e8eea659412485b30b9417f0b1894ade89ad83f0bf905964e5908e3d03ca89f migrations/0022-mission-reproduction-test.sql
27
+ a0c669ba6c6883bb498c59eb8a8a1688dc445de56520a22d7c0302b4a2fbf8b0 migrations/0023-rename-mission-brief-constraints.sql
28
+ 811f8d5856a66b2daf88f5a586b6ce03eae7e9acf95aa9c6c733399dd2679057 migrations/0024-mission-success-criteria-and-predicted-nel.sql
29
+ 90b784413abbe8643d02ea84103a15909def367fb80f1eedbac4ba50abc90535 migrations/0025-mission-dependencies.sql
30
+ 294a052884270880c446515f8ff332d0214b0ff74868ba0b1a5441bc3c3bee47 package.json
31
+ 677c3ead4d810656bd0993ee8a1db2170b42bd94505d52620c0dcdc4e9f5ca4f prompts/act-on-review-core.md
26
32
  8f06b68b92c8cfc6f3ee0ff7a1e258258c1a1c2220bdfe5b1a3d5fbaab6befeb prompts/act-on-review.md
27
- f5565ff259a2c830e8853573f7a774fb2ce21e1631d457a025d63ebcf9f4ea6a prompts/draft-core.md
33
+ 4f53057f8bef0343d163c9b8a6539601ecc34462cb20195bf93acaf09e355a35 prompts/draft-core.md
28
34
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 prompts/draft.md
29
- 51b16691ee421a55c5a2da30e62fb8e41c910a5e1e3a16ea45ed6f67aa5e031f prompts/execute-core.md
35
+ e64b8a610f0d93ccfecb0178406127ff29d6ae3e4b29e3c15155ea68143805a4 prompts/execute-core.md
30
36
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 prompts/execute.md
31
- 7be9123246e77e669d0bbd7c1f6c6f436f58af0c216cb4ee43fd82824b344bbf prompts/review-core.md
37
+ 3559ac4927931b1869c892626b68ca72d3dcb43eee15f335ac456f404244172d prompts/review-core.md
32
38
  e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 prompts/review.md
33
- f825e1cb2c22bf5fa9a515a245d58aafdecdaaf2f8bd1990e6c5888de2c36550 px.mjs
34
- 4fab03d83e6520294e486c68ab48a088aa969f1064916f99e7c367f70b929eb9 px.mjs.map
35
- 8727412e900953999e3744f102307f1db37c44d4524ba02581481b35e2dc4431 sbom.json
39
+ 75ee066e0eb4db6f11c2720b7e824186d10b03688e4e20a9af6a03f9526362e9 px.mjs
40
+ cfd664363f7849a7b4c9337e738e03bed85c408bc5c24690e916e8ad6f826afb px.mjs.map
41
+ f0069122b0c95c40b70a9ece4c477db1ecd6f13b8489abcf16f6cfa7681fa604 sbom.json
36
42
  ce7f4aa6eb9e684434f243a64018d4dfa9962348bfdb5d59881783326cc0ec90 templates/mission-scaffold.md
37
- 99784eaf9444cd3b2531bc71976751ffe78f8305f6affe78b8a258e4c9509dd2 web/assets/index-B8Hv3ORh.js
38
43
  807f92b40d54c1112d284e7c491702aa90e25edfc32ff5af9f4889beec5583a8 web/assets/index-DYY4ROtr.css
39
- 9464b53a502745042971e980f4b89d1e37300d4eca96e8ab6e0591fb561c5562 web/index.html
40
- 3f454a7af0f992df9a8da22f5a75768d4a4c4fca91d8bc5c5e8a5617882fa7bf web/manifest.json
44
+ edcedfe3e0118ce60148a10a953e5a1eed694c20972dbd040ba623d283017a44 web/assets/index-uenqcn8q.js
45
+ 7c8d86b56172b43f19549cd1d8296c19ccaf396b40635a4253646fc8d5b1e7c4 web/index.html
46
+ b678fa9c1f4b4272ea4d035322ea0e18cd6a741df164627365fb431ded7d5895 web/manifest.json
@@ -42,11 +42,14 @@ SET actor_key = lower(
42
42
  ELSE COALESCE(NULLIF(trim(implementer_agent), ''), NULLIF(trim(implementer), ''), '')
43
43
  END
44
44
  END
45
- );
45
+ )
46
+ WHERE length(actor_key) = 0;
46
47
 
47
48
  -- Normalize `stage` so the identity key cannot split on '' vs 'default'.
48
49
  UPDATE usage_statistics
49
- SET stage = lower(trim(COALESCE(NULLIF(trim(stage), ''), 'default')));
50
+ SET stage = lower(trim(COALESCE(NULLIF(trim(stage), ''), 'default')))
51
+ WHERE stage <> lower(trim(COALESCE(NULLIF(trim(stage), ''), 'default')))
52
+ OR stage IS NULL;
50
53
 
51
54
  -- Collapse duplicates the file authority permitted, keeping the newest row
52
55
  -- (highest rowid) for each identity.
@@ -0,0 +1,19 @@
1
+ -- Typed, bounded launch context. Detailed artifacts remain references (ADR 0053).
2
+ CREATE TABLE mission_execution_contexts (
3
+ mission_id TEXT PRIMARY KEY REFERENCES missions(id) ON DELETE CASCADE,
4
+ goal TEXT NOT NULL CHECK (length(goal) BETWEEN 1 AND 4000),
5
+ why_text TEXT NOT NULL CHECK (length(why_text) BETWEEN 1 AND 4000),
6
+ scope_text TEXT NOT NULL CHECK (length(scope_text) BETWEEN 1 AND 4000),
7
+ predicted_nel_bucket TEXT NOT NULL CHECK (predicted_nel_bucket IN ('small', 'medium', 'large')),
8
+ confidence TEXT NOT NULL CHECK (confidence IN ('low', 'medium', 'high')),
9
+ selection_note TEXT NOT NULL CHECK (length(selection_note) BETWEEN 1 AND 4000)
10
+ );
11
+ CREATE TABLE mission_execution_context_items (
12
+ mission_id TEXT NOT NULL REFERENCES mission_execution_contexts(mission_id) ON DELETE CASCADE,
13
+ kind TEXT NOT NULL CHECK (kind IN ('constraint', 'driver', 'gate', 'dependency')),
14
+ position INTEGER NOT NULL CHECK (position >= 0),
15
+ value TEXT NOT NULL CHECK (length(value) BETWEEN 1 AND 512),
16
+ outcome TEXT CHECK (outcome IS NULL OR length(outcome) BETWEEN 1 AND 512),
17
+ PRIMARY KEY (mission_id, kind, position),
18
+ CHECK ((kind = 'dependency') OR outcome IS NULL)
19
+ );
@@ -0,0 +1,42 @@
1
+ -- TASK-2521.03: replace the execution-context blob with the concepts it held.
2
+ --
3
+ -- 0020 stored constraints, refinement drivers, declared gates and predecessor
4
+ -- references in one `mission_execution_context_items` table discriminated by a
5
+ -- `kind` string. ADR 0053 asks the model to represent these concepts directly,
6
+ -- so each surviving one gets its own table and the rest are dropped:
7
+ --
8
+ -- * brief (goal, why, scope, constraints) -> mission_briefs (+ constraints)
9
+ -- * declared gates -> mission_declared_gates
10
+ -- * predicted NEL bucket -> dropped; missions.net_engineering_lines
11
+ -- plus classifyNelBucket() already model this
12
+ -- * confidence, selection note, drivers -> dropped; no consumer, no rule
13
+ -- * dependencies -> dropped; the task source owns them
14
+ --
15
+ -- No data migration: 0020 shipped with no production writer, and the only row
16
+ -- ever written was a manual test of the command surface.
17
+ DROP TABLE IF EXISTS mission_execution_context_items;
18
+ DROP TABLE IF EXISTS mission_execution_contexts;
19
+
20
+ CREATE TABLE mission_briefs (
21
+ mission_id TEXT PRIMARY KEY REFERENCES missions(id) ON DELETE CASCADE,
22
+ goal TEXT NOT NULL CHECK (length(goal) BETWEEN 1 AND 4000),
23
+ why_text TEXT NOT NULL CHECK (length(why_text) BETWEEN 1 AND 4000),
24
+ scope_text TEXT CHECK (scope_text IS NULL OR length(scope_text) BETWEEN 1 AND 4000)
25
+ );
26
+
27
+ CREATE TABLE mission_brief_constraints (
28
+ mission_id TEXT NOT NULL REFERENCES mission_briefs(mission_id) ON DELETE CASCADE,
29
+ position INTEGER NOT NULL CHECK (position >= 0),
30
+ constraint_text TEXT NOT NULL CHECK (length(constraint_text) BETWEEN 1 AND 512),
31
+ PRIMARY KEY (mission_id, position)
32
+ );
33
+
34
+ -- Gates are a Mission attribute, not part of the brief: handoff runs exactly
35
+ -- these commands, and they change during execution while the brief does not.
36
+ CREATE TABLE mission_declared_gates (
37
+ mission_id TEXT NOT NULL REFERENCES missions(id) ON DELETE CASCADE,
38
+ position INTEGER NOT NULL CHECK (position >= 0),
39
+ command TEXT NOT NULL CHECK (length(command) BETWEEN 1 AND 512),
40
+ PRIMARY KEY (mission_id, position),
41
+ UNIQUE (mission_id, command)
42
+ );
@@ -0,0 +1,6 @@
1
+ -- TASK-2521.03: the red-to-green reproduction test becomes Mission state.
2
+ --
3
+ -- `redgreen.ts` located the test by reading a `Reproduction-Test:` line out of
4
+ -- MISSION.md or a checkpoint document, so the draft prompt had to tell agents to
5
+ -- write that file. The gate is a live consumer; the file was only its transport.
6
+ ALTER TABLE missions ADD COLUMN reproduction_test TEXT;
@@ -0,0 +1,7 @@
1
+ -- TASK-2521.03: rename the persisted brief boundary from constraints to out-of-scope.
2
+ --
3
+ -- 0021 is immutable and shipped with the original names, so this forward
4
+ -- migration preserves existing rows while bringing those databases to the
5
+ -- schema consumed by MissionBrief.outOfScope.
6
+ ALTER TABLE mission_brief_constraints RENAME TO mission_brief_out_of_scope;
7
+ ALTER TABLE mission_brief_out_of_scope RENAME COLUMN constraint_text TO entry;
@@ -0,0 +1,24 @@
1
+ -- TASK-2521.03: record success criteria and the predicted NEL bucket as Mission state.
2
+ --
3
+ -- Corrects two claims in 0021, which is immutable:
4
+ --
5
+ -- * The predicted NEL bucket was dropped there as modelled by
6
+ -- classifyNelBucket(). That classifier buckets the *measured* NEL and cannot
7
+ -- express a prediction; handoff compares the two for the calibration ADR 0047
8
+ -- describes, so the prediction is Mission state again.
9
+ -- * Dependencies were said to be owned by "the task source". There is no task
10
+ -- source: the Mission aggregate is the only task record, and Mission-to-Mission
11
+ -- references are TASK-2521.04's to model.
12
+ --
13
+ -- Success criteria were a section of the retired mission document with no
14
+ -- recorded replacement. Checkpoint Goal Check rows and review verify against them.
15
+ ALTER TABLE missions ADD COLUMN predicted_nel_bucket TEXT
16
+ CHECK (predicted_nel_bucket IS NULL OR predicted_nel_bucket IN ('Small', 'Medium', 'Large'));
17
+
18
+ CREATE TABLE mission_success_criteria (
19
+ mission_id TEXT NOT NULL REFERENCES missions(id) ON DELETE CASCADE,
20
+ position INTEGER NOT NULL CHECK (position >= 0),
21
+ criterion TEXT NOT NULL CHECK (length(criterion) BETWEEN 1 AND 512),
22
+ PRIMARY KEY (mission_id, position),
23
+ UNIQUE (mission_id, criterion)
24
+ );
@@ -0,0 +1,21 @@
1
+ -- TASK-2521.04: Mission-to-Mission dependencies.
2
+ --
3
+ -- 0021 dropped the predecessor references it had stored in the execution-context
4
+ -- table, saying "the task source owns them". There is no task source: the
5
+ -- Mission aggregate is the only self-hosted task record, so a dependency is a
6
+ -- reference from one Mission to another and belongs here.
7
+ --
8
+ -- Nothing enforces it. No lifecycle, activation or scheduling rule reads this
9
+ -- table; it records what an operator or agent needs to know about order.
10
+ --
11
+ -- No data migration: the rows 0021 dropped were never written in production.
12
+ CREATE TABLE mission_dependencies (
13
+ mission_id TEXT NOT NULL REFERENCES missions(id) ON DELETE CASCADE,
14
+ position INTEGER NOT NULL CHECK (position >= 0),
15
+ depends_on_mission_id TEXT NOT NULL CHECK (
16
+ length(depends_on_mission_id) BETWEEN 1 AND 128
17
+ AND depends_on_mission_id <> mission_id
18
+ ),
19
+ PRIMARY KEY (mission_id, position),
20
+ UNIQUE (mission_id, depends_on_mission_id)
21
+ );
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@magnusekdahl/parallix",
3
- "version": "1.5.125",
3
+ "version": "1.5.171",
4
4
  "type": "module"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  # Act-on-review core
2
2
  Mode: act-on-review. Branch: {{branch}}.
3
- Mission: {{missionPath}}
3
+ Mission: {{slug}}
4
4
 
5
5
  You are the implementer agent family: `{{implementer}}`.
6
6
  Attempt: {{attempt}}.
@@ -9,16 +9,15 @@ Latest reviewer outcome was: {{review_outcome}}
9
9
  Entrypoint: {{act_on_review_entrypoint}}
10
10
 
11
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.
13
- - Load the locked mission at `{{missionPath}}` and `AGENTS.md` before acting.
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.
16
- - For each finding: fix, push back (with a clear reason), or park (record in a tracked follow-up such as a Backlog task).
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 applies even when the mission declares no gates.
13
+ - Load the Mission context with `px status {{slug}}` and read `AGENTS.md` before acting. That command reports the recorded brief, declared gates, the latest recorded checkpoint evidence, the reviewed revision, the outstanding findings, and your prior resolutions.
14
+ - Get the current round, phase, and disposition from `px status {{slug}}`, which reports them on its `Review:` line. `px status` is the authority for review-loop state; take it from there and nowhere else.
15
+ - Read the review outcome and findings from `px status {{slug}}`; its review history is projected from the operator database.
16
+ - For each finding: fix it, or push back with a clear reason why it does not hold. There is no third option. "Tracked as a follow-up" is not a resolution — if the finding is right, deliver it.
17
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.`
18
- - Update the checkpoint document if needed, run the relevant gate, and commit before handoff.
19
- - Write `{{artifactDir}}/{{slug}}-round-resolution.md` with `fixed_items`, `pushed_back_items`, `parked_items`, and `blocked_reason` (when 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.
21
- - Do not post to Forgejo directly; the workflow loop consumes the artifacts.
22
- - In standalone mode (no Forgejo), the review loop reads your artifacts directly — no CLI commands needed.
18
+ - Record corrected checkpoint evidence with `px checkpoint record` if needed, run the relevant gate, and commit before handoff.
19
+ - After committing fixes, submit every finding with `px resolve --slug {{slug}} --actor {{implementer}} --expected-version <n> --finding <finding-id> --fixed "<evidence>" [--finding <finding-id> --disputed "<rationale>"] ...`. This persists the resolution and publishes through the established workflow; do not post to Forgejo directly.
20
+ - `--disputed` records a pushback. Resolve every outstanding finding; the command rejects partial resolutions rather than inventing answers. Review feedback, missing context, and conflicting stale records are repair work, not a block: re-query `px status {{slug}}` and the current PR decisions, then act on the latest decision.
21
+ - Use `px resolve --slug {{slug}} --actor {{implementer}} --expected-version <n> --blocked "<reason>"` only for a genuine external dependency that prevents any resolution and names the required human action. Never use it to avoid investigating or delivering requested changes.
23
22
 
24
- Safety: If {{review_outcome}} is not approved AND you cannot read the review outcome, DO NOT post PUSHBACK_ALL. Post BLOCKED instead.
23
+ Safety: if the review outcome is not approved and you cannot read it, do not guess and do not push back on findings you have not seen. Record `px resolve --slug {{slug}} --actor {{implementer}} --expected-version <n> --blocked "<reason>"` instead, naming what you could not read. Silence is not a resolution.
@@ -1,43 +1,63 @@
1
1
  # Draft core
2
- Mode: draft. Do not implement the mission — produce the mission contract document only.
2
+ Mode: draft. Do not implement the mission — record the mission contract.
3
3
  Mission slug: {{slug}}
4
- Mission path: {{missionPath}}
5
4
  Backlog task: {{taskPath}}
6
5
 
7
- The harness has already created the mission branch, worktree, scaffolded `{{missionPath}}`, and ensured the backlog task exists. Your job is to read the user's intent from `{{taskPath}}` and fill `{{missionPath}}` with a real mission contract.
6
+ The harness has already created the mission branch, worktree, mission record, and backlog task. Your job is to turn the user's intent from `{{taskPath}}` into a complete mission record. There is no mission document to write; every fact below is recorded with a command.
8
7
 
9
8
  Allowed actions:
10
- - read files (backlog task, MISSION.md scaffold, graphify index if present)
11
- - write/edit files (MISSION.md, backlog task labels)
9
+ - read files and graphify index if present
12
10
  - run graphify queries and updates
13
11
  - run `{{verifyCmd}}` to verify the draft
14
12
 
15
13
  Forbidden actions:
16
14
  - implement any feature or fix described in the mission
17
- - modify source code outside MISSION.md and the backlog task file
15
+ - modify source code
18
16
  - run tests beyond the single `{{verifyCmd}}` gate
19
17
  - start a review, execute, or integrate phase
20
18
 
19
+ Mission state authority: `px status {{slug}}` is the authority for recorded Mission facts.
20
+
21
+ Record the mission contract with typed commands. The slug is inferred from this worktree, and every write takes `--expected-version <n>`. Each write prints the new `version`; pass it to the next write instead of re-reading `px status`.
22
+
23
+ The contract, and what the harness requires before this draft can finish:
24
+
25
+ | Part | Command | Required |
26
+ |---|---|---|
27
+ | Goal and why | `px goal set --goal <text> --why <text>` | required |
28
+ | Scope | `px scope set --scope <text>` | required |
29
+ | Out of scope | `--out-of-scope <text>` on `px scope set`, repeatable | optional; record it whenever the mission deliberately leaves something alone, because review checks the diff against it |
30
+ | Success criteria | `px criterion add --text <criterion>`, one call each | required, at least one |
31
+ | Checkpoint plan | `px checkpoint plan --name <CP-N> --text <what it delivers>`, one call each in execution order (`CP-1`, `CP-2`, ...), at most 512 characters each | required, at least one |
32
+ | Verification gates | `px gate add --command <command>`, one call each. Handoff runs every gate with `bash -c` and blocks on a non-zero exit, so a gate is one exact runnable repository command and nothing else (for example `./scripts/verify-local.sh all`): no prose, no `#` comment, no expected outcome. `px gate add` refuses such a gate, and handoff also refuses a gate whose script does not exist in the finished tree; an expected outcome belongs in a success criterion | required, at least one |
33
+ | Predicted NEL bucket | `px nel set --predicted <Small\|Medium\|Large>` | required |
34
+ | Reproduction test | `px repro set --test <path>` | required for a `bug` mission only |
35
+ | Dependencies | `px depends add --on <slug>`, one call each | optional; nothing enforces it |
36
+
37
+ This table is the whole requirement. The draft does not complete while any required part is missing: the harness refuses it, names what is missing, and sends it back to you. Run any command with `--help` for its exact flags.
38
+
39
+ Run each write as its own foreground command and wait for it to finish. Do not chain the whole contract into one long command, do not move a write to the background, and never end your turn while a `px` command is still running: when your turn ends, anything still running is killed and was not recorded.
40
+
41
+ A write against a stale version is rejected with an explicit conflict and changes nothing; re-read the version with `px status {{slug}}` and retry.
42
+
43
+ Before you finish, read the contract back with `px status {{slug}}` and check every required part in the table. Anything it does not report was not recorded.
44
+
45
+ Plan the checkpoints; do not record their evidence. `px checkpoint record` is for execution: evidence is what the work produces, and there is nothing to cite yet.
46
+
21
47
  Drafting requirements:
22
- - fill every scaffolded section in `{{missionPath}}` with concrete, non-generic content (no placeholders, no "TBD")
23
- - include a Goal, Why now, Scope, Out of scope, Success criteria, Risks/assumptions, Checkpoints, Gates, Restricted areas, and Stop rules
24
- - success criteria must be specific enough to derive a goal-check table during execution
48
+ - every part you record is concrete and specific to this mission; no placeholders or "TBD"
49
+ - plan checkpoints as coherent, independently verifiable slices of the work; together they must cover every success criterion
50
+ - each success criterion must be specific and checkable: execution records one Goal Check row of evidence per criterion
25
51
  - {{classificationInstructions}}
26
52
  - preserve `{{taskPath}}`: update content as needed but do not delete, rename, or move the file
27
53
  - do not edit the backlog `assignee` field; the workflow records ownership itself
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.
54
+ - predict the size of the change as a net engineering lines (NEL) bucket — Small (0–80), Medium (81–235) or Large (235+)
35
55
 
36
56
  Bug-labeled missions (regression-test-first / "lock the bug"):
37
57
  - 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.
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).
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.
40
- - do not author the fix during draft — the reproduction test and its `Reproduction-Test:` declaration are the only bug-specific drafting outputs.
58
+ - make the **first planned checkpoint** (`px checkpoint plan --name CP-1`) 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).
59
+ - record the reproduction test's path with `px repro set --test <path>` (for example, `px repro set --test test/task-1354-repro.test.ts`); the table above makes it required for a bug mission. `px status {{slug}}` reports it back for the reviewer to check against the diff.
60
+ - do not author the fix during draft — the reproduction test and its recorded path are the only bug-specific drafting outputs.
41
61
 
42
62
  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.
43
63
 
@@ -1,36 +1,48 @@
1
1
  # Execute core
2
2
  Mode: execute after lock.
3
- Mission: {{missionPath}}
4
- Mission dir: {{missionDir}}
5
3
  Slug: {{slug}}
4
+ Mission dir: {{missionDir}}
6
5
  Backlog task: {{taskPath}}
7
6
 
7
+ Mission context is application-owned. Load it with:
8
+
9
+ - `px status {{slug}}` — lane, the recorded brief (goal, why, scope, out-of-scope), the success criteria, the checkpoint plan with which checkpoints already have recorded evidence, declared gates, the latest recorded checkpoint with its Goal Check rows and next action, review round and disposition, and the write version.
10
+
11
+ `px status` is the authority for Mission state, and it is the only one. Run `px --help` to see the supported commands.
12
+
13
+ Execution has exactly one write:
14
+
15
+ - `px checkpoint record --name <CP-N> --criterion <text> --evidence <text> --next <text>` — `--criterion` and `--evidence` repeat and pair up in order.
16
+
17
+ You do not change the mission here. The goal, scope, out-of-scope, success criteria, checkpoint plan and gates were settled at draft and are what your work is judged against; if you believe one of them is wrong, say so in your response and stop rather than editing it to match what you built.
18
+
19
+ The slug is inferred from this worktree, so you do not pass it. The write takes `--expected-version <n>`, whose value is the `version` field reported by `px status {{slug}}`. A write against a stale version is rejected with an explicit conflict and changes nothing; re-read the status and retry deliberately. Run the command with `--help` for its exact flags.
20
+
8
21
  Harness preflight already confirmed:
9
22
  - branch/worktree shape
10
- - mission doc presence
11
- - Backlog task presence
23
+ - the mission brief is recorded and readable
12
24
 
13
25
  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.
26
+ - execute checkpoint-by-checkpoint per the checkpoint plan reported by `px status {{slug}}`, starting with the first planned checkpoint that has no recorded evidence. That is also where you resume after a relaunch.
27
+ - after each completed checkpoint, record its evidence with `px checkpoint record --name <its planned CP-N>`, one `--criterion`/`--evidence` pair per Goal Check row, and a non-generic `--next`. Use the exact text of the success criterion a row evidences as its `--criterion`; handoff matches the final checkpoint's rows against the recorded success criteria and refuses a criterion with no row. That is the durable write; read it back with `px status {{slug}}`. Do not write a checkpoint document.
28
+ - Immediately after recording a checkpoint's evidence, compact your working context: reload only the mission goal, scope, success criteria and checkpoint plan with `px status {{slug}}`, then continue.
29
+ - Completing a checkpoint is **non-terminal**: after recording its evidence, immediately continue to the next planned checkpoint without recorded evidence. Do not send a final response or exit merely because one checkpoint is complete; break large checkpoints into safe slices and keep progressing.
30
+ - You may terminate this execution only when exactly one of these conditions applies: (a) every planned checkpoint has recorded evidence, the final one covers every success criterion, 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
31
  - 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):
32
+ - the final checkpoint MUST record one Goal Check row per success criterion, citing real, durable references such as runnable project commands, test names, decision-record references, or test paths
33
+ - **One row per criterion:** each `--criterion` is paired with the `--evidence` that follows it, in order. Pass the flags as many times as you have criteria; the counts must match or the write is rejected.
34
+ - **Accepted evidence forms** (each `--evidence` value must cite at least one verifiable reference from this list):
23
35
  1. **Runnable project commands or stable paths** — e.g., `` `make test` ``, `` `go test ./...` ``, or `` `tests/integration/` ``
24
36
  2. **Test names** — e.g., `"saving a record preserves its identifier"` (must match a test name found in the project)
25
37
  3. **Decision-record references** — e.g., `ADR 0048` (when the project uses ADRs or an equivalent decision record)
26
38
  4. **Test paths** — e.g., `tests/integration/` (must be an existing test path)
27
39
  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.
40
+ - **Not sufficient by themselves:** raw `stat`/`ls` output or generic prose claims. You may include them as supporting context, but the same `--evidence` value must also cite at least one accepted reference from the list above.
29
41
  - 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.
42
+ - 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, re-reading them with `px status {{slug}}` rather than from repository files. Do not compact for a failed gate: retain its failure diagnostic while repairing it.
31
43
  - 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
44
+ - do not change the Backlog task's status, assignee, labels, or lifecycle metadata, and do not run `px active`, `px review`, `px integrate`, `px assign` or `px unassign`; Parallix performs lifecycle transitions and review decisions itself. `px status {{slug}}` is the supported read in this phase, and `px checkpoint record` is the only supported write.
45
+ - do not hand off to review with uncommitted implementation work, or before the final checkpoint's evidence is recorded
34
46
 
35
47
  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
48