Define the ruled_by vocabulary, a prediction id, and a session id for docs/decisions/rulings.tsv #1757

Closed
opened 2026-11-13 20:10:50 +00:00 by jared · 1 comment
Owner

Problem

The ruled_by column of docs/decisions/rulings.tsv is free text, and a predicted row has no id of its Prediction. So no program can count rulings by rung, and no program can join a predicted row to its record in ~/dev/os-me-store/prediction-log.jsonl. The chain scoring step needs both.

Observed

Counts on 2026-11-13 over 164 rows:

  • ruled_by has 14 distinct spellings: predicted 87, orchestrator 32, os-me predict 18, Jared 9, jared 7, human 2, predict 2, and 7 free-text values with 1 row each, for example predicted (80) and Jared (route), orchestrator (fallback).
  • plugins/os-context/prompts/session-start/40-decisions.md defines four values: orchestrator, outcome, nearest, predicted. It defines no value for a ruling that Jared gives. 19 rows name Jared or human.
  • No row uses outcome or nearest.
  • The tier column has jared in 4 rows and human in 2 rows. These are not tiers.
  • Four ids occur two times each: 16, 24, 25, 140.
  • The file has no session column. The header is id date tier question ruling ruled_by confidence sha_before undo. So a row can be joined to its transcript only by date and text.
  • The manual join of 2026-11-13 (docs/decision-system/backfill/2026-11-13-rulings-chain-join.tsv) could not find the session of file line 83 (id 79). It gave 18 rows a held-out session by inference from queue time, and 7 rows a session by inference from commit time.
  • 29 rows that name a prediction have no integer in confidence.
  • No row has a prediction id. The prediction-log record id has the form session:<n> with a session_id field.
  • 40-decisions.md says: "Write - in sha_before and undo." ADR-0304 decision 2 says that a row with confidence under 75% carries the SHA and the undo command. The two texts do not agree.
  • No Ruby file under plugins/ reads docs/decisions/rulings.tsv today. ADR-0304 names readers in os-me predict and os-sdlc decision-tiers.

Reproduce

n/a: data and convention ticket.

Approach

An ADR is required. ADR-0304 fixes the file location and the nine columns. It does not define the ruled_by values. A closed ruled_by set that code parses is parsed vocabulary, and a prediction id changes the fixed column set or the format of an existing column. Each is a one-way door. Run /os-adr:create for a decision that supersedes ADR-0304, and accept its verdict.

The decision must give:

  • The closed ruled_by set. Proposed: orchestrator, outcome, nearest, predicted, jared.
  • Where a predicted row carries its prediction id (a new column, or a fixed format in an existing column), and the id format that joins to prediction-log.jsonl.
  • Where each row carries the session id of the session that wrote it. The ADR must cover the session id as well as the prediction id. The log record id is session:<n> and is unique only with session_id; #1233 changes the id format, so decide the join format with #1233 in view.
  • Which of the two sha_before and undo texts is correct.
  • The migration of the 164 existing rows, with unique ids.

Required work: none beyond the acceptance criteria.

Orchestrator work: /os-adr:create; update plugins/os-context/prompts/session-start/40-decisions.md and plugins/os-me/skills/predict/SKILL.md to the decided format; migrate the existing rows; bin/refresh-plugins.

Acceptance criteria

  1. Given the migrated file, when a script counts the distinct ruled_by values, then each value is in the closed set.
  2. Given a row with ruled_by = predicted written after the change, when a script reads its prediction id, then the id finds one record in prediction-log.jsonl.
  3. Given the migrated file, when a script counts ids, then each id occurs one time.
  4. Given a row written after the change, when a script reads its session id, then the id names one transcript file.
  5. Given the ADR index, when a person reads it, then an Accepted ADR defines the ruled_by set, the prediction id, and the session id, and ADR-0304 shows the ADR that supersedes it.

#1753 depends on this ticket.

