* feat: add Table of Contents to generated markdown documents (#1970) * fix: address Copilot review - clarify TOC placement wording * fix: include TOC sections in structure templates * fix: include TOC in structure templates and fix tasks TOC placement wording * fix: correct TOC anchors to match headings with mandatory suffix * fix: include all ##-level headings in tasks-template TOC * fix: add missing TOC entries in tasks-template, remove leading blank line in * fix: move TOC after metadata block and include all ## headings in tasks-template * fix: use plain text for dynamic phase entries in tasks-template TOC * fix: remove hardcoded anchor links from template TOCs, use plain text exemplars * fix: remove HTML comments from template TOCs * fix: add missing Parallel Example heading to tasks-template TOC * revert: remove all core template changes, pivot to preset approach * feat: deliver TOC navigation as a preset (closes #1970) Pivots from core template changes to a preset approach per reviewer request. Adds presets/toc-navigation/ with 3 template overrides and 3 command overrides that add Table of Contents sections to generated spec.md, plan.md, and tasks.md documents. Addresses all 8 impact concerns from review: - Templates use anchor links (not plain text) matching command instructions - All 12 tasks-template headings accounted for (dynamic phases as plain text) - spec-template anchors include -mandatory suffix - TOC placed after Note paragraph in plan-template - Self-reference exclusion explicit in all commands - Clarify stale TOC instruction in specify command - Implement misparse warning in tasks command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: publish toc-navigation preset to community catalog (#1970) Move preset to standalone repository per maintainer guidance: https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation - Remove presets/toc-navigation/ from core repo - Add toc-navigation entry to catalog.community.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add toc-navigation preset to main README community presets table Adds Table of Contents Navigation entry (alphabetically between Pirate Speak and VS Code Ask Questions) to the community presets table in README.md as requested by maintainer. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Presets
Presets are stackable, priority-ordered collections of template and command overrides for Spec Kit. They let you customize both the artifacts produced by the Spec-Driven Development workflow (specs, plans, tasks, checklists, constitutions) and the commands that guide the LLM in creating them — without forking or modifying core files.
How It Works
When Spec Kit needs a template (e.g. spec-template), it walks a resolution stack:
.specify/templates/overrides/— project-local one-off overrides.specify/presets/<preset-id>/templates/— installed presets (sorted by priority).specify/extensions/<ext-id>/templates/— extension-provided templates.specify/templates/— core templates shipped with Spec Kit
If no preset is installed, core templates are used — exactly the same behavior as before presets existed.
Template resolution happens at runtime — although preset files are copied into .specify/presets/<id>/ during installation, Spec Kit walks the resolution stack on every template lookup rather than merging templates into a single location.
For detailed resolution and command registration flows, see ARCHITECTURE.md.
Command Overrides
Presets can also override the commands that guide the SDD workflow. Templates define what gets produced (specs, plans, constitutions); commands define how the LLM produces them (the step-by-step instructions).
Unlike templates, command overrides are applied at install time. When a preset includes type: "command" entries, the commands are registered into all detected agent directories (.claude/commands/, .gemini/commands/, etc.) in the correct format (Markdown or TOML with appropriate argument placeholders). When the preset is removed, the registered commands are cleaned up.
Quick Start
# Search available presets
specify preset search
# Install a preset from the catalog
specify preset add healthcare-compliance
# Install from a local directory (for development)
specify preset add --dev ./my-preset
# Install with a specific priority (lower = higher precedence)
specify preset add healthcare-compliance --priority 5
# List installed presets
specify preset list
# See which template a name resolves to
specify preset resolve spec-template
# Get detailed info about a preset
specify preset info healthcare-compliance
# Remove a preset
specify preset remove healthcare-compliance
Stacking Presets
Multiple presets can be installed simultaneously. The --priority flag controls which one wins when two presets provide the same template (lower number = higher precedence):
specify preset add enterprise-safe --priority 10 # base layer
specify preset add healthcare-compliance --priority 5 # overrides enterprise-safe
specify preset add pm-workflow --priority 1 # overrides everything
Presets override, they don't merge. If two presets both provide spec-template, the one with the lowest priority number wins entirely.
Catalog Management
Presets are discovered through catalogs. By default, Spec Kit uses the official and community catalogs:
Note
Community presets are independently created and maintained by their respective authors. GitHub and the Spec Kit maintainers may review pull requests that add entries to the community catalog for formatting, catalog structure, or policy compliance, but they do not review, audit, endorse, or support the preset code itself. Review preset source code before installation and use at your own discretion.
# List active catalogs
specify preset catalog list
# Add a custom catalog
specify preset catalog add https://example.com/catalog.json --name my-org --install-allowed
# Remove a catalog
specify preset catalog remove my-org
Creating a Preset
See scaffold/ for a scaffold you can copy to create your own preset.
- Copy
scaffold/to a new directory - Edit
preset.ymlwith your preset's metadata - Add or replace templates in
templates/ - Test locally with
specify preset add --dev . - Verify with
specify preset resolve spec-template
Environment Variables
| Variable | Description |
|---|---|
SPECKIT_PRESET_CATALOG_URL |
Override the catalog URL (replaces all defaults) |
Configuration Files
| File | Scope | Description |
|---|---|---|
.specify/preset-catalogs.yml |
Project | Custom catalog stack for this project |
~/.specify/preset-catalogs.yml |
User | Custom catalog stack for all projects |
Future Considerations
The following enhancements are under consideration for future releases:
-
Composition strategies — Allow presets to declare a
strategyper template instead of the defaultreplace:Type replaceprependappendwraptemplate ✓ (default) ✓ ✓ ✓ command ✓ (default) ✓ ✓ ✓ script ✓ (default) — — ✓ For artifacts and commands (which are LLM directives),
wrapwould inject preset content before and after the core template using a{CORE_TEMPLATE}placeholder. For scripts,wrapwould run custom logic before/after the core script via a$CORE_SCRIPTvariable. -
Script overrides — Enable presets to provide alternative versions of core scripts (e.g.
create-new-feature.sh) for workflow customization. Astrategy: "wrap"option could allow presets to run custom logic before/after the core script without fully replacing it.