using-user-stories
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:
- Author/Update: Create or modify user story features before building
- Build & Test: Implement until tests pass
- Mark Passing: Set
passes: truewhen 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:
{
"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:
{
"description": "User deletes a chat",
"steps": ["Delete a chat", "Check it worked"],
"passes": false
}
Documenting Work Done
When completing a feature:
- Verify all steps work manually or via tests
- Update
passes: truein the user story - 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:
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
More from andrelandgraf/fullstackrecipes
ralph-loop
Complete setup for automated agent-driven development. Define features as user stories with testable acceptance criteria, then run AI agents in a loop until all stories pass.
2.2Kobservability-monitoring
Complete observability stack with structured logging, error tracking, and web analytics.
263stripe-subscriptions
Complete subscription billing system with Stripe integration, feature flags for plan gating, webhook handling, and billing portal.
187nextjs-on-vercel
Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push.
122ai-chat
Build a complete AI chat application with database persistence, chat list management, and automatic title generation.
115pino-logging-setup
Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services.
113