{"skill":{"slug":"spec-first-dev","displayName":"Spec-First Development","summary":"Spec-driven development workflow. Before writing any code, generates a comprehensive SPEC.md covering data models, user flows, API contracts, file structure,...","description":"---\r\nname: spec-first-dev\r\ndescription: Spec-driven development workflow. Before writing any code, generates a comprehensive SPEC.md covering data models, user flows, API contracts, file structure, and edge cases. Forces the right order — spec first, code second. Prevents building the wrong thing. Use at the start of any non-trivial build task.\r\nargument-hint: [project description or goal]\r\nallowed-tools: Read, Write, Bash, Glob\r\nmetadata:\r\n  version: \"1.0.0\"\r\n  author: \"clawsonnet\"\r\n  tags: [\"development\", \"spec\", \"planning\", \"architecture\", \"workflow\", \"tdd\"]\r\n---\r\n\r\n# Spec-First — Spec-Driven Development Workflow\r\n\r\n## Why This Exists\r\n80% of \"Claude built the wrong thing\" failures come from jumping into code before the spec is clear. This skill forces the right order: **spec → approval → implementation**.\r\n\r\n## Trigger\r\nUse at the start of ANY non-trivial build. If the task will touch >2 files or take >15 minutes, run this first.\r\n\r\nInvoked as: `/spec-first-dev [brief description of what you want to build]`\r\n\r\nOr auto-triggered by phrases like \"build me\", \"create a\", \"implement a\" when the scope is non-trivial.\r\n\r\n## Process\r\n\r\n### Step 1: Clarify Intent\r\n\r\nParse `$ARGUMENTS` for:\r\n- What is being built (feature, service, script, component, etc.)\r\n- Who uses it (end users, internal tooling, automated pipeline)\r\n- Key constraints (stack, budget, timeline if mentioned)\r\n\r\nIf intent is ambiguous, ask ONE clarifying question before proceeding.\r\n\r\n### Step 2: Explore Existing Codebase\r\n\r\nBefore speccing anything new, understand what already exists:\r\n- Run Glob to find relevant existing files (configs, schemas, components)\r\n- Run Grep to find related code patterns\r\n- Identify: what can be reused, what must be new, what might conflict\r\n\r\n### Step 3: Generate SPEC.md\r\n\r\nWrite `SPEC.md` to the project root (or current directory). Include:\r\n\r\n```markdown\r\n# SPEC: [Feature Name]\r\n\r\n## Overview\r\n[1-2 sentences. What this does and why.]\r\n\r\n## Data Models\r\n[All entities, fields, types, relationships]\r\n\r\n## User Flows / API Contracts\r\n[Numbered steps for each major flow. Include request/response shapes for APIs.]\r\n\r\n## File Structure\r\n[New files to create, existing files to modify, with brief reason for each]\r\n\r\n## Edge Cases & Error Handling\r\n[Specific scenarios to handle: empty states, failures, invalid input, concurrency]\r\n\r\n## Out of Scope\r\n[What we are explicitly NOT building in this task]\r\n\r\n## Open Questions\r\n[Any decisions that need input before coding starts]\r\n```\r\n\r\n### Step 4: Present and Gate\r\n\r\nOutput the SPEC.md contents to the user and explicitly pause:\r\n\r\n```\r\nSPEC complete. Review above and confirm before I write any code.\r\nReply 'go' to proceed, or tell me what to change.\r\n```\r\n\r\n**Do not write any implementation code until the user explicitly approves the spec.**\r\n\r\n### Step 5: Implement Against Spec\r\n\r\nOnce approved:\r\n- Work through the spec section by section\r\n- Check off items as you complete them\r\n- Flag any spec deviations immediately (don't quietly deviate)\r\n- If a new edge case emerges, add it to the spec and note it\r\n\r\n## Output Files\r\n\r\n- `SPEC.md` — written in the project root before implementation starts\r\n- (Optional) `SPEC_APPROVED.md` — copy of approved spec for audit trail\r\n\r\n## Integration\r\n\r\nWorks well with:\r\n- Task-tracking tools (prefix each coding session with this skill)\r\n- Code review workflows (attach SPEC.md to PRs)\r\n- Team handoffs (spec is the briefing document)\r\n","tags":{"architecture":"1.0.0","development":"1.0.0","latest":"1.0.0","planning":"1.0.0","spec":"1.0.0"},"stats":{"comments":0,"downloads":864,"installsAllTime":32,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772564921072,"updatedAt":1778994947722},"latestVersion":{"version":"1.0.0","createdAt":1772564921072,"changelog":"- Introduces version 1.0.0 of the spec-first-dev skill.\n- Enforces a spec-driven development workflow: generate a detailed SPEC.md before starting any implementation.\n- Clarifies project intent, audits existing code, and creates specs covering models, flows, APIs, file structure, and edge cases.\n- Requires explicit user approval of SPEC.md before any coding begins.\n- Facilitates integration with task-tracking and code review processes.\n- Helps prevent misaligned builds by forcing clear planning and documentation upfront.","license":null},"metadata":null,"owner":{"handle":"kevdogg102396-afk","userId":"s17bf51m6makamvaqs31hprgqh884sk5","displayName":"kevdogg102396-afk","image":"https://avatars.githubusercontent.com/u/257070288?v=4"},"moderation":null}