with one click
workflow-refine
Discover and refine requirements through guided conversation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Discover and refine requirements through guided conversation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Backlog-scale orchestration on top of /workflow — drives PM items through refine → plan → implement → review → local-merge via role-specialized sub-agents dispatched in parallel waves, each item isolated in its own git worktree. Bare /swarm summarizes state; /swarm <goal> runs the orchestrator; /swarm:setup sets up the charter and .agent-tools/ umbrella; /swarm:continue resumes a paused run.
Capture durable knowledge from any engineering work — debugging solutions, refactors, features, design decisions, reusable patterns — and maintain memory quality so each unit of work compounds the next
Principal workflow entry — resolve portfolio mode (swarm resume/handoff or unit state machine), drive work without inventing path; hard-stop when path is not established
Initialize and maintain planning root (.agent-tools/planning preferred), conventions (tracks, gates, integration), runs ledger scaffold, and shared memory under .agent-tools/memory/ (AGENTS.md memory-link) for the workflow family.
Parent skill for the workflow family — principal session entry is /workflow:continue (also bare /workflow). Horizon mapping, brainstorm, refine, plan, execute, review, audit, compound. Vertical-slice and deliverable-partition modes.
Detect gaps in the canonical skill corpus, propose targeted improvements, validate changes, and present for review. Inventories src/** skill trees; optional run-ledger seeds for process IP gaps.
| name | workflow:refine |
| description | Discover and refine requirements through guided conversation |
| argument-hint | [optional: initial feature idea or problem description] |
| user-invocable | true |
Transform ideas into clear requirements through guided conversation.
$ARGUMENTS
Parse input to determine discovery mode:
| Input Pattern | Interpretation |
|---|---|
| Empty | Prompt for initial description |
./planning/<project>/brainstorm.md | Start from a brainstorm seed concept (see /workflow:brainstorm) |
./planning/<project>/requirements.md | Refine existing requirements (file mode) |
continue | Resume in-progress refinement |
LIN-[0-9]+ or [A-Z]+-[0-9]+ | Refine existing PM issue (PM mode) |
| PM issue URL | Refine existing PM issue (PM mode) |
| Text | Start discovery with initial context |
If input is empty, ask: "What feature or problem would you like to explore? Describe the idea, user need, or problem you're trying to solve."
If path to existing requirements.md, load and review for refinement.
If a brainstorm.md exists for the project (or is passed explicitly), use its Seed Concept and
Open Questions for Refinement as the starting context for Phase 1 — the fuzzy framing is already
done, so begin discovery from the chosen direction rather than from scratch.
Altitude (light): if the request is clearly a multi-unit unordered program (several
independently claimable workstreams, no map), offer /workflow:roadmap once and wait — do not
hard-block refine if the user wants requirements for a single named unit anyway.
If continue, check for ./planning/*/requirements.md with Status: Draft (file mode) or in-progress PM issues
(PM mode) and resume.
If issue key or PM URL, fetch issue details using the Issue Retrieval Strategy from @workflow (PM integration). Use the existing issue content as starting context for refinement.
When conducting problem discovery, use the AskUserQuestion tool, if available, to guide the user through the
information gathering process. If such a tool is not available, ask the user questions one at a time, or in small groups
of questions that are interrelated, waiting for their answer after each question before proceeding. Ask followup
questions when necessary.
Determine whether this refinement uses file mode or PM mode. Follow the detection logic from @workflow
(planning/pm-integration.md):
.claude/settings.json for PM system indicators. If found and
invocation is ambiguous (empty or text input), default to PM mode.State the determination to the user and allow course correction:
"I'll use [PM mode / file mode] for this refinement. [Reason]. Say 'use [other] mode' if you'd prefer."
Refinement output shape depends on decomposition mode (selection criteria in @workflow; full doctrine in @workflow (references/decomposition-modes.md)):
State the determination to the user and allow course correction:
"I'll use [vertical-slice / deliverable-partition] mode for this refinement. [Reason]. Say 'use [other] mode' if you'd prefer."
In deliverable-partition mode, skip Phase 3 (User Stories) and run Phase 3-D (Deliverable Breakdown) instead. All other phases apply identically.
Ask clarifying questions to understand:
Synthesize a clear problem statement. Load templates/problem-statement.md for the shell.
Confirm with user: "Does this capture the core problem?"
Discuss: ideal unconstrained solution; MVP; similar solutions/patterns; constraints (tech, time, org).
Load templates/proposed-solution.md for the shell (approach, why, alternatives).
Confirm: "Does this approach feel right for solving the problem?"
Before finalizing, scan the project's decision records (docs/decisions/, README ## Decisions, or
planning/conventions.md mapping). If this changes an existing decision, plan to rewrite that
record at close — not add a competing one — and surface the conflict now. Capture rationale +
rejected alternatives. See @workflow (references/decision-records.md).
For each distinct user need, create a user story:
Group into Core (must have) vs Supporting (nice to have). Ask about other user types and the most important story.
Replace Phase 3. Output: deliverable list + AC traceability matrix.
List discrete artifacts (not layers). Ask what the epic produces, bundling, dependency order.
Every parent AC owned by exactly one deliverable. Load templates/ac-traceability.md for the matrix shell.
Confirm coverage and unambiguous ownership.
For each deliverable: name + scope; inherited parent ACs verbatim; tasks; blocks /
blocked_by / parallelizable_with; per-deliverable DoD per @workflow
(execution/quality-checkpoints.md). Full deliverable-partition template: @workflow
(planning/templates.md).
Ask about deferred ACs needing tracking issues.
When refinement produces more than one item, capture for each:
| Field | Meaning |
|---|---|
blocks | Items that cannot start until this item completes |
blocked_by | Items that must complete before this item can start |
parallelizable_with | Peers safe to run concurrently (no shared files / ordering) |
blocks / blocked_by are inverses — record both consistently. Skip for single-item refinement.
Where written: file mode → Dependencies block in requirements.md; PM mode → native
blocks/blocked-by relations; parallelizable_with as note/label.
Separate Must-Have / Nice-to-Have / Out of Scope with brief why. Ask: "If we could only ship one thing?" and "What can we explicitly defer?"
Before finalizing: is there one addition/removal/reframe that disproportionately increases value vs effort? If yes, present What / Why / Trade-off and ask. If nothing, proceed silently.
Gate: only when cost of being wrong is high and requirements contested/circled. Skip routine work.
When gated: advisor sub-agents — First-Principles, Contrarian, Outsider — then Critic Pass Blind-Spot
(@workflow references/critic-pass.md). Fold survivors into must-haves / open questions; user decides
high-impact reframes.
Define measurable Functional / Quality / Business outcomes (checkbox-ready). Ask how we know it works and what success vs "done" means.
Document unknowns (stakeholder, technical, later decisions) as checkboxes. Ask what still must be answered before/during implementation.
basename $(git rev-parse --show-toplevel 2>/dev/null || pwd)
Or ask user if unclear.
mkdir -p ./planning/<project>/
Created in both modes for later plan/session-state.
Only in file mode. Write ./planning/<project>/requirements.md using
templates/requirements.md (load that file; fill from phases above).
Only in PM mode. Update or create the PM issue — no requirements.md.
MCP calls and field mappings: @workflow (planning/pm-integration.md).
Description structure: same reference (Issue Update section).
Multi-item dependencies → native relations + parallelizable_with note/label.
Skip entirely in PM mode. After saving requirements.md, optionally offer tracking-issue
creation. Load references/pm-file-mode-offer.md for the offer UI and example createIssue
shapes (prefer @workflow planning/pm-integration.md for authoritative field mappings).
Present summary using templates/completion-file.md (file mode) or
templates/completion-pm.md (PM mode).