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
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.
Copy file name to clipboardExpand all lines: src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ You are assisting the user in reviewing a change.
13
13
14
14
-**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`).
15
15
-**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}`.
17
17
18
18
## INITIALIZATION
19
19
@@ -22,6 +22,7 @@ Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolv
Copy file name to clipboardExpand all lines: src/bmm-skills/4-implementation/bmad-checkpoint-preview/generate-trail.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,6 @@ I built a review trail for this {change_type} (no author-produced trail was foun
33
33
{generated trail}
34
34
```
35
35
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.
37
37
38
38
If git is unavailable or the diff cannot be retrieved, return to step-01 with: "Could not generate trail — git unavailable."
Copy file name to clipboardExpand all lines: src/bmm-skills/4-implementation/bmad-checkpoint-preview/step-01-orientation.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Set `review_mode` — pick the first match:
51
51
52
52
1.**`full-trail`** — ENRICH found a spec with a `## Suggested Review Order` section. Intent source: spec's Intent section.
53
53
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.
55
55
56
56
## PRODUCE ORIENTATION
57
57
@@ -63,24 +63,26 @@ Set `review_mode` — pick the first match:
63
63
64
64
### Surface Area Stats
65
65
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:
67
67
68
68
1.`baseline_commit` from the spec's frontmatter.
69
69
2. Branch merge-base against `main` (or the default branch).
70
70
3.`HEAD~1..HEAD` (latest commit only — tell the user).
71
71
4. If git is unavailable or all of the above fail, skip stats and note: "Could not compute stats."
72
72
73
+
Use `git diff --stat` and `git diff --numstat` for file-level counts, and scan the full diff content for the richer metrics.
74
+
73
75
Display as:
74
76
75
77
```
76
78
N files changed · M modules touched · ~L lines of logic · B boundary crossings · P new public interfaces
77
79
```
78
80
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.
-**Lines of logic**: added/modified lines excluding blanks, imports, formatting. Scan diff content; `~` because approximate.
82
84
-**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.
84
86
85
87
Omit any metric you cannot compute rather than guessing.
86
88
@@ -96,7 +98,7 @@ Omit any metric you cannot compute rather than guessing.
96
98
97
99
## FALLBACK TRAIL GENERATION
98
100
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.
**With Suggested Review Order** (`full-trail` mode — the normal path, including when step-01 generated a trail):
15
15
16
16
1. Read the Suggested Review Order stops from the spec (or from conversation context if generated by step-01 fallback).
17
17
2. Resolve each stop to a file in the current repo. Output in `path:line` format per the standing rule.
18
18
3. Read the diff to understand what each stop actually does.
19
19
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.
20
20
21
-
**Without Suggested Review Order** (`spec-only` or `bare-commit` mode):
0 commit comments