Skip to content

Copilot speckit.specify does not honor preset spec-template override #2761

@waychow1986

Description

@waychow1986

Copilot /speckit.specify does not honor preset spec-template override

Summary

When using the Copilot integration, a preset that overrides only spec-template appears to install and resolve correctly, but /speckit.specify still uses the core/default template because the generated Copilot agent instructions hardcode .specify/templates/spec-template.md instead of resolving the effective template through the preset resolution stack.

This makes template-only preset overrides unreliable for Copilot, even though the preset documentation says templates and commands are resolved independently and command overrides are optional.

Environment

  • OS: Windows
  • Spec Kit CLI: specify 0.8.18.dev0
  • Integration: Copilot / VS Code
  • Project initialized with .github/agents/*.agent.md and .github/prompts/*.prompt.md

What The Documentation Implies

The presets documentation says:

  • Presets can provide template files and command files.
  • Each file is looked up independently, so different files can come from different layers.
  • Command overrides are optional.
  • If only different template sections are needed, a template override should be sufficient.
  • specify preset resolve <name> shows the winning file.

Reproduction

  1. Install a preset that provides templates/spec-template.md but does not override speckit.specify.
  2. Verify the template resolves from the preset:
specify preset resolve spec-template

Observed resolver output:

spec-template:
C:\git\harness\crm-project\.specify\presets\harness-presets\templates\spec-template.md
(top layer from: harness-presets v0.1.0)
  1. Run /speckit.specify from Copilot in VS Code.
  2. Inspect the generated spec.md.

Expected Behavior

/speckit.specify should use the effective spec-template selected by the preset resolution stack. In this case, it should use:

.specify/presets/harness-presets/templates/spec-template.md

A preset that only overrides spec-template should affect the generated spec without requiring a command override.

Actual Behavior

The generated spec follows the core/default template instead of the preset template.

The generated Copilot agent file contains hardcoded instructions like:

Copy `.specify/templates/spec-template.md` to `SPECIFY_FEATURE_DIRECTORY/spec.md` as the starting point
Load `.specify/templates/spec-template.md` to understand required sections.

Because the agent reads the core path directly, it bypasses the preset resolver even though specify preset resolve spec-template reports the preset template as the winner.

Why This Matters

This creates a mismatch between preset documentation and Copilot runtime behavior:

  • specify preset resolve spec-template says the preset template wins.
  • The Copilot /speckit.specify agent still reads the core template path.
  • Users are forced to override speckit.specify as a workaround, even when they only want to change the spec template shape.

Suggested Fix

Update the Copilot speckit.specify command/agent instructions so they resolve the effective template instead of hardcoding .specify/templates/spec-template.md.

For example, the generated agent instructions could say:

Resolve the active `spec-template` using the Spec Kit preset resolution stack, equivalent to `specify preset resolve spec-template`, then read that resolved file as the starting template.
Do not directly read `.specify/templates/spec-template.md` unless the resolver returns that path.

Alternatively, the command-generation layer could materialize the winning template path into the generated agent instructions.

Additional Note

After adding a speckit.specify command override, Copilot loads the preset command correctly. However, that should not be required for a template-only override according to the preset documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions