spec-first-development
Use before implementing any change that adds, removes, or modifies package behavior, public API, types, or contracts. Ensures the governing spec is updated before code is written and a verification test plan exists.
Best use case
spec-first-development is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use before implementing any change that adds, removes, or modifies package behavior, public API, types, or contracts. Ensures the governing spec is updated before code is written and a verification test plan exists.
Teams using spec-first-development should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/spec-first-development/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How spec-first-development Compares
| Feature / Agent | spec-first-development | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use before implementing any change that adds, removes, or modifies package behavior, public API, types, or contracts. Ensures the governing spec is updated before code is written and a verification test plan exists.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
## Rule Anchor - "Live Spec Policy" in `.agents/rules/spec-workflow.md` - "Spec-First Development" in `.agents/rules/spec-workflow.md` ## When to Use Trigger this skill for **any** of the following — not only contract-boundary changes: - Adding a new feature or behavior to a package - Changing existing behavior, semantics, or configuration - Adding or removing a public export (class, function, type, constant) - Adding or changing an error type, code, or recoverability - Adding or changing a lifecycle event or state transition - Adding or changing an HTTP/WebSocket endpoint (request/response shapes) - Adding or changing a class-to-class dependency across module boundaries - Removing a feature or deprecating an export If the change only touches internal implementation details with no observable behavioral difference and no public API change, the spec update is not required — but if in doubt, update the spec. ## Workflow ### Step 1: Identify the affected package and spec Name the package that owns the changed behavior. Locate its governing spec: - Package behavior / public surface → `packages/<name>/docs/SPEC.md` - HTTP API → OpenAPI or API spec document - Cross-package contract → `.agents/specs/` cross-cutting spec If no spec exists for the package, create one using [`spec-writing-standard`](../spec-writing-standard/SKILL.md) Mode A (Initial Creation) before continuing. ### Step 2: Determine which SPEC sections change Use the lookup table in [`spec-writing-standard`](../spec-writing-standard/SKILL.md) Mode B (Incremental Update, Step 1) to list the sections that must be updated. Write the list down before touching any code. ### Step 3: Update the spec incrementally Apply the targeted spec update using [`spec-writing-standard`](../spec-writing-standard/SKILL.md) Mode B (Incremental Update). Only the sections identified in Step 2 are changed. For API specs, use [`api-spec-management`](../api-spec-management/SKILL.md). The spec update must be committed **before** or **in the same commit as** the implementation code. It must never be deferred to after the PR. ### Step 4: Define a verification test plan For each spec section updated, state: - **What to verify**: which contract assertions validate the change - **How to verify**: unit / integration / contract test - **Commands to run**: exact verification commands Use [`contract-audit`](../contract-audit/SKILL.md) for contract consistency checks. ### Step 5: Implement to spec - Write code that conforms to the updated spec — the spec is now the design artifact - Follow TDD cycle (see [`tdd-red-green-refactor`](../tdd-red-green-refactor/SKILL.md)) - Build and verify (see [`repo-change-loop`](../repo-change-loop/SKILL.md)) ### Step 6: Verify conformance Run the full conformance verification loop after implementation: - See [`spec-code-conformance`](../skills/spec-code-conformance/SKILL.md) - Implementation is not complete until conformance is verified with zero gaps and regression tests pass ## Orchestrated Skills | Skill | Role in this workflow | | ------------------------ | -------------------------------------------- | | `spec-writing-standard` | SPEC.md incremental update and quality gates | | `api-spec-management` | API spec format and update workflow | | `contract-audit` | Contract consistency verification | | `tdd-red-green-refactor` | Implementation cycle | | `repo-change-loop` | Build and verify loop | | `spec-code-conformance` | Post-implementation conformance verification |
Related Skills
spec-writing-standard
Use when creating a new SPEC.md or incrementally updating an existing one. Covers both initial authoring and the ongoing incremental-update workflow that keeps the spec live.
spec-code-conformance
Mandatory verification loop after any SPEC.md or contract document change. Compares spec against implementation code, fixes code to match spec, repeats until zero discrepancies, then runs regression tests. Spec is always the source of truth — never modify the spec within this workflow.
plugin-development
Guide plugin development workflows with validation, disable strategies, and error handling. Use when working on plugin development, plugin system changes, or plugin options validation.
api-spec-management
Manage API specifications for apps with external HTTP, WebSocket, gRPC, or other API endpoints, including endpoint additions, request or response shape changes, OpenAPI documentation, and schema synchronization.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vitest-testing-strategy
Defines a practical testing strategy for TypeScript and JavaScript using Vitest across unit, integration, and type-level tests. Use when adding features, refactoring, or preventing regressions with fast feedback loops.
version-management
All packages must have the same version. Use changesets for coordinated version bumps. Never version packages independently.
vercel-react-native-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
user-request-gate
Use immediately when the user requests any implementation, code change, feature addition, fix, or modification. Gates code writing behind a backlog draft document. Read-only exploration is always permitted.
type-boundary-and-ssot
Applies Robota's preferred workflow for trust-boundary validation, strict typing, quality gates, and owner-based SSOT reuse. Use when adding or reviewing type contracts, boundary parsing, shared contract ownership, or running quality checks.