Skip to content

[Bug]: taskstoissues regex \bT\d{3}\b misses convergence task IDs at T1000 and beyond #3866

Description

@patberry1961

Bug Description

templates/commands/taskstoissues.md and templates/commands/converge.md disagree on the task-ID format, so /speckit.taskstoissues silently skips convergence tasks numbered T1000 and above.

Producerconverge.md:206 assigns IDs with:

zero-padded IDs `T{M+1:03d}, T{M+2:03d}, …`

03d is a minimum field width, not a cap, so once the task count passes 999 this correctly produces 4-digit IDs (T999T1000).

Consumertaskstoissues.md:67 defines task IDs as "a T followed by three digits, e.g. T001" and matches issue titles with:

task ID pattern `\bT\d{3}\b`

\d{3} with a trailing \b matches exactly three digits. Given T1000, the \b after \d{3} fails (position between 0 and 0 is not a word boundary), so there is no match at all.

The consequence is a silent no-op rather than an error: affected tasks are neither deduplicated against existing issues nor converted into new ones.

Steps to Reproduce

  1. In a project whose tasks.md already contains more than 999 tasks, run /speckit.converge.
  2. Convergence appends a ## Phase N: Convergence section with IDs at T1000+ (per converge.md step 3).
  3. Run /speckit.taskstoissues.
  4. No issues are created for the T1000+ tasks, and re-running does not report them as already having issues.

A large tasks.md is awkward to stage by hand; the mismatch is also visible directly by testing the documented pattern against the documented ID format:

import re
re.search(r"\bT\d{3}\b", "T1000: example task")  # -> None
re.search(r"\bT\d{3,}\b", "T1000: example task") # -> matches "T1000"

Expected Behavior

Any task ID that converge.md can emit should be recognized by taskstoissues.md — including IDs longer than three digits — so dedup and issue creation cover every task.

Actual Behavior

Tasks with IDs >= T1000 are invisible to taskstoissues: not extracted, not deduplicated, not converted. No warning or error is emitted, so the run appears to have succeeded completely.

Proposed Fix

Widen the quantifier to three-or-more digits in taskstoissues.md:

-task ID pattern `\bT\d{3}\b`
+task ID pattern `\bT\d{3,}\b`

and update the accompanying prose from "a T followed by three digits" to "at least three digits".

One note on the existing rationale, which reads:

word boundaries so tokens like ST001 or T0010 are not matched by mistake

Both guards still hold under \d{3,}, but for slightly different reasons, so the comment is worth rewording:

  • ST001 — still unmatched. There is no \b between S and T (both word characters), independent of the quantifier.
  • T0010 — now captured as the whole token T0010 rather than being rejected. The trailing \b forces the full digit run to be consumed, so T001 can never match as a prefix of T0010. This is safe because matched IDs are intersected with the ID set built from tasks.md, so a token that is not a real task ID matches nothing.

It may also be worth stating the ID contract explicitly in converge.md (that 03d is a floor and consumers must accept \bT\d{3,}\b), so the producer and consumer cannot drift apart again.

Happy to open a PR for this if useful.

Specify CLI Version

0.14.3 (templates installed recorded 0.14.5.dev0). Also confirmed present on main today and in v0.14.4: templates/commands/taskstoissues.md:67 and templates/commands/converge.md:206.

AI Agent

Claude Code

Operating System

Windows 11 (10.0.22631)

Python Version

Python 3.14.6

Additional Context

Found during review of a fresh specify init rather than at runtime, so the T1000+ threshold was never actually hit in our project — the impact is latent for anyone whose tasks.md grows past 999 tasks. Severity is low for that reason, but the failure mode is silent, which makes it easy to miss when it does occur.

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