Skip to content

A statement that may not answer its question is never kept as an example - #299

Open
sandeep-agami wants to merge 2 commits into
ACE-119-reconcile-prose-evidencefrom
ACE-120-reconcile-question-fit
Open

sandeep-agami wants to merge 2 commits into
ACE-119-reconcile-prose-evidencefrom
ACE-120-reconcile-question-fit

Conversation

@sandeep-agami

@sandeep-agami sandeep-agami commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Spec: ACE-120 (feature reconcile-evidence, brief F10)

Stacked on #298 (which stacks on #291, #290, #289, #288). Base is ACE-119-reconcile-prose-evidence. Merge the five below it first, then retarget this to main. Do not merge without manual review.

Summary

Phase 3e keeps a match row as a worked example, which teaches the AI a question-to-SQL pairing. A sound statement paired with the wrong question was the most harmful thing that step could keep, and nothing stood in its way: the ledger grades a statement against the semantic model and the data, never against the question it came with. Now the skill reads the two side by side and the ledger withholds a doubtful row.

What changed

  • Phase 1.5g in the skill, for every row with both a question and a statement: doubtful when the grain differs, the measure differs, a filter is present the question never asked for or absent when it did, or the time window differs. Writes question_fit.json as {"fit": "plausible" | "doubtful" | "no_question", "reason"}. A judgment made by reading, named as the one part of the ledger that is; it can withhold a row and never proves anything about the semantic model.
  • The ledger's question_fit part: plausibleconfirmed, the note saying it was read, not measured; doubtfulunresolved with the reason, so a matching number grades match_unverified and never reaches Phase 3e (whose pinned text is untouched); no_question → no part; file absent after a successful run → unresolved, by the same missing-input rule every expected file follows.
  • Phase 3b.5 shows a doubtful fit under "What couldn't be checked" and says how the person settles it: reword the question or the statement and re-run the row.
  • part-ledger.md, statement-check.md (step 10) and evidence-row.md name the step, the file and the part.

Verification

Run tests with uvx --with pytest-cov --with-editable "packages/agami-core[model,server]" pytest … or uv run dev.py check.

  • New: four ledger tests (plausible, doubtful with row_status reaching match_unverified, no question, missing or unknown after a successful run and nothing after a failed one); an end-to-end fixture whose statement counts items for a question about orders and is withheld with matching numbers; pins on 1.5g's four doubt signals and file, on 3b.5, and on the three reference docs. The two clean-row expectations gain the question_fit part deliberately.
  • The reconcile files together with the verb tests: 271 passed.
  • uv run dev.py check at the top of the stack: ruff and gitleaks clean, 5766 passed, 12 skipped, 1 pre-existing failure: tests/test_golden_run.py::test_a_client_that_cannot_be_found_still_fails_as_a_generation, which fails identically on untouched origin/main on this machine because a client binary exists at /opt/homebrew/bin/claude.

Review round 4

A panel pass found the one way past the gate this spec builds: a no_question fit removes the part, and nothing checked that the row really carried no question, so a malformed file could send a sound statement paired with the wrong question to the keep-offer. Fixed in the second commit, with tests:

  • The findings verb cross-checks the row record against the ledger: a row with a question and a statement whose ledger has no question_fit part is never treated as a statement that held.
  • 1.5g and statement-check step 10 say the file is written for every statement row and no_question is only for a statement that came alone. part-ledger.md names question_fit among the parts a missing file opens, and the 3b.5 example quotes the code's own note.
  • Fixture 14 asserts the fit is the only open part, and a twin row read as plausible reaches match.

Rebase note (2026-09-13). Replayed onto main at 99e44a8 with every branch below it; content unchanged, force-pushed with lease.

🤖 Generated with Claude Code

sandeep-agami and others added 2 commits September 13, 2026 16:33
Phase 3e keeps a match row as a worked example, which teaches the AI a question-to-SQL pairing, and
nothing stood between a sound statement paired with the wrong question and that step. Now the skill
reads the question beside the statement (Phase 1.5g), doubtful when the grain, the measure, a filter
or the time window differs, and writes question_fit.json. The ledger's question_fit part grades a
plausible fit confirmed, by reading and saying so; a doubtful fit unresolved with the reason, so the
row is match_unverified at best; no part for a statement that came alone; and an open part when the
file is missing after a run that succeeded, by the same rule every expected file follows. The
one part of the ledger graded by judgment, and it can only withhold.

Spec: ACE-120

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ction, not a pass

Fourth review round. `no_question` removes the fit part, and nothing checked that the row really
carried no question, so a malformed file could send a sound statement paired with the wrong
question to the keep-offer, the exact harm this spec exists to block. The findings verb now
cross-checks the row record against the ledger and refuses to treat such a row as a statement that
held. Phase 1.5g and statement-check step 10 say the file is written for every statement row and
that `no_question` is only for a statement that came alone; part-ledger.md names `question_fit`
among the parts a missing file opens. Fixture 14 asserts the fit is the only open part and that
the same statement read as plausible reaches match.

Spec: ACE-120

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@sandeep-agami
sandeep-agami force-pushed the ACE-119-reconcile-prose-evidence branch from adb1492 to 0e0e398 Compare September 13, 2026 23:36
@sandeep-agami
sandeep-agami force-pushed the ACE-120-reconcile-question-fit branch from a7ef27d to 39ca742 Compare September 13, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant