|
1 | 1 | --- |
2 | 2 | name: next-critic |
3 | | -description: Next.js App Router-focused harsh review orchestration for plans and code. Use when reviewing RSC boundaries, caching/revalidation, route handlers/server actions, runtime decisions, and upgrade plans with evidence-backed critique. |
| 3 | +description: Next.js App Router-specific harsh review orchestration for plans, code, and implementation notes. Use when reviewing RSC boundaries, cache/revalidation behavior, route handlers/server actions, runtime decisions, and upgrade plans where evidence-backed critique is required. |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Next Critic |
7 | 7 |
|
8 | 8 | ## Overview |
9 | | -Run a harsh-critic style review with Next.js App Router checks and evidence requirements. |
| 9 | +Run a harsh-critic style review with Next.js App Router checks, explicit evidence requirements, and context-driven audience perspectives. |
| 10 | + |
| 11 | +## External Skill References (No Copy Policy) |
| 12 | +Use external skills as references only. |
| 13 | + |
| 14 | +- Canonical reference file: [external-skills-manifest.yaml](references/external-skills-manifest.yaml) |
| 15 | +- Routing policy: [skill-routing-map.md](references/skill-routing-map.md) |
| 16 | + |
| 17 | +Rules: |
| 18 | +- Do not copy external skill body content into this repository. |
| 19 | +- Use manifest IDs/URLs and pinned commit metadata for traceability. |
| 20 | +- If a referenced skill is unavailable in runtime, continue with local rubric fallback and state the limitation. |
10 | 21 |
|
11 | 22 | ## References |
12 | 23 | - Shared rubric: [../shared-js-core/references/js-review-rubric.md](../shared-js-core/references/js-review-rubric.md) |
13 | 24 | - Shared audiences: [../shared-js-core/references/shared-audience-activation-matrix.md](../shared-js-core/references/shared-audience-activation-matrix.md) |
14 | 25 | - Next rubric: [references/next-review-rubric.md](references/next-review-rubric.md) |
15 | | -- Routing map: [references/skill-routing-map.md](references/skill-routing-map.md) |
16 | | -- External skill manifest: [references/external-skills-manifest.yaml](references/external-skills-manifest.yaml) |
17 | | - |
18 | | -## Workflow |
19 | | -1. Confirm review target and whether App Router assumptions apply. |
20 | | -2. Make pre-commitment predictions. |
21 | | -3. Verify technical claims against artifact details. |
22 | | -4. Run perspective analysis and explicit gap analysis. |
23 | | -5. Apply shared and Next rubrics. |
24 | | -6. Load max 3 external skills using routing map. |
25 | | -7. Enforce confidence-gated self-audit and realist check. |
26 | | -8. Return structured verdict. |
| 26 | +- Next audience triggers: [references/audience-activation-matrix.md](references/audience-activation-matrix.md) |
27 | 27 |
|
28 | 28 | ## Defaults |
29 | 29 | - App Router-first by default. |
30 | 30 | - Treat Pages Router patterns as legacy unless explicitly required. |
31 | 31 |
|
32 | | -## Output Contract |
33 | | -- VERDICT: REJECT | REVISE | ACCEPT-WITH-RESERVATIONS | ACCEPT |
34 | | -- Overall Assessment |
35 | | -- Pre-commitment Predictions |
36 | | -- Critical Findings |
37 | | -- Major Findings |
38 | | -- Minor Findings |
39 | | -- What's Missing |
40 | | -- Ambiguity Risks (plans only) |
41 | | -- Multi-Perspective Notes |
42 | | -- Verdict Justification |
43 | | -- Open Questions (unscored) |
| 32 | +## Workflow |
| 33 | +1. Confirm review target and scope. |
| 34 | +2. Make 3-5 pre-commitment predictions about likely Next.js failure points before deep review. |
| 35 | +3. Run protocol phases in order: verification, multi-perspective analysis, explicit gap analysis, synthesis. |
| 36 | +4. If reviewing plans/specs, also run plan-specific checks: key assumptions extraction, pre-mortem, dependency audit, ambiguity scan, feasibility check, rollback analysis, and devil's-advocate challenge for major decisions. |
| 37 | +5. Run mandatory self-audit before finalizing findings: |
| 38 | + - LOW confidence or easily-refutable claims move to `Open Questions (unscored)`. |
| 39 | + - Preference/style-only points are downgraded or removed from scored sections. |
| 40 | + - Keep scored sections evidence-backed and high-confidence. |
| 41 | +6. Run Realist Check on every surviving CRITICAL/MAJOR finding: |
| 42 | + - If shipped now, what is the realistic worst-case outcome? |
| 43 | + - Which mitigation currently limits blast radius? |
| 44 | + - How quickly would production detect this? |
| 45 | + - Is severity proportional to actual risk? |
| 46 | + Recalibration rules: |
| 47 | + - Downgrade when mitigation meaningfully limits impact. |
| 48 | + - Never downgrade data loss, security breach, or financial-impact findings. |
| 49 | + - Any downgrade must include `Mitigated by: ...` rationale. |
| 50 | +7. Apply shared JS and Next rubrics. |
| 51 | +8. Activate audiences based on audience matrix. |
| 52 | +9. Load at most 2-3 specialist external skills from the routing map. |
| 53 | +10. Return structured verdict with evidence. |
| 54 | + |
| 55 | +## Required Output Contract |
| 56 | +Use this exact top-level structure: |
| 57 | +- `VERDICT: [REJECT | REVISE | ACCEPT-WITH-RESERVATIONS | ACCEPT]` |
| 58 | +- `Overall Assessment` |
| 59 | +- `Pre-commitment Predictions` |
| 60 | +- `Critical Findings` |
| 61 | +- `Major Findings` |
| 62 | +- `Minor Findings` |
| 63 | +- `What's Missing` |
| 64 | +- `Ambiguity Risks` (plan reviews only) |
| 65 | +- `Multi-Perspective Notes` |
| 66 | +- `Verdict Justification` |
| 67 | +- `Open Questions (unscored)` |
44 | 68 |
|
45 | 69 | Rules: |
46 | | -- CRITICAL/MAJOR findings require evidence. |
47 | | -- Empty sections must say `None.` |
48 | | -- Speculation belongs in Open Questions. |
| 70 | +- CRITICAL and MAJOR findings must include concrete evidence (`file:line` or backtick-quoted artifact reference). |
| 71 | +- If a section has no items, write `None.` |
| 72 | +- Keep speculative points in `Open Questions` only. |
| 73 | +- In `Verdict Justification`, state whether escalation to adversarial review happened and why. |
| 74 | + |
| 75 | +## Perspectives |
| 76 | +Always run: |
| 77 | +- Security |
| 78 | +- New-hire |
| 79 | +- Ops |
| 80 | + |
| 81 | +Context-driven (activate when triggered): |
| 82 | +- Performance Engineer |
| 83 | +- DX Maintainer |
| 84 | +- Product Reliability |
| 85 | + |
| 86 | +Perspective notes must appear in `Multi-Perspective Notes`. |
| 87 | + |
| 88 | +## Next.js Must-Check List |
| 89 | +Always check these before final verdict: |
| 90 | +- RSC boundaries: server/client placement, serializability assumptions, and hydration safety. |
| 91 | +- Caching behavior: `revalidate`, tags, `cache`, and PPR boundary correctness. |
| 92 | +- Route contract safety: route handlers, server actions, and error boundary behavior. |
| 93 | +- Runtime fit: node vs edge constraints and dependency compatibility. |
| 94 | +- Upgrade safety: framework changes, codemod gaps, rollback path. |
| 95 | +- Operability: logging, failure handling, and blast radius. |
| 96 | + |
| 97 | +## Skill Loading Rules |
| 98 | +- Default: one core review skill + one specialist skill. |
| 99 | +- Avoid loading overlapping core skills simultaneously unless scope is broad. |
| 100 | +- Prefer higher-priority, active entries in external manifest. |
| 101 | + |
| 102 | +## Severity Calibration |
| 103 | +- CRITICAL: security, data loss, or deploy-blocking flaws. |
| 104 | +- MAJOR: likely user-facing regressions or significant rework required. |
| 105 | +- MINOR: non-blocking correctness/maintainability issues. |
| 106 | +- Do not inflate severity for style-only points. |
| 107 | + |
| 108 | +## Stop Conditions |
| 109 | +- If review scope is too broad, narrow by component/feature/path. |
| 110 | +- If evidence cannot be found, move concern to `Open Questions`. |
0 commit comments