Skip to content

Commit 1c740ad

Browse files
committed
refire rules and skills for shorter output - while still preserving the deep audit analysis
1 parent 2b19a26 commit 1c740ad

2 files changed

Lines changed: 50 additions & 91 deletions

File tree

.cursor/rules/audit-review.mdc

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,27 @@ Use this format when the user asks for a deep audit, fault injection, or review
99

1010
## Required Output
1111

12-
- Report **confirmed defects only** first.
13-
- Classify each finding as **High**, **Medium**, or **Low**.
14-
- For each finding include:
12+
The audit process must remain deep (all analysis dimensions below are still required), but the final user-visible report must include only:
13+
14+
1. **Confirmed defects**
15+
2. **Coverage summary**
16+
17+
Output rules:
18+
19+
- Report **confirmed defects only** (no hypotheticals).
20+
- Classify each defect as **High**, **Medium**, or **Low**.
21+
- For each confirmed defect include:
1522
- short title,
1623
- concrete impact,
1724
- exact file/function reference,
1825
- brief proof sketch tied to code path,
19-
- at least one **code snippet** that demonstrates the defect condition.
20-
- Include an **Assumptions & Limits** section for static reasoning:
21-
- what was not executed at runtime,
22-
- what could not be proven without dynamic testing.
23-
- Include **audit confidence**:
24-
- overall confidence (High/Medium/Low),
25-
- what additional evidence would raise confidence.
26+
- code snippet(s) **only when needed** to prove the defect condition.
27+
- If no defects are confirmed, explicitly output `No confirmed defects in reviewed scope.`
28+
- Include a concise **Coverage summary** with:
29+
- scope reviewed,
30+
- categories failed,
31+
- categories passed,
32+
- assumptions/limits (single concise line).
2633

2734
## Severity Rubric (Required)
2835

@@ -119,18 +126,10 @@ Use this format when the user asks for a deep audit, fault injection, or review
119126
- one primary defect per root cause, with secondary manifestations listed under it.
120127
- If no defects are found, explicitly report residual risks and untested paths.
121128

122-
## Canonical Report Order (Required)
123-
124-
1. Scope and partitions (if large PR)
125-
2. Call graph
126-
3. Transition matrix
127-
4. Logical code-path testing summary
128-
5. Fault categories and category-by-category injection results
129-
6. Confirmed defects (High/Medium/Low)
130-
7. Coverage accounting + stop-condition status
131-
8. Assumptions & Limits
132-
9. Confidence rating and confidence-raising evidence
133-
10. Residual risks and untested paths
129+
## Report Order (Required)
130+
131+
1. Confirmed defects (High/Medium/Low)
132+
2. Coverage summary
134133

135134
## Multithreaded DB Priority
136135

.cursor/skills/audit-review/SKILL.md

Lines changed: 29 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -77,88 +77,48 @@ For ClickHouse-style multithreaded systems, prioritize these checks before lower
7777
4. Concurrent container mutation + iterator/reference use.
7878
5. Exception/cancellation paths that can leave locks/state inconsistent.
7979

