基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cpliakas/claude-code-engineering-leaders --skill write-story命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Score a story draft against INVEST criteria and eight agile coaching principles. Returns a structured report with pass/fail per dimension and specific rewrites or corrective actions for failures.
Route convention authorship to the declared domain owner. Accepts an optional --domain=<value> flag or positional domain token. Valid domains: tactical-implementation, infrastructure, quality, ux, architecture. Defaults to tactical-implementation when omitted. Use when authoring a new convention for any domain.
Register a specialist agent in the Tech Lead's routing model. Use when adding a new agent to the project that the Tech Lead should consult during implementation planning, incident analysis, or retrospectives.
| name | write-story |
| description | Write a well-structured user story with acceptance criteria and INVEST validation. |
| user-invokable | true |
| allowed-tools | Read, Grep, Glob |
| argument-hint | [description of the feature or requirement] |
Write a complete, high-quality user story with INVEST validation.
$ARGUMENTS = description of the feature, requirement, or problem to solve.
Readiness assessment:
backlog and skip to the Backlog-Tier Output section at the end of this skillsprint-ready and continue the full process belowDetailed specification should happen at pull time, not envisioning time. Stories deep in the backlog will change as the project evolves — investing in full acceptance criteria and technical notes for work that is months away produces waste. A lightweight backlog entry captures intent and scope; the full story gets written when the team is ready to start.
Gate: If readiness is
backlog, skip to the Backlog-Tier Output section.
Before drafting, evaluate whether the input provides enough detail across four dimensions:
| Dimension | Sufficient when | Prompt if underspecified |
|---|---|---|
| Persona | A specific role or actor is named or clearly implied | "Who is the primary user or actor for this requirement?" |
| Observable behavior | The desired system behavior is concrete enough to demonstrate | "What should the system do — what would a user see or experience?" |
| Benefit / motivation | A reason or outcome beyond restating the capability is present | "Why does this matter — what problem does it solve or what outcome does it enable?" |
| Scope boundaries | At least a rough sense of what is in and out of scope is present | "What is explicitly out of scope or deferred for this work?" |
Outcome paths:
Gate: If readiness is
backlog, skip to the Backlog-Tier Output section.
Title: Action-oriented, concise, starts with a verb.
Body structure:
## User Story
As a [specific role — not "user"],
I want [specific capability — what the system should do],
so that [measurable benefit — why it matters to this role].
## Acceptance Criteria
Use Given/When/Then for behavioral criteria:
- [ ] Given [precondition], when [action], then [observable outcome]
- [ ] Given [precondition], when [action], then [observable outcome]
Use checkboxes for straightforward validations:
- [ ] [Specific, testable condition]
Include at minimum:
- 2-3 happy path criteria
- 1-2 error/edge cases
- 1 criterion for test coverage expectations
## Technical Notes
- **Scope**: XS / S / M / L / XL (relative size estimate)
- **Recommended model**: [haiku | sonnet | opus] — [one-sentence rationale]
- **Dependencies**: [other stories, services, or decisions this is blocked by]
- **Constraints**: [performance requirements, compatibility, regulatory, etc.]
- **Files likely affected**: [key modules — only if codebase context is available from step 1]
What to avoid in acceptance criteria:
Acceptance criteria must describe behavior observable by the persona, not internal system mechanics. Given/When/Then steps use domain language, not protocol or implementation language.
| Bad (implementation detail) | Good (domain behavior) |
|---|---|
| "then the API returns HTTP 201" | "then the order appears in the customer's order history" |
"then the response body contains { status: 'ok' }" | "then a confirmation message is displayed" |
"when createUser() is called" | "when the visitor submits the registration form" |
"then a row is inserted into the notifications table" | "then the customer receives a notification within 60 seconds" |
Hard rule: If an acceptance criterion references implementation artifacts (HTTP status codes, JSON shapes, file paths, function signatures, database columns), rewrite it in domain language and move the implementation detail to Technical Notes.
Definition of Done guidance:
Stories reference a project-level Definition of Done rather than repeating completion standards inline. Emit a ## Definition of Done section ONLY when the story has requirements beyond the project standard.
Examples of story-specific DoD items (include only when applicable):
When present, place the ## Definition of Done section after Technical Notes in the story body.
Check every story against all six criteria before finalizing:
| Criterion | Question | Common failure |
|---|---|---|
| Independent | Can this be delivered without waiting on another in-progress story? | Coupled to another story's implementation |
| Negotiable | Does it describe the what/why and leave room for how? | Specifies UI layout, API shape, or implementation approach |
| Valuable | Does the benefit statement name a real outcome for the role? | "So that the code is cleaner" — that's a refactor, not a user story |
| Estimable | Is there enough detail to estimate effort? | Vague scope, unknown integration, missing constraints |
| Small | Can it be completed in a single sprint? | Epic-sized scope, AC grouped under sub-headings, more than 7-8 acceptance criteria |
| Testable | Can every acceptance criterion be verified with a concrete test? | "Works correctly", "Handles all edge cases" |
If a criterion fails, fix the story before output. Common fixes:
/decompose-requirement when any signal firesReason across three dimensions to select recommended_model:
| Dimension | Question |
|---|---|
| Complexity | How many files are affected? Does the task require multi-step reasoning or deep domain knowledge? |
| Latency tolerance | Is this a quick task where fast turnaround matters, or a careful task where thoroughness is paramount? |
| Cost | Is the task well-scoped enough to trust a faster, cheaper model? |
Selection rules:
sonnet if any of the following are present: multi-step reasoning, API design, cross-file impact.Record the chosen tier and a one-sentence rationale in the Technical Notes section of the story body.
Before presenting the story, verify:
recommended_model is present and rationale is included in Technical NotesDelivery guarantee: This step MUST conclude with the complete formatted story as the primary output. Nothing — no review feedback, coaching report, or product concern — replaces or defers the story delivery.
Run /refine-story on the draft story. Categorize every failing item into one of two categories and handle it accordingly:
Craft issues — mechanical problems fixable without product judgment:
Apply craft fixes directly to the story. Record each fix in the ## Change Summary section (one bullet per change with rationale). If no craft fixes were needed, omit the Change Summary.
Product concerns — substantive questions requiring user judgment:
Collect product concerns for presentation to the user AFTER the story output. Do not attempt to resolve product concerns by modifying the story or escalating to another agent.
For sprint-ready stories, the markdown body MUST follow this exact section order with ## headings:
## User Story## Acceptance Criteria## Technical Notes## Definition of Done (optional — only when story-specific DoD items exist beyond the project standard)## Change Summary (optional — present only when Step 7 peer review resulted in revisions; one bullet per change with rationale)Additional rules:
**Label**: value as a bullet — no prose paragraphs, no heading variations.dependencies, Files likely affected): omit entirely if empty. Never include blank bullets, "None", or placeholder text.For backlog stories, see the Backlog-Tier Output section below — only ## User Story is required.
Example:
## User Story
As an **online customer**,
I want to receive an email notification when my order is approved,
so that I know my order is being processed without needing to check the website.
## Acceptance Criteria
- [ ] Given an order is approved, when the approval is saved, then an email is sent within 60 seconds
- [ ] Given the customer has no email on file, then no email is sent and a warning is logged
- [ ] Given the email service is unavailable, then the send is retried up to 3 times
- [ ] Email contains: order number, items ordered, estimated delivery date
## Technical Notes
- **Dependencies**: Requires the order approval event from the order workflow service
- **Constraints**: Email must be sent asynchronously; must comply with CAN-SPAM
- **Recommended model**: sonnet — multi-step async flow with cross-service integration warrants the workhorse model
Present this section AFTER the complete story output when Step 7 identified product concerns. This section is NOT part of the story artifact — it is not included in the story body.
For each product concern:
End with: "For interactive coaching on any of these concerns, consult agile-coach."
Omit this section entirely when no product concerns were identified in Step 7.
Use this format when readiness is backlog — the story has hard blockers on unstarted work and full specification would be premature.
Skip: acceptance criteria, technical notes, model recommendation, INVEST validation.
Example:
## User Story
As an **integration partner**,
I want to receive webhook notifications when billing events occur,
so that I can keep my systems in sync without polling.
**Scope:** Covers webhook registration, delivery with retries, and a delivery log. Does not cover webhook signature verification (separate story).
**Why backlog:** The billing event pipeline (parent epic) has not started; detailed AC will be specified when this story is pulled into a sprint.