# harudeenm/spec-kit architecture

> Architecture diagram of the GitHub repository harudeenm/spec-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harudeenm/spec-kit
- Repository: https://github.com/harudeenm/spec-kit

## Overview

Spec Kit is a CLI and agent-facing toolkit for structured software work. Its setup path is terminal user → project initialization → agent integration; after setup, users invoke independent agent-chat processes: spec-driven development, bug fixing, or idea assessment. The CLI also manages extensions, presets, workflows, artifacts, and role-based bundles. The README documents these capabilities, while the sampled source confirms CLI registration, initialization dependencies, integration abstractions, and workflow execution. Some process content and extension behavior are not shown in the excerpts, so those links are documented at subsystem level rather than inferred from unsampled implementation.

Main entry points: [`src/specify_cli/__init__.py`](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/__init__.py) (Specify CLI), [`src/specify_cli/integrations/base.py`](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/base.py) (Integration lifecycle), [`src/specify_cli/commands/init.py`](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/commands/init.py) (Project initialization), [`src/specify_cli/integrations/_commands.py`](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/_commands.py) (Integration commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and setup"]
  node_cli["Specify CLI<br/>[__init__.py]"]
  node_init["Project initialization<br/>[init.py]"]
end

subgraph group_agents["Agent integration"]
  node_agentconfig["Agent configuration<br/>[_agent_config.py]"]
  node_integrationcmd["Integration commands<br/>[_commands.py]"]
  node_integrationbase["Integration lifecycle<br/>[base.py]"]
  node_integrationcatalog["Agent integrations<br/>[manifest.py]"]
  node_registrar["Agent command registrar<br/>[agents.py]"]
end

subgraph group_process["Processes and customization"]
  node_sdd["Spec-driven development<br/>[engine.py]"]
  node_bug["Bug-fixing process<br/>[__init__.py]"]
  node_assessment["Idea assessment<br/>[__init__.py]"]
  node_extensions["Extension manager<br/>[__init__.py]"]
  node_presets["Preset manager<br/>[__init__.py]"]
  node_workflowoverlays["Workflow overlays<br/>[composer.py]"]
  node_artifacts["Artifact catalog<br/>[catalog.py]"]
end

subgraph group_bundles["Bundles"]
  node_bundlecommands["Bundle commands<br/>[__init__.py]"]
  node_bundleinstaller["Bundle installation<br/>[installer.py]"]
end

subgraph group_shared["Shared services"]
  node_events["Agent runtime events<br/>[events.py]"]
  node_console["CLI presentation<br/>[_console.py]"]
end

node_user(("Project user"))

node_user -->|"runs"| node_cli
node_cli -->|"registers"| node_init
node_user -->|"creates project"| node_init
node_init -->|"configures integration"| node_integrationcmd
node_integrationcmd -->|"uses lifecycle"| node_integrationbase
node_integrationbase -->|"tracks files"| node_integrationcatalog
node_integrationbase -->|"installs hooks"| node_events
node_integrationbase -->|"registers commands"| node_registrar
node_cli -->|"registers commands"| node_extensions
node_cli -->|"registers commands"| node_presets
node_cli -->|"registers commands"| node_artifacts
node_cli -->|"registers commands"| node_bundlecommands
node_bundlecommands -->|"installs bundles"| node_bundleinstaller
node_user -->|"invokes skill"| node_sdd
node_user -->|"invokes skills"| node_bug
node_user -->|"invokes skills"| node_assessment
node_user -->|"installs extensions"| node_extensions
node_user -->|"customizes process"| node_presets
node_sdd -.->|"supports overlays"| node_workflowoverlays
node_init -->|"reads configuration"| node_agentconfig
node_cli -->|"uses presentation"| node_console

click node_cli "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/__init__.py"
click node_init "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/commands/init.py"
click node_agentconfig "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/_agent_config.py"
click node_integrationcmd "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/_commands.py"
click node_integrationbase "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/base.py"
click node_integrationcatalog "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/manifest.py"
click node_registrar "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/agents.py"
click node_sdd "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/workflows/engine.py"
click node_bug "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py"
click node_assessment "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py"
click node_extensions "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py"
click node_presets "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/presets/__init__.py"
click node_workflowoverlays "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/workflows/overlays/composer.py"
click node_artifacts "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/artifacts/catalog.py"
click node_bundlecommands "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/commands/bundle/__init__.py"
click node_bundleinstaller "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/bundler/services/installer.py"
click node_events "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/events.py"
click node_console "https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/_console.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_init,node_user toneBlue
class node_agentconfig,node_integrationcmd,node_integrationbase,node_integrationcatalog,node_registrar toneAmber
class node_sdd,node_bug,node_assessment,node_extensions,node_presets,node_workflowoverlays,node_artifacts toneMint
class node_bundlecommands,node_bundleinstaller toneRose
class node_events,node_console toneIndigo
```

## Components

### CLI and setup

- [Specify CLI](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/__init__.py): `src/specify_cli/__init__.py`
- [Project initialization](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/commands/init.py): `src/specify_cli/commands/init.py`

### Agent integration

- [Agent configuration](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/_agent_config.py): `src/specify_cli/_agent_config.py`
- [Integration commands](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/_commands.py): `src/specify_cli/integrations/_commands.py`
- [Integration lifecycle](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/base.py): `src/specify_cli/integrations/base.py`
- [Agent integrations](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/integrations/manifest.py): `src/specify_cli/integrations/manifest.py`
- [Agent command registrar](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/agents.py): `src/specify_cli/agents.py`

### Processes and customization

- [Spec-driven development](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/workflows/engine.py): `src/specify_cli/workflows/engine.py`
- [Bug-fixing process](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py): `src/specify_cli/extensions/__init__.py`
- [Idea assessment](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py): `src/specify_cli/extensions/__init__.py`
- [Extension manager](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/extensions/__init__.py): `src/specify_cli/extensions/__init__.py`
- [Preset manager](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/presets/__init__.py): `src/specify_cli/presets/__init__.py`
- [Workflow overlays](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/workflows/overlays/composer.py): `src/specify_cli/workflows/overlays/composer.py`
- [Artifact catalog](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/artifacts/catalog.py): `src/specify_cli/artifacts/catalog.py`

### Bundles

- [Bundle commands](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/commands/bundle/__init__.py): `src/specify_cli/commands/bundle/__init__.py`
- [Bundle installation](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/bundler/services/installer.py): `src/specify_cli/bundler/services/installer.py`

### Shared services

- [Agent runtime events](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/events.py): `src/specify_cli/events.py`
- [CLI presentation](https://github.com/harudeenm/spec-kit/blob/add-aee-extension-f6d3ed0cd6eab18c/src/specify_cli/_console.py): `src/specify_cli/_console.py`

### Other components

- **Project user**

## Connections

- Project user → Specify CLI: runs (evidence: `README.md`)
- Specify CLI → Project initialization: registers (evidence: `src/specify_cli/__init__.py`)
- Project user → Project initialization: creates project (evidence: `README.md`)
- Project initialization → Integration commands: configures integration (evidence: `src/specify_cli/commands/init.py`)
- Integration commands → Integration lifecycle: uses lifecycle
- Integration lifecycle → Agent integrations: tracks files (evidence: `src/specify_cli/integrations/base.py`)
- Integration lifecycle → Agent runtime events: installs hooks (evidence: `src/specify_cli/events.py`)
- Integration lifecycle → Agent command registrar: registers commands (evidence: `src/specify_cli/integrations/base.py`)
- Specify CLI → Extension manager: registers commands (evidence: `src/specify_cli/__init__.py`)
- Specify CLI → Preset manager: registers commands (evidence: `src/specify_cli/__init__.py`)
- Specify CLI → Artifact catalog: registers commands (evidence: `src/specify_cli/__init__.py`)
- Specify CLI → Bundle commands: registers commands (evidence: `src/specify_cli/__init__.py`)
- Bundle commands → Bundle installation: installs bundles (evidence: `src/specify_cli/commands/bundle/__init__.py`)
- Project user → Spec-driven development: invokes skill (evidence: `README.md`)
- Project user → Bug-fixing process: invokes skills (evidence: `README.md`)
- Project user → Idea assessment: invokes skills (evidence: `README.md`)
- Project user → Extension manager: installs extensions (evidence: `README.md`)
- Project user → Preset manager: customizes process (evidence: `README.md`)
- Spec-driven development → Workflow overlays: supports overlays
- Project initialization → Agent configuration: reads configuration (evidence: `src/specify_cli/commands/init.py`)
- Specify CLI → CLI presentation: uses presentation (evidence: `src/specify_cli/__init__.py`)