80-
## Output Contract
81-
82-
- Start with confirmed defects only.
83-
- Group by severity: High, Medium, Low.
84-
- For each defect include:
85-
- title,
86-
- impact,
87-
- file/function anchor,
88-
- fault-injection trigger,
89-
- transition mapping,
90-
- why it is a defect (not a design preference),
91-
- smallest logical repro steps,
92-
- likely fix direction (short, concrete: 2-4 bullets or sentences),
93-
- regression test direction (short, concrete: 2-4 bullets or sentences),
94-
- affected subsystem and blast radius,
95-
- at least one code snippet proving the defect.
96-
- Separate “not confirmed” or “needs runtime proof” from confirmed defects.
97-
- Include an **Assumptions & Limits** section for static reasoning.
98-
- Include an overall **confidence rating** and what additional evidence would raise confidence.
99-
- If no defects are found, include residual risks and untested paths.
100-
- For large PRs, include per-partition findings/coverage and final cross-partition risk summary.
101-
- Include a fault-category completion matrix for every deep audit.
102-
103-
### Canonical report order
104-
105-
1. Scope and partitions (if large PR)
106-
2. Call graph
107-
3. Transition matrix
108-
4. Logical code-path testing summary
109-
5. Fault categories and category-by-category injection results
110-
6. Confirmed defects (High/Medium/Low)
111-
7. Coverage accounting + stop-condition status
112-
8. Assumptions & Limits
113-
9. Confidence rating and confidence-raising evidence
114-
10. Residual risks and untested paths
115-
116-
## Standard Audit Report Template (Default: Short PR Comment Form)
117-
118-
Default report style should mirror this pattern:
119-
- `Audit update for PR #<id> (<scope>):`
120-
- `Confirmed defects:`
121-
- short defect bullets by severity
122-
- `Coverage summary:`
123-
124-
Use this short form by default unless the user explicitly asks for the full canonical report.
125-
Keep wording concise and action-oriented. Do not include long narrative sections in short form.
80+
## Output Contract (Required)
81+
82+
Always perform the full deep analysis workflow above, but keep the final user-visible report short and limited to:
83+
84+
1. `Confirmed defects`
85+
2. `Coverage summary`
12686

12787
```markdown
88+
AI audit note: This review comment was generated by AI (gpt-5.3-codex).
89+
12890
Audit update for PR #<id> (<short title/scope>):
12991

13092
Confirmed defects:
13193

132-
- **<Severity>: <short defect title>**
133-
- Impact: <concrete user/system impact>
134-
- Anchor: `<file>` / `<function or code path>`
135-
- Trigger: <smallest condition that triggers defect>
136-
- Why defect: <1-2 lines, behavior not preference>
137-
- Fix direction (short): <2-4 bullets or sentences>
138-
- Regression test direction (short): <2-4 bullets or sentences including positive and edge/failure cases>
139-
- Evidence:
140-
```start:end:path
141-
// minimal proving snippet from code under review
142-
```
94+
<Severity>: <short defect title>
95+
Impact: <concrete user/system impact>
96+
Anchor: <file> / <function or code path>
97+
Trigger: <smallest realistic trigger condition>
98+
Why defect: <1-2 lines, behavior not preference>
99+
Fix direction (short): <1 line>
100+
Regression test direction (short): <1 line>
143101

144-
<repeat per defect, sorted High -> Medium -> Low>
102+
<repeat defects, sorted High -> Medium -> Low>
145103

146104
Coverage summary:
147-
- Scope reviewed: <partitions or key areas, one line>
148-
- Categories failed: <count/list>
149-
- Categories passed: <count only>
150-
- Assumptions/limits: <one line>
105+
106+
Scope reviewed: <one line>
107+
Categories failed: <short list>
108+
Categories passed: <short list or count>
109+
Assumptions/limits: <one line>
151110
```
152111

112+
If no confirmed defects:
113+
- output `No confirmed defects in reviewed scope.`
114+
- still include `Coverage summary`.
115+
153116
### Short-form constraints (required)
154117

155-
- Report confirmed defects only (High/Medium/Low order).
156-
- Keep each defect concise (target: 6-10 lines excluding snippet).
157-
- Include at least one code snippet per confirmed defect.
158-
- Snippet must directly show the defect condition or branch inconsistency.
159-
- If no confirmed defects:
160-
- output one line: `No confirmed defects in reviewed scope.`
161-
- still include `Coverage summary` with assumptions/limits.
118+
- Keep each defect compact and actionable.
119+
- Include only confirmed defects.
120+
- Use snippets only when needed to prove a defect, or when the user asks.
121+
- Do not include full workflow narrative sections in the report.
162122

163123
## Severity Rubric
164124

0 commit comments

Comments
 (0)