From f814c12cff456cb4742290225c94dec76f79652f Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 29 Jul 2026 04:51:13 -0700 Subject: [PATCH] fix(code-review): make no-spec mode an explicit supported path (#2645) * fix(code-review): make no-spec mode an explicit supported path Replace ambiguous "If yes / If no" language in step-01 spec-context selection. Honor explicit no-spec declarations without asking, keep known specs on full mode, and otherwise offer path vs continue-without. * fix(code-review): clear spec_file when entering no-spec mode Keep frontmatter consistent when an explicit no-spec declaration overrides a Tier 1/2 path so later steps do not treat a stale path as intentional. --- .../bmad-code-review/steps/step-01-gather-context.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md b/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md index e7ea61ca7..3add4ad7b 100644 --- a/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md +++ b/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md @@ -64,10 +64,13 @@ story_key: '' # set at runtime when discovered from sprint status - After constructing `{diff_output}`, verify it is non-empty regardless of source type. If empty, HALT and tell the user there is nothing to review. 4. **Set the spec context.** - - If `{spec_file}` is already set (from Tier 1 or Tier 2): verify the file exists and is readable, then set `{review_mode}` = `"full"`. - - Otherwise, ask the user: **Is there a spec or story file that provides context for these changes?** - - If yes: set `{spec_file}` to the path provided, verify the file exists and is readable, then set `{review_mode}` = `"full"`. - - If no: set `{review_mode}` = `"no-spec"`. + - If the triggering request or recent conversation **explicitly** states there is no spec (e.g. "no spec", "without a spec", "no-spec"): set `{review_mode}` = `"no-spec"` and clear `{spec_file}` (set it to `''`). Do **not** ask for a spec. Do **not** infer no-spec mode merely because the invocation omitted a spec path. + - Else if `{spec_file}` is already set (from Tier 1 or Tier 2): verify the file exists and is readable, then set `{review_mode}` = `"full"`. + - Else (neither a spec path nor an explicit no-spec declaration is present): ask the user to choose: + 1. Provide a spec or story file path for context; or + 2. Continue without a spec. + - If the user provides a path: set `{spec_file}` to that path, verify the file exists and is readable, then set `{review_mode}` = `"full"`. + - If the user explicitly chooses to continue without a spec: set `{review_mode}` = `"no-spec"`. 5. If `{review_mode}` = `"full"` and the file at `{spec_file}` has a `context` field in its frontmatter listing additional docs, load each referenced document. Warn the user about any docs that cannot be found.