home / skills / andrelandgraf / fullstackrecipes / using-user-stories

using-user-stories skill

/.agents/skills/using-user-stories

This skill helps you define and track feature delivery using user stories, ensuring verifiable steps and passing acceptance criteria.

npx playbooks add skill andrelandgraf/fullstackrecipes --skill using-user-stories

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.6 KB
---
name: using-user-stories
description: Document and track feature implementation with user stories. Workflow for authoring stories, building features, and marking acceptance criteria as passing.
---

# Working with User Stories

Document and track feature implementation with user stories. Workflow for authoring stories, building features, and marking acceptance criteria as passing.

User stories document what features should do and track implementation status. When AI agents work through user stories systematically, they produce better results and leave a clear trail of what was done.

---

## Workflow

When working on features:

1. **Author/Update**: Create or modify user story features before building
2. **Build & Test**: Implement until tests pass
3. **Mark Passing**: Set `passes: true` when verified

---

## When to Create User Stories

Create user stories when:

- Starting a new feature or flow
- Fixing a bug that should have test coverage
- Implementing requirements from a design or spec
- Breaking down a large feature into testable increments

---

## Writing Effective Steps

Steps should be:

- **Verifiable**: Each step can be checked by running the app or tests
- **Imperative**: Written as commands ("Navigate to", "Click", "Verify")
- **Specific**: Include URLs, button names, expected values

Good:

```json
{
  "description": "User deletes a chat",
  "steps": [
    "Navigate to /chats",
    "Click the menu button on a chat",
    "Click 'Delete' option",
    "Confirm deletion in dialog",
    "Verify chat is removed from list"
  ],
  "passes": false
}
```

Avoid vague steps:

```json
{
  "description": "User deletes a chat",
  "steps": ["Delete a chat", "Check it worked"],
  "passes": false
}
```

---

## Documenting Work Done

When completing a feature:

1. Verify all steps work manually or via tests
2. Update `passes: true` in the user story
3. Commit both the implementation and the updated story

This creates a log of completed work that future agents can reference.

---

## Using with AI Agents

AI agents can read user stories to:

- Understand what features need to be built
- Know the exact acceptance criteria
- Find features that still need work (`passes: false`)
- Log their progress by marking features as passing

For automated agent loops, see the **Ralph Agent Loop** recipe.

---

## Verifying Stories

Run the verification script to check all stories have valid format:

```bash
bun run user-stories:verify
```

This validates:

- All files are valid JSON
- Each feature has required fields
- Steps are non-empty strings
- Shows pass/fail counts per file

Overview

This skill documents and tracks feature implementation using user stories. It provides a clear workflow for authoring stories, building features, and marking acceptance criteria as passing so teams and agents can verify work and maintain a historical record.

How this skill works

You author or update user stories that list verifiable, imperative steps and a passes flag. Developers or AI agents implement the feature, run tests or manual checks, then set passes: true when all steps pass. A verification script validates story format, required fields, and step integrity across the collection.

When to use it

  • Starting a new feature or user flow to define acceptance criteria
  • Fixing a bug that requires testable validation steps
  • Translating a design or spec into implementable tasks
  • Breaking a large feature into smaller, testable increments
  • Coordinating work between humans and automated agents

Best practices

  • Write steps as short imperative commands (e.g., 'Navigate to /settings')
  • Make each step verifiable with URLs, button names, or expected values
  • Keep steps specific and atomic so tests or manual checks are reliable
  • Update passes to true only after manual or automated verification
  • Commit the implemented code and the updated story together

Example use cases

  • Define acceptance steps for a new chat deletion feature and mark passing after end-to-end tests
  • Create stories for regression fixes so QA can reproduce and verify fixes
  • Break a checkout flow into multiple stories for incremental implementation
  • Have AI agents scan for stories with passes: false and implement missing steps
  • Run the verification script before CI to ensure story files are valid

FAQ

How do I mark a story as completed?

Verify every step manually or with tests, then set passes: true in the story and commit the change along with the implementation.

How can agents find work to do?

Agents can list stories where passes: false to find features that still require implementation or verification.