Repository navigation
feat(proof): find the records behind code, and see what branches propose - #292
Draft
tonyketcham wants to merge 1 commit into
Conversation
Two flags on `proof find`, for teams whose engineers each work on branches and draft PRs against one effort graph. `--path <file|dir|symbol>` lists the records that govern that code, each resolved to its current version, with a `via:` line naming the anchor. Three anchors count: - a Citation with `role: code` whose body names the code as `<path>#<symbol>@<sha>` or `<path>`, through the records that cite it or that it derives from; - a commit that touches the path and carries a `Proof: <id>` trailer; - a record body that names the path as a whole token. A path missing from the working tree gets a note naming the branches that hold it. `--refs <ref,...>|all` overlays records from other branches without a checkout, reading each ref with `git ls-tree` and `git cat-file`. A ref adds only what it changed since its merge base. Reverse links are rebuilt from forward edges across the combined graph. Each card says `main`, `only on <ref>` or `differs on <ref>`, with the draft PR from `.flatbread/proof/prs.json` when present. A CONFLICTS block names two accepted Decisions on one question, one record replaced by two records, one record changed differently on two refs, a retraction of something another ref relies on, and two head compactions. `proof branches --refresh-prs` writes `prs.json` from `gh`, the only step that touches the network. Without either flag, `find` output is byte-identical: the 10x find gate rows match before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW
4 of 8 tasks
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.
Summary of changes
This is layer 12 of a stack. It sits on #291.
Picture ten engineers working on one effort graph, each with prototypes on branches and draft PRs. An agent on that team needs two things the reads lacked: the records that govern a piece of code, and what other branches propose. This PR adds both to
proof find.1.
--path <file|dir|symbol>lists the records that govern that code. Each is resolved to its current version, with avia:line naming the anchor. Three kinds of anchor count:role: codewhose body names the code as<path>#<symbol>@<sha>or<path>, through the records that cite it or that it derives from (roleis already a free-form optional field, so there is no schema change);Proof: <id>trailer;How targets match:
#symbolanchors andsymbol(in text.2.
--refs <ref,...>|alloverlays records from other branches without checking them out.git ls-tree -randgit cat-file --batch, cached by sha.alltakes the newest 12 branches that change Proof records.main,only on <ref>ordiffers on <ref>, with(draft #N by <author>)when.flatbread/proof/prs.jsonis present.proof branches --refresh-prswritesprs.jsonfromgh. It is the only step that touches the network.Both flags are served, combine with each other and with
--effort/--all, and are documented in the skill.Unchanged: without either flag,
findoutput is byte-identical. The 10x find gate's rows match before and after, and onlyfind_hashchanges, because the file changed.Reviews: two reviewers raised 15 findings, all fixed. Among them:
--refs all.A follow-up fixed a rule-1 case where one ref's rejection hid another ref's acceptance.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
anchors.test.ts,refs.test.tsandproof-git.test.ts(ongit initfixtures) cover each anchor source, each conflict kind, branch-only paths, and served-equals-local. 285 AVA tests pass, along with typecheck and lint.Does this introduce any non-backwards compatible changes?
Does this include any user config changes?
.flatbread/proof/prs.json, written byproof branches --refresh-prs.Generated by Claude Code