| name | behavior-tdd |
| description | Use this skill BEFORE changing what any agent in this plugin does — editing any skills/*/SKILL.md prompt, a references/* doc, or a behavioral contract. It drives the change strictly test-first with the isolated behavioral harness and an ablation negative-control, then commits cleanly with a single version bump. Invoke whenever you are implementing a new agent behavior or modifying an existing one in this repo, so prompt edits never ship on vibes.
|
| allowed-tools | Bash Read Write Edit Glob Grep Agent Workflow |
Behavior-change TDD (for this plugin)
This repo's agent behavior is defined by prompt text (skills/*/SKILL.md, references/*), not
code. A prompt edit can silently change outcomes while every deterministic test still passes.
This skill is the mandatory procedure for changing behavior here. The rule:
Deterministic checks for scaffolding. LLM-as-judge for outcomes. An ablation proves the
prompt is what caused the change — not the model's defaults.
Read CLAUDE.md and CONTRIBUTING.md first; this skill operationalizes them.
When to use
- Editing any
skills/<phase>/SKILL.md, a references/*.md, or a shared script the skills call.
- Adding or changing a behavioral invariant (a new commit rule, a renamed status, a reshaped
artifact, a new "the agent must/never…").
Do NOT use for pure scaffolding (hook/script logic with exact-text assertions) — that's the
unit layer only. And never edit speculatively: start from a concrete signal (a failing test, a
user complaint, an observed bad run). No signal → no edit.
The loop (RED → edit → GREEN → regression → commit)
1. Establish the behavioral RED — and prove the test bites
2. Make the prompt edit
One concern at a time. Match the surrounding wording, density, and idiom.
3. GREEN — multi-sample, don't trust one run
4. Regression — sentinels hold, nothing newly contaminated
5. Commit discipline + single version bump
Isolation guarantees (why the harness is trustworthy)
run-behavioral.sh runs every claude call from a throwaway temp cwd with --tools "" and
--no-session-persistence (iso_claude). Project memory and CLAUDE.md are cwd-keyed, so they
do not leak into the agent-under-test — the only instruction context is the scenario + the
SKILL.md you pass. Do not "fix" a failing eval by adding the answer to memory or CLAUDE.md; that's
contamination, and the ablation/isolation is designed to expose it.
Large or multi-file changes: orchestrate with a Workflow
For a change that spans a SKILL + its criteria + references + a version bump, drive it with a
background Workflow that gates each commit on the unit + pass^k + regression checks above.
A worked, reusable template is committed next to this skill:
./example.workflow.mjs — adapt its edit spec, scenario list, and commit messages. Launch with
Workflow({ scriptPath: ".claude/skills/behavior-tdd/example.workflow.mjs" }) after editing.
Checklist before you call it done