craft-analyze
Post-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
You are running a rule pass: mining accumulated fix records in `.craft/fixes/` for patterns worth graduating into `.claude/rules/`. This file is the single source of truth for the procedure - reflect points here; nothing inlines it.
> /plugin marketplace add drobins25/craft > /plugin install craft@craft
How it fires
How this command gets triggered: by you, by Claude, or both.
/rule-passContext preview
What this command does when you run it.
You are running a rule pass: mining accumulated fix records in `.craft/fixes/` for patterns worth graduating into `.claude/rules/`. This file is the single source of truth for the procedure - reflect points here; nothing inlines it.
You are running a rule pass: mining accumulated fix records in `.craft/fixes/` for patterns worth graduating into `.claude/rules/`. This file is the single source of truth for the procedure - reflect points here; nothing inlines it.
**The design principle is THIN.** All judgment (pattern detection, one-off filtering, knowledge of the live `.claude/rules/` spec) lives inside the `claude-code-guide` agent. Your job is to invoke it, translate its proposals into plain English, take one organic approval reply, write what was approved, and advance the watermark. Do not add clustering, pre-filters, or per-proposal question chains.
**This procedure runs from the main conversation loop, never delegated to a Task subagent.** Subagents cannot spawn other subagents, so a delegated pass could not reach `claude-code-guide`. If you are reading this file as a subagent, stop and report back that the pass must run from the main loop.
THRESHOLD=$(grep -m1 '^rule_pass_threshold:' "${CRAFT_PROJECT_ROOT:-.}/.craft/settings.yaml" 2>/dev/null | sed 's/^rule_pass_threshold:[[:space:]]*//')
THRESHOLD=${THRESHOLD:-10}Invoke `claude-code-guide` (built into Claude Code) via the Agent tool with this prompt - it is the validated prompt from the proven run; adapt paths only:
> Read every `.craft/fixes/*.md` and every `.claude/rules/*.md` in this project. Verify the live `.claude/rules/` frontmatter and `paths:` spec against the official Claude Code docs before proposing any format. Find patterns where 2-3+ fixes point the same causal direction. Ruthlessly reject one-offs (a prior calibration run found ~41% of fix records rule-worthy and ~59% correctly rejected - expect to reject most). For each pattern, propose either UPDATE-existing (preferred - quote the loose part of the current rule and the tightened wording) or NEW (complete spec-correct file content, with `paths:` glob-scoping if the rule is file-type-specific). Cite the supporting fix names for every proposal. Output proposals only - write nothing.
While the agent runs, tell the user what is happening (it reads the whole corpus; expect a couple of minutes).
Translate the agent's proposals before presenting - the agent may be technical in its analysis; the user gets plain English. Number each proposal so the user can reply with numbers. Each proposal gets:
1. A number and a plain-English name, tagged **(update to existing rule)** or **(new rule)** 2. One to two sentences: what kept going wrong, and what the rule would prevent 3. The supporting fix names as evidence
Format:
**Rule pass complete. [N] proposals from [M] fixes:** **1. [Plain-English name] (update to existing rule)** [What went wrong across the cited fixes. What the tightened rule prevents.] *Evidence: [fix-name], [fix-name], [fix-name]* **2. [Plain-English name] (new rule)** [What went wrong. What the rule prevents.] *Evidence: [fix-name], [fix-name]* ... Which should I write? (e.g. "1 and 3", "all", "none", or ask me about any of them)
If the agent rejected everything (zero proposals), say so plainly, note roughly how many records it reviewed, and skip to Step 5 - the pass still completes and the watermark still advances.
**Only write rules the user explicitly named or clearly approved.** "1 and 3", "all", "the first two" are approvals. An ambiguous reply about a proposal ("hmm, the third one is interesting") is NOT approval - ask about that specific proposal instead of guessing. If the user asks to modify a proposal's wording, apply their modification and confirm it landed in the written rule.
This is one organic conversation reply - never a chain of per-proposal AskUserQuestion prompts.
Write each approved rule to the current project's `.claude/rules/`. Updates edit the existing rule file; new rules create a new file with the agent's spec-verified content.
That is the entire write surface. No commit, no gitignore check, no tracking caveat - committing is the user's normal git life.
Print one unambiguous closing statement:
Rule pass receipt: wrote [N] rules ([filenames]), skipped [M], modified [K] per your notes. Watermark advanced.
Then - and only then - advance the watermark by writing today's date:
printf 'last_pass_at: %s\n' "$(date +%Y-%m-%d)" > "${CRAFT_PROJECT_ROOT:-.}/.craft/fixes/.rule-pass-state"**Advance rules:**
The state file is durable - it survives sessions and is only ever written by this step.
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/…