Repository navigation
Derive per-file change facts from captured comparisons - #22
Merged
rcosteira79 merged 11 commits intoNov 4, 2026
Merged
rcosteira79 merged 11 commits into
rcosteira79 merged 11 commits into
Conversation
rcosteira79
force-pushed
the
feat/briefing-grounding-part-1-derive-change-facts-per-changed-file
branch
from
November 4, 2026 17:35
6fa7791 to
48e5b64
Compare
rcosteira79
deleted the
feat/briefing-grounding-part-1-derive-change-facts-per-changed-file
branch
November 4, 2026 17:56
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.
What
loadChangeFacts(comparison)reports, for every changed file of a captured comparison, its language, a completeness state, and facts parsed from both sides: changed declarations, calls added or removed on changed lines with their enclosing declaration, and test names marked by whether a change touches them.unattributedranges.src/semantic-diff.tsnow exports its language table, language detection, parser and declaration recogniser, and names which limit stopped an analysis.GLOSSARY.mdis committed, and the CI jobs that runbun testfetch full history.Why
An agent writes every claim in a Briefing, and the server proves only that a cited excerpt exists in the captured tree. Nothing tells the reader which parts of the diff the story never mentions. A later trust layer needs facts the server derives itself from the captured trees, and these are the first. Nothing consumes them yet.
Decisions and trade-offs
describeblockssrc/test/is not a test by path aloneMost needs scrutiny: the changed-line partition in
src/change-facts.ts:74— check that a skipped file lists every changed line and that each fact range is matched against its own side. No ADR was added or amended on this branch.How to test
From this branch, print the facts for one historical change:
bun -e 'import { loadChangeFacts } from "./src/change-facts.ts"; import { historicalComparison } from "./tests/comparison-fixtures.ts"; for (const f of (await loadChangeFacts(await historicalComparison("57bf907", "27b7e44"))).files) console.log(f.path, f.completeness.state, f.symbols.length, f.calls.length, f.tests.length, JSON.stringify(f.unattributed));'You should see
src/types.tsskipped,README.mdandpackage.jsonunsupported, andtests/ui.test.tslisting test facts. Pick one file you know and judge whether itsunattributedranges are the lines you would expect no fact to explain. Then open this pull request'sfoundationjob and confirm its checkout fetched full history.