agentleFS
jabrenajabrena/cursor-rules-agile/.cursor/rules/2003-agile-create-user-story.mdc

cursor-rules-agile / rules

Cursor rule6 starsChanged 18 months agoApache-2.0Archived repositoryView on GitHub

Create Agile User stories

The file

We split this 2003-agile-create-user-story.mdc into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When: "What specific action is performed?"

    line 33
  2. Distinctive:

    Ask: "Do you have another scenario to define (e.g., an alternative path, a boundary condition, an error case, or another rule)?

    line 38
  3. Distinctive:

    If Yes, repeat the questions from step 7 (Scenario Title, Given, When, Then, Data Examples) for each new scenario.

    line 39
  4. Distinctive:

    Ensure the Gherkin output for data examples is illustrative of how to use docstrings for JSON/XML or tables for structured data if the user …

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
2003-agile-create-user-story.mdc
---
description: Create Agile User stories
globs: 
alwaysApply: false
---
# Create Agile User stories

This rule guides the AI to first ask a series of targeted questions to gather all necessary details for a user story and its associated Gherkin acceptance criteria. After receiving the information, the AI will generate the content for a well-formed user story in Markdown format (linking to the Gherkin file) and a separate Gherkin `.feature` file containing the detailed acceptance criteria.

Instructions for the AI (Content of the Rule):

"When activated, you should guide the user through creating an agile user story and its corresponding Gherkin feature file by following these steps:

Phase 1: Information Gathering
Acknowledge the request and inform the user that you need to ask some questions. Then, ask the following questions, waiting for their input after each block or as appropriate:

**User Story Core Details:**
1.  Title/ID: "What is a concise title or unique ID for this user story?"
2.  User Role (Persona): "Who is the primary user (persona) for this feature? (e.g., 'registered user', 'administrator', 'guest visitor')"
3.  Goal/Action: "What specific action does this user want to perform, or what goal do they want to accomplish with this feature?"
4.  Benefit/Value: "What is the main benefit or value the user will gain from this feature? Why is this important to them?"

**Gherkin Feature File Details:**
5.  Feature Name: "What is a descriptive name for the overall feature these scenarios will cover? (This will be the `Feature:` line in the Gherkin file, e.g., 'User Authentication Management')."
6.  (Optional) Background Steps: "Are there any common setup steps (Given steps) that apply to ALL or most of the scenarios for this feature? If so, please list them."

**Acceptance Criteria / Gherkin Scenarios:**
Inform the user: "Now, let's detail the acceptance criteria with concrete examples. Each distinct scenario or rule will be translated into a Gherkin scenario. For each scenario, please provide a title, the 'Given' (context/preconditions), 'When' (action), and 'Then' (observable outcomes). Include specific data examples where applicable (e.g., input values, expected messages, JSON snippets)."

7.  Scenario 1 (e.g., Main Success Path):
    *   Scenario Title: "What's a brief title for this first scenario?"
    *   Given: "What's the context or precondition(s)?"
    *   When: "What specific action is performed?"
    *   Then: "What are the observable outcome(s)?"
    *   Data Examples: "Any specific data (inputs/outputs) for this scenario?"

8.  Additional Scenarios:
    Ask: "Do you have another scenario to define (e.g., an alternative path, a boundary condition, an error case, or another rule)? (Yes/No)"
    If Yes, repeat the questions from step 7 (Scenario Title, Given, When, Then, Data Examples) for each new scenario. Continue until the user indicates 'No' more scenarios.

**File Naming and Linking:**
9.  User Story Filename: "What should be the filename for the Markdown user story (e.g., `US-001_Login_Functionality.md`)?"
10. Gherkin Filename: "What should be the filename for the Gherkin feature file (e.g., `US-001_login_functionality.feature`)?"
11. Relative Path for Linking: "What is the relative path from the user story Markdown file to the Gherkin feature file, so they can be linked correctly? (e.g., `../features/US-001_login_functionality.feature` or if in a 'features' subdirectory within the story's directory: `features/US-001_login_functionality.feature`)."

**Optional User Story Notes:**
12. Additional Notes: "Are there any other relevant details for the user story Markdown file, such as links to mockups, specific technical constraints, or non-functional requirements?"

Phase 2: Artifact Content Generation
Once all information is gathered, inform the user you will now generate the content for the two files. Then, provide the content for each file clearly separated:

**Content for User Story Markdown File: `[User Story Filename From Input]`**

[agile-user-story-template.md](mdc:.cursor/rules/templates/agile-user-story-template.md)

**Content for Gherkin Feature File: `[Gherkin Filename From Input]`**

[agile-gherkin-template.md](mdc:.cursor/rules/templates/agile-gherkin-template.md)

Ensure the Gherkin output for data examples is illustrative of how to use docstrings for JSON/XML or tables for structured data if the user provides complex examples.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.