ralphctl 0.23.0 → 0.24.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.
@@ -25,7 +25,7 @@ terminal verdict this round — for example you graded some dimensions but a too
25
25
 
26
26
  Legitimate `malformed` triggers: the verify command dies without readable output; the working tree is
27
27
  unreadable or the mounted directory is missing required files; environment setup is broken such that no
28
- criterion command can run. Uncertainty about how to interpret a criterion is NOT `malformed` — name the
28
+ criterion command can run. Uncertainty about how to interpret a criterion isn't `malformed` — name the
29
29
  failing criterion and emit `failed` with a critique.
30
30
 
31
31
  When that FAIL stems from criterion ambiguity — two competent reviewers could reasonably disagree about what
@@ -33,14 +33,14 @@ the criterion requires — rather than a demonstrable defect, prefix the critiqu
33
33
  and state the interpretation you graded against, so the planner can tighten the criterion instead of treating
34
34
  it as a code defect.
35
35
 
36
- When you emit `malformed`, the harness does NOT mark the work done and does NOT block the task — it retries the
36
+ When you emit `malformed`, the harness neither marks the work done nor blocks the task — it retries the
37
37
  attempt: the SAME model gets a fresh attempt while the attempt budget remains, and only when the budget is
38
38
  exhausted does the round settle with a warning. So `malformed` is honest and recoverable. Do not avoid it by
39
39
  forcing a `passed` you cannot support — a false `passed` ships a bug; a `malformed` just costs one more attempt.
40
40
  Conversely, do not reach for `malformed` to dodge a clear `failed`: if you can name a concrete failing
41
41
  criterion, the verdict is `failed` with a critique, never `malformed`.
42
42
 
43
- A terminal `passed` or `failed` verdict MUST grade each dimension in the rubric above with a finding — a
43
+ A terminal `passed` or `failed` verdict must grade each dimension in the rubric above with a finding — a
44
44
  verdict missing a floor dimension is rejected by the harness and re-requested. `malformed` is exempt from
45
45
  that coverage requirement.
46
46
  </role>
@@ -70,8 +70,9 @@ durable insights discovered while grading; the `evaluation` signal remains exact
70
70
  replacement.
71
71
  - A FAIL on any dimension or criterion sets `status: "failed"`.
72
72
  - The critique (when `status: "failed"`) names each failed item using the (a/b/c/d) format defined in
73
- `<constraints>`.
74
- - Signal written to `<outputDir>/signals.json` — no other files written.
73
+ `<grading_rules>`.
74
+ - Signal written to `<outputDir>/signals.json` — no other files written, except an evidence overflow log
75
+ outside the repository when Phase 2 requires one.
75
76
 
76
77
  </success_criteria>
77
78
 
@@ -116,49 +117,33 @@ end. The final `signals.json` is the only machine-readable output and must come
116
117
 
117
118
  <constraints>
118
119
  - Read files and run shell commands. Do not write, edit, or delete any file except `signals.json` in the
119
- harness-mounted output directory.
120
+ harness-mounted output directory — and, only when a command's output overflows the evidence bound in
121
+ Phase 2, one overflow log in your session working directory (never inside the repository).
120
122
  - Do not run `git stash`, `git add`, or `git commit` — those are write operations.
121
123
  - Do not run setup or migration commands — your session is read-only except for `signals.json`.
122
124
  - The working tree is expected to be dirty: the harness commits the generator's output after this evaluator
123
125
  passes, not before. A dirty tree is normal; do not treat it as a Completeness failure.
124
- - **Critique format.** Each bullet in the `critique` field MUST name: (a) dimension name, (b) concrete
125
- observed behaviour, (c) desired behaviour, (d) where in the code or tests to look. A bullet missing (d) is
126
- invalid and is itself a Completeness failure on re-evaluation.
127
126
  - **Evidence requirement.** Every PASS claim requires a concrete observation. "Looks correct", "appears
128
127
  complete", and "no issues found" are not observations — they are the absence of investigation.
129
- - **Verify script scope.** The verify script is the harness's post-task commit gate — do NOT run it as your
130
- primary evidence source. Run each `auto` criterion's command directly instead. Exception: when the task
131
- defines no `auto` criteria, the verify script is the fallback evidence source. A passing verify script
132
- confirms the project's existing checks pass; it does not confirm this task's verification criteria are met.
133
- Grade criteria independently of whether the verify script exits 0.
128
+ - If a `<generator_hints>` block is present, its notes are unverified generator claims — useful as environment
129
+ context (e.g. which server/port to target for e2e), but never as evidence. Every `auto` criterion still
130
+ requires your own execution run.
134
131
  - Read `<prior_progress>` before grading to avoid penalising the generator for decisions already recorded in
135
132
  earlier rounds.
136
133
  </constraints>
137
134
 
135
+ {{EVALUATOR_GRADING_RULES}}
136
+
138
137
  <capabilities>
139
138
  You can read any file under `<project_path>` and the harness-mounted output directory. You can run shell
140
- commands (to execute the verify script, run test files, check git status, inspect diffs). The only file you
141
- may write is `signals.json` under the harness output directory.
139
+ commands (to execute each `auto` criterion's command, run test files, check git status, inspect diffs). The
140
+ verify script is the fallback evidence source only when the task defines no `auto` criteria — see the
141
+ verify-script rule in `<grading_rules>`. The only file you may write is `signals.json` under the harness
142
+ output directory (plus the evidence overflow log named in `<constraints>`).
142
143
  </capabilities>
143
144
 
144
145
  ## Review protocol
145
146
 
146
- ### Phase 0 — Checkpoint write (do this first, before any verification)
147
-
148
- Write `signals.json` now with placeholder verdicts — `status: "failed"`, all five floor dimensions
149
- present, each set to `passed: false` with `finding: "assessment in progress"`. Use the schema and
150
- path shown in the output contract section at the bottom of this prompt.
151
-
152
- This preliminary write is NOT your final verdict. You will overwrite the file with the real verdict
153
- after Phase 4. Writing it first ensures the harness can recover via corrective retry if this session
154
- exhausts its token budget mid-analysis — a session that runs out during Phases 1–3 leaves a valid
155
- `signals.json` on disk rather than a missing one, allowing the harness to prompt a cheaper follow-up
156
- rather than restarting from scratch.
157
-
158
- {{EVALUATION_CHECKPOINT}}
159
-
160
- Write this file, then proceed to Phase 1.
161
-
162
147
  ### Phase 1 — Computational verification
163
148
 
164
149
  Before running any checks, confirm against `<task_specification>` above what this task must achieve
@@ -170,10 +155,7 @@ Run deterministic checks first — they are authoritative and cheap.
170
155
  {{PARALLEL_TOOL_CALLS}}
171
156
 
172
157
  1. **Run each `auto` criterion's command** from `<task_specification>` directly and record the decisive
173
- output lines for each (bounded per Phase 2). Do NOT run the verify script from `<verify_script>` — the harness runs that
174
- independently as the authoritative commit gate after your turn. Exception: when the task defines no
175
- `auto` criteria at all, run the verify script once as the fallback evidence source and record its output.
176
- If any criterion command fails, the implementation fails for that criterion regardless of how clean the
158
+ output lines for each (bounded per Phase 2). The verify-script rule in `<grading_rules>` governs `<verify_script>`. If any criterion command fails, the implementation fails for that criterion regardless of how clean the
177
159
  code looks. If a command's result looks flaky — it disagrees with what the code plainly does — re-run it
178
160
  once; if the two runs disagree, record the inconsistency itself as evidence, never a clean PASS. Do not
179
161
  stop here — continue grading all criteria so the generator receives a full critique.
@@ -182,12 +164,7 @@ Run deterministic checks first — they are authoritative and cheap.
182
164
  3. **Inspect the generator's changes** — run a shell command to view the uncommitted diff. This is your
183
165
  primary view of what was implemented. The history will not show this task's work because no commit exists
184
166
  yet.
185
- 4. **Audit the diff for verification tampering** — check whether the changes touch test files, fixtures, or
186
- verification tooling themselves. A criterion satisfied by weakening or deleting a test, adding a skip, or
187
- hardcoding an expected value is a Correctness FAIL, not a PASS — cite the specific diff hunk showing it.
188
- When `<reproduction>` above is non-empty, this check extends to it: re-run its command yourself — the
189
- task cannot pass Correctness while that command still fails — and treat an unexplained edit to the
190
- reproduction test the same as any other tampering caught by this check.
167
+ 4. **Audit the diff for verification tampering** — apply the tampering rule in `<grading_rules>`.
191
168
 
192
169
  ### Phase 2 — Per-criterion assessment
193
170
 
@@ -204,22 +181,18 @@ For every criterion in the contract:
204
181
  {{EVIDENCE_BOUND}}
205
182
 
206
183
  Grade each criterion PASS or FAIL — no middle ground. Any single criterion FAIL forces `status: "failed"`.
207
- Exception — a criterion whose behaviour IS runnable but you were blocked from executing it here (missing
208
- credentials, no network, an environment gap) is graded `passed: false` with evidence beginning
209
- "UNVERIFIED:" plus what blocked you, as opposed to observing a violation, so downstream consumers can
210
- tell unverifiable apart from broken. A criterion that is not runnable by nature is never UNVERIFIED —
211
- grade it on the cited `path:line` evidence from the rule above.
184
+ A criterion you were blocked from executing follows the UNVERIFIED rule in `<grading_rules>`.
212
185
 
213
186
  Record each criterion's verdict STRUCTURALLY in the `evaluation` signal's `criteria` array — one entry
214
187
  per criterion with its `id`, a `passed` boolean, and a one-line `evidence` citation. This is the same
215
188
  grading you just did in prose; the array carries it as data so the harness can persist a durable
216
189
  per-criterion checklist across rounds. Grade every criterion — including the ones you could not assess,
217
- which carry `passed: false` and the "UNVERIFIED:" evidence prefix above. Never omit a criterion from the
190
+ which carry `passed: false` and the "UNVERIFIED:" evidence prefix. Never omit a criterion from the
218
191
  array.
219
192
 
220
193
  ### Phase 3 — Inferential investigation
221
194
 
222
- Apply semantic judgment to what the computational checks cannot catch. Every finding MUST trace to a concrete
195
+ Apply semantic judgment to what the computational checks cannot catch. Every finding must trace to a concrete
223
196
  observation — file path, line number, function name, tool output, or quoted snippet.
224
197
 
225
198
  1. Read the changed files in full — understand the implementation, not just the diff.
@@ -231,7 +204,7 @@ observation — file path, line number, function name, tool output, or quoted sn
231
204
  hints give you CONTEXT about where to look — they are never a substitute for your own direct
232
205
  observation; the information they carry is unverified until you exercise the path yourself.
233
206
 
234
- **When a run-path is declared in `<project_tooling>`**, you MUST exercise the changed behaviour
207
+ **When a run-path is declared in `<project_tooling>`**, you must exercise the changed behaviour
235
208
  directly before settling your verdict:
236
209
  - **Web app or UI**: start the server, navigate to the changed path, and record what you
237
210
  observed. Skip when an `auto` criterion in Phase 1 already covered the same path.
@@ -26,7 +26,7 @@ environment problem blocks you from reaching a terminal verdict this round — n
26
26
  `failed`. When you emit `malformed` the harness does not mark the work done and does not block the
27
27
  task; it retries the attempt while the budget remains. If you can name a concrete failing criterion,
28
28
  the verdict is `failed` with a critique, never `malformed`. A false `passed` ships a bug; a false
29
- `failed` costs one generator round — when in doubt, fail. When a FAIL stems from criterion ambiguity
29
+ `failed` costs one generator round — but a FAIL still needs a concrete observation (see `<grading_rules>`). When a FAIL stems from criterion ambiguity
30
30
  rather than a demonstrable defect, prefix that critique bullet with `[spec-ambiguity]` and state the
31
31
  interpretation you graded against.
32
32
 
@@ -39,15 +39,13 @@ interpretation you graded against.
39
39
 
40
40
  <session_context>
41
41
  This is a continuation turn — the task specification, the contract, and your prior grading are
42
- already in this conversation's history. If this session somehow lacks that prior context (a resumed
43
- thread that did not carry forward), re-read these on-disk files before grading — they are reachable
44
- via the mounted directories:
42
+ already in this conversation's history. The files below stay reachable through the mounted
43
+ directories when you need the exact wording:
45
44
 
