Repository navigation
feat: ROADMAP §3.1–3.5, §4.1–4.8, §4.10 — budget semantics, intent contract, ids, semantic targets, provenance, impact seam, metrics - #8
Merged
Conversation
Crossing the soft token limit no longer tells the worker to wrap up. The budget hook records task.token_soft_limit once per attempt in .agentic/logs/events.jsonl; stats.md counts it and NEXT.md lists the tasks as planner input. The soft time limit still warns; hard limits unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
claude plugin validate --strict now rejects unquoted placeholders, which turned the plugin CI job red on master-based PRs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
Owner
Author
|
Generated by Claude Code |
At the hard limit the worker is stopped on the crossing call instead of being given one last call to write its report. The harness appends the gate-valid status: re-plan block to output.md itself (limits, worktree diff, transcript path) and records task.token_hard_limit / task.time_hard_timeout. A verdict reached before the worker's worktree is known still gets one call to find it and withdraw. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
adeelahmad
marked this pull request as ready for review
October 17, 2026 03:04
The budget charge is now fresh (uncached) input + output by default. Cache read / cache write are kept as separate classes in the attempt state, and context is the latest call's, never cumulative cache traffic. TOKEN_METER=context (defaults.md) or BUDGET_TOKEN_METER (task.env) keeps the previous context + output charge. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
Intake, standards, planner, archivist, structural-reviewer and final-gate are metered against per-role profiles (AGENTIC_BUDGET_<ROLE> in defaults.md overrides). Observe-only: crossings become events; the agent is never told, stopped, or KILLed by budget watch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
The hook makes a deterministic first classification of each hard stop from facts it owns (usage classes, tool calls and results, which limit tripped) and records it with evidence in the output.md block, the event, budget watch and the new budget classify. The planner confirms or overrides it and acts per class instead of always splitting. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
budget admit <task> runs before each dispatch: one rollover warning at SPRINT_TOKENS_SOFT; at SPRINT_TOKENS_HARD admission closes (exit 3) and refused tasks are carried over in sprintN/rollover.md with the reason. gate-final accepts unticked boxes only for carried tasks; NEXT.md and stats.md hand the rollover to the next planning cycle. TOKEN_METER and the sprint envelope are settable through agentic-init. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…DMAP §4.3) budget envelope <task> prints the minimal failure envelope (facts and references only). NEXT.md's Planner feedback section applies the grace rule (0-1 troubled tasks: no nudge; 2+: one plan-smaller nudge for the next cycle only) with a calibration verdict from the breach classes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
_events.py gives every harness event one envelope (ids, parent/caused_by, role, host, model, authority, decision, refs, data) and refuses unknown types. Budget events, real gate verdicts and the worktree lifecycle (created / merged / discarded) are emitted into it. bin/events query and lineage answer from the stream alone, with refs instead of transcripts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
sprint-close writes sprintN/handoff.json from accepted state (gate verdicts, merge events, open/carried work, nudge, refs); NEXT.md renders it. stats resume-check names tasks shown done without a passing gate verdict; SessionStart appends the live check to the handoff. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
stats.md now reports p50/p90/p95 attempt duration and tokens, breaches by role/class, hard-breach waste, tokens per accepted task, first-pass rate per gate, re-plan rate, cache-hit and churn ratios, context peak and admission closures, all derived from harness files (no model calls). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
events authority records who approved the run, the autonomy mode, scope and overrides (human.approval + .agentic/state/authority.json). events decide records one-line rationale with evidence refs, caused_by the authority; multi-line reasons, unknown kinds and missing authority are refused. Lineage shows decisions inline. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…omous mode (ROADMAP §4.1) bin/intent new issues a canonical time-ordered intent_id (never model text) and the contract skeleton with provenance; intent check validates every field and the clarification policy (assume/default/spike record their resolution; an unanswered ask stops both modes, exit 3); intent summary surfaces defaults/assumptions for approval. gate-intake runs it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…ence rule (ROADMAP §4.3) bin/lessons records symptom/cause/change/applies_to/evidence_refs candidates, lists the groups seen in >= 2 distinct tasks for the archivist, and gate-memory blocks a memory.md row that promotes a one-off without a human keep. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
bin/ids freeze checks the structured references between planning artifacts and issues each story/task alias a frozen UUIDv7 in sprintN/ids.json; retired (split) aliases are never reused. Run by gate-stage2-complete; events for frozen tasks carry story_uid/task_uid. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…ext CLI (ROADMAP §4.6) bin/targets validates the planner's targets.json against tasks.md and the real tree (run by gate-stage2-complete), resolves a task's targets to file:line or a planned shadow entry, and prints budget-capped context for one change. refs/callers/callees report the missing LSP backend (exit 4) instead of guessing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…milestone 7) gate-stage2-complete emits plan.created/plan.revised caused by the intent, events authority emits plan.approved for the latest plan, and task-worktree remove emits commit.created per merged commit. events trace walks commit -> task -> gates -> plan -> intent -> approver from the stream alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
… served (ROADMAP §4.10) Metrics now read the event stream: commit.created (with test files added from git), task.time_soft_limit, and semantic_target.resolved, which targets target|context now emit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
bin/impact query asks AGENTIC_IMPACT_PROVIDER (any command speaking aladdin.impact/1) for consumers/rationale/migration/standards, keeps only sourced results, saves them as planning provenance and emits artifact.created. An unavailable provider warns and planning continues. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
codex-hooks and opencode-plugin fire SessionStart, which started a ~340MB ensure-tools build per run in the test's temp HOME and kept running after the test exited; locally it filled the disk. Set AGENTIC_NO_AUTOINSTALL=1 (the tests never use the built tools). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
events commit-msg TASK builds the message from the task title in tasks.md, the task's recorded decisions and its task/intent ids. events graph exports the stream as nodes/edges (JSON or DOT), derived and rebuildable. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…OADMAP §4.2) With AGENTIC_TIME_MODE=auto, bin/timebox propose records one stable task duration (min/max, reason) and budget resolve uses it (soft = 2/3); revise needs existing evidence and stays in range, each change is a decision.recorded. Task-level overrides still win. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
bin/sweep prints one action per planned task (DONE, ROLLOVER, WAIT, REPLAN, ACCEPT, RETRY, ESCALATE, SPAWN) from the event stream, attempt states and rollover.md; sweep wait blocks without a model call until an event or attempt state changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…ROADMAP §8) docs/TRACKING.md reports every roadmap requirement as IMPLEMENTED_TESTED, IMPLEMENTED_UNTESTED, BLOCKED_HOST or NOT_IMPLEMENTED; check-tracking.py fails if a tested row's test file is missing or not run by the Makefile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
_lsp.py is a minimal stdio LSP client (references + call hierarchy); targets refs|callers|callees use the server in AGENTIC_LSP_COMMAND. No server or a missing capability exits 4 with the reason; planned targets report none yet. Tested against a deterministic fake server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…formance 12) _usage.classes marks accuracy (exact: read from the host's own log) and names any class the host never reports (Codex has no cache write) rather than a silent zero; stats.md shows it as Usage accuracy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
… §4.9) plugin/hosts/capabilities.json and bin/capabilities state what each host advertises (unknown = not advertised). Sprint close names the host's own rotate command; compaction only when chosen and advertised; keeping a session needs a recorded reason. SessionStart records context.rotated / context.compacted and stats.md counts them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…4.6) With no SCOPE_GLOBS but a targets.json, gate-green-verify enforces the task's target paths (targets scope) instead of skipping the scope check. An explicit SCOPE_GLOBS still wins. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
…map branch Conflicts resolved by keeping both sides: aloop names and aloop:<role> matchers from #7, with this branch's budget-stop matcher for every role, no post-kill narration, the resume check and the boundary rule. The init settings (TOKEN_METER, sprint envelope) move to aloop-init. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
… diff Since #7, workers must commit before their gate runs. With no BASE_REF, changed_paths only listed uncommitted changes, so a committed out-of-scope file passed GREEN's (and RED's tests-only) scope check. It now also takes the branch's commits since it left the main tree's HEAD. targets-scope.test.py failed before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV
adeelahmad
pushed a commit
that referenced
this pull request
Oct 18, 2026
Resolves the gate-verdict log (stuck release + the aladdin.event stream), budget watch (STUCK lines + breach class), the Codex test env, the bin README and the CHANGELOG. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QxyVf3NgwsgRyYpBgDDTC
adeelahmad
pushed a commit
that referenced
this pull request
Oct 18, 2026
…and #14) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QxyVf3NgwsgRyYpBgDDTC
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.
Requested by Adeel · project thread
Before: crossing the soft token limit told the worker to wrap up. The token meter folded cache traffic into context. Only the three workers were metered. Every hard stop was split, and the stopped worker spent one more model call narrating. The sprint had no aggregate budget, the planner got no structured feedback, intents were prose, aliases had no canonical identity, workers scanned the repo for what to change, and nothing linked a commit back to the intent that asked for it.
After: one commit per ROADMAP item, each with a test that fails on
master:TOKEN_METER=contextkeeps the old meter.status: re-planblock.bin/intent) with the assume/default/ask/spike policy; an unansweredaskstops both modes.budget admitandrollover.md.bin/lessons) promoted only by the recurrence rule (gate-memory).sprintN/handoff.jsonand the resume rule.bin/ids freeze: structured cross-artifact references checked, UUIDv7 ids frozen per story/task, retired aliases never reused.bin/targets: structured change targets, a shadow workspace for planned files,target/context --budget Nfor workers; refs/callers report the missing LSP backend instead of guessing.aladdin.event/1stream with plan/commit emitters;events trace SHAwalks commit → task → gates → plan → intent → approver (milestone 7);events commit-msgandevents graph.bin/impact, an optional provider seam; unsourced results dropped; an unavailable provider never blocks planning.Also ports #6's
${CLAUDE_PLUGIN_ROOT}quoting fix, and stops the host tests from starting a ~340MB background cargo build in their temp dir. §3.6 and §4.9 wait for #7, which owns install, init and the host adapter.How: new CLIs
events,intent,lessons,ids,targets,impactplus_events.py; budget logic inbudget,stats,_usage.py; small hooks in_gatelib.sh,task-worktree,gate-final,gate-intake,gate-memory,gate-stage2-complete,session-start,agentic-init. Docs in SKILL.md, agent personas, CHANGELOG and ROADMAP (each item marked with what remains open).Evidence
budget-soft-telemetry6,budget-hard-stop4,budget-meter4,budget-roles4,budget-classify7,sprint-admission5,planner-feedback5,events6,handoff-resume4,metrics5,intent-contract6,lesson-candidates5,ids-integrity5,semantic-targets5,commit-trace6,impact-provider3. Existingbudget-worktree,codex-hooks15 andopencode-plugin19 updated.make test-hosts pycheck eval-validate jsonpass locally.budget,hooks.json, SKILL.md, CHANGELOG andagentic-init. Whichever PR lands second resolves them.🤖 Generated with Claude Code
https://claude.ai/code/session_014j4wLin3oJTtnvjE9Lq2VV