@nano-step/skill-manager 5.6.1 → 5.7.0

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.
Files changed (39) hide show
  1. package/dist/utils.d.ts +1 -1
  2. package/dist/utils.js +1 -1
  3. package/package.json +1 -1
  4. package/private-catalog.json +7 -2
  5. package/skills/deep-design/SKILL.md +402 -0
  6. package/skills/deep-design/evals/evals.json +23 -0
  7. package/skills/deep-design/skill.json +7 -0
  8. package/skills/feature-analysis/SKILL.md +290 -0
  9. package/skills/feature-analysis/skill.json +15 -0
  10. package/skills/nano-brain/skill.json +7 -0
  11. package/skills/pr-code-reviewer/CHANGELOG.md +329 -0
  12. package/skills/pr-code-reviewer/RESEARCH.md +60 -0
  13. package/skills/pr-code-reviewer/SKILL.md +537 -0
  14. package/skills/pr-code-reviewer/assets/config.json +60 -0
  15. package/skills/pr-code-reviewer/checklists/backend-express.md +357 -0
  16. package/skills/pr-code-reviewer/checklists/ci-cd.md +428 -0
  17. package/skills/pr-code-reviewer/checklists/consumer-search-matrix.md +339 -0
  18. package/skills/pr-code-reviewer/checklists/database.md +382 -0
  19. package/skills/pr-code-reviewer/checklists/frontend-vue-nuxt.md +426 -0
  20. package/skills/pr-code-reviewer/checklists/review-checklist.md +149 -0
  21. package/skills/pr-code-reviewer/references/checkpoint-system.md +58 -0
  22. package/skills/pr-code-reviewer/references/confidence-scoring.md +98 -0
  23. package/skills/pr-code-reviewer/references/framework-rules/express.md +39 -0
  24. package/skills/pr-code-reviewer/references/framework-rules/nestjs.md +41 -0
  25. package/skills/pr-code-reviewer/references/framework-rules/nextjs.md +58 -0
  26. package/skills/pr-code-reviewer/references/framework-rules/prisma.md +54 -0
  27. package/skills/pr-code-reviewer/references/framework-rules/react.md +61 -0
  28. package/skills/pr-code-reviewer/references/framework-rules/typeorm.md +52 -0
  29. package/skills/pr-code-reviewer/references/framework-rules/typescript.md +50 -0
  30. package/skills/pr-code-reviewer/references/framework-rules/vue-nuxt.md +53 -0
  31. package/skills/pr-code-reviewer/references/nano-brain-integration.md +46 -0
  32. package/skills/pr-code-reviewer/references/performance-patterns.md +26 -0
  33. package/skills/pr-code-reviewer/references/quality-patterns.md +25 -0
  34. package/skills/pr-code-reviewer/references/report-template.md +172 -0
  35. package/skills/pr-code-reviewer/references/security-patterns.md +31 -0
  36. package/skills/pr-code-reviewer/references/setup-wizard.md +207 -0
  37. package/skills/pr-code-reviewer/references/subagent-prompts.md +344 -0
  38. package/skills/pr-code-reviewer/references/verification-protocol.md +56 -0
  39. package/skills/pr-code-reviewer/skill.json +15 -0
