You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: /speckit-implement counts checkbox markers inside fenced code blocks — example checkboxes can falsely block implementation #4272
The checklist scan counts every - [ ] / - [x] / - [X] line in every checklist file, including lines inside fenced code blocks. A checklist that documents the checkbox format with an example fence therefore reports phantom unchecked items, and implementation is blocked by checkboxes that aren't real work items.
The clarify command already handles this correctly — .claude/skills/speckit-clarify/SKILL.md specifies parsing Markdown outside code fences — so this is an internal inconsistency between the two commands' parsers as much as a bug.
Expected behavior
Count checkbox markers only outside fenced code blocks (same contract as the clarify parser), keeping the existing per-checklist total/checked/unchecked reporting.
The report concerns Spec Kit v1.0.1 and the /speckit-implement checklist gate. Its documented scan counts every - [ ], - [x], and - [X] line in checklist files, including examples inside fenced Markdown code blocks. A checklist documenting checkbox syntax can therefore contribute phantom unchecked items and incorrectly block implementation. The report also notes that /speckit-clarify already defines parsing checkbox lines outside code fences, exposing an inconsistency between the command contracts.
No additional comments were present on the issue.
Symptom
A checkbox-looking line inside a fenced code example is treated as a real checklist item by /speckit-implement, so the command can report unchecked work and stop for confirmation even when all actual checklist items are complete. Expected behavior is to count only task-list checkbox markers outside fenced code blocks, while preserving the existing per-checklist total/checked/unchecked report.
Reproduction
Create a feature checklists/ directory containing a checklist with at least one real checkbox and a fenced Markdown example containing a line such as - [ ] Example item.
Run /speckit-implement for that feature.
Observe that the checklist status includes the fenced example in its totals and may report a false unchecked item.
The exact installed integration and command invocation used by the reporter are [NEEDS CLARIFICATION: not included in the issue].
Suspected Code Paths
templates/commands/implement.md:56-64 — defines the checklist gate and currently says to count every matching checkbox line, without excluding fenced code blocks; this is the direct source of the phantom-item behavior in generated command instructions.
templates/commands/clarify.md:215-216 — defines the contrasting behavior: recognize checkbox lines outside code fences and ignore other content. This is the closest existing contract for the intended parser behavior.
templates/checklist-template.md:41 — documents that the implement command reads checklist checkbox state as a gate, making the implement scan behavior user-visible and contractually relevant.
Root Cause Hypothesis
The implement command’s checklist instructions specify a line-oriented marker scan but omit Markdown fence tracking. As a result, an agent following the instructions has no rule to distinguish task-list items from checkbox syntax shown in fenced documentation. Confidence: high; the relevant instruction explicitly includes all matching lines, while the clarify command explicitly requires exclusion of code fences.
Proposed Remediation
Preferred: Update the canonical implement command instructions to scan checklist files while tracking fenced-code-block state and to count only matching checkbox lines outside those fences. Preserve the existing total/checked/unchecked status table and the read-only gate behavior. Align the wording with the clarify command’s established contract, including handling of fenced blocks and the existing marker variants.
Ensure the same corrected command content is propagated to any maintained generated/preset surface that carries the implement checklist gate; do not introduce a different parser contract for an integration-specific copy.
Alternatives:
Add a shared, deterministic checklist parser and have command/runtime surfaces use it. This would reduce duplicated parsing rules but is broader than the current template-level defect and may require changes to integration generation and tests.
Require checklist examples to avoid task-list syntax inside fences. This is only a workaround and would leave valid Markdown documentation vulnerable to false positives, so it is not preferred.
Files likely to change:
templates/commands/implement.md
Any generated or integration-specific implement command fixture that mirrors the canonical checklist gate
The relevant command-template or integration tests covering checklist scanning, if present
Tests to add or update:
A positive case where real checked and unchecked items outside fences are counted with unchanged totals/status reporting.
A regression case where - [ ], - [x], and - [X] inside fenced code blocks are ignored, including fences with a language tag.
A case with multiple fenced blocks and nested/indented real checklist items to verify fence state does not leak and valid items remain countable.
A parity check ensuring implement and clarify use the same outside-code-fence checklist contract.
Risks & Considerations
The change is expected to alter only checklist reporting for files containing checkbox-like fenced examples; checklists without such examples should retain existing counts.
Fence tracking must handle opening and closing fenced blocks consistently, including language annotations and multiple blocks, without changing the read-only gate or marker semantics.
If any generated integration copies are not updated, users may continue to see inconsistent behavior depending on the selected agent integration.
Open Questions
[NEEDS CLARIFICATION: Which installed agent integration and exact feature/checklist file produced the original false block?]
[NEEDS CLARIFICATION: Should the implementation support both backtick and tilde Markdown fences, or only the fence forms currently documented by the command contracts?]
Activity
fix(implement): count checkbox markers outside code fences only
github-actions commentedon Oct 15, 2026
Bug assessment — fenced-checkbox-counts: Valid · severity medium
Bug Assessment:
/speckit-implementcounts checkbox markers inside fenced code blocksReport (summarized)
The report concerns Spec Kit v1.0.1 and the
/speckit-implementchecklist gate. Its documented scan counts every- [ ],- [x], and- [X]line in checklist files, including examples inside fenced Markdown code blocks. A checklist documenting checkbox syntax can therefore contribute phantom unchecked items and incorrectly block implementation. The report also notes that/speckit-clarifyalready defines parsing checkbox lines outside code fences, exposing an inconsistency between the command contracts.No additional comments were present on the issue.
Symptom
A checkbox-looking line inside a fenced code example is treated as a real checklist item by
/speckit-implement, so the command can report unchecked work and stop for confirmation even when all actual checklist items are complete. Expected behavior is to count only task-list checkbox markers outside fenced code blocks, while preserving the existing per-checklist total/checked/unchecked report.Reproduction
checklists/directory containing a checklist with at least one real checkbox and a fenced Markdown example containing a line such as- [ ] Example item./speckit-implementfor that feature.The exact installed integration and command invocation used by the reporter are [NEEDS CLARIFICATION: not included in the issue].
Suspected Code Paths
templates/commands/implement.md:56-64— defines the checklist gate and currently says to count every matching checkbox line, without excluding fenced code blocks; this is the direct source of the phantom-item behavior in generated command instructions.templates/commands/clarify.md:215-216— defines the contrasting behavior: recognize checkbox lines outside code fences and ignore other content. This is the closest existing contract for the intended parser behavior.templates/checklist-template.md:41— documents that the implement command reads checklist checkbox state as a gate, making the implement scan behavior user-visible and contractually relevant.Root Cause Hypothesis
The implement command’s checklist instructions specify a line-oriented marker scan but omit Markdown fence tracking. As a result, an agent following the instructions has no rule to distinguish task-list items from checkbox syntax shown in fenced documentation. Confidence: high; the relevant instruction explicitly includes all matching lines, while the clarify command explicitly requires exclusion of code fences.
Proposed Remediation
Preferred: Update the canonical implement command instructions to scan checklist files while tracking fenced-code-block state and to count only matching checkbox lines outside those fences. Preserve the existing total/checked/unchecked status table and the read-only gate behavior. Align the wording with the clarify command’s established contract, including handling of fenced blocks and the existing marker variants.
Ensure the same corrected command content is propagated to any maintained generated/preset surface that carries the implement checklist gate; do not introduce a different parser contract for an integration-specific copy.
Alternatives:
Files likely to change:
templates/commands/implement.mdTests to add or update:
- [ ],- [x], and- [X]inside fenced code blocks are ignored, including fences with a language tag.Risks & Considerations
Open Questions