Spec workflow
Spec-driven features: grill the idea, write a spec, implement against acceptance criteria.
Requires pack:
spec. Skills are not on disk until the pack is enabled. See Packs.
bash
npx create-lean-agent-kit@latest . --enable-pack specbash
pnpm dlx create-lean-agent-kit@latest . --enable-pack specbash
yarn dlx create-lean-agent-kit@latest . --enable-pack specbash
bunx create-lean-agent-kit@latest . --enable-pack specWhat it is
The spec pack adds a structured loop for non-trivial features. Instead of coding from a vague chat request, the agent grills unclear requirements, writes a Markdown spec with acceptance criteria, then implements against that spec and checks the result.
Core Lean Agent Kit already handles map + ambient session memory + LEARNINGS. Spec is the pack you enable when “just start coding” is too risky.
Do I need this pack?
- Enable if you ship new features regularly, want grill → spec → implement, or you plan to use architecture, backlog, or git lifecycle (those packs depend on
spec). - Skip if you only do small fixes and Q&A — core’s trivial/normal workflow sizes are enough.
Use cases
- New product feature — “Add team workspaces” is fuzzy; grill clears scope,
new-specwritesdocs/specs/00N-….md,implement-specworks AC by AC. - Risky change — auth, payments, migrations; a written spec is the shared contract for the agent and humans.
- Handoff mid-feature — next session reads the active spec +
ACTIVE_CONTEXTinstead of rediscovering the plan. - Foundation for other packs — Backlog cards, git branch/PR offers, and architecture slices all hang off specs.
How it works
| Skill | Role |
|---|---|
leanagentkit-grill | Ask clarifying questions until the problem is sharp |
leanagentkit-new-spec | Create docs/specs/NNN-feature.md from the template |
leanagentkit-implement-spec | Implement acceptance criteria; update progress |
leanagentkit-spike | Time-boxed exploration when the approach is unknown |
leanagentkit-seed-adrs | Capture architecture decisions into docs/adr/ |
Also ships memory files used by the substantial loop: docs/memory/PROGRESS.md, docs/memory/SCRATCH.md, and templates under docs/specs/ / docs/adr/.
Workflow size reminder
| Size | When | Loop |
|---|---|---|
| Trivial | Typo, rename, Q&A | Just do it (no spec pack needed) |
| Normal | Typical coding | Ambient work → check → finalize |
| Substantial | Fuzzy/new feature | This pack: grill → new-spec → implement-spec → check → finalize |
Further reading
- Full guide — substantial work section
- Architecture decomposition — optional slices after
new-spec - Backlog.md — visual status layer on top of specs
- Git lifecycle — branch / commit / PR offers tied to specs