user-stories
Writes, splits and refines user stories with Given/When/Then acceptance criteria in STORIES.md, feeding bdd-specs. Use when turning a feature request or a vague ask into a testable backlog entry.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- user-stories
- description
- Writes, splits and refines user stories with Given/When/Then acceptance criteria in STORIES.md, feeding bdd-specs. Use when turning a feature request or a vague ask into a testable backlog entry.
03 SKILL.md 正文
User stories
Turn product intent into stories that flow straight into bdd-specs with no manual
reshaping. The structure here is a contract, not decoration — get it right and stories
become specs become code with nothing lost in translation.
Honest framing: this is a discipline this plugin introduces, not one already standard
across Umbraco projects — don't present it to a team as "the Umbraco way." It's a real,
well-understood technique worth adopting on its own merits, and it's what makes
bdd-specs's handoff work cleanly.
Where this writes
STORIES.md in the feature's plan folder (owned by feature-plan, which usually dispatches
this skill as its first step). If invoked standalone before feature-plan has run, still write
to the same file, and note that feature-plan still needs to run to turn the stories into an
ordered, dependency-aware task list in PLAN.md.
The pipeline this sits in
feature request ──▶ [user-stories] ──▶ STORIES.md ──▶ [bdd-specs] ──▶ specs ──▶ code
Map deliberately:
| Story artifact | Becomes in bdd-specs |
|---|---|
| One story | One Feature (one test class) |
| One acceptance criterion | One Scenario (a nested test-class group, or a #region) |
| Given/When/Then steps | The Scenario's arrange / act / assert |
| Each distinct Then | One Specification (one [Test], one assertion) |
| Happy-path criteria | Listed first, exhaustively |
| Error/edge criteria | A separate, clearly-named "sad path" group |
Write acceptance criteria as Given/When/Then from the start — that single habit is what keeps the handoff clean.
Workflow
1. Establish context before writing
Don't invent the role, the goal, or the value. If handed something vague ("add notifications"), ask:
- Who is this for? Be specific — "content editor with publish rights," not "user."
- What do they want to do?
- Why — a story whose "so that" is hollow ("...so that I can use the feature") is usually a task, not a story.
- What does done look like, observably?
- What's explicitly out of scope for this story?
Ask the smallest number of questions that unblock you. If told "just draft it and I'll
correct it," do that — draft, list your guesses at the top per plain-writing's "What
needs the reader goes first", and let the reaction do the specifying.
2. Write the story
As a <specific role>,
I want <capability>,
so that <outcome / value>.
Then acceptance criteria, each a self-contained scenario:
AC1 — <short name>
Given <starting state>
When <action>
Then <single observable outcome>
One outcome per Then — "and also" is a second criterion, since it becomes a second
Specification downstream. Happy path exhaustively first, then error/edge criteria under a
clearly separated heading.
Error criteria are where two outcomes most often slip into one Then: "the request is refused
and no file is returned", "no email is sent and a warning is logged". Each is two criteria.
Before writing the file, reread every Then and split any that joins two results with "and".
One result described by several values ("the file has the rows news,4 and old,0") is
still one outcome.
3. Quality-gate with INVEST
The two failures that matter most in practice:
- Too big (not Small). Can't enumerate its acceptance criteria, or it spans multiple roles/outcomes? Split it. Prefer vertical slices (a thin end-to-end capability — e.g. "an editor can save a draft note on a content item," backend + UI together) over horizontal ones ("build the API," "build the UI"), because a vertical slice is independently valuable and testable on its own.
- Not Testable. Can't phrase the acceptance criteria as Given/When/Then with an observable outcome? The story is underspecified — go back to step 1, don't lower the bar.
(The full INVEST set — Independent, Negotiable, Valuable, Estimable, Small, Testable — is a useful checklist if a story feels off in a way these two don't explain, but these two catch the common failure modes.)
4. Epics
An epic is a container, not a big story — a heading grouping child stories. Decompose only as far as the near-term plan needs; leave later stories as one-line placeholders. Over- decomposing a backlog that will change is waste.
5. Definition of Ready / Definition of Done
These are team agreements, not house rules — confirm them with the user rather than asserting
defaults. Capture the agreed version once, near the top of STORIES.md (see "Output"), so
every story in that feature inherits it instead of restating it. Reasonable starting points to offer (not impose):
Ready — role/capability/value all stated and non-hollow, Given/When/Then acceptance
criteria cover the happy path, out-of-scope is explicit, passes INVEST. Done — all
acceptance criteria pass as executable specs (via bdd-specs), sad-path criteria are covered
too, plus whatever the team adds (review, docs, deployed behind a flag, etc.).
Scope boundaries
- In scope: writing stories, splitting/refining them, acceptance criteria, epic decomposition, turning a feature request into a structured backlog entry.
- Out of scope: story-point estimation and sprint capacity — team rituals that depend on a team's own history and velocity. Offer relative-size flags (S/M/L, or "this is too big, split it") instead of fabricated point numbers.
- Hand off, don't overlap: generating executable specs is
bdd-specs's job. Sequencing into an ordered task list isfeature-plan's job. Produce the story, point at the next step, don't do it here.
Output
Write stories following plain-writing: plain words, one behaviour per criterion, and
every name, number and condition kept.
Write or update STORIES.md. If stories already exist there, merge — preserve story ids
already in use (specs reference them) and append or amend rather than rewriting wholesale.
The stories themselves are written for bdd-specs and feature-build, so completeness
comes before length: every criterion stays, however long the file gets. A person reads the
file mainly to check how the work was split, so it opens with a short index they can check
that against:
# Stories: <feature name>
**<N> stories, <M> criteria.** Story ids are used by `PLAN.md` and the spec files, so never
renumber them.
> [!IMPORTANT]
> **<N> guesses need your OK.**
> <per `plain-writing`'s "What needs the reader goes first". Leave out when there's nothing.>
**<Area>**
- [<ID>](#<heading-anchor>) <story title>, <n> criteria
<one bold area per part of the feature (core, API, backoffice, an integration, shipping),
in build order, with every story listed once under one area>
<details>
<summary>Ready and Done</summary>
<the agreed Definition of Ready and Definition of Done>
</details>
---
## <ID>: <story title>
<the story and its criteria, in full>
Rebuild the index on every write, so its counts and links match the stories below it. The
counts make a story that's too big stand out; say so in your report rather than leaving it
for the reader to spot.
After writing, report how many stories the file now holds and that it's ready for
bdd-specs.
04 同仓库更多 Skills
umbraco-security
What Umbraco provides for keeping a package secure, on the server and in the backoffice: Management API authorization and policies, settings that hold secrets, endpoints outside the Management API, sanitizeHTML and escapeHTML, DOMPurify rules for custom elements, and umbHttpClient instead of handling tokens in the browser. Use when writing or reviewing a Management API controller, a secret setting, a custom endpoint, a backoffice template that uses unsafeHTML, or frontend code that calls an API.
umbraco-performance
Keeping a package fast on the sites that install it: the published cache over the services layer, tree traversal, caching lookups and clearing them, data type config and converter cache levels, output cache eviction, light hot paths, and backoffice screens that don't over-fetch. Use when writing, changing or reviewing code that runs per request, per save, per indexed item or at startup (property value converters, notification handlers, indexing), code that loops over every content item (a full rebuild, an import, a sync), or a list or search screen. Not for a site's own templates.
umbraco-package-conventions
Backend conventions for an Umbraco package: async naming, internal by default, Attempt-based results for routine failures, public-API backwards compatibility, and where extension methods live. Use when naming a method, choosing visibility, shaping a service's result, changing a public signature (including adding a dependency to a public class's constructor), or organizing extension methods. For extension mechanisms, see `umbraco-extensibility`.
umbraco-marketplace
Gets a finished package listed on the Umbraco Marketplace: the NuGet tag, the dependency Marketplace reads version support from, the v14+ compatibility gotcha, and umbraco-marketplace.json. Use when a package is ready to publish, or when reviewing its packaging.
umbraco-extensibility
Umbraco's extension mechanisms (Composers, collection builders, notification handlers, attribute discovery) and a catalogue of backend CMS extension points: property value converters, Management API endpoints, content finders, health checks, search indexing, package migrations, background jobs, and more. Use when making a feature extensible or choosing which extension point fits. Not for property editor UI, dashboards, sections or trees, which the official Backoffice Skills plugin covers.
umbraco-env-sync
Moving an Umbraco package's own entities between environments with Umbraco Deploy or uSync: what moves as files and what moves over the wire, export shape and dependencies, restores, keeping secrets out, linking users by alias, translating stored ids, and keeping sync code current. Use when adding Deploy or uSync support, or changing an entity the package syncs. Not for deploying the site itself.