cook
Feature development with guardrails. Plan → Review → Code → Ship.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Feature development with guardrails. Plan → Review → Code → Ship.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Feature development with guardrails. Plan → Review → Code → Ship.
Run a full, policy-compliant feature development flow with structured review phases
Analyze and prepare prompts with JSON for safe context submission
Interactive menu for managing cook artifacts
| name | cook |
| description | Feature development with guardrails. Plan → Review → Code → Ship. |
| user-invocable | true |
/cook produces ONLY an artifact file. Do NOT implement any code.
cook/*.cook.md)After cooking is complete, user will separately request implementation.
Correct todo list for /cook:
WRONG - do NOT include:
Your VERY FIRST tool call MUST be Write to create the artifact file.
Execute this Write call IMMEDIATELY:
Write(
file_path="cook/<feature-slug>.<YYYY-MM-DD>.cook.md",
content="<full skeleton below>"
)
BLOCKED ACTIONS until artifact exists:
ONLY ALLOWED first action: Write artifact file.
A PreToolUse hook will BLOCK other tools until artifact exists.
# Cooking Result
## Dish
<1-2 sentence description of what we're building>
## Status
raw
## Cooking Mode
well-done
## Current Phase
Step 0.0 - Artifact Created
## Ownership
- Decision Owner: _TBD_
- Reviewers: _TBD_
- Approved by: _TBD_
---
# Phase 0 - Project Policy & Context
## Sources Scanned
| File | Status | Key Rules |
|------|--------|-----------|
| CLAUDE.md | _Pending_ | |
| README.md | _Pending_ | |
| .claude/agents/*.md | _Pending_ | |
## Hard Rules (must not be violated)
_Pending..._
## Preferred Patterns
_Pending..._
## Detected Conflicts
_Pending..._
## Policy Alignment Risk
_Pending..._
---
# Step 0.5 - Kitchen Recon (well-done only)
## Similar Implementations Found
| Pattern | Location | Reusability |
|---------|----------|-------------|
| _Pending..._ | | |
## Integration Points
| System | Connection | Impact |
|--------|------------|--------|
| _Pending..._ | | |
## Risk Areas
| File/Area | Risk Level | Mitigation |
|-----------|------------|------------|
| _Pending..._ | | |
---
# Step 1 - Read the Order
## Feature Summary
_Pending..._
## Affected Modules/Components
| Module | Impact | Risk Level |
|--------|--------|------------|
| | | |
## Dependencies
_Pending..._
## Microwave Blocker Check
_Pending..._
---
# Step 2 - Ingredient Approval (Product Review)
## Product Decision
_Pending: Approved / Rejected / Deferred_
## Scope
### In Scope
- _Pending..._
### Out of Scope
- _Pending..._
### Non-goals
- _Pending..._
## User Value
_Pending..._
## Assumptions
- _Pending..._
---
# Step 3 - Presentation Planning (UX Review)
## UX Decision
_Pending: Required / Not Required_
## User Flow
_Pending..._
## UI Components Affected
| Component | Change Type | Notes |
|-----------|-------------|-------|
| | | |
## Accessibility Considerations
_Pending..._
---
# Step 4 - Implementation Plan
## Architecture Decision
### Selected Approach
_Pending..._
### Alternatives Considered
| Option | Pros | Cons | Decision |
|--------|------|------|----------|
| Option A | | | Rejected: _reason_ |
| Option B | | | **Selected**: _reason_ |
### Trade-offs
- Sacrificing: _what we give up_
- Gaining: _what we get_
## Architecture Diagram
[ASCII diagram here - see engineer_chef for format]
## Patch Plan
### Files to Modify
| File | Change | Risk |
|------|--------|------|
| | | |
### Commit Sequence
1. _commit message_
2. _commit message_
### High-risk Areas
- _area needing extra attention_
---
# Step 5 - QA Review
## Test Plan
### Test Cases
| # | Scenario | Given | When | Then |
|---|----------|-------|------|------|
| 1 | Happy path | | | |
| 2 | Edge case | | | |
| 3 | Error case | | | |
### Edge Cases
- _edge case 1_
- _edge case 2_
### Acceptance Criteria
- [ ] Given _context_, when _action_, then _result_
- [ ] Given _context_, when _action_, then _result_
### Regression Checks
- _existing feature to verify_
---
# Step 6 - Security Review
## Security Status
- Reviewed: _yes/no_
- Risk level: _low/medium/high_
## Security Checklist
| Check | Status | Notes |
|-------|--------|-------|
| Input validation | _Pending_ | |
| Auth/authz | _Pending_ | |
| Data exposure | _Pending_ | |
| Injection vectors | _Pending_ | |
## Issues Found
_Pending..._
---
# Step 7 - Documentation
## Documentation Updates
| File | Change Needed |
|------|---------------|
| | |
## New Documentation Needed
_Pending..._
---
# Risk Management
## Pre-mortem (3 scenarios required)
| # | What Could Go Wrong | Likelihood | Impact | Mitigation |
|---|---------------------|------------|--------|------------|
| 1 | | | | |
| 2 | | | | |
| 3 | | | | |
## Rollback Plan
1. _step 1_
2. _step 2_
## Blast Radius
- Affected users/modules: _list_
- Feature flag: _yes/no (name)_
- Rollout strategy: _immediate/gradual/canary_
---
# Decision Log
| Date | Phase | Decision | Rationale |
|------|-------|----------|-----------|
| <today> | Step 0.0 | Artifact created | Starting cook flow |
DO NOT:
FIRST action = Create artifact file. No exceptions.
Cook features through a structured, multi-phase development flow.
The goal is not speed, but correctness, safety, and product discipline. Every dish must be properly prepared before serving.
feature_description (string, required) Plain-language description of the feature or change (the order).
instruction_file (string, optional) Related specification or requirements file (the recipe).
mode (enum: well-done | microwave, default: well-done) Determines cooking thoroughness and review phases.
dry-run (boolean, default: false) Preview mode - shows what would happen without executing.
validate (string, optional)
Path to existing artifact to validate without re-cooking.
Example: /cook --validate cook/feature.cook.md
no-validate (boolean, default: false) Skip auto-validation after artifact generation.
interactive (boolean, default: false)
Launch interactive menu for artifact management.
Example: /cook --interactive
Use --interactive to launch the artifact management menu:
/cook --interactive
cook/*.cook.md/cook --interactive
|
v
┌─────────────────────────────────────┐
│ Select artifact: │
│ > dry-run-validation.2026-01-10 │
│ user-auth.2026-01-09 │
│ payment-flow.2026-01-08 │
└─────────────────────────────────────┘
|
v
┌─────────────────────────────────────┐
│ Select action: │
│ > Validate │
│ Compare with another artifact │
│ View status summary │
└─────────────────────────────────────┘
|
v
[Executes selected action]
| Action | Description | Command Equivalent |
|---|---|---|
| Validate | Run validation checks | cook-validate <file> |
| Compare | Diff two artifacts | cook-diff <a> <b> |
| Status | Show artifact summary | Quick view of status, mode, owner |
Use --dry-run to preview the cooking process without producing artifacts.
/cook <feature> --dry-run
Checks prerequisites
Shows cooking plan
Validates inputs
# Dry-Run: /cook preview
## Feature
<parsed feature description>
## Mode
well-done | microwave
## Prerequisites Check
- CLAUDE.md: found | NOT FOUND (will use defaults)
- Project chefs: <list> | none (will use system chefs)
- System chefs available: <list>
## Cooking Plan
1. Phase 0 - Project Policy & Context
- Chef: <project or system>
2. Step 1 - Read the Order
3. Step 2 - Ingredient Approval (well-done only)
- Chef: product_chef
4. Step 3 - Presentation Planning (if UI changes)
- Chef: ux_chef
5. Step 4 - Cooking
- Chef: engineer_chef, architect_chef
6. Step 5 - Taste Testing
- Chef: qa_chef
7. Step 6 - Safety Inspection
- Chef: security_chef
8. Step 7 - Recipe Notes (if needed)
- Chef: docs_chef
## Microwave Blockers (if --microwave)
- <blocker topics detected> | none
## Potential Issues
- <early warnings> | none detected
## Ready to Cook
yes | no (reason: <why>)
/cook on a projectFull governance cooking. No shortcuts, no raw ingredients.
Cooking phases:
Blocking allowed: YES
Speed-optimized cooking for low-risk changes.
Cooking phases:
Blocking allowed: YES (security only)
Rules:
Every feature progresses through these stages:
| Status | Meaning |
|---|---|
raw | Feature requested, not yet evaluated |
cooking | /cook in progress, review phases running |
blocked | Specific blocker identified (requires owner + next step) |
needs-more-cooking | Rejected, incomplete, or killed (+ reason field) |
well-done | Approved and ready to implement |
ready-for-merge | Post QA/Security, ready for merge |
plated | Shipped to production |
Note: killed is NOT a separate status. Use needs-more-cooking with reason: killed - <why>
Microwave mode is BLOCKED for these topics. Use --well-done instead:
If microwave mode is requested for a blocked topic, automatically escalate to well-done.
Reference: ~/.claude/templates/well-done-checklist.md
MUST include:
Reference: ~/.claude/templates/microwave-checklist.md
MUST include:
In Step 2 (Ingredient Approval), automatically set status to needs-more-cooking with reason: killed if:
When killed, document the specific reason and stop processing.
BEFORE ANY OTHER ACTION, you MUST create the artifact file with skeleton structure.
DO THIS IMMEDIATELY UPON /cook INVOCATION:
Generate artifact filename: cook/<slug>.<YYYY-MM-DD>.cook.md
<slug> = kebab-case of feature description (max 40 chars)<YYYY-MM-DD> = today's dateCreate file with this skeleton:
# Cooking Result
## Dish
<feature description>
## Status
raw
## Cooking Mode
<well-done | microwave>
## Current Phase
Phase 0 - Starting...
---
## Phase 0 - Project Policy & Context
_Pending..._
## Step 1 - Read the Order
_Pending..._
## Step 2 - Ingredient Approval
_Pending..._
## Step 3 - Presentation Planning
_Pending..._
## Step 4 - Cooking
_Pending..._
## Step 5 - Taste Testing (QA)
_Pending..._
## Step 6 - Safety Inspection (Security)
_Pending..._
## Step 7 - Recipe Notes
_Pending..._
---
## Decision Log
| Date | Phase | Decision | Rationale |
|------|-------|----------|-----------|
CRITICAL: Do NOT proceed to Phase 0 until artifact file is created and confirmed.
This phase runs BEFORE scope, UX, or implementation planning. No code, no design, no solutions are allowed in this phase. Project rules override user intent.
Search for and read the following files (do not fail if missing):
Priority order:
CLAUDE.md - project rules and constraintsPOLICY.md - explicit policiesENGINEERING.md - engineering standardsREADME.md - project overviewdocs/**/*.md - architecture, ADRs, decisions.claude/agents/*.md - project-specific chefsChef Resolution Order:
<project>/.claude/agents/~/.claude/agents/System-Wide Chefs Available:
engineer.md - Head chef (implementation)product.md - Menu curator (scope decisions)designer.md - Presentation specialist (UX/flow)security.md - Health inspector (security audit)qa.md - Taste tester (quality assurance)architect.md - Kitchen designer (architecture)docs.md - Recipe writer (documentation)From discovered files, extract and classify rules into:
A) Hard rules (MUST / MUST NOT)
B) Preferred patterns
C) Explicit non-goals / forbidden approaches
D) Implicit assumptions (derived)
If user request conflicts with extracted rules:
Based on documentation completeness, classify alignment risk:
Produce this section in the cook artifact:
## Phase 0 - Project Policy & Context
### Sources scanned
- <file or "not found">
### Hard rules (must not be violated)
- <rule>
### Preferred patterns
- <pattern>
### Explicit non-goals / forbidden approaches
- <non-goal>
### Assumptions due to missing documentation
- <assumption>
### Detected conflicts with request
- None OR <conflict description>
### Policy alignment risk
- LOW | MEDIUM | HIGH
If ANY of these conditions are true:
Then:
needs-more-cookingThe issue must be acknowledged before continuing.
This Phase 0 output informs ALL subsequent cooking steps.
STOP. Before proceeding to Step 1, you MUST:
_Pending..._ under ## Phase 0 with actual output## Current Phase to Phase 0 - Complete## Status to cookingDO NOT proceed until artifact is updated.
Triggered: Automatically after artifact creation in well-done mode.
Purpose: Deep codebase understanding before planning.
Execution: Launch 2-3 Explore agents IN PARALLEL with different focuses:
Similar Implementations Agent
Integration Points Agent
Risk Areas Agent (optional, for complex features)
## Step 0.5 - Kitchen Recon
### Similar Implementations Found
| Pattern | Location | Reusability |
|---------|----------|-------------|
| | | |
### Integration Points
| System | Connection | Impact |
|--------|------------|--------|
| | | |
### Risk Areas
| File/Area | Risk Level | Mitigation |
|-----------|------------|------------|
| | | |
STOP. Before proceeding to Step 1, you MUST:
## Current Phase to Step 0.5 - CompleteDO NOT proceed until artifact is updated.
Skip condition: If --microwave mode, skip this step entirely.
Status: raw -> cooking
STOP. Before proceeding to Step 2, you MUST:
_Pending..._ under ## Step 1 with actual output## Current Phase to Step 1 - CompleteDO NOT proceed until artifact is updated.
After completing Step 1, check for similar past artifacts to enable pattern reuse.
Run the similarity search using the feature description:
node -e "
const { findSimilarArtifacts } = require('./scripts/lib/similarity');
const results = findSimilarArtifacts({
description: '<FEATURE_DESCRIPTION>',
files: [], // Will be populated from Step 1 affected files if known
limit: 3,
minSimilarity: 20
});
console.log(JSON.stringify(results, null, 2));
"
Or use the search command for keyword-based lookup:
./scripts/cook-stats search "<keyword from feature>"
If similar artifacts exist (>20% similarity), show them to the user:
🔍 Similar dishes found in your kitchen:
┌──────────────────────────────────────────────────────────────┐
│ 1. user-auth.2026-01-05.cook.md (78% similar) │
│ "Add user authentication with OAuth" │
│ Files: src/auth/*, src/session.ts │
│ Key decision: Used JWT with 1h expiry │
├──────────────────────────────────────────────────────────────┤
│ 2. session-refresh.2026-01-12.cook.md (65% similar) │
│ "Implement token refresh flow" │
│ Files: src/session.ts, lib/token.ts │
│ Key decision: Refresh 5min before expiry │
└──────────────────────────────────────────────────────────────┘
💡 Consider reusing patterns from these artifacts.
Similarity is calculated from:
If no artifacts match above 20% similarity, skip this display silently.
If the cook/ directory is empty, this step does nothing.
If similar artifacts are found:
<artifact>?"Note: Similar dishes are informational - they are NOT written to the artifact, but they inform the cooking process.
If rejected -> Status: needs-more-cooking. STOP.
STOP. Before proceeding to Step 3, you MUST:
_Pending..._ under ## Step 2 with actual output (or _Skipped (microwave mode)_)## Current Phase to Step 2 - CompleteDO NOT proceed until artifact is updated.
Triggered if:
Output:
STOP. Before proceeding to Step 4, you MUST:
_Pending..._ under ## Step 3 with actual output (or _Skipped (no UI changes)_)## Current Phase to Step 3 - CompleteDO NOT proceed until artifact is updated.
STOP. Before proceeding to Step 5, you MUST:
_Pending..._ under ## Step 4 with Patch Plan## Current Phase to Step 4 - CompleteDO NOT proceed until artifact is updated.
Blockers must be resolved before proceeding.
If blocked -> Status: needs-more-cooking
STOP. Before proceeding to Step 6, you MUST:
_Pending..._ under ## Step 5 with QA Status## Current Phase to Step 5 - CompleteDO NOT proceed until artifact is updated.
Security blockers override everything.
If blocked -> Status: needs-more-cooking
STOP. Before proceeding to Step 7, you MUST:
_Pending..._ under ## Step 6 with Security Status## Current Phase to Step 6 - CompleteDO NOT proceed until artifact is updated.
Triggered if:
STOP. Before marking cooking complete, you MUST:
_Pending..._ under ## Step 7 with docs updates (or _Skipped (no docs needed)_)## Current Phase to Cooking Complete## Status to well-done or ready-for-mergeArtifact is now complete. Proceed to validation.
Cooking is NOT strictly linear. These rollback rules apply:
+--------------------------------------------------------------+
| ROLLBACK FLOW |
+--------------------------------------------------------------+
| |
| Step 2 (Scope) <-------------------------------------+ |
| | | |
| v | |
| Step 3 (UX) <------------------------------------+ | |
| | | | |
| v | | |
| Step 4 (Implementation) <--------------------+ | | |
| | | | | |
| v | | | |
| Step 5 (QA) --------- blocker ------------->| | | |
| | | | |
| v | | |
| Step 6 (Security) -- blocker ------------------>| | |
| | | | |
| | +-- scope change -------->+ |
| v |
| Step 7 (Docs) |
| |
+--------------------------------------------------------------+
| From | To | Trigger |
|---|---|---|
| Step 5 (QA) | Step 4 (Implementation) | Test failure, missing edge case |
| Step 5 (QA) | Step 2 (Scope) | Scope creep discovered |
| Step 6 (Security) | Step 4 (Implementation) | Security vulnerability found |
| Step 6 (Security) | Step 2 (Scope) | Fundamental design flaw |
| Step 3 (UX) | Step 2 (Scope) | UX requirements change scope |
When rollback occurs:
blocked with owner and next stepTwo formats exist based on cooking mode. Use the appropriate one.
# Cooking Result
## Dish
<short description>
## Status
raw | cooking | blocked | needs-more-cooking | well-done | ready-for-merge | plated
(if killed: needs-more-cooking + reason: killed - <why>)
## Cooking Mode
well-done
## Ownership (REQUIRED)
- Decision Owner: <name/role>
- Reviewers: <list or "auto">
- Approved by: <name> on <date>
## Product Decision
Approved / Rejected / Deferred
- Reason: <why>
## Pre-mortem (REQUIRED - 3 scenarios)
1. <scenario> -> mitigation: <action>
2. <scenario> -> mitigation: <action>
3. <scenario> -> mitigation: <action>
## Trade-offs
- Sacrificing: <perf/UX/maintainability/time>
- Reason: <why>
- Rejected alternatives:
- <alternative 1> - rejected because <reason>
- <alternative 2> - rejected because <reason>
## Patch Plan
- Files to modify:
1. <file> - <what changes>
2. <file> - <what changes>
- Commit sequence:
1. <commit message>
2. <commit message>
- High-risk areas: <list>
- Tests to run: <list>
## QA Status
- Tests: <coverage>
- Edge cases considered: <list>
- Regressions checked: <list>
## Security Status
- Reviewed: yes/no
- Issues found: <list or "none">
- Risk level: low/medium/high
## Blast Radius & Rollout
- Affected users/modules: <list>
- Feature flag: yes/no (name: <flag_name>)
- Rollout strategy: immediate/gradual/canary
- Rollback steps:
1. <step>
2. <step>
## Assumptions & Notes
<list>
## Next Actions
<list>
## Decision Log
| Date | Decision | Rationale |
|------|----------|-----------|
# Cooking Result
## Dish
<short description>
## Status
raw | cooking | blocked | needs-more-cooking | well-done | ready-for-merge | plated
## Cooking Mode
microwave
## Problem Statement
<what's broken + how to reproduce>
## Fix Plan
<minimal fix description>
## Why Safe
<1 sentence explaining why this is low risk>
## Pre-mortem (REQUIRED - 1 scenario)
1. <scenario> -> mitigation: <action>
## Tests
- <test 1: verifies the fix>
- <test 2: regression check> (optional)
## Security Status (only if touches auth/API)
- Reviewed: yes/no
- Issues found: <list or "none">
## Next Actions
<list>
For each cooking phase, use chefs in this priority:
<project>/.claude/agents/<project>-<role>.md~/.claude/agents/<role>.md| Phase | Project Chef | System Chef |
|---|---|---|
| Cooking | *-engineer.md | engineer.md |
| Menu Approval | *-product.md | product.md |
| Presentation | *-designer.md | designer.md |
| Safety | *-security.md | security.md |
| Tasting | *-qa.md | qa.md |
| Kitchen Design | *-architect.md | architect.md |
| Recipe Notes | *-docs.md | docs.md |
While system-wide chefs provide generic best practices, project-specific configuration enables:
Recommendation: Set up CLAUDE.md and project-specific chefs for production cooking.
Cooking results are stored as decision records:
cook/*.cook.mdAfter generating the artifact, automatically run validation:
./scripts/cook-validate cook/<artifact>.cook.md
[cook-validate] Validating artifact...
Validating: user-auth.2026-01-10.cook.md
Mode: well-done
[PASS] Scope sections present
[PASS] Pre-mortem (3 scenarios)
[PASS] Test cases (5 defined)
[PASS] Ownership assigned
Result: VALID
✓ Artifact ready for implementation
Use --no-validate to skip auto-validation:
/cook Add feature X --no-validate
To validate an existing artifact without re-cooking:
/cook --validate cook/existing-artifact.cook.md