@@ -81,29 +81,73 @@ This skill runs in two modes. Decide first; if unclear, ask.
8181 for, per surface. ** Read this file before forming conclusions** —
8282 it is the core of the skill.
8383
84- 4 . ** Record findings in the structured model.** Capture each finding
85- as a JSON object per the schema in ` references/output-formats.md ` .
86- One finding = one defect. Assign severity using the rubric below
87- and record ` confidence ` honestly (` confirmed ` only if you traced
88- the code path or built a repro; otherwise ` likely ` / ` tentative ` ).
89-
90- 5 . ** Emit the three outputs.** From the single ` findings.json ` ,
91- render the report, the SARIF, and the inline annotations. Use the
92- script — do not hand-write SARIF:
84+ 4 . ** Record findings in the structured model.** Pick the review's
85+ directory first: ` docs/security/<YYYY-MM-DD-slug>/ ` (today's date
86+ plus a short scope slug, e.g.
87+ ` docs/security/2026-06-09-full-repo-audit/ ` ). Author the findings
88+ as ` <dir>/findings.json ` per the schema in
89+ ` references/output-formats.md ` . One finding = one defect. Assign
90+ severity using the rubric below and record ` confidence ` honestly
91+ (` confirmed ` only if you traced the code path or built a repro;
92+ otherwise ` likely ` / ` tentative ` ).
93+
94+ 5 . ** Emit the three outputs.** From the single findings file,
95+ render the report, the SARIF, and the inline annotations into
96+ the same directory. Use the script — do not hand-write SARIF:
9397
9498 ``` bash
95- go run ./cmd/mdsmith-secreview render findings.json --out-dir < dir>
99+ go run ./cmd/mdsmith-secreview render \
100+ docs/security/< stem> /findings.json \
101+ --out-dir docs/security/< stem> /
96102 ```
97103
98- It writes ` security-review.md ` , ` findings.sarif ` , and
99- ` inline-annotations.json ` ; see ` references/output-formats.md ` for
100- the schema and what each output is for.
101-
102- 6 . ** Summarize honestly.** Lead with the highest-severity confirmed
104+ It writes ` report.md ` , ` findings.sarif ` , and
105+ ` inline-annotations.json ` beside the ` findings.json ` input. The
106+ schema and the purpose of each output live in
107+ ` references/output-formats.md ` . The per-audit directory keeps
108+ every review's files apart, so a later review never overwrites an
109+ earlier one. ` SECURITY.md ` 's catalog indexes the new ` report.md `
110+ on the next fix pass.
111+
112+ Then make the report pass the linter: add the front matter
113+ ` docs/security/proto.md ` requires (` date ` , ` scope ` , ` method ` ,
114+ ` title ` , ` summary ` ), keep the H1 directly after the closing
115+ ` --- ` , and run ` mdsmith fix ` on it. Regenerate ` SECURITY.md ` 's
116+ catalog with ` mdsmith fix SECURITY.md ` .
117+
118+ 6 . ** Schedule the fixes as plans.** A review that finds defects
119+ but leaves no track record of how they get fixed is half a
120+ review. Turn the actionable findings into ` plan/ ` files so the
121+ fix work is queued like any other task. Group by the fix, not by
122+ the finding: one plan covers one coherent change even when it
123+ closes several findings (the
124+ [ ` 83_security-hardening-batch ` ] ( ../../../plan/83_security-hardening-batch.md )
125+ plan is the canonical multi-finding batch).
126+
127+ - File one plan per Critical/High/Medium finding (or per shared
128+ fix). Batch the Low/informational/hardening items into a single
129+ "security hardening batch — ` <date> ` " plan rather than one file
130+ each.
131+ - Use the next free numeric prefix in ` plan/ ` and follow
132+ [ ` plan/proto.md ` ] ( ../../../plan/proto.md ) : front-matter ` id ` ,
133+ ` title ` , ` status: "🔲" ` , a ` summary ` , and a ` model ` suggestion;
134+ body sections Goal, Tasks (red/green TDD steps), and Acceptance
135+ Criteria.
136+ - In the Goal, name each finding it closes by id and link the
137+ review's ` report.md ` , so the plan and the audit cross-reference.
138+ - Run ` mdsmith fix PLAN.md ` to refresh the index, then
139+ ` mdsmith check plan/ ` so the new files pass.
140+ - In ** PR-review mode** , prefer fixing a finding in the PR itself;
141+ file a plan only for follow-up work that is out of the PR's
142+ scope. In ** audit mode** , file plans for every actionable
143+ finding.
144+
145+ 7 . ** Summarize honestly.** Lead with the highest-severity confirmed
103146 findings. Separate confirmed defects from hardening suggestions.
104- If you could not reach a conclusion on an in-scope area (e.g. you
105- couldn't find the recipe-execution code), say so explicitly
106- rather than implying it's clean.
147+ List the plan files you filed. If you could not reach a
148+ conclusion on an in-scope area (e.g. you couldn't find the
149+ recipe-execution code), say so explicitly rather than implying
150+ it's clean.
107151
108152## Severity rubric
109153
0 commit comments