Skip to content

cycosoft/Eyas / .agents/skills/bdd-planning

bdd-planning

Verified

Converting implementation plans and feature requests into empty BDD test cases using it.todo.

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:

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.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 319kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 319kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 319kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall