mirror of
https://github.com/github/spec-kit.git
synced 2026-03-17 19:03:08 +00:00
feat(presets): pluggable preset system with template/command overrides, catalog, and resolver
- Rename 'template packs' to 'presets' to avoid naming collision with core templates - PresetManifest, PresetRegistry, PresetManager, PresetCatalog, PresetResolver in presets.py - Extract CommandRegistrar to agents.py as shared infrastructure - CLI: specify preset list/add/remove/search/resolve/info - CLI: specify preset catalog list/add/remove - --preset option on specify init - Priority-based preset stacking (--priority, lower = higher precedence) - Command overrides registered into all detected agent directories (17+ agents) - Extension command safety: skip registration if target extension not installed - Multi-catalog support: env var, project config, user config, built-in defaults - resolve_template() / Resolve-Template in bash/PowerShell scripts - Self-test preset: overrides all 6 core templates + 1 command - Scaffold with 4 examples: core/extension template and command overrides - Preset catalog (catalog.json, catalog.community.json) - Documentation: README.md, ARCHITECTURE.md, PUBLISHING.md - 110 preset tests, 253 total tests passing
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"updated_at": "2026-03-09T00:00:00Z",
|
||||
"catalog_url": "https://raw.githubusercontent.com/github/spec-kit/main/templates/catalog.community.json",
|
||||
"template_packs": {}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"updated_at": "2026-03-09T00:00:00Z",
|
||||
"catalog_url": "https://raw.githubusercontent.com/github/spec-kit/main/templates/catalog.json",
|
||||
"template_packs": {}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
# My Template Pack
|
||||
|
||||
A custom template pack for Spec Kit.
|
||||
|
||||
## Overview
|
||||
|
||||
This template pack provides customized artifact templates for your development workflow.
|
||||
|
||||
## Templates Included
|
||||
|
||||
| Template | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `spec-template` | artifact | Custom feature specification template |
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Install from local directory (during development)
|
||||
specify template add --dev /path/to/this/directory
|
||||
|
||||
# Install from catalog (after publishing)
|
||||
specify template add my-template-pack
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Once installed, templates are automatically resolved by the Spec Kit scripts.
|
||||
When you run `specify specify` or create a new feature, your custom templates
|
||||
will be used instead of the core defaults.
|
||||
|
||||
## Template Types
|
||||
|
||||
- **artifact** — Document scaffolds (spec.md, plan.md, tasks.md, etc.)
|
||||
- **command** — AI agent prompts (the files in `.claude/commands/`, etc.)
|
||||
- **script** — Custom scripts that replace core scripts
|
||||
|
||||
## Development
|
||||
|
||||
1. Edit templates in the `templates/` directory
|
||||
2. Test with: `specify template add --dev .`
|
||||
3. Verify with: `specify template resolve spec-template`
|
||||
|
||||
## Publishing
|
||||
|
||||
See the [Template Publishing Guide](../../docs/TEMPLATE-PUBLISHING-GUIDE.md) for details.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -1,66 +0,0 @@
|
||||
schema_version: "1.0"
|
||||
|
||||
template_pack:
|
||||
# CUSTOMIZE: Change 'my-template-pack' to your template pack ID (lowercase, hyphen-separated)
|
||||
id: "my-template-pack"
|
||||
|
||||
# CUSTOMIZE: Human-readable name for your template pack
|
||||
name: "My Template Pack"
|
||||
|
||||
# CUSTOMIZE: Update version when releasing (semantic versioning: X.Y.Z)
|
||||
version: "1.0.0"
|
||||
|
||||
# CUSTOMIZE: Brief description (under 200 characters)
|
||||
description: "Brief description of what your template pack provides"
|
||||
|
||||
# CUSTOMIZE: Your name or organization name
|
||||
author: "Your Name"
|
||||
|
||||
# CUSTOMIZE: GitHub repository URL (create before publishing)
|
||||
repository: "https://github.com/your-org/spec-kit-templates-my-pack"
|
||||
|
||||
# REVIEW: License (MIT is recommended for open source)
|
||||
license: "MIT"
|
||||
|
||||
# Requirements for this template pack
|
||||
requires:
|
||||
# CUSTOMIZE: Minimum spec-kit version required
|
||||
speckit_version: ">=0.1.0"
|
||||
|
||||
# Templates provided by this pack
|
||||
provides:
|
||||
templates:
|
||||
# CUSTOMIZE: Define your artifact templates
|
||||
# Artifact templates are document scaffolds (spec.md, plan.md, etc.)
|
||||
- type: "artifact"
|
||||
name: "spec-template"
|
||||
file: "templates/spec-template.md"
|
||||
description: "Custom feature specification template"
|
||||
replaces: "spec-template" # Which core template this overrides (optional)
|
||||
|
||||
# ADD MORE TEMPLATES: Copy this block for each template
|
||||
# - type: "artifact"
|
||||
# name: "plan-template"
|
||||
# file: "templates/plan-template.md"
|
||||
# description: "Custom plan template"
|
||||
# replaces: "plan-template"
|
||||
|
||||
# Command templates (AI agent prompts)
|
||||
# - type: "command"
|
||||
# name: "specify"
|
||||
# file: "commands/specify.md"
|
||||
# description: "Custom specification command"
|
||||
# replaces: "specify"
|
||||
|
||||
# Script templates
|
||||
# - type: "script"
|
||||
# name: "create-new-feature"
|
||||
# file: "scripts/bash/create-new-feature.sh"
|
||||
# description: "Custom feature creation script"
|
||||
# replaces: "create-new-feature"
|
||||
|
||||
# CUSTOMIZE: Add relevant tags (2-5 recommended)
|
||||
# Used for discovery in catalog
|
||||
tags:
|
||||
- "example"
|
||||
- "template"
|
||||
@@ -1,21 +0,0 @@
|
||||
# Feature Specification
|
||||
|
||||
> Replace this with your actual specification content.
|
||||
|
||||
## Overview
|
||||
|
||||
Brief description of the feature.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Requirement 1
|
||||
- Requirement 2
|
||||
|
||||
## Design
|
||||
|
||||
Describe the design approach.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] Criterion 1
|
||||
- [ ] Criterion 2
|
||||
Reference in New Issue
Block a user