Agent skill
workflow-specification-process
Install this agent skill to your Project
npx add-skill https://github.com/leeovery/agentic-workflows/tree/main/skills/workflow-specification-process
SKILL.md
Specification Process
Act as expert technical architect and specification builder. Collaborate with the user to transform source material into validated, standalone specifications.
Your role is to synthesize reference material, present it for validation, and build a specification that formal planning can execute against.
Purpose in the Workflow
Follows discussion (or investigation for bugfix). Transform prior-phase source material — discussions, research notes, investigation findings — into a specification that's standalone and approved.
What This Skill Needs
- Source material (required) - Prior-phase artifacts to synthesize (discussions, research, investigation findings)
- Topic name (required) - Used for the output filename
If source material seems incomplete or unclear:
Output the next fenced block as a code block:
I have the source material, but {concern}. Should I proceed as-is, or is there
additional material I should review?
STOP. Wait for user response.
Multiple sources: When multiple prior-phase artifacts are provided, extract exhaustively from ALL of them. Content may be scattered across sources — a decision in one discussion may have constraints or details in another. The specification consolidates everything into a single standalone document.
Resuming After Context Refresh
Context refresh (compaction) summarizes the conversation, losing procedural detail. When you detect a context refresh has occurred — the conversation feels abruptly shorter, you lack memory of recent steps, or a summary precedes this message — follow this recovery protocol:
- Re-read this skill file completely. Do not rely on your summary of it. The full process, steps, and rules must be reloaded.
- Read all tracking and state files for the current topic — the specification file, review tracking files, or any working documents this skill creates. These are your source of truth for progress.
- Check git state. Run
git statusandgit log --oneline -10to see recent commits. Commit messages follow a conventional pattern that reveals what was completed. - Announce your position to the user before continuing: what step you believe you're at, what's been completed, and what comes next. Wait for confirmation.
- Check
finding_gate_modevia manifest CLI (node .claude/skills/workflow-manifest/scripts/manifest.cjs get {work_unit}.specification.{topic} finding_gate_mode) — ifauto, the user previously opted in during this session. Preserve this value.
Do not guess at progress or continue from memory. The files on disk and git history are authoritative — your recollection is not.
Hard Rules
- STOP AND WAIT for explicit approval before any write to the specification. Present content, wait for the user to explicitly approve (
y/yesor equivalent), then log. No exceptions. - Log verbatim — when approved, write exactly what was presented. No silent modifications.
- Commit frequently — commit at natural breaks and before any context refresh. Context refresh = lost work.
Output Formatting
When announcing a new step, output ── ── ── ── ── on its own line before the step heading.
Step 0: Resume Detection
Check if .workflows/{work_unit}/specification/{topic}/specification.md exists.
If no file exists
→ Proceed to Step 1.
If file exists
Read the specification status via manifest CLI (node .claude/skills/workflow-manifest/scripts/manifest.cjs get {work_unit}.specification.{topic} status).
Output the next fenced block as a code block:
Found existing specification for {work_unit}.
Output the next fenced block as markdown (not a code block):
· · · · · · · · · · · ·
Continue or restart?
- **`c`/`continue`** — Walk through the specification from its current state. You can review, amend, or navigate at any point.
- **`r`/`restart`** — Delete the specification and all review tracking files. Start fresh.
· · · · · · · · · · · ·
STOP. Wait for user response.
If continue
→ Proceed to Step 3.
If restart
- Delete the specification file and all review tracking files (
review-*-tracking-c*.md) in the specification directory (.workflows/{work_unit}/specification/{topic}/) - Commit:
spec({work_unit}): restart specification
→ Proceed to Step 1.
Step 1: Verify Source Material
Load verify-source-material.md and follow its instructions as written.
→ Proceed to Step 2.
Step 2: Initialize Specification
Load initialize-specification.md and follow its instructions as written.
→ Proceed to Step 3.
Step 3: Session Setup
Load session-setup.md and follow its instructions as written.
→ Proceed to Step 4.
Step 4: Load Specification Principles
Load specification-principles.md and follow its instructions as written.
→ Proceed to Step 5.
Step 5: Spec Construction
Load spec-construction.md and follow its instructions as written.
→ Proceed to Step 6.
Step 6: Document Dependencies
If work_type is not epic
→ Proceed to Step 7.
Otherwise
Load dependencies.md and follow its instructions as written.
→ Proceed to Step 7.
Step 7: Specification Review
Load spec-review.md and follow its instructions as written.
→ Proceed to Step 8.
Step 8: Compliance Self-Check
Load compliance-check.md and follow its instructions as written.
→ Proceed to Step 9.
Step 9: Assess Cross-Cutting & Conclude
Load spec-completion.md and follow its instructions as written.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
update-workflow-explorer
Audit and update workflow-explorer.html flowcharts to match the current codebase logic. Reads all command, skill, and agent source files, compares against the 4 data structures in the HTML file, reports drift, and applies updates. Use when workflow logic has changed and the explorer needs syncing.
create-output-format
Scaffold a new planning output format adapter. Creates a format directory with all required files implementing the output format contract.
continue-feature
workflow-review-entry
workflow-planning-process
workflow-start
Didn't find tool you were looking for?