A derivation explains itself down to the sentence - #227
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
WaylandYang
force-pushed
the
feat/proof-tree
branch
from
September 3, 2026 02:01
96bfa72 to
d8c0f2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
B1 of 0016 (R2 in 0002). A derived fact could show its direct premises as text; now it explains itself down to the sentence.
reasoning::proofreturns the derivation plus its premises in derivation order, each carrying its evidence rows;GET /kbs/{id}/derived/{id}/proofserves it; in the entity panel a derived row expands into the chain, each step a triple with its quotes linking into the document.It is a chain, not a tree:
fact_derivationsrecords only asserted premises (derivation input excludes derived facts), so "recursive expansion" flattens to the ordered premises and their evidence. A premise that was since retracted is listed and marked, not hidden — the derivation falls with it, but "what it rested on at the time" stays readable, which is what the record axis is for. A derivation that no longer exists yieldsproof: null, and the panel falls back to the text premises it already had.Decision records: 0002 R2 marked done with a revision on the chain-vs-tree shape; 0016 B1 marked done; index updated.
Checks: clippy clean,
pnpm typecheckclean, new store testa_proof_reaches_the_sentence(order, leaf quotes, retracted marking) green alongsidederived_facts_are_second_class; verified in the browser on a scratch base (transitivepart_ofchain and a sub-property derivation whose step links to the source sentence).🤖 Generated with Claude Code