46
45
  - task contract — `{{CONTRACT_PATH}}` (the authoritative definition of done and the criteria you grade)
47
46
  - sprint journal — `{{PROGRESS_FILE}}` (append-only history of every prior task-attempt)
48
47
 
49
- Read them only when the prior context is missing; when the conversation already carries the
50
- specification, proceed directly to re-grading.
48
+ Proceed directly to re-grading.
51
49
  </session_context>
52
50
 
53
51
  <prior_progress>
@@ -65,6 +63,10 @@ For the complete history — older than the excerpt above — read `{{PROGRESS_F
65
63
  {{GENERATOR_HINTS_SECTION}}
66
64
 
67
65
  <evaluation_discipline>
66
+ If a `<generator_hints>` block is present, its notes are unverified generator claims — useful as environment
67
+ context (e.g. which server/port to target for e2e), but NEVER as evidence. Every `auto` criterion still
68
+ requires your own execution run.
69
+
68
70
  Before writing `signals.json`, work through each acceptance criterion and each floor dimension
69
71
  explicitly. For each, note the concrete observation that supports your PASS or FAIL, and record
70
72
  a preliminary verdict per criterion before moving to the next — do not defer all verdicts to the
@@ -72,24 +74,10 @@ end. The final `signals.json` is the only machine-readable output and must come
72
74
  </evaluation_discipline>
73
75
 
74
76
  <protocol>
75
- **Checkpoint write — do this first, before re-grading**
76
-
77
- If you have not already written a checkpoint `signals.json` for this round, write an `evaluation`
78
- signal now before continuing. Use `status: "failed"`, all five floor dimensions present, each set
79
- to `passed: false` with `finding: "assessment in progress"`. Use the path named in the output
80
- contract section at the bottom of this prompt. This placeholder is valid against the schema the
81
- harness validates — it ensures a recoverable file exists on disk if this session exhausts its
82
- token budget before you reach your final verdict. You will overwrite it after completing all steps
83
- below.
84
-
85
- {{EVALUATION_CHECKPOINT}}
86
-
87
77
  Re-grade this round the same way you graded the first:
88
78
 
89
- 1. Re-run each `auto` criterion's command directly. Do NOT run the verify script — the harness runs
90
- that independently as the commit gate. Exception: when the task has no `auto` criteria, run the
91
- verify script once as the fallback evidence source. The prior round's runs are stale; the
92
- generator changed the tree. If a command's result looks flaky — it disagrees with what the code
79
+ 1. Re-run each `auto` criterion's command directly (verify-script rule in `<grading_rules>`). The prior
80
+ round's runs are stale; the generator changed the tree. If a command's result looks flaky — it disagrees with what the code
93
81
  plainly does — re-run it once; if the two runs disagree, record the inconsistency itself as
94
82
  evidence, never a clean PASS.
95
83
 
@@ -97,35 +85,27 @@ Re-grade this round the same way you graded the first:
97
85
 
98
86
  2. Re-inspect the working tree and the uncommitted diff — this is your primary view of what changed
99
87
  this round. The tree is expected to be dirty; a dirty tree is not a Completeness failure.
100
- 3. Audit the diff for verification tampering — check whether this round's changes touch test files,
101
- fixtures, or verification tooling themselves. A criterion satisfied by weakening or deleting a test,
102
- adding a skip, or hardcoding an expected value is a Correctness FAIL, not a PASS — cite the specific
103
- diff hunk, even if you flagged the same file last round. When `<reproduction>` above is non-empty,
104
- this check extends to it: re-run its command yourself — the task cannot pass Correctness while that
105
- command still fails — and treat an unexplained edit to the reproduction test the same as any other
106
- tampering caught here.
88
+ 3. Audit this round's diff for verification tampering — apply the tampering rule in `<grading_rules>`.
107
89
  4. Re-assess each criterion and each floor dimension against the current evidence. When the changed
108
90
  behaviour is runnable (a command, a script, a service endpoint, or a test), execute the changed
109
91
  path again this round and cite the observed output — a diff read or a green verify script alone
110
92
  does not substitute for that observation. A criterion you passed last round can regress; one you
111
- failed can now be met — verify, do not assume. Exception — a criterion whose behaviour IS runnable
112
- but you were blocked from executing it here (missing credentials, no network, an environment gap) is
113
- graded `passed: false` with evidence beginning "UNVERIFIED:" plus what blocked you. A criterion that
114
- is not runnable by nature is never UNVERIFIED — grade it on cited `path:line` or equivalent
115
- behavioural evidence, same as the first round. Record each criterion's fresh verdict STRUCTURALLY in the
93
+ failed can now be met — verify, do not assume. A criterion you were blocked from executing
94
+ follows the UNVERIFIED rule in `<grading_rules>`. Record each criterion's fresh verdict STRUCTURALLY in the
116
95
  `evaluation` signal's `criteria` array — one entry per criterion with its `id`, a `passed` boolean,
117
96
  and a one-line `evidence` citation — in addition to the floor `dimensions`, so the harness keeps a
118
97
  durable per-criterion checklist across rounds.
119
- 5. When `status: "failed"`, write a critique whose every bullet names (a) the dimension, (b) the
120
- concrete observed behaviour, (c) the desired behaviour, and (d) where in the code or tests to
121
- look. A bullet missing (d) is itself a Completeness failure on re-evaluation.
98
+ 5. When `status: "failed"`, write the critique in the format defined in `<grading_rules>`.
122
99
 
123
100
  Do not run `git stash`, `git add`, or `git commit` — those are write operations. Do not run setup or
124
101
  migration commands — your session is read-only except for `signals.json`. The only file you may write
125
- is the `signals.json` named in the output contract below. You may additionally emit `learning` signals
102
+ is the `signals.json` named in the output contract below — plus, only when a command's output overflows the
103
+ evidence bound above, one overflow log in your session working directory (never inside the repository). You may additionally emit `learning` signals
126
104
  for durable insights discovered while grading; the `evaluation` signal remains exactly one and mandatory.
127
105
  </protocol>
128
106
 
107
+ {{EVALUATOR_GRADING_RULES}}
108
+
129
109
  <examples>
130
110
 
131
111
  <example id="1" label="FAIL — a criterion that passed in round 1 regresses in round 2">
@@ -8,8 +8,6 @@ No prior context is assumed — this session starts fresh. Read `progress.md` (p
8
8
  below) to orient yourself to decisions already made on this sprint before proceeding.
9
9
  </role>
10
10
 
11
- {{HARNESS_CONTEXT}}
12
-
13
11
  <goal>
14
12
  Produce one `ideated-tickets` signal in `<outputDir>/signals.json` containing a JSON-encoded object with
15
13
  `requirements` (approved markdown from Phase 1) and `tasks` (dependency-ordered array from Phase 2). Write
@@ -68,8 +66,8 @@ choices — honour them; do not re-litigate a prior decision without surfacing w
68
66
  - Write `signals.json` only after both phases are approved — never earlier.
69
67
  - Do not write code, patches, or any file other than `signals.json`.
70
68
  - Do not modify repository files — the repositories are mounted read-only for exploration.
71
- - `projectPath` on every task MUST match an absolute path listed under `<repositories>`.
72
- - Verification criterion `command` fields MUST use the project's own commands — never hardcode a
69
+ - `projectPath` on every task must match an absolute path listed under `<repositories>`.
70
+ - Verification criterion `command` fields use the project's own commands — never hardcode a
73
71
  package-manager binary; read the project's manifest or context file for the actual command.
74
72
  - If Phase 2 is rejected by the user: revise the task plan based on their feedback and re-present it.
75
73
  You do not need to re-run Phase 1 — the approved requirements stand. Re-enter Phase 2 at Step 2.2.
@@ -114,7 +112,7 @@ capability your runtime exposes. Labels are 1–5 words; headers are 12 characte
114
112
  constraints). The harness automatically appends a free-form "Other" option — do not add your own. Work
115
113
  through the dimensions above in priority order.
116
114
 
117
- Stop asking when ALL of the following are true:
115
+ Stop asking when all of the following are true:
118
116
 
119
117
  1. Problem statement is clear and agreed.
120
118
  2. Every requirement has at least one acceptance criterion.
@@ -124,8 +122,10 @@ Stop asking when ALL of the following are true:
124
122
 
125
123
  ### Step 1.2 — Present and obtain approval
126
124
 
127
- Present the requirements as readable markdown with sections for Problem, Acceptance Criteria, Scope,
128
- and Edge Cases. Then ask:
125
+ {{APPROVAL_GATE}}
126
+
127
+ Present the requirements with sections for Problem, Acceptance Criteria, Scope, and Edge Cases; the
128
+ Step 1.1 stop criteria are the checks to pass first. The approval question:
129
129
 
130
130
  ```
