home / skills / peterfile / devpilot-agents / kiro-specs

kiro-specs skill

/skills/kiro-specs

This skill helps you generate a complete Kiro spec pack (.kiro/specs) including requirements with EARS, design, and executable tasks.

npx playbooks add skill peterfile/devpilot-agents --skill kiro-specs

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

Files (7)
SKILL.md
3.8 KB
---
name: kiro-specs
description: Create a Kiro spec for a feature in .kiro/specs create/update feature spec/PRD/RFC—requirements, design doc, and implementation tasks checklist.Trigger on spec/specification/PRD/RFC/tech spec, requirements/user story/acceptance criteria/EARS, design doc/architecture, task breakdown/implementation plan/checklist; 需求/验收/设计/任务.
---

# Kiro: Spec-Driven Development Workflow

Transform ideas into comprehensive specifications, design documents, and actionable implementation plans.

## When to use

Use this skill when you want a Kiro-style spec pack under `.kiro/specs/`:

1. requirements with EARS acceptance criteria,
2. a design doc with architecture + correctness properties,
3. an executable tasks checklist.

## Workflow

1. **Requirements** → Define what to build (EARS format) → [Details](references/phase-1-requirements.md)
2. **Design** → How to build it (architecture + correctness properties) → [Details](references/phase-2-design.md)
3. **Tasks** → Actionable implementation steps → [Details](references/phase-3-tasks.md)
4. **Execute** → Implement one task at a time → [Details](references/phase-4-execute.md)

**Storage**: `.kiro/specs/{feature-name}/` (kebab-case)

---

## Core Rules

- **Sequential phases** — Never skip phases
- **Explicit approval** — Get user approval after each document
- **One task at a time** — During execution, focus on single task
- **Correctness mandatory** — Every design MUST include properties from EARS

## Quick Reference

### EARS Acceptance Criteria Format

```
WHEN [event] THEN THE [system] SHALL [response]
IF [condition] THEN THE [system] SHALL [response]
WHILE [state] THE [system] SHALL [response]
```

### Correctness Property Format

```markdown
### Property N: [Name]

_For any_ [inputs], [precondition], [system] SHALL [behavior].

**Validates: Requirement X.Y**
```

### Phase Outputs

| Phase        | Output File       | Key Content                            |
| ------------ | ----------------- | -------------------------------------- |
| Requirements | `requirements.md` | User stories + EARS ACs                |
| Design       | `design.md`       | Architecture + Interfaces + Properties |
| Tasks        | `tasks.md`        | Checkbox task list                     |

## Workflow Diagram

```mermaid
stateDiagram-v2
  [*] --> Requirements

  Requirements --> ReviewReq : Complete
  ReviewReq --> Requirements : Changes
  ReviewReq --> Design : Approved

  Design --> ReviewDesign : Complete
  ReviewDesign --> Design : Changes
  ReviewDesign --> Tasks : Approved

  Tasks --> ReviewTasks : Complete
  ReviewTasks --> Tasks : Changes
  ReviewTasks --> [*] : Approved

  Execute : Execute Single Task
  [*] --> Execute : Task Request
  Execute --> [*] : Complete
```

## Detection Logic

Determine current state by checking:

```bash
# Check for .kiro directory
if [ -d ".kiro/specs" ]; then
  # List features
  ls .kiro/specs/

  # For specific feature, check phase
  FEATURE="$1"
  if [ -f ".kiro/specs/$FEATURE/requirements.md" ]; then
    echo "Requirements exists"
  fi
  if [ -f ".kiro/specs/$FEATURE/design.md" ]; then
    echo "Design exists"
  fi
  if [ -f ".kiro/specs/$FEATURE/tasks.md" ]; then
    echo "Tasks exists - ready for execution"
  fi
fi
```

## Summary

Kiro provides a structured, iterative approach to feature development:

- Start with **requirements** (what to build)
- Progress to **design** (how to build it)
- Create **tasks** (implementation steps)
- **Execute** tasks one at a time

Each phase requires explicit user approval before proceeding, ensuring alignment and quality throughout the development process.

## Supporting Files

- [Kiro Identity](references/kiro-identity.md) — Response style
- [Workflow Diagrams](references/workflow-diagrams.md) — Visual references

Overview

This skill generates a complete Kiro-style spec pack for a feature and stores it under .kiro/specs/{feature-name}/. It produces requirements with EARS acceptance criteria, a design document with correctness properties, and an executable implementation tasks checklist. The workflow enforces sequential phases, explicit approval after each artifact, and single-task execution.

How this skill works

The skill inspects the repository for a .kiro/specs/ directory and existing feature folders to determine the current phase. It can create or update three phase files: requirements.md (EARS-formatted user stories and acceptance criteria), design.md (architecture, interfaces, and correctness properties), and tasks.md (a checked-off implementation plan). After generating each artifact it requests user approval before proceeding to the next phase.

When to use it

  • When you need a formal spec/PRD/RFC for a new feature in .kiro/specs/
  • When converting high-level requests into EARS acceptance criteria
  • When you need an architecture/design doc that links to requirements
  • When you want an executable task checklist for implementation
  • When enforcing a sequential, review-driven development flow

Best practices

  • Create requirements first and do not skip to design or tasks
  • Write acceptance criteria in EARS format (WHEN/IF/WHILE patterns)
  • Include correctness properties in the design that reference specific requirements
  • Keep tasks small and focused so execution proceeds one task at a time
  • Require explicit approval after each phase before advancing

Example use cases

  • Add a new payment method: produce requirements.md, design.md, and tasks.md in .kiro/specs/new-payment-method/
  • Refine a vague feature request into clear user stories with EARS acceptance criteria
  • Document architecture and correctness properties for a critical subsystem before implementation
  • Break a large feature into an ordered checklist of implementation tasks for sprint planning
  • Detect current phase of an existing feature by checking for requirements.md / design.md / tasks.md

FAQ

How are acceptance criteria formatted?

Use EARS patterns: WHEN [event] THEN THE [system] SHALL [response], IF [condition] THEN THE [system] SHALL [response], WHILE [state] THE [system] SHALL [response].

Where are specs stored?

Each feature gets a folder under .kiro/specs/{feature-name}/ in kebab-case containing requirements.md, design.md, and tasks.md.