agentleFS
EnigmaWUEnigmaWU/MyCodeAgentSkills/improve-user-story/SKILL.md

improve-user-story

Skill4 starsChanged 3 months agoMITView on GitHub

WHEN/WHERE/WHO: [Scheduling: Developers, product owners, QA engineers, or agents keeping BDD-style user stories up to date.] HOW: [Structural: Use this SKILL to proactively detect when a conversation introduces a new edge case or change, and update the Story.] WHY: [Scheduling: Requirements evolve during discussion, and keeping BDD acceptance criteria aligned prevents testing gaps.]

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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. Distinctive:

    When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter …

    line 13
  2. Distinctive:

    Transfer Check: Verify the workflow still works for both minor edge-case additions and meaningful feature shifts.

    line 43
  3. Distinctive:

    Stop Rule: If it is unclear which story to update or the new improvement conflicts with a core requirement, stop and ask before editing.

    line 44
  4. Very specific:

    Primary Story Format: Use the traditional As a <role>, I want <capability>, So that <value> format by default.

    line 48
  5. Distinctive:

    Preserve Existing Scenarios: Do not rewrite scenarios that are unaffected by the new improvement.

    line 50
  6. Distinctive:

    If it's unclear *which* User Story to update, or if the new improvement conflicts with a core requirement, stop and ask the user for …

    line 53
  7. Distinctive:

    Keep the standard Story structure.

    line 65
  8. Distinctive:

    Use Data Tables (Scenario Outlines) if the new improvement introduces multiple data variations to an existing scenario.

    line 67
  9. Distinctive:

    Do updated scenarios preserve unaffected behavior and the story's original intent?

    line 81
  10. Distinctive:

    Verify that unaffected scenarios were not accidentally deleted.

    line 86
  11. Distinctive:

    Verify that the new scenarios map directly to the improvement discussed.

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

Improve User Story

Common Contract (Load First)

When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter rules, anti-pattern guidance, and the Review In Mind loop in review-in-mind. This skill adds only domain-specific rules below.

Who

Developers, Product Owners, QA Engineers, and AI Agents. The agent uses this skill to proactively maintain living documentation as requirements evolve.

What

Detects when a conversation introduces a new improvement, edge case, or feature change, and updates the relevant existing User Story to reflect it. It carefully adds, removes, or updates the BDD Given / When / Then scenarios without destroying the intent of the unaffected scenarios.

When

Invoke this skill when a conversation introduces a new edge case, bug fix, or feature enhancement. Trigger phrases include: "let's also add...", "what if...?", "we should also handle...", or "update the story".

Where

Modifies existing markdown files containing User Stories, ticket bodies, or outputs the updated story to the chat.

Why

Keeping the BDD acceptance criteria perfectly aligned with the latest conversation prevents testing gaps. Proactive updates save time and reduce cognitive load for developers trying to track changes.

Inputs

  • Existing User Story (required): The current version of the user story (from a file or chat context).
  • New Improvement/Feature (required): The new requirement, edge case, or workflow change.

Output (Logical Evidence)

  • An updated User Story that strictly follows the write-user-story formatting rules.

Optimization Readiness

  • Failure Signals: Unaffected scenarios are rewritten unnecessarily, new edge cases are dropped, the story loses its original intent, or the update introduces implementation coupling.
  • Evidence To Collect: Original and updated stories, added or removed scenarios, and examples where the modification addressed the new improvement without damaging unaffected behavior.
  • Safe Mutation Boundaries: Refine scenario-editing guidance, edge-case prompting, and format-preservation rules without changing the core requirement to keep the existing story alive.
  • Acceptance Criteria: Accept revisions only if the updated story preserves unaffected scenarios, adds the new behavior precisely, and keeps BDD acceptance criteria executable.
  • Rejected Revision Handling: Record accidental deletions, over-broad rewrites, and implementation-coupled scenario drafts so they are not repeated.
  • Transfer Check: Verify the workflow still works for both minor edge-case additions and meaningful feature shifts.
  • Stop Rule: If it is unclear which story to update or the new improvement conflicts with a core requirement, stop and ask before editing.

Constraints (Logical Boundaries)

  • RULE 1: BDD Executable Specifications First. Acceptance Criteria MUST be written as strict BDD Given/When/Then scenarios.
  • Primary Story Format: Use the traditional As a <role>, I want <capability>, So that <value> format by default.
  • Advisory Story Format: You may optionally suggest the In order to <value>, As a <role>, I want <capability> format.
  • Preserve Existing Scenarios: Do not rewrite scenarios that are unaffected by the new improvement. Only modify what needs to change.

One More Thing

If it's unclear which User Story to update, or if the new improvement conflicts with a core requirement, stop and ask the user for clarification.

How (Structural Workflow)

Phase 1: Detect Change & Identify Target

  1. Notice when a new feature, improvement, or edge case is agreed upon in the conversation.
  2. Locate the existing user story that covers this domain.

Phase 2: Analyze Impact

  1. Determine if the new feature changes the core objective (the "I want" / "So that").
  2. Identify whether existing scenarios need modification (e.g., a "happy path" now has a new condition) or if entirely new scenarios must be created.

Phase 3: Apply Formatting Guidelines

  1. Keep the standard Story structure.
  2. Draft new Given / When / Then scenarios that cover the new feature.
  3. Use Data Tables (Scenario Outlines) if the new improvement introduces multiple data variations to an existing scenario.

Phase 4: Deliver the Update

  1. Output the complete, updated user story.
  2. Provide a brief summary of what specific scenarios were altered or added.

Resources

  • Story Refactoring Guide

Review In Mind (ReviewInMindGenie)

Execute the common review loop in review-in-mind before delivering.

Review lens for this skill:

  • Do updated scenarios preserve unaffected behavior and the story's original intent?
  • Are new edge cases reflected in Given/When/Then without implementation coupling?
  • Is the diff minimal and traceable to the new information?

Validation

  1. Verify that unaffected scenarios were not accidentally deleted.
  2. Verify that the new scenarios map directly to the improvement discussed.

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.