agentleFS
HighwayofLifeHighwayofLife/agent-kaizen/skills/test-loop/SKILL.md

test-loop

Skill1 starsChanged 32 days agoMITView on GitHub

Design a tiered, fast test loop for a game or engine project: fast logic tests first, targeted engine tests, scheduled full suites, engine slots.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Not in Claude Code?: Read docs/hosts.md in the plugin root first.

    line 11
  2. Distinctive:

    Changes: test scripts and project structure proposals, after you approve.

    line 15
  3. Distinctive:

    If the engine's test runner offers "run only affected tests", plan a short spike to prove it works on this repo before relying on it.

    line 42
  4. Distinctive:

    Wait for my OK, then implement one tier at a time with tests for the scripts.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
SKILL.md

A fast, tiered test loop (game projects)

Plugin root: ${CLAUDE_PLUGIN_ROOT}. If that is still a ${...} placeholder, use the folder that contains skills/ (this file is skills/<name>/SKILL.md), and substitute that path, in quotes, wherever this skill uses CLAUDE_PLUGIN_ROOT. Not in Claude Code? Read docs/hosts.md in the plugin root first. Skip steps that only work in Claude Code, and follow its propose-only rule before changing any host configuration.

Agents get feedback in seconds, not minutes, without losing safety. Run the cheapest checks first and the expensive engine runs only when they add something.

Changes: test scripts and project structure proposals, after you approve.

Autonomy: follow ${CLAUDE_PLUGIN_ROOT}/docs/autonomy.md. The mode comes from the skill argument (propose, safe, auto or yolo), else docs/kaizen/config.json, else agent-kaizen.json in your Claude config dir ($CLAUDE_CONFIG_DIR or ~/.claude), else propose. In safe and auto, read every "wait for my OK" below as: apply it yourself if the mode allows (backup, verify, roll back on failure, ledger row), otherwise list it as a proposal. Hard stops always ask. At most maxChangesPerRun changes (default 3). End with a summary of what was applied, skipped and rolled back.

Task

Analyse how tests and checks run in this project and how long each stage takes. Use logs, CI output or timed runs, not guesses. Write the baseline to docs/kaizen/test-timing-<date>.md.

Then propose a tiered system, with an estimate of the time saved per item:

  1. Logic outside the engine: where game logic can live in a plain library (no engine types), test it with a normal unit-test runner that finishes in seconds, without the editor. Agents run it on every change.
  2. One check command per change: run the fast tests first and stop before launching the engine if they fail. Then run only targeted engine tests (the change's own tests plus a few named regression guards). A missing, empty or timed-out test report counts as a FAILURE, never as a pass.
  3. Full suite on a schedule: the whole engine suite, a player build and a smoke test every 3–4 merges and at milestones, not per change. Split it into shards if one run takes too long.
  4. Engine concurrency: a lock-based slot script (mkdir locks, holder PID, reclaiming slots held by dead processes) that limits engine instances machine-wide, for example to 2, so parallel agents queue instead of thrashing.
  5. Fast worktrees: one git worktree per parallel task, created by a script that copies large generated caches (imports, build output, dependency folders) with copy-on-write (APFS clonefile on macOS, reflink on Linux), so a new worktree doesn't rebuild them.
  6. If the engine's test runner offers "run only affected tests", plan a short spike to prove it works on this repo before relying on it. Ours never selected anything, and we fell back to the tiers above.

A slow-test report command can be named in projectCommands.<project>.slowTests in the global config; its output appears in the project report.

Wait for my OK, then implement one tier at a time with tests for the scripts. Add a ledger row per tier.

Done when

most changes check in under a minute or two, the full suite runs on a fixed schedule, and no change can pass on an empty report.

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.