feat(loop): line budget + on-touch mandate keep LOOP.md short (t-1cc8) - #128
Merged
Conversation
media/template-loop.md is re-read by every loop worker on every pass and synced into every workspace's LOOP.md, so its length is the most expensive prose in the product - and nothing stopped it growing. The compress skill runs only when asked, and the path-scoped rule fired on every touch while demanding nothing of an ordinary edit. Both halves now enforce it: - test/template-budget.test.js caps the file at 228 lines under make check. This is the half that binds an editor who never reads the rule: build.yml ignores '**/*.md' so doc-only pushes get no CI, and a delegated subagent cannot invoke a skill unless one is handed to it. - The rule gained an on-touch mandate: a change that grows the file strips an equivalent amount of no-longer-needed prose in the same change, or runs a compression pass first. The baseline compression pass landed too, through the skill's own gated flow: 213 -> 207 lines with the self-check green (markers, Automation fence, rule numbering 1-17 and all inline code spans byte-identical). 228 = 207 + ~10%.
Contributor
|
📦 Build succeeded — installable loopboard-todo-1cc8-loop-md-budget.vsix Download from the run's Artifacts, unzip, then install: |
Contributor
|
📦 Build succeeded — installable loopboard-todo-1cc8-loop-md-budget.vsix Download from the run's Artifacts, unzip, then install: |
Contributor
|
🎉 This PR is included in version 2.54.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
media/template-loop.mdis re-read by every loop worker on every pass and pushed into everyworkspace's live
.loopboard/LOOP.mdbysyncMarkedSections(src/sync.ts). Its length is aper-pass token cost multiplied across all running loops in all workspaces — and it only ever grew:
template-loop-compressskill engages only when explicitly asked, and.claude/rules/template-loop-compress.mdfired on every touch of the file but demanded nothingof an ordinary feature edit that merely adds text.
So the "enforced when the file is touched" requirement was met by neither artifact.
Change
1.
test/template-budget.test.js— the backstop (new). Assertsmedia/template-loop.mdstayswithin 228 lines, under
make test/make check, which must pass before any commit. This is theload-bearing half: CI cannot cover it (
build.ymlcarriespaths-ignore: ['**/*.md'], so doc-onlypushes produce no build), and skill/rule enforcement does not bind a delegated implementer
subagent, which cannot invoke a skill unless one is explicitly handed to it. Lines, not bytes or
tokens — dependency-free, stable across editors, readable in the failure message. 228 = the
compressed baseline of 207 plus ~10% headroom; raising it takes a deliberate edit to the test.
2.
.claude/rules/template-loop-compress.md— the on-touch mandate. Any change that growsthe file must strip an equivalent amount of no-longer-needed prose in the same change, or run a
compression pass before landing — for ordinary feature edits, not only for compression tasks. The
rule also now names the budget test and why it exists.
3. Baseline compression pass on
media/template-loop.md: 213 → 207 lines (−2.8%; 2615 → 2586words). Landed through the
template-loop-compressskill's own gated flow in an Opus subagent,self-check green:
## Automationheading and its first fenced block byte-identical (4600 bytes);The yield is honestly small — the file was already dense. Gains came from real redundancy only
(articles and copulas in the intro, filler in Rules 2/12, and one restated sentence in the
Automation intro whose content still appears in the
loop-introsection and the Notes bullet justbelow the fence).
4.
DECISIONS.mdone-liner for the enforcement mechanism.Scope is LOOP.md/the template only — CLAUDE.md compression is deferred to its own story (t-cmp1).
No
src/**change, no.loopboard/grammar change.Verification
make checkgreen — build + 155 tests, including the new budget test.Task: t-1cc8