LoopBoard
CLAUDE.md19 starsChanged 11 days agoMITView on GitHub
@.claude/rules/branch.md @.claude/rules/tests.md VSCode extension: renders workspace .loopboard/ tracker as interactive board, writes edits back to markdown, spawns model-specific Claude Code loop terminals. Decisions: decisions/ (index DECISIONS.md); verification status: VERIFICATION.md. Storage: everything under .loopboard/ — TODO.md (slim task index, grammar v5), DONE.md (accepted, lazy), LOOP.md (rules + loop worker instructions), tasks/<id>.md (per-task detail). 1. Container-only toolchain — NEVER install on host (no npm/brew/pip/apt; never type npm/npx/node directly). Everything runs via make → Node 22 in Docker or Apple Container. Host has…
- Installs packages
In this repository4 other files it gives its agents.
- claude-md-compressSkill
- readme-regenSkill
- review-feedbackSkill
- template-loop-compressSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
ALL markdown IO goes through src/store.ts — only module that knows .loopboard/ paths.
- Very specific: line 59
Keep new logic pure/testable.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — LoopBoard
@.claude/rules/branch.md @.claude/rules/tests.md
VSCode extension: renders workspace .loopboard/ tracker as interactive board, writes edits back
to markdown, spawns model-specific Claude Code loop terminals. Decisions: decisions/ (index
DECISIONS.md); verification status: VERIFICATION.md.
Storage: everything under .loopboard/ — TODO.md (slim task index, grammar v5), DONE.md
(accepted, lazy), LOOP.md (rules + loop worker instructions), tasks/<id>.md (per-task detail).
Non-negotiable
- Container-only toolchain — NEVER install on host (no
npm/brew/pip/apt; never typenpm/npx/nodedirectly). Everything runs viamake→ Node 22 in Docker or Apple Container. Host has only a container runtime,make, git, VSCode. Tool missing from node:22 gets its own image. - Zero runtime dependencies. devDependencies = exactly
typescript+@types/vscode. No@types/node, no bundler, no frameworks; webview = vanilla HTML/CSS/JS. .loopboard/markdown = source of truth. Index (TODO.md, grammar v5) carries only id/phase/model/effort/groomer/groomer-effort/reviewer/reviewer-effort/questions/feedback per entry; every other field lives intasks/<id>.md. Parse tolerantly, write back canonical on every save, preserve unparseable lines verbatim (flagged in UI). Grammar + task-file format documented inLOOP.md.- ALL markdown IO goes through
src/store.ts— only module that knows.loopboard/paths; merge logic in exactly one place (merge.ts,patchTargetroutes index vs detail). Saves are field-level patches on ONE file: re-read disk, re-parse, apply one field, serialize whole file, atomic write (temp + rename). Same-field conflict → disk wins + toast. - Board performs ONLY four human actions: promote (New→Backlog on tick), accept (Review→DONE.md
on tick), demote (Backlog→New, immediate button click, non-destructive), reorder (drag a New or
Backlog card's handle:
store.reordermoves the entry withinTODO.md, immediate, reversible, off under search — t-81a0). Index order = the loops' pick order; workers never reorder. Everything else is a field patch the loop reacts to. Never auto-move tasks (or their position) optimistically.
Commands
make install # npm install in Docker
make build # tsc -> out/ (extension host)
make test # tsc tsconfig.test.json -> out-test/, node --test 'test/*.test.js'
make package # vsce package -> loopboard-todo-<version>.vsix
make check # build + test (no .vsix) — MUST pass before any commit
make check PACKAGE=1 # build + test + package — opt-in packaging check on the same command
make cleanAny src/** change requires make test + make check green before it counts as done.
Architecture
- Pure modules (unit-tested in Docker; must NEVER import
vscodeor node typings):parser.ts+writer.ts(index file),taskfile.ts(per-task detail file),model.ts,merge.ts,gates.ts,loop.ts,view.ts— compiled bytsconfig.test.json(types: []) intoout-test/. - VSCode-touching (manual F5 verification only):
extension.ts,store.ts,controller.ts,panel.ts,sidebar.ts,terminals.ts,webview.ts— maintsconfig.json→out/. - Webview assets:
media/board.{html,css,js},media/sidebar.{html,css,js}— vanilla JS, CSP nonce, VSCode theme variables only. - Keep new logic pure/testable; wrap
vscodeimports as thinly as possible.
Critical learnings (do not rediscover)
- No
@types/node: tests are plain CommonJS.jsintest/requiringout-test/; main tsconfig adds libDOM(not @types/node) forsetTimeout/TextDecoder. node --testneeds glob'test/*.test.js'— baretest/dir arg is treated as module path (Node 22).- Core invariant: parse→write→parse is a fixpoint for BOTH files;
serializeTodo(parseTodo(x))andserializeTaskFile(parseTaskFile(x))idempotent as text. Any parser/writer change keeps fixture suite green (incl. index fixture with an HTML-comment template — task-like- [ ]lines inside comments must not parse as entries). - Emoji canonicalization: index parser strips leading ❓ from question text; task-file parser strips
⚠️ from
## Feedback; writers re-add them. - Task-file heading order:
## Meta→## Problem→## Description→## Goals→## Worklog→## Delivered(t-2191). Problem/Goals are groomer-owned free markdown (no length/shape validation) and the yardstick review judges## Deliveredagainst; all three story sections share ONE board renderer (renderDetailSection/DETAIL_SECTIONS), attachments stay Description-only. - Task file
tasks/<id>.mdis eager-scaffolded on draft create (t-6ab4:store.createDraftwrites a skeleton —added: <today>, everything else empty and so omitted byserializeTaskFile, same shape the writer already canonicalizes an empty detail to). Missing file (only possible for pre-t-6ab4 entries or one deleted out-of-band) still parses as empty detail and card still shows the "no detail file yet" hint — no longer fires for ordinary new drafts. Writer rewrites H1 from index title on every task-file save (index title wins on divergence). - Webview vs concurrent loop writes: board defers incoming refresh while a field is focused
(
pendingBoard, flushed on focusout). Model select normalizesdefault (opus)→''before patching so an unchanged default never trips a false same-field conflict. - Index
## Tasksheading + HTML-comment extras round-trip verbatim viagetTasksHeading/getTasksExtras. - Terminals: plain VSCode terminals (
createTerminal/sendText/dispose), one per loop id (onlyorchestratorships), namedClaude Orchestrator; output can never be read. Loop launches as ONE line:claude --permission-mode <mode> --model <model> '/loop ...'— the ~200-char bootstrap prompt (frombuildLoopCommand(store.loopText, …), points at.loopboard/LOOP.md's## Automation; slices that section out first since LOOP.md has several earlier fences) rides as single-quoted argv. CLI seeds it into REPL input but does NOT auto-submit → lone Enter afterBOOT_DELAY_MS(post-TUI-boot, past bracketed-paste detection). Pasting into a running REPL (e.g./clear): paste + Enter afterSUBMIT_DELAY_MS. Short line is apostrophe-free (still'\''-escaped). - Scheduled loop actions (t-77d1): all three sidebar row buttons keep their immediate left-click
meaning (▶
spawnLoop, ♻recycleLoop, ■stopLoop); RIGHT-click (contextmenu, host menu suppressed) opens a popover scheduling that same action (preset minutes +Custom…, always MINUTES;repeat;forceon restart/stop only — a start interrupts nothing, andarmScheduleforces it false). ONE schedule per loop whatever armed it (start/restart/stopare contradictory), so arming replaces. Scheduling is available on all three buttons in ANY loop state — hencearia-disabled+.offinstead of the realdisabledattribute, which would fire no mouse events and take the right-click away with the left.appliesTore-checks at fire time and SWALLOWS an action that no longer matches (arestartarmed for a since-stopped loop does nothing, never a silent start); schedule still fires, so a one-shot disarms and a repeat keeps its cadence. Schedule logic is pure (src/schedule.ts, unit-tested); controller owns the per-loop schedule map and itssetTimeouts, SESSION-ONLY (nothing inglobalState/workspaceState/.loopboard/, so a reload clears every schedule — matching terminals, which die with the window too). Force consent is a native modal taken ONCE at arm time (a scheduled action is unattended by definition); fire time is silent and only logged. Withforceoff the timer defers while that loop is BUSY and waits indefinitely; busy = any In-Progress task ∪ a live subagent (busyLoops) (t-sbag: puresrc/subagents.ts,contextreader.readSubagents, 60-min transcript-mtime staleness cap; manual ♻ only warns in its tooltip;forceand a scheduled start override it). The idle edge is a board refresh, but a finishing subagent writes no.loopboard/, so the context poll re-runs the flushes too. A forced restart leaves the taskphase: inprogresswith no worker (Rule 2 block until the next pass's step (0) resumes it) and kills live subagents, hence the modal. - One Orchestrator loop (t-0e99):
LoopId(orchestrator) keys terminal,--nameand every controller map;Model(opus|sonnet|fable|haiku) is only the task value. It never edits code: every groom/implementation/review is a subagent on the task's routing keys, else the five defaults (bootstrap prompt, plus narrowed per-model effort ranges). NOauto: nothing picks a model or effort; complexity is a Meta record. Id override =ANTHROPIC_DEFAULT_<MODEL>_MODELenv; old keys read-both. - Workspace custom rules (t-4a04): a hand-owned
<!-- loopboard:custom:begin/end -->free-text section in.loopboard/LOOP.md— NO setting, NO reconciler, NO config listener (the earlierloopBoard.customRules+ per-line-marker machinery was removed after human rejection; do not reintroduce it). The extension never reads or writes the section; it survives Sync by construction becausesync.tsmatches only theloopboard:sync:namespace (regression test intest/sync.test.js).media/template-loop.mdends with the EMPTY section outside every sync marker: fresh workspaces scaffold it, Sync never adds it to existing files. Caveat: a LOOP.md with NO sync markers at all is legacy-replaced wholesale on Sync, activation auto-sync included, no modal (backed up toLOOP.md.bkp). The gear opens LoopBoard's OWN settings page (t-sgrp), drawn fromcontributes.configuration(every keyscope: application, so writes are always Global); itsloopBoard.*config listener lives and dies with that panel —src/has none otherwise, and configuration is still read on demand.loopBoard.autoMigrateSettings(default on) applies Migrate Config's bulk writes per activation; conflicts/sweeps stay manual. - Packaging:
.vscodeignorekeeps the.vsixtoout/+media/+ manifest/README;vsce packageneeds--no-dependencies(zero runtime deps). - Debug trace (
loopBoard.debug=off | info | verbose; rule:.claude/rules/debug.md): every new feature MUST declare its debug events + level, whatever it reads or acts on (.loopboard/, VSCode config, popups,~/.claude/**, …), each viastore.debugLog(level, event, detail)—infofor lifecycle (gates + their request/cancel, loop spawn/recycle/stop, disk-wins conflicts, activation, toastwarnings, native popups + user's choice on interactive modals),verbosefor per-patch/attachment/config-read/message/refresh-trigger/template-preview detail and routine toastsuccess/info— through the single store sink (store.ts), never a privateconsole.logor ad-hoc file.offwrites nothing. Logged verbatim to gitignored.loopboard/debug.log(buffered hybrid: in-memory buffer → debounced flush → whole-file read-concat-write, no temp+rename, 10 MB tail-cap, forced flush ondeactivate). Pure modules stay vscode/store-free — log at the store/controller/terminals boundary, never thread a logger into them.
Conventions
- Repo root IS the workspace it operates on (
workspaceContains:.loopboard/TODO.mdactivation +.loopboard/file IO align) — extension is not nested. Missing.loopboard/→ board shows init empty-state;LoopBoard: Initialize Workspace/loopboard.initscaffolds it and refuses if it already exists. - Record notable implementation decisions as one-liners in the matching
decisions/<category>.md(index:DECISIONS.md; append at the bottom); updateVERIFICATION.mdwhen the verification story changes. - Manual checklist (M3–M6, F5 Extension Development Host) lives in
VERIFICATION.md; headless sessions cannot run it — say so, never claim it done. DONE.mdmay be absent until first Review acceptance; store treats missing as empty — keep it that way.media/template-todo.md+media/template-loop.md(scaffold for fresh.loopboard/workspaces).template-loop.mdis not hand-mirrored: its marked sections are the sourcesrc/sync.ts'ssyncMarkedSectionspushes into every workspace's.loopboard/LOOP.mdon Sync (settings-page button, and once per activation whileloopBoard.autoSyncTemplatesis on — t-4dce; never on refresh/watch) and activation auto-heal (store.syncTemplates/store.autoHeal; drift plan = pureplanSync). Compressing it is scoped by.claude/rules/template-loop-compress.md(paths:→media/template-loop.md) to thetemplate-loop-compressskill (.claude/skills/template-loop-compress/);CLAUDE.mdhas the same pair (.claude/rules/claude-md-compress.md,.claude/skills/claude-md-compress/). Each runs in an Opus subagent, is lossless-only (obsolete content is a separate human edit), writes only when its own self-check passes, and never engages for any other file. Both files also carry a line budget asserted intest/— the backstop that binds an editor who never reads the rule.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

