Repository navigation
#126 docs: curate the agent context — AGENTS.md under budget, DEPLOYMENT.md split by topic - #128
Merged
Merged
Conversation
DEPLOYMENT.md was 44,066 tokens against a 10,000 per-doc budget. Its `##` sections move verbatim (anchor links re-aimed, five warranted in .skills/context-loss-ok) to: - docs/PROVISIONING.md: Prerequisites (operator), `/etc/processor/`, Containment, Install, Before #2, Create the group - docs/DEPENDENCIES.md: CI pins and Dependabot, Shell lint, The lock audit, Bumping co-core, Extraction dependencies, TLS trust - docs/MONITORING.md: The drift check, Liveness, Disk GC, Memory - docs/NETWORK.md: Tailscale DNS, Tailnet flaps § Patching and § Node.js stay, byte for byte, until #113's first window (2026-11-10) closes. A "Moved sections" block keeps each old heading as a one-line stub: src/, deploy/, scripts/deploy.sh, pyproject.toml and .skills/patching-hosts cite DEPLOYMENT.md sections and can't change without a deploy, and § Patching links into moved sections. Non-runtime pointers (scripts, .github, .githooks, tests, .skills knobs, SKILLS.md, SOCRATICODE.md, the SocratiCode manifest) now name the new docs. Baseline telemetry row recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Infrastructure (2,781 tokens, 41%): rows become pointers into the new docs. The detailed rows move verbatim to each doc's `## At a glance` (CI and Lock audit → DEPENDENCIES.md; Drift check, Liveness, Disk GC → MONITORING.md; Broker → NETWORK.md; Service, Patching, Node.js → DEPLOYMENT.md, ahead of and outside § Patching). - The five rule paragraphs under it get their own `## Hard Rules`. - Parity goldens: the paragraph moves verbatim to DEPENDENCIES.md § Parity goldens; AGENTS.md keeps its three rules and a link. - Pointers into moved DEPLOYMENT.md sections retargeted; Detail Docs lists each doc on its own line. - Two `§` references to moved subsections (GCP provisioning, tailscaled's OOM rank) now link the doc they moved to. Warrants: .skills/context-loss-ok (retarget), context-claims-ok (retarget), context-seams-ok (each hit judged), context-counts-ok (3, all pre-existing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bare `§ X` references in moved and kept sections now name the doc X lives in (`MONITORING.md § The drift check`); § Patching untouched. 20 warranted as retargets. - AGENTS.md keeps two never-rules on every task: CI's Redis comes from `mirror.gcr.io`, never anonymously from Docker Hub (#43); the service user has no sudo, no `docker`, no home. Shell lint links its own section. - tests: the `/etc/processor/*` glob and bus-URL checks scan the whole split runbook again, not one doc. - .skills/context-seams-ok: one line-exact entry per judged hit, so a new seam can't hide behind a path-wide pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment Phase 8, adopted by the operator 2026-11-08. - Write guard: PostToolUse hook on Edit|Write|MultiEdit, never blocks; budgets in .skills/context-budget (6000) and context-doc-budget (10000). - context-cadence.yml: weekly baseline:scheduled row, Tue 16:14 UTC; under merge_mode pr it keeps one standing PR from context/weekly-measurement. actions/checkout SHA-pinned by hand (kept on re-render); runs-on stays the template's ubuntu-latest, which a re-render writes back. - .gitattributes: ledger union, ratio ours, counts context-counts. Drivers set in the main checkout's git config. - docs/SKILLS.md § Context budget; DEPENDENCIES.md notes the third workflow. Needs, before the first run: the ANTHROPIC_API_KEY repository secret, and "Allow GitHub Actions to create and approve pull requests". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 of 20 tasks
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #126. This is the first of two PRs: § Patching and § Node.js stay in
docs/DEPLOYMENT.mdbyte for byte until #113's first window (Tue 2026-11-10, 05:00–10:00Z) closes.Docs only. No path under
processor.drift.RUNTIME_*changes, so no deploy.Before and after
Counts are
measure-context.sh --exact, fromcount_tokens.AGENTS.mddocs/DEPLOYMENT.mddocs/PROVISIONING.md(new)docs/DEPENDENCIES.md(new)docs/MONITORING.md(new)docs/NETWORK.md(new)X.md#anchorin the repo resolves, including those indocs/plans/anddocs/specs/.The DEPLOYMENT.md split
Each
##section moved verbatim to the doc below. The only edit in transit is links re-aimed at the moved section's new doc./etc/processor/, Containment, Install, Before #2, Create the groupPROVISIONING.mdDEPENDENCIES.mdMONITORING.md###s), Tailnet flapsNETWORK.mdDEPLOYMENT.mdStubs. A
## Moved sectionsblock at the end of DEPLOYMENT.md keeps each moved heading as a one-line stub, so every old anchor still resolves. They are needed for two reasons:src/,deploy/,scripts/deploy.sh,pyproject.toml,.skills/patching-hosts), and editing any of them is a deploy.Pointers repointed (none of these files is a runtime path):
scripts/{audit_lock.sh,co-pypi.sh,co_pypi_token.py,shellcheck.sh}.github/{dependabot.yml,workflows/audit.yml},.githooks/pre-commit.skills/{doc-sections,doc-sensitive-paths}docs/SKILLS.md,docs/SOCRATICODE.md,.socraticodecontextartifacts.json(the four new docs are added)/etc/processor/*globs, bus URLs) scan all five runbook docs.§references. A bare§ Xwhose section now lives elsewhere names its doc, e.g.MONITORING.md § The drift check. The exception is inside § Patching, which isn't touched.AGENTS.md
## At a glancetable: CI and Lock audit to DEPENDENCIES.md; Drift check, Liveness and Disk GC to MONITORING.md; Broker to NETWORK.md; Service, Patching and Node.js to DEPLOYMENT.md, ahead of and outside § Patching. The new rows keep the never-rules: never a bareapt-get upgrade, never Docker Hub anonymously, never from a checkout, and no sudo,dockeror home for the service user.## Hard Rulesheading.DEPENDENCIES.md § Parity goldens. Inline it keeps its three rules: goldens come from co-core directly; regenerate only at a bump, never to pass a test; never edittests/fixtures/parity/real/.Deletions: none. Phase 2 found 52 TRUE, 25 UNVERIFIABLE and 0 FALSE claims, so no deletion has a warrant.
Proof
prove-no-loss.sh --base origin/main: AGENTS.md lost 0 (11 retarget warrants),--claimsdropped 0 (9 retarget warrants);--file docs/DEPLOYMENT.mdlost 0 (27 retarget warrants). All are in.skills/context-loss-okand.skills/context-claims-ok.check-seams.sh: 0 open. 89 acknowledged in.skills/context-seams-ok, one line-exact entry per judged hit.check-counts.sh: 0 open. 3 acknowledged; all predate this change.origin/main.4cd3296..skills/context-metrics.jsonl. The after-row's note records the interim DEPLOYMENT.md overrun.Left for #126 (PR 2, after the window closes)
docs/PATCHING.md(about 8.2k tokens), behind stubs. That brings DEPLOYMENT.md to about 9.5k.pyproject.toml:51says the § Shell lint stub names the shellcheck version.deploy/tailscaled.service.d/…:11says the install is in DEPLOYMENT.md; it is in NETWORK.md.Phase 8: guard and cadence (operator, 2026-11-08)
.claude/hooks/context-budget-guard.sh(symlink into the vendored skill) plus aPostToolUseentry in.claude/settings.jsonmatchingEdit|Write|MultiEdit. It never blocks. Budgets:.skills/context-budget6000,.skills/context-doc-budget10000..github/workflows/context-cadence.yml, generated byinstall-cadence.sh, runs Tue 16:14 UTC and on dispatch. It records abaseline:scheduledrow. Undermerge_mode prit keeps one standing PR open fromcontext/weekly-measurement.actions/checkoutis SHA-pinned to ci.yml's v7.0.1, becausetest_dependabot.pyreads every workflow. A re-render keeps the pin.runs-on: ubuntu-lateststays as the template sets it, because a re-render would write it back. The job builds nothing.test_ci.py's image check covers ci.yml and audit.yml only..gitattributes: the ledger merges byunion, the ratio file byours, the counts file bycontext-counts. The two drivers are set in the main checkout's git config, which worktrees share.docs/SKILLS.md § Context budget.§ Not installedno longer lists these. DEPENDENCIES.md gains one sentence on the third workflow. The Pins line it moved stays verbatim, and no-loss reports 0 lost.wire:write-guard,wire:cadence, 90 seams acked) andrepo_commitis backfilled.Operator, before the first run. My token can't read or set either of these:
gh secret set ANTHROPIC_API_KEY -R CannObserv/processor. Without it the job fails at its first step and records nothing.gh workflow run context-cadence.ymlonce by hand. A PR opened withGITHUB_TOKENstarts no CI, so close and reopen it to run the checks.🤖 Generated with Claude Code