Repository navigation
feat(#442): token diet wave 4B — per-op Git refs, PR via Git, Code variants, mode refs - #459
Merged
Merged
Conversation
Every Git operation's Input, degradation notes, Output template and steps
move out of git.mds into the one reference that operation loads:
pr/{op}.md for the eight PR-host operations, tracker/{provider}/{op}.md
for the eleven tracker operations and learn-conventions.md for the one
doc-backed operation. The agent body keeps the shared rules, a loading
table that names each reference, the D11 scrub and the routing table; it
measures 10,823 chars, down from 35,225.
Each contract is written once in an MDS partial and compiled into every
reference that carries it. The partials are split three ways by importer
(_ops.mds, _ops_pr.mds, _ops_steps.mds) because the resolver's compile
cost is exponential in a module's define count; all are alias imports,
and src/assets/mds/.mdsroot pins the project root so the provider
modules may import across tracker/ and git/. A reference opens with its
contract, then its steps.
ensure-pr-ready is a tracker operation only: one file per provider holds
the PR skeleton and that provider's step 4b, and pr/ensure-pr-ready.md
is no longer emitted (PR_HOST_OPS 9 -> 8). create-release's release-host
steps are likewise expanded into each provider's reference; the Jira and
Linear transport guards and the provider-literal guards exempt those host
lines by exact line, never by operation.
Guards that read the contract from git.md read the operation references
instead. budget-git-md, the four loaded-set ceilings and the new
git-op-load-max are re-derived downward (the loaded-set and cap rows carry
5,000 ch of room for #448, which tightens them). pr-host-max-op-load is
retired. The manifest-size floors and capability-hoist-block-floor fall
with the roster they count.
Fixture and the equality baselines that pin its size only: GIT_AGENT_BYTES, GIT_MD_CHARS, GIT_MD_LINES, TOTAL_CHARS and TOTAL_LINES. The compiled agent fell from 35,452 to 10,877 bytes when every operation's contract and steps moved into the reference that operation loads. github-status-lines.txt is not touched.
ensure-pr-ready is a tracker operation with one reference per provider, so the build no longer emits references/pr/ensure-pr-ready.md. The three install goldens lose that one line; nothing else in them moves.
Ninth re-capture, authorised by the user on 2026-10-12 for #451 only: ten lines, deletions only, nothing added. The Git agent no longer carries operation sections, so the `**Process:**` labels and the `**Mechanics:** load this operation's provider reference.` pointers that the manage-debt, check-ci-status and gather-release-evidence samples read have no successor; each operation's contract and steps are one reference. Fixture lines 132-135, 139-140 and 158-161 (the third group is Process, blank, Mechanics plus one of two adjacent blanks; which one a diff names is alignment, the resulting bytes are the same). The other 239 lines are byte-identical. The authorisation log and FROZEN_LIFECYCLE_RULE now say nine granted, nine spent; FIXTURE_BYTES 18,383 -> 18,225 and FIXTURE_NEWLINES 249 -> 239.
The repo has no retire mechanism for a floor, so each lowered value carries a dated note beside it. generated-reference-manifest-size, packed-reference-manifest-size and installed-reference-count-github/-provider fell 48 -> 47 (pr/ensure-pr-ready.md is no longer emitted), and capability-hoist-block-floor fell 63 -> 42 (the agent's twenty **Process:** blocks and the PR-host ensure-pr-ready block left with the operation text). Each note names the old value and that the user accepted the drop on 2026-10-12 (PF-095). No value changes in this commit.
The behavior command (devflow behavior --enable|--disable|--status) had no row in the write-set fence, so the coverage test failed. Its converge writes the manifest and one rule file under rules/devflow/, an entry the table already counts once, so the allowlist footprint stays at 12.
Phase 9 of /implement is one unconditional Git ensure-pr-ready spawn, outside every strategy branch, between the quality gates and the CI gate. The CI gate is Phase 10 and now runs under every strategy, evidence is Phase 11 and the report Phase 12. ensure-pr-ready takes the inputs the Code agent's PR step read (BASE_BRANCH, TASK_ID, ISSUE_NUMBER, ISSUE_PR_LINK, PR_EXCEPTIONS) and the paste gates move with them, byte for byte where the frozen status-line fixture samples them: the Related Issues rows, the handoff-value shape gate, the evidence-exception gate and the PR-body scrub paragraph. One test-plan check serves both caller blocks. A given ISSUE_PR_LINK is pasted after its shape gate and step 4b does not resolve; COMMIT_UNCOMMITTED (default true, false from /implement) lists stray files instead of committing them; a failed scrub still opens the PR with the fixed minimal body. The Code agent loses CREATE_PR, the PR inputs, its PR responsibility and the pr-create mode (8 modes to 7); its compiled body falls from 24,851 to 16,449 bytes. resolve, debug and dynamic-build drop CREATE_PR and the dead link inputs from their Code spawns. Ratchets: the link-forwarding floor is replaced by issue-pr-link-pr-open-sites, code-body-max is registered, and the loaded-set and per-operation ceilings fall to measured plus the general headroom. The accepted floor drops no longer cite a ledger ID. github-status-lines.txt is byte-identical; its three Code samples now read the ensure-pr-ready reference.
One Code agent paid for every mode's text and skills on every spawn, though a spawn runs exactly one mode. Three MDS hosts now share one partial: Code (implement, issue-fix), Code-fix (validation-fix, alignment-fix, qa-fix, ci-fix; no default mode, a missing OPERATION returns BLOCKED) and Code-edit (edit). Each keeps the security-scan block and apply-decisions; only Code preloads test-driven-development and apply-feature-knowledge. The Step 0 mode-skill table and the DOMAIN input are gone, with the runtime skill loading they drove; the compliance load stays. The fix spawns in /implement, /resolve and /dynamic-build move to Code-fix, and the orchestrator charter routes edit to Code-edit. Registry, agents config, manifests, ratchets and guards follow, with a new guard for the variant shape. Compiled bodies: Code 11,680 B (was 16,449), Code-fix 9,159 B, Code-edit 6,508 B.
The install goldens list the Code-fix agent in every config and the Code-edit agent in the configs that install ambient mode.
…rences Add the reference-only skill agent-references to devflow-core-skills. It holds the six Synthesize mode templates and the Learning maintenance step, which each agent reads by explicit path. The skill carries user-invocable: false and disable-model-invocation: true; the repo-wide ban on the second flag gets a one-name exception, and a guard holds that no agent preloads the skill and no plugin requires it. Synthesize keeps its shared head, a six-row mode routing table, Output, Principles, Core rules and Boundaries (16,560 -> 4,049 bytes). It reads exactly one mode reference when the prompt carries a Mode line, reads none when it carries no Mode line, and answers BLOCKED for an unknown mode. /explore now passes Mode: exploration. Learning keeps the claim heartbeat, rotate-observations, the claim-due call and the due-none line (20,539 -> 16,690 bytes). The maintenance ladder, the claim-due output format and the close-out batch move to maintain.md, read only when an entry is due. New ceilings synthesize-body-max, synthesize-mode-ref-max and learning-body-max.
…e-history comments
- git.md: a step that runs another operation or follows its reference may load that reference. The flat 'read no other operation's reference' rule blocked setup-task's issue-first step and the provider-signal pointers that the budget model prices. - ensure-pr-ready: the routing row and the reference description name every caller, not only /code-review. - /implement Phase 11: state that the re-validation path has no CI gate. - Guard the hop rule with a named collector and a known-bad probe. - Replace move-history test comments with end-state text.
Owner
Author
Test Plan Evidence — 370102cVerified 27/27: VERIFIED-CI 25, ATTESTED-LOCAL 2, UNVERIFIED 0, STALE 0, FAILED 0, INDETERMINATE 0
|
requires-closure-token-floor fell 44 -> 41 when the Code variants removed the Step 0 table and the DOMAIN input from the Code prompt. The skill names boundary-validation, dependency-research and patterns appeared only in that deleted text. The user accepted 41 on 2026-10-12. The manifest note and the comment beside REF_TOKEN_FLOOR now carry the old value, the reason and the acceptance, in the same form as the other accepted floor drops.
The compliance lens is the union of the machine, the default branch and the worktree, so the compliance skill installs everywhere and only the command knows whether the lens is on. The command now carries the instruction in the spawn prompt, and only then. - _compliance.mds is the one home of the directive text. A lens-off spawn carries nothing about compliance. - Code and Code-fix lose the compliance step and the COMPLIANCE_FRAMEWORKS input (525 B each per spawn). Every Code and Code-fix spawn site passes COMPLIANCE_DIRECTIVE instead. - Review and Design lose the lens input and the compliance rows (288 B and 151 B). The /code-review and /plan compliance-focus spawns inject the focus directive. - gap-analysis section 7 moves to references/compliance.md, which the /plan compliance-focus spawn names by path (1,456 B off the Design preload). - Ratchets: code-body-max and code-fix-body-max lowered to measured. - Guards: compliance-injection.test.ts holds both sides with collectors, non-vacuity floors and known-bad probes; code-variants.test.ts now forbids every Skill call in a variant.
- The installed compliance SKILL.md stamp and checklist named a COMPLIANCE_FRAMEWORKS input that no agent receives now; they name the ids in the agent's prompt, and a test holds every composed stamp free of the input name. - /resolve sets the compliance directive per worktree, at the step that passes it. - The compliance-injection guard also sweeps the learning-off command variants (Code spawn sites, the off-to-empty gate, the focus spawns), with known-bad probes on learning-off-only arms and on the two focus-spawn claims that had none.
Update counts (20 agents, 42 skills, 47 generated references), the Code agent variants, the Git agent opening the PR after the quality gates, the compliance directive in the spawn prompt, the agent-references skill and the CHANGELOG entries for wave 4B.
The workflow preamble's closed list of valid agentType values lacked Code-fix, although dynamic-build and the engine spawn it for the validation, alignment and QA fixes. Its decisions step also left Code-fix out of the receivers of the decisions index, which that agent declares and every Code-fix spawn carries. Add Code-fix to both lists. Code-edit stays out: no workflow spawns it. Guards: each compiled dynamic host's valid-agentType sentence must list exactly the roster and every type the host spawns, and the decisions step must name every valid type that declares the key. Each has a non-vacuity assertion and a known-bad probe.
… wave 4B Feature index: list code-fix among the resolve-pipeline areas and bring the tracker-references lines to their KB descriptions. The resolve-pipeline areas read code(-fix).mds so the line stays within the 300-character budget. Manifest notes (descriptions only, no values): budget-git-md is a measured 10_743 plus the 80 general headroom; git-agent-remote-io-ops reads one corpus for both halves; synthesize-body-max gives the main-branch body size. Test comments: describe the end state of the status-line reference list, the split samples, the git.md budget derivation and the PR-opening Git spawn.
Owner
Author
Test Plan Evidence — f3092c4Verified 29/29: VERIFIED-CI 27, ATTESTED-LOCAL 2, UNVERIFIED 0, STALE 0, FAILED 0, INDETERMINATE 0
|
This was referenced Oct 12, 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.
Summary
Wave 4B of the subagent-economics epic cuts the four largest fixed loads that each spawn carries but does not use. Every spawn now loads only the operation, variant or mode it runs. The four tickets land in integration order: #451, then #448, then #449, then #450.
Changes
#451: the Git agent loads only the operation it runs
#448: the Git agent opens the PR, the Code agent opens none
#449: per-mode Code variants
#450: mode-scoped Synthesize and Learning bodies
Behaviour changes
Breaking Changes
None. No command, flag or file format that a user calls changes.
Reviewer Focus Areas
Fixture and ratchet record
Testing
Post-merge checks
Related Issues
Closes #448
Closes #449
Closes #450
Closes #451
Refs #442 (epic)
Refs #417 (token diet)
Added during review (2026-10-12)
COMPLIANCE_FRAMEWORKSinput./implement,/resolve,/debug,/dynamic-build,/code-reviewand/planadd one directive line to the spawn prompt when the resolved lens is on. A repository can turn the lens on while the machine switch is off, so an install-time variant would be wrong. The gap-analysis compliance section moved toreferences/compliance.md, which only the compliance-focus Design spawn reads. Saved per lens-off spawn: Code and Code-fix 525 B each, Review 288 B, Design about 1.6 KB.Code-fixas a validagentTypeand as a decisions receiver. A new guard keeps that list equal to the types each host spawns.[Unreleased]),docs/commands.md,docs/cli-reference.mdand fivedocs/reference/pages now describe wave 4B: 20 agents, 42 skills, 47 generated references.requires-closure-token-floor44 → 41 is accepted by the user, because three skill names lived only in the removed Code Step 0 text.Test Plan