Origin

  • Trigger: the os-me check of 2026-11-13 in session 2bb44e9c. Jared asked how the os-me outcome function works and said "We definitely need to get this back on track. /os-me:predict desired outcome, how to get there, then do it!" The applied Prediction (docs/decisions/rulings.tsv row 161) sends this work to a ticket.
  • Improvised this session: the manual backfill of 2026-11-13 joins rows to predictions by date, session, and question text
  • Chain: rows cannot be joined or counted ← ruled_by is free text and no prediction id exists ← ADR-0304 fixes the columns but defines no values, and 40-decisions.md defines four values with no check ← DESIGN (docs/adr/0304-applied-predictions-are-recorded-in-docs-decisions-rulings-tsv-with-a-fixed-column-set.md)
  • Root candidate: none found; searched ruled_by, rulings.tsv, ADR-0304, prediction id, prediction_id, prediction-log
  • Where: docs/decisions/rulings.tsv; plugins/os-context/prompts/session-start/40-decisions.md; docs/adr/0304-applied-predictions-are-recorded-in-docs-decisions-rulings-tsv-with-a-fixed-column-set.md
  • Session: 2bb44e9c-522c-4c97-8449-bd46bed898e0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2bb44e9c-522c-4c97-8449-bd46bed898e0.jsonl

VERDICT: CREATE (ticket-skeptic, 2026-11-13): design gaps the session did not cause; #1753 needs the id join; no open ticket defines this vocabulary or id.

## Problem The `ruled_by` column of `docs/decisions/rulings.tsv` is free text, and a predicted row has no id of its Prediction. So no program can count rulings by rung, and no program can join a predicted row to its record in `~/dev/os-me-store/prediction-log.jsonl`. The chain scoring step needs both. ## Observed Counts on 2026-11-13 over 164 rows: - `ruled_by` has 14 distinct spellings: `predicted` 87, `orchestrator` 32, `os-me predict` 18, `Jared` 9, `jared` 7, `human` 2, `predict` 2, and 7 free-text values with 1 row each, for example `predicted (80)` and `Jared (route), orchestrator (fallback)`. - `plugins/os-context/prompts/session-start/40-decisions.md` defines four values: `orchestrator`, `outcome`, `nearest`, `predicted`. It defines no value for a ruling that Jared gives. 19 rows name Jared or `human`. - No row uses `outcome` or `nearest`. - The `tier` column has `jared` in 4 rows and `human` in 2 rows. These are not tiers. - Four ids occur two times each: 16, 24, 25, 140. - The file has no session column. The header is `id date tier question ruling ruled_by confidence sha_before undo`. So a row can be joined to its transcript only by date and text. - The manual join of 2026-11-13 (`docs/decision-system/backfill/2026-11-13-rulings-chain-join.tsv`) could not find the session of file line 83 (id 79). It gave 18 rows a held-out session by inference from queue time, and 7 rows a session by inference from commit time. - 29 rows that name a prediction have no integer in `confidence`. - No row has a prediction id. The prediction-log record id has the form `session:<n>` with a `session_id` field. - `40-decisions.md` says: "Write `-` in `sha_before` and `undo`." ADR-0304 decision 2 says that a row with confidence under 75% carries the SHA and the undo command. The two texts do not agree. - No Ruby file under `plugins/` reads `docs/decisions/rulings.tsv` today. ADR-0304 names readers in os-me predict and os-sdlc decision-tiers. ## Reproduce n/a: data and convention ticket. ## Approach An ADR is required. ADR-0304 fixes the file location and the nine columns. It does not define the `ruled_by` values. A closed `ruled_by` set that code parses is parsed vocabulary, and a prediction id changes the fixed column set or the format of an existing column. Each is a one-way door. Run `/os-adr:create` for a decision that supersedes ADR-0304, and accept its verdict. The decision must give: - The closed `ruled_by` set. Proposed: `orchestrator`, `outcome`, `nearest`, `predicted`, `jared`. - Where a predicted row carries its prediction id (a new column, or a fixed format in an existing column), and the id format that joins to `prediction-log.jsonl`. - Where each row carries the session id of the session that wrote it. The ADR must cover the session id as well as the prediction id. The log record id is `session:<n>` and is unique only with `session_id`; #1233 changes the id format, so decide the join format with #1233 in view. - Which of the two `sha_before` and `undo` texts is correct. - The migration of the 164 existing rows, with unique ids. Required work: none beyond the acceptance criteria. Orchestrator work: `/os-adr:create`; update `plugins/os-context/prompts/session-start/40-decisions.md` and `plugins/os-me/skills/predict/SKILL.md` to the decided format; migrate the existing rows; `bin/refresh-plugins`. ## Acceptance criteria 1. Given the migrated file, when a script counts the distinct `ruled_by` values, then each value is in the closed set. 2. Given a row with `ruled_by` = `predicted` written after the change, when a script reads its prediction id, then the id finds one record in `prediction-log.jsonl`. 3. Given the migrated file, when a script counts ids, then each id occurs one time. 4. Given a row written after the change, when a script reads its session id, then the id names one transcript file. 5. Given the ADR index, when a person reads it, then an Accepted ADR defines the `ruled_by` set, the prediction id, and the session id, and ADR-0304 shows the ADR that supersedes it. #1753 depends on this ticket. ## Origin - Trigger: the os-me check of 2026-11-13 in session 2bb44e9c. Jared asked how the os-me outcome function works and said "We definitely need to get this back on track. /os-me:predict desired outcome, how to get there, then do it!" The applied Prediction (docs/decisions/rulings.tsv row 161) sends this work to a ticket. - Improvised this session: the manual backfill of 2026-11-13 joins rows to predictions by date, session, and question text - Chain: rows cannot be joined or counted ← ruled_by is free text and no prediction id exists ← ADR-0304 fixes the columns but defines no values, and 40-decisions.md defines four values with no check ← DESIGN (docs/adr/0304-applied-predictions-are-recorded-in-docs-decisions-rulings-tsv-with-a-fixed-column-set.md) - Root candidate: none found; searched ruled_by, rulings.tsv, ADR-0304, prediction id, prediction_id, prediction-log - Where: docs/decisions/rulings.tsv; plugins/os-context/prompts/session-start/40-decisions.md; docs/adr/0304-applied-predictions-are-recorded-in-docs-decisions-rulings-tsv-with-a-fixed-column-set.md - Session: 2bb44e9c-522c-4c97-8449-bd46bed898e0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2bb44e9c-522c-4c97-8449-bd46bed898e0.jsonl VERDICT: CREATE (ticket-skeptic, 2026-11-13): design gaps the session did not cause; #1753 needs the id join; no open ticket defines this vocabulary or id.
jared changed title from Define the ruled_by vocabulary and a prediction id for docs/decisions/rulings.tsv to Define the ruled_by vocabulary, a prediction id, and a session id for docs/decisions/rulings.tsv 2026-11-13 20:24:47 +00:00
Author
Owner

