Loading...
Loading...
Spec-driven development: plan → go → review loop with spec lifecycle states and a project-level feature ledger. Use for planning features, implementing from specs, refining specs, tracking what features exist across specs, and resuming work. Trigger on requests mentioning specs, requirements/design/tasks, spec-help, spec-plan, feature ledger, FEATURES.md, spec-ledger, `.kiro`. IMPORTANT: Never edit spec files without first reading this skill.
npx skill4agent add kundeng/bayeslearner-skills spec-driven-dev.kiro/specs/<NN-name>/01-auth02-api-layerspec.mdspec.mdrequirements.mdspec.mdrequirements.mdStatus: <STATE>Since:| State | Meaning | Editable? |
|---|---|---|
| DRAFT | Being planned, not yet approved | Yes |
| ACTIVE | Approved, implementation in progress | Yes (scope adjustments flow through |
| SHIPPED | All required tasks done; spec describes what was built | Frozen. Only forward-links to SUPERSEDED-BY or factual corrections |
| SUPERSEDED | Replaced by a newer spec; points forward to it | Frozen. Same rule |
| OBSOLETE | Feature removed; the spec is historical only | Frozen. Same rule |
NN-name-v2NN-different-nameSUPERSEDEDSuperseded-by:.kiro/FEATURES.mdspecs/steering/## auth## api/v2## data/ingest### email-login`ACTIVE`# Feature Ledger
Living inventory of features. Read this before any individual spec.
Each H2 is a domain (slash-nested), each H3 is a feature id with a status
tag; metadata bullets define graph edges.
**Status values:** DRAFT, PLANNED, IN-PROGRESS, BLOCKED, ACTIVE, DEPRECATED,
SUPERSEDED, OBSOLETE
Last drift sweep: [YYYY-MM-DD]
## auth
### email-login `ACTIVE`
- **spec**: 01-auth
- **since**: 2025-08-14
- **supersedes**: [password-auth]
- **depends-on**: [session-management]
- **description**: Email + password login with session cookies.
### magic-link `ACTIVE`
- **spec**: 01-auth
- **since**: 2025-10-03
- **description**: Passwordless one-time-link login via email.
### password-auth `SUPERSEDED`
- **spec**: 01-auth
- **since**: 2025-08-14
- **until**: 2026-01-20
- **superseded-by**: [email-login]
- **description**: Original password-only flow, replaced by email-login.
## api/v2
### bulk-export `IN-PROGRESS`
- **spec**: 05-bulk-export
- **target**: 2026-Q2
- **depends-on**: [session-management]
- **description**: CSV/JSON export endpoint for user data.**parent**: <id>**spec**: <spec-id>**supersedes****superseded-by****depends-on**sinceuntilSHIPPEDSUPERSEDEDOBSOLETEsinceuntil.kiro/specs/*-SPEC/.kiro/specs/SPEC/stateDiagram-v2
[*] --> Plan : spec-plan create
state Plan {
[*] --> Scaffold
Scaffold --> Scan
Scan --> GenReqs : full
Scan --> GenSpec : fast
GenReqs --> Approve_R
Approve_R --> GenReqs : revise
Approve_R --> GenDesign : ok
GenDesign --> Approve_D
Approve_D --> GenDesign : revise
Approve_D --> GenTasks : ok
GenTasks --> Approve_T
Approve_T --> GenTasks : revise
GenSpec --> Ready
Approve_T --> Ready
}
Plan --> Go : approved
state Go {
[*] --> Build
state Build {
[*] --> PickTask
PickTask --> Implement
Implement --> Test
Test --> Implement : fix up to 3x
Test --> Commit : pass
Test --> Stuck : 3x fail
Commit --> PickTask : more tasks
}
Build --> SelfReview : task done or stuck
state SelfReview {
[*] --> CheckSpec
CheckSpec --> AddTests : coverage gaps
CheckSpec --> MinorFix : add or tweak tasks
AddTests --> CheckSpec
MinorFix --> CheckSpec
CheckSpec --> OK : clean
}
SelfReview --> Build : continue
SelfReview --> Replan : drastic change
}
Replan --> Plan : human reviews new plan
Go --> [*] : all tasks done
Go --> [*] : stuck| State | Entry | Stops when |
|---|---|---|
| Plan | | User approves (full) or spec generated (fast) |
| Go | | All done, needs human feedback, or stuck |
| Review | | Findings presented |
| Files present | State | Action |
|---|---|---|
| None | Plan | |
| Go | Next unchecked task |
| Plan | Generate design.md |
| Plan | Generate tasks.md |
All 3 + | Go | Next task |
All tasks | Done | Audit or merge |
.kiro/FEATURES.mdfeat(<spec>/<task>): [description].kiro/FEATURES.md/spec-plan <name> [create|refine] [--fast].kiro/specs/NN-SPEC/WHEN [event] THEN [system] SHALL [response]IF [condition] THEN [system] SHALL [response]WHILE [state] [system] SHALL [response][system] SHALL [response]git add -A && git commit -m "spec(SPEC): create requirements, design, and tasks"spec.mdgit add -A && git commit -m "spec(SPEC): create fast-track spec"/spec-audit[x]git add -A && git commit -m "spec(SPEC): refine — [brief]"spec.mdgit add -A && git commit -m "spec(SPEC): refine fast-track — [brief]"/spec-go <name> [count].kiro/FEATURES.md[ ][!] BLOCKED: reason[x].kiro/FEATURES.mdIN-PROGRESSACTIVEgit add -A && git commit -m "feat(SPEC/[ID]): [description]".kiro/FEATURES.mdCheckpoint: SPEC — N/TOTAL tasks done
Completed this session:
[x] 1.1: [title]
[x] 1.2: [title]
Blocked:
[!] 2.1: [reason]
Tests: PASS/FAIL
Next: [ID]: [title]
Spec drift: [none / what was fixed][x]/spec-task <name> <task>/spec-goTask [ID] complete: [title]
Tests: PASS/FAIL
Files changed: [list]
Follow-up: [issues or "none"]/spec-audit <name>Audit: SPEC
Traceability:
✓ N requirements → M properties → K tasks
⚠ R[N] has no validating property
⚠ P[N] has no implementing task
Redundancy:
⚠ R[N] and R[M] describe same behavior
Stale language:
⚠ R[N] future tense but task [ID] done
Spec↔disk drift:
✗ spec lists "[path]" — not on disk
Doc sync:
⚠ README says "[X]" but spec says "[Y]"
Summary: E errors, W warnings/spec-plan SPEC refine/spec-status.kiro/specs/Status:SPEC STATUS
01-auth [SHIPPED]:
Progress: ███████████ 7/7 (100%)
Status: 1.1✓ 1.2✓ 1.3✓ 2.1✓ 2.2✓ 3.1✓ 3.2✓
Blocked: none
02-api-layer [ACTIVE]:
Progress: ██░░░░░░░░ 1/5 (20%)
Status: 1.1✓ 1.2○ 2.1○ 2.2○ 3.1○*
Blocked: none
03-legacy-export [SUPERSEDED → 05-bulk-export]:
Progress: ███████ 3/5 (historical)/spec-ledger [audit | add <feature> <spec> | update <feature> <status> | drift-sweep].kiro/FEATURES.mdauditadd <feature-id> <spec-id>PLANNEDIN-PROGRESSupdate <feature-id> <STATUS>until:superseded-by:drift-sweepauditLast drift sweep: <date>FEATURES.mdgit add .kiro/FEATURES.md && git commit -m "feat(ledger): <change summary>"/spec-merge <name>git branch --list "task/*"git worktree listgit merge <branch> --no-editgit add -A && git commit -m "chore(SPEC): post-merge fixes"/spec-reset <name>[x][~][!][ ]*git add -A && git commit -m "chore(SPEC): reset progress"/spec-help# Requirements Document
Status: DRAFT
Since: [YYYY-MM-DD]
Features: [feature-id, feature-id]
<!-- Status values: DRAFT, ACTIVE, SHIPPED, SUPERSEDED, OBSOLETE -->
<!-- Once SHIPPED, this file is frozen except for forward links or factual fixes. -->
## Introduction
<!-- What this spec covers and why -->
## Glossary
- **Term_1**: Definition
## Requirements
### Requirement 1: [Feature area]
**User Story:** As a [role], I want [action], so that [benefit].
#### Acceptance Criteria
1. WHEN [trigger], THE [Component] SHALL [expected behavior]
2. WHEN [trigger], THE [Component] SHALL [expected behavior]
### Requirement 2: [Feature area]
**User Story:** As a [role], I want [action], so that [benefit].
#### Acceptance Criteria
1. WHEN [trigger], THE [Component] SHALL [expected behavior]
### Non-Functional
**NF 1**: [Performance / reliability / security requirement]
## Out of Scope
<!-- What this spec explicitly does NOT cover --># Design: [SPEC NAME]
## Tech Stack
- **Language**:
- **Framework**:
- **Testing**:
- **Linter**:
## Directory Structure
\```
src/
tests/
\```
## Architecture Overview
\```mermaid
graph TD
A[Module A] --> B[Module B]
A --> C[Module C]
B --> D[Shared Service]
C --> D
\```
## Module Design
### [Module 1]
- **Purpose**: [what it does]
- **Interface**:
\```
[function signatures, class interfaces, API endpoints]
\```
- **Dependencies**: [what it depends on]
## Data Flow
\```mermaid
sequenceDiagram
participant User
participant CLI
participant Service
participant Store
User->>CLI: command
CLI->>Service: process(args)
Service->>Store: read/write
Store-->>Service: result
Service-->>CLI: output
CLI-->>User: display
\```
## State Management
<!-- Omit if stateless -->
## Data Models
<!-- Omit if simple -->
## Error Handling Strategy
## Testing Strategy
- **Property tests**: Verify design invariants (required)
- **E2E tests**: Validate user stories end-to-end (required)
- **Unit tests**: Complex internal logic only (optional)
- **Test command**: `[command]`
- **Lint command**: `[command]`
## Constraints
## Correctness Properties
### Property 1: [Property name]
- **Statement**: *For any* [condition], when [action], then [expected outcome]
- **Validates**: Requirement 1.1, 1.2
- **Example**: [concrete example]
- **Test approach**: [how to verify]
## Edge Cases
## Decisions
### Decision: [Title]
**Context:** [Situation]
**Options:** 1. [Option] — Pros / Cons 2. [Option] — Pros / Cons
**Decision:** [Chosen] **Rationale:** [Why]
## Security Considerations
<!-- If applicable --># Tasks: [SPEC NAME]
## Status marks
<!-- [ ] pending | [x] done | [~] skipped | [!] BLOCKED: reason | [ ]* optional -->
## Tasks
- [x] 1. Setup phase
- [x] 1.1 [Completed task title]
- [What was implemented]
- **Depends**: —
- **Requirements**: 1.1, 1.2
- **Properties**: 1
- [x] 1.2 [Completed task title]
- **Depends**: 1.1
- [ ] 2. Core phase
- [!] 2.1 [Blocked task] BLOCKED: [reason]
- **Depends**: 1.1
- **Requirements**: 2.1
- **Properties**: 2
- [ ] 2.2 [Pending task]
- **Depends**: 1.1, 1.2
- [ ] 2.3 Write property test for [property name]
- **Depends**: 2.2
- **Properties**: 2
- [ ]* 2.4 [Optional task]
- **Depends**: 2.2
- [ ] 3. E2E Tests
- [ ] 3.1 E2E — [User story scenario]
- **Depends**: 2.2, 2.3
- **Requirements**: 1.1, 2.1
## Notes# [SPEC NAME]
Status: DRAFT
Since: [YYYY-MM-DD]
Features: [feature-id, feature-id]
<!-- Status values: DRAFT, ACTIVE, SHIPPED, SUPERSEDED, OBSOLETE -->
<!-- Once SHIPPED, this file is frozen except for forward links or factual fixes. -->
## Context
<!-- Why this work exists, who it's for, what success looks like. -->
[2-3 sentences describing the problem and motivation]
## Constraints
<!-- Non-negotiable boundaries: tech stack, perf, compatibility, timeline. -->
- [e.g., Must use existing auth system]
- [e.g., Python 3.11+, no new dependencies]
## Decisions
<!-- Key choices made. Add as you go — capture the fork, the choice, and why. -->
### D1: [Decision title]
**Choice:** [what was decided]
**Why:** [rationale — what was the alternative, why not that]
### D2: [Decision title]
**Choice:** [what was decided]
**Why:** [rationale]
## Tasks
<!-- [ ] pending | [x] done | [~] skipped | [!] BLOCKED: reason -->
### P1 — Must Do
- [x] 1.1 [Completed task]
- [ ] 1.2 [Pending task]
- [ ] 1.3 Test: [what to verify for 1.1-1.2]
### P2 — Should Do
- [ ] 2.1 [Task description]
### P3 — Nice to Have
- [ ] 3.1 [Task description]
## Open Questions
<!-- Unknowns that need research or user input before proceeding. -->
- [ ] [Question — what needs answering, who can answer it]
- [x] [Resolved question — answer found, see D2]
## Log
<!-- Append as you go. Date + what happened + decisions made + issues found. -->
**[YYYY-MM-DD]** — [what was done, what was learned, what changed]
**[YYYY-MM-DD]** — [reviewer hat: added test task 1.3, found gap in X]<priority>.<sequence>.kiro/steering/specs/product.mdstructure.mdtech.mdanalytic-workbench