specify-it
v0.7.0
Published
CLI and validation tooling for spec-driven workflows.
Maintainers
Readme

Standardize how your repository creates, names, validates, and shares specs across humans, hooks, CI, and agents.
What is Specify It!
specify-it helps teams define a clear repository contract for specs.
Instead of letting every repository invent its own structure, naming, and validation rules, specify-it gives you a deterministic workflow that works for:
- humans writing specs
- local Git hooks
- CI pipelines
- agent and LLM tooling
It currently provides:
specify-it initto bootstrap a repository contractspecify-it newto create new spec scaffoldsspecify-it checkto validate repository specsspecify-it listto enumerate known specsspecify-it print-config --jsonto expose the resolved repository contract for tools and agents- official agent-facing skills for assisted spec workflows
Getting Started
Install specify-it as a development dependency:
npm install -D specify-itInitialize the repository:
npx specify-it initCreate a new spec:
npx specify-it new --title="add social login"Validate the repository specs:
npx specify-it checkInspect the resolved repository contract:
npx specify-it print-config --jsonAfter init, your repository gets a deterministic contract through:
specify-it.config.json- a dedicated specs directory
- a predictable section structure
- validation rules that can run locally and in CI
How Specify It! Works
Every repository that uses specify-it has a deterministic contract in specify-it.config.json.
That contract defines:
- where specs live
- how spec files are named
- which sections they must contain
- whether groups are used
- which validations apply during local development and CI
Generated configs can include a $schema entry that points editors and tools to the published JSON Schema for the current package version.
The CLI enforces that contract.
At a high level:
- deterministic commands define and validate the repository rules
- agent-facing skills consume those rules for assisted workflows
This separation lets repositories keep a stable source of truth for structural rules while still enabling LLM-assisted authoring.
Core Commands
specify-it init
Bootstraps specify-it in the current repository.
npx specify-it initUseful variants:
npx specify-it init --bare
npx specify-it init --format=jsoninit creates the repository contract and the initial specs structure.
specify-it new
Creates a new spec scaffold from the repository configuration.
npx specify-it new --title="bootstrap release workflow"If the repository uses spec groups:
npx specify-it new --title="add config loader" --group=featKey behavior:
--titleis requiredspecs.groupsis optional- when groups are configured,
--groupis required - the filename is always derived from the configured naming strategy
specify-it check
Validates repository specs against specify-it.config.json.
npx specify-it checkMachine-readable output:
npx specify-it check --jsonThe checker validates:
- repository layout
- filename shape
- file extension
- Markdown section order and required sections
- commit-aware repository rules when configured
specify-it list
Lists known specs from the configured repository layout.
npx specify-it listMachine-readable output:
npx specify-it list --jsonThis is useful for scripts, CI, and agent tooling that need spec inventory.
specify-it print-config
Prints the resolved repository contract as JSON.
npx specify-it print-config --jsonThis command is designed for tools and agents that need a deterministic view of the repository rules without parsing multiple project files.
Configuration
specify-it init generates a specify-it.config.json file that becomes the source of truth for the repository spec workflow.
Generated configs include:
{
"$schema": "https://unpkg.com/[email protected]/schemas/specify-it.json"
}The published schema lives at:
https://unpkg.com/[email protected]/schemas/specify-it.jsonExample:
{
"$schema": "https://unpkg.com/[email protected]/schemas/specify-it.json",
"specs": {
"root": ".specs",
"format": "md",
"language": "en",
"naming": "timestamp-slug",
"sections": {
"order": ["Title", "Objective", "Scope", "Design", "Examples", "Acceptance Criteria"],
"required": ["Objective", "Scope", "Design", "Acceptance Criteria"],
"optional": ["Examples"]
}
},
"agents": {
"syncDocuments": ["AGENTS.md", "README.md"]
},
"checks": {
"requireSpecsDirectory": true,
"requireOrderedSections": true,
"requireKnownExtension": true,
"commitSpecs": {
"mode": "one",
"maxChangedSpecs": 1,
"requireLatest": true
}
}
}Grouped repositories can add:
{
"specs": {
"groups": ["feat", "fix", "docs", "chore"]
}
}Naming strategies
Supported specs.naming values:
timestamp-slugslugsequence-slugdate-slugdatetime-sluggroup-timestamp-slugtimestamp-group-sluggroup-slug
Slug segments use ASCII snake_case across every naming strategy.
Configuration reference
| path | required | description |
| ------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| specs.root | true | defines where repository specs live |
| specs.format | true | defines the single source of truth for the project spec format; current bootstrap values are md, json, html, and xml |
| specs.language | true | communicates the expected language for LLM-authored specs |
| specs.naming | true | defines the filename strategy for specs; supported values are timestamp-slug, slug, sequence-slug, date-slug, datetime-slug, group-timestamp-slug, timestamp-group-slug, and group-slug; slug segments use ASCII snake_case |
| specs.groups | false | optionally lists the allowed spec groups; when present, specify-it new requires --group with one of the configured values |
| specs.sections.order | true | defines the canonical section order for markdown-style specs |
| specs.sections.required | true | lists sections that must exist in every compliant spec |
| specs.sections.optional | true | lists sections that may be omitted |
| agents.syncDocuments | true | lists repository documents that should stay aligned with spec and workflow changes |
| checks.requireSpecsDirectory | true | requires the configured specs directory to exist |
| checks.requireOrderedSections | true | requires specs to follow the configured section order |
| checks.requireKnownExtension | true | requires spec files to match the configured format |
| checks.commitSpecs.mode | true | describes commit-level expectations for specs; supported values are none, one, and any |
| checks.commitSpecs.maxChangedSpecs | false | optionally caps how many spec files may be changed in the current Git working set |
| checks.commitSpecs.requireLatest | true | expresses whether a newly added spec in a commit must be the latest spec in its target specs directory by timestamp order |
Agent Skills
specify-it combines deterministic CLI commands with agent-facing skills.
- commands define and enforce the repository contract
- skills use that contract for assisted workflows
The first official skill currently shipped by the project is:
skills/creating-specs-with-specify-it/
That skill is designed for repositories that already use specify-it and follows this workflow:
- run
npx specify-it print-config --json - read the repository contract
- create the spec with
npx specify-it new - draft the content inside the generated scaffold
- run
npx specify-it checkwhen final validation is needed
For agents or environments without native skill support, a repository can mirror that same workflow in documents such as AGENTS.md.
Release
The project uses release-it for package releases.
yarn releaseis the local release entrypoint.release-it.jsondefines Git tags, npm publication, GitHub releases, and changelog generation.github/workflows/release.ymldefines the manual GitHub Actions workflow forpatch,minor, andmajorreleases- the workflow verifies npm authentication explicitly with
npm whoami release-ituses--no-verifyon automated version commits so mechanical release metadata updates do not get blocked by human-focused pre-commit checks- the package publishes to
https://registry.npmjs.org/
The release workflow runs:
yarn format:checkyarn lint:checkyarn type-checkyarn testyarn build
Contributing
The repository follows a spec-first workflow for implementation work:
- create the relevant spec
- refine the spec until the design is aligned
- approve the spec
- implement the change
Helpful project documents:
AGENTS.mddefines collaboration and spec-writing rules for contributors and coding agentsIDEA.mdcaptures early-stage product direction and open questions.specs/stores implementation-ready and approved specs
For local project development:
yarn buildemits runnable output todist/yarn startruns the built CLIyarn start:devruns the source entrypoint directlyyarn testruns the Vitest suiteyarn test:covruns the suite with coverageyarn specify-it:checkruns the released CLI against this repository
