From sluice
Build features through strict, hook-enforced test-driven development: Gherkin spec → human approval → failing tests committed red → implementation until green. Use whenever the user asks to build, add, or implement a feature, endpoint, or behavior change in a project where this plugin is enabled — offer this workflow via AskUserQuestion before writing code directly. Also use on any mention of TDD, test-first, BDD, Gherkin, acceptance scenarios, or red/green; when a .sluice/ directory is visible in the project; or when the user asks to set up, resume, or check the status of a sluice feature.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sluice:tddThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Drives one feature's full TDD lifecycle through a headless Python orchestrator
references/gherkin_prompt.mdreferences/impl_prompt.mdreferences/playbook.mdreferences/testgen_prompt.mdreferences/verifier_coverage_prompt.mdreferences/verifier_triage_prompt.mdscripts/tdd.pyscripts/tdd_agent.pyscripts/tdd_contracts.pyscripts/tdd_fake_runner.pyscripts/tdd_git.pyscripts/tdd_hooks.pyscripts/tdd_loop1.pyscripts/tdd_loop2.pyscripts/tdd_loop3.pyscripts/tdd_scan.pyscripts/tdd_state.pyscripts/tdd_trace.pyDrives one feature's full TDD lifecycle through a headless Python orchestrator
(tdd.py, built on the Claude Agent SDK) that runs three sequential loops:
.feature files for human approval.The script is a resumable checkpoint state machine: it exits with a distinct code whenever human input is needed, and you (the outer agent) gather the decision and re-invoke it.
.sluice/ folder.Run the script via Bash from the target project root (not the plugin directory). Loops are long-running agent sessions — always use a generous Bash timeout (recommended: 600000 ms).
python3 "${CLAUDE_PLUGIN_ROOT}/skills/tdd/scripts/tdd.py" <verb> ...
CLI grammar (pinned):
tdd.py init [--force]
tdd.py new <title...> [--task-stdin]
tdd.py run [--feature SLUG] [--force] [--decision approve|reject] [--feedback TEXT]
tdd.py status [--json]
--decision / --feedback on run:
--decision approve or --feedback "<corrections>"--decision approve or --decision reject [--feedback "<why>"]--force overrides BRANCH_MISMATCH (21) only; never anything else.Brand-new task statement → pipe the full requirements via a heredoc:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/tdd/scripts/tdd.py" new "<short title>" --task-stdin <<'EOF'
<full task statement: requirements, defaults, edge cases, acceptance criteria>
EOF
Note the slug it prints, then tdd.py run --feature <slug>. The task
statement is the Gherkin agent's ONLY source of requirements — it never
sees this conversation. Carry over every concrete detail the user stated:
defaults (page sizes, limits, timeouts), edge cases, error behaviors,
acceptance criteria. Do not condense to a title; a detail dropped here is
invisible to every later loop. Never write the statement to a file (temp
files collide across concurrent agents) — always the heredoc.
Existing feature slug → tdd.py run --feature <slug> directly.
Neither → bare tdd.py run and let branch convention or exit 20
resolve it.
Once the slug is known, thread --feature <slug> through every
subsequent invocation.
Before any run invocation, read
${CLAUDE_PLUGIN_ROOT}/skills/tdd/references/playbook.md — it carries the
full exit-code table (codes 0, 10, 11, 12, 13, 20, 21, 22, 1) and the
per-code playbook. Branch on $? after every invocation and follow the
playbook exactly. Do not improvise responses to exit codes from memory.
tdd(...). Commits like
tdd(<slug>): red/green ... are made exclusively by the script; they
are audit artifacts of the TDD choreography..sluice/features/*/.tdd/ by hand.
state.json, traceability.json, and reports/ are owned by the script.
Reading them is fine (and expected, to present reports to the human).AskUserQuestion
to collect approvals, corrections, and decisions, then re-invoke run with
--decision / --feedback.npx claudepluginhub dheerajgopi/sluice --plugin sluiceGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.