Run prep and implement as Spec Kit workflows
What has been implemented
opsmill-sdd installs three Spec Kit workflows. opsmill-prep and opsmill-implement run each phase as one step, and their files state when a phase is repeated and how often. /speckit.opsmill.prep, /speckit.opsmill.implement and /speckit.opsmill.auto each start their workflow and report its result. This is task 5.2 of the migration plan, with the trial of task 5.1.
Before: how a developer runs prep and implement end to end
The developer opens a Claude Code session and runs /speckit.opsmill.auto. It runs the prep skill, then the implement skill, in that same session.
flowchart LR
D((Developer)) --> S["Claude Code session,<br>opened by the developer"]
S --> A["/speckit.opsmill.auto"]
A --> P["prep skill"]
P --> I["implement skill,<br>same session"]
classDef cmd fill:#ffedd5,stroke:#ea580c,color:#7c2d12
class A,P,I cmd
After: how opsmill-auto runs prep and implement
specify workflow run starts each step as its own claude -p process, and Spec Kit keeps the state of the run. /speckit.opsmill.auto starts this workflow from a Claude Code session.
flowchart LR
R["specify workflow run opsmill-auto<br>-i spec=..."] --> S
subgraph PREP["opsmill-prep: one step per phase, a commit after each"]
S["specify, or correct<br>the spec after drift"] --> PL["plan"]
PL --> C["critique"]
C -->|"RETHINK:<br>3 passes at most"| PL
C -->|"PROCEED"| T["tasks"]
T --> AL["alignment check"]
AL -->|"significant drift:<br>2 corrections at most"| S
end
subgraph IMPL["opsmill-implement: one step per phase"]
PF["check the spec directory<br>and the working tree"] --> CH["one chunk of tasks.md"]
CH -->|"tasks left, and the chunk<br>completed at least one:<br>20 chunks at most"| CH
CH --> RV["review"]
RV --> RP["report"]
end
AL -->|"no significant drift"| PF
C -.->|"limit reached"| X["stop with an error"]
AL -.->|"limit reached"| X
PF -.->|"not ready"| X
RP -.->|"status is not DONE"| X
classDef workflow fill:#dcfce7,stroke:#16a34a,color:#14532d
classDef bad fill:#fee2e2,stroke:#dc2626,color:#7f1d1d
class S,PL,C,T,AL,PF,CH,RV,RP workflow
class X bad
- In
opsmill-prep, specify, plan and tasks run the Spec Kit commands. The critique, the alignment check and the spec correction run three new commands of theopsmillextension. - In
opsmill-implement, each chunk oftasks.mdruns in its own agent process, which replaces the subagents of theimplementcommand. The chunk, the review and the report run three new commands of theopsmillextension. /speckit.opsmill.prep,/speckit.opsmill.implementand/speckit.opsmill.autostart their workflow, tell which phase starts and report the result. The finalSTATUS:lines ofprepandimplementkeep the same format.- Changes in
implement:- It no longer pauses for the user: it ends with
STATUS: BLOCKEDwhen the spec directory is not ready or the working tree has uncommitted changes. - It stops implementing when a chunk completes no task. The review and the report still run.
- A run that does not end with
STATUS: DONEends the workflow with an error. - The review runs
/code-reviewat themediumeffort level when thepr-review-toolkitplugin is not installed.
- It no longer pauses for the user: it ends with
- Both bundles move to 0.1.0, because
opsmill-sddnow pins the workflows. Theopsmillextension moves to 1.5.0, because the six phase commands change its zip.
What workflow_result.py prints after a run
Example, /speckit.opsmill.auto in an interactive session on 2026-11-17 (paths shortened):
run 256093ce | workflow opsmill-auto | completed
phases started: specify x1, plan x1, critique x1, tasks x1, align x1, chunk x6, review x1, report x1
prep.critique -> CRITIQUE_VERDICT: PROCEED | CRITIQUE: extension
prep.alignment -> ALIGNMENT: ALIGNED
implement.report -> STATUS: DONE | SPEC_DIR: <repo>/specs/001-subtract-safe-divide | REVIEW: command | REASON: n/a
coverage: critique full (extension)
coverage: review full (command)
Example with a critique and a review of reduced coverage, from phases played by a script:
coverage: critique REDUCED (fallback): a built-in critique of reduced depth ran; install the critique extension: specify bundle install opsmill-sdd
coverage: review REDUCED (fallback): a built-in review of reduced depth ran; install the review plugin in Claude Code: /plugin install pr-review-toolkit@claude-plugins-official
In that run, /speckit.opsmill.auto started its summary with these two lines.
Trial on a throwaway repo
Runs on 2026-11-17 and 2026-11-18 at the head of #43, with Spec Kit 1.2.4 and the real agent, on a request for subtract and a safe divide:
DONEfor/speckit.opsmill.autoin an interactive session (12 min, no permission prompt) and without a session, and foropsmill-implementalone (6 min).- A plan that the critique rejects is reworked, then accepted.
BLOCKED(uncommitted file) andINCOMPLETE(tests not allowed) both fail the run.- With a reduced critique and review, the summary starts with the
coverage: ⦠REDUCEDlines.
Found in the trials and now in the README: trust the folder or pass the tools in SPECKIT_INTEGRATION_CLAUDE_EXTRA_ARGS, allow 'Bash(rtk:*)' with the rtk hook, and add .specify/workflows/runs/ to the .gitignore. Not tested: the default permission mode of Claude Code.
Tools allowed in the first trial
Allowed: Read, Edit, Write, Glob, Grep, Skill, Task, TodoWrite, Bash(.specify/scripts/bash/*), Bash(bash .specify/*), Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git add:*), Bash(git commit:*), Bash(git rev-parse:*), Bash(git branch:*), Bash(git checkout:*), Bash(git switch:*), Bash(python3:*), Bash(pytest:*), Bash(uv run:*), Bash(ls:*), Bash(mkdir:*), Bash(cat:*)
Denied: Bash(git push:*), WebFetch, WebSearch
Not decided yet: which tool list the repos use, and the security review of that list.
Folders structure
workflows/: the three workflows, newcommands/: six phase commands, new, andprep.md,implement.mdandauto.md, which now start their workflowscripts/python/workflow_result.py: prints the result of a run, with the coverage of the critique and of the review, newbundles/opsmill-sdd/: pins the workflows
How to review
- da3f552 adds the three workflows, pins them in
opsmill-sdd, and documents how to run them and which tools to allow. To review closely. - 327d66a splits
opsmill-prepinto one step per phase and adds the three phase commands. To review closely:workflows/opsmill-prep/workflow.yml. - 324244b makes
/speckit.opsmill.prepstart the workflow. To review closely:commands/prep.md. - 3dfafec splits
opsmill-implementinto one step per phase and adds its three phase commands. To review closely:workflows/opsmill-implement/workflow.yml. - 39a9b2f makes
/speckit.opsmill.implementand/speckit.opsmill.autostart their workflows, and adds the script that reads the result of a run. To review closely:commands/implement.md,commands/auto.md. - ed74d7c makes
workflow_result.pyprint the coverage of the critique and of the review, and makes the three commands start their summary with a line of reduced coverage. To review closely:scripts/python/workflow_result.py.
š¤ Generated with Claude Code