Architecture of github/spec-kit
github/spec-kit is 994 source files holding 12,521 symbols across 6 modules, written mainly in Python, Shell. The largest module is tests, with 367 files, and 2 files are entry points into the dependency graph.
How spec-kit fits together
The specify command-line tool is the entry point for users, and src/specify_cli/__init__.py is where that command starts. Running specify with no subcommand prints a banner and a pointer to --help. The src/specify_cli/mcp_server/server.py file is the second entry point, and it exposes the same inventory to MCP clients. The src/specify_cli/artifacts directory lists which commands, hooks, presets or extensions each project exposes, through specify artifact list and specify artifact info. The scripts/bash directory sets up and checks the folders and template files a spec-driven feature needs before work starts. The src/specify_cli/authentication directory fetches from private git hosts with stored tokens and installs the hooks that let a coding agent run Specify commands on its own events.
Largest modules
- tests: 367 files and 154,273 lines of code
- src: 294 files and 63,743 lines of code
- extensions: 12 files and 2,654 lines of code
- scripts: 12 files and 3,052 lines of code
- .github: 4 files and 1,258 lines of code
- .devcontainer: 1 file and 86 lines of code
Languages
By file count: Python 677 files, Shell 13 files.
Documentation
Repowise documents spec-kit in 539 pages generated from the source, 34 of them written explanations of the repository and its modules.
More on spec-kit: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos