cycosoft/Eyas / .agents/skills/bdd-planning
bdd-planning
VerifiedConverting implementation plans and feature requests into empty BDD test cases using it.todo.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.0 KB |
SKILL.md
View on GitHub---
name: bdd-planning
description: Converting implementation plans and feature requests into empty BDD test cases using it.todo.
tags:
- bdd
- testing
- planning
---
# Reusable Skill: BDD Planning
## Overview
This skill outlines the process of converting acceptance criteria, feature requirements, and design specifications from an approved implementation plan directly into empty BDD test cases (`it.todo` or `test.todo`).
Using executable placeholders ensures that:
- Every planned behavior is mapped and tracked in the codebase.
- No requirements are lost or forgotten during coding iterations.
- Development progress is transparently reflected by tests changing from "todo" to passing implementations.
## When to Use
- Trigger immediately after receiving user approval on an implementation plan.
- Trigger before writing any functional implementation logic for a new feature or bug fix.
## Instructions
### 1. Extract Requirements
Read the approved `implementation_plan.md` (specifically the proposed changes and verification sections) and identify each discrete behavior or constraint the system must satisfy.
Be sure to capture:
- **Positive Behaviors**: What the system *should* do under normal or successful operations.
- **Negative/Inverse/Unhappy Path Behaviors**: What the system *must not* do under specific conditions (e.g., unauthorized actions, side effects that shouldn't happen, resource leaks, or how the system gracefully handles failure).
### 2. Scaffold Empty BDD Test Suites
Create a new test file (or modify an existing test suite) and represent each behavior as a `describe` block containing one or more `it.todo()` (or `test.todo()`) statements.
#### Example Plan Requirement:
> The active test server component must display a loading spinner while fetching active tests, show a helpful error message if the IPC channel fails, and must NOT make any API calls if the user is unauthenticated.
#### Corresponding BDD Scaffold:
```ts
describe('TestServerActiveModal (UI Behavior)', () => {
describe('Loading State', () => {
it.todo('should display a loading spinner while fetching active tests');
});
describe('Error Handling', () => {
it.todo('should display a helpful error message when the IPC channel fails');
});
describe('Inverse / Unhappy Path Constraints', () => {
it.todo('should NOT make any API calls if the user is unauthenticated');
});
});
```
### 3. Iterative Development Cycle
Follow this cycle for every requirement outlined in your test suite:
1. **Target one `it.todo`**: Select a single pending behavior.
2. **Implement the Test**: Change `it.todo("should...")` to an active test block `it("should...", async () => { ... })` specifying the setup, action, and assertions. Run the test to ensure it fails (Red phase).
3. **Write the Code**: Implement the minimum necessary application logic to make the test pass (Green phase).
4. **Refactor**: Clean up the code and tests while ensuring the test continues to pass (Refactor phase).
5. **Repeat**: Move to the next `it.todo` until all placeholders are fully implemented.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |