[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
中文简介正在准备中。当前显示原文说明。
[Code Quality] Use when a workflow step or the user asks for service/API readiness: observability, reliability, data integrity and database performance.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:END -->[BLOCKING] Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval. Inside a workflow run,
/start-workflow→ Workflow-step mode bounds this rule. [BLOCKING] Before each step or sub-skill call, update todo tracking: setin_progresswhen step starts, setcompletedwhen step ends. [BLOCKING] Every completed/skipped step MUST include brief evidence or explicit skip reason. [BLOCKING] If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.
Review modes: For review/audit work, standalone defaults to
--review-only(--report-onlyalias);--fix-loopenables review → validate → authorized fix → fresh re-review, default cap 3.--fix-loop --loop-owner=callerreturns a read-only pass to the caller that owns fixes/re-review. Create triage, review, validation and re-review todo tasks first; apply the carriedreview-policycontract for LOW deferral and user-approved bounded extensions. Non-review modes and terminal findings validation keep their own dispatch.
Goal: Ensure service/API changes are production-ready across observability, reliability, data integrity, and database performance: score each dimension with evidence and expose operational gaps.
Summary:
/24 rating is advisory: Observability/8, Reliability/8, Data Integrity/4, DB Performance/4; strong 19–24, needs work 13–18, low 0–12. Unproven criteria score 0. Failed or unresolved binary gates block PASS regardless of score or owner risk acceptance.minRounds is met; never cycle for Round-2 LOW-only findings. Batched reviews (when grouped) re-score all criteria from combined evidence, never average batch scores.--report-only: run steps 1–5 and 7 plus findings validation; the caller owns fixes/re-review. No fixes, restart, nested agents, user questions or writes beyond the report. Return score, gate verdict and severity-grouped findings; read Report-Only Mode.Workflow:
--report-only, validate only — the caller owns fixes and re-review.file:line evidence for every score and gate item.Key Rules:
file:line evidence; an unprovable score is 0.--report-only the full re-review belongs to the caller that applies the fixes; the other three still run here./24 score, gate result, or verdict.When to use: After implementing backend service or API changes, before committing. Frontend-only changes exempt.
Why: Working code that can't be debugged, monitored, or rolled back is technical debt in disguise.
Deployment context: Read docs/project-config.json → infrastructure when deciding which deployment evidence and gate items apply:
containerization → check Dockerfiles, docker-composeorchestration → check K8s manifests, Helm chartscicd.tool → check pipeline configs--report-only)--report-only)Use when a caller runs this skill as a read-only leaf — e.g. a workflow parallel review barrier or a review batch — and another step owns every fix.
--report-onlyin$ARGUMENTSis an execution flag, not a scope; review-only is the default; standalone--fix-loopalone runs repair/restart phases.MANDATORY — when
--report-onlyis passed, read.claude/skills/workflow-review-changes/references/caller-mode.md§--report-onlyin full FIRST. It holds the rules every read-only leaf shares (no fix or restart, scope from the caller's brief, no nested fan-out, no user questions, write only the report, return contract); the rules below are this skill's own.
- Run main steps 1–5 and 7 plus the Why-Review Findings Validation Gate. Scope, the 12-criterion score, the Extended SRE Readiness gate, verdict mapping, the DB Performance Protocol, and the Structural Impact Analysis all run;
/why-review --validate-findingsstill validates every finding. Step 6 does not run: no fix, no restart, no fresh re-review sub-agent. Return the validated report; the caller owns fixes and any re-review. — why: two writers of one artifact inside a barrier race each other.- Scope. Apply Scope Resolution to the brief's files or diff. No backend service/API file in scope → return
N/A — no service/API files in scopewith the file list as evidence.- No nested fan-out. Skip
SYNC:systematic-review-batching; score the whole scope serially in this context (the holistic-scoring fallback above).- Map every gap to a severity by consequence (
SYNC:severity-rubric): a criterion scored0→ CRITICAL or HIGH,1→ MEDIUM, LOW only for a polish-only gap with evidence of no material impact; emit score, consequence, and tier together. Afailgate item is a failed binary gate carried as a CRITICAL blocker with its named consequence; apartialitem is an open evidence blocker, never LOW.- Return the advisory
/24score, the{n}/8gate result and the verdict (PASS only when no failed or unresolved binary gate and no finding blocking the current round remains), in addition to the caller-mode return contract. The Next Steps prompt does not run.For this mode the declared step order ends at step 7 without step 6; stopping there is the mode's contract, not a skipped step.
Verify readiness from implementations with file:line proof and >80% confidence. Trace error, retry and timeout paths; test assumptions about dependency failures, logging context, correlation and metrics. Unprovable scores are 0.
git diff --name-only)docs/project-config.json), API controllers, service classesScore each criterion 0-2: 0 = not addressed, 1 = partially, 2 = fully.
MANDATORY when grouped under the adaptive review plan: re-score all 12 criteria holistically from combined cross-batch evidence; never merge or average batch scores. Batch agents surface criterion evidence; the reducer assigns scores. A query and its index migration may be in different batches, so isolated scores can falsely report
0. If holistic scoring is infeasible, review the whole scope serially.
Think: If this service errors at 3am, can on-call engineer diagnose root cause from logs alone — without reproducing?
| # | Criterion | What to Check |
|---|---|---|
| 1 | Structured Logging | External API calls and critical operations log errors with context (request ID, user, parameters) |
| 2 | Error Context | Exceptions include enough context to diagnose without reproducing (entity IDs, operation type, input summary) |
| 3 | Metrics Awareness | Operations >100ms consider tracking duration. New endpoints consider latency monitoring |
| 4 | Correlation | Cross-service calls include or propagate correlation IDs for distributed tracing |
Think: If the downstream dependency is down or slow, does this service degrade gracefully or cascade-fail?
| # | Criterion | What to Check |
|---|---|---|
| 5 | Retry Strategy | Transient failures (HTTP, DB timeouts) have retry logic or documented reason for not retrying |
| 6 | Timeout Configuration | HTTP clients and external calls have explicit timeout (not relying on defaults) |
| 7 | Error Handling | Errors handled gracefully — no swallowed exceptions, no generic catch-all without logging |
| 8 | Fallback Behavior | Critical paths define behavior when dependencies fail (degraded mode, cached response, user-facing error) |
Think: If database wiped and reseeded from scratch, does system still reach a valid state?
| # | Criterion | What to Check |
|---|---|---|
| 9 | Seed vs Migration | Seed data (default records, system config) lives in startup data seeders, NOT in one-time migration executors |
| 10 | Seeder Idempotency | Data seeders use check-then-create pattern (query before insert) — safe for repeated runs on any environment |
Decision test: "If the database is reset, does this data still need to exist?" Yes → must be in seeder. No → migration acceptable.
Think: At 10x current data volume, do these queries still complete in <1s?
Database Performance Protocol (MANDATORY):
- Paging Required — ALL list/collection queries use pagination. NEVER load all records into memory. Verify: no unbounded
GetAll(),ToList(), orFind()withoutSkip/Takeor cursor-based paging.- Index Required — ALL query filter fields, foreign keys, and sort columns have database indexes configured. Verify: entity expressions match index field order, database collections have index management methods, migrations include indexes for WHERE/JOIN/ORDER BY columns.
| # | Criterion | What to Check |
|---|---|---|
| 11 | Pagination | List/collection queries use pagination (Skip/Take, cursor). No unbounded GetAll/ToList loading all records into memory |
| 12 | Database Indexes | Query filter fields, foreign keys, and sort columns have matching database indexes. Migrations include index creation |
Spec-Loop Discipline for changed core logic (MANDATORY — gates the verdict, not a scored criterion):
- Mutation bar, not coverage % — for changed service/API core logic the bar is the MUTATION-SCORE gate: a surviving mutant on a changed line is a release blocker (it proves an invariant the tests do not assert), NEVER a line-coverage-% question. A green coverage number over un-asserted behavior does not clear this gate.
- Dual feedback — every production-readiness finding that changes behavior feeds BOTH the spec (NAME the contract/invariant in Section 8) AND a guarding test; a code-only fix is INCOMPLETE. A surviving mutant → add the killing test AND record the invariant it protects in the spec.
Runs as main step 3, after scoring, before verdict mapping. Deploy-time and operate-time SRE aspects the 12-criteria
/24model does NOT score. Check each item step by step; recordpass/partial/failwithfile:lineevidence or explicitN/A — reason. Gate does not change/24math — it overlays it: a failed binary gate blocks PASS at every round regardless of score or owner risk acceptance;partialis unresolved, not a pass. Separately apply the canonical review predicate: round 1 blocks every validated severity; round 2 blocks CRITICAL/HIGH/MEDIUM and defers LOW. Owner risk acceptance is recorded but does not clear a failed gate or an open blocking finding. Read deployment context fromdocs/project-config.json → infrastructure(referenced above) to decide which items areN/A(e.g. no orchestration → readiness/liveness probesN/Awith stated reason).
| # | Gate Item | What to Check | Status | Evidence |
|---|---|---|---|---|
| G1 | Rollout & Rollback | Deploy is staged/canary-able; a documented, fast rollback path exists (feature flag, versioned + reversible migration). No irreversible one-way change without a stated recovery plan. | pass/partial/fail | file:line or N/A — reason |
| G2 | Health Checks | Readiness + liveness endpoints/probes exist and reflect real dependency health (not an always-200 stub). | pass/partial/fail | ... |
| G3 | Alerting & Runbook | New failure modes have an actionable alert (signal, not noise) and a runbook / escalation note. | pass/partial/fail | ... |
| G4 | SLO / Error-Budget | Change respects an SLO or names the latency/availability target it affects; no silent new failure mode against the budget. | pass/partial/fail | ... |
| G5 | Capacity & Resource Limits | Load ceilings, resource limits, autoscaling/back-pressure considered; no unbounded fan-out or unbounded in-memory growth. | pass/partial/fail | ... |
| G6 | Config & Secrets | Required config present in all envs and fails fast if missing; no secrets committed in the diff. | pass/partial/fail | ... |
| G7 | Graceful Shutdown/Startup | In-flight work drains on shutdown; startup waits for / degrades gracefully on unready dependencies. | pass/partial/fail | ... |
| G8 | Concurrency & Idempotency | Operations are safe under retry / at-least-once delivery; no race on shared state; idempotency keys where needed. | pass/partial/fail | ... |
Gate verdict: {n}/8 pass, with each non-applicable item justified separately. Any failed or unresolved binary gate, unresolved evidence, or finding blocking the current round ⇒ overall verdict cannot be PASS even at a 19-24 score. Use review-policy.cjs with the persisted round/minimum; never relabel a binary failure as LOW.
AI surface? Only if the change creates or changes a model call, prompt, agent, tool/MCP, retrieval or eval (see node .claude/scripts/ai-signal-scan.cjs): read .claude/skills/shared/protocols/ai-engineering-gate.md and route depth to /ai-engineering-review (not a gate item; {n}/8 unchanged); otherwise skip this line.
Invoke SYNC:scale-technique-gate: derive the system's scale tier from evidence (users/RPS, SLO, data volume, tenancy, topology — cite file:line/config/infra + confidence), then emit the Technique Applicability Matrix (technique | tier-warranted? | present? | verdict | advice | evidence) across the 10 concern groups. Surface warranted-but-missing reliability/scale techniques (rate limiting, backups, DR, failover, graceful degradation) as advice; flag OVER-ENGINEERED techniques the tier does not warrant.
Advisory only — this matrix does NOT add a gate item, does NOT change the
{n}/8gate result, the/24score, or the verdict. AMISSING-WARRANTEDtechnique is guidance to consider at this tier, NOT a gatefail.N/A-by-scalefor small systems is expected, never a failure. Full catalog →.claude/docs/scale-technique-catalog.md.
| Score | Advisory rating | Recommendation |
|---|---|---|
| 19-24 | Strong readiness | Candidate for PASS only after all binary gates, evidence, current-round severity bar and persisted minimum clear. No Git authority is granted. |
| 13-18 | Needs work | Address evidenced gaps; the score alone neither authorizes deployment nor invents a blocking finding. |
| 0-12 | Low readiness | Investigate operational gaps against the applicable criteria and evidence. |
Overall PASS/FAIL is separate from the advisory score: PASS requires the canonical review-policy.cjs round predicate, all binary gates and evidence resolved, and persisted minRounds met; otherwise FAIL. Keep deferred LOW findings visible after round 1.
Optional:
python .claude/scripts/code_graph connections <file> --jsonon service boundary files can hint at cross-service impact (verify by reading).
Optional: when grep and reading files alone may not reveal a high-risk blast radius (shared contract, many callers, cross-module/cross-service flow, public API), the code graph (.code-graph/graph.db) can add callers, dependents and impacted tests. Treat it as a hint, NOT proof: the graph can be stale or incomplete (it lags uncommitted edits and unindexed paths) — verify anything that matters by reading the files/grep. Skip it for low-risk or local changes.
python .claude/scripts/code_graph graph-blast-radius --json → blast radius >20 nodes is a rough high-risk deployment hint (confirm by reading)python .claude/scripts/code_graph query tests_for <function_name> --json → verify test coverage on changed functionspython .claude/scripts/code_graph trace <service-file> --direction downstream --json → hint at downstream event handlers, bus consumers, cross-service calls to check for error handling (verify by reading)Purpose: Adversarial validation of own findings BEFORE any fix. Catches over-flagged criteria, false positives, and severity/score inflation at the source rather than letting them drive fixes or ship downstream.
Trigger: Any finding produced (any severity). Skip ONLY when the verdict is unconditional PASS with literally zero findings. Also skip when called with --loop-owner=caller: the caller validates the merged report once (/start-workflow → Workflow-step mode).
Protocol:
tmp/reports/{skill}-{date}-{slug}.md/why-review --validate-findings tmp/reports/{skill}-{date}-{slug}.md — verify each finding has file:line proof, steel-man each rejected interpretation, and stress-test every severity/score classification (each finding must clear why-review's finding-survival bar to be kept)## Why-Review Validation Notes section citing what changed and why## Why-Review Validation line stating "All N findings re-validated against actual code; no severity changes."Skip conditions (record explicit reason if skipping): unconditional PASS with zero findings; why-review is itself the active context (avoid recursion); called with --loop-owner=caller (the caller validates the merged report once).
Why this exists: SRE sub-agent reports inherit confirmation bias — the orchestrator absorbs severity claims as ground truth. Validate findings BEFORE the fix so no fix is ever driven by an inflated or false finding; this gate feeds the "Validated Fix + Full Re-Review" loop below.
Not run under
--report-only— the validated report is returned to the caller, which owns fixes and any re-review.
When a review pass finds issues, validate findings before any fix. Do NOT spawn a fresh sub-agent only to re-review the same finding set before validation/fix. After validated SRE fixes applied, rerun the full SRE review. If that restarted review uses a sub-agent, spawn it with ZERO prior-round memory. A clean review pass ENDS the review once the persisted minRounds is met.
When a fresh sub-agent is part of the restarted review, spawn via canonical template in SYNC:review-protocol-injection:
subagent_type: code-reviewer"SRE production readiness review after validated fixes — score all 12 criteria (0-2) for {files reviewed in the current full scope}""Fresh full re-review after validated fixes. Zero memory of prior rounds. Re-read ALL target files from scratch."code-review-rules.md from the reference-docs root (default docs/project-reference; a docsRoots.projectReference.path entry in docs/project-config.json overrides the path)Fresh re-review focus (what prior rounds typically miss):
Final verdict = every review pass that actually ran, combined.
## SRE Review Results
**Scope:** {files reviewed}
**Date:** {date}
**Score:** {X}/24
**Verdict:** PASS / NEEDS WORK / NOT READY
### Observability ({X}/8)
| # | Criterion | Score | Evidence |
| --- | ------------------ | ----- | -------------------------- |
| 1 | Structured Logging | 0/1/2 | {file:line or "not found"} |
| 2 | Error Context | 0/1/2 | ... |
| 3 | Metrics Awareness | 0/1/2 | ... |
| 4 | Correlation | 0/1/2 | ... |
### Reliability ({X}/8)
| # | Criterion | Score | Evidence |
| --- | ----------------- | ----- | -------- |
| 5 | Retry Strategy | 0/1/2 | ... |
| 6 | Timeout Config | 0/1/2 | ... |
| 7 | Error Handling | 0/1/2 | ... |
| 8 | Fallback Behavior | 0/1/2 | ... |
### Data Integrity ({X}/4)
| # | Criterion | Score | Evidence |
| --- | ------------------ | ----- | -------- |
| 9 | Seed vs Migration | 0/1/2 | ... |
| 10 | Seeder Idempotency | 0/1/2 | ... |
### Database Performance ({X}/4)
| # | Criterion | Score | Evidence |
| --- | ---------------- | ----- | -------- |
| 11 | Pagination | 0/1/2 | ... |
| 12 | Database Indexes | 0/1/2 | ... |
### Extended SRE Readiness ({n}/8 gate — pass/fail, does not change /24)
| # | Gate Item | Status | Evidence |
| -- | ------------------------ | ----------------- | ----------------- |
| G1 | Rollout & Rollback | pass/partial/fail | `file:line` / N/A |
| G2 | Health Checks | pass/partial/fail | ... |
| G3 | Alerting & Runbook | pass/partial/fail | ... |
| G4 | SLO / Error-Budget | pass/partial/fail | ... |
| G5 | Capacity & Resource Limits | pass/partial/fail | ... |
| G6 | Config & Secrets | pass/partial/fail | ... |
| G7 | Graceful Shutdown/Startup | pass/partial/fail | ... |
| G8 | Concurrency & Idempotency | pass/partial/fail | ... |
_Any failed or unresolved binary gate above blocks PASS regardless of score or owner risk acceptance; open current-round blocking findings also prevent PASS._
### Gaps to Address
- {specific actionable item}
### Recommendation
{Proceed / Address gaps first}
Optional performance-test handoff: when readiness evidence lacks repeatable workload, large-data, query or memory checks, hint at /performance-test --mode=write <scope>. Read the handoff contract when offering it. An interactive owner may ask whether to write tests; an affirmative authorizes authoring plus static review only. Report-only/caller-owned/sub-agent runs return the suggestion without asking or starting work. Never auto-init, auto-write or auto-run tests from the readiness review. This optional offer does not change the score/verdict and does not require a routine question.
MANDATORY after a standalone run, use ask user question tool. Skip it when a parent workflow or skill invoked this review, when it runs as a sub-agent, or under --report-only — return the report path, score, gate verdict, and findings to the caller instead:
Combined audit: For a whole-project architecture + compliance + production-readiness audit in one pass, run
/architecture --mode=full(or/start-workflow workflow-architecture-audit) — fans out this skill,architecture --mode=review,architecture --mode=scalabilityas parallel sub-agents and synthesizes one consolidated report.
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting. Keep task depth proportional to the work.
domain-entities-reference.md in the reference-docs root (default docs/project-reference; a docsRoots.projectReference.path entry in docs/project-config.json overrides the path) — Domain entity catalog, relationships, cross-service sync (read when task involves business entities/models)Critical Purpose: Ensure quality — no flaws, no bugs, no missing updates, no stale content. Verify code AND documentation.
External Memory: Complex/lengthy work → write intermediate findings + final results to
tmp/reports/— prevents context loss, serves as deliverable.
<!-- PROTOCOL-GUIDES:START -->Evidence Gate: MANDATORY — every claim, finding, recommendation requires
file:lineproof or traced evidence with confidence percentage (>80% to act, <80% verify first).
Protocol guides — Apply each protocol only when its read-when condition holds. If a protocol's text is not in your context, read its file below before you act on it.
category-review-thinking — Derive review concerns per category of changed files from domain knowledge; reviewing a changeset that spans several file categories → .claude/skills/shared/protocols/category-review-thinking.mdengineering-foundation-gate — Seven engineering-foundation dimensions judged by project profile; creating or reviewing how a project is built, run, tested or checked → .claude/skills/shared/protocols/engineering-foundation-gate.mdevidence-based-reasoning — Ground every material claim in file:line, config or source evidence, with stated confidence; making any claim, finding or recommendation → .claude/skills/shared/protocols/evidence-based-reasoning.mdgoal-contract-satisfaction-loop — Save the goal in a file and loop until every saved criterion passes; executing work against a user goal → .claude/skills/shared/protocols/goal-contract-satisfaction-loop.mdgraph-assisted-investigation — Optional hint: a code-graph query can add callers and dependents when grep may miss a high-risk blast radius, and it can be stale; a high-risk change where grep and reading alone may miss the blast radius → .claude/skills/shared/protocols/graph-assisted-investigation.mdmeasured-capacity-engineering — Model demand, reduce measured work safely and prove capacity before scaling; planning, building, testing or reviewing hot paths, caches or capacity → .claude/skills/shared/protocols/measured-capacity-engineering.mdreview-decision-autonomy — Choose supported review decisions and ask before extending the round budget; running any review or audit skill or mode → .claude/skills/shared/protocols/review-decision-autonomy.mdreview-policy — Review-only or a three-round fix loop with explicit extension and fresh post-fix evidence; deciding round eligibility, blocking findings or review state → .claude/skills/shared/protocols/review-policy.mdreview-principle-awareness — Classify the change context first, then apply the current principles that fit it; starting any review → .claude/skills/shared/protocols/review-principle-awareness.mdreview-protocol-injection — Verbatim template and protocol blocks for every fresh sub-agent review prompt; spawning a fresh sub-agent to review → .claude/skills/shared/protocols/review-protocol-injection.mdscale-technique-gate — Which scale techniques a system warrants, and which it does not; reviewing architecture or production readiness → .claude/skills/shared/protocols/scale-technique-gate.mdscenario-stress-eval — Judge the system under concrete failure and load scenarios; evaluating resilience or production readiness → .claude/skills/shared/protocols/scenario-stress-eval.mdseverity-rubric — One consequence-based Critical, High, Medium, Low scale for every finding and gate; classifying a finding or deciding whether a review round passes → .claude/skills/shared/protocols/severity-rubric.mdsubagent-return-contract — Sub-agents return a structured envelope and a report path, never an inline report; spawning a sub-agent → .claude/skills/shared/protocols/subagent-return-contract.mdsystematic-review-batching — Triage all files and plan adaptive review with complete coverage and no fixed size caps; choosing review assignments or handling working-set overflow → .claude/skills/shared/protocols/systematic-review-batching.mdtask-tracking-external-report — Task breakdown before the work and report files written incrementally; starting any multi-step skill, plan or review → .claude/skills/shared/protocols/task-tracking-external-report.mdtrade-off-interrogation-gate — Three trade-off questions before any verdict, score or recommendation; rendering a verdict or recommending an option → .claude/skills/shared/protocols/trade-off-interrogation-gate.mdOptional advice: the code graph (.code-graph/graph.db) can hint at a high-risk blast radius grep misses; it can be stale, so verify by reading files. Never required.
IMPORTANT MUST ATTENTION cite file:line evidence for every claim; never speculate. Confidence >80% to act, <60% = do NOT recommend; "not enough evidence" is valid output.
tmp/reports/ incrementally and synthesize from disk.MUST ATTENTION Triage all files, write a short review plan and create review/validation/fix/re-review tasks first. Choose inline work or authorized specialists from risk, relationships and context headroom; no fixed file/line/byte caps. Persist coverage, reconcile interactions and validate findings before fixes or PASS.
<!-- /SYNC:systematic-review-batching:reminder --> <!-- SYNC:severity-rubric:reminder -->NOT VERIFIABLE only when the concern would be MEDIUM or higher (an observation otherwise) — never a speculative LOW.file:line evidence — never a fixed checklist.IMPORTANT MUST ATTENTION scale-technique gate: derive the scale tier from evidence FIRST (T0 internal · T1 <10k · T2 10k–1M · T3 millions+), then judge each warranted technique PRESENT/MISSING-WARRANTED/N/A-by-scale/OVER-ENGINEERED. Advise on warranted-but-missing gaps AND advise AGAINST unwarranted heavyweight techniques (anti-over-engineering). ADVICE-ONLY — emit the Technique Applicability Matrix as guidance; NEVER mutate any score, verdict band, or gate pass/fail. Full catalog → .claude/docs/scale-technique-catalog.md (authoritative for tier thresholds & per-technique warranting tiers — on any change update the catalog FIRST, then re-run inject_scale_technique_gate.py).
IMPORTANT MUST ATTENTION scenario-stress gate: reuse the scale tier T0–T3 AND derive business-criticality B0–B3 from evidence first — apply the criticality-signal floor (regulated/PII/financial/health data · money movement · auth/identity · legal-compliance → at least B2 even absent SLA docs; do NOT default to B3). Select only the scenarios the B/T combination warrants, then walk each (simulate → trace → failure signature → self-heal/MTTR → trade-off) and assign WITHSTANDS/DEGRADES-GRACEFULLY/FAILS-HARD/N/A-by-business/OVER-HARDENED. Anti-over-engineering is first-class (a lean system that needs no HA/DR is a PASS) AND symmetric (never under-harden a B2+ system for low traffic). ADVICE-ONLY — emit the Scenario Stress Matrix as guidance; NEVER mutate any score, verdict band, or gate pass/fail. Full catalog → .claude/docs/scenario-stress-catalog.md (authoritative for scenarios/verdicts/business-tiers — on any change update the catalog FIRST, then re-run inject_scenario_stress_gate.py; scale tier stays single-sourced in scale-technique-catalog.md).
IMPORTANT MUST ATTENTION follow declared step order for this skill; NEVER skip, reorder, or merge steps without explicit user approval; inside a workflow run, /start-workflow → Workflow-step mode bounds this
IMPORTANT MUST ATTENTION for every step/sub-skill call: set in_progress before execution, set completed after execution
IMPORTANT MUST ATTENTION every skipped step MUST include explicit reason; every completed step MUST include concise evidence
IMPORTANT MUST ATTENTION if Task tools unavailable, maintain an equivalent step-by-step plan tracker with synchronized statuses
goal.md → <plans root>/goals/{YYMMDD-HHmm}-{slug}/goal.md, plans root default plans and overridable via a docsRoots.plans.path entry in docs/project-config.json → create from current request) and read saved success criteria before editing.Review/audit invocations: follow SYNC:review-decision-autonomy for every decision prompt; choose supported recommendations without asking, preserve round-extension approval and actual authority.
ask user question tool BEFORE the verdict.ask user question tool reaches only the main interactive agent, so a sub-agent or a terminal/verdict-only mode cannot ask. There the duty is REDIRECTED, not waived: still name the trade-off, still decide materiality, record confirmed? = NO — cannot ask from this context, and state the unconfirmed MATERIAL trade-off in your RETURNED verdict so the CALLER escalates it (a note only in an on-disk report is not a handoff); never emit an unqualified PASS. If you CAN ask, you MUST ask.IMPORTANT MUST ATTENTION evidence-backed lifecycle/scale/criticality/repo/runtime profile; unknowns take lower tiers. Judge all 7 outcomes: F1 reproducible build/run/test · F2 exercise supported/required modes; dual modes only when warranted · F3 applicable local/CI/production-shaped test portability · F4 test-strength proof; no universal mutation tool · F5 measured performance at warranted scale/risk · F6 build/change scalability at meaningful module boundaries · F7 stack/profile-fit mechanical checks. Evidence-backed N/A-by-profile is valid; prevent over-engineering. Creation blocks warranted omissions; brownfield advises without score changes, with smallest next steps. Catalog: .claude/docs/engineering-foundation-catalog.md; update first, re-run inject_engineering_foundation_gate.py.
IMPORTANT MUST ATTENTION Every review first checks the change context and routes only applicable principles to their detailed protocols: scale-ready foundation, test intent in the project's native format (GWT is one option), AI-agent-as-user access, and UI/component design when relevant. Record evidence-backed apply/adapt/defer/N/A/block/unverified status with owner and next step; do not invent unrelated findings or expand scope.
<!-- /SYNC:review-principle-awareness:reminder --> <!-- SYNC:measured-capacity-engineering:reminder -->MUST ATTENTION capacity work: model demand/SLO and distinguish sessions from RPS/in-flight work; disclose load model and offered vs achieved demand; reduce measured work at a safe owner; preserve cache authorization/freshness/bounds; prove cold-state, overload recovery and justified headroom before scaling. Static review returns a verification plan, not invented throughput. Retain the hosting skill's scores, gates and authority.
<!-- /SYNC:measured-capacity-engineering:reminder --> <!-- SYNC:review-decision-autonomy:reminder -->MUST ATTENTION Decide supported review choices and recommendations, record the rationale, and finish without routine user questions. Keep round-limit extension, indispensable facts and actual action authority; preserve source coverage, validation, tests, read-only boundaries and budgets. Review decisions do not accept open risks or make a failed gate pass.
<!-- /SYNC:review-decision-autonomy:reminder -->IMPORTANT MUST ATTENTION Goal: Ensure service/API changes are production-ready across observability, reliability, data integrity, and database performance: score each dimension with evidence and expose operational gaps.
IMPORTANT MUST ATTENTION Main steps: (1) Resolve backend/API scope → (2) Score 12 criteria /24 → (3) Check 8 binary SRE gates → (4) Map score + gates to verdict → (5) Trace structural impact → (6) Validate findings, fix current-round blockers and fully re-review → (7) Emit the SRE report. --report-only runs 1–5 and 7 plus validation; the caller owns step 6.
in_progress and complete it after evidence. Persist complex reviews incrementally to tmp/reports/; sub-agents return a summary and report path.code-review-rules.md, backend-patterns-reference.md, domain-entities-reference.md, and always lessons.md; cite Reference docs read: .... Grep 3+ relevant patterns (base handlers/controllers, paging/index helpers) and verify their fit before scoring.file:line proof and confidence (>80% to act; verify below 80%). Unproven scores are 0. Trace downstream effects; the optional graph is a stale-able hint verified by grep/read.minRounds clear; failed binary gates always block.--report-only, score serially without fan-out./24, {n}/8, or the verdict. The score is advisory; mandatory DB proof, findings validation, re-review and binary gates are not waived by change size or owner risk acceptance.--report-only runs return score, gate verdict, severity-grouped findings and report path to the caller. Report-only writes only that report and never fixes, restarts or asks.Anti-Rationalization:
| Evasion | Rebuttal |
|---|---|
| "Fix was small, skip re-review" | NEVER — fixes changed the target; validate findings, then rerun the FULL review before PASS |
| "No explicit paging but it looks fine" | Score 0 until proven with file:line. Assume worst without evidence |
| "Already checked observability" | Show file:line proof. No proof = no check |
| "The score is advisory so skip MANDATORY steps" | Only the rating is advisory. Overall PASS/FAIL, binary gates and validated-fix re-review remain mandatory |
| "Score it from what I remember of the code" | Re-read and cite file:line; inference is not evidence — unprovable = 0 |
| "Batched, so average the per-batch scores" | Re-score all 12 holistically from combined evidence; each batch sees only its own files and false-flags |
| "Tests pass, mutation gate is covered" | Green coverage over un-asserted behavior fails the gate; a surviving mutant is a blocker |
MUST ATTENTION Triage all targets, plan and create review/validation/fix/fresh re-review tasks first. Review-only reports without edits; fix-loop freshly reviews every repair under one fixing owner. Default cap three rounds: disclose deferred LOWs, ask and wait before a bounded extension for MEDIUM+ or failed required checks. Preserve scope, coverage and actual operation authority.
<!-- /SYNC:review-policy:reminder -->还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
中文简介正在准备中。当前显示原文说明。
[Code Quality] Use when a workflow step or the user asks for AI code or plan review: LLM calls, prompts, agents, RAG, evals and guardrails. --mode={code|plan}; --report-only is read-only.
中文简介正在准备中。当前显示原文说明。
[Architecture] Use when a workflow step or the user asks for architecture design, compliance review, scalability grading or whole-project audit via --mode={design|review|scalability|full}.
中文简介正在准备中。当前显示原文说明。
[Content] Use when a workflow step or the user asks for product/feature ideation with ranked opportunities and validation tests. --mode={roadmap|scope}.
中文简介正在准备中。当前显示原文说明。
[Content] Use when a workflow step or the user asks for business viability: Business Model Canvas, financials, risks and go-to-market recommendation.
中文简介正在准备中。当前显示原文说明。
[Code Quality] Use when a workflow step or the user asks for a focused code-change review: staged, unstaged, branch diff or simple pull request. --fix-loop fixes and re-reviews. Complex pull request: workflow-review-changes; rationale: why-review.
中文简介正在准备中。当前显示原文说明。