Repository navigation
L08-01 — Define indexed decision state and one-request question contract #61
Description
Outcome
Specify the Decision module's observe → ask → validate contract after jev-ultrafast's action_space/choose/validate_choice:
- DecisionState snapshot. One atomic read of an exact Core receipt/revision produces an indexed candidate table. Each row carries a code-owned index, its kind (finding, registered operation, Medic route, enumerated parameter value), label, current value/state, and the Core identity it maps to. The model sees indices; Core identities never leave the module. One Core object gets one index even when several operations apply to it.
- Dynamic question space. The
operationhead offers only operations the deterministic eligibility for this task already admits, plusABSTAINandNO_ACTION. Each operation gets its own<operation>_targethead whose criteria list only compatible rows; a parameter choice is a code-ownedrow:optionindex, like jev's native-select options. - One request. Operation and all target heads are sent together. Each target question names the operation it assumes, because the heads run independently and cannot see each other's answers.
- Typed answer.
choice,probabilitiesover exactly the offered IDs,confidence, reason codes, and the exact request/evidence/policy/model/provider identity. - Candidate cap. A fixed per-task limit; rows beyond it are recorded as truncated and are not selectable.
Parent and boundary
Parent: #9. Owner: proposed Decision module. This issue owns one bounded slice of Bounded Decision Worker; consume accepted upstream contracts and keep PDF/verdict/publication authority with Core.
Acceptance
- Validation rejects (no actionable observation) when: the choice is not an offered ID; the probability keys differ from the offered set; values are non-finite or outside [0,1]; the sum is outside 1 ± 0.02; the choice is not the argmax; the selected operation's target head is missing or invalid; the evidence is incomplete.
- Only the selected operation's target head can become an observation. Unused heads are retained for audit and have no other effect.
- Failure case: the schema has no approve, PASS, publication, path, selector, free parameter, or arbitrary tool-call field. A response that names a non-offered or truncated row fails closed.
Required proof
Contract parser, a table-building fixture (one row per Core object; incompatible targets excluded per head; truncation), and adversarial malformed-output fixtures that mirror jev's invalid operation/target tests. Record the exact source SHA, test command or hosted run, fixture/artifact identity, and any skipped or unavailable lane. Run the repository's mapped proof and check-change gate for a PR.
Handoff
Record changed files, observed result, remaining risk, and a 1–3 sentence anti-slop review. Completion means acceptance evidence, not merely a merged implementation.
Sources
Approved master roadmap · Legacy/research input · North Star: jev-ultrafast@1231850a; see the translation table in #9.
Generated by Claude Code
Activity
[-]L08-01 — Define typed observation port[/-][+]L08-01 — Define indexed decision state and one-request question contract[/+]