Repository navigation
Description
What: Capture reads agent sessions on every machine, keeps only lessons that would change what a later agent does, and writes each one into the existing owner that will serve it.
Why: Nothing is captured yet, so later sessions relearn what earlier ones knew, serving has nothing new to deliver, and the router lacks real entries to learn from.
So what: Agents build the child Issues below in order; the user rules on blind batches of extracted items to calibrate the judge.
Outcome
On each machine, capture reads new session events through Agent Observer, extracts candidate lessons with two extractors, keeps the ones a calibrated judge grades as lasting, and classifies each into a destination owner, a serving lane and a visibility. One writer machine reflects each owner's candidates against the whole owner file, applies add, update or remove in code, and commits with receipts that make every re-confirmation of a known item a missed-serving signal.
Problem Statement
Agents relearn the same facts and procedures across sessions and machines. The knowledge exists in transcripts, but nothing turns it into short, scoped items in the places later sessions load or are served from. A naive capture keeps state (true only for one task or loop round), restates rules the session already had loaded, and writes duplicates or stale contradictions.
Solution
- Extract per machine. For each thread, the events since a per-thread cursor (earlier context marked as not-to-extract) go to two extractors in parallel with the same versioned contract. Each item carries its source event id, scope from metadata, and
learned_from(failure,user,discovered,served_or_loaded,brief_or_parent,external). - Judge blind. One judge sees both lists as A and B in random order, pairs items that state the same lesson, grades
keep,stateorjunk, and flagsunsupported. Code merges pairs into one item withfound_by. - Classify. Each kept item gets a destination owner, a serving lane and a visibility. Items whose moment-signalling words appear in the item become exact-key or session-start items; items without them are router (judgment) candidates. Code refuses a public destination for a private item rather than moving it.
- Reflect and apply on one writer. Per owner, serialized: pull, show the model the whole owner file plus its candidates, accept exactly
add,updateorremove, apply in code under strict rules, commit once per owner with opaque receipts, push, then delete the transit queue items.
Elon record
- Requirements and who asked: capture runs per machine and keeps transcripts where they were recorded (user); extract, classify and shape, reflect with exactly add, update and remove (user); AI decides, code edits (user); write only to existing owners, no parallel store (user); AgentsMD rules change only through AgentsMD's own Issue and PR (user); a 4,000-character budget for preferences and persona (user); swappable models through T3 delegation (user); every re-confirmation of a known item is a missed-serving signal (user); two extractors with a judge calibrated to user rulings, then decide one or two from data (user).
- Deleted: the earlier dated fact log and its separate data repo; a
confirmaction; inline item ids; a separate writer cursor and event log (commit trailers are the receipts); retrieval inside reflection (owners are small enough to read whole); every scheduler and the five-day gate; per-step cost tuning; the stale sweep (built last); a separate dedup pass; capture of parallel worker-batch threads (low yield, mostly restating the shared brief). - Bottleneck: the judge is uncalibrated until enough blind user rulings exist; every extractor score is measured through it.
- Checked myself: the private design notes (capture design v2, both roasts, three gap reviews, the synthesis and the user's decision record of 2026-10-12); the capture pilot's per-extractor yield, wall time and token figures; Issues Serving: deliver stored knowledge before the agent's next decision on every host #3 and Router: a local model that matches the judge on unseen entries within one second #4 and their comments; Agent Observer Issue Combine Observer evidence across rocky, cavallo and bestia agent-observer#56.
Design review
- Designer: Opus 5.5 (capture design v1, then v2 after the roasts).
- Roasters: Grok 4.7 and Sol 6.1. Accepted findings are folded into v2: three actions only, no data repo, source time and scope from metadata, commit trailers as receipts, exact-text match plus evidence for removes, refuse-not-move privacy, a fixed proof table.
- Gap reviewers: Opus, Grok and Sol at extra-high effort, merged into one synthesis. Capture corrections: drop restatements of loaded procedures, briefs and tool-enforced rules; add
learned_from; require replacement evidence on the same scope instead of "older loses" by timestamp; judge each round on fresh rulings; size held-out sets from the target margin. - Verdict: foundation accepted by the user on 2026-10-12, with these decisions:
- one writer machine; direct commits to project
AGENTS.mdonly after the false-remove bar passes; - false-remove bar: 0 false removes on at least 50 remove-eligible cases;
- capture prepares AgentsMD findings and the user opens the AgentsMD Issue until classify passes its bar;
- Sol and Grok both extract, an Opus-class model judges;
- judge bar: at least 90% agreement with user rulings on held-out items;
- drop to one extractor if it loses 10% or less of user-confirmed lessons;
- blind ruling batches of 20, stored as private benchmark data;
- stop capturing parallel worker-batch threads;
- restatements of an existing procedure or rule, items a tool already enforces or shows, task-, draft- or round-only state, and one-off trivia are not kept;
- classify decides the serving lane by whether the moment's trigger words appear in the item; serving misses correct the classifier;
- a missed serving counts only when the session learned the item the hard way (a failure, a user correction or rediscovery), never when it repeats a served or already-loaded rule.
- one writer machine; direct commits to project
Acceptance criteria
- Every machine produces judged, classified queue items from its own sessions without copying transcripts elsewhere.
- The judge meets the user's bar on held-out blind rulings, and the one-or-two-extractor decision is made from user-confirmed lessons.
- Classify meets its bar with 0 private-to-public destinations.
- The writer applies add, update and remove to existing private owners with receipts; project
AGENTS.mdreceives direct commits only after the false-remove bar passes. - Items waiting for a serving owner reach the exact-key store or the router once those exist.
User stories
- As an agent starting work, I want lessons from earlier sessions already in the owner I load or am served from, so that I do not relearn them.
- As the user, I want to rule on a small blind batch instead of reviewing everything, so that the judge learns my bar without me reading every item.
- As the user, I want private knowledge never written to a public repository, so that capture is safe to run everywhere.
- As the serving system, I want every re-confirmation of a known item recorded with its moment, so that I can learn what I failed to serve.
Implementation decisions
- No new store. A queue item is transit: it lives on the capturing machine, then in the writer's inbox, and is deleted once an owner commit carrying its key is pushed. Nothing serves from it.
- Queue states:
extracted,shaped,waiting-for-owner(trigger-keyed and router items until those owners exist),agentsmd-pending,refused(with reason). Key: machine, thread, event, index. The moment reference matches the serving log's fields so the two can be joined. - Owners: preferences and persona (loaded at session start, 4,000-character budget kept by rewriting; if a rewrite cannot fit, the user is told), project
AGENTS.md, each project's Library, the private Great Library, the exact-key store and router entries (serving Spec Serving: deliver stored knowledge before the agent's next decision on every host #3). AgentsMD rules are proposals only. - Reflection rules, enforced in code:
old_textmust match the current file exactly; reflection cannot change the destination owner; an update or remove needs replacement evidence on the same scope; a different host or version scope is anadd; each edit lands in the working tree before the next candidate is reflected; a re-confirmation is anupdatewhose body differs only in the date stamp; every auto-loaded owner has a character budget. - Receipts: one opaque commit trailer per decision (key and action only, no item text). On startup the writer drops queue items whose keys are already committed. A rejected push resets, pulls and reflects the affected candidates again; never rebase.
- Models: one T3 delegation target per step, overridable; saved task ids make runs resumable; each item records the model that actually ran.
- Runs are manual until the proof below passes; scheduling and a quota guard are decided afterwards.
Testing decisions
- Judge: agreement with held-out blind user rulings; held-out size chosen from the target margin.
- Extractors: per-extractor share of distinct kept lessons, keep precision and unsupported count, on threads from days not used before.
- Segments: segmented runs compared with whole-thread runs on the same threads.
- Classify: about 100 user-labeled items, destination and lane scored separately.
- Reflection: a frozen gold set built from real items and owner snapshots (paraphrase, true contradiction, scope split, late older candidate, same-run duplicate, budget rewrite that must keep every rule).
- Apply: code tests that interrupt at every step (decide, edit, commit, push, delete) and compare final owner state and trailers with the gold.
Non-goals
- Serving, the router and the serving log (Spec Serving: deliver stored knowledge before the agent's next decision on every host #3).
- Scheduling, a quota guard, and cost reduction before it works.
- A stale-item sweep, store promotion or demotion, and automatic retraining.
- A secret scanner (the extract contract forbids copying secret values).
Blockers
- None. The user's rulings gate the judge bar inside the child Issues.
Required proof
- Each child Issue's proof on its PR or Issue; the judge, classify and false-remove bars met on held-out data before any automatic write to a public repository.
Further notes
Full designs, roasts and gap reviews are kept as private design notes. Router training track: #4. Serving Spec: #3.
Activity
[-]Capture: extract lasting facts from yesterday's sessions into a dated fact log[/-][+]Capture: write lasting lessons from agent sessions into the owner that serves them[/+]lukemaj commentedon Oct 12, 2026
Decision (user, 2026-10-12): no separate scheduled stale-item cleanup pass. Reflection updates or removes items on new evidence, the capture judge filters task state, and a served item found wrong is labeled
wrongby the serve-outcome labeler (#15) and fixed through reflection. Revisit only if the serving log shows stale items being served.lukemaj commentedon Oct 13, 2026
Decision (user, 2026-10-13): capture judge v2 approved. The judge establishes four facts with evidence per item (recurred, fixed later, owner and fixability, already written down), and the user rules blind on items shown with those facts. Bar: 2 fresh rounds of 20, at least 36 of 40 agreements. Details and status are on #8. The capture build (PR #22) stays a draft until the bar is met.
lukemaj commentedon Oct 14, 2026
Decision (user, 2026-10-14): capture works only when every link is trusted.
ContextMD capture does not count as working until each of these is trusted, in order:
This replaces the earlier gate that held only on the judge (#8). PR #22 and any claim that capture works wait on all six. Reviews of 1 and 2 are running now; extract is designed next.
lukemaj commentedon Oct 14, 2026
Order agreed (user, 2026-10-14):
2b. When both land and Observer is confirmed working, the same three-model review (Grok xhigh, Sol xhigh, Opus medium) re-checks Observer, continued in the first review's dispatcher thread.
Review findings: preparation on #7 (comment of 2026-10-14); Observer in agent-observer#85 and #86.