Skip to content

Commit 2ea917e

Browse files
authored
fix(checkpoint): address review findings from adversarial triage (#2180)
Clarify review_mode state transition intent in generate-trail, label step-02 walkthrough branches as normal vs fallback, replace circular communication style rule with config variable refs, swap confirm gate for [inferred] flag, and clarify stats data source as full diff.
1 parent 1b776f5 commit 2ea917e

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You are assisting the user in reviewing a change.
1313

1414
- **Path:line format** — Every code reference must use CWD-relative `path:line` format (no leading `/`) so it is clickable in IDE-embedded terminals (e.g., `src/auth/middleware.ts:42`).
1515
- **Front-load then shut up** — Present the entire output for the current step in a single coherent message. Do not ask questions mid-step, do not drip-feed, do not pause between sections.
16-
- **Communication style**Always output using the exact Agent communication style defined in SKILL.md and the loaded config.
16+
- **Language**Speak in `{communication_language}`. Write any file output in `{document_output_language}`.
1717

1818
## INITIALIZATION
1919

@@ -22,6 +22,7 @@ Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolv
2222
- `implementation_artifacts`
2323
- `planning_artifacts`
2424
- `communication_language`
25+
- `document_output_language`
2526

2627
## FIRST STEP
2728

src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ I built a review trail for this {change_type} (no author-produced trail was foun
3333
{generated trail}
3434
```
3535

36-
Set review mode to `full-trail`. The generated trail is the Suggested Review Order for subsequent steps.
36+
The generated trail serves as the Suggested Review Order for subsequent steps. Set `review_mode` to `full-trail` — a trail now exists, so all downstream steps should treat it as one.
3737

3838
If git is unavailable or the diff cannot be retrieved, return to step-01 with: "Could not generate trail — git unavailable."

src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Set `review_mode` — pick the first match:
5151

5252
1. **`full-trail`** — ENRICH found a spec with a `## Suggested Review Order` section. Intent source: spec's Intent section.
5353
2. **`spec-only`** — ENRICH found a spec but it has no Suggested Review Order. Intent source: spec's Intent section.
54-
3. **`bare-commit`** — no spec found. Intent source: commit message. If the commit message is terse (under 10 words), scan the diff for the primary change pattern and draft a one-sentence intent. Confirm with the user before proceeding.
54+
3. **`bare-commit`** — no spec found. Intent source: commit message. If the commit message is terse (under 10 words), scan the diff for the primary change pattern and draft a one-sentence intent. Flag it as `[inferred]` in the output so the user can correct it.
5555

5656
## PRODUCE ORIENTATION
5757

@@ -63,24 +63,26 @@ Set `review_mode` — pick the first match:
6363

6464
### Surface Area Stats
6565

66-
Best-effort stats from `git diff --stat`. Try these baselines in order:
66+
Best-effort stats derived from the diff. Try these baselines in order:
6767

6868
1. `baseline_commit` from the spec's frontmatter.
6969
2. Branch merge-base against `main` (or the default branch).
7070
3. `HEAD~1..HEAD` (latest commit only — tell the user).
7171
4. If git is unavailable or all of the above fail, skip stats and note: "Could not compute stats."
7272

73+
Use `git diff --stat` and `git diff --numstat` for file-level counts, and scan the full diff content for the richer metrics.
74+
7375
Display as:
7476

7577
```
7678
N files changed · M modules touched · ~L lines of logic · B boundary crossings · P new public interfaces
7779
```
7880

79-
- **Files changed**: from `git diff --stat`.
80-
- **Modules touched**: distinct top-level directories with changes.
81-
- **Lines of logic**: added/modified lines excluding blanks, imports, formatting. `~` because approximate.
81+
- **Files changed**: count from `git diff --stat`.
82+
- **Modules touched**: distinct top-level directories with changes (from `--stat` file paths).
83+
- **Lines of logic**: added/modified lines excluding blanks, imports, formatting. Scan diff content; `~` because approximate.
8284
- **Boundary crossings**: changes spanning more than one top-level module. `0` if single module.
83-
- **New public interfaces**: new exports, endpoints, public methods. `0` if none.
85+
- **New public interfaces**: new exports, endpoints, public methods found in the diff. `0` if none.
8486

8587
Omit any metric you cannot compute rather than guessing.
8688

@@ -96,7 +98,7 @@ Omit any metric you cannot compute rather than guessing.
9698

9799
## FALLBACK TRAIL GENERATION
98100

99-
If review mode is not `full-trail`, read fully and follow `./generate-trail.md` to build one from the diff. Then return here and continue to NEXT.
101+
If review mode is not `full-trail`, read fully and follow `./generate-trail.md` to build one from the diff. Then return here and continue to NEXT. If trail generation fails (e.g., git unavailable), the original review mode is preserved — step-02 handles this with its non-trail path.
100102

101103
## NEXT
102104

src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-02-walkthrough.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Display: `Orientation → [Walkthrough] → Detail Pass → Testing`
1111

1212
### Identify Concerns
1313

14-
**With Suggested Review Order** (`full-trail` mode):
14+
**With Suggested Review Order** (`full-trail` mode — the normal path, including when step-01 generated a trail):
1515

1616
1. Read the Suggested Review Order stops from the spec (or from conversation context if generated by step-01 fallback).
1717
2. Resolve each stop to a file in the current repo. Output in `path:line` format per the standing rule.
1818
3. Read the diff to understand what each stop actually does.
1919
4. Group stops by concern. Stops that share a design intent belong together even if they're in different files. A stop may appear under multiple concerns if it serves multiple purposes.
2020

21-
**Without Suggested Review Order** (`spec-only` or `bare-commit` mode):
21+
**Without Suggested Review Order** (fallback when trail generation failed, e.g., git unavailable):
2222

2323
1. Get the diff against the appropriate baseline (same rules as step 1).
2424
2. Identify concerns by reading the diff for cohesive design intents:

0 commit comments

Comments
 (0)