home / skills / yellinzero / aico / aico-frontend-plan

aico-frontend-plan skill

/.codex/skills/aico-frontend-plan

This skill generates atomically detailed frontend implementation steps with exact files, actions, and verification for a given task.

npx playbooks add skill yellinzero/aico --skill aico-frontend-plan

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.5 KB
---
name: aico-frontend-plan
description: |
  Create ATOMIC implementation plan for a single frontend task. Each step has 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 /frontend.plan command
  - User explicitly asks for "atomic steps", "step-by-step plan with verification"
  - Have a specific task from docs/reference/frontend/tasks/ and need implementation steps
  - Need granular steps: Setup (create files) → Implementation (write code) → Test (verify) → Commit

  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 task details from `docs/reference/frontend/tasks/{story}.md`
2. **Read design**: Load related design from `docs/reference/frontend/designs/`
3. **Read constraints**: Load `docs/reference/frontend/constraints.md`
4. **Break into atomic steps**:
   - Start with file creation/setup
   - One section/feature per step
   - Include verification for each step
   - End with commit
5. **Keep steps atomic**: One action per step
6. **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]
> Design: docs/reference/frontend/designs/[name].md
> Estimated steps: N

## Step 1: [Action]

**Files**:

- Create: `src/components/[Name].tsx`
- Modify: `src/pages/[Page].tsx:L10-L20`

**Action**:
[Exact code or action to take]

**Verify**:

```bash
[verification command]
```
````

Expected: [expected output]

---

## Step N: Commit

```bash
git add [files]
git commit -m "feat: [description]"
```

````

## Step Granularity

Each step = ONE atomic action:

| Good Steps | Bad Steps |
|------------|-----------|
| Create component file with imports | Create component with all logic |
| Add component skeleton (empty return) | Implement entire component |
| Implement single section | Implement all sections |
| Write one test case | Write all tests |

## Step Types

### Setup Step
```markdown
**Files**: Create: `src/components/ProfileCard.tsx`
**Action**: Create file with basic structure
**Verify**: `npx tsc --noEmit` → No errors
````

### Implementation Step

```markdown
**Files**: Modify: `src/components/ProfileCard.tsx:L8-L10`
**Action**: Implement header section with Avatar and name
**Verify**: `npm run dev` → Component renders correctly
```

### Test Step

```markdown
**Files**: Create: `src/components/__tests__/ProfileCard.test.tsx`
**Action**: Write unit test for profile name rendering
**Verify**: `npm test ProfileCard` → 1 test passed
```

## Key Rules

- ALWAYS include verification command for each step
- MUST keep steps to 2-5 minutes of work
- ALWAYS end with a commit step
- NEVER combine multiple actions into one step

## Common Mistakes

- ❌ Steps too large → ✅ One action per step
- ❌ Skip verification → ✅ Every step has verify command
- ❌ Vague actions → ✅ Include exact code
- ❌ No commit step → ✅ Always end with git commit

Overview

This skill generates an ATOMIC, micro-level implementation plan for a single frontend task. Each step is a single actionable change with exact code or file content and a concrete verification command. The plan ends with a commit step and is intended to be presented to the user, not saved to the repo.

How this skill works

The skill reads the specified task, design, and constraints, then breaks the work into tiny steps: setup, single-file edits, focused implementation chunks, tests, and verification. Each step lists affected files, the exact action or code snippet required, and a shell command to verify the change. Steps are sized for 2–5 minutes of work and never combine multiple actions.

When to use it

  • When running /frontend.plan for a specific frontend task from docs/reference/frontend/tasks/
  • When you need step-by-step atomic instructions with verification commands
  • When you require micro-level actions: create file → implement one small part → verify
  • When preparing a precise developer handoff for a single UI task
  • When writing incremental tests and commits for a focused frontend change

Best practices

  • Keep each step to one action that can be completed in 2–5 minutes
  • Always include an exact verification command for the step (build, test, or runtime check)
  • Provide exact file paths and line ranges when modifying files
  • Write minimal code snippets per step; avoid implementing multiple features in one step
  • Finish the plan with a single commit step that stages only the changed files

Example use cases

  • Add a small ProfileCard component: create file, add skeleton, implement header, add test, commit
  • Implement a single input field validation: add helper, wire into component, add unit test, verify
  • Fix visual spacing in a single page section: update CSS module, verify in dev server, commit
  • Add one new unit test targeting a single function or component method and verify passing

FAQ

Can this skill produce architecture-level plans?

No. This skill only creates micro-level atomic implementation steps. Use a different mode for architecture or feature scoping.

Must every step include a verification command?

Yes. Every step must include a concrete verification command such as npx tsc --noEmit, npm run dev with a check, or a test runner command.

How should I format code in a step?

Include exact code snippets or full file contents when creating files, and precise line ranges when modifying existing files.