원클릭으로
tddab-planner
TDDAB plan format and rules — test-first, atomic blocks, RED/GREEN/VERIFY, bottom-up decomposition.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
TDDAB plan format and rules — test-first, atomic blocks, RED/GREEN/VERIFY, bottom-up decomposition.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Parse and execute a TDDAB plan via CVM planexecutor. Autonomous block-by-block execution with RED/GREEN/VERIFY/COMMIT phases. Supports resume after interruption.
Decompose the task instruction into an exhaustive list of atomic, independently-testable requirements BEFORE planning. Surfaces buried/secondary clauses that all-or-nothing graders punish.
Review plan for TDDAB/Step conformity. Checks methodology compliance, dependency ordering, and validates with CVM parsePlan.
Protocol D — systematic debugging methodology (RIDHV). Evidence-based, one change at a time.
Validate a TDDAB plan file using CVM parsePlan. Shows block count, IDs, validation errors.
Step plan format for removal, migration, and cleanup work (non-TDD). Uses actions tag instead of red.
| name | tddab-planner |
| description | TDDAB plan format and rules — test-first, atomic blocks, RED/GREEN/VERIFY, bottom-up decomposition. |
Test Driven Development Atomic Block - Each block is:
1. RED Phase → Write tests that FAIL
2. GREEN Phase → Write code to make tests PASS
3. VERIFY Phase → Confirm atomic deployment works
Plans use lightweight XML tags for machine-parseable structure. Keep markdown readable — tags mark boundaries, not replace content.
| Tag | Where | Purpose |
|---|---|---|
<mission> | Once, top of plan | Full project context — enough that any block can execute on clean context |
<block id="NN-name"> | Wraps each TDDAB | Block boundary with unique id |
<intro> | Inside block | Context: what, why, dependencies, files |
<red> | Inside block | Test definitions (bullet list) |
<success> | Inside block | Checklist of verifiable outcomes that must ALL pass |
# TDDAB Plan: [Feature Name]
**Date:** YYYY-MM-DD
<mission>
[Full project context — architecture, tech stack, patterns, conventions,
file structure, testing approach, build commands. Must contain enough
information that ANY block can be executed on a completely clean context
without prior knowledge. Think of it as the briefing document for a
developer who just walked into the project.
Clean policy (MANDATORY — state it here, scoped to the project's REAL tools):
list the project's ACTUAL checks (whichever of build / typecheck / lint / test
exist, with exact commands) and require them at 0 errors / 0 warnings; warnings
are failures. Do NOT invent absent tooling. No "pre-existing" exemption, no
suppress / skip / disable workarounds — fix the root cause.]
</mission>
<block id="01-short-name">
## TDDAB-1: [Block Title]
<intro>
[What this block does. Dependencies on previous blocks.
Files to create/modify. Key decisions already made.]
</intro>
<red>
- test: [first test that must fail then pass]
- test: [second test]
- test: [third test]
</red>
### Implementation
[Code in the target language showing types, signatures, key logic, test assertions.
Must be detailed enough that j-develop can produce compilable code from it.
Does NOT need perfect imports or boilerplate — j-develop handles that.
No TODOs, no unresolved decisions.]
<success>
- [ ] [first verifiable outcome that must pass]
- [ ] [second verifiable outcome that must pass]
- [ ] [third verifiable outcome that must pass]
</success>
</block>
<block id="02-next-thing">
## TDDAB-2: [Next Block]
...same structure...
</block>
<mission> — EXACTLY once, before first block, must be comprehensive enough for clean-context execution<block id=""> — id format: NN-kebab-case, must be unique across ALL files<intro> — MUST be self-sufficient (executable with zero prior context)<red> — each line starts with - test:, describes ONE testable behavior. Must cover ALL cases: happy path, edge cases, error conditions, boundaries. No arbitrary limits on count. If requirements.md exists, annotate each test with the requirement id(s) it covers, e.g. - test: response omits field F when the input is empty (R7).<success> — checklist of verifiable outcomes (- [ ] format), ALL must pass<files> — ONLY in index.md, signals multi-file mode (see Multi-File Plans below)<block>)requirements.md exists)If requirements.md is present (produced by /j-analyze-requirements), it is the authoritative
list of what the task demands. The plan MUST cover it completely:
requirements.md before writing any block.R1..Rn must be covered by at least one <red> test in some block. Annotate
each test with the id(s) it covers (see Tag Rule 4).R7 → block 04 (test: empty-input response). Any R with no covering test is an incomplete plan — add the block/test.accept: criterion as a CONCRETE value/state
assertion — assert the exact observable (value, attribute, count, type, string, state), not mere
presence or truthiness. A test that would still pass without the precise required behavior is too
weak: it lets execution go GREEN while a stricter hidden grader test fails. Write the assertion at
the tightest exact form the accept: line states.<red> test MUST exercise the
repetition: trigger the action TWICE (and where controls are added/removed, do add→remove→re-add),
then assert the effect applied EXACTLY ONCE — exact final value/state, no doubled output, no
duplicate element/listener (assert the deduplicated COUNT or the exact single-applied result). A test
that triggers the action only once goes GREEN even when the handler is bound twice — the classic loss
(text becomes alphaA instead of alpha, a node appears twice, a listener fires N times).// WRONG - This is discussion, not a plan
"Option A: Use library X"
"Option B: Build custom solution"
// WRONG - This is not executable
"Investigate if we need..."
"Consider whether..."
Each TDDAB must be understandable with ZERO context:
<mission> must contain enough project context that ANY block works on clean contextWhy: Plans are executed in fresh context where only one block is visible at a time. The <mission> is the only briefing — it must cover architecture, stack, patterns, commands. The AI agent compiles and verifies during j-develop, not during planning.
Merge non-testable setup into first TDDAB implementation:
NEVER create separate "setup" or "preparation" blocks
Each TDDAB must be:
git revert HEADThe <red> tests define the interface contract for the block — they specify WHAT the unit must do, not how the full feature works end-to-end.
CORRECT: RED tests for a Service block
- test: CreateOrder with valid items → returns Order with status Created
- test: CreateOrder with empty items → throws ArgumentException
- test: CreateOrder calls repository.Save exactly once
WRONG: RED tests that are API/E2E tests for the whole endpoint
- test: POST /api/orders returns 201
- test: POST /api/orders with bad data returns 400
(These test the WHOLE stack, not ONE block)
Features MUST be decomposed into blocks bottom-up by layer, not as one monolithic block per endpoint/feature.
CORRECT decomposition for "Add Order endpoint":
Block 01: Order model + validation (unit tests)
Block 02: OrderService business logic (unit tests, mock repository)
Block 03: OrderRepository persistence (integration tests)
Block 04: OrderController endpoint (tests with mocked service)
WRONG — one block for entire endpoint:
Block 01: Complete Order endpoint (6 API tests)
(This is NOT atomic, NOT testable in isolation, NOT rollback-safe)
Why bottom-up?
Decomposition strategy:
CORRECT:
1. Write failing test (RED)
2. Write implementation (GREEN)
3. Verify tests pass (VERIFY)
4. Commit and push (COMMIT)
WRONG:
1. Write implementation
2. Write tests afterward
When the task names a data field, response field, header, or any serialized value, the <red> tests AND <success> criteria MUST pin its EXACT type, unit, and wire format — never leave it to inference.
*_ms, *_count, *_id, *_bytes, *_seconds) implies an exact type. State it explicitly: "reloader_timings_ms: integer milliseconds, no fractional/float".0.001 into an int64 field, it fails. If a field is integer ms, emit 1, never 0.001.reloader_timings_ms is an integer", "the Allow header equals GET, HEAD, POST, ... exactly", "method/field order is X, Y, Z" — not merely that the field exists.Why (benchmark-critical): the hidden grading tests assert exact shapes and types. A plan that leaves a field's type/unit ambiguous lets GREEN pass on your OWN tests while the grader's stricter test fails. The block's <red> is your only defense — encode the exact contract there.
Code we hand back must be clean — but ONLY against the tooling the project actually uses. Never invent tools it does not have.
deno check, go vet, npm run lint, pytest). If the project has no linter, there is NO lint requirement — do not add one. Forcing absent tooling does more harm than good.<mission> states WHICH commands apply; each block's <success> lists them as exit criteria.@ts-ignore / eslint-disable / #[allow(...)] / # type: ignore / @SuppressWarnings, no commenting-out or skipping a failing test, no loosening the project's config. Fix the cause. Suppressing a warning is a FAILED block.This is a planning/agent discipline encoded in the mission + success criteria — NOT a separate machine-enforced gate. State in the mission the EXACT clean commands the project has, e.g.: "Clean policy: deno check + deno test must be 0 errors / 0 warnings; no suppressions, no pre-existing exemption." Add to each block's <success>: "<project's checks> clean: 0 errors / 0 warnings".
<block id="NN-kebab-case-name">
## TDDAB-N: [Verb] [Feature] [Context]
Examples:
<block id="01-add-auth-config">
## TDDAB-1: Add Authentication Configuration
<block id="02-replace-jwt-oauth">
## TDDAB-2: Replace JWT with OAuth Provider
<block id="03-update-claims-logic">
## TDDAB-3: Update Claims Extraction Logic
id matches the block number and a short descriptive slug.
Every plan MUST end with an execution order showing dependencies:
## Execution Order
01-first-thing → no dependencies
02-second-thing → depends on 01
03-third-thing → depends on 01, 02
04-parallel-thing → depends on 01 (can run parallel with 02-03)
For each block, verify:
<block id=""><intro> with full context<red> with testable behaviors<success> with clear exit criterion<red> (integer vs float, ms, exact header strings, exact symbol source)<success> lists those checks cleanFor large plans, split into an index.md + multiple sub-files to avoid mission duplication.
# TDDAB Plan: [Feature Name]
**Date:** YYYY-MM-DD
<mission>
[Full project context — single source of truth]
</mission>
<files>
- 01-models.md
- 02-services.md
- 03-api.md
</files>
# Models Layer
<block id="01-order-entity">
## TDDAB-1: Create Order Entity
<intro>
[Context for this block]
</intro>
<red>
- test: [first test]
</red>
### Implementation
[Reference code]
<success>
- [ ] [verifiable outcome]
</success>
</block>
<mission> in index.md is authoritative. <mission> in sub-files is silently ignored.<files> tag in index.md signals multi-file mode. One filename per line, prefixed with - .<files> = execution order.<files> tag + <mission> present = single-file plan (full backward compatibility).This plan format is designed to be parsed by CVM:
<mission> → initial context prompt<block> → task array entry with id, line references<intro> + <red> → prompt for RED phase<success> → prompt for VERIFY loop exit criteria<files> → multi-file mode: CVM reads index.md for mission, then parses each sub-file for blocksWhen NOT using CVM, the same format works perfectly for manual execution — tags are lightweight and don't hurt readability.
<block> tag → STOP, add structure_ms, _id, _count) or the task states a wire format/header/order → STOP, pin the EXACT type+unit in the RED test, never inferWhen user requests TDDAB planning:
<mission>, <block>, <intro>, <red>, <success> tagsA TDDAB plan is a RECIPE, not a DISCUSSION!