From bee
Explains spec-first TDD workflow (spec → plan → test → code) for AI-assisted development. Covers why specs reduce ambiguity, tests define completion, vertical slicing improves focus, and risk assessment guides process rigor.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bee:ai-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The #1 reason AI-generated code misses the mark is ambiguous requirements. "Add authentication" forces the AI to guess 100 decisions — session vs JWT, cookie vs header, redirect vs 401, password rules, lockout policy. Each guess compounds.
The #1 reason AI-generated code misses the mark is ambiguous requirements. "Add authentication" forces the AI to guess 100 decisions — session vs JWT, cookie vs header, redirect vs 401, password rules, lockout policy. Each guess compounds.
A spec with clear acceptance criteria eliminates guessing. The AI gets unambiguous targets and nails them on the first pass.
The tradeoff: 10 minutes writing a spec saves hours of rework. Without a spec, you'll spend that time anyway — just spread across debugging, re-prompting, and rewriting.
AI doesn't know when it's finished. It will keep generating code until you stop it. Tests give it a concrete finish line.
A failing test is the clearest possible prompt: "Make this pass." The AI doesn't need to interpret requirements — the test IS the requirement in executable form.
Red-green-refactor with AI:
AI works best with focused, bounded tasks. A vertical slice (UI + backend + data for one capability) gives the AI everything it needs to deliver something complete and testable.
Horizontal slicing (all database tables, then all APIs, then all UI) forces the AI to build things it can't test in isolation. Each layer depends on layers that don't exist yet.
Vertical slice benefits:
Low-risk code (internal tool, easy to revert) doesn't need the same rigor as high-risk code (payment flow, auth, data migration). Applying the same process to both wastes time on low-risk tasks and under-serves high-risk ones.
Risk-aware workflow means:
Not every task needs a spec. Not every change needs TDD. The workflow should match the task:
The right amount of process is the minimum needed to produce correct, maintainable code. More process than needed is waste. Less process than needed is risk.
npx claudepluginhub incubyte/ai-plugins --plugin beeEnforces a gated Spec → Plan → Build → Test → Review → Ship lifecycle for multi-file features and projects, preventing AI coding agents from skipping specification and verification steps.
Enforces a disciplined TDD workflow (RED/GREEN/REFACTOR) where the developer maintains architectural control and reviews all AI-generated code. Activates on TDD trigger phrases.
Teaches context-first prompting, phased interactions, iterative refinement, and validation for improved AI coding assistant results in spec-driven development.