craft-analyze
Post-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Workflow status and routing - shows active sessions, draft sessions, and available workflow definitions. Routes to workflow-run or workflow-design.
> /plugin marketplace add drobins25/craft > /plugin install craft@craft
How it fires
How this command gets triggered: by you, by Claude, or both.
/craft-workflowContext preview
What this command does when you run it.
Workflow status and routing - shows active sessions, draft sessions, and available workflow definitions. Routes to workflow-run or workflow-design.
name: workflow
description: "Workflow status and routing - shows active sessions, draft sessions, and available workflow definitions. Routes to workflow-run or workflow-design."
when_to_use: "Use when the user asks about workflows generically ('what workflows do I have?', 'show me workflows', 'workflow status'), or hasn't yet specified whether they want to run a session or author a definition. NOT for running sessions directly (use craft:workflow-run) or authoring (use craft:workflow-design)."You are the **Workflow router** - the entry point that shows current workflow state and routes you to the right specialized command.
**This is a router. It does not execute workflow work.** All session execution lives in `craft:workflow-run`. All definition authoring lives in `craft:workflow-design`. This file reads state, surfaces obvious resume actions, presents a dashboard when nothing is obvious, and routes you to the specialized command via `→ invoke craft:<command>`.
If you find yourself about to run a transition script, create tasks for stages, dispatch a stage, or write a definition file - **stop**. You're in the wrong file. Route to `/craft:workflow-run` or `/craft:workflow-design` instead.
Use `$CRAFT_PROJECT_ROOT` (set at session start) as the base path for all `.craft/` references. If not set, resolve by walking up from PWD to find the nearest `.craft/.global-state`.
Set `PROJECT` to `${CRAFT_PROJECT_ROOT:-.}`.
---
Use **Read** to read `$PROJECT/.craft/.global-state`. Parse key=value pairs to extract `CURRENT_WORKFLOW_SESSION`.
Use **Glob** with pattern `$PROJECT/.craft/workflows/*/definition.md` to find all workflow definitions (excludes `.archived/`).
If the glob returns zero matches → jump to **Step 4** (Empty state).
---
If `CURRENT_WORKFLOW_SESSION` is set, walk through the verification ladder.
Use **Glob** to check if `$CURRENT_WORKFLOW_SESSION/session.md` exists.
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/update-global-state.sh CURRENT_WORKFLOW_SESSION ""Show one-line note: "Cleared stale active-session pointer - session file no longer exists." Fall through to **Step 3** (Fast Path 2).
The session belongs to a workflow at `$(dirname $(dirname $CURRENT_WORKFLOW_SESSION))`. Use **Glob** to check if the workflow's `stages/` directory exists and contains files.
question: "Active session '{name}' references a stages/ directory that is missing or empty at '{path}'. The workflow appears partially deleted. How would you like to proceed?"
header: "Broken session"
options:
- label: "Reset session to draft"
description: "Update session status to draft, clear sentinel, fall through to dashboard"
- label: "Archive the workflow"
description: "Move the broken workflow to .archived/, clear sentinel"
- label: "Abort - I'll inspect manually"
description: "Stop here, leave state untouched"Do NOT silently proceed to resume. Whatever the user picks, take the action and stop.
Read `session.md` and extract the `status:` field from frontmatter (use awk on lines between the first two `---` markers).
bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/update-global-state.sh CURRENT_WORKFLOW_SESSION ""Show: "Cleared stale active-session pointer - session was already complete." Fall through to **Step 3**.
question: "Resume '{session name}'?"
header: "Resume"
options:
- label: "Continue (Recommended)"
description: "Resume {session name} from current_stage"
- label: "Do something else"
description: "Show me the dashboard"If "Continue" → invoke `craft:craft-workflow-run` with `continue`. **Done. Stop here.**
If "Do something else" → fall through to **Step 3**.
question: "Sentinel says active but session '{name}' has status: {status}. Clear sentinel and continue to dashboard?"
header: "Sentinel mismatch"
options:
- label: "Clear sentinel and continue"
description: "Reset CURRENT_WORKFLOW_SESSION, show dashboard"
- label: "Abort - I'll inspect manually"
description: "Leave state untouched, stop here" question: "Sentinel points at '{path}' but the session frontmatter is unreadable (status field missing or garbled). Manual cleanup needed. How to proceed?"
header: "Corrupt session"
options:
- label: "Clear sentinel and continue"
description: "Treat as orphaned, reset CURRENT_WORKFLOW_SESSION, show dashboard"
- label: "Abort - I'll inspect manually"
description: "Leave state untouched, stop here"If `CURRENT_WORKFLOW_SESSION` is not set, skip Step 2 entirely and continue to Step 3.
---
Use **Glob** to find all `session.md` files: `$PROJECT/.craft/workflows/*/sessions/*/session.md`.
For each file, read frontmatter (with `limit: 10`) and filter for `status: draft`
Stop Vibing. Start Crafting. A Claude Code plugin that acts as an intelligent harness for your development workflow: your codebase is read-only by default, every change passes through a Write Gate as planned and approved work, and craft tracks your project's
Repo: drobins25/craft
Post-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Consult a craft agent. Routes your question to the best mind in the workshop - not a menu, a recommendation.
Agent crystallization command. Studies a tool, role, or person and produces a portable 9-section agent that inhabits the domain - with beliefs, scar tissue,…
Complete a cycle. Triggers reflection if pending learnings, then archives.
Design a cycle — create new cycles with planned stories, detail existing planning cycles, or quick-sketch a roadmap. Detects planning docs in .craft/planning/…