Repository navigation
Description
Problem (owner, 2026-11-23): after compaction, a handoff or a new session, agents forget what was already done and spend usage re-deriving it, sometimes wrongly (for example calling hardware broken that was set up and switched off on purpose the day before). The answer usually already exists in a research note, a runbook, an issue or a state file, but nothing tells the agent to look, and nothing gives the short "current state and why" without the full history.
What: a small facts store plus lookup, part of the fork kit.
- Facts files: one short Markdown file per thing (a machine part, a service, a feature, a decision). Frontmatter:
topic,keywords,place,updated,source(links to the issue/runbook/research). Body lines:State:,Why:,Check:(a command that proves the state live),Don't:(the known wrong conclusion), optionalNext:. Current state only, no history; history stays in git and issues. - Places: facts live where the thing lives. Which folders are searched comes from config, never from code: machine facts in the machine config folder, project facts in the project (private projects keep them private), fork-feature facts in the fork. The fork ships the tool, format and hooks only.
- Lookup:
facts <words>searches topics, keywords and bodies across the configured folders and prints the matching cards (state, why, check, source) compactly.facts --indexprints one line per topic. - Hooks: the session-start hook (startup, resume and after compaction) prints the facts index and one line: "Before diagnosing or redoing something, run
facts <topic>." Compaction instructions say to keep fact topics, not details. Per-project text comes from config (G10 G10 Orchestrator state, handoff and session hooks as a fork feature #851 owns the hook kit; this adds a section to it). - Upkeep: a writer that changes the state of a thing updates its card in the same change. The daily gardener reports cards older than N days, cards whose
sourcepath is gone, and folders over a size cap (report only).
Not in scope: full history, a database, embeddings. Plain files and grep-level search are enough.
General vs project: general: the format, facts CLI, hook section, gardener check, config keys (facts.dirs, facts.staleDays). Project: the folder list and the cards themselves (kept in each project, private where needed).
Done when: a fresh session shows the facts index; facts gpu on a test folder returns the right card; the format, config keys and upkeep rule are documented; tests cover search, the index, a missing folder, an empty folder and a card with broken frontmatter.
Related: #851 (G10 state, handoff and session hooks), #877 (handoff instead of compaction), #834.
🤖 Generated with Claude Code
Activity
scuttletoby commentedon Nov 23, 2026
Scope change (owner, 2026-11-23): the store is a quick table, not cards or research notes. One row per thing: Thing | What we made / how to use it | State now | Why | Updated. Example row: "Example GPU |
gpu on|off|statushelper, turned off at boot | OFF on purpose; the vendor tool fails while it's off | quiet fans | 11-23". It answers "did we make anything for X, and what is its state?" in one glance. No history and no links to long documents needed.STATE.md.facts.dirslists where they are.facts <words>prints the matching rows with the header.facts --indexprints the Thing column.facts.staleDays, and tables over a row cap.🤖 Generated with Claude Code
scuttletoby commentedon Nov 23, 2026
Token budget and handoff (owner, 2026-11-23): keep the always-loaded part small.
facts <words>.🤖 Generated with Claude Code
scuttletoby commentedon Nov 23, 2026
Review of #1065: FIX FIRST. The hook can't block a session, but two things must be fixed before merge:
--checkreads every project's tables, so it could leak one project's table names into another project's report.The fix round also covers ten minor findings: hang on non-regular files, an uncapped hook output, parser edge cases, date edge cases, duplicate folders, and not overwriting an unrelated
factscommand.Added scope from the owner:
factsalso searches a private record repo (#1066 layoutprojects/<name>/,machines/<name>/,orch/,shared/). Tables are searched first, then the repo. The search covers the current project plus shared folders, or every project with--all. Hits are capped. Mirrored copies of a table are skipped. The session hook adds only one pointer line.--checknever reads the record repo.🤖 Generated with Claude Code
facts: review round 1 fixes and record repo search (#1063)
agent-guards: facts, one state table per place (#1063) (#1065)
facts: re-check follow-ups (#1067)