Model stages: outcome-first output shape and one in-session outcome repair
The prompt now says output.md must start with # outcome and the outcome word alone on the next line, then # handoff, then detail. Runs 241/243 followed the old "start with # handoff" wording and dropped the outcome. When a completed turn lacks a valid outcome, the OpenCode/agent and Pi clients send one short follow-up in the same session asking only for the outcome line. An outcome-only reply goes at the top of the original report; a still-invalid reply fails with the same validation error as before. The follow-up's tokens accrue to the session usage. No outcome is inferred. Missing tools/evidence now name blocked when declared, else error. The parser tolerates a trailing period on the outcome word.
This commit is contained in:
+12
-2
@@ -59,12 +59,21 @@ success
|
||||
The rest of the output is free-form markdown.
|
||||
```
|
||||
|
||||
Matching ignores case and surrounding whitespace and returns the canonical edge
|
||||
Matching ignores case, surrounding whitespace and one trailing period, and returns the canonical edge
|
||||
spelling. Headings and words inside fenced code blocks are ignored, so a code
|
||||
sample cannot add a false outcome. Missing, duplicate, empty or undeclared
|
||||
outcomes fail the stage. The parser never guesses, repairs the text, or looks for
|
||||
any other section.
|
||||
|
||||
When a turn completes but its final message has no valid outcome, the harness
|
||||
client (OpenCode or Pi) sends one short follow-up in the same session asking
|
||||
only for the `# outcome` line and listing the allowed outcomes, without redoing
|
||||
work. An outcome-only reply is placed at the top of the original output (any
|
||||
invalid outcome section is replaced); a full reply replaces it. The outcome is
|
||||
always the model's explicit answer, never inferred from prose. Its tokens count
|
||||
toward the stage usage. If the reply is still invalid, the stage fails with the
|
||||
same validation error as before.
|
||||
|
||||
Everything after the outcome value line is retained as the turn body under the
|
||||
single `markdown` key of the internal output map. No JSON envelope, output
|
||||
schema, field selection, `output_contract`, or format-repair pass exists for
|
||||
@@ -81,7 +90,8 @@ facts:
|
||||
- the paths to `memory.md`, `input.md` and `output.md` (or their contents for a
|
||||
text-only stage);
|
||||
- the stage prompt verbatim;
|
||||
- the worked outcome example and the complete allowed outcome list;
|
||||
- the required shape, outcome first (`# outcome` and one of the allowed
|
||||
outcomes, then `# handoff`, then any detail), with a worked example;
|
||||
- the execution time and timezone;
|
||||
- a granted resource target, when one exists;
|
||||
- the writable `private/` and shared `public/` artifact directories, when they
|
||||
|
||||
Reference in New Issue
Block a user