agentleFS
SajidRahman-BSSajidRahman-BS/Project-Initiation-Assistant/skills/user-story-generator/SKILL.md

user-story-generator

Skill0 starsChanged 4 months agoMITView on GitHub

Converts a PRD or requirement set into epics and INVEST-compliant user stories in As a / I want / So that form, each with testable Given/When/Then acceptance criteria. Groups related stories under epics with stable IDs so they can be tracked and estimated. Use whenever the user needs a backlog, epics, user stories, or acceptance criteria generated from requirements, a PRD, or a feature list.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every story should be Independent, Negotiable, Valuable, Estimable, Small, and Testable.

    line 36

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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
SKILL.md

User Story Generator

This skill turns functional requirements into a backlog the team can actually pull from: epics that group related work, and user stories small enough to build and test in a sprint, each with acceptance criteria a QA engineer can verify.

Instructions

Step 1: Group requirements into epics

Cluster the PRD's functional requirements into 3–7 epics by capability area (for example: Onboarding, Reordering, Payments, Delivery, Admin). Give each a stable ID (EP-01, EP-02) and a one-line description of the outcome it delivers.

Step 2: Write user stories

For each epic, write stories in this exact form:

As a [persona]
I want [capability]
So that [benefit]

Give each story a stable ID (US-01, US-02) and link it to its epic ID. Keep stories small — if a story needs more than a handful of acceptance criteria, split it.

Step 3: Apply INVEST

Every story should be Independent, Negotiable, Valuable, Estimable, Small, and Testable. See references/story-rules.md for how to check each and how to split stories that are too big.

Step 4: Write acceptance criteria

For each story, write 2–5 acceptance criteria in Given/When/Then form. These define "done" and become the basis for test cases:

Given [context]
When [action]
Then [observable result]

Cover the happy path and the important edge cases (empty state, invalid input, failure of an external dependency).

Step 5: Hand off

Output the structured object below so the estimation stage can consume it.

Output format

Present a readable backlog for humans AND this JSON:

{
  "epics": [{"id": "EP-01", "name": "", "description": ""}],
  "stories": [
    {
      "id": "US-01",
      "epic_id": "EP-01",
      "as_a": "",
      "i_want": "",
      "so_that": "",
      "acceptance_criteria": ["Given ... When ... Then ..."]
    }
  ]
}

Example

Epic: EP-02 Reordering — "Let customers reorder a previous prescription."

Story US-04:

As a returning customer
I want to reorder a prescription from my history
So that I do not have to re-enter the details

Acceptance criteria:

  • Given I have a past order, When I open my order history, Then I see a "Reorder" action on each past order.
  • Given I tap Reorder, When the item is still available, Then it is added to a new cart with the same quantity.
  • Given I tap Reorder, When the item is discontinued, Then I see a clear message and a suggested alternative.

Troubleshooting

  • Stories are too big (an "epic in disguise"). Split by workflow step, by data variation, or by happy-path-then-edge-case. See references/story-rules.md.
  • Acceptance criteria restate the story. They must be checkable. If QA cannot pass or fail it by observation, rewrite it.

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.