Skip to content

[Bug]: /speckit-tasks treats tests as optional even when the constitution requires test-first #5632

Backlog

Description

@davidhogg

Bug Description

/speckit-tasks treats tests as optional even when the project constitution makes test-first development mandatory. The skill says:

Tests are OPTIONAL: Only generate test tasks if explicitly requested in the feature specification or if user requests TDD approach.

templates/tasks-template.md says the same ("Tests are OPTIONAL - only include them if explicitly requested in the feature specification") and labels each story's test section "OPTIONAL - only if tests requested".

The tasks command does load .specify/memory/constitution.md, but this explicit rule wins over it in practice, so a non-negotiable principle such as "a failing test MUST exist before implementation" is ignored. /speckit-analyze and /speckit-converge both treat the constitution as non-negotiable, so the generated tasks.md then fails the project's own analysis. This is not a request for built-in TDD tooling (#2634); it is about /speckit-tasks honouring a principle the constitution already states.

Steps to Reproduce

  1. specify init --here --ai claude (Spec Kit 1.3.2).
  2. Put a test-first principle in .specify/memory/constitution.md, e.g. "All production code is written test-first. A failing test MUST exist and be observed failing before implementation (NON-NEGOTIABLE)."
  3. Run /speckit-specify and /speckit-plan for any feature, without mentioning tests in the request.
  4. Run /speckit-tasks without arguments.

Expected Behavior

/speckit-tasks should follow the constitution it already loads and generate a failing-test task before each implementation task when the constitution requires test-first development. Tests stay optional only for projects whose constitution doesn't require them.

Actual Behavior

No test tasks are generated unless the request or spec explicitly asks for them. Users with a test-first constitution have to repeat "test-first" in every /speckit-tasks call, or edit the generated skill and template locally. Those local edits are overwritten on the next specify init or upgrade.

Specify CLI Version

1.3.2

AI Agent

Claude Code

Operating System

macOS 27.2

Python Version

3.15.2

Error Logs

N/A (no error; wrong output)

Additional Context

Still present on main (checked against v1.4.5): templates/commands/tasks.md lines 88, 148, 216 and templates/tasks-template.md lines 12, 83, 109, 131, 157.

Possible fix: in templates/commands/tasks.md, replace the "Tests are OPTIONAL" rule with: "Generate test tasks when the spec or user asks for them, or when the constitution requires test-first development; in that case put a failing-test task before each implementation task." Then drop the "OPTIONAL" wording from templates/tasks-template.md (or make it conditional on the constitution).

AI Disclosure

Drafted with Claude Code (Claude Opus 5.5), human-supervised: the user asked for the report and approved the final text before posting. The issue was found during an AI-assisted audit of the project's agent configuration.

Activity

  1. added
    triage-must-have
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-must-have

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions