Skip to content

feat(loop): line budget + on-touch mandate keep LOOP.md short (t-1cc8) - #128

Merged
ArgonQQ merged 2 commits into
mainfrom
task/t-1cc8-loop-md-budget
Aug 28, 2026
Merged

feat(loop): line budget + on-touch mandate keep LOOP.md short (t-1cc8)#128
ArgonQQ merged 2 commits into
mainfrom
task/t-1cc8-loop-md-budget

Conversation

@ArgonQQ

@ArgonQQ ArgonQQ commented Aug 28, 2026

Copy link
Copy Markdown
Member

Problem

media/template-loop.md is re-read by every loop worker on every pass and pushed into every
workspace's live .loopboard/LOOP.md by syncMarkedSections (src/sync.ts). Its length is a
per-pass token cost multiplied across all running loops in all workspaces — and it only ever grew:

  • the template-loop-compress skill engages only when explicitly asked, and
  • .claude/rules/template-loop-compress.md fired on every touch of the file but demanded nothing
    of 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). Asserts media/template-loop.md stays
within 228 lines, under make test / make check, which must pass before any commit. This is the
load-bearing half: CI cannot cover it (build.yml carries paths-ignore: ['**/*.md'], so doc-only
pushes 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 grows
the 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 → 2586
words). Landed through the template-loop-compress skill's own gated flow in an Opus subagent,
self-check green:

  • six sync markers present, unmodified, in order;
  • the ## Automation heading and its first fenced block byte-identical (4600 bytes);
  • Rules still numbered 1–17, no gaps, merges or reorders;
  • the task-index-format and task-file-format fences byte-identical;
  • all 109 inline code spans byte-identical; bullet count flat at 27;
  • MUST/NEVER/ONLY occurrence counts and every count/path/identifier unchanged.

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-intro section and the Notes bullet just
below the fence).

4. DECISIONS.md one-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 check green — build + 155 tests, including the new budget test.

Task: t-1cc8

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%.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Build succeeded — installable .vsix for task/t-1cc8-loop-md-budget (commit 920fb28):

loopboard-todo-1cc8-loop-md-budget.vsix

Download from the run's Artifacts, unzip, then install: code --install-extension loopboard-todo-1cc8-loop-md-budget.vsix (or VS Code → Extensions → ⋯ → Install from VSIX…).

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build succeeded — installable .vsix for task/t-1cc8-loop-md-budget (commit 1fae523):

loopboard-todo-1cc8-loop-md-budget.vsix

Download from the run's Artifacts, unzip, then install: code --install-extension loopboard-todo-1cc8-loop-md-budget.vsix (or VS Code → Extensions → ⋯ → Install from VSIX…).

@ArgonQQ
ArgonQQ merged commit c32ed5c into main Aug 28, 2026
1 check passed
@ArgonQQ
ArgonQQ deleted the task/t-1cc8-loop-md-budget branch August 28, 2026 08:57
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.54.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant