Skip to main content

Module ledger

Module ledger 

Source
Expand description

Reasoning ledger: why code is the way it is — decisions, failed attempts, constraints — as typed, symbol-anchored, append-only records in the user’s own store (<index-dir>/_ledger/inbox/<uuid>-<hash>.json, written create-only so writers never clash). Status (active, moved, stale, orphaned, superseded, retracted) is derived at read time.

Structs§

Alike
The older record a record may repeat, and how alike they read (0 to 1).
Anchor
Where a record points: a symbol as it was when the record was written.
Entry
A record with its derived state against the current index.
Event
One review of a record.
Identity
Who writes records: a pseudonymous actor id and, when names are kept, a name.
Ledger
The ledger under an index root (local directory or a bucket prefix).
Provenance
Record
Relation
Snippet
Code that shaped a record, as it was at commit.

Enums§

AuthorKind
Kind
RelationKind
Status
Trust
T4 constraint enforced by a passing check, T3 human or human-confirmed, T2 agent with evidence, T1 agent assertion, T0 untrusted.

Constants§

LOOKALIKE
How alike two records must read (mean cosine of whole text and title) to count as a likely repeat.
MAX_SNIPPETS
MAX_SNIPPET_LINES
SCHEMA

Functions§

about
Entries whose anchors map to any of symbols (current ids), most relevant first.
all_blocking
challenged
The review inbox (stale, orphaned, or unconfirmed agent records) or everything; most urgent first. A machine proposed retiring this record but could not (it is human-backed): a person decides.
compact_blocking
derive
Derive status and trust for every non-relation record.
erase_blocking
flag_lookalikes
Mark each standing record that reads like an older one on the same code, unless its writer said how it differs or a person confirmed it.
inbox
injection
Instruction or payload text that would steer an agent reading the record.
line
One compact line for embedding in other tool results.
lookalikes
Standing records that new may repeat: they share a symbol or file with it and read alike.
markdown
Render entries as quoted, attributed facts with a verify pointer (never as instructions).
put_blocking
Blocking helpers for the CLI.
review_action
A review action: confirm, supersede, dispute, retract, archive (no longer applies) or invalidate (was wrong).
suspicious
Secrets and invisible/bidi characters never enter the shared ledger.
weigh_teams
Notes on another team’s code count less until one of its members confirms them, unless that team takes notes openly.