Problem
Users are creating variations of Spec Kit prompts for team-specific and org-specific workflows. Managing all variations in a single repo is becoming difficult. We need a way for users to install custom prompt collections from external repositories.
Example Extensions:
- BDD (Behavior-Driven Development) workflows
- Bug diagnosis and root cause analysis
- Deep planning and architecture reviews
- Security-focused specification patterns
- Performance optimization workflows
Proposed Solution
Installation Command
specify install-extension https://github.com/org/speckit-extension-bdd
Installation Flow
- Download extension from GitHub (latest release or main branch)
- Detect which AI agent is configured (by checking for
.github/prompts/, .claude/commands/, etc.)
- Copy extension files to appropriate locations:
- Commands → Agent-specific directory (e.g.,
.github/prompts/)
- Memory files →
.specify/memory/
- Templates →
.specify/templates/
- Track installation in
.specify/extensions.json
Agent Detection
Current State: The CLI does NOT save which agent was selected during specify init. No config file is created.
Detection Strategy: Check which agent-specific directories exist in the project:
| Agent |
Directory |
| GitHub Copilot |
.github/prompts/ |
| Claude Code |
.claude/commands/ |
| Gemini CLI |
.gemini/commands/ |
| Cursor |
.cursor/commands/ |
| Windsurf |
.windsurf/workflows/ |
Installation Behavior:
# Auto-detect agent from project structure
specify install-extension https://github.com/org/ext
# Override with explicit agent
specify install-extension https://github.com/org/ext --agent claude
Edge Cases:
- Multiple agent directories found → Prompt user to choose or install to all
- No agent directory found → Require
--agent flag
Extension Repository Structure
Option 1: Hybrid Structure (Recommended)
Source templates + optional pre-built agent variants:
speckit-extension-bdd/
├── extension.yaml # Extension manifest
├── README.md
├── memory/ # Shared context files
│ └── bdd-guidelines.md
├── templates/ # Source templates (generic format)
│ ├── commands/
│ │ ├── given-when-then.md # Generic markdown with {SCRIPT}, $ARGUMENTS
│ │ ├── scenario.md
│ │ └── feature-spec.md
│ └── acceptance-criteria.md
└── agents/ # Pre-built variants (optional, for speed)
├── claude/commands/
│ ├── speckit.given-when-then.bdd.md
│ └── speckit.scenario.bdd.md
├── gemini/commands/
│ ├── speckit.given-when-then.bdd.toml
│ └── speckit.scenario.bdd.toml
└── copilot/prompts/
├── speckit.given-when-then.bdd.prompt.md
└── speckit.scenario.bdd.prompt.md
Note: Files in agents/ include the extension name (e.g., .bdd.) for easy identification after installation.
Why this works:
- Write once in
templates/commands/ (generic format)
- Optionally provide pre-built variants in
agents/ for popular agents
- CLI tries pre-built first, falls back to converting from source templates
- Extension name in filename prevents conflicts and enables easy removal
Option 2: Flat Structure
Simpler, no pre-built variants:
speckit-extension-bdd/
├── extension.yaml
├── README.md
├── commands/
│ ├── given-when-then.md # Generic markdown
│ └── scenario.md
├── memory/
│ └── bdd-guidelines.md
└── templates/
└── acceptance-criteria.md
Trade-off: Simpler to create, but CLI must always convert on-the-fly.
Extension Manifest
File: extension.yaml
name: bdd-workflows
version: 1.0.0
description: Behavior-Driven Development workflows for Spec-Driven Development
author: your-org
# Compatibility
spec_kit_version: ">=0.9.0"
supported_agents:
- claude
- copilot
- gemini
# or "all" for all agents
# What this extension provides
provides:
commands:
- given-when-then
- scenario
- feature-spec
memory:
- bdd-guidelines.md
templates:
- acceptance-criteria.md
Installation Details
File Installation Strategy
Priority order:
- Use pre-built agent variant if exists (
agents/copilot/prompts/)
- Convert from source templates (
templates/commands/)
- Copy directly from
commands/ and auto-convert
File targets:
- Commands → Agent directory (e.g.,
.github/prompts/, .claude/commands/)
- Memory →
.specify/memory/
- Templates →
.specify/templates/
File Naming Convention
To track which files belong to which extension, use a naming convention:
Commands:
speckit.<command>.<extension-name>.<agent-format>
Examples:
.github/prompts/speckit.given-when-then.bdd.prompt.md
.claude/commands/speckit.scenario.bdd.md
.gemini/commands/speckit.feature-spec.bdd.toml
Memory & Templates:
<filename>.<extension-name>.md
Examples:
.specify/memory/bdd-guidelines.bdd.md
.specify/templates/acceptance-criteria.bdd.md
Benefits:
- Easy to identify which extension a file belongs to
- Safe removal - just delete files with
.<extension-name>. pattern
- Prevents naming conflicts between extensions
- Clear ownership in multi-extension projects
Installation Tracking
Create .specify/extensions.json:
{
"installed": [
{
"name": "bdd-workflows",
"version": "1.0.0",
"source": "https://github.com/org/speckit-extension-bdd",
"installed_at": "2025-10-16T10:30:00Z",
"agent": "copilot",
"files": {
"commands": [
".github/prompts/speckit.given-when-then.bdd.prompt.md",
".github/prompts/speckit.scenario.bdd.prompt.md"
],
"memory": [
".specify/memory/bdd-guidelines.bdd.md"
],
"templates": [
".specify/templates/acceptance-criteria.bdd.md"
]
}
}
]
}
This allows:
- Easy listing of installed extensions
- Safe removal by file path
- Version tracking for updates
- Conflict detection before installation
Example: Installing an Extension
$ specify install-extension https://github.com/org/speckit-extension-bdd
⚠️ Installing Extension
────────────────────────
Extension: bdd-workflows v1.0.0
Source: https://github.com/org/speckit-extension-bdd
Detected agent: copilot (.github/prompts/ found)
Will install:
• speckit.given-when-then.bdd.prompt.md
• speckit.scenario.bdd.prompt.md
• speckit.feature-spec.bdd.prompt.md
• bdd-guidelines.bdd.md (memory)
• acceptance-criteria.bdd.md (template)
Continue? [y/N] y
✓ Downloaded extension
✓ Installed 3 commands to .github/prompts/
✓ Installed 1 memory file to .specify/memory/
✓ Installed 1 template to .specify/templates/
✓ Updated .specify/extensions.json
Extension installed successfully!
Available commands: /speckit.given-when-then, /speckit.scenario, /speckit.feature-spec
Key Decisions for Discussion
-
Repository Structure: Option 1 (hybrid with optional pre-built) vs Option 2 (flat)?
-
Multi-agent projects: If both .github/prompts/ and .claude/commands/ exist, should we:
- Install to both by default?
- Prompt user to choose?
- Require
--agent flag?
-
Conflict handling: If extension file already exists, should we:
- Prompt user (overwrite/skip/rename)?
- Fail installation?
- Auto-rename?
-
Version support: Support specific versions/branches initially or just latest?
specify install-extension https://github.com/org/ext@v1.2.0
specify install-extension https://github.com/org/ext@main
Next Steps
- Gather feedback on this proposal
- Decide on key questions above
- Build MVP -
install-extension command
- Create starter extension repository as template for community
Problem
Users are creating variations of Spec Kit prompts for team-specific and org-specific workflows. Managing all variations in a single repo is becoming difficult. We need a way for users to install custom prompt collections from external repositories.
Example Extensions:
Proposed Solution
Installation Command
Installation Flow
.github/prompts/,.claude/commands/, etc.).github/prompts/).specify/memory/.specify/templates/.specify/extensions.jsonAgent Detection
Current State: The CLI does NOT save which agent was selected during
specify init. No config file is created.Detection Strategy: Check which agent-specific directories exist in the project:
.github/prompts/.claude/commands/.gemini/commands/.cursor/commands/.windsurf/workflows/Installation Behavior:
Edge Cases:
--agentflagExtension Repository Structure
Option 1: Hybrid Structure (Recommended)
Source templates + optional pre-built agent variants:
Note: Files in
agents/include the extension name (e.g.,.bdd.) for easy identification after installation.Why this works:
templates/commands/(generic format)agents/for popular agentsOption 2: Flat Structure
Simpler, no pre-built variants:
Trade-off: Simpler to create, but CLI must always convert on-the-fly.
Extension Manifest
File:
extension.yamlInstallation Details
File Installation Strategy
Priority order:
agents/copilot/prompts/)templates/commands/)commands/and auto-convertFile targets:
.github/prompts/,.claude/commands/).specify/memory/.specify/templates/File Naming Convention
To track which files belong to which extension, use a naming convention:
Commands:
Memory & Templates:
Benefits:
.<extension-name>.patternInstallation Tracking
Create
.specify/extensions.json:{ "installed": [ { "name": "bdd-workflows", "version": "1.0.0", "source": "https://github.com/org/speckit-extension-bdd", "installed_at": "2025-10-16T10:30:00Z", "agent": "copilot", "files": { "commands": [ ".github/prompts/speckit.given-when-then.bdd.prompt.md", ".github/prompts/speckit.scenario.bdd.prompt.md" ], "memory": [ ".specify/memory/bdd-guidelines.bdd.md" ], "templates": [ ".specify/templates/acceptance-criteria.bdd.md" ] } } ] }This allows:
Example: Installing an Extension
Key Decisions for Discussion
Repository Structure: Option 1 (hybrid with optional pre-built) vs Option 2 (flat)?
Multi-agent projects: If both
.github/prompts/and.claude/commands/exist, should we:--agentflag?Conflict handling: If extension file already exists, should we:
Version support: Support specific versions/branches initially or just latest?
Next Steps
install-extensioncommand