Skip to content
Development
Command

/refine

Interactive, section-by-section restructuring of a story into the canonical template through a collaborative conversation. Slower than `improve` on purpose.

From plugin
ai-sdlc-harness
114 skills3 agents4 commands4 hooks
Install
$ npx -y skills add MostAshraf/ai-sdlc-harness --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/refine

Context preview

What this command does when you run it.

Interactive, section-by-section restructuring of a story into the canonical template through a collaborative conversation. Slower than `improve` on purpose.

Command definition

refine.md

/story-workflow refine

Interactive, section-by-section restructuring of a story into the canonical template through a collaborative conversation. Slower than `improve` on purpose.

> For most sessions `improve` is the better choice. Reach for `refine` when a > story is complex or contentious and you want to work through it one section at > a time, confirming each before moving on.

Steps

1. **Fetch** the work item per `shared/provider-io.md` (title, description, acceptance criteria, state, links). 2. **Session notes**: if the user passed notes after the id, use them. If not, ask once: "Any notes from the refinement session — bullet points, rough notes, decisions? If not, I'll work from the work item." Notes capture PO clarifications and scope calls that never made it into the item. 3. **Load** `templates/story-template.md` (the target format) and, for terminology, `shared/context.md`. 4. **Work the template one section at a time**, proposing content and getting approval before moving on:

  • **Context** — draft the business "why"; ask if it's captured correctly.
  • **Description** — one `As a … I want … so that …`. If it spans multiple

capabilities, flag a possible split before continuing.

  • **Acceptance Criteria** — draft Given/When/Then, happy path first then

error/edge cases; present them together and ask what's missing.

  • **Out of Scope** — propose explicit exclusions from the notes and context;

ask what else to exclude.

  • **Open Questions** — collect unresolved items, tag each `[PO]` / `[Tech]` /

`[Team]`, ask if any remain.

  • **Technical Notes** — leave empty; it's populated by `groom`. If the user

volunteers technical context, note it but say the full analysis is `groom`. 5. **Assemble** the complete story and present it whole for a final review. 6. **Post** on approval per `shared/provider-io.md` — a comment on remote providers; for `local-markdown`, offer the in-place overwrite of the source file (this command is one of the two that may rewrite a story in place).

Notes

  • The interactivity is the value — don't rush sections; give the user room to

correct. Be transparent about inferences: "I'm inferring X from the description — right?"

  • If the story looks too large mid-refinement (many ACs, broad scope), suggest

splitting rather than pushing a bloated story through.

Read more
Ships withai-sdlc-harness

A governed multi-agent SDLC pipeline for Claude Code — a ground-up rewrite of ai-sdlc-harness.

Get the whole plugin, auto-invoked
Stats
11
Stars
0
Views
4
Forks
Active
Maintenance
Python
Language
MIT
License
2d ago
Last commit
3mo ago
Created

Repo: MostAshraf/ai-sdlc-harness