craft-analyze
CommandPost-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Implement a story through the Implement Phase. Stories must be fully designed with chunks before implementation.
> /plugin marketplace add drobins25/craft> /plugin install craft@craft
name: story-implement description: "Implement a story through the Implement Phase. Stories must be fully designed with chunks before implementation." argument-hint: "[story-name]"
⛔ **CRITICAL: YOU ARE THE ORCHESTRATOR, NOT THE IMPLEMENTER**
You must NOT write implementation code directly. For EVERY chunk, you MUST use the Task tool to invoke the implementer agent:
Task tool: subagent_type: "craft:implementer" description: "Implement chunk N of [story]" prompt: [chunk details, story context, TDD requirement]
If you find yourself about to write code → STOP → use Task tool instead.
---
⛔ **CRITICAL: VALIDATION CHAIN IS INLINE**
Do NOT invoke the validate-chunk skill (`craft:validate-chunk`) during the implementation loop. The validate-chunk skill exists for manual user invocation only. story-implement owns the validation chain directly:
---
⛔ **CRITICAL: ALL VALIDATION RUNS SYNCHRONOUSLY**
**NEVER** use `run_in_background: true` for test, typecheck, lint, or build commands. All validation must complete synchronously — results confirmed before marking any chunk or story done. This applies to:
Background test runs cause orphaned failure notifications that appear after stories are already marked complete. If a command is slow, wait for it.
---
Implement a story that's already been designed. This is pure Implement Phase — chunks exist, decisions are locked, just execute.
All `.craft/` paths in this command are relative to `$CRAFT_PROJECT_ROOT` (set at session start). Use `${CRAFT_PROJECT_ROOT:-.}` as prefix when constructing paths. Pass the project root to all subagents.
Before implementation, **validate story location and status**:
**Location check:**
Use **AskUserQuestion**:
question: "This story is in the backlog. Assign it to a cycle first?"
header: "Assign"
options:
- label: "Assign to [active cycle] (Recommended)"
description: "Add to current cycle and implement"
- label: "Create new cycle for it"
description: "Start a new cycle with this story"
- label: "Cancel"
description: "Go back"If no `ACTIVE_CYCLE` exists: omit the "Assign to [active cycle]" option. Only show "Create new cycle" and "Cancel".
**If user selects "Assign to [active cycle]":** → invoke `craft:craft-cycle-assign` with the story path. After assignment completes, return to story-implement for the same story.
**If user selects "Create new cycle for it":** → invoke `craft:craft-cycle-design` with the story as context. After cycle creation completes, invoke `craft:craft-cycle-start` to activate the new cycle, then return to story-implement for the same story.
**If user selects "Cancel":** → end, do not proceed
**Cycle check:**
→ BLOCK: Do NOT proceed. Do NOT attempt to manually activate the cycle by editing state files. → Route to `craft:cycle-start` to properly activate the cycle first.
Use **AskUserQuestion**:
question: "This story is in cycle '[cycle-name]' which isn't the active cycle. Activate it first?"
header: "Cycle"
options:
- label: "Activate [cycle-name] (Recommended)"
description: "Use craft:cycle-start to properly activate this cycle"
- label: "Pick a story from the active cycle"
description: "Choose a story from [ACTIVE_CYCLE] instead"
- label: "Cancel"
description: "Go back"⛔ **NEVER manually edit `.global-state` or `.state` files to activate a cycle.** Always use `craft:cycle-start` which runs the proper transition scripts (`start-cycle.sh`), updates cycle.yaml status, and handles the active cycle switch cleanly.
If user selects "Activate": invoke `craft:cycle-start` with the cycle name. After activation completes, return to story-implement for the original story.
If user selects "Pick a story from the active cycle": → invoke `craft:craft-story-implement` with no args (triggers Step 1 story picker filtered to active cycle)
If user selects "Cancel": → end, do not proceed
**Go re-check:**
**Stage check:**
**Status check:**
| Status | Action | |--------|--------| | `ready` | OK: Proceed to implementation | | `active` | OK: Resume from current chunk | | `complete` | BLOCK: "Story already complete. Pick another?" |
**Also check story has:**
**If story is missing chunks:** Use **AskUserQuestion**:
question: "This story doesn't have chunks planned. How do you want to proceed?"
header: "Plan"
options:
- label: "Design it now (Creative Phase)"
description: "Explore options, then plan chunPost-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Point at anything in a live browser tab - every pin gets a live attempt on the page the moment you SEND it, and the session keeps…
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 -…
File a bug without fixing it, from a person mid-conversation or an agent mid-run. One door, a complete record on disk, nobody…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.