con un clic
tdd-plan
Plan and implement features with TDD.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Plan and implement features with TDD.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Browser automation via agent-browser. Use when the user wants to browse, interact with, or inspect web pages.
Review agent-facing knowledge (rules, AGENTS.md, CONVENTIONS.md, README.md, domain docs) for staleness and accuracy. Use when the user asks to audit, clean, or prune knowledge. Also use when they're confused by a rule/doc that seems wrong — treat that as the starting point for a broader audit.
Reflect on session, update rules, commit with jj.
Adversarial design interview.
Ingest sources into the wiki.
Wiki health checks.
| name | tdd-plan |
| description | Plan and implement features with TDD. |
Plan a feature using strict TDD discipline, then execute step-by-step. Each step follows Red-Green-Refactor: establish a failing condition, make it pass with minimal code, then refactor. Structural steps (schema, config, scaffolding) skip RED and go straight to implementation + validation.
Uses jj for version control. Each step creates a new revision with jj new, commits with jj commit, and at plan end all revisions are squashed into one feature commit.
Determine the mode from user input:
tdd-plan list and asktdd-plan create <slug> --title <title> --steps <text> [--steps-file <path>] [--context <text>] [--architecture <text>] [--notes <json>]
tdd-plan edit <slug> [--title <title>] [--steps <text>] [--steps-file <path>] [--context <text>] [--architecture <text>]
tdd-plan design <slug> [--show] [--current-state <text>] [--desired-state <text>] [--patterns <text>] [--decisions <text>] [--questions <text>]
tdd-plan list
tdd-plan show [slug]
tdd-plan phase <slug> <step> <red|green|refactor> <start|done|skip>
tdd-plan complete <slug> <step>
tdd-plan note <slug> <text>
tdd-plan archive <slug>
Plans stored in .pi/plans/<slug>.json.
package.json, pyproject.toml, Makefile, or askexplore tool with query from user's descriptiontdd-plan create <slug> --title <title> --steps '[{"name":"Placeholder","red":"tbd","green":"tbd","refactor":""}]' --context <context> --architecture <architecture>
tdd-plan design <slug> \
--current-state "..." \
--desired-state "..." \
--patterns "..." \
--decisions "..." \
--questions "..."
Present to user for review. If corrections needed, update with tdd-plan design and re-present.tdd-plan edit <slug> --steps "...", ask for confirmationSTEP 1: Token generation
RED: Write test that generates a JWT with correct claims
GREEN: Implement token generation with jsonwebtoken library
REFACTOR:
---
STEP 2: Add phone_number column
RED: none
GREEN: Add migration to add phone_number column, run schema generation to validate
REFACTOR:
RED: none = structural step (no failing condition, just implement + validate)REFACTOR: can be empty--- separator is optionaltdd-plan show <slug>, or tdd-plan list if no slugpackage.json, pyproject.toml, Makefile, or askexplore tool with query from plan context/architecturetdd-set-kickoff({ slug: "<slug>" }). Call exactly once per plan.At step start:
jj new
RED: none)tdd-plan phase <slug> <step> red skip
# Implement structural change
# Run validation command specified in GREEN
tdd-plan phase <slug> <step> green done
jj fix
jj commit -m "<conventional commit>"
tdd-plan phase <slug> <step> red start
# Write test / introduce failing condition
# Confirm it fails with expected error
tdd-plan phase <slug> <step> red done
If validation passes or fails unexpectedly — stop, report.
tdd-plan phase <slug> <step> green start
# Write simplest code to pass
# Confirm it passes
tdd-plan phase <slug> <step> green done
jj fix
jj commit -m "<conventional commit>"
tdd-plan phase <slug> <step> refactor start
# Apply refactoring, run full validation
tdd-plan phase <slug> <step> refactor done
If refactoring was significant, amend: jj describe -m "<updated message>"
After committing:
tdd-plan complete <slug> <step>
Show: summary, validation output, revision ID. Then stop and ask what's next.
Squash all step revisions into one feature commit:
jj log # review stack
jj squash --from <first-step-rev>..<last-step-rev>
jj describe -m "feat(<scope>): <feature description>"
Archive if done: tdd-plan archive <slug>
RED: nonejj fix before committdd-set-kickoff once, use /kickoff to returnjj new at step startjj undo, report, ask