Skip to content

[Bug]: Constitution updates do not synchronize active preset-provided task templates #3737

Description

@rcollette

Bug Description

Synchronize Spec Kit constitution updates across built-in and preset-provided templates

Problem

The explicit-task-dependencies preset supplies and activates its own tasks-template.md:

.specify/presets/explicit-task-dependencies/templates/tasks-template.md

The preset declares this template as replace, so it can supersede the built-in task template. A constitution update
that synchronizes only built-in templates can therefore leave the active preset template stale. A Sync Impact Report can
incorrectly report the preset template as updated because no automated validation verifies the effective template stack.

The synchronization mechanism must preserve every template provider's specialized content while applying applicable
constitutional guidance.

Scope

  • Constitution updates must identify all effective templates: built-in, overrides, and enabled preset templates.
  • A constitution amendment affecting task generation must synchronize both built-in and active preset task templates.
  • The approach must generalize to templates supplied by any enabled preset, not hard-code this preset.
  • Preserve each template provider's specialized content and associated generation behavior.

Proposed Resolution

  1. Add a reusable template-stack discovery mechanism for the constitution workflow. It must use the same precedence as
    task-template resolution: template overrides, enabled presets ordered by priority, extension-provided templates, and
    built-in templates.
  2. Update the speckit.constitution agent/prompt checklist to enumerate every resolved template provider, including
    preset templates and preset command files that replace generation behavior.
  3. Require constitution-driven task guidance to be propagated to every effective tasks-template.md.
  4. Define a template-provider-agnostic synchronization contract that applies constitutional guidance without removing
    provider-specific structure, instructions, or generation behavior.
  5. Make the Sync Impact Report derive its “updated” and “pending” template entries from the resolved template stack. It
    must not mark a template as updated unless that file was actually reviewed and changed or explicitly verified as
    already compliant.
  6. Add a validation that fails or reports a pending follow-up when the active replacement template omits mandatory
    guidance present in the constitution-driven task-generation requirements.

Acceptance Criteria

  • Running a constitution update discovers enabled preset templates.
  • The update workflow identifies explicit-task-dependencies as the active replacement for tasks-template.
  • Both the built-in and active preset task templates receive applicable constitution-driven task guidance.
  • Synchronization preserves the specialized content and generation behavior of each affected template provider.
  • The preset template reflects applicable testing, implementation, and validation requirements from the
    constitution.
  • The constitution Sync Impact Report lists every resolved template source and accurately distinguishes updated,
    already-compliant, and pending files.
  • Validation covers an enabled replacement preset and confirms that a base-template-only update is reported as
    incomplete.

Steps to Reproduce

n/a

Expected Behavior

n/a

Actual Behavior

n/a

Specify CLI Version

0.12.18

AI Agent

GitHub Copilot

Operating System

macOS 15.7.4

Python Version

3.14.5

Error Logs

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions