Skip to content

docs: curate AGENTS.md back under budget (6199 -> 5887) - #139

Merged
gregoryfoster merged 4 commits into
mainfrom
curate-agents-md
Oct 16, 2026
Merged

gregoryfoster merged 4 commits into
mainfrom
curate-agents-md

Conversation

@gregoryfoster

@gregoryfoster gregoryfoster commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Brings AGENTS.md back under its 6,000-token budget. 931ddbf pushed it to 6,199 when it added Design Preferences, and it was already 5 over before that.

exact tokens
before (931ddbf) 6,199 (over by 199)
after (c95aa3f) 5,955 (45 under)

Per-section disposition

Section tokens class action
Bus Conventions 1,694 (27%) A + 3×B three bullets pruned (below), with the to_thread rule restored as one line; the rest kept inline
Detail Docs 1,262 A kept; the index is class A
Code Exploration Policy 441 A kept; template-owned block between markers
Server Lifecycle, Environment & Tooling, Env Vars, Conventions, Infrastructure 178–408 each A kept; hard constraints and gotchas
Code Exploration Notes 302 A kept; the co-index line says it is inline on purpose (skills#328)
Design Preferences 191 A kept; added at the owner's request in 931ddbf
everything else <150 A kept

Deletions and their warrants

Each is a duplicate warrant, following the #72 precedent: the destination already states every fact at length, so a verbatim move would have put a near-duplicate beside the canonical text, which Phase 5 forbids. The removed lines (9 after CR 1) are judged entries in .skills/context-loss-ok, each with what it was read against.

Removed bullet Where its facts live
Two blob backends, one seam (#7) docs/STORAGE.md → Two backends, one seam: REPLICATOR_BLOB_BACKEND, the file:///gs:// table, "local is the default and stays the default", the bold asyncio.to_thread rule
The replicate loop writes for gcs (#29) docs/CONVENTIONS.md:45 (create-if-absent, "never resolved as a path"); docs/STREAMS.md's content.replicate bullet
Watcher alone issues content.fetch (#90) docs/STREAMS.md's Watcher bullet: seed_fetch.py seeds scratch streams, --production, Watcher's identity

Gates

  • prove-no-loss.sh --base 931ddbf --claims: lost 0, warranted 9, claims dropped 0. The 2 lines found duplicated are the two commands that also appear in COMMANDS.md; that duplication was already there.
  • check-seams.sh: 0 left after acknowledging 4. Three are back-references to sections that stay inline (Common Commands, Design Preferences). The fourth is a heading that carries an issue number, COMMANDS.md's "in-flight count (OS patching under the patching-hosts skill: first run on co-replicator (vendor the skill, commit the knob, maintenance-lane catch-up) for gregoryfoster/skills#313 step 8b #131)", which this run didn't add and which no link targets.
  • check-counts.sh: 0. Pruned one acknowledgement this run made stale.
  • Links: no dead links or dead anchors, no orphaned or unindexed docs.
  • uv run pytest: 1403 passed. The worktree skips 6 tests where the main checkout skips 1, because the untracked .claude/settings.local.json is absent here and the exe.dev session check fails. Ruff is clean.
  • Telemetry: a baseline row and a curation row in .skills/context-metrics.jsonl (skill v1.31).

Fresh-eyes review (CR 1)

A reviewer subagent with no context from this session confirmed every removed fact is in its destination and checked that each acknowledgement entry matches what it claims. It made one judgment call, which is adopted in c95aa3f: keep "Every BlobStore call from a coroutine goes through asyncio.to_thread" inline. Anyone adding a store call in src/worker/ needs it, and the off-loop test pins only the call sites it names. The Watcher/--production demotion was judged safe: the broker ACL, the script's --production gate and the absence of Watcher credentials each stop it. The telemetry row was rewritten with --amend (5887 → 5955).

The reviewer also noted cosmetic drift, which this PR leaves alone: STREAMS.md:3, CONVENTIONS.md:4 and the AGENTS.md index line for STREAMS.md describe those docs as "one bullet per rule AGENTS.md states in a line". That was never strictly one-to-one, and it is now looser by two rules.

Not in scope

  • .skills/context-loss-ok and context-claims-ok hold many entries from earlier runs that now match nothing, and the script lists them for pruning. That clean-up is its own pass.
  • docs/SKILLS.md (10,089), COMMANDS.md, DEPLOYMENT.md and ENVIRONMENT.md are over the 10k per-doc budget. That was true before this run, which made none of them bigger.

🤖 Generated with Claude Code

gregoryfoster and others added 4 commits October 16, 2026 22:34
Three Bus Conventions bullets pruned as duplicates, each read against a
destination that already states every fact at length (judged entries in
.skills/context-loss-ok):

- Two blob backends, one seam -> docs/STORAGE.md ## Two backends, one seam
- The replicate loop writes for gcs (#29) -> docs/CONVENTIONS.md, docs/STREAMS.md
- Watcher alone issues content.fetch (#90) -> docs/STREAMS.md

prove-no-loss: lost 0, warranted 10, claims dropped 0. Seams 0 (4 new
back-references acknowledged), counts 0 (one stale ack pruned).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fresh-eyes review: a coding rule anyone adding a BlobStore call in
src/worker/ needs, and the off-loop test pins only the call sites it names.
Restored as one bullet with the STORAGE.md pointer, verbatim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit f638266 into main Oct 16, 2026
3 checks passed
@gregoryfoster
gregoryfoster deleted the curate-agents-md branch October 16, 2026 22:41
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.

1 participant