cook-cli
Cook — CLI Workflow
Structured workflow for CLI projects. Every non-trivial task flows through ordered phases.
Plan → Code → Review → Test
Memory Bank — Required for Every Session
At the start of EVERY session, read all files in memory-bank/:
projectbrief.md— Core requirements and goalsproductContext.md— Problem and solution contexttechContext.md— Technical setup and dependenciessystemPatterns.md— Architecture and design patternsactiveContext.md— Current work focus and recent changesprogress.md— Completed work and known issues
If memory-bank/ does not exist, create it with the files above based on what you learn from the codebase.
After completing work (end of Test phase or any stopping point), update:
activeContext.md— What was done, current state, next stepsprogress.md— Mark completed items, add new known issues
This ensures continuity across sessions. Never skip this step.
[PLAN] Plan
- Read requirements. Define the command interface (args, flags, output).
- Identify affected commands, options, and help text.
- Define acceptance criteria including error messages and edge cases.
Output: Numbered plan with command signatures and acceptance criteria. Rule: No code in this phase.
[CODE] Code
- Implement command parsing and validation first.
- Then core logic.
- Then output formatting (stdout for data, stderr for messages).
- Handle errors gracefully — exit codes, helpful error messages.
Rules:
- Match existing command patterns and naming conventions.
- No features beyond scope. No premature abstractions.
[REVIEW] Review
- Interface — Does
--helpreflect the changes? Are flags consistent with existing commands? - Errors — Do invalid inputs produce clear error messages? Proper exit codes?
- Output — Is stdout machine-parseable when
--jsonis used? Is stderr used for human messages? - Types — Are types precise? No
anyleaks?
Fix issues immediately. If a design flaw is found, loop back to Plan.
[TEST] Test
- Unit tests — Test core logic in isolation.
- CLI tests — Test command execution with various args and flags.
- Run the command manually with edge case inputs.
- Run the full test suite and type checker.
Rules:
- Test behavior, not implementation. Test error paths, not just happy paths.
- Never mark done with failing tests.
Iteration
If any phase reveals problems:
- Test failures from a bug → Fix in Code, re-run Review + Test.
- Review reveals missing requirements → Loop back to Plan.
- User feedback changes scope → Restart from Plan.
Always note which phase you're returning to and why.
Phase Markers
Prefix progress with the current phase:
[PLAN] Analyzing requirements...
[CODE] Implementing command logic...
[REVIEW] Self-reviewing changes...
[TEST] Running CLI tests...
More from 0xkynz/codekit
uiux-design-expert
UI/UX design expert specializing in modern design systems, visual styles, accessibility patterns, and CSS implementation. Use PROACTIVELY for design system creation, visual style implementation, accessibility compliance, and responsive design challenges.
15react-native-expo
React Native + Expo development expert for managed workflow, Expo Router, TypeScript, and mobile best practices. Use PROACTIVELY for Expo projects and rapid mobile development.
12data-visualization
Create charts, graphs, and visualizations from data. Use when the user needs to visualize data, create charts, or generate reports with graphics.
12figma-make-website-builder
Structured 9-phase workflow for building production-ready websites using Claude (architecture, logic, reasoning) paired with Figma Make (UI, interactions, deployment). Use when planning, designing, or building a website with Figma Make.
11git-expert
Git workflow expert for merge conflicts, branching strategies, history rewriting, repository recovery, and collaboration patterns. Use PROACTIVELY for complex git issues.
7pdf-processing
Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
7