skills/running-workflows/SKILL.md
Launches workflow engine runs in the background, monitors progress via session files, and reports status. Use when running spec-implementation workflows or any workflow engine invocation.
npx skillsauth add bacchus-labs/wrangler running-workflowsInstall 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.
Standardized way to launch the workflow engine CLI, background it, and monitor progress. Keeps the main conversation available while workflows run.
wrangler-workflow)The engine CLI lives relative to the wrangler plugin root:
# From the project root (dev checkout):
node workflows/engine/dist/cli.js
# Or via the bin wrapper:
bin/wrangler-workflow
If the engine is not built, build it first:
cd workflows/engine && npm run build
node workflows/engine/dist/cli.js run <spec-file> [options]
Options:
--dry-run -- Analyze and plan only, do not execute or publish--resume <session-id> -- Resume a paused workflow from its last checkpointExamples:
# Full run
node workflows/engine/dist/cli.js run .wrangler/specifications/SPEC-000049-feature.md
# Dry run (plan only)
node workflows/engine/dist/cli.js run .wrangler/specifications/SPEC-000049-feature.md --dry-run
# Resume paused workflow
node workflows/engine/dist/cli.js run .wrangler/specifications/SPEC-000049-feature.md --resume wf-2026-02-16-ba6fcb97
Always launch workflows in the background using the Bash tool's run_in_background parameter. Workflows take 5-30 minutes. Do NOT block the conversation.
Bash(command: "node workflows/engine/dist/cli.js run <spec-file>", run_in_background: true, timeout: 600000)
After launching, immediately tell the user:
Use the session_status MCP tool for a structured status report:
session_status({ sessionId: "wf-2026-02-16-ba6fcb97" })
If you omit sessionId, it auto-detects the most recent wf-* session:
session_status({})
The tool returns structured metadata including:
status: running/paused/completed/failedactiveStep: Current step derived from audit log (reliable, not stale context.json)phasesCompleted: Phases finished (derived from audit log)tasksCompleted / tasksPending / totalTasks: Task progressduration: Human-readable elapsed timespecFile, worktreePath, branchName: Session contextblocker: Details if the workflow is pausedcheckpoint: Resume state if availablelastActivity: What happened most recentlyauditEntryCount: Total audit entriesFor terminal use outside of Claude Code, a helper script is available:
bin/check-workflow-status <session-id>
bin/check-workflow-status # auto-detects most recent wf-* session
This outputs a formatted summary including process PID and CPU/memory usage.
If neither tool is available, check session files directly:
Session directory: .wrangler/sessions/<session-id>/
The audit log is the most reliable source of current workflow state. Each line is a JSON object recording a step transition:
{"step":"analyze","status":"started","timestamp":"2026-02-16T21:58:15.127Z"}
{"step":"analyze","status":"completed","timestamp":"2026-02-16T21:59:28.160Z","metadata":{...}}
{"step":"implement","status":"started","timestamp":"2026-02-16T22:03:48.990Z"}
Steps you will see: init, analyze, plan, execute, implement (per-task), review (per-task), fix-issues (if review found problems), verify, publish.
Contains status, tasksCompleted, tasksPending, specFile, worktreePath, branchName. Note: currentPhase and phasesCompleted may be stale -- derive these from audit.jsonl instead.
Present when the workflow paused. Checkpoint contains resume state; blocker contains the reason for pausing.
| Status | Meaning | Action |
|---------------------|---------|--------|
| running | Workflow is actively executing | Wait, check audit log for current step |
| paused | Hit a blocker or loop exhaustion | Read blocker, consider --resume |
| completed | All phases finished successfully | Check worktree for PR |
| failed | Unrecoverable error | Read audit log for error details |
When the user asks for a progress update, call session_status({}) and report:
Example report:
Workflow wf-2026-02-16-ba6fcb97 is running.
Phase: execute (analyze -> plan -> [execute] -> verify -> publish)
Progress: 3/8 tasks completed
Last activity: Implementing task-004 (started 2m ago)
Running for: 12 minutes
The workflow is working in an isolated worktree at .worktrees/feature-name/.
When the workflow finishes (check via TaskOutput or periodic polling):
If completed:
If paused:
--resume <session-id>If failed:
node workflows/engine/dist/cli.js run <spec-file> --resume <session-id>
The engine picks up from the last checkpoint, skipping completed phases and tasks.
The spec-implementation workflow runs these phases in order:
Each phase produces audit entries and updates context.json.
tools
Use when creating technical specifications for features, systems, or architectural designs. Creates comprehensive specification documents using the Wrangler MCP issue management system with proper structure and completeness checks.
testing
Creates and refines agent skills using TDD methodology with pressure testing and rationalization detection. Use when creating new skills, editing existing skills, testing skills with pressure scenarios, or verifying skills work before deployment.
tools
Use when design is complete and you need detailed implementation tasks - creates tracked MCP issues with exact file paths, complete code examples, and verification steps. Optional reference plan file for architecture overview.
development
Validates governance file completeness, format compliance, and metric accuracy. Use when auditing governance health, after bulk changes, or ensuring documentation integrity.