home / skills / yellinzero / aico / aico-backend-plan
This skill generates atomic, step-by-step backend task plans with TDD tests, exact code, and verification commands.
npx playbooks add skill yellinzero/aico --skill aico-backend-planReview the files below or copy the command above to add this skill to your agents.
---
name: aico-backend-plan
description: |
Create ATOMIC implementation plan for a single backend task. Each step has TDD, exact code, and verification command.
IMPORTANT: This skill creates MICRO-LEVEL atomic steps, NOT macro architecture plans.
For architecture planning or feature scoping, use EnterPlanMode instead.
Use this skill when:
- Running /backend.plan command
- User explicitly asks for "atomic steps", "step-by-step plan with verification"
- Have a specific task from docs/reference/backend/tasks/ and need implementation steps
- Need granular TDD steps: Types → DB → Test (failing) → Implementation → Test (passing) → API
DO NOT use for:
- Architecture planning (use EnterPlanMode)
- General development planning
- Feature scoping or estimation
Output: Present plan to user (not saved to file), each step includes Files, Action, and Verify command.
---
# Plan
## Language Configuration
Before generating any content, check `aico.json` in project root for `language` field to determine the output language. If not set, default to English.
## Process
1. **Read task**: Get details from `docs/reference/backend/tasks/{story}.md`
2. **Read constraints**: Load `docs/reference/backend/constraints.md`
3. **Break into atomic steps** following this order:
- Types/interfaces first
- Database migrations
- Failing tests (TDD)
- Implementation to pass tests
- API routes
- Verification
4. **Keep steps atomic**: One action per step
5. **Present plan to user** (do not save to file)
## Plan Format
````markdown
# [Task Name] - Implementation Plan
> Project: [project-name]
> Created: YYYY-MM-DD
> Task: [task description]
> Estimated steps: N
## Step 1: [Action]
**Files**:
- Create: `src/types/user.ts`
**Action**:
[Exact code]
**Verify**:
```bash
npx tsc --noEmit
```
````
Expected: No errors
```
## Step Order
| Order | Step Type | Purpose |
|-------|-----------|---------|
| 1 | Types | Define interfaces and DTOs |
| 2 | Database | Create migrations |
| 3 | Test (RED) | Write failing test |
| 4 | Implement (GREEN) | Write code to pass test |
| 5 | API | Add routes |
| 6 | Commit | Stage and commit |
## Step Granularity
| Good Steps | Bad Steps |
|------------|-----------|
| Create type file with interface | Create entire model with methods |
| Write one failing test | Write all tests |
| Implement single method | Implement entire service |
| Add one route | Add all routes |
## Key Rules
- ALWAYS write failing test before implementation (TDD)
- MUST include verification command for each step
- ALWAYS follow order: Types → DB → Test → Impl → API
- NEVER combine multiple actions into one step
## Common Mistakes
- ❌ Steps too large → ✅ One action per step
- ❌ Skip verification → ✅ Every step has verify command
- ❌ Implementation before test → ✅ TDD: test first
- ❌ Vague actions → ✅ Include exact code
```
This skill generates an ATOMIC, micro-level implementation plan for a single backend task in a TypeScript project. Each step is a single action that includes exact code, the files affected, and a verification command. The plan strictly follows TDD: Types → DB → Test (failing) → Implementation (passing) → API → Verification.
The skill reads the task specification from docs/reference/backend/tasks/{story}.md and constraints from docs/reference/backend/constraints.md, then breaks the task into atomic steps. It emits a numbered plan where each step lists Files, exact code to add or change (one small change only), and a shell command to verify the step. Steps are ordered to ensure tests fail first, then pass, and each step has a single verification command.
Can this skill produce multi-file large refactors?
No. It intentionally produces micro-level steps. For large refactors, run repeated tasks or use architecture planning tools.
What verification commands are expected per step?
A single, deterministic shell command that demonstrates the step succeeded, such as npx tsc --noEmit, npm test -- -t 'test name', or a migration CLI command.