@@ -0,0 +1,290 @@
1
+ ---
2
+ name: feature-analysis
3
+ description: "Deep code analysis of any feature or service before writing docs, diagrams, or making changes. Enforces read-everything-first discipline. Traces exact execution paths, data transformations, guard clauses, bugs, and gaps between existing docs and actual code. Produces a validated Mermaid diagram and structured analysis output. Language and framework agnostic."
4
+ compatibility: "OpenCode"
5
+ metadata:
6
+ version: "2.0.0"
7
+ tools:
8
+ required:
9
+ - Read (every file in the feature)
10
+ - Bash (find all files, run mermaid validator)
11
+ uses:
12
+ - mermaid-validator skill (validate any diagram produced)
13
+ triggers:
14
+ - "analyze [feature]"
15
+ - "how does X work"
16
+ - "trace the flow of"
17
+ - "understand X"
18
+ - "what does X do"
19
+ - "deep dive into"
20
+ - "working on X - understand it first"
21
+ - "update docs/brain for"
22
+ ---
23
+
24
+ # Feature Analysis Skill
25
+
26
+ A disciplined protocol for deeply analyzing any feature in any codebase before producing docs, diagrams, or making changes. Framework-agnostic. Language-agnostic.
27
+
28
+ ---
29
+
30
+ ## The Core Rule
31
+
32
+ **READ EVERYTHING. PRODUCE NOTHING. THEN SYNTHESIZE.**
33
+
34
+ Do not write a single diagram node, doc line, or description until every file in the feature has been read. Every time you produce output before reading all files, you will miss something.
35
+
36
+ ---
37
+
38
+ ## Phase 1: Discovery — Find Every File
39
+
40
+ Before reading anything, map the full file set.
41
+
42
+ ```bash
43
+ # Find all source files for the feature
44
+ find <feature-dir> -type f | sort
45
+
46
+ # Check imports to catch shared utilities, decorators, helpers
47
+ grep -r "import\|require" <feature-dir> | grep -v node_modules | sort -u
48
+ ```
49
+
50
+ **Read in dependency order (bottom-up — foundations first):**
51
+
52
+ 1. **Entry point / bootstrap** — port, env vars, startup config
53
+ 2. **Schema / model files** — DB schema, columns, nullable, indexes, types
54
+ 3. **Utility / helper files** — every function, every transformation, every constant
55
+ 4. **Decorator / middleware files** — wrapping logic, side effects, return value handling
56
+ 5. **Infrastructure services** — cache, lock, queue, external connections
57
+ 6. **Core business logic** — the main service/handler files
58
+ 7. **External / fetch services** — HTTP calls, filters applied, error handling
59
+ 8. **Entry controllers / routers / handlers** — HTTP method, route, params, return
60
+ 9. **Wiring files** — module/DI config, middleware registration
61
+
62
+ **Do not skip any file. Do not skim.**
63
+
64
+ ---
65
+
66
+ ## Phase 2: Per-File Checklist
67
+
68
+ For each file, answer these questions before moving to the next.
69
+
70
+ ### Entry point / bootstrap
71
+ - [ ] What port or address? (default? env override?)
72
+ - [ ] Any global middleware, pipes, interceptors, or lifecycle hooks?
73
+
74
+ ### Schema / model files
75
+ - [ ] Table/collection name
76
+ - [ ] Every field: type, nullable, default, constraints, indexes
77
+ - [ ] Relations / references to other entities
78
+
79
+ ### Utility / helper files
80
+ - [ ] Every exported function — what does it do, step by step?
81
+ - [ ] For transformations: what inputs? what outputs? what edge cases handled?
82
+ - [ ] Where is this function called? (grep for usages)
83
+ - [ ] How many times is it called within a single method? (once per batch? once per item?)
84
+
85
+ ### Decorator / middleware files
86
+ - [ ] What does it wrap?
87
+ - [ ] What side effects before / after the original method?
88
+ - [ ] **Does it `return` the result of the original method?** (missing `return` = silent discard bug)
89
+ - [ ] Does it use try/finally? What runs in finally?
90
+ - [ ] What happens on the early-exit path?
91
+
92
+ ### Core business logic files
93
+ - [ ] Every method: signature, return type
94
+ - [ ] For each method: trace every line — no summarizing
95
+ - [ ] Accumulator variables — where initialized, where incremented, where returned
96
+ - [ ] Loop structure: sequential or parallel?
97
+ - [ ] Every external call: what service/module, what args, what returned
98
+ - [ ] Guard clauses: every early return / continue / throw
99
+ - [ ] Every branch in conditionals
100
+
101
+ ### External / fetch service files
102
+ - [ ] Exact URLs or endpoints (hardcoded or env?)
103
+ - [ ] Filters applied to response data (which calls filter, which don't?)
104
+ - [ ] Error handling on external calls
105
+
106
+ ### Entry controllers / routers / handlers
107
+ - [ ] HTTP method (GET vs POST — don't assume)
108
+ - [ ] Route path
109
+ - [ ] What core method is called?
110
+ - [ ] What is returned?
111
+
112
+ ### Wiring / module files
113
+ - [ ] What is imported / registered?
114
+ - [ ] What is exported / exposed?
115
+
116
+ ---
117
+
118
+ ## Phase 3: Execution Trace
119
+
120
+ After reading all files, produce a numbered step-by-step trace of the full execution path. This is not prose — it is a precise trace.
121
+
122
+ **Format:**
123
+ ```
124
+ 1. [HTTP METHOD] /route → HandlerName.methodName()
125
+ 2. HandlerName.methodName() → ServiceName.methodName()
126
+ 3. @DecoratorName: step A (e.g. acquire lock, check cache)
127
+ 4. → if condition X: early return [what is returned / not returned]
128
+ 5. ServiceName.methodName():
129
+ 6. step 1: call externalService.fetchAll() → parallel([fetchA(), fetchB()])
130
+ 7. fetchA(): GET https://... → returns all items (no filter)
131
+ 8. fetchB(): GET https://... → filter(x => x.field !== null) → returns filtered
132
+ 9. step 2: parallel([processItems(a, 'typeA'), processItems(b, 'typeB')])
133
+ 10. processItems(items, type):
134
+ 11. init: totalUpdated = 0, totalInserted = 0
135
+ 12. for loop (sequential): i = 0 to items.length, step batchSize
136
+ 13. batch = items.slice(i, i + batchSize)
137
+ 14. { updated, inserted } = await processBatch(batch)
138
+ 15. totalUpdated += updated; totalInserted += inserted
139
+ 16. return { total: items.length, updated: totalUpdated, inserted: totalInserted }
140
+ 17. processBatch(batch):
141
+ 18. guard: if batch.length === 0 → return { updated: 0, inserted: 0 }
142
+ 19. step 1: names = batch.map(item => transform(item.field)) ← called ONCE per batch
143
+ 20. step 2: existing = repo.find(WHERE field IN names)
144
+ 21. step 3: map = existing.reduce(...)
145
+ 22. step 4: for each item in batch:
146
+ 23. value = transform(item.field) ← called AGAIN per item
147
+ 24. ...decision tree...
148
+ 25. repo.save(itemsToSave)
149
+ 26. return { updated, inserted }
150
+ 27. @DecoratorName finally: releaseLock()
151
+ 28. BUG: decorator does not return result → caller receives undefined
152
+ ```
153
+
154
+ **Key things to call out in the trace:**
155
+ - When a utility function is called more than once (note the count and context)
156
+ - Every accumulator variable (where init, where increment, where return)
157
+ - Every guard clause / early exit
158
+ - Sequential vs parallel (for loop vs Promise.all / asyncio.gather / goroutines)
159
+ - Any discarded return values
160
+
161
+ ---
162
+
163
+ ## Phase 4: Data Transformations Audit
164
+
165
+ For every utility/transformation function used:
166
+
167
+ | Function | What it does (step by step) | Called where | Called how many times |
168
+ |----------|----------------------------|--------------|----------------------|
169
+ | `transformFn(x)` | 1. step A 2. step B 3. step C | methodName | TWICE: once in step N (batch), once per item in loop |
170
+
171
+ ---
172
+
173
+ ## Phase 5: Gap Analysis — Docs vs Code
174
+
175
+ Compare existing docs/brain files against what the code actually does:
176
+
177
+ | Claim in docs | What code actually does | Verdict |
178
+ |---------------|------------------------|---------|
179
+ | "POST /endpoint" | `@Get()` in controller | ❌ Wrong |
180
+ | "Port 3000" | `process.env.PORT \|\| 4001` in entrypoint | ❌ Wrong |
181
+ | "function converts X" | Also does Y (undocumented) | ⚠️ Incomplete |
182
+ | "returns JSON result" | Decorator discards return value | ❌ Bug |
183
+
184
+ ---
185
+
186
+ ## Phase 6: Produce Outputs
187
+
188
+ Only now, after phases 1–5 are complete, produce:
189
+
190
+ ### 6a. Structured Analysis Document
191
+
192
+ ```markdown
193
+ ## Feature Analysis: [Feature Name]
194
+ Repo: [repo] | Date: [date]
195
+
196
+ ### Files Read
197
+ - `path/to/controller.ts` — entry point, GET /endpoint, calls ServiceA.run()
198
+ - `path/to/service.ts` — core logic, orchestrates fetch + batch loop
199
+ - [... every file ...]
200
+
201
+ ### Execution Trace
202
+ [numbered trace from Phase 3]
203
+
204
+ ### Data Transformations
205
+ [table from Phase 4]
206
+
207
+ ### Guard Clauses & Edge Cases
208
+ - processBatch: empty batch guard → returns {0,0} immediately
209
+ - fetchItems: filters items where field === null
210
+ - LockManager: if lock not acquired → returns void immediately (no error thrown)
211
+
212
+ ### Bugs / Issues Found
213
+ - path/to/decorator.ts line N: `await originalMethod.apply(this, args)` missing `return`
214
+ → result is discarded, caller always receives undefined
215
+ - [any others]
216
+
217
+ ### Gaps: Docs vs Code
218
+ [table from Phase 5]
219
+
220
+ ### Files to Update
221
+ - [ ] `.agents/_repos/[repo].md` — update port, endpoint method, transformation description
222
+ - [ ] `.agents/_domains/[domain].md` — if architecture changed
223
+ ```
224
+
225
+ ### 6b. Mermaid Diagram
226
+
227
+ Write the diagram. Then **immediately run the validator before doing anything else.**
228
+
229
+ If you have the mermaid-validator skill:
230
+ ```bash
231
+ node /path/to/project/scripts/validate-mermaid.mjs [file.md]
232
+ ```
233
+
234
+ Otherwise validate manually — common syntax errors:
235
+ - Labels with `()` must be wrapped in `"double quotes"`: `A["method()"]`
236
+ - No `\n` in node labels — use `<br/>` or shorten
237
+ - No HTML entities (`&amp;`, `&gt;`) in labels — use literal characters
238
+ - `end` is a reserved word in Mermaid — use `END` or `done` as node IDs
239
+
240
+ If errors → fix → re-run. Do not proceed until clean.
241
+
242
+ **Diagram must include:**
243
+ - Every step from the execution trace
244
+ - Data transformation nodes (show what the function does, not just its name)
245
+ - Guard clauses as decision nodes
246
+ - Parallel vs sequential clearly distinguished
247
+ - Bugs annotated inline (e.g. "BUG: result discarded")
248
+
249
+ ### 6c. Doc / Brain File Updates
250
+
251
+ Update relevant docs with:
252
+ - Corrected facts (port, endpoint method, etc.)
253
+ - The validated Mermaid diagram
254
+ - Data transformation table
255
+ - Known bugs section
256
+
257
+ ---
258
+
259
+ ## Anti-Patterns (What This Skill Prevents)
260
+
261
+ | Anti-pattern | What gets missed | Rule violated |
262
+ |---|---|---|
263
+ | Drew diagram before reading utility files | Transformation called twice — not shown | READ EVERYTHING FIRST |
264
+ | Trusted existing docs for endpoint method | GET vs POST wrong in docs | GAP ANALYSIS required |
265
+ | Summarized service method instead of tracing | Guard clause (empty batch) missed | TRACE NOT SUMMARIZE |
266
+ | Trusted existing docs for port/config | Wrong values | Verify entry point |
267
+ | Read decorator without checking return | Silent result discard bug | RETURN VALUE AUDIT |
268
+ | Merged H1/H2 paths into shared loop node | Sequential vs parallel distinction lost | TRACE LOOP STRUCTURE |
269
+ | Assumed filter applies to all fetches | One fetch had no filter — skipped items | READ EVERY FETCH FILE |
270
+
271
+ ---
272
+
273
+ ## Quick Reference Checklist
274
+
275
+ Before producing any output, verify:
276
+
277
+ - [ ] Entry point read — port/address confirmed
278
+ - [ ] All schema/model files read — every field noted
279
+ - [ ] All utility files read — every transformation step documented
280
+ - [ ] All decorator/middleware files read — return value audited
281
+ - [ ] All core service files read — every method traced line by line
282
+ - [ ] All fetch/external services read — filters noted (which have filters, which don't)
283
+ - [ ] All controller/router/handler files read — HTTP method confirmed (not assumed)
284
+ - [ ] All wiring/module files read — dependency graph understood
285
+ - [ ] Utility functions: call count per method noted
286
+ - [ ] All guard clauses documented
287
+ - [ ] Accumulator variables traced (init → increment → return)
288
+ - [ ] Loop structure confirmed (sequential vs parallel)
289
+ - [ ] Existing docs compared against code (gap analysis done)
290
+ - [ ] Mermaid diagram validated before saving
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "feature-analysis",
3
+ "version": "2.0.0",
4
+ "description": "Deep code analysis of any feature or service before writing docs, diagrams, or making changes. Enforces read-everything-first discipline with execution tracing, data transformation audits, and gap analysis.",
5
+ "compatibility": "OpenCode",
6
+ "agent": null,
7
+ "commands": [],
8
+ "tags": [
9
+ "analysis",
10
+ "code-review",
11
+ "documentation",
12
+ "mermaid",
13
+ "tracing"
14
+ ]
15
+ }
@@ -5,6 +5,13 @@
5
5
  "compatibility": "OpenCode",
6
6
  "agent": null,
7
7
  "commands": [],
8
+ "mcp": {
9
+ "nano-brain": {
10
+ "type": "remote",
11
+ "url": "http://host.docker.internal:3100/mcp",
12
+ "enabled": true
13
+ }
14
+ },
8
15
  "tags": [
9
16
  "memory",
10
17
  "persistence",
@@ -0,0 +1,329 @@
1
+ # PR Code Reviewer Changelog
2
+
3
+ ## v3.3.0 (2026-03-24) - Stack-Aware Setup Wizard + Token Efficiency
4
+
5
+ ### Added
6
+ - **Phase -2: Setup Check** — runs before Phase -1 on first use (no config) or `/review --setup`
7
+ - Interactive wizard: asks 5 questions (frontend, backend, ORM, language, state management)
8
+ - Writes `.opencode/code-reviewer.json` with `stack` field
9
+ - Shows confirmation with which framework rule files will be used
10
+ - **3 new framework rule files**: `nextjs.md`, `react.md`, `prisma.md`
11
+ - **`references/setup-wizard.md`** — full wizard flow, question text, stack→file mapping
12
+ - **`stack` field** added to `assets/config.json` schema
13
+
14
+ ### Fixed
15
+ - **Token efficiency**: SKILL.md now has an explicit on-demand loading table — each reference file is read only when its phase runs, not all at startup. Prevents 79k+ token bloat.
16
+ - **Subagent 3 (LIBRARIAN) missing `TRACED_DEPENDENCIES`** — added to prompt template
17
+ - **Stale framework reference in LIBRARIAN**: "Next.js, React, Express" → "check ## FRAMEWORK RULES above for project-specific patterns"
18
+ - **`database.md` checklist missing from SKILL.md reference table** — added
19
+ - **`setup-wizard.md` added to SKILL.md reference table**
20
+ - **review-checklist.md missing Phase 4.5 and 4.6** — both added with full step-by-step items
21
+
22
+ ### Changed
23
+ - Framework rules no longer all loaded at once — only stack-matching files from config
24
+ - `$FRAMEWORK_RULES` variable replaces hardcoded framework mentions in subagent prompts
25
+ - All 4 subagent prompts now include `## FRAMEWORK RULES` section
26
+
27
+ ---
28
+
29
+ ## v3.2.0 (2026-03-14) - Consensus Scoring + Evidence Enforcement
30
+
31
+ ### Added
32
+ - **Consensus scoring in Phase 4**: findings flagged by 2+ agents → confidence boosted to `high`
33
+ - **Auto-downgrade rule**: single agent + missing evidence + critical/warning → auto-downgraded to `suggestion`
34
+ - **Phase 4.6: Result Confidence Assessment** — scores review quality 0–100 from accuracy, consensus, evidence rates
35
+ - **Phase 4.5: Orchestrator Verification Spot-Check** — orchestrator reads cited code to catch surviving false positives
36
+ - `evidence` field is REQUIRED for all critical/warning findings (subagent prompts updated)
37
+ - `confidence` field added: `high` | `medium` | `low`
38
+ - `trace_path` optional field added for verification audit trail
39
+
40
+ ### Changed
41
+ - Phase 4 now has two sub-phases: 4.5 (verification) and 4.6 (confidence)
42
+ - Report TL;DR now includes Result Confidence score
43
+
44
+ ---
45
+
46
+ ## v3.1.0 (2026-03-12) - Linear Ambiguity Detection + Premise Check
47
+
48
+ ### Added
49
+ - **Phase 1.5 Ambiguity Detection**: when acceptance criteria are vague, flag as warning and identify multiple interpretations
50
+ - **DELETION classification**: explicit new change type (distinct from REFACTOR) requiring Premise Check
51
+ - **Premise Check in Phase 2**: for DELETION changes — answers why code existed, whether removal is correct
52
+ - **Premise Check section in report** — only shown for DELETION PRs
53
+ - **Cross-repo API tracing in Phase 2**: trace hardcoded frontend values vs backend config (e.g., cache TTLs)
54
+
55
+ ---
56
+
57
+ ## v3.0.0 (2026-03-10) - Unified Skill Rename + Phase -1 Resume
58
+
59
+ ### Added
60
+ - **Phase -1: Resume Detection** — checks for existing checkpoints before starting
61
+ - Checkpoint manifest schema with `head_sha` validation (stale checkpoint detection)
62
+ - Skill renamed from project-level name to `pr-code-reviewer` for clarity
63
+
64
+ ### Changed
65
+ - SKILL.md restructured: inline details moved to reference files (`subagent-prompts.md`, `report-template.md`, etc.)
66
+ - Version reset to 3.x to reflect this is the unified project + global skill
67
+
68
+ ---
69
+
70
+ ## v2.7.0 (2026-03-09) - Clone to Temp Folder
71
+
72
+ **FIX**: Reviews now clone the PR branch into a unique temp folder instead of checking out locally. Prevents branch conflicts and enables simultaneous multi-PR reviews.
73
+
74
+ ### Added
75
+ - **Phase 0: Repository Preparation (Clone to Temp)** — MANDATORY pre-review step
76
+ - Creates unique temp dir: `/tmp/pr-review-{repo}-{pr}-{unix_timestamp}`
77
+ - Shallow clones repo with `--depth=50 --branch={head_branch}`
78
+ - Falls back to `gh pr checkout` if branch not found on remote
79
+ - Verifies clone succeeded before proceeding
80
+ - Records `$REVIEW_DIR` path for all subsequent phases
81
+ - **Phase 6: Cleanup** — asks user before removing temp folder (NEVER auto-deletes)
82
+ - Shows folder path and size
83
+ - Requires explicit user confirmation to delete
84
+ - Handles multiple PR temp folders individually
85
+ - **Review Checklist** (`checklists/review-checklist.md`) — step-by-step checklist covering all phases
86
+ - All 4 subagent prompts now include `## REVIEW DIRECTORY` section pointing to temp clone
87
+
88
+ ### Why (replaces v7.1.0 checkout approach)
89
+ - `gh pr checkout` on the local repo **disturbs your working directory** — uncommitted changes, stashes, branch switches
90
+ - Cloning to `/tmp` means your workspace is **never touched**
91
+ - Unique timestamp in folder name enables **parallel reviews** of multiple PRs
92
+ - User controls cleanup — temp folder persists until explicitly removed
93
+
94
+ ### Changed
95
+ - Phase 1 now reads full file context from `$REVIEW_DIR` instead of GitHub API
96
+ - Subagent prompts explicitly instruct agents to read from `$REVIEW_DIR`, not workspace repo
97
+ - User notification now includes temp folder path and cleanup prompt
98
+
99
+ ---
100
+
101
+ ## v7.1.0 (2026-03-05) - Branch Alignment Before Review (SUPERSEDED by v2.7.0)
102
+
103
+ **FIX**: Reviews now always run against the correct PR branch, not whatever branch happens to be checked out locally.
104
+
105
+ ### Added
106
+ - **Phase 0: Repository Preparation (Branch Alignment)** — MANDATORY pre-review step
107
+ - Extracts repo info from PR URL / `github_get_pull_request`
108
+ - Clones repo if not present locally
109
+ - Saves current branch and stashes uncommitted changes
110
+ - Checks out the PR's head branch via `gh pr checkout`
111
+ - Verifies checkout succeeded before proceeding
112
+ - Optionally updates consumer repos to their default branch for cross-repo search
113
+ - **Phase 6: Repository Cleanup** — restores original branch and unstashes changes after review
114
+ - **🚫 Read-Only Rule** — explicit absolute prohibition on any GitHub write actions (push, comment, merge, review, etc.)
115
+ - Subagent prompts now explicitly note that all file reads happen against the checked-out PR branch
116
+
117
+ ### Why
118
+ Local repos may be on any branch (feature branch, old release, etc.). Previous versions read files from whatever was checked out, which could produce:
119
+ - False positives (flagging code that doesn't exist in the PR)
120
+ - Missed bugs (not seeing code that IS in the PR)
121
+ - Wrong context for cross-repo consumer search
122
+
123
+ This version ensures the reviewer always sees the actual PR code.
124
+
125
+ ---
126
+
127
+ ## v7.0.0 (2026-02-24) - Unified Architecture
128
+
129
+ MAJOR: Merged project-level v6.1 (cross-repo consumer search, better-context structural analysis) with global v2.6 (4 parallel subagents, nano-brain memory, iterative refinement) into a single unified skill.
130
+
131
+ ### Added
132
+ - 5 parallel subagents (was inline review in v6.1, was 4 subagents in v2.6)
133
+ - Code Quality (explore)
134
+ - Security and Logic (oracle)
135
+ - Docs and Best Practices (librarian)
136
+ - Tests and Integration (quick)
137
+ - Cross-Repo Consumer Search (explore, conditional)
138
+ - nano-brain integration for persistent memory across review sessions
139
+ - PR Summary generation (GitHub Copilot-style)
140
+ - Iterative refinement with dedup, severity filtering, and gap analysis
141
+ - Configuration file support (.opencode/code-reviewer.json)
142
+ - Smart tracing by change type (LOGIC/STYLE/REFACTOR/NEW)
143
+
144
+ ### Enhanced
145
+ - Subagent prompts now include better-context structural data (centrality, dependents)
146
+ - Subagent prompts now include breaking change signals from Phase 2
147
+ - Report template includes both Structural Analysis and Cross-Repo Consumer Search sections
148
+ - Framework checklists and rules passed to relevant subagents
149
+
150
+ ### Preserved from v6.1
151
+ - better-context structural analysis (Phase 1.5)
152
+ - MANDATORY cross-repo consumer search (now as 5th subagent)
153
+ - Breaking change signal detection (Phase 2)
154
+ - All checklists: consumer-search-matrix, backend-express, frontend-vue-nuxt, database, ci-cd
155
+ - All framework rules: express, nestjs, typeorm, typescript, vue-nuxt
156
+ - Severity reference with cross-repo icon
157
+
158
+ ### Preserved from v2.6
159
+ - Parallel subagent architecture
160
+ - nano-brain integration (query + save)
161
+ - Compact report philosophy
162
+ - Iterative refinement and filtering
163
+ - Config file support
164
+
165
+ ### Architecture
166
+ - Project-level skill (takes priority over global)
167
+ - SKILL.md is concise, references external files for details
168
+ - 13 reference/checklist files for domain-specific knowledge
169
+
170
+ ---
171
+
172
+ ## v6.1.1 (2026-02-12) - Centralized Manifests
173
+
174
+ **FIX**: Moved better-context manifests to centralized location to avoid polluting individual repos.
175
+
176
+ ### Changed
177
+ - Manifests now stored at `.better-context/{repo}.json` at workspace root
178
+ - No `.better-context/` folders in individual repos
179
+ - No gitignore changes needed in repos
180
+ - Updated scan command to use `--out` for centralized output
181
+
182
+ ---
183
+
184
+ ## v6.1.0 (2026-02-12) - better-context Integration
185
+
186
+ **ENHANCEMENT**: Integrated better-context for structural analysis using PageRank centrality and dependency graphs.
187
+
188
+ ### Added
189
+ - **better-context Integration** (Phase 1.5)
190
+ - `uvx better-context scan` - Index codebase and detect cycles
191
+ - `uvx better-context stats` - PageRank centrality ranking
192
+ - `uvx better-context focus <file>` - Ego-centric context for changed files
193
+ - `uvx better-context deps <file>` - Dependencies and dependents
194
+
195
+ - **Structural Analysis Output**
196
+ - Changed files impact table with centrality scores
197
+ - High-centrality file flags (> 0.05 = critical)
198
+ - Dependency cycle warnings
199
+ - Suggested reading order for understanding changes
200
+
201
+ - **Centrality-Based Review Priority**
202
+ - Files with centrality > 0.08 → CRITICAL (core infrastructure)
203
+ - Files with centrality 0.05-0.08 → HIGH (shared utilities)
204
+ - Files with > 10 dependents → WIDE IMPACT flag
205
+
206
+ - **Configuration Files**
207
+ - `.ctx.json` - better-context configuration
208
+ - `.ctxignore` - Patterns to exclude from analysis
209
+
210
+ ### Enhanced
211
+ - Report template now includes Structural Analysis section
212
+ - High-impact files flagged based on PageRank score
213
+ - Dependency cycle detection integrated into review workflow
214
+
215
+ ### Why better-context?
216
+ - **PageRank Centrality**: Mathematically identifies critical files (not guesswork)
217
+ - **Focus Mode**: Shows exactly what depends on a changed file
218
+ - **Cycle Detection**: Found 2 circular dependency cycles in tradeit-backend
219
+ - **Token Optimization**: Efficient context selection for AI review
220
+
221
+ ### Complementary to Our AGENTS.md
222
+ - better-context provides **structural intelligence** (what depends on what)
223
+ - Our AGENTS.md provides **domain intelligence** (business logic, cross-repo relationships)
224
+ - Together: Complete picture for thorough PR reviews
225
+
226
+ ---
227
+
228
+ ## v6.0.0 (2026-02-11) - Cross-Repo Consumer Search
229
+
230
+ **MAJOR**: Mandatory cross-repo consumer search for ALL breaking changes
231
+
232
+ ### Added
233
+ - **Consumer Search Matrix** (`checklists/consumer-search-matrix.md`)
234
+ - Comprehensive matrix of what changes require cross-repo search
235
+ - Search patterns for each change type (API fields, Redis keys, DB columns, etc.)
236
+ - Critical fields list that should never be removed without migration
237
+
238
+ - **Domain-Specific Checklists**
239
+ - `checklists/backend-express.md` - Express/Node patterns, error handling, timeouts
240
+ - `checklists/frontend-vue-nuxt.md` - Vue 3/Nuxt 3 patterns, reactivity, state management
241
+ - `checklists/database.md` - MySQL/Redis patterns, transactions, migrations
242
+ - `checklists/ci-cd.md` - Docker, CircleCI, deployment safety
243
+
244
+ - **Breaking Change Signal Detection**
245
+ - Conditional/ternary removed → CRITICAL (PR #1101 imgURL issue)
246
+ - Default case logic changed → WARNING (PR #1101 insightService issue)
247
+ - Middleware removed → Search httpContext consumers
248
+ - External URL pattern changed → Search all frontend consumers
249
+
250
+ - **Timeout/Hang Detection**
251
+ - AI/LLM calls without timeout → CRITICAL
252
+ - External HTTP calls without timeout → CRITICAL
253
+ - Database queries in loops without limit → WARNING
254
+
255
+ ### Enhanced
256
+ - SKILL.md now requires Consumer Search Output section in all reviews
257
+ - Backend signal detection includes service logic changes
258
+ - Cross-repo search scope expanded to tradeit, tradeit-admin, tradeit-extension
259
+
260
+ ### Post-mortem
261
+ PR #1101 review revealed two critical issues that would have been caught with proper consumer search:
262
+ 1. `imgURL` conditional removed in inventoryService.js → 30+ frontend components affected
263
+ 2. `insightService.js` default case changed → AI content generation broken for category slugs
264
+
265
+ Both issues were NOT in the PR diff but affected by the changes. This version makes cross-repo consumer search MANDATORY.
266
+
267
+ ---
268
+
269
+ ## v5.1.0 (2026-02-11) - CRITICAL FIX
270
+
271
+ **CRITICAL FIX**: Mandatory consumer search for Pinia store migrations
272
+
273
+ ### Added
274
+ - Phase 1.5 - Breaking Change Signal Detection
275
+ - Automatic detection of Pinia stores from file paths
276
+ - MANDATORY consumer search with exact grep commands
277
+ - Required output format for consumer search results
278
+ - Orchestrator verification that consumer search was performed
279
+ - Re-run mechanism for incomplete reviews
280
+
281
+ ### Enhanced
282
+ - state-mgmt subagent prompt with step-by-step consumer search
283
+
284
+ ### Fixed
285
+ - Subagents now search ENTIRE codebase, not just PR files
286
+
287
+ ### Post-mortem
288
+ PR #3088 review missed `rootState.currency` bug in `store/inventory.js` because:
289
+ 1. The file was NOT in the PR (not assigned to subagent)
290
+ 2. Consumer search instructions were advisory, not mandatory
291
+ 3. No verification that search was actually performed
292
+
293
+ ---
294
+
295
+ ## v5.0.0 (2026-02-11)
296
+
297
+ ### Added
298
+ - Vuex/Pinia migration checklist (from PR #3108 analysis)
299
+ - Cross-repo impact analysis with database ownership check
300
+ - Devil's Advocate verification protocol
301
+ - OWASP 2025-aligned security checklist
302
+ - Historical context check before flagging issues
303
+ - Research synthesis documentation
304
+
305
+ ### Enhanced
306
+ - state-mgmt category with migration patterns
307
+ - security category with OWASP Top 10 (2025)
308
+ - cross-repo category with consumer search patterns
309
+
310
+ ---
311
+
312
+ ## v4.0.0 (2026-02-10)
313
+
314
+ ### Redesigned
315
+ - Token-efficient orchestrator (< 3000 tokens)
316
+
317
+ ### Added
318
+ - Path-based file categorization
319
+ - Subagent file-based output
320
+ - Checklist tracking
321
+
322
+ ### Removed
323
+ - Django, Next.js, React framework rules
324
+
325
+ ---
326
+
327
+ ## v3.0.0
328
+
329
+ - Initial parallel subagent architecture