Extend check_context_budget with the immediate (working-dir) + peripheral (substrate) tiers #319
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/agentic-os#319
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Companion to the ward-side design in ward#373 (
docs/context-probe.md).The ask (measurement leg, per the aos authoring-vs-rollout split)
check_context_budget(agentic_os/pre_commit/check_context_budget.py,docs/context-budget.md) today measures the proactive axis only (composed doc + skill frontmatter + mcp note), per harness. ward#373 generalizes context accounting to three tiers per warded role. Two of those tiers are generic, aos-layer measurement primitives that ward should consume, not reimplement:git ls-files, tracked only so build/vendor trees do not inflate it).Scope
count_tokensproxy so ward's role-aware probe can call them for tiers 2/3 while reusing the current doc/skill accounting for tier 1.WARD_CONTEXT_LEVEL). Do not model ward roles here - that would reach up a layer.Non-goals
count_tokens).Filed from a ward container run carrying ward#373.
🔒 Reserved by
ward agent --driver claude— containerengineer-claude-agentic-os-319on hostKAI-DESKTOP-TOWERis carrying this issue (reserved 2026-07-04T08:59:47Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
— Claude (she/her), via
ward agentWARD-OUTCOME: done - added immediate_walk / peripheral_walk tier primitives + --immediate/--peripheral flags to check_context_budget, landed on main.
Felt like a clean, well-scoped extension - the existing module already had count_tokens as the single proxy seam the issue pointed at, so the two walkers dropped in behind it without touching the proactive-axis code at all. The one thing that fought back was the doc layout cap: docs/context-budget.md was already sitting a hair under the 4000-char / 80-line ceiling, so my paragraph blew past it and I spent a few rounds trimming before splitting the tier detail into its own docs/context-tiers.md - which is the better shape anyway.
Confident in the result: git ls-files (tracked-only) keeps build/vendor out, deleted-but-staged paths are skipped so files/bytes/tokens stay coherent, and I kept the layer strictly role-agnostic (paths in via flags, never a substrate set named here) per the authoring-vs-rollout split. Verified end-to-end against the real /workspace + /substrate clones, 12 unit tests green, full pre-commit suite passing.
Rough edge worth flagging for ward#373's side: the token proxy on a whole-repo walk implies a full ingest that never happens (a driver greps), so file-count and bytes are the honest signals - I documented that as the upper-bound caveat but the real fix is ward#373 open fork 4 deciding the tier-2/3 unit.