Resolution

Done: ADR-0313 (Accepted) supersedes ADR-0304: rulings.tsv has 11 columns with prediction_id and session_id; ruled_by is a closed set (jared, outcome, predicted, orchestrator; nearest is dropped, rungs 1 and 2 write outcome). 165 rows migrated; ids unique (16b, 24b, 25b, 140b); 40-decisions.md states the new header and rules; sha_before and undo carry values when confidence is under 75%.

Evidence: ADR commit a69dc050b; migration commit f0623e8898. Check script: every row has 11 fields; ruled_by values are orchestrator 34, predicted 111, jared 20; all ids unique. Row 161 carries prediction_id session:1 and its session id; that pair finds 1 record in prediction-log.jsonl and 1 transcript file. No Ruby code reads or writes docs/decisions/rulings.tsv (searched plugins/ and bin/).

Follow-ups: #1753 (unblocked: scoring from later corrections uses the join). 119 old rows have no session_id and all old rows but 161 have no prediction_id: dropped, the chain join had no exact value. outcome_node in the Store log: the judge ruled it not an ADR matter; storing it stays with #1753/#1756. The fast-batch and crc ledgers keep their own ruled_by values (different files): dropped.

## Resolution **Done:** ADR-0313 (Accepted) supersedes ADR-0304: rulings.tsv has 11 columns with prediction_id and session_id; ruled_by is a closed set (jared, outcome, predicted, orchestrator; nearest is dropped, rungs 1 and 2 write outcome). 165 rows migrated; ids unique (16b, 24b, 25b, 140b); 40-decisions.md states the new header and rules; sha_before and undo carry values when confidence is under 75%. **Evidence:** ADR commit a69dc050b; migration commit f0623e88980bfad4247879e20c10b90bb90f336a. Check script: every row has 11 fields; ruled_by values are orchestrator 34, predicted 111, jared 20; all ids unique. Row 161 carries prediction_id session:1 and its session id; that pair finds 1 record in prediction-log.jsonl and 1 transcript file. No Ruby code reads or writes docs/decisions/rulings.tsv (searched plugins/ and bin/). **Follow-ups:** #1753 (unblocked: scoring from later corrections uses the join). 119 old rows have no session_id and all old rows but 161 have no prediction_id: dropped, the chain join had no exact value. outcome_node in the Store log: the judge ruled it not an ADR matter; storing it stays with #1753/#1756. The fast-batch and crc ledgers keep their own ruled_by values (different files): dropped. <!-- os-backlog kind: resolution -->
jared closed this issue 2026-11-13 21:51:28 +00:00
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#1757
No description provided.