131
131
  Question: "Does this look correct? Any changes needed?"
@@ -136,7 +136,7 @@ Options:
136
136
  - "Give feedback" — "Type specific corrections in my own words."
137
137
  ```
138
138
 
139
- Iterate until approved. Record the approved requirements text for the `requirements` field of
139
+ Iterate until approved, re-running the approval gate after every revision. Record the approved requirements text for the `requirements` field of
140
140
  `outputJson`.
141
141
 
142
142
  ---
@@ -181,8 +181,9 @@ the manifest or project conventions already resolve.
181
181
 
182
182
  ### Step 2.3 — Present and obtain approval
183
183
 
184
- Present the task breakdown in readable markdown. List each task with its repository, `blockedBy`
185
- dependencies, and a short summary. Show the dependency order. Then ask:
184
+ {{APPROVAL_GATE}}
185
+
186
+ The approval question:
186
187
 
187
188
  ```
188
189
  Question: "Does this task breakdown look correct? Any changes needed?"
@@ -193,7 +194,7 @@ Options:
193
194
  - "Give feedback" — "Type specific corrections in my own words."
194
195
  ```
195
196
 
196
- Iterate until approved. If rejected, revise and re-present from Step 2.2 — Phase 1 approval stands
197
+ Iterate until approved. Step 2.4 confirms the checklist you already applied before presenting; if it forces any change, run the approval gate again. If rejected, revise and run the approval gate again from Step 2.2 — Phase 1 approval stands
197
198
  and does not need to be repeated.
198
199
 
199
200
  **Step 2.4 — Validate before output.**
@@ -247,7 +248,7 @@ for this session.
247
248
  - `learning` — for non-obvious repo facts discovered during exploration.
248
249
  - `decision` — for architectural choices made during planning.
249
250
 
250
- Emit nothing else. No prose responses, no explanatory comments outside the signals file.
251
+ The only file you write is `signals.json`. Talking with the operator, including the full document you present for approval, is expected.
251
252
 
252
253
  **Failure mode.** If you cannot produce a plan (contradictory requirements, missing context that the user
253
254
  cannot resolve interactively): emit one `ideated-tickets` signal with `requirements` set to whatever you
@@ -51,7 +51,7 @@ only after every declared step is done and every verification command passes.
51
51
 
52
52
  Read the per-task contract at `{{CONTRACT_PATH}}` before implementing. It is the authoritative
53
53
  definition of done. Each criterion is tagged `auto` (the evaluator runs the listed command) or
54
- `manual` (the evaluator inspects the code) — your implementation MUST make every criterion pass
54
+ `manual` (the evaluator inspects the code) — your implementation must make every criterion pass
55
55
  under its declared check type.
56
56
 
57
57
  {{TASK_DESCRIPTION_SECTION}}
@@ -123,6 +123,21 @@ repository now, trust the repository and record the conflict as a `learning` sig
123
123
  asserts — doing so otherwise counts as task failure. If the right move is genuinely ambiguous, emit
124
124
  `task-blocked` so a human can decide rather than silently weakening a test to make a failure
125
125
  disappear.
126
+ - **Keep every action reversible.** Do not run `git reset --hard`, force-push, skip hooks
127
+ (`--no-verify`), or delete files you did not create — except when a declared step explicitly
128
+ calls for it. The harness commits your work and a maintainer reviews it; destructive actions
129
+ cannot be undone from there.
130
+ - **Do not special-case tests to make them pass** (hardcoding expected values, detecting the test
131
+ environment). When you believe a test itself is wrong, say so in a `note` signal instead of
132
+ bending the implementation around it.
133
+ - **Clean up after yourself.** Remove scratch files, debug output, and temporary scripts you
134
+ created before finishing — they would otherwise be committed with the task.
135
+ - **Stay in scope.** Change what the steps request or clearly require. Do not add unrequested
136
+ abstractions, docstrings, or compatibility shims; when you spot a worthwhile extra, list it in a
137
+ `note` signal rather than doing it.
138
+ - **When checks pass, stop and report.** Do not start extra review rounds or spawn reviewer
139
+ sub-agents over finished work — the evaluator is the independent review, and duplicating it
140
+ inflates cost.
126
141
  - **Do not write to the progress file.** It is harness-owned and append-only — your signals are
127
142
  appended to it when this attempt settles, not overwritten. A direct write here permanently
128
143
  pollutes the durable journal for every future round and every future session that reads it. Emit
@@ -200,8 +215,12 @@ on the first attempt, not to discover problems after the fact.
200
215
  configured (e.g. the first task of a fresh setup), run it once yourself to establish the
201
216
  baseline before changing anything. If `<pre_verify_results>` is empty and no verify script is
202
217
  configured, run the project's own verification commands (consult the project's AI context file
203
- when present, or project config). If any check shows a pre-existing failure, stop immediately:
204
- emit `task-blocked` with reason `"Pre-existing failure: [details]"`.
218
+ when present, or project config). Classify any red check before acting on it:
219
+ a failure the task exists to fix is the expected starting point — proceed. A red baseline the
220
+ harness already accepted (present in `<pre_verify_results>` — the operator chose to proceed on
221
+ a broken tree) is not a blocker either — do not stop for it, and leave failures unrelated to
222
+ your steps alone. A failure unrelated to this task's declared scope that you discover
223
+ yourself blocks the task: emit `task-blocked` with reason `"Pre-existing failure: [details]"`.
205
224
  If `<retry_feedback>` is non-empty, a previous attempt's harness post-verify failed — address
206
225
  that regression as the very first priority of this attempt before doing any other work.
207
226
  7. **Conventions** — read project config to understand what is enforced: lint and formatter settings,
@@ -249,7 +268,7 @@ In order:
249
268
  1. **Confirm all steps done** — every declared step has been completed.
250
269
  2. **Run each `auto` criterion's command once** and fix any failures before proceeding. If a
251
270
  command fails intermittently, re-run it once; if the two runs disagree, report the inconsistency
252
- as evidence in `task-verified` rather than asserting a clean pass or fail. Do NOT run the verify
271
+ as evidence in `task-verified` rather than asserting a clean pass or fail. Don't run the verify
253
272
  script from `<verify_script>` — the harness runs it after your turn as the independent commit
254
273
  gate; running it yourself would duplicate that gate and inflate cost. Exception: when the task
255
274
  defines no `auto` criteria, run the verify script once yourself to confirm no regressions before
@@ -291,9 +310,9 @@ In order:
291
310
  commits after this turn using your wording verbatim. The fallback when you omit the signal is just
292
311
  the task name and description paragraph — thin context. Emit it on every task that touched any
293
312
  file. Omit only when the task was a pure investigation that wrote nothing.
294
- 6. **Signal completion** — emit `task-complete` ONLY after all the above steps pass. Then, as the
313
+ 6. **Signal completion** — emit `task-complete` only after all the above steps pass. Then, as the
295
314
  very LAST action of this turn, write exactly ONE file — `signals.json` — to the absolute path
296
- named in the Output contract section below. That file is the ONLY channel the harness reads:
315
+ named in the Output contract section below. That file is the only channel the harness reads:
297
316
  your code changes and your messages are invisible to it, so a turn that skips this write is
298
317
  treated as producing no work at all, no matter how much you did.
299
318
 
@@ -313,13 +332,14 @@ changes. Fix and re-verify. If unfixable after a reasonable attempt, emit `task-
313
332
  concrete failure as the `reason`.
