Define the weighted-decision block format and threshold sweep #248

Closed
opened 2026-08-03 22:07:48 +00:00 by jared · 2 comments
Owner

Map: #239
Blocked by #241

Question

What is the machine-parseable format for weighted-recommendation decision blocks in ticket bodies (percentage, reasoning, reversal cost), and how does the recommender-blind sweep read them — where does the threshold live so the recommending agent can never see it?

Map: #239 Blocked by #241 ## Question What is the machine-parseable format for weighted-recommendation decision blocks in ticket bodies (percentage, reasoning, reversal cost), and how does the recommender-blind sweep read them — where does the threshold live so the recommending agent can never see it?
jared self-assigned this 2026-08-04 10:42:18 +00:00
Author
Owner

Resolution

Decided (grilling session 2026-08-04):

  1. Block format: fenced YAML. Each decision child's body ends with a ```yaml fence carrying fixed keys — recommendation, confidence (integer %), reversal_cost (cheap|moderate|expensive), reasoning (one line). Prose A/B analysis (decision-memo format) stays in ordinary markdown above it. Renders legibly for humans, parses with any YAML loader, and a missing/malformed block is trivially detectable.
  2. Threshold lives in a tested Ruby sweep CLI under plugins/os-backlog/ (e.g. bin/decision-sweep): fetches decision children, parses the blocks, emits pass/fail. The recommending agent's skill never mentions the number — blindness holds structurally because the gate is code the recommender never loads (same principle as os-sdlc's gate-logic-in-Ruby rule). Rejected: config-file (readable by any agent, blindness by convention only) and prompt-held threshold.
  3. Sweep action — pass: auto-close; fail: route human. Pass (confidence ≥ threshold AND reversal_cost: cheap): sweep adopts the recommendation and closes the child with the three-part resolution comment (#244) citing the block. Fail (below threshold, non-cheap reversal, or malformed/missing block): comment naming the failed gate + ready-for-human, stays open for HITL. Composes with #240's no-partial-execution rule: assembly still waits for every decision child to close, by either path.

Implementation of the CLI itself is sequencing fog for after this map (related: #186 deterministic ticket-filing CLI surface).

## Resolution Decided (grilling session 2026-08-04): 1. **Block format: fenced YAML.** Each decision child's body ends with a ```yaml fence carrying fixed keys — `recommendation`, `confidence` (integer %), `reversal_cost` (cheap|moderate|expensive), `reasoning` (one line). Prose A/B analysis (decision-memo format) stays in ordinary markdown above it. Renders legibly for humans, parses with any YAML loader, and a missing/malformed block is trivially detectable. 2. **Threshold lives in a tested Ruby sweep CLI** under `plugins/os-backlog/` (e.g. `bin/decision-sweep`): fetches decision children, parses the blocks, emits pass/fail. The recommending agent's skill never mentions the number — blindness holds structurally because the gate is code the recommender never loads (same principle as os-sdlc's gate-logic-in-Ruby rule). Rejected: config-file (readable by any agent, blindness by convention only) and prompt-held threshold. 3. **Sweep action — pass: auto-close; fail: route human.** Pass (confidence ≥ threshold AND `reversal_cost: cheap`): sweep adopts the recommendation and closes the child with the three-part resolution comment (#244) citing the block. Fail (below threshold, non-cheap reversal, or malformed/missing block): comment naming the failed gate + `ready-for-human`, stays open for HITL. Composes with #240's no-partial-execution rule: assembly still waits for every decision child to close, by either path. Implementation of the CLI itself is sequencing fog for after this map (related: #186 deterministic ticket-filing CLI surface).
jared closed this issue 2026-08-04 10:45:01 +00:00
Author
Owner

Amendment (2026-08-04, post-review)

Two clarifications folded into the merged design (docs/os-backlog-lifecycle.md, ea9d019) after Codex review of spec #250: (a) the sweep-failure ready-for-human explicitly overrides #246's wayfinder readiness-label exemption (sweep verdict, not readiness tier — ADR-0096 amended); (b) linkage grammar: refine appends Blocked by #NNN to the parent ticket per decision child, and "all children closed" is computed from those lines; an unfetchable reference is a validation failure. Mutation ordering: comment first, then labels/close; re-runs idempotent.

## Amendment (2026-08-04, post-review) Two clarifications folded into the merged design (`docs/os-backlog-lifecycle.md`, ea9d019) after Codex review of spec #250: (a) the sweep-failure `ready-for-human` explicitly overrides #246's wayfinder readiness-label exemption (sweep verdict, not readiness tier — ADR-0096 amended); (b) linkage grammar: refine appends `Blocked by #NNN` to the parent ticket per decision child, and "all children closed" is computed from those lines; an unfetchable reference is a validation failure. Mutation ordering: comment first, then labels/close; re-runs idempotent.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#248
No description provided.