/craft:lock-decisionfrom craft
Formalizes approved decisions into locked standards (patterns, tokens, approaches) that the system enforces. Triggered by phrases like 'lock it' or 'approved'.
Ships in craft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are the commitment mechanism of the Craft harness. When something is approved, you make it official — turning decisions into standards that the entire system respects.
The orchestrator may pass enriched args. Parse labeled fields if present:
DECISION_TYPE: design/pattern/token/approach — routes to correct lock templateDECISION_SCOPE: project-wide or story-scoped — determines where to writeFallback: Most lock context comes from conversation. Args are supplementary.
Before locking, verify:
## Locking Decision
**Decision:** [Clear statement of what's being locked]
**Context:** [Why this decision was made]
**Applies to:** [Where this standard will be enforced]
Is this correct? Once locked, this becomes a project standard.
Depending on what's being locked:
locked.md## [Pattern Name]
**Locked:** [Date]
**Context:** [Why this was approved]
### Specification
[Detailed description of the pattern]
### Implementation
```tsx
// Example code showing correct implementation
#### Design Token → `tokens.yaml`
**When locking colors, typography, or spacing values, update `.craft/design/tokens.yaml`:**
When the file already exists, update it with targeted Edits on the specific keys - never a whole-file Write (the write-permission hook denies Write on an existing tokens.yaml; unnamed keys and their provenance comments must survive).
```yaml
colors:
primary: "#6366F1" # Locked: [Date] - [Context]
surface: "#FAFAFA"
typography:
font-sans: "Inter, -apple-system, sans-serif"
spacing:
base: 8 # Locked: [Date]
This file is the source of truth. The implementer agent reads this when writing styles. Quality gates validate against it.
project.md## Technical Decision: [Title]
**Locked:** [Date]
**Decision:** [What was decided]
**Rationale:** [Why this approach]
**Alternatives Considered:** [What we didn't choose and why]
After writing the lock, output a brief confirmation and return silently to the caller:
Locked: [Summary] → [File updated]
Do NOT output a large markdown block or ask "Ready to continue?" — the caller (story-new, creative-spark, etc.) owns the next step. Terminal text kills command chains.
Four lock types: Design Decisions (typed UI decisions with valid keys per type), Pattern Locks (UI patterns with spec, states, variants, usage rules), Token Locks (design values in tokens.yaml), and Approach Locks (technical decisions with rationale and implementation standard).
Lock templates: Read
${CLAUDE_PLUGIN_ROOT}/skills/lock-decision/references/lock-templates.mdfor detailed templates and examples for each lock type (design decisions with valid key tables, pattern locks, token locks, approach locks).
Locked decisions are enforced via:
Locks can only be unlocked by explicit user request:
## Unlock Request
**Pattern:** [What's being unlocked]
**Reason:** [Why the lock should be removed]
**Proposed Change:** [What will replace it]
⚠️ This will remove enforcement. Are you sure?
Options:
1. Unlock and replace with new standard
2. Unlock temporarily for this story only
3. Keep locked, find another approach
The adhoc tweak flow (skills/adhoc/references/tweak.md) may alter or remove a lock inline when a tweak conflicts with it - on the user's explicit yes, at one of two moments (the pre-edit conflict branch or the acceptance reconcile), WITHOUT this skill's unlock ceremony. Same discipline (explicit yes only, locked.md's existing format), lighter surface: a tweak thread gets one clean yes, never a ceremony AUQ, and a lock gets at most one write moment per thread. See tweak.md's "inline lock-edit path" for the rules.
Your goal: Turn "yes" into "always" — making decisions stick.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub drobins25/craft --plugin craft11 skills in this plugin
/adhocAdhoc workflow for small targeted changes to existing behavior or appearance, without the full story ceremony. Use when the orchestrator encounters a bug with a clear root cause and surgical solution, OR a small enhancement to something already built (a different icon, wording, spacing, color). Triggers on: 'fix this', 'this is broken', 'the alignment is off', 'that button doesn't work', 'quick fix', 'patch this', 'tweak this', 'change the icon', 'adjust the wording', post-story corrections, or any situation where the write gate blocks a small targeted change. Acts NOW - a defect to file and fix later belongs in /craft:bugs, other deferred work in the notebook. Do NOT use for new features, design exploration, or changes requiring creative spark./approveRequest write permission from the user before making file changes. MUST be invoked before any write attempt when the write gate is closed. Creates scoped approval via AskUserQuestion and a printed approval line, opens the write gate, and closes it when work is done. Triggers: write hook blocks an edit, agent is about to write files outside .craft/, agent needs to modify project source files. This skill requires user approval 100% of the time - never bypass AskUserQuestion./browserInteractive browser automation via playwright-cli. Use when you need to navigate a site, click elements, fill forms, take snapshots, or triage a live app.Other plugins' skills for the same job