packages/knowledge-hub/dataset/.skills/process/refine-story/SKILL.md
Refines a user story from Todo to Refined state through structured phases: selection, requirements analysis (Given-When-Then), technical analysis, sprint readiness, and documentation. Section-level idempotency — detects partial refinement and resumes. Composes /write-issue for PM tool updates.
npx skillsauth add foomakers/pair refine-storyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform a user story from rough breakdown (Todo) into a development-ready specification (Refined). Section-level idempotency: each refinement section is checked before acting — partial refinements resume from the first missing section.
| Skill | Type | Required |
| -------------- | ---------- | ------------------------------------------------------- |
| /write-issue | Capability | Yes — creates or updates the story issue in the PM tool |
| Argument | Required | Description |
| -------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| $story | No | Story identifier (e.g., #42). If omitted, the skill selects the highest-priority Todo story from the backlog. |
Check: Is $story provided?
Skip: If provided, load the story from the PM tool and proceed to Step 1.
Act: If not provided, query the PM tool for stories in Todo state. Apply selection criteria:
Act: Present recommendation and ask developer to confirm:
Recommend refining Story
#[ID]: [Title](Priority: [P0/P1/P2]). Reason: [business value / sprint urgency / unblocks other work]. Proceed?
Verify: Story selected and loaded.
| Section | Detection |
| ------------------------------------- | -------------------------------------------------------------------------- |
| Story Statement | Has **As a** / **I want** / **So that** with non-placeholder content |
| Epic Context | Has **Parent Epic** with actual link |
| Acceptance Criteria (Given-When-Then) | Has **Given** / **When** / **Then** blocks |
| Business Rules | Has non-placeholder business rules |
| Edge Cases | Has non-placeholder edge case handling |
| Technical Analysis | Has ### Implementation Approach or ### Strategy with content |
| Technical Risks | Has risk table with entries |
| Definition of Done | Has DoD checklist with items |
| Story Sizing | Has **Final Story Points** with value |
| Dependencies | Has dependency information |
| Validation Strategy | Has testing approach |
Act: Determine refinement state:
Verify: Refinement state determined. Report:
Refinement state: [N/M sections complete]. [Resuming from: Section X | Full refinement | Already refined — offering update].
Skip if: Acceptance Criteria, Business Rules, and Edge Cases are all present.
Act: Expand the story scope into detailed, testable acceptance criteria:
Act: Present the proposed criteria to the developer for validation:
Proposed acceptance criteria for
#[ID]: [List Given-When-Then scenarios] [Business rules] [Edge cases] Approve or adjust?
Verify: Developer approves. Criteria finalized.
Skip if: Technical Analysis and Technical Risks are present.
Skip if: Story Sizing, Dependencies, and Validation Strategy are present.
/plan-tasks)./write-issue with:
$type: story$content: the assembled refined story body$id: the story identifier (update mode — story already exists)$status: Refined — transitions the project board field from Todo to RefinedReached only when Step 1 detects all sections are present.
Act: Ask the developer which sections to update:
Story
#[ID]is already refined. Which sections need updating?
- Acceptance Criteria
- Technical Analysis
- Sprint Sizing
- All sections
Act: For selected sections, re-execute the corresponding step (2, 3, or 4).
Act: Compose /write-issue with $type: story, $id: [story-id], and updated $content.
Verify: Story updated.
STORY REFINEMENT COMPLETE:
├── Story: [#ID: Title]
├── Status: [Refined | Updated]
├── Sections: [N/N complete]
├── Sizing: [X points — fits sprint: Yes/No]
├── PM Tool: [Issue updated — #ID]
└── Next: /plan-tasks to create task breakdown
$story identifier./write-issue is not installed, warn and provide the formatted story body for manual PM tool update./plan-tasks)./refine-story skill handles the transition from Initial Breakdown template format to Refined template format.development
Creates or updates a Product Requirements Document through structured template analysis, hypothesis-driven information gathering, and iterative review. Idempotent — detects existing PRD and offers selective section update.
development
Reviews a pull request through a structured 6-phase process: validation, technical review, adoption compliance, completeness check, decision, and optional merge with parent cascade. Composes /verify-quality, /verify-done, /record-decision, /assess-debt (required) and /verify-adoption, /assess-stack (optional with graceful degradation). Output follows the code review template. Idempotent — re-invocation resumes from incomplete phases.
testing
Breaks a refined user story into implementation tasks. Task-level idempotency: detects existing tasks and creates only missing ones. Appends condensed Technical Analysis + Task Breakdown (checklist, Dependency Graph, AC Coverage table, detailed tasks) to the story body. Composes /write-issue to update the story issue body. Tasks are documented inline in the story — no separate task issues are created.
testing
Breaks epics into user stories using vertical slicing and INVEST validation. Composes /write-issue with $type: story. Idempotent: detects existing stories, creates only missing ones.