Skip to content

docs: extract the invariant register (planning/invariants.md) - #64

Merged
samkeen merged 2 commits into
mainfrom
claude/docs-curation-invariants-8563lu
Jul 22, 2026
Merged

docs: extract the invariant register (planning/invariants.md)#64
samkeen merged 2 commits into
mainfrom
claude/docs-curation-invariants-8563lu

Conversation

@samkeen

@samkeen samkeen commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Step one of the docs-curation round: reconcile the invariants scattered
across CLAUDE.md, the README, and planning/ into one crisp, normative,
citable-by-id register (S/W/L/G/M/E sections), verified against the code
and recent history rather than doc text alone.

Contentions found during extraction are flagged inline (projection
formulation Markdown-vs-vault-directory; the write-surface enumeration,
including a documented 'alias refresh' no code performs), and a drift
log lists stale text to reconcile next (sqlite-vec references,
inline-wins dedup, the 10-verb vocabulary, the 'updated' claim, a stale
log-tier code comment, README/tasks focus mismatch).

The reviewed docs now each carry a one-line pointer to the register.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_014nqUJPkUcLHphnuKYhSHMy

Summary by CodeRabbit

  • Documentation
    • Added a definitive invariants guide covering storage, links, writes, embeddings, and engineering rules.
    • Clarified that the SQLite index is a disposable projection of the entire vault, including Markdown and resources.
    • Updated indexing documentation to describe FTS5 and in-process vector search with exact rescoring.
    • Refined guidance for typed links, frontmatter ownership, file moves, resource support, and embedding configuration.
    • Updated roadmap, design references, user stories, and project vision to reflect the current architecture.

claude added 2 commits July 22, 2026 03:51
Step one of the docs-curation round: reconcile the invariants scattered
across CLAUDE.md, the README, and planning/ into one crisp, normative,
citable-by-id register (S/W/L/G/M/E sections), verified against the code
and recent history rather than doc text alone.

Contentions found during extraction are flagged inline (projection
formulation Markdown-vs-vault-directory; the write-surface enumeration,
including a documented 'alias refresh' no code performs), and a drift
log lists stale text to reconcile next (sqlite-vec references,
inline-wins dedup, the 10-verb vocabulary, the 'updated' claim, a stale
log-tier code comment, README/tasks focus mismatch).

The reviewed docs now each carry a one-line pointer to the register.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nqUJPkUcLHphnuKYhSHMy
Resolve the two flagged contentions: the projection invariant is
index = projection of (the vault directory), with Markdown the sole
authored subset (S2), and B2's write surface is one unbidden write plus
enumerated command mechanics — the never-built 'cosmetic alias refresh'
is dropped everywhere (W3). The register's contention flags and drift
log are removed accordingly.

Sweep the reviewed docs to describe the present system only, leaving
evolution to git history: frontmatter-wins dedup and the two-home graph
replace the superseded inline-wins/three-home text; the stance-trio
vocabulary replaces 10-verb mentions; sqlite-vec references become the
in-process plain-table scan (B2-side only; qmd descriptions stay);
resolved open questions, supersession callouts, and reversal
parentheticals are deleted; data-model's judgment-call digest is
restated in current terms; 'updated:' is documented as not B2-stamped;
the README points at the actual current focus; and a stale log-tier
code comment in ingest.rs is corrected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014nqUJPkUcLHphnuKYhSHMy
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0271a1d8-39ca-41d3-ad32-6838aa53757c

📥 Commits

Reviewing files that changed from the base of the PR and between 5b8c43a and dc6dbb4.

📒 Files selected for processing (9)
  • CLAUDE.md
  • README.md
  • crates/b2-core/src/ingest.rs
  • planning/data-model.md
  • planning/index-engine.md
  • planning/invariants.md
  • planning/tasks.md
  • planning/user-stories.md
  • planning/vision-and-scope.md

📝 Walkthrough

Walkthrough

The PR aligns repository guidance and planning documents with a two-tier vault/disposable-index architecture, adds a normative invariants register, replaces sqlite-vec references with plain in-process vector tables, and updates typed-link, discovery, resource, and roadmap descriptions.

Changes

Architecture documentation

Layer / File(s) Summary
Vault, writes, and relation invariants
CLAUDE.md, planning/data-model.md, planning/invariants.md, planning/vision-and-scope.md
Defines vault-directory projection, Markdown write boundaries, typed relations, identity rules, graph behavior, and the two-tier storage model.
Plain-table indexing and semantic search
CLAUDE.md, planning/index-engine.md, planning/tasks.md
Documents SQLite FTS5 with plain embedding tables, note centroids, two-pass projection, exact in-process scanning, and resolved Rust implementation details.
Discovery and typed-link decisions
README.md, planning/user-stories.md, planning/tasks.md, planning/vision-and-scope.md
Updates discovery commands, typed-link vocabulary, canonical references, and rename/link-preservation wording.
Repository guidance and status synchronization
CLAUDE.md, README.md, crates/b2-core/src/ingest.rs, planning/vision-and-scope.md
Synchronizes repository guidance, roadmap status, guide ownership, ingest documentation, and future-seam descriptions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • AlteredCraft/B2#39: Related planning updates for the plain embedding-table and discovery-scan design.

Suggested reviewers: claude

Poem

I’m a rabbit with notes in a vault,
Where plain tables keep search results taut.
Links bloom in the frontmatter bright,
While Markdown stays authored just right.
No relator, no durable log—
Just carrots, clean indexes, and a hop!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/docs-curation-invariants-8563lu

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@samkeen
samkeen merged commit 643f6c8 into main Jul 22, 2026
1 check was pending
@samkeen
samkeen deleted the claude/docs-curation-invariants-8563lu branch July 22, 2026 04:26
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.

2 participants