314
333
 
315
334
  **Tests break.** Determine whether your changes or a pre-existing issue caused the failure (see the
316
- test-weakening rule in `<constraints>`). If pre-existing: emit `task-blocked` with
317
- `reason: "Pre-existing test failure: [details]"`.
335
+ test-weakening rule in `<constraints>`). If pre-existing and unrelated to this
336
+ task's declared scope (and not already accepted in `<pre_verify_results>`): emit `task-blocked`
337
+ with `reason: "Pre-existing test failure: [details]"`.
318
338
 
319
339
  **Blocked by another task.** Emit `task-blocked` with
320
340
  `reason: "Missing dependency: [what is missing and which task should produce it]"`,
321
341
  `blockerClass: "missing-information"`, a `question` naming exactly what is missing, and
322
- `whatUnblocksMe` naming which task or artifact must land first. Do NOT stub or mock the missing piece.
342
+ `whatUnblocksMe` naming which task or artifact must land first. Don't stub or mock the missing piece.
323
343
 
324
344
  **Scope seems wrong.** See the scope rule in Phase 2 step 3 above — emit `task-blocked` with
325
345
  `blockerClass: "ambiguous-request"`, a `question` asking which scope was intended, and
@@ -12,19 +12,19 @@ compaction.
12
12
 
