CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

github/spec-kit

Scanned commit 175adbcd82 dated 2026-09-22 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/github/spec-kit ↗ · 714 files · 10.0 MB

🌱 Spec Kit Build with a spec, fix a bug, or assess an idea — with your coding agent.

Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded) — every claim below links to its cited source files.

Overview

Spec Kit is GitHub's toolkit for Spec-Driven Development (SDD): the Python package `specify-cli` ships a `specify` CLI that scaffolds a `.specify/` project directory containing prompt templates, helper scripts (bash/PowerShell/Python), workflows, and per-agent 'integration' files so that ~40 supported AI coding agents (Copilot, Claude, Gemini, Codex, ...) expose `/speckit.*` commands such as specify → plan → tasks → implement. Beyond init, the CLI manages a full package ecosystem — integrations, extensions, presets, workflows, and bundles — resolved through local and remote catalogs, plus a YAML workflow engine and an agent-native event/hook dispatcher. Distinctively, the wheel bundles all assets into `specify_cli/core_pack/` so `specify init` works fully offline, and every installed file is tracked by SHA-256 manifest so uninstall never clobbers user edits.

System map

The system is a single Python CLI (`specify`, entrypoint `specify_cli:main`) built on Typer/Rich. The root app in `src/specify_cli/__init__.py` wires together command groups that each own a subpackage: init/check/version/self, integration, extension, preset, workflow, bundle, artifact, and event. All distributable content (templates, scripts, extensions, workflows, presets, catalogs) is bundled into the wheel via hatchling force-include as `core_pack`, with a repo-root fallback for source checkouts. State is stored inside each target project under `.specify/` (init-options.json, integration.json, extensions.yml, manifests, workflow run state). External integrations are limited to HTTPS downloads (GitHub API/releases, catalog JSON, extension archives) and subprocess invocation of agent CLIs.

Feature catalog

The CLI surface splits into project bootstrapping (`init`, `check`, `version`, `self check|upgrade`), four parallel package managers (`integration`, `extension`, `preset`, `bundle`) each with add/remove/list/info/search/enable/disable/update and nested `catalog` commands, a workflow engine front-end (`workflow run/resume/status/...` plus `step` and `overlay` groups), a read-only `artifact` introspection group, and an `event run` target used by generated hook dispatchers. On the content side it ships ten core SDD command templates, four bundled extensions, three bundled workflows, and four repo presets.

All 13 feature catalog claims →

Data flow

Inputs enter through Typer commands or content manifests (extension.yml, preset.yml, workflow.yml, bundle.yml, catalog JSON). `specify init` resolves an integration from `INTEGRATION_REGISTRY`, writes `.specify/init-options.json`, renders command templates with per-agent placeholders into the agent's config directory, and copies shared scripts/templates into `.specify/` — every written file hash-recorded in an `IntegrationManifest`. Extensions and presets layer on top via `CommandRegistrar` rendering and a priority-resolved template stack; hooks land in `.specify/extensions.yml`. Workflow runs persist resumable state under `.specify/workflows/runs/<run_id>/`. Outbound data is confined to HTTPS downloads with byte caps and optional SHA-256 pins, and subprocess calls to agent CLIs.

Behavior traces

Three flows traced end-to-end: `specify init` (bootstrap), `specify workflow run` (primary automation), and extension install plus agent-side command execution (persistence and runtime paths). Self-upgrade and the event-dispatch path were also walked. Each flow funnels through `_require_specify_project` or asset-resolution helpers before touching the filesystem, and all writes go through hash-tracked manifests or safe-write helpers.

Testing signals

Testing is pytest-based (~253 files under `tests/`) with coverage configured in pyproject. The suite mirrors the CLI command surface under `tests/specify_cli/` per `design/cli.md`, has one file per integration under `tests/integrations/`, parity tests proving bash↔python↔powershell script equivalence, contract tests for wheel bundling and catalog/manifest schemas, and workflow/overlay/engine suites. CI runs a 3-OS × 2-Python pytest matrix plus ruff, markdownlint, a dependency security audit, and CodeQL.

Risk map

The highest-risk surface is remote-code paths the CLI intentionally supports: project-local custom workflow steps are imported and executed, URL-based extension/bundle installs download and extract archives, and generated event dispatchers + workflow `shell`/`command` steps run subprocesses with user privileges. These are hardened with HTTPS-only rules, byte caps, zip-slip defenses, SHA-256 pins, trust prompts, and path confinement — but the security posture is defense-in-depth around inherently dangerous features. Secondary risks: three giant modules concentrate blast radius, compatibility shims create fragile monkeypatch coupling, and a few silent-fallback paths can hide breakage.

Extension points

The repo is essentially a plugin framework. Five registration seams exist: (1) `INTEGRATION_REGISTRY` for AI agents via small class-attr subclasses of four base classes; (2) `STEP_REGISTRY`/`StepBase` for workflow step types, including project-local dynamically-loaded custom steps; (3) extension packages (`extension.yml`) adding commands/hooks/events/config; (4) presets (`preset.yml`) overriding templates via priority-resolved `replaces:` entries; (5) bundles (`bundle.yml`) packaging all of the above. All five are discoverable/installable through per-domain catalog stacks that users can extend with custom catalog URLs.

Contributor handoff

This repo is engineered for agent contributors: AGENTS.md gives a 5-step integration quickstart and design/cli.md defines a strict file-naming contract (`command_<name>.py`, `_command_<name>_<phase>.py`, `_commands.py`, mirrored tests). The safe-edit boundary is the registry/declarative layer — prefer adding a subpackage, extension.yml, preset.yml, or workflow.yml over touching the three giant domain modules. Non-negotiables: all installed files go through manifest recording, no `shell=True`, preserve root-level re-exports and `_commands` forwarders (tests monkeypatch them), honor the dual core_pack/repo-root asset lookup, and keep sh/ps/py script behavior identical.

Languages

LanguageFilesShare of source
Python45797%
Markdown152docs/config
YAML51docs/config
JSON17docs/config
Shell123%
CSS1docs/config
TOML10%

Start reading here

Probable source entrypoint: pyproject.toml — inferred from the directory tree and manifest, not the upstream docs.

Source roots

src/ (191 files)

Repository structure

Top-level pathFiles
tests/257
src/191
extensions/59
docs/45
.github/41
presets/29
scripts/18
templates/16

Docs found: AGENTS.mdCONTRIBUTING.mdREADME.mddocs/README.mddocs/community/bundles.mddocs/community/extensions.mddocs/community/friends.mddocs/community/overview.mddocs/community/presets.mddocs/community/walkthroughs.md

Package

pyproject.toml — specify-cli v1.0.10.dev0, 4 declared dependencies.

testpytest>=7.0"pytest-cov>=4.0"]

CI & config entrypoints

Structural health signals

Average score 6.7/10 across 96 analyzed source files; 31 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history