fix(implement): count checkbox markers outside code fences only (#4272) - #4313
Open
ntdatt812 wants to merge 1 commit into
Open
fix(implement): count checkbox markers outside code fences only (#4272)#4313ntdatt812 wants to merge 1 commit into
ntdatt812 wants to merge 1 commit into
Conversation
The checklist gate counted every `- [ ]` / `- [x]` line in every checklist file, fenced blocks included. A checklist that documents the checkbox format with an example fence therefore reported unchecked items nobody can ever tick, and /speckit-implement stops on a non-zero unchecked count -- so writing down the format blocked implementation. /speckit-clarify already scopes its scan to markers outside code fences, so this was also the two commands disagreeing about what a checklist item is. They now state the same rule. Closes github#4272
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4272.
templates/commands/implement.mdtold the agent to count checkbox markers like this:Every line, fenced blocks included. So a checklist that documents the checkbox format — an example fence showing what
- [ ]looks like — reported unchecked items that no reviewer can ever tick, and the gate stops on a non-zero unchecked count. Writing down the format blocked implementation.templates/commands/clarify.mdalready had the right rule and the right words for it:So this was also two commands disagreeing about what a checklist item is, which is the part worth fixing rather than just the count.
Only
templates/commands/implement.mdneeded the change:grepfor the scan instruction acrosstemplates/commands/andpresets/*/commands/returns exactly these two files, and the lean preset'sspeckit.implement.mddoes not carry a counting block.Test
tests/unit/test_checklist_scan_contract.pyturns the rule into a contract rather than a one-time edit. It walks every command template, finds each line that defines what counts as a checkbox marker, and asserts that line also excludes code fences. It is parametrized per instruction, so the failure names the file, the line number and the offending text:Two details that make it a real guard rather than a passing test:
test_the_contract_is_actually_stated_somewherefails if the regex ever matches nothing, so deleting or rewording the scan instruction cannot make the suite green by making the parametrization empty;presets/*/commandstoo, so a preset that grows its own counting block is held to the same rule.Mutation-checked — restoring the old wording in
implement.mdfails exactly one case, the implement one, and the other three stay green:No behaviour outside the checklist scan changes: the per-checklist total/checked/unchecked reporting and the status table are untouched.