git-code-review-agent 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "codereviewagent",
|
|
3
3
|
"displayName": "Code Review Agent (Architect / Dev Lead)",
|
|
4
4
|
"description": "Branch-to-branch git diff code review with Technical Architect and Engineering Lead analysis: PR-style merge-base diffs, architecture, security, delivery risk, and prioritized findings",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"code-review",
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Cursor IDE plugin that ship **skills** and **subagents** via npm, install into `~/.cursor/plugins/local/`, and restart Cursor.
|
|
4
4
|
|
|
5
|
-
**Focus here:** Technical Architect and Engineering Lead **branch-to-branch** code review — generate a git diff (`base...head`), then produce a **formal shareable report
|
|
5
|
+
**Focus here:** Technical Architect and Engineering Lead **branch-to-branch** code review — generate a git diff (`base...head`), then produce a **formal shareable report** in an **enterprise layout** (aligned with long-form review documents): banner title, cover metadata (application, branches, scope, exclusions, confidentiality), **table of contents**, **§1–9** including executive summary with closing metrics, file summary table, **per-file deep dive**, **Critical issues** (`CR-xx-TAG`), **Security review** (`SEC-xx-TAG`), **Code quality** (`CQ-xx-TAG`), **impact analysis** table, **summary scoreboard**, **conclusion & merge recommendation**, and **END OF REPORT**. The same document is written to `code-reviews/` for distribution.
|
|
6
6
|
|
|
7
7
|
## What ships
|
|
8
8
|
|
|
@@ -1,163 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architect-dev-lead-reviewer
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Formal code review report in enterprise layout: FORMAL CODE REVIEW REPORT banner,
|
|
5
|
+
metadata, table of contents, sections 1–9 (executive summary with metrics, file
|
|
6
|
+
table, per-file analysis, critical issues, security, code quality, impact table,
|
|
7
|
+
scoreboard, conclusion and merge recommendation). Finding IDs CR-/SEC-/CQ- with
|
|
8
|
+
app tag. Excludes .env, Dockerfile, README, .gitlab-ci.yml, *.md, *.json,
|
|
9
|
+
console.log-only churn. Saves to code-reviews/ with branch names and timestamp.
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
You are a **Technical Architect** and **Development Lead**.
|
|
12
|
+
You are a **Technical Architect** and **Development Lead**. Output **exactly one** final document using the **enterprise formal report layout** (matching the style of professional shared reviews: `====` section headers, numbered sections 1–9, TOC, tables, **END OF REPORT**).
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Finding IDs
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Pick a **2–4 letter TAG** from the application name (e.g. ExecutionManagement → `EM`). Use:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- `CR-01-TAG`, `CR-02-TAG`, … in **section 4**
|
|
19
|
+
- `SEC-01-TAG`, … in **section 5**
|
|
20
|
+
- `CQ-01-TAG`, … in **section 6**
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
Reference IDs from **section 3** when you first spot the problem.
|
|
20
23
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
Ignore console-only debug churn. Mixed hunks: evaluate logic only unless logging exposes secrets/PII.
|
|
24
|
-
|
|
25
|
-
## Metadata
|
|
26
|
-
|
|
27
|
-
- **Application name:** Infer from `package.json`, `pom.xml`, or repo name; state if assumed.
|
|
28
|
-
- **Base / head** branches: explicit in the cover table.
|
|
29
|
-
- **Report date:** current date (local).
|
|
30
|
-
|
|
31
|
-
## Quantitative scope (mandatory)
|
|
32
|
-
|
|
33
|
-
Run from the reviewed repository:
|
|
24
|
+
## Git commands (from reviewed repo)
|
|
34
25
|
|
|
35
26
|
```bash
|
|
27
|
+
git fetch origin --prune 2>/dev/null || true
|
|
36
28
|
git diff --shortstat <base>...<head>
|
|
37
29
|
git diff --stat <base>...<head>
|
|
30
|
+
git diff --name-status <base>...<head>
|
|
31
|
+
git diff <base>...<head>
|
|
38
32
|
```
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Severity scale (consistent)
|
|
43
|
-
|
|
44
|
-
- **Critical** — block merge; severe security, data loss, broken invariant
|
|
45
|
-
- **High** — should fix before merge
|
|
46
|
-
- **Medium** — fix before or soon after merge
|
|
47
|
-
- **Low** — follow-up OK
|
|
48
|
-
|
|
49
|
-
## Required report format
|
|
50
|
-
|
|
51
|
-
Output markdown in **this exact order**. Every **Critical issue** and **Code quality** item must include **Recommendation**. **Impact analysis** must end with **Recommendations** bullets. Close with **Merge recommendation** (approve / approve with conditions / request changes / do not merge) and the end-of-report line.
|
|
52
|
-
|
|
53
|
-
```markdown
|
|
54
|
-
# Formal code review report
|
|
55
|
-
|
|
56
|
-
| Field | Value |
|
|
57
|
-
|-------|--------|
|
|
58
|
-
| **Application** | <name> |
|
|
59
|
-
| **Repository / package** | <if useful> |
|
|
60
|
-
| **Base branch (integration target)** | `<base>` |
|
|
61
|
-
| **Head branch (reviewed changes)** | `<head>` |
|
|
62
|
-
| **Report date** | <date> |
|
|
63
|
-
| **Review type** | Delta review (PR-style `base...head`) |
|
|
64
|
-
| **Reviewer capacity** | Technical Architect & Engineering Lead (automated-assisted) |
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Executive summary
|
|
69
|
-
|
|
70
|
-
[3–6 sentences.]
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 1. Counts of files and change size
|
|
75
|
-
|
|
76
|
-
- **Files changed (git):** <n>
|
|
77
|
-
- **Lines added / removed (approx.):** <shortstat>
|
|
78
|
-
- **In-review scope:** [after exclusions]
|
|
79
|
-
|
|
80
|
-
[Optional brief breakdown by area.]
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 2. Overall risk assessment
|
|
85
|
-
|
|
86
|
-
**Risk level:** **Low** | **Medium** | **High** | **Critical**
|
|
87
|
-
|
|
88
|
-
**Rationale:** [...]
|
|
89
|
-
|
|
90
|
-
**Mitigations already observed (if any):** [...]
|
|
34
|
+
Optional pathspec exclusions: `*.md`, `*.json`, `.env`, `Dockerfile`, README variants, `.gitlab-ci.yml`.
|
|
91
35
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## 3. Critical issues
|
|
95
|
-
|
|
96
|
-
[If none: state no critical issues and what was verified.]
|
|
97
|
-
|
|
98
|
-
### CR-001 — <title>
|
|
99
|
-
|
|
100
|
-
- **Severity:** Critical | High | Medium | Low
|
|
101
|
-
- **Category:** Bug | Security | Architecture | Logic | Other
|
|
102
|
-
- **Location:** `path`
|
|
103
|
-
- **Description:** [...]
|
|
104
|
-
- **Recommendation:** [...]
|
|
105
|
-
|
|
106
|
-
(repeat CR-002, …)
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## 4. Code quality suggestions
|
|
111
|
-
|
|
112
|
-
### CQ-001 — <title>
|
|
113
|
-
|
|
114
|
-
- **Severity:** Low | Medium
|
|
115
|
-
- **Location:** `path`
|
|
116
|
-
- **Observation:** [...]
|
|
117
|
-
- **Recommendation:** [...]
|
|
118
|
-
|
|
119
|
-
(repeat CQ-002, …)
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## 5. Impact analysis
|
|
124
|
-
|
|
125
|
-
**Stability & maintainability:** [...]
|
|
126
|
-
|
|
127
|
-
**Operational / deployment:** [...]
|
|
36
|
+
## Exclusions (no qualitative review)
|
|
128
37
|
|
|
129
|
-
**
|
|
130
|
-
|
|
131
|
-
- [...]
|
|
132
|
-
- [...]
|
|
133
|
-
|
|
134
|
-
---
|
|
38
|
+
`.env`, `Dockerfile`, `README.md` / `Readme.md`, `.gitlab-ci.yml`, all `*.md`, all `*.json`. State these on the cover. **Console.log** only-hunks: ignore.
|
|
135
39
|
|
|
136
|
-
##
|
|
40
|
+
## Required structure (section order — do not skip)
|
|
137
41
|
|
|
138
|
-
**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
42
|
+
1. **Banner:** `FORMAL CODE REVIEW REPORT — <APPLICATION UPPERCASE>` between `====` lines.
|
|
43
|
+
2. **Cover block:** Application; Branches Compared (`head → base`); Review Date; Prepared For; Review Scope; Exclusions; Special Exclusions; CONFIDENTIAL line.
|
|
44
|
+
3. **TABLE OF CONTENTS:** list sections 1–9; under 3 list `3.1`, `3.2`, … one line per **in-scope** changed file (`[NEW FILE]` if added).
|
|
45
|
+
4. **§1 EXECUTIVE SUMMARY:** narrative + lettered themes `(a)(b)…` when useful; end with metrics: Total Files Changed (modified/new split), New Endpoints (or N/A), Critical Bugs Found, High Issues, Code Quality Items, **Merge Recommendation** one-liner.
|
|
46
|
+
5. **§2 SUMMARY OF CHANGES — FILES MODIFIED:** table columns `# | File Path | Type | Summary`.
|
|
47
|
+
6. **§3 DETAILED CHANGE ANALYSIS BY FILE:** for each file, `3.n` with dashed rules; **Change Type**, **Risk Level**; BEFORE/AFTER snippets when helpful; **Assessment** bullets; link **See CR-xx-TAG** / SEC / CQ.
|
|
48
|
+
7. **§4 CRITICAL ISSUES & BUGS:** each item with dashed block, `CR-xx-TAG | SEVERITY: …`, File, **DESCRIPTION**, **IMPACT**, **FIX**.
|
|
49
|
+
8. **§5 SECURITY REVIEW:** optional scope note (e.g. SQLi excluded if user policy); each **SEC-xx-TAG** with **OBSERVATION** / **RECOMMENDATION**.
|
|
50
|
+
9. **§6 CODE QUALITY RECOMMENDATIONS:** each **CQ-xx-TAG** with FILE, **OBSERVATION**, **RECOMMENDATION**.
|
|
51
|
+
10. **§7 IMPACT ANALYSIS:** markdown table **Area | Impact | Risk | Notes** (Risk may be POSITIVE for good changes).
|
|
52
|
+
11. **§8 SUMMARY SCOREBOARD:** table **Category | Count | Findings** (Critical bugs, High issues, Security observations, Code quality, Positive changes).
|
|
53
|
+
12. **§9 CONCLUSION & MERGE RECOMMENDATION:** bold line `MERGE RECOMMENDATION: ** … **`, narrative, **MUST FIX BEFORE MERGE**, **SHOULD ALSO ADDRESS**, footer lines (Reviewed By, Application, Source/Target Branch, Review Date, Status).
|
|
54
|
+
13. **END OF REPORT** between `====` lines.
|
|
148
55
|
|
|
149
|
-
|
|
56
|
+
Full skeleton and table layouts: follow **`branch-diff-architecture-review`** skill in this plugin (same template).
|
|
150
57
|
|
|
151
|
-
|
|
58
|
+
## Persist
|
|
152
59
|
|
|
153
|
-
|
|
60
|
+
Write the complete report to:
|
|
154
61
|
|
|
155
|
-
|
|
62
|
+
`<git-root>/code-reviews/code-review_<sanitized-base>_vs_<sanitized-head>_<YYYYMMDD-HHMMSS>.md`
|
|
156
63
|
|
|
157
|
-
|
|
158
|
-
- Create `code-reviews/` if needed; write **entire** document; tell the user the **absolute path**.
|
|
159
|
-
- Optional: pipe to `scripts/save-code-review-report.sh '<base>' '<head>'` or plugin-installed copy.
|
|
64
|
+
Tell the user the absolute path. Optional: pipe to `scripts/save-code-review-report.sh '<base>' '<head>'`.
|
|
160
65
|
|
|
161
66
|
## Constraints
|
|
162
67
|
|
|
163
|
-
Evidence from in-scope diff; label **Outside diff** if you used extra
|
|
68
|
+
Evidence from in-scope diff; label **Outside diff** if you used extra files. If no in-scope files after exclusions, say so in §1 and still complete the shell sections with N/A / none.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-code-review-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Cursor IDE plugin: Technical Architect and Dev Lead skills for branch-to-branch git diff code review, merge-base PR-style analysis, and delivery risk assessment",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,165 +1,269 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: branch-diff-architecture-review
|
|
3
3
|
description: >-
|
|
4
|
-
Formal
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Formal shareable code review matching enterprise report layout: banner header,
|
|
5
|
+
metadata, table of contents, executive summary with metrics, file summary table,
|
|
6
|
+
per-file deep dive, critical issues, security review, code quality, impact
|
|
7
|
+
table, scoreboard, conclusion and merge recommendation. Excludes .env,
|
|
8
|
+
Dockerfile, CI, *.md, *.json, console.log churn. Saves to code-reviews/.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# Branch delta → formal code review (
|
|
11
|
+
# Branch delta → formal code review (enterprise layout)
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Goal
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Produce **one** report in the **same structural style** as a professional formal code review document: ASCII banner title, cover metadata, **Table of Contents**, sections **1–9**, stable finding IDs (**CR-**, **SEC-**, **CQ-**), markdown **tables** where shown below, and **END OF REPORT**.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Finding IDs
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Use a short **application tag** (2–4 letters, uppercase) derived from the application name (e.g. ExecutionManagement → **EM**). Format:
|
|
20
20
|
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **Report date:** ISO local date (e.g. `2026-04-10`) or full timestamp.
|
|
25
|
-
- **Scope note:** State that review excludes listed path types (below) so counts may differ from raw `git diff --stat`.
|
|
21
|
+
- **CR-##-TAG** — critical bugs / logic / architecture blockers (section 4), e.g. `CR-01-EM`
|
|
22
|
+
- **SEC-##-TAG** — security observations (section 5), e.g. `SEC-01-EM`
|
|
23
|
+
- **CQ-##-TAG** — code quality (section 6), e.g. `CQ-01-EM`
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
Number sequentially (01, 02, …). Reference these IDs in section 3 when introducing an issue.
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
## Cover metadata (after banner)
|
|
28
|
+
|
|
29
|
+
Fill from project context; use `N/A` if unknown:
|
|
30
|
+
|
|
31
|
+
- **Application** — human-readable product/service name + stack if relevant (e.g. Node.js)
|
|
32
|
+
- **Branches Compared** — `` `head` → `base` `` (source vs integration target)
|
|
33
|
+
- **Review Date** — e.g. `09 April 2026`
|
|
34
|
+
- **Prepared For** — org/team (e.g. company — product line) or `N/A`
|
|
35
|
+
- **Review Scope** — e.g. “`.js` and `.ts` files only” or languages seen in the in-scope diff
|
|
36
|
+
- **Exclusions** — list: `.env`, `Dockerfile`, `README`, CI/CD (`.gitlab-ci.yml`), `*.json`, `*.md` (and align with actual policy)
|
|
37
|
+
- **Special Exclusions** — e.g. “`console.log` additions/removals”; optional note such as “SQL injection checks excluded per scope (pre-validated at UI)” only if the user/project states that
|
|
38
|
+
- **Confidentiality line** — e.g. `CONFIDENTIAL — For internal engineering and QA review only.`
|
|
39
|
+
|
|
40
|
+
## Quantitative inputs
|
|
41
|
+
|
|
42
|
+
From repo root:
|
|
30
43
|
|
|
31
44
|
```bash
|
|
32
45
|
git diff --shortstat <base>...<head>
|
|
33
46
|
git diff --stat <base>...<head>
|
|
47
|
+
git diff --name-status <base>...<head>
|
|
34
48
|
```
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
Use **name-status** to build the file list and TOC. **Exclude** ignored path types from qualitative review (still may appear in raw git stats — note that in scope).
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
- **Insertions / deletions** from `--shortstat` when available.
|
|
40
|
-
- If useful, **top areas** by directory or module (brief, not a full file list unless small).
|
|
52
|
+
## Severity (for CR / SEC)
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
Use **CRITICAL**, **HIGH**, **MEDIUM**, **LOW** in uppercase in section headers as in the sample.
|
|
43
55
|
|
|
44
|
-
|
|
45
|
-
|-------|--------|
|
|
46
|
-
| **Critical** | Must fix before merge; security breach, data loss, broken invariant, production outage risk |
|
|
47
|
-
| **High** | Should fix before merge; serious bug, major regression, significant security gap |
|
|
48
|
-
| **Medium** | Fix before or shortly after merge; correctness edge cases, maintainability risk |
|
|
49
|
-
| **Low** | Follow-up acceptable; minor issues, polish |
|
|
56
|
+
---
|
|
50
57
|
|
|
51
|
-
##
|
|
58
|
+
## Required report template (follow section order and visual style)
|
|
52
59
|
|
|
53
|
-
Use
|
|
60
|
+
Use lines of `=` (about 80 chars) for major section breaks and `-` for sub-blocks. Mirror this skeleton; replace placeholders with real content.
|
|
54
61
|
|
|
55
|
-
```
|
|
56
|
-
|
|
62
|
+
```
|
|
63
|
+
================================================================================
|
|
64
|
+
FORMAL CODE REVIEW REPORT — <APPLICATION NAME UPPERCASE>
|
|
65
|
+
================================================================================
|
|
66
|
+
|
|
67
|
+
Application : <name> (<stack if relevant>)
|
|
68
|
+
Branches Compared : <head> → <base>
|
|
69
|
+
Review Date : <dd Month yyyy>
|
|
70
|
+
Prepared For : <org or N/A>
|
|
71
|
+
Review Scope : <e.g. .js and .ts files only; align with diff>
|
|
72
|
+
Exclusions : .env, Dockerfile, README, CI/CD (.gitlab-ci.yml), *.json, *.md
|
|
73
|
+
Special Exclusions: console.log additions/removals; <other scoped exclusions>
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
|-------|--------|
|
|
60
|
-
| **Application** | <name> |
|
|
61
|
-
| **Repository / package** | <if distinct from app name> |
|
|
62
|
-
| **Base branch (integration target)** | `<base>` |
|
|
63
|
-
| **Head branch (reviewed changes)** | `<head>` |
|
|
64
|
-
| **Report date** | <YYYY-MM-DD or full timestamp> |
|
|
65
|
-
| **Review type** | Delta review (PR-style `base...head`) |
|
|
66
|
-
| **Reviewer capacity** | Technical Architect & Engineering Lead (automated-assisted) |
|
|
75
|
+
CONFIDENTIAL — For internal engineering and QA review only.
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
================================================================================
|
|
78
|
+
TABLE OF CONTENTS
|
|
79
|
+
================================================================================
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
1. Executive Summary
|
|
82
|
+
2. Summary of Changes — Files Modified
|
|
83
|
+
3. Detailed Change Analysis by File
|
|
84
|
+
3.1 <path/to/file1.ext>
|
|
85
|
+
3.2 <path/to/file2.ext>
|
|
86
|
+
... (one 3.n entry per in-scope changed file; mark [NEW FILE] if added)
|
|
87
|
+
4. Critical Issues & Bugs
|
|
88
|
+
5. Security Review
|
|
89
|
+
6. Code Quality Recommendations
|
|
90
|
+
7. Impact Analysis
|
|
91
|
+
8. Summary Scoreboard
|
|
92
|
+
9. Conclusion & Merge Recommendation
|
|
71
93
|
|
|
72
|
-
|
|
94
|
+
================================================================================
|
|
95
|
+
1. EXECUTIVE SUMMARY
|
|
96
|
+
================================================================================
|
|
73
97
|
|
|
74
|
-
|
|
98
|
+
<narrative paragraphs>
|
|
75
99
|
|
|
76
|
-
|
|
100
|
+
Use lettered major themes when helpful:
|
|
101
|
+
(a) <theme title>
|
|
102
|
+
<description>
|
|
103
|
+
(b) ...
|
|
77
104
|
|
|
78
|
-
|
|
79
|
-
- **Lines added / removed (approx.):** <from shortstat, or “N/A”>
|
|
80
|
-
- **In-review scope:** [Summarize how many files were materially reviewed after excluding .env, Dockerfile, README variants, `.gitlab-ci.yml`, `*.md`, `*.json`, and console-only noise; if same as git, say so.]
|
|
105
|
+
Closing metrics block (adapt numbers from git + findings):
|
|
81
106
|
|
|
82
|
-
|
|
107
|
+
Total Files Changed : <n> (<modified>, <new>)
|
|
108
|
+
New Endpoints : <n or N/A>
|
|
109
|
+
Critical Bugs Found : <n>
|
|
110
|
+
High Issues : <n>
|
|
111
|
+
Code Quality Items : <n>
|
|
112
|
+
Merge Recommendation : <ONE LINE e.g. CONDITIONAL — Fix critical issues before merging>
|
|
83
113
|
|
|
84
|
-
|
|
114
|
+
================================================================================
|
|
115
|
+
2. SUMMARY OF CHANGES — FILES MODIFIED
|
|
116
|
+
================================================================================
|
|
85
117
|
|
|
86
|
-
|
|
118
|
+
Table with aligned columns:
|
|
87
119
|
|
|
88
|
-
|
|
120
|
+
# File Path Type Summary
|
|
121
|
+
---- -------------------------------------------------- ---------- ---------------------------------------------------
|
|
122
|
+
1 <path> Modified <one-line summary>
|
|
123
|
+
2 <path> NEW FILE <one-line summary>
|
|
124
|
+
...
|
|
89
125
|
|
|
90
|
-
|
|
126
|
+
================================================================================
|
|
127
|
+
3. DETAILED CHANGE ANALYSIS BY FILE
|
|
128
|
+
================================================================================
|
|
91
129
|
|
|
92
|
-
|
|
130
|
+
For EACH file in the TOC (subsection 3.n):
|
|
93
131
|
|
|
94
|
-
|
|
132
|
+
------------------------------------------------------------------------
|
|
133
|
+
3.n <relative/path/to/file> [optional: NEW FILE — line count hint]
|
|
134
|
+
------------------------------------------------------------------------
|
|
95
135
|
|
|
96
|
-
|
|
136
|
+
Change Type : <e.g. Refactor / Bug Fix / Feature Addition>
|
|
137
|
+
Risk Level : <LOW | LOW-MEDIUM | MEDIUM | MEDIUM-HIGH | HIGH | CRITICAL>
|
|
97
138
|
|
|
98
|
-
|
|
139
|
+
Optional deeper numbering (3.n.1, 3.n.2) for large files.
|
|
99
140
|
|
|
100
|
-
|
|
141
|
+
Include where useful:
|
|
142
|
+
- Imports added/removed
|
|
143
|
+
- BEFORE / AFTER snippets (concise, from diff)
|
|
144
|
+
- Assessment: bullets
|
|
145
|
+
- Cross-references: "See CR-XX-TAG"
|
|
101
146
|
|
|
102
|
-
|
|
147
|
+
================================================================================
|
|
148
|
+
4. CRITICAL ISSUES & BUGS
|
|
149
|
+
================================================================================
|
|
103
150
|
|
|
104
|
-
|
|
105
|
-
- **Category:** [Bug / Security / Architecture / Logic / Other]
|
|
106
|
-
- **Location:** `path` (and symbol or line if clear from diff)
|
|
107
|
-
- **Description:** [What is wrong and why it matters]
|
|
108
|
-
- **Recommendation:** [Specific, actionable fix or validation step]
|
|
151
|
+
Per issue:
|
|
109
152
|
|
|
110
|
-
|
|
153
|
+
------------------------------------------------------------------------
|
|
154
|
+
CR-##-TAG | SEVERITY: CRITICAL|HIGH|MEDIUM|LOW
|
|
155
|
+
File : <path> — <function or area>
|
|
156
|
+
------------------------------------------------------------------------
|
|
111
157
|
|
|
112
|
-
|
|
158
|
+
DESCRIPTION:
|
|
159
|
+
<multi-line>
|
|
113
160
|
|
|
114
|
-
|
|
161
|
+
IMPACT:
|
|
162
|
+
<multi-line>
|
|
115
163
|
|
|
116
|
-
|
|
164
|
+
FIX:
|
|
165
|
+
<concrete steps; Option A / Option B if helpful>
|
|
117
166
|
|
|
118
|
-
|
|
167
|
+
================================================================================
|
|
168
|
+
5. SECURITY REVIEW
|
|
169
|
+
================================================================================
|
|
119
170
|
|
|
120
|
-
|
|
171
|
+
If scope excludes a class of checks (e.g. SQLi), state a one-line note after the section title.
|
|
121
172
|
|
|
122
|
-
|
|
123
|
-
- **Location:** `path`
|
|
124
|
-
- **Observation:** [e.g. naming, duplication, complexity]
|
|
125
|
-
- **Recommendation:** [Concrete refactor or pattern]
|
|
173
|
+
Per item:
|
|
126
174
|
|
|
127
|
-
|
|
175
|
+
------------------------------------------------------------------------
|
|
176
|
+
SEC-##-TAG | SEVERITY: MEDIUM|LOW|...
|
|
177
|
+
<title short>
|
|
178
|
+
------------------------------------------------------------------------
|
|
128
179
|
|
|
129
|
-
|
|
180
|
+
OBSERVATION:
|
|
181
|
+
...
|
|
130
182
|
|
|
131
|
-
|
|
183
|
+
RECOMMENDATION:
|
|
184
|
+
...
|
|
132
185
|
|
|
133
|
-
|
|
186
|
+
================================================================================
|
|
187
|
+
6. CODE QUALITY RECOMMENDATIONS
|
|
188
|
+
================================================================================
|
|
134
189
|
|
|
135
|
-
|
|
190
|
+
Per item:
|
|
136
191
|
|
|
137
|
-
|
|
192
|
+
------------------------------------------------------------------------
|
|
193
|
+
CQ-##-TAG | <short title>
|
|
194
|
+
------------------------------------------------------------------------
|
|
138
195
|
|
|
139
|
-
|
|
140
|
-
- [Prioritized follow-up 2]
|
|
141
|
-
- …
|
|
196
|
+
FILE: <path>
|
|
142
197
|
|
|
143
|
-
|
|
198
|
+
OBSERVATION:
|
|
199
|
+
...
|
|
144
200
|
|
|
145
|
-
|
|
201
|
+
RECOMMENDATION:
|
|
202
|
+
...
|
|
146
203
|
|
|
147
|
-
|
|
204
|
+
================================================================================
|
|
205
|
+
7. IMPACT ANALYSIS
|
|
206
|
+
================================================================================
|
|
148
207
|
|
|
149
|
-
|
|
150
|
-
- **Approve merge with conditions** — Merge acceptable only after: [list specific CR items or tasks].
|
|
151
|
-
- **Request changes** — Do not merge until: [list blockers].
|
|
152
|
-
- **Do not merge** — [Rare; fundamental blocker or unacceptable risk.]
|
|
208
|
+
Markdown table:
|
|
153
209
|
|
|
154
|
-
|
|
210
|
+
| Area | Impact | Risk | Notes |
|
|
211
|
+
|------|--------|------|-------|
|
|
212
|
+
| <area> | <text> | LOW / MEDIUM / HIGH / CRITICAL / POSITIVE | <text> |
|
|
213
|
+
| ... | ... | ... | ... |
|
|
155
214
|
|
|
156
|
-
|
|
215
|
+
Cover major themes: refactors, feature areas, security, ops, positive changes.
|
|
216
|
+
|
|
217
|
+
================================================================================
|
|
218
|
+
8. SUMMARY SCOREBOARD
|
|
219
|
+
================================================================================
|
|
220
|
+
|
|
221
|
+
Category table with Count and Findings (multi-line cell content allowed):
|
|
222
|
+
|
|
223
|
+
| Category | Count | Findings |
|
|
224
|
+
|----------|-------|----------|
|
|
225
|
+
| CRITICAL Bugs | n | CR-..-TAG: ... |
|
|
226
|
+
| HIGH Issues | n | ... |
|
|
227
|
+
| Security Observations | n | SEC-... |
|
|
228
|
+
| Code Quality Items | n | CQ-... |
|
|
229
|
+
| Positive Changes | n+ | bullet themes |
|
|
230
|
+
|
|
231
|
+
================================================================================
|
|
232
|
+
9. CONCLUSION & MERGE RECOMMENDATION
|
|
233
|
+
================================================================================
|
|
234
|
+
|
|
235
|
+
MERGE RECOMMENDATION: ** <APPROVE | CONDITIONAL APPROVAL | REQUEST CHANGES | DO NOT MERGE> **
|
|
236
|
+
<one-line elaboration>
|
|
237
|
+
|
|
238
|
+
Narrative: strengths, then blockers.
|
|
239
|
+
|
|
240
|
+
MUST FIX BEFORE MERGE:
|
|
241
|
+
[CRITICAL] CR-..-TAG
|
|
242
|
+
<one-line + detail>
|
|
243
|
+
[HIGH] CR-..-TAG or SEC-..-TAG
|
|
244
|
+
...
|
|
245
|
+
|
|
246
|
+
SHOULD ALSO ADDRESS:
|
|
247
|
+
[MEDIUM] CQ-..-TAG: ...
|
|
248
|
+
...
|
|
249
|
+
|
|
250
|
+
Closing footer block:
|
|
157
251
|
|
|
158
|
-
|
|
252
|
+
------------------------------------------------------------------------
|
|
253
|
+
Reviewed By : <e.g. Automated Code Review System / Technical Architect & Dev Lead>
|
|
254
|
+
Application : <name>
|
|
255
|
+
Source Branch : <head>
|
|
256
|
+
Target Branch : <base>
|
|
257
|
+
Review Date : <same as cover>
|
|
258
|
+
Status : <mirror merge recommendation>
|
|
259
|
+
------------------------------------------------------------------------
|
|
159
260
|
|
|
261
|
+
================================================================================
|
|
262
|
+
END OF REPORT
|
|
263
|
+
================================================================================
|
|
160
264
|
```
|
|
161
265
|
|
|
162
|
-
## Paths excluded from review
|
|
266
|
+
## Paths excluded from qualitative review
|
|
163
267
|
|
|
164
268
|
| Pattern | Notes |
|
|
165
269
|
|---------|--------|
|
|
@@ -169,23 +273,23 @@ For **each** suggestion:
|
|
|
169
273
|
| `.gitlab-ci.yml` | |
|
|
170
274
|
| `*.md`, `*.json` | |
|
|
171
275
|
|
|
172
|
-
|
|
276
|
+
Do not analyze these for findings; omit from section 3 unless the user explicitly asks. Mention in **Review Scope** / **Exclusions** that stats may still count them.
|
|
173
277
|
|
|
174
278
|
## `console.log` rule
|
|
175
279
|
|
|
176
|
-
Ignore hunks that only add/remove/reformat `console.log` / `console.debug` / `console.info` for debugging.
|
|
280
|
+
Ignore hunks that only add/remove/reformat `console.log` / `console.debug` / `console.info` for debugging. Mixed hunks: assess **logic only** unless secrets/PII are logged.
|
|
177
281
|
|
|
178
282
|
## Workflow
|
|
179
283
|
|
|
180
|
-
1.
|
|
181
|
-
2. `git fetch` if needed; `git diff <base>...<head>` (optional pathspec exclusions
|
|
182
|
-
3. Run
|
|
183
|
-
4.
|
|
184
|
-
5. Write
|
|
185
|
-
6. **
|
|
186
|
-
7.
|
|
284
|
+
1. Resolve **application name**, **tag** for IDs, **base** / **head**, **Prepared For** if user supplied.
|
|
285
|
+
2. `git fetch` if needed; `git diff <base>...<head>` (optional pathspec exclusions).
|
|
286
|
+
3. Run `--shortstat`, `--stat`, `--name-status` for metrics and file list.
|
|
287
|
+
4. Build **TOC** and **section 2** from in-scope files only.
|
|
288
|
+
5. Write **section 3** per file (depth proportional to change size).
|
|
289
|
+
6. Consolidate into **sections 4–6** with stable IDs; **section 7** table; **section 8** scoreboard; **section 9** conclusion.
|
|
290
|
+
7. **Save** full report to `<git-root>/code-reviews/code-review_<sanitized-base>_vs_<sanitized-head>_<YYYYMMDD-HHMMSS>.md` and give the absolute path.
|
|
291
|
+
8. Delegate to **architect-dev-lead-reviewer** when needed — same layout.
|
|
187
292
|
|
|
188
293
|
## Helper scripts
|
|
189
294
|
|
|
190
|
-
- `scripts/git-diff-branches.sh
|
|
191
|
-
- `scripts/save-code-review-report.sh '<base>' '<head>'` (stdin = full report markdown)
|
|
295
|
+
- `scripts/git-diff-branches.sh`, `scripts/save-code-review-report.sh`
|