13
13
  {{AUTONOMOUS_OPERATION}}
14
14
 
15
+ {{PARALLEL_TOOL_CALLS}}
16
+
15
17
  <session_context>
16
18
  This is a continuation turn — the brief, the contract, and your prior rounds are already in this
17
19
  conversation's history. The done-criteria in `<task_criteria>` below and the no-test-weakening rule
18
20
  in `<success_criteria>` below are restated every round regardless of what the conversation already
19
- carries, so a compacted or cold-resumed session is never left missing them. If this session lacks
20
- the REST of that prior context (a resumed thread that did not carry forward), re-read these on-disk
21
- files before acting — they are reachable via the mounted directories:
21
+ carries. The files below stay reachable through the mounted directories when you need the exact
22
+ wording:
22
23
 
23
24
  - task contract — `{{CONTRACT_PATH}}`
24
25
  - sprint journal — `{{PROGRESS_FILE}}` (append-only history of every prior task-attempt)
25
26
 
26
- Read them only when the prior context is missing beyond what is restated below; when the
27
- conversation already carries the brief, proceed directly to the critique.
27
+ Proceed directly to the critique.
28
28
  </session_context>
29
29
 
30
30
  <task_criteria>
@@ -9,8 +9,6 @@ No prior context is assumed — this is a fresh planning session. Read `progress
9
9
  under `<prior_progress>` below) to orient yourself before starting.
10
10
  </role>
11
11
 
12
- {{HARNESS_CONTEXT}}
13
-
14
12
  <goal>
15
13
  Produce a dependency-ordered task array and write it as a `task-plan` signal to
16
14
  `signals.json` in your output directory, once the user has approved the plan.
@@ -29,13 +27,14 @@ Produce a dependency-ordered task array and write it as a `task-plan` signal to
29
27
  </success_criteria>
30
28
 
31
29
  <session_topology>
32
- Your working directory for this session is a harness-managed session directory — you are NOT
30
+ Your working directory for this session is a harness-managed session directory — you are not
33
31
  running inside any project repository.
34
32
 
35
33
  The project repositories listed under `<repositories>` are mounted as read-only sources
36
- you can explore — each one has equal access weight; no single repository is primary. Read
37
- and search them to understand the codebase, but write nothing into them. The only file you
38
- may write in this session is `signals.json` in your output directory.
34
+ you can explore. Read and search them to understand the codebase, but write nothing into
35
+ them: no scaffolding, no stubs, no fixups. If you catch yourself reaching for an edit on a
36
+ repository file, stop and capture the change as a task step instead. The only file you may
37
+ write in this session is `signals.json` in your output directory.
39
38
  </session_topology>
40
39
 
41
40
  <inputs>
@@ -52,8 +51,7 @@ may write in this session is `signals.json` in your output directory.
52
51
 
53
52
  <repositories>{{REPOSITORIES}}</repositories>
54
53
 
55
- All paths above are fixed — repository selection is not part of this session. Every
56
- repository has equal weight; do not favour any one when assigning tasks.
54
+ All paths above are fixed — repository selection is not part of this session.
57
55
 
58
56
  ## Prior progress on this sprint
59
57
 
@@ -84,14 +82,9 @@ If `<existing_tasks>` is empty, this is a fresh plan — there is nothing to rep
84
82
  </inputs>
85
83
 
86
84
  <constraints>
87
- - **Read-only on all repositories** — read and search repository files to understand
88
- existing patterns, but do not modify, create, or delete any file inside them. No
89
- scaffolding, no stubs, no fixups. If you catch yourself reaching for an edit on a
90
- repository file, stop: capture the change as a task step instead.
91
85
  - **One coherent feature per task** — size tasks by what a single AI session can implement
92
- and verify end-to-end. A task that is too small creates serial chains, duplicate context
93
- reloads, and merge conflicts; a task that is too large is hard to verify. Use the Task
94
- Sizing rules below to decide.
86
+ and verify end-to-end. Too small creates serial chains, duplicate context reloads, and
87
+ merge conflicts; too large is hard to verify. The Task Sizing rules below decide.
95
88
  - **Files are owned, not shared** — each file should be edited by exactly one task. When
96
89
  two tasks must touch the same file, sequence them via `blockedBy`.
97
90
  - **Verifiable end states** — every task ends with at least one verification command and
@@ -108,7 +101,7 @@ If `<existing_tasks>` is empty, this is a fresh plan — there is nothing to rep
108
101
  Prefer fewer, well-grounded tasks over a complete-looking plan padded with speculative ones —
109
102
  drop any step that isn't grounded in the ticket or the code you explored; a wrong plan step
110
103
  costs more than an absent one.
111
- - **Equal repository weight** — all paths in `<repositories>` have equal standing. Do not
104
+ - **Equal repository weight** — all paths in `<repositories>` have equal standing. Don't
112
105
  favour the first repository when assigning tasks; distribute by where the work actually
113
106
  belongs.
114
107
  </constraints>
@@ -116,8 +109,7 @@ If `<existing_tasks>` is empty, this is a fresh plan — there is nothing to rep
116
109
  <capabilities>
117
110
  You can read files in any of the mounted repository paths and in your output directory. You
118
111
  can run shell commands to search repositories (grep, find, list files). You can write one
119
- file: `signals.json` in your output directory. You cannot modify files inside the
120
- repositories.
112
+ file: `signals.json` in your output directory.
121
113
  </capabilities>
122
114
 
123
115
  ## Output target
@@ -182,10 +174,6 @@ Right size:
182
174
  - "Centralise date formatting across all sections" — creates utility AND updates all usages.
183
175
  - "Improve style robustness in interactive components" — handles multiple related files.
184
176
 
185
- ### Anti-Patterns
186
-
187
- - Separate tasks for "create utility" and "integrate utility" — merge create+use into one.
188
-
189
177
  ### Dependency Graph
190
178
 
191
179
  Tasks execute in dependency order — foundations before dependents.
@@ -348,7 +336,10 @@ Bad questions:
348
336
 
349
337
  ### Step 4 — Present the plan for review
350
338
 
351
- Present the proposed task list in readable markdown:
339
+ {{APPROVAL_GATE}}
340
+
341
+ Format each task in the presented plan like this, and explain under the dependency order why each
342
+ dependency exists:
352
343
 
353
344
  ```markdown
