recipe-review
Design Doc compliance and security validation with optional auto-fixes
What this skill does
**Context**: Post-implementation quality assurance ## Orchestrator Definition **Core Identity**: "I am an orchestrator." **First Action**: Register Steps 1-11 using TaskCreate before any execution. ## Execution Method - Compliance validation → performed by code-reviewer - Security validation → performed by security-reviewer - **Code-side fix path**: Fix implementation → task-executor; Quality checks → quality-fixer; Re-validation → code-reviewer / security-reviewer - **Design-side update path**: DD revision → technical-designer (update mode); DD review → document-reviewer; cross-DD consistency → design-sync (when multiple DDs exist); Re-validation → code-reviewer Orchestrator invokes sub-agents and passes structured JSON between them. The design-side path applies when the discrepancy reflects code that was correct but the Design Doc became stale, rather than code that violated the Design Doc. Design Doc (uses most recent if omitted): $ARGUMENTS ## Execution Flow ### Step 1: Prerequisite Check ```bash # Identify Design Doc ls docs/design/*.md | grep -v template | tail -1 # Check implementation files git diff --name-only main...HEAD ``` ### Step 2: Execute code-reviewer Invoke code-reviewer using Agent tool: - `subagent_type`: "dev-workflows:code-reviewer" - `description`: "Code compliance review" - `prompt`: "Design Doc: [path]. Implementation files: [git diff file list]. Review mode: full. Validate Design Doc compliance and return structured JSON report." **Store output as**: `$STEP_2_OUTPUT` ### Step 3: Execute security-reviewer Invoke security-reviewer using Agent tool: - `subagent_type`: "dev-workflows:security-reviewer" - `description`: "Security review" - `prompt`: "Design Doc: [path]. Implementation files: [git diff file list]. Review security compliance." **Store output as**: `$STEP_3_OUTPUT` ### Step 4: Verdict and Response **If security-reviewer returned `blocked`**: Stop immediately. Report the blocked finding and escalate to user. Do not proceed to fix steps. **Code compliance criteria (considering project stage)**: - Prototype: Pass at 70%+ - Production: 90%+ recommended **Security criteria**: - `approved` or `approved_with_notes` → Pass - `needs_revision` → Fail **Report both results independently using subagent output fields only**: Before presenting to the user, the orchestrator computes a recommended route per finding using the rule below (this rule is internal — do not include it in the user-facing prompt): | Finding pattern | Recommended route | |-----------------|-------------------| | `dd_violation` where the code intent matches the original requirement but the Design Doc captured a different design | `d` (Design-side update) | | `dd_violation` where the code drifted from a still-correct Design Doc | `c` (Code-side fix) | | `reliability` / `security` / `maintainability` findings | `c` (Code-side fix) | Then present to the user (label each finding with its recommended route, grouped by route): ``` Code Compliance: [complianceRate from code-reviewer] Verdict: [verdict from code-reviewer] Identifier Match Rate: [identifierMatchRate from code-reviewer] Acceptance Criteria: - [fulfilled] [item] (confidence: [high/medium/low]) - [partially_fulfilled] [item]: [gap] — [suggestion] [recommended: c | d] - [unfulfilled] [item]: [gap] — [suggestion] [recommended: c | d] Identifier Mismatches: - [identifier]: DD=[designDocValue] Code=[codeValue] at [location] [recommended: c | d] Quality Findings: - [category] [location]: [description] — [rationale] [recommended: c] Security Review: [status from security-reviewer] Findings by category: - [confirmed_risk] [location]: [description] — [rationale] [recommended: c] - [defense_gap] [location]: [description] — [rationale] [recommended: c] - [hardening] [location]: [description] — [rationale] [recommended: c] - [policy] [location]: [description] — [rationale] [recommended: c] Notes: [notes from security-reviewer, if present] Resolve discrepancies — confirm or override the recommended route per finding: c) Code-side fix — code violates Design Doc; modify code to match d) Design-side update — code is correct; Design Doc is stale, revise it s) Skip — accept current state without changes ``` Use AskUserQuestion. The default offer is **"accept all recommended routes"** — a single confirmation for the typical case where the orchestrator's recommendations are correct. When the user wants to override, collect per-finding c/d/s decisions instead. If the user selects `s` for everything: skip Steps 5-10, proceed to Step 11. ### Step 5: Execute Skill Execute Skill: documentation-criteria (for task file template) ### Step 5d: Design-Side Update Run this step only when the user routed at least one finding to `d`. When all routes are `c` or `s`, skip directly to Step 6. 1. Invoke technical-designer in update mode using Agent tool: - `subagent_type`: "dev-workflows:technical-designer" - `description`: "Design Doc update from review findings" - `prompt`: "Update Design Doc at [path] in update mode. The implementation has diverged in the following ways that the team has decided to ratify in the design rather than in the code: [list of `d`-routed findings with codeLocation and designDocValue from $STEP_2_OUTPUT]. Reflect the current code behavior in the relevant sections and add a history entry." 2. Invoke document-reviewer to verify the updated Design Doc: - `subagent_type`: "dev-workflows:document-reviewer" - `description`: "Document review of updated Design Doc" - `prompt`: "Review updated Design Doc at [path] for consistency and completeness." 3. When multiple Design Docs exist (`ls docs/design/*.md | grep -v template | wc -l > 1`), invoke design-sync: - `subagent_type`: "dev-workflows:design-sync" - `description`: "Cross-DD consistency check" - `prompt`: "source_design: [updated DD path]. Detect conflicts across all Design Docs after the update." - When `sync_status: conflicts_found`: present conflicts to the user; resolution requires re-invoking technical-designer for affected DDs. 4. After Step 5d completes: - If the user selected `d` for all findings (no `c` routes) → skip Steps 6-8, proceed to Step 9 for re-validation - If the user selected both `d` and `c` → re-evaluate the `c`-routed findings against the updated DD and drop any that are now satisfied by the DD revision; then proceed to Step 6 with the remaining `c` findings ### Step 6: Create Task File Create task file at `docs/plans/tasks/review-fixes-YYYYMMDD.md` Include both code compliance issues and security requiredFixes. ### Step 7: Execute Fixes Invoke task-executor using Agent tool: - `subagent_type`: "dev-workflows:task-executor" - `description`: "Execute review fixes" - `prompt`: "Task file: docs/plans/tasks/review-fixes-YYYYMMDD.md. Apply staged fixes (stops at 5 files)." ### Step 8: Quality Check Invoke quality-fixer using Agent tool: - `subagent_type`: "dev-workflows:quality-fixer" - `description`: "Quality gate check" - `prompt`: "Confirm quality gate passage for fixed files." ### Step 9: Re-validate code-reviewer Invoke code-reviewer using Agent tool: - `subagent_type`: "dev-workflows:code-reviewer" - `description`: "Re-validate compliance" - `prompt`: "Re-validate Design Doc compliance after fixes. Prior compliance issues: $STEP_2_OUTPUT. Verify each prior issue is resolved (whether resolved code-side or design-side)." ### Step 10: Re-validate security-reviewer Invoke security-reviewer using Agent tool (only if security fixes were applied): - `subagent_type`: "dev-workflows:security-reviewer" - `description`: "Re-validate security" - `prompt`: "Re-validate security after fixes. Prior findings: $STEP_3_OUTPUT. Design Doc: [path]. Implementation files: [file list]." ### Step 11: Final Cleanup and Report Delete the review-fix task file this recipe created (if any). Its work is committed; `docs/plans/` i
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.