agentleFS
tmck-codetmck-code/yet-another-statusline/CLAUDE.md

yet-another-statusline

CLAUDE.md244 starsChanged 4 months agoBSD-3-ClauseView on GitHub

This file is read by the main thread every session. Its job is to keep the main context clean by routing work to subagents instead of absorbing it. Your default posture is to route, not to perform. Discovery sweeps, test output, and debug iteration are the things that silently fill the context window — keep them off the main thread. You absorb summaries and verdicts; the subagents absorb the noise. The agents that exist for this (see .claude/agents/): - verifier…

The file

We split this CLAUDE.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    A failing gate is a delegation trigger, not a debug trigger: When verifier reports a failure, do not start reading source, forming …

    line 29
  2. Distinctive:

    Parallelise independent work: When two units don't depend on each other, spawn both subagents in a single message so they run concurrently.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 28,633 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md — YAS working agreement for Claude Code

This file is read by the main thread every session. Its job is to keep the main context clean by routing work to subagents instead of absorbing it.

The main thread is a coordinator, not a worker

Your default posture is to route, not to perform. Discovery sweeps, test output, and debug iteration are the things that silently fill the context window — keep them off the main thread. You absorb summaries and verdicts; the subagents absorb the noise.

The agents that exist for this (see .claude/agents/):

  • verifier — runs the test + demo gates, returns a compact verdict (pass/fail counts, failing node ids, one-line root-cause). Read-only.
  • yas-editor — edits the renderer/layout/glyph code and its tests under claude/** + test/**.
  • spec-implementer — implements one named OpenSpec change end-to-end.
  • spec-author — authors a new OpenSpec change (proposal/design/deltas/tasks).
  • Explore — read-only multi-file/-directory search; returns conclusions.

Hard rules (not suggestions)

  1. Never run the gates on the main thread. make test / uv run pytest / make demo/img go to verifier. It returns a one-screen verdict and never dumps raw output into your context.
  2. A failing gate is a delegation trigger, not a debug trigger. When verifier reports a failure, do not start reading source, forming hypotheses, or editing inline. Take its diagnosis, hand the fix to yas-editor (or spec-implementer), then send it back to verifier to re-check. Loop editor ↔ verifier until green — that whole loop stays off the main thread.
  3. Multi-file discovery goes to Explore, not inline Grep/Read sweeps. Inline Read is only for a single known file you are about to discuss or quote. If you're about to grep across the tree "to understand X", delegate it.
  4. After a subagent returns, the default is to delegate the NEXT unit of work too — not to absorb it because "I'm already here." Before doing any code or debugging yourself, stop and ask: is this a fresh unit of work that should be a subagent? If yes (almost always, for editing or debugging), delegate.
  5. Parallelise independent work. When two units don't depend on each other, spawn both subagents in a single message so they run concurrently.

What the main thread does do directly

  • Decide what to do and which agent to route it to.
  • Hold the plan and the running summary of verdicts.
  • Talk to the user, ask clarifying questions, make judgement calls.
  • Trivial one-line edits where spinning up an agent costs more than it saves — but a failing test is never trivial: that's rule 2.

Gates (for reference — run them via verifier, not here)

  • Tests: make test → uv run pytest -q. Subset first, full once before green.
  • Lint: uv run ruff check.
  • Visual gate (renderer/layout/glyph changes): make demo/img then .claude/skills/yas-demo-text/scripts/demo-text.sh, diff the demo/text/*.txt.

For renderer/layout/glyph work, the relevant invariants live in the tmck-code-statusline skill — the usual failure class is column-width math around invisible PUA glyphs, caught by the demo gate rather than pytest.

Delegation nudge (table-driven)

The "run gates via verifier, edit the renderer via yas-editor" routing is enforced by a global PreToolUse hook (~/.claude/hooks/nudge-delegate.py) that reads .claude/delegate-routing.json in this repo. That table maps gate commands → verifier and claude/{yas,mon}/** edits → yas-editor; the project table overrides the user-level default. (This replaces the old .claude/hooks/nudge-delegate-tests.py.)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.