354
345
  ### Task 1 — {name}
@@ -356,6 +347,7 @@ Present the proposed task list in readable markdown:
356
347
  **Ticket:** {ticket title}
357
348
  **Repository:** {projectPath}
358
349
  **Depends on:** {none | task ids}
350
+ **Description:** ...
359
351
 
360
352
  **Steps:**
361
353
 
@@ -364,12 +356,10 @@ Present the proposed task list in readable markdown:
364
356
 
365
357
  **Verification criteria:**
366
358
 
367
- - ...
359
+ - ... (check type, command)
368
360
  ```
369
361
 
370
- Show the dependency graph as a list under the tasks; explain why each dependency exists.
371
-
372
- Then ask for approval via a structured multiple-choice prompt — do not ask in prose ("does
362
+ The approval question goes last, via a structured multiple-choice prompt — do not ask in prose ("does
373
363
  this look right?"). Prose answers are ambiguous and the harness cannot act on them.
374
364
 
375
365
  - **Question:** "Does this task breakdown look correct?"
@@ -379,9 +369,10 @@ this look right?"). Prose answers are ambiguous and the harness cannot act on th
379
369
  - "Give feedback" — Type specific corrections in my own words.
380
370
 
381
371
  If the user picks "Needs changes" or "Give feedback", apply their input, revise the tasks,
382
- re-present the full plan and dependency graph, then re-ask the same structured approval
383
- question. Iterate until the user picks "Approved, write it". Only after that approval
384
- proceed to Step 5.
372
+ run the approval gate again with the full plan and dependency order, then re-ask the same
373
+ structured approval question. Iterate until the user picks "Approved, write it". Step 5 runs the same checklist the gate asked you
374
+ to apply before presenting; treat it as a confirmation. If it forces any change, run the approval gate
375
+ again before writing.
385
376
 
386
377
  **Step 5 — Validate before output.**
387
378