@@ -34,7 +34,7 @@ The refined plan MUST reuse the existing `gen-plan` schema. Do not invent new to
34341 . ** Execution Mode Setup** : Parse CLI arguments and derive output paths
35352 . ** Load Project Config** : Resolve ` alternative_plan_language ` and mode defaults using ` config-loader.sh ` semantics
36363 . ** IO Validation** : Run ` validate-refine-plan-io.sh `
37- 4 . ** Comment Extraction** : Scan the annotated plan and extract valid ` CMT: ` / ` ENDCMT ` blocks
37+ 4 . ** Comment Extraction** : Scan the annotated plan and extract valid comment blocks ( ` CMT: ` / ` ENDCMT ` , ` <cmt> ` / ` </cmt> ` , ` <comment> ` / ` </comment> ` )
38385 . ** Comment Classification** : Classify each extracted comment for downstream handling
39396 . ** Comment Processing** : Answer questions, apply requested plan edits, and perform targeted research
40407 . ** Plan Refinement** : Produce the comment-free refined plan while preserving the ` gen-plan ` structure
@@ -167,7 +167,7 @@ Handle exit codes exactly:
167167- Exit code 0: Continue to Phase 2
168168- Exit code 1: Report ` Input file not found ` and stop
169169- Exit code 2: Report ` Input file is empty ` and stop
170- - Exit code 3: Report ` Input file has no CMT:/ENDCMT blocks ` and stop
170+ - Exit code 3: Report ` Input file has no comment blocks ` and stop
171171- Exit code 4: Report ` Input file is missing required gen-plan sections ` and stop
172172- Exit code 5: Report ` Output directory does not exist or is not writable - please fix it ` and stop
173173- Exit code 6: Report ` QA directory is not writable ` and stop
@@ -196,17 +196,32 @@ Track these states while scanning the validated input in document order:
196196
197197Extraction rules:
198198
199- 1 . Recognize ` CMT: ` as the start marker and ` ENDCMT ` as the end marker.
200- 2 . Support both inline and multi-line blocks:
199+ 1 . Support three comment formats:
200+ - Classic: ` CMT: ` as start marker and ` ENDCMT ` as end marker
201+ - Short tag: ` <cmt> ` as start marker and ` </cmt> ` as end marker
202+ - Long tag: ` <comment> ` as start marker and ` </comment> ` as end marker
203+ 2 . Support both inline and multi-line blocks for all formats:
201204 - Inline: ` Text before CMT: comment text ENDCMT text after `
205+ - Inline: ` Text before <cmt>comment text</cmt> text after `
206+ - Inline: ` Text before <comment>comment text</comment> text after `
202207 - Multi-line:
203208 ``` markdown
204209 CMT:
205210 comment text
206211 ENDCMT
207212 ```
208- 3 . Ignore ` CMT: ` and ` ENDCMT ` sequences inside fenced code blocks.
209- 4 . Ignore ` CMT: ` and ` ENDCMT ` sequences inside HTML comments.
213+ ```markdown
214+ <cmt>
215+ comment text
216+ </cmt>
217+ ```
218+ ```markdown
219+ <comment>
220+ comment text
221+ </comment>
222+ ```
223+ 3 . Ignore comment markers inside fenced code blocks.
224+ 4 . Ignore comment markers inside HTML comments.
2102255 . Update ` NEAREST_HEADING ` whenever a Markdown heading is encountered outside fenced code and HTML comments.
2112266 . Preserve surrounding non-comment text when removing inline comment blocks from the working plan text.
2122277 . Assign raw comment IDs in document order as ` CMT-1 ` , ` CMT-2 ` , ... only for non-empty blocks.
@@ -217,7 +232,7 @@ Extraction rules:
217232For each non-empty comment block, capture:
218233
219234- ` id ` (` CMT-N ` )
220- - ` original_text ` exactly as written between ` CMT: ` and ` ENDCMT `
235+ - ` original_text ` exactly as written between the comment markers
221236- ` normalized_text ` with surrounding whitespace trimmed
222237- ` start_line ` , ` start_column `
223238- ` end_line ` , ` end_column `
@@ -230,8 +245,8 @@ For each non-empty comment block, capture:
230245
231246These are fatal extraction errors:
232247
233- 1 . Nested ` CMT: ` while already inside a comment block
234- 2 . ` ENDCMT ` encountered while not inside a comment block
248+ 1 . Nested comment start marker while already inside a comment block
249+ 2 . Comment end marker encountered while not inside a comment block or wrong end marker for the format
2352503 . End of file reached while still inside a comment block
236251
237252Every fatal parse error MUST report:
@@ -243,9 +258,9 @@ Every fatal parse error MUST report:
243258
244259Examples of acceptable messages:
245260
246- - ` Comment parse error: nested CMT block at line 48, column 3 near "## Acceptance Criteria" (context: "CMT: split AC-2...") `
247- - ` Comment parse error: stray ENDCMT at line 109, column 1 near "## Task Breakdown" (context: "ENDCMT ") `
248- - ` Comment parse error: missing ENDCMT for block opened at line 72, column 5 near "## Dependencies and Sequence" `
261+ - ` Comment parse error: nested comment block at line 48, column 3 near "## Acceptance Criteria" (context: "<cmt> split AC-2...") `
262+ - ` Comment parse error: stray comment end marker at line 109, column 1 near "## Task Breakdown" (context: "</comment> ") `
263+ - ` Comment parse error: missing end marker for block opened at line 72, column 5 near "## Dependencies and Sequence" `
249264
250265### Outputs from Phase 2
251266
@@ -403,7 +418,7 @@ Optional sections that MUST be preserved when present in the input:
403418
404419### Refinement Rules
405420
406- 1 . Remove every resolved ` CMT: ` / ` ENDCMT ` tag and all enclosed comment text from the refined plan.
421+ 1 . Remove every resolved comment marker and all enclosed comment text from the refined plan.
4074222 . Do not add any new top-level schema section.
4084233 . Preserve ` AC-X ` / ` AC-X.Y ` formatting.
4094244 . Preserve task IDs unless a comment explicitly requests a structural change.
@@ -429,7 +444,7 @@ Rules:
429444Before generating the QA document, verify:
430445
4314461 . All required sections are still present
432- 2 . No ` CMT: ` or ` ENDCMT ` markers remain
447+ 2 . No comment markers remain
4334483 . Every referenced ` AC-* ` exists
4344494 . Every task dependency references an existing task ID or ` - `
4354505 . Every task row has exactly one valid routing tag: ` coding ` or ` analyze `
0 commit comments