craft-analyze
CommandPost-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
**Before reading further, print this status line so the user sees a progress signal during the upcoming reasoning pass:**
> /plugin marketplace add drobins25/craft> /plugin install craft@craft
**Before reading further, print this status line so the user sees a progress signal during the upcoming reasoning pass:**
> *Working through the alignment loop - investigating where this story fits in the codebase, can take 30-90 seconds...*
You are running the codebase alignment check for a story. This is the engineer-to-product-manager handshake - you spawn an Explore agent to investigate the codebase where this work will land, and surface every product question that only the user can answer.
**95% alignment means: "I have asked the user every question the codebase raised that only they can answer."**
It is NOT about:
It IS about:
**The gate is not "do I feel confident?" It's "do I have zero unasked product questions?"**
Product questions go to the user. Engineering questions you solve yourself. The gate measures whether the user's intent is fully captured - not whether you know how to build it.
Before starting, you need: 1. The story file path (to read the spark, decisions, scope) 2. The story's `## Likely Files` section (if it exists - gives a starting point for investigation) 3. Any decisions captured so far
Read the spark. If the story's work depends on something outside the project whose behavior nobody here has checked (a site, a person, a tool's output, a data source, a format), grep the project, `.craft/research/` and the story's Reference Materials for it. If they hold nothing, settle it; if a research folder already answers it, cite it onto the story instead of researching again. No such thing named, or it is already held: print nothing and go on to Step 0.
Before spawning the Explore agent, check whether the codebase has any source files. An empty codebase has zero adjacencies to find — running Explore would burn time and tokens to confirm there's nothing to find.
**Check (rough):** Look for any files outside `.craft/`, `.claude/`, `node_modules/`, `.git/`, and root-level dotfiles. Bash one-liner option:
find . -type f \ -not -path './.craft/*' \ -not -path './.claude/*' \ -not -path './node_modules/*' \ -not -path './.git/*' \ -not -name '.*' \ | head -1
If the result is empty: **skip Step 1 entirely.** There's no codebase to investigate.
**Where product questions come from on an empty codebase:**
Read the story's `## Notes` section (populated during cycle-design Phase 2a's brainstorm). Open questions raised during the brainstorm — naming choices, scope questions, data shape decisions — are the natural source of product questions for greenfield work.
After harvesting questions from the Notes section, **skip ahead to Step 3 (Surface Gaps on Question Cards)** to surface them to the user.
If the codebase has any source files: continue to Step 0.5 as normal.
Before spawning the Explore agent, check whether this story was created from a planning concept or carries approved decision records or research. If so, build a Planning Context block from the story's Reference Materials, and hand decision records to the agent as paths (see 4a - they never enter the block or its token cap), so the agent doesn't surface false-positive product questions for decisions already captured in planning.
**Detection:** Read the story frontmatter. If `source_concept:` is populated OR the story's `decisions:` list is non-empty OR its `## Reference Materials` holds at least one citation entry (a `- ` line; the template's comment alone does not count), continue with the injection below. Otherwise, skip directly to Step 1 with the existing prompt unchanged.
**Build the Planning Context block (orchestrator-level work, NOT delegated to the Explore agent):**
1. Read the story's `## Reference Materials` section.
2. Parse each citation: extract the file path + anchor(s). Citations may have multiple anchors per file (multi-anchor format - see plan-chunks-agent.md section 1.3.5 for the contract).
3. For each cited file + anchor, use **Read** with the anchor to extract the exc
Post-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.