This manual explains how GitHub Spec Kit is set up and used in this repository. It complements SPEC-DRIVEN-DEVELOPMENT.md (product behavior and traceability) and the normative baseline under specs/001-baseline/.
Official upstream docs: github/spec-kit · Spec Kit documentation
- What Spec Kit adds
- Prerequisites — install Specify CLI
- Initialize Spec Kit in this repository
- Folder and document structure
- How the layers fit together
- Baseline backfill (
specs/001-baseline/) - Using Spec Kit in Cursor Agent
- Incremental features (
002+) - Maintainer checklist
- Troubleshooting
- See also
GitHub Spec Kit is a spec-driven development toolkit. In Nowo bundles it provides:
- Versioned scaffolding (
.specify/, Cursor skills) so every repo uses the same workflow. - Baseline specifications (
specs/001-baseline/) that document 100% of production code undersrc/. - Cursor Agent skills (
/speckit-specify,/speckit-plan, …) to author new feature specs, plans, and tasks consistently.
Spec Kit does not replace PHPUnit, PHPStan, or integrator docs — it anchors them.
Install the official Specify CLI from GitHub (do not use unrelated PyPI packages named specify-cli).
Option A — persistent install (recommended for maintainers):
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
specify --versionOption B — one-off via uvx:
uvx --from git+https://github.com/github/spec-kit.git specify --versionVerify:
specify checkYou should see Cursor listed as an available integration (cursor-agent).
Run from the repository root (same level as composer.json):
specify init --here --force --integration cursor-agent --script sh| Flag | Purpose |
|---|---|
--here |
Initialize inside the existing repo (no new directory) |
--force |
Merge into a non-empty tree without prompts |
--integration cursor-agent |
Cursor Agent (mandatory for Nowo bundles) |
--script sh |
POSIX shell helper scripts (Linux/macOS/WSL) |
In CI or headless shells, add --ignore-agent-tools.
Verify after init:
specify integration listExpected: Cursor (cursor-agent) → installed (default).
Expected files:
.specify/init-options.json—"integration": "cursor-agent".cursor/skills/speckit-specify/SKILL.md(and sibling skills).specify/memory/constitution.md— replace template placeholders with bundle-specific principles
Re-init (refresh skills/templates after upgrading Specify CLI):
specify init --here --force --integration cursor-agent --script shExisting constitution.md and specs/ are preserved when possible; review the diff before committing.
Repository root/
├── .specify/ # Spec Kit infrastructure (templates, scripts, metadata)
│ ├── init-options.json # Integration: cursor-agent, script: sh
│ ├── integration.json # Installed integrations
│ ├── memory/
│ │ └── constitution.md # Project principles (bundle-specific)
│ ├── scripts/bash/ # Helper scripts used by skills
│ ├── templates/ # spec.md, plan.md, tasks.md templates
│ └── workflows/ # Bundled speckit workflow
├── .cursor/
│ ├── mcp.json # Engram MCP (REQ-IDE-001)
│ ├── rules/ # Cursor rules pack (REQ-IDE-003)
│ └── skills/
│ └── speckit-*/ # Cursor Agent skills (/speckit-specify, …)
├── specs/ # Written specifications (product content)
│ ├── 001-baseline/
│ │ ├── spec.md # Full-product baseline spec
│ │ └── code-inventory.md # 100% src/ file → FR-* mapping
│ ├── 002-my-feature/ # (future) incremental feature specs
│ │ ├── spec.md
│ │ ├── plan.md
│ │ └── tasks.md
│ └── …
└── docs/
├── SPEC-DRIVEN-DEVELOPMENT.md # Product behavior + REQ-* traceability
├── SPEC-KIT.md # This manual
├── USAGE.md # Integrator usage
└── CONFIGURATION.md # Integrator configuration
| Path | Role |
|---|---|
.specify/ |
How to work — templates, scripts, constitution template, integration metadata. Created by specify init. |
specs/ |
What the product does — actual specifications you write and version. Baseline lives in 001-baseline/; new features get 002-, 003-, … |
docs/SPEC-DRIVEN-DEVELOPMENT.md |
Human entry point for behavior, user stories, validation, and REQ-* Makefile anchors. |
docs/SPEC-KIT.md |
Human entry point for tooling — install, init, structure, Cursor usage (this file). |
flowchart TB
subgraph docs [docs/]
SDD[SPEC-DRIVEN-DEVELOPMENT.md]
SK[SPEC-KIT.md]
USAGE[USAGE.md / CONFIGURATION.md]
end
subgraph speckit [Spec Kit artifacts]
SPECIFY[.specify/]
SKILLS[.cursor/skills/speckit-*]
BASE[specs/001-baseline/]
FEAT[specs/002+ feature dirs]
end
subgraph proof [Mechanical proof]
TESTS[PHPUnit / PHPStan / Vitest]
end
SK --> SPECIFY
SK --> SKILLS
SDD --> BASE
SDD --> USAGE
BASE --> TESTS
FEAT --> TESTS
SKILLS --> FEAT
When you change product behavior:
- Update
specs/001-baseline/spec.md(or the relevant00N-feature/spec). - Update
specs/001-baseline/code-inventory.mdif files were added or removed undersrc/. - Update
docs/USAGE.md/docs/CONFIGURATION.mdwhen integrators must act. - Add or adjust tests — specs alone are not sufficient proof.
Every Nowo bundle with Spec Kit must ship:
| File | Content |
|---|---|
spec.md |
User scenarios, FR-* requirements, success criteria (SC-*), non-goals, validation commands |
code-inventory.md |
Table mapping every production file under src/ to spec sections and FR-* IDs |
Production code scope: all files under src/ that ship with the package (PHP, TS/JS, SCSS, YAML config, Twig views, translations). Exclude tests/, demo/, *.test.ts, and generated caches. Build artifacts (dist/) are documented as outputs of named sources.
Audit command (maintainers):
find src -type f ! -path '*/assets/dist/*' ! -name '*.test.ts' | wc -lThe Total production sources row in code-inventory.md must match this count.
In ComposerUpdateHelper, the baseline inventory covers 2/2 files — see specs/001-baseline/code-inventory.md.
Open the repository in Cursor and use Cursor Agent in the project root. Spec Kit installs skills under .cursor/skills/; invoke them as slash commands in the agent chat.
Typical order for a new feature (not the baseline backfill):
| Step | Skill | Purpose |
|---|---|---|
| 1 | /speckit-constitution |
Align or update .specify/memory/constitution.md |
| 2 | /speckit-specify |
Create or update specs/NNN-feature-name/spec.md from a natural-language description |
| 3 | /speckit-clarify |
(optional) Resolve ambiguities before planning |
| 4 | /speckit-plan |
Generate plan.md (technical approach) |
| 5 | /speckit-checklist |
(optional) Quality checklist after plan |
| 6 | /speckit-tasks |
Break down into tasks.md |
| 7 | /speckit-analyze |
(optional) Cross-artifact consistency check |
| 8 | /speckit-implement |
Execute tasks with the agent |
| 9 | /speckit-converge |
Compare codebase vs artifacts; append remaining work |
In Cursor Agent chat:
/speckit-specify Add optional overlay filter persistence via localStorage
The skill creates (or updates) a directory such as specs/002-overlay-filter-persistence/spec.md using templates from .specify/templates/.
For documenting existing code (baseline), maintainers typically edit directly:
Use /speckit-converge to find gaps between specs and code after large refactors.
| Skill | When to use |
|---|---|
/speckit-constitution |
Establish or amend project principles |
/speckit-specify |
New or updated feature specification |
/speckit-plan |
Implementation plan from spec |
/speckit-tasks |
Actionable task list from plan |
/speckit-implement |
Execute implementation tasks |
/speckit-converge |
Post-implementation gap analysis |
/speckit-clarify |
Before plan — reduce ambiguity |
/speckit-analyze |
After tasks — consistency report |
/speckit-checklist |
After plan — requirements quality |
/speckit-taskstoissues |
Export tasks to GitHub issues |
| Directory | Role |
|---|---|
specs/001-baseline/ |
Authoritative full-product backfill; must not be contradicted by later specs |
specs/002-feature-name/ |
Single feature: spec.md, optionally plan.md, tasks.md, checklists |
specs/003-… |
Next feature (sequential numbering) |
Feature specs are created by /speckit-specify (sequential numbering is automatic unless you set SPECIFY_FEATURE_DIRECTORY).
When a feature ships:
- Merge behavior into or reference from
001-baselineif it becomes core product surface. - Update
code-inventory.mdfor newsrc/files. - Update integrator docs and tests.
Before merging a PR that changes production code:
-
specs/001-baseline/code-inventory.mdincludes every new/changed production file undersrc/ -
specs/001-baseline/spec.md(or feature spec) describes behavior withFR-*/SC-*IDs -
docs/SPEC-DRIVEN-DEVELOPMENT.mdstill accurate for user stories and scope -
docs/USAGE.md/docs/CONFIGURATION.mdupdated if integrators are affected - Tests and static analysis pass (
composer qa, etc.) -
.specify/memory/constitution.mdupdated if principles changed
Before migrating a new bundle to Spec Kit:
- Install Specify CLI
-
specify init --here --force --integration cursor-agent --script sh - Create
specs/001-baseline/{spec.md,code-inventory.md} - Tailor
constitution.md - Add this manual (
docs/SPEC-KIT.md) and extenddocs/SPEC-DRIVEN-DEVELOPMENT.md - Link GitHub Spec Kit from root
README.md## Documentation(see org checklist)
| Problem | Action |
|---|---|
Unknown integration: 'cursor' |
Use cursor-agent, not cursor: --integration cursor-agent |
| Skills missing in Cursor | Re-run specify init --here --force --integration cursor-agent --script sh; confirm .cursor/skills/speckit-specify/ exists |
specify integration list shows Cursor not installed |
Run init from repo root; check .specify/integration.json |
Agent cannot find .specify/ |
Open Cursor at repository root, not a subfolder |
| Baseline count mismatch | Re-run inventory audit; update code-inventory.md summary row |
SPEC-DRIVEN-DEVELOPMENT.md— product behavior andREQ-*traceabilityspecs/001-baseline/spec.md— baseline functional specspecs/001-baseline/code-inventory.md— 100% code map.specify/memory/constitution.md— project principles- GitHub Spec Kit documentation — upstream Specify CLI and skills reference