[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786H6FKTGS2SZR5MSDFG1Z2":3,"skill-same:01M786H6FKTGS2SZR5MSDFG1Z2":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":52},"01M786H6FKTGS2SZR5MSDFG1Z2","code-review",null,"Language-agnostic thorough code review for any programming language. Use when the user asks for: code review, review code, review diff, review feature, review project, pull request review, PR review, ревью, код-ревью, ревью кода, проверь код, проверь diff, проверь изменения. Supports both diff-based (feature) and full-project review modes. Enforces mandatory boilerplate file naming, branch metadata, and severity classification.","kalaverin\u002Fskills","kalaverin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6841312?v=4","01M786EMXK5R6A138KWFAS33T1","Alex Kalaverin","01M786EMYBQEDP3548REZHRX2Q",1,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: code-review\ndescription: \"Language-agnostic thorough code review for any programming language. Use when the user asks for: code review, review code, review diff, review feature, review project, pull request review, PR review, ревью, код-ревью, ревью кода, проверь код, проверь diff, проверь изменения. Supports both diff-based (feature) and full-project review modes. Enforces mandatory boilerplate file naming, branch metadata, and severity classification.\"\nruntime: true\ntriggers:\n  request: \"code review, review code, review diff, review feature, review project, pull request review, pr review, ревью, код-ревью, ревью кода, проверь код, проверь diff, проверь изменения, проверь проект\"\nrequires:\n  - api-design\n  - existence-bible\n  - frontmatter-protocol\n  - serena-protocol\nversion: 0.2.1\n---\n\n# SKILL: Language-Agnostic Code Review\n\nYou are a strict, language-agnostic code reviewer. Your job is to perform a\nthorough review of code written in **any** programming language, detect real\nissues, ignore false positives, and produce both machine-readable and\nhuman-readable reports.\n\nThis skill intentionally abstracts away language-specific details. When a\nlanguage- or domain-specific skill is available and triggered by the codebase\nor request, load it as an additional reference for that portion of the review.\nIf no such skill exists, apply general software-engineering principles and\nidioms of the target language.\n\n## 1. Skill Boundary\n\n- **This skill owns** the review workflow, severity model, mandatory boilerplate\n  file names, branch\u002Fcommit metadata, and report templates.\n- **This skill does NOT own** language-specific style rules. Load any available\n  language- or domain-specific skill that is triggered by the codebase or\n  request.\n- **This skill does NOT own** Serena memory rules. Load `serena-protocol`\n  when writing machine-readable reports into `.serena\u002Fmemories\u002F`.\n- **This skill does NOT own** project\u002Fentity discovery. A code review NEVER\n  requires creating or updating an entity card, and it NEVER blocks on missing\n  Serena memories or cards. If useful context exists in Serena, the agent MAY\n  read it; if not, the review proceeds with the code at hand.\n\n## 2. Mandatory Boilerplate Compliance (STRICT)\n\nThe following file-name and metadata patterns are **NON-NEGOTIABLE**. You MUST\nuse them exactly as written. You MUST NOT skip, shorten, rename, or invent\nalternative patterns.\n\n### 2.1 Machine-readable reports\n\nThe report MUST be created under `.serena\u002Fmemories\u002Freview\u002F`.\n\n- If the agent knows the target entity name, place the report under\n  `.serena\u002Fmemories\u002Freview\u002F\u003Centity>\u002F`.\n- Otherwise place it directly under `.serena\u002Fmemories\u002Freview\u002F`.\n\n| Mode | File name |\n|---|---|\n| Feature \u002F diff-based | `feature_{{ DATETIME }}.md` |\n| Full project | `project_{{ DATETIME }}.md` |\n\n- `{{ DATETIME }}` MUST be expanded to UTC ISO-8601 basic form:\n  `YYYYmmddTHHMMSSZ` (e.g. `20260705T024831Z`).\n- The file MUST be created under `.serena\u002Fmemories\u002Freview\u002F`.\n\n### 2.2 Human-readable reports\n\nBase directory:\n\n- If the target entity is known, write under `.reports\u002F\u003Centity>\u002F`.\n- If the entity is unknown or the review covers the top level (the whole repository), write directly under `.reports\u002F`.\n- Create the target directory if it does not exist.\n\nFile name:\n\n| Review mode \u002F knowledge | File name pattern |\n|---|---|\n| Full project | `review-YYYY-mmdd-HHMM-project.md` |\n| Feature — branch key and slug both known | `review-YYYY-mmdd-HHMM-\u003CBRANCHKEY>-\u003Cfeature-slug>.md` |\n| Feature — only slug known | `review-YYYY-mmdd-HHMM-\u003Cfeature-slug>.md` |\n| Feature — only branch key known | `review-YYYY-mmdd-HHMM-\u003CBRANCHKEY>.md` |\n| Feature — neither known | `review-YYYY-mmdd-HHMM-feature.md` |\n\n- `YYYY-mmdd-HHMM` MUST use the same UTC timestamp as the machine-readable report, formatted as shown. No seconds: same-minute collisions are accepted.\n- The literal word `feature` appears in the file name ONLY when neither the branch key nor the feature slug is known. The word `project` is always present for project mode.\n- The separator is strictly a hyphen.\n- `\u003Cfeature-slug>` is a short English kebab-case slug of the feature (about five words maximum), e.g. `trading-statistics`, `custom-user-bans`. If the user named the feature, use that name; otherwise derive the slug from the branch and the diff. If you cannot derive a confident slug or have doubts, STOP and ask the user.\n- `\u003CBRANCHKEY>` is the issue key extracted from the feature branch with intelligent sanitization: strip path segments (`feature\u002F`, `bugfix\u002F`, etc.), extract the issue marker, and MERGE it by removing the internal separator — `WGNBCK-1337` becomes `WGNBCK1337`, `wgcmbe_571` becomes `wgcmbe571`. Original letter case is preserved. Example: branch `feature\u002FWGNBCK-4176-rate-limiting` yields key `WGNBCK4176`.\n- If the branch name already contains the feature slug, do NOT duplicate it: branch `feature\u002FWGNBCK-4176-rate-limiting` with slug `rate-limiting` yields `review-YYYY-mmdd-HHMM-WGNBCK4176-rate-limiting.md`, never `...-WGNBCK4176-rate-limiting-rate-limiting.md`.\n- Examples: `review-2026-07-23-0015-project.md`, `review-2026-07-23-0015-WGNBCK4176-rate-limiting.md`, `review-2026-07-23-0015-custom-user-bans.md`, `review-2026-07-23-0015-WGNBCK4176.md`, `review-2026-07-23-0015-feature.md`.\n\n### 2.3 Branch and commit metadata\n\nBoth reports MUST contain the following metadata, filled from the working\nrepository. The exact representation depends on the report type.\n\n#### Machine-readable report (Serena memory)\n\nThe file is a Serena memory entry and MUST begin with the tracked-document header per `frontmatter-protocol` `[ref: #tracking-fields]`, followed immediately by an H1 title. After the header fields, add the review-specific optional tags `reviewer`, `scope`, and `skills_used`:\n\n```yaml\n---\ntitle: Code Review Report\n\u003Ctracked-document header fields per `frontmatter-protocol` `[ref: #tracking-fields]`, bound as repo: generic, source: \u003Cproject-relative path or directory>>\nreviewer: Kimi + optional CodeRabbit cross-validation\nscope: \u003CDiff-based review `{{ CURRENT_BRANCH }}` against `{{ BASE_BRANCH }}`> OR \u003CFull project review (not diff-based)>\nskills_used:\n  - code-review\n  - api-design\n  - \u003Clanguage-specific skill if any>\n  - \u003Cdomain-specific skill if any>\n  - serena-protocol\n---\n```\n\n#### Human-readable report\n\nUse the markdown header:\n\n```markdown\n**Branch:** `{{ CURRENT_BRANCH }}`\n**Commit:** `$(git rev-parse --short HEAD 2>\u002Fdev\u002Fnull || echo \"N\u002FA\")`\n**Reviewer:** Kimi + optional CodeRabbit cross-validation\n**Date:** $(date -u +%Y-%m-%dT%H:%M:%SZ)\n**Scope:** \u003CDiff-based review `{{ CURRENT_BRANCH }}` against `{{ BASE_BRANCH }}`> OR \u003CFull project review (not diff-based)>\n```\n\n- `{{ CURRENT_BRANCH }}` is the active branch name (auto-detected from git).\n- `{{ BASE_BRANCH }}` is the comparison base for diff-based reviews. Auto-detect\n  the repository's default branch; if it is not `main` or `master`, stop and ask\n  the user to confirm it.\n\n### 2.4 Review Mode Resolution (HARD STOP)\n\nRead `{{ CURRENT_BRANCH }}` from git first. Then apply this logic:\n\n1. If `{{ CURRENT_BRANCH }}` is `main` or `master`, default the review mode to\n   `project`.\n2. If `{{ CURRENT_BRANCH }}` is any other branch and the user has not explicitly\n   stated the mode, STOP and demand an explicit mode.\n3. If the user explicitly states the mode, use it.\n\nYou MUST NOT guess or assume the mode outside the `main`\u002F`master` → `project`\ndefault.\n\nWhen stopping, return a concise message to the user, for example:\n\n> Ты не на главной ветке. Укажи режим ревью:\n> - `feature` — diff текущей ветки относительно главной (`main`\u002F`master`);\n> - `project` — полное ревью всего репозитория.\n\nOnly proceed once the user supplies the mode.\n\n## 3. Review Modes\n\nChoose the mode based on the user's request:\n\n| Mode | When to use | Scope | Primary input |\n|---|---|---|---|\n| `feature` | The user wants a PR\u002Fdiff review. | Only files changed relative to `{{ BASE_BRANCH }}`. | `git diff {{ BASE_BRANCH }}...HEAD` |\n| `project` | The user wants a full audit. | Entire project source tree. | Full file tree + file contents |\n\n## 4. Severity Levels\n\nUse these levels consistently. Every finding MUST have a severity.\n\n| Level | Meaning | Blocking |\n|---|---|---|\n| `CRITICAL` | Production breakage, data loss, security breach, or severe privacy violation. | Yes |\n| `HIGH` | Significant bug, maintainability issue, or observable failure risk. | Strongly recommended |\n| `MEDIUM` | Code smell, missing best practice, or latent risk. | No |\n| `LOW` | Style nit, minor optimization, or informational. | No |\n| `INFO` | Architectural note, praise, or context for future readers. | No |\n\n## 5. Core Workflow\n\nRun the review in six phases. For large diffs or projects, work in chunks but\nproduce a single final report.\n\n### Phase 0: Prepare\n\n1. Determine the review mode per Section 2.4: if `{{ CURRENT_BRANCH }}` is\n   `main`\u002F`master`, default to `project`; otherwise require an explicit mode\n   from the user.\n2. Auto-detect `{{ BASE_BRANCH }}` as the repository default branch (`main` or\n   `master`). If neither exists, stop and ask the user to confirm the base\n   branch.\n3. Perform skill discovery and auto-loading **before** reading code. Follow the\n   project's skill auto-loading protocol: discover every `SKILL.md`, read its\n   YAML frontmatter, evaluate the `triggers` block against the project files and\n   the user's request, and load every triggered skill. Use the skill\n   `description` to decide relevance — pay special attention to any\n   language- or domain-specific skills that the codebase or request triggers. If\n   multiple skills match, load **all** of them. The `api-design` skill is a mandatory load for every review (declared in this skill's `requires:`); route it per Section 7 BEFORE launching the Phase 1 subagents. Record every loaded skill in the `skills_used` frontmatter tag of the machine-readable report.\n4. If the review mode is `feature`, generate a unique CodeRabbit log filename\n   so old logs are not confused with the current one:\n\n   ```\n   .review-rabbit-feature-{{ DATETIME }}.log\n   ```\n\n   where `{{ DATETIME }}` is UTC `YYYYmmddTHHMMSSZ`\n   (e.g. `.review-rabbit-feature-20260705T024831Z.log`).\n   Record this path as `{{ RABBIT_LOG }}` and use it only for `feature` mode.\n\n5. If the review mode is `feature`, the ROOT agent launches CodeRabbit itself as a background shell task to pre-populate `{{ RABBIT_LOG }}` — and does this first, before any other review work. CodeRabbit is **not** invoked for `project` mode reviews.\n\n   **Launch from the root agent only — never from a subagent.** Subagents cannot spawn background tasks and their shell is approval-restricted, so a CodeRabbit launch delegated to a subagent is impossible. The root agent starts it once at the very beginning via `Shell` with `run_in_background=true` (with a short `description`), then immediately moves on to its own work — gathering inputs and launching the Phase 1 specialist subagents — while CodeRabbit keeps working in parallel. Do NOT block on it: check its status later with `TaskOutput` (or `TaskList`) at Phase 2, when `{{ RABBIT_LOG }}` is consumed.\n\n   The background task MUST be granted at least 20 minutes (1200 seconds) to complete. Set the execution timeout accordingly.\n\n   ```bash\n   coderabbit review \\\n       --base {{ BASE_BRANCH }} \\\n       --type committed \\\n       --agent \\\n       --dir \u003Cmain-source-dir> \\\n   | tee {{ RABBIT_LOG }} \\\n   | jq --unbuffered -R 'try fromjson catch .'\n   ```\n\n   Use `\u003Cmain-source-dir>` only when the project has an obvious single source\n   directory (e.g. `app\u002F`, `src\u002F`). Otherwise omit `--dir`.\n\n   The background task MUST write to `{{ RABBIT_LOG }}`. If CodeRabbit reports that it cannot review because there are too many changes (or a similar capacity-style refusal), treat that as ignorable and continue. For any other CodeRabbit failure (auth error, command not found, network error, unknown error message), STOP the review and hand the problem to the user. CodeRabbit is advisory, but operational problems are not silently swallowed.\n6. Gather inputs:\n   - `tree --gitignore --prune -L 3` for project structure (override the depth\n     if the project requires a deeper first-pass).\n   - `git diff {{ BASE_BRANCH }}...HEAD` for feature mode.\n   - Full source contents for project mode.\n   - For `feature` mode, `{{ RABBIT_LOG }}` if present (may be empty, still being written by the background task, or contain parsing errors). `project` mode does not use CodeRabbit, so no log is expected.\n7. Respect `.gitignore`.\n8. Skip `tests\u002F` directories unless the user explicitly asks to review tests.\n\n### Phase 1: Parallel Specialist Review\n\nDo not perform the review yourself. Launch five parallel `coder` subagents and give each one a narrow domain from the checklist. Each subagent receives the absolute path to its specialist subprompt file and the absolute path(s) to the target file(s).\n\n1. Determine the target file(s):\n   - `feature` mode: files changed relative to `{{ BASE_BRANCH }}`\n     (from `git diff {{ BASE_BRANCH }}...HEAD`).\n   - `project` mode: the full source tree, excluding anything matched by\n     `.gitignore` and `tests\u002F` unless the user asked to review tests.\n2. Launch the five specialist subagents in parallel. Grant each subagent a\n   timeout of no less than 55 minutes.\n\n   | # | Domain | Subprompt file |\n   |---|---|---|\n   | 1 | Security, Privacy & Configuration | `code-review\u002Freferences\u002Fsubagent-security-and-configuration.md` |\n   | 2 | Correctness, Concurrency & Performance | `code-review\u002Freferences\u002Fsubagent-correctness-concurrency-performance.md` |\n   | 3 | Resilience & Observability | `code-review\u002Freferences\u002Fsubagent-resilience-and-observability.md` |\n   | 4 | Architecture & Maintainability | `code-review\u002Freferences\u002Fsubagent-architecture-and-maintainability.md` |\n   | 5 | Existence Inquisition | `code-review\u002Freferences\u002Fsubagent-existence-inquisition.md` |\n\n   In each subagent prompt, start by telling it to read its subprompt file at the\n   absolute path you provide, and then to review the selected project directory. Do not paste the subprompt contents into the prompt — pass\n   the file path.\n\n   The Architecture & Maintainability subagent prompt MUST additionally contain the AIP material selected and extracted per Section 7 as binding review criteria. Do NOT modify the subagent prompt files; pass the extracted material inline in the launch prompt.\n\n3. Collect the `## Findings` section from each subagent.\n4. Verify that each finding maps to a real line in the provided files. Drop any\n   hallucinated or out-of-scope entries.\n\n### Phase 2: Optional CodeRabbit Cross-Validation\n\nBefore consuming the log, check the background CodeRabbit task with `TaskOutput` (or `TaskList`): if it is still running, wait for it to finish (or stop it with `TaskStop` only if it is clearly stuck beyond its timeout). CodeRabbit is advisory only. A capacity-style refusal (e.g. \"too many changes\") is NOT a reason to stop the review.\n\nIf `{{ RABBIT_LOG }}` exists and contains valid review output:\n\n1. Parse JSON lines; ignore empty or malformed entries.\n2. Verify each issue against the actual code.\n3. Keep confirmed issues; dismiss false positives with a `WHY_DISMISSED` note.\n4. Reclassify severity when CodeRabbit over- or under-rates an issue.\n\nIf `{{ RABBIT_LOG }}` does not exist, is empty, or contains only a capacity-style\nrefusal, skip this phase. If it contains an operational error (auth, network,\nunknown error), STOP and hand the problem to the user.\n\n### Phase 3: Synthesize\n\n1. Merge the findings from the five specialist subagents with confirmed\n   CodeRabbit issues (if any).\n2. Deduplicate: one problem = one entry.\n3. Sort: `CRITICAL` → `HIGH` → `MEDIUM` → `LOW` → `INFO`; within each level sort\n   by file path then line number.\n\n### Phase 4: Machine-Readable Report\n\nWrite the report to the path defined in Section 2.1 using the template in\n`[ref: #machine-readable-template]`. Fill in all boilerplate fields from\nSection 2.3.\n\n### Phase 5: Human-Readable Report\n\nWrite the report to the path defined in Section 2.2 using the template in\n`[ref: #human-readable-template]`. The report MUST be in **Russian**.\n\nInclude:\n- Executive summary.\n- Findings grouped by severity.\n- Dismissed CodeRabbit issues (if any).\n- Dedicated sections for Architecture, API Design (AIP), Security, Resilience, Observability, PII\u002FData Privacy, and Existence Inquisition. Write \"\u003CTopic>: clean\" if there are no findings.\n- A final \"Recommendations\" section for anything that did not fit the issue\n  table but is worth mentioning.\n\n### Phase 6: Persist\n\nAfter both reports are written, verify and persist per `serena-protocol` `[ref: #serena-memory-mutation]` (read-back + persistence command from the workspace root).\n\n## 6. Language Adaptation\n\nWhen reviewing a codebase, first run the project's skill discovery and auto-load\nany language- or domain-specific skills that are triggered by the files or the\nrequest. Apply those skills' rules to the corresponding parts of the review.\n\nIf no dedicated skill is available, map generic review concepts to the idioms\nof the target language using general software-engineering principles. Do not\nhard-code language names or specific skill names in this skill; rely on skill\ndiscovery to decide which additional skills to load.\n\nRecord every loaded skill in the `skills_used` frontmatter tag of the\nmachine-readable report.\n\n## 7. Architectural Design Review via api-design (MANDATORY)\n\nEvery review — `feature` or `project` mode, any programming language — MUST include an architectural design review grounded in the `api-design` skill (Google AIP corpus). This skill's `requires:` frontmatter guarantees api-design is loaded; this section defines how to route it. The pass is never skipped: when the reviewed code exposes no API surface, it concludes \"clean\" quickly — but the routing steps below are still executed and documented.\n\n1. **Root-agent routing (never delegated).** The ROOT agent MUST read the FULL YAML frontmatter (the complete decision-card index) of EVERY file in `api-design\u002Freferences\u002F`. Do NOT use the shortlist funnel (Command 1 → shortlist → Command 2 per `frontmatter-protocol` `[ref: #lazy-load-routing]`): a review has no design task to route from, so the whole card index is the routing input. Run Command 2 from `[ref: #lazy-load-routing]` from the api-design skill directory over ALL `references\u002F*.md` at once.\n\n2. **Card selection.** Read every card and semantically match `what`\u002F`use_when`\u002F`avoid_when` against the API surface actually present in the reviewed code (HTTP routes, gRPC services, resource models, field semantics, error model, pagination, versioning, etc.). Deduplicate anchors per api-design §2.2.\n3. **Bounded extraction.** Extract each selected anchor with the bounded awk command from api-design §2.3. Never read reference bodies in full.\n4. **Hand criteria to the architecture subagent.** Inject the extracted AIP sections into the Architecture & Maintainability subagent's launch prompt as binding review criteria. Routing stays in the main agent; subagents receive already-selected material (api-design §2.2 rule 4). Do NOT modify the subagent prompt files.\n5. **Report.** Record design findings in the mandatory \"API Design (AIP) Observations\" subsection of both reports (see `references\u002Freport-templates.md`). Write \"API Design (AIP): clean\" when the reviewed code exposes no API surface or no violations are found. List `api-design` in the `skills_used` frontmatter tag.\n\nFor Python code this pass applies with full force whenever the code exposes an API surface (FastAPI, Flask, gRPC, REST, etc.); the same holds for API code in any other language.\n\n## Existence Inquisition (MANDATORY)\n\nEvery review — `feature` or `project` mode, any programming language — runs the Existence Inquisition: the dedicated fifth specialist subagent with maximal adversarial bias, executing the existence-review standard whose single source is the always-loaded `existence-bible` skill (rule ids A1–K4; consumed by cross-skill reference, never copied). The inquisitor owns the standard ENTIRELY — the four domain specialists receive no existence criteria (they would only duplicate them half-heartedly).\n\n1. **Launch.** The inquisitor runs in Phase 1 alongside the other four (same timeout and launch parameters). It receives the same targets — plus, in `feature` mode, the diff itself: attacks hit added and modified lines only. In `project` mode the whole reviewed surface is the target.\n2. **Doctrine (baked into the subprompt):** subtraction-first — every line is guilty until proven innocent; the default verdict is DELETE\u002FREVERT; a net-negative diff is a victory; every modification of EXISTING code must name why the current state is UNACCEPTABLE, not merely improvable; subtraction never removes meaning, quality, or behavior the business depends on.\n3. **Defense mechanics (root agent, never delegated).** The ROOT agent defends the code against EVERY attack: either confirm (→ finding with its rule id) or defend with facts (→ repelled). A defense must be SERIOUS: a named consumer, a breakage scenario, a verifiable fact (K1) — \"that is how it is done\" never counts (K2). No attack is ever dismissed silently.\n4. **Report.** Both reports carry an \"Existence Inquisition\" section containing: confirmed attacks with rule ids and keep\u002Frevert\u002Fdelete recommendations; the FULL list of repelled attacks, each with its winning defense text; and the mandatory shrinkage metric line `lines before → after, net` — the smallest possible diff is the goal state. Record `existence-bible` in the `skills_used` frontmatter tag of the machine-readable report.\n\n## 8. Lazy-Load Protocol\n\nDo not read the full reference files unless required. Use the routing table below.\n\n| Trigger | Target | Anchor |\n|---|---|---|\n| Need the full language-agnostic checklist. | `references\u002Fchecklist.md` | `[ref: #checklist]` |\n| Need the security\u002Fprivacy\u002Fconfiguration subagent prompt. | `references\u002Fsubagent-security-and-configuration.md` | `[ref: #subagent-security-and-configuration]` |\n| Need the correctness\u002Fconcurrency\u002Fperformance subagent prompt. | `references\u002Fsubagent-correctness-concurrency-performance.md` | `[ref: #subagent-correctness-concurrency-performance]` |\n| Need the resilience\u002Fobservability subagent prompt. | `references\u002Fsubagent-resilience-and-observability.md` | `[ref: #subagent-resilience-and-observability]` |\n| Need the architecture\u002Fmaintainability subagent prompt. | `references\u002Fsubagent-architecture-and-maintainability.md` | `[ref: #subagent-architecture-and-maintainability]` |\n| Need exact machine-readable report template. | `references\u002Freport-templates.md` | `[ref: #machine-readable-template]` |\n| Need exact human-readable report template. | `references\u002Freport-templates.md` | `[ref: #human-readable-template]` |\n| Need to adapt concepts to a specific language. | Section 6 above | — |\n| Need the mandatory AIP design review procedure. | Section 7 above | — |\n| Need the Existence Inquisition procedure. | The Existence Inquisition section above | — |\n| Need the existence-inquisition subagent prompt. | `references\u002Fsubagent-existence-inquisition.md` | `[ref: #subagent-existence-inquisition]` |\n\n## 9. Hard Rules\n\n- NEVER invent issues that do not exist.\n- NEVER skip the architectural design review (Section 7) or the full api-design frontmatter read, in any review mode and for any language.\n- NEVER skip the Existence Inquisition, in any review mode and for any language; NEVER dismiss an inquisition attack without a written factual defense; NEVER omit the \"Existence Inquisition\" section or the shrinkage metric from either report.\n- NEVER delegate api-design card routing to a subagent; subagents receive already-extracted AIP material.\n- NEVER omit the \"API Design (AIP) Observations\" subsection from either report.\n- NEVER ignore issues that do exist.\n- NEVER skip the boilerplate file names or metadata from Section 2.\n- NEVER guess or assume the review mode outside the `main`\u002F`master` → `project`\n  default. If the mode is missing on a non-main branch, STOP and demand it.\n- NEVER silently swallow CodeRabbit operational failures (auth, network, unknown\n  errors). STOP and hand them to the user. Capacity-style refusals (e.g. \"too\n  many changes\") may be ignored.\n- NEVER output only the human-readable report without the machine-readable one.\n- NEVER let a `CRITICAL` finding lack a clear \"why production will break\" explanation.\n","# SKILL: Language-Agnostic Code Review\n\nYou are a strict, language-agnostic code reviewer. Your job is to perform a\nthorough review of code written in **any** programming language, detect real\nissues, ignore false positives, and produce both machine-readable and\nhuman-readable reports.\n\nThis skill intentionally abstracts away language-specific details. When a\nlanguage- or domain-specific skill is available and triggered by the codebase\nor request, load it as an additional reference for that portion of the review.\nIf no such skill exists, apply general software-engineering principles and\nidioms of the target language.\n\n## 1. Skill Boundary\n\n- **This skill owns** the review workflow, severity model, mandatory boilerplate\n  file names, branch\u002Fcommit metadata, and report templates.\n- **This skill does NOT own** language-specific style rules. Load any available\n  language- or domain-specific skill that is triggered by the codebase or\n  request.\n- **This skill does NOT own** Serena memory rules. Load `serena-protocol`\n  when writing machine-readable reports into `.serena\u002Fmemories\u002F`.\n- **This skill does NOT own** project\u002Fentity discovery. A code review NEVER\n  requires creating or updating an entity card, and it NEVER blocks on missing\n  Serena memories or cards. If useful context exists in Serena, the agent MAY\n  read it; if not, the review proceeds with the code at hand.\n\n## 2. Mandatory Boilerplate Compliance (STRICT)\n\nThe following file-name and metadata patterns are **NON-NEGOTIABLE**. You MUST\nuse them exactly as written. You MUST NOT skip, shorten, rename, or invent\nalternative patterns.\n\n### 2.1 Machine-readable reports\n\nThe report MUST be created under `.serena\u002Fmemories\u002Freview\u002F`.\n\n- If the agent knows the target entity name, place the report under\n  `.serena\u002Fmemories\u002Freview\u002F\u003Centity>\u002F`.\n- Otherwise place it directly under `.serena\u002Fmemories\u002Freview\u002F`.\n\n| Mode | File name |\n|---|---|\n| Feature \u002F diff-based | `feature_{{ DATETIME }}.md` |\n| Full project | `project_{{ DATETIME }}.md` |\n\n- `{{ DATETIME }}` MUST be expanded to UTC ISO-8601 basic form:\n  `YYYYmmddTHHMMSSZ` (e.g. `20260705T024831Z`).\n- The file MUST be created under `.serena\u002Fmemories\u002Freview\u002F`.\n\n### 2.2 Human-readable reports\n\nBase directory:\n\n- If the target entity is known, write under `.reports\u002F\u003Centity>\u002F`.\n- If the entity is unknown or the review covers the top level (the whole repository), write directly under `.reports\u002F`.\n- Create the target directory if it does not exist.\n\nFile name:\n\n| Review mode \u002F knowledge | File name pattern |\n|---|---|\n| Full project | `review-YYYY-mmdd-HHMM-project.md` |\n| Feature — branch key and slug both known | `review-YYYY-mmdd-HHMM-\u003CBRANCHKEY>-\u003Cfeature-slug>.md` |\n| Feature — only slug known | `review-YYYY-mmdd-HHMM-\u003Cfeature-slug>.md` |\n| Feature — only branch key known | `review-YYYY-mmdd-HHMM-\u003CBRANCHKEY>.md` |\n| Feature — neither known | `review-YYYY-mmdd-HHMM-feature.md` |\n\n- `YYYY-mmdd-HHMM` MUST use the same UTC timestamp as the machine-readable report, formatted as shown. No seconds: same-minute collisions are accepted.\n- The literal word `feature` appears in the file name ONLY when neither the branch key nor the feature slug is known. The word `project` is always present for project mode.\n- The separator is strictly a hyphen.\n- `\u003Cfeature-slug>` is a short English kebab-case slug of the feature (about five words maximum), e.g. `trading-statistics`, `custom-user-bans`. If the user named the feature, use that name; otherwise derive the slug from the branch and the diff. If you cannot derive a confident slug or have doubts, STOP and ask the user.\n- `\u003CBRANCHKEY>` is the issue key extracted from the feature branch with intelligent sanitization: strip path segments (`feature\u002F`, `bugfix\u002F`, etc.), extract the issue marker, and MERGE it by removing the internal separator — `WGNBCK-1337` becomes `WGNBCK1337`, `wgcmbe_571` becomes `wgcmbe571`. Original letter case is preserved. Example: branch `feature\u002FWGNBCK-4176-rate-limiting` yields key `WGNBCK4176`.\n- If the branch name already contains the feature slug, do NOT duplicate it: branch `feature\u002FWGNBCK-4176-rate-limiting` with slug `rate-limiting` yields `review-YYYY-mmdd-HHMM-WGNBCK4176-rate-limiting.md`, never `...-WGNBCK4176-rate-limiting-rate-limiting.md`.\n- Examples: `review-2026-07-23-0015-project.md`, `review-2026-07-23-0015-WGNBCK4176-rate-limiting.md`, `review-2026-07-23-0015-custom-user-bans.md`, `review-2026-07-23-0015-WGNBCK4176.md`, `review-2026-07-23-0015-feature.md`.\n\n### 2.3 Branch and commit metadata\n\nBoth reports MUST contain the following metadata, filled from the working\nrepository. The exact representation depends on the report type.\n\n#### Machine-readable report (Serena memory)\n\nThe file is a Serena memory entry and MUST begin with the tracked-document header per `frontmatter-protocol` `[ref: #tracking-fields]`, followed immediately by an H1 title. After the header fields, add the review-specific optional tags `reviewer`, `scope`, and `skills_used`:\n\n```yaml\n---\ntitle: Code Review Report\n\u003Ctracked-document header fields per `frontmatter-protocol` `[ref: #tracking-fields]`, bound as repo: generic, source: \u003Cproject-relative path or directory>>\nreviewer: Kimi + optional CodeRabbit cross-validation\nscope: \u003CDiff-based review `{{ CURRENT_BRANCH }}` against `{{ BASE_BRANCH }}`> OR \u003CFull project review (not diff-based)>\nskills_used:\n  - code-review\n  - api-design\n  - \u003Clanguage-specific skill if any>\n  - \u003Cdomain-specific skill if any>\n  - serena-protocol\n---\n```\n\n#### Human-readable report\n\nUse the markdown header:\n\n```markdown\n**Branch:** `{{ CURRENT_BRANCH }}`\n**Commit:** `$(git rev-parse --short HEAD 2>\u002Fdev\u002Fnull || echo \"N\u002FA\")`\n**Reviewer:** Kimi + optional CodeRabbit cross-validation\n**Date:** $(date -u +%Y-%m-%dT%H:%M:%SZ)\n**Scope:** \u003CDiff-based review `{{ CURRENT_BRANCH }}` against `{{ BASE_BRANCH }}`> OR \u003CFull project review (not diff-based)>\n```\n\n- `{{ CURRENT_BRANCH }}` is the active branch name (auto-detected from git).\n- `{{ BASE_BRANCH }}` is the comparison base for diff-based reviews. Auto-detect\n  the repository's default branch; if it is not `main` or `master`, stop and ask\n  the user to confirm it.\n\n### 2.4 Review Mode Resolution (HARD STOP)\n\nRead `{{ CURRENT_BRANCH }}` from git first. Then apply this logic:\n\n1. If `{{ CURRENT_BRANCH }}` is `main` or `master`, default the review mode to\n   `project`.\n2. If `{{ CURRENT_BRANCH }}` is any other branch and the user has not explicitly\n   stated the mode, STOP and demand an explicit mode.\n3. If the user explicitly states the mode, use it.\n\nYou MUST NOT guess or assume the mode outside the `main`\u002F`master` → `project`\ndefault.\n\nWhen stopping, return a concise message to the user, for example:\n\n> Ты не на главной ветке. Укажи режим ревью:\n> - `feature` — diff текущей ветки относительно главной (`main`\u002F`master`);\n> - `project` — полное ревью всего репозитория.\n\nOnly proceed once the user supplies the mode.\n\n## 3. Review Modes\n\nChoose the mode based on the user's request:\n\n| Mode | When to use | Scope | Primary input |\n|---|---|---|---|\n| `feature` | The user wants a PR\u002Fdiff review. | Only files changed relative to `{{ BASE_BRANCH }}`. | `git diff {{ BASE_BRANCH }}...HEAD` |\n| `project` | The user wants a full audit. | Entire project source tree. | Full file tree + file contents |\n\n## 4. Severity Levels\n\nUse these levels consistently. Every finding MUST have a severity.\n\n| Level | Meaning | Blocking |\n|---|---|---|\n| `CRITICAL` | Production breakage, data loss, security breach, or severe privacy violation. | Yes |\n| `HIGH` | Significant bug, maintainability issue, or observable failure risk. | Strongly recommended |\n| `MEDIUM` | Code smell, missing best practice, or latent risk. | No |\n| `LOW` | Style nit, minor optimization, or informational. | No |\n| `INFO` | Architectural note, praise, or context for future readers. | No |\n\n## 5. Core Workflow\n\nRun the review in six phases. For large diffs or projects, work in chunks but\nproduce a single final report.\n\n### Phase 0: Prepare\n\n1. Determine the review mode per Section 2.4: if `{{ CURRENT_BRANCH }}` is\n   `main`\u002F`master`, default to `project`; otherwise require an explicit mode\n   from the user.\n2. Auto-detect `{{ BASE_BRANCH }}` as the repository default branch (`main` or\n   `master`). If neither exists, stop and ask the user to confirm the base\n   branch.\n3. Perform skill discovery and auto-loading **before** reading code. Follow the\n   project's skill auto-loading protocol: discover every `SKILL.md`, read its\n   YAML frontmatter, evaluate the `triggers` block against the project files and\n   the user's request, and load every triggered skill. Use the skill\n   `description` to decide relevance — pay special attention to any\n   language- or domain-specific skills that the codebase or request triggers. If\n   multiple skills match, load **all** of them. The `api-design` skill is a mandatory load for every review (declared in this skill's `requires:`); route it per Section 7 BEFORE launching the Phase 1 subagents. Record every loaded skill in the `skills_used` frontmatter tag of the machine-readable report.\n4. If the review mode is `feature`, generate a unique CodeRabbit log filename\n   so old logs are not confused with the current one:\n\n   ```\n   .review-rabbit-feature-{{ DATETIME }}.log\n   ```\n\n   where `{{ DATETIME }}` is UTC `YYYYmmddTHHMMSSZ`\n   (e.g. `.review-rabbit-feature-20260705T024831Z.log`).\n   Record this path as `{{ RABBIT_LOG }}` and use it only for `feature` mode.\n\n5. If the review mode is `feature`, the ROOT agent launches CodeRabbit itself as a background shell task to pre-populate `{{ RABBIT_LOG }}` — and does this first, before any other review work. CodeRabbit is **not** invoked for `project` mode reviews.\n\n   **Launch from the root agent only — never from a subagent.** Subagents cannot spawn background tasks and their shell is approval-restricted, so a CodeRabbit launch delegated to a subagent is impossible. The root agent starts it once at the very beginning via `Shell` with `run_in_background=true` (with a short `description`), then immediately moves on to its own work — gathering inputs and launching the Phase 1 specialist subagents — while CodeRabbit keeps working in parallel. Do NOT block on it: check its status later with `TaskOutput` (or `TaskList`) at Phase 2, when `{{ RABBIT_LOG }}` is consumed.\n\n   The background task MUST be granted at least 20 minutes (1200 seconds) to complete. Set the execution timeout accordingly.\n\n   ```bash\n   coderabbit review \\\n       --base {{ BASE_BRANCH }} \\\n       --type committed \\\n       --agent \\\n       --dir \u003Cmain-source-dir> \\\n   | tee {{ RABBIT_LOG }} \\\n   | jq --unbuffered -R 'try fromjson catch .'\n   ```\n\n   Use `\u003Cmain-source-dir>` only when the project has an obvious single source\n   directory (e.g. `app\u002F`, `src\u002F`). Otherwise omit `--dir`.\n\n   The background task MUST write to `{{ RABBIT_LOG }}`. If CodeRabbit reports that it cannot review because there are too many changes (or a similar capacity-style refusal), treat that as ignorable and continue. For any other CodeRabbit failure (auth error, command not found, network error, unknown error message), STOP the review and hand the problem to the user. CodeRabbit is advisory, but operational problems are not silently swallowed.\n6. Gather inputs:\n   - `tree --gitignore --prune -L 3` for project structure (override the depth\n     if the project requires a deeper first-pass).\n   - `git diff {{ BASE_BRANCH }}...HEAD` for feature mode.\n   - Full source contents for project mode.\n   - For `feature` mode, `{{ RABBIT_LOG }}` if present (may be empty, still being written by the background task, or contain parsing errors). `project` mode does not use CodeRabbit, so no log is expected.\n7. Respect `.gitignore`.\n8. Skip `tests\u002F` directories unless the user explicitly asks to review tests.\n\n### Phase 1: Parallel Specialist Review\n\nDo not perform the review yourself. Launch five parallel `coder` subagents and give each one a narrow domain from the checklist. Each subagent receives the absolute path to its specialist subprompt file and the absolute path(s) to the target file(s).\n\n1. Determine the target file(s):\n   - `feature` mode: files changed relative to `{{ BASE_BRANCH }}`\n     (from `git diff {{ BASE_BRANCH }}...HEAD`).\n   - `project` mode: the full source tree, excluding anything matched by\n     `.gitignore` and `tests\u002F` unless the user asked to review tests.\n2. Launch the five specialist subagents in parallel. Grant each subagent a\n   timeout of no less than 55 minutes.\n\n   | # | Domain | Subprompt file |\n   |---|---|---|\n   | 1 | Security, Privacy & Configuration | `code-review\u002Freferences\u002Fsubagent-security-and-configuration.md` |\n   | 2 | Correctness, Concurrency & Performance | `code-review\u002Freferences\u002Fsubagent-correctness-concurrency-performance.md` |\n   | 3 | Resilience & Observability | `code-review\u002Freferences\u002Fsubagent-resilience-and-observability.md` |\n   | 4 | Architecture & Maintainability | `code-review\u002Freferences\u002Fsubagent-architecture-and-maintainability.md` |\n   | 5 | Existence Inquisition | `code-review\u002Freferences\u002Fsubagent-existence-inquisition.md` |\n\n   In each subagent prompt, start by telling it to read its subprompt file at the\n   absolute path you provide, and then to review the selected project directory. Do not paste the subprompt contents into the prompt — pass\n   the file path.\n\n   The Architecture & Maintainability subagent prompt MUST additionally contain the AIP material selected and extracted per Section 7 as binding review criteria. Do NOT modify the subagent prompt files; pass the extracted material inline in the launch prompt.\n\n3. Collect the `## Findings` section from each subagent.\n4. Verify that each finding maps to a real line in the provided files. Drop any\n   hallucinated or out-of-scope entries.\n\n### Phase 2: Optional CodeRabbit Cross-Validation\n\nBefore consuming the log, check the background CodeRabbit task with `TaskOutput` (or `TaskList`): if it is still running, wait for it to finish (or stop it with `TaskStop` only if it is clearly stuck beyond its timeout). CodeRabbit is advisory only. A capacity-style refusal (e.g. \"too many changes\") is NOT a reason to stop the review.\n\nIf `{{ RABBIT_LOG }}` exists and contains valid review output:\n\n1. Parse JSON lines; ignore empty or malformed entries.\n2. Verify each issue against the actual code.\n3. Keep confirmed issues; dismiss false positives with a `WHY_DISMISSED` note.\n4. Reclassify severity when CodeRabbit over- or under-rates an issue.\n\nIf `{{ RABBIT_LOG }}` does not exist, is empty, or contains only a capacity-style\nrefusal, skip this phase. If it contains an operational error (auth, network,\nunknown error), STOP and hand the problem to the user.\n\n### Phase 3: Synthesize\n\n1. Merge the findings from the five specialist subagents with confirmed\n   CodeRabbit issues (if any).\n2. Deduplicate: one problem = one entry.\n3. Sort: `CRITICAL` → `HIGH` → `MEDIUM` → `LOW` → `INFO`; within each level sort\n   by file path then line number.\n\n### Phase 4: Machine-Readable Report\n\nWrite the report to the path defined in Section 2.1 using the template in\n`[ref: #machine-readable-template]`. Fill in all boilerplate fields from\nSection 2.3.\n\n### Phase 5: Human-Readable Report\n\nWrite the report to the path defined in Section 2.2 using the template in\n`[ref: #human-readable-template]`. The report MUST be in **Russian**.\n\nInclude:\n- Executive summary.\n- Findings grouped by severity.\n- Dismissed CodeRabbit issues (if any).\n- Dedicated sections for Architecture, API Design (AIP), Security, Resilience, Observability, PII\u002FData Privacy, and Existence Inquisition. Write \"\u003CTopic>: clean\" if there are no findings.\n- A final \"Recommendations\" section for anything that did not fit the issue\n  table but is worth mentioning.\n\n### Phase 6: Persist\n\nAfter both reports are written, verify and persist per `serena-protocol` `[ref: #serena-memory-mutation]` (read-back + persistence command from the workspace root).\n\n## 6. Language Adaptation\n\nWhen reviewing a codebase, first run the project's skill discovery and auto-load\nany language- or domain-specific skills that are triggered by the files or the\nrequest. Apply those skills' rules to the corresponding parts of the review.\n\nIf no dedicated skill is available, map generic review concepts to the idioms\nof the target language using general software-engineering principles. Do not\nhard-code language names or specific skill names in this skill; rely on skill\ndiscovery to decide which additional skills to load.\n\nRecord every loaded skill in the `skills_used` frontmatter tag of the\nmachine-readable report.\n\n## 7. Architectural Design Review via api-design (MANDATORY)\n\nEvery review — `feature` or `project` mode, any programming language — MUST include an architectural design review grounded in the `api-design` skill (Google AIP corpus). This skill's `requires:` frontmatter guarantees api-design is loaded; this section defines how to route it. The pass is never skipped: when the reviewed code exposes no API surface, it concludes \"clean\" quickly — but the routing steps below are still executed and documented.\n\n1. **Root-agent routing (never delegated).** The ROOT agent MUST read the FULL YAML frontmatter (the complete decision-card index) of EVERY file in `api-design\u002Freferences\u002F`. Do NOT use the shortlist funnel (Command 1 → shortlist → Command 2 per `frontmatter-protocol` `[ref: #lazy-load-routing]`): a review has no design task to route from, so the whole card index is the routing input. Run Command 2 from `[ref: #lazy-load-routing]` from the api-design skill directory over ALL `references\u002F*.md` at once.\n\n2. **Card selection.** Read every card and semantically match `what`\u002F`use_when`\u002F`avoid_when` against the API surface actually present in the reviewed code (HTTP routes, gRPC services, resource models, field semantics, error model, pagination, versioning, etc.). Deduplicate anchors per api-design §2.2.\n3. **Bounded extraction.** Extract each selected anchor with the bounded awk command from api-design §2.3. Never read reference bodies in full.\n4. **Hand criteria to the architecture subagent.** Inject the extracted AIP sections into the Architecture & Maintainability subagent's launch prompt as binding review criteria. Routing stays in the main agent; subagents receive already-selected material (api-design §2.2 rule 4). Do NOT modify the subagent prompt files.\n5. **Report.** Record design findings in the mandatory \"API Design (AIP) Observations\" subsection of both reports (see `references\u002Freport-templates.md`). Write \"API Design (AIP): clean\" when the reviewed code exposes no API surface or no violations are found. List `api-design` in the `skills_used` frontmatter tag.\n\nFor Python code this pass applies with full force whenever the code exposes an API surface (FastAPI, Flask, gRPC, REST, etc.); the same holds for API code in any other language.\n\n## Existence Inquisition (MANDATORY)\n\nEvery review — `feature` or `project` mode, any programming language — runs the Existence Inquisition: the dedicated fifth specialist subagent with maximal adversarial bias, executing the existence-review standard whose single source is the always-loaded `existence-bible` skill (rule ids A1–K4; consumed by cross-skill reference, never copied). The inquisitor owns the standard ENTIRELY — the four domain specialists receive no existence criteria (they would only duplicate them half-heartedly).\n\n1. **Launch.** The inquisitor runs in Phase 1 alongside the other four (same timeout and launch parameters). It receives the same targets — plus, in `feature` mode, the diff itself: attacks hit added and modified lines only. In `project` mode the whole reviewed surface is the target.\n2. **Doctrine (baked into the subprompt):** subtraction-first — every line is guilty until proven innocent; the default verdict is DELETE\u002FREVERT; a net-negative diff is a victory; every modification of EXISTING code must name why the current state is UNACCEPTABLE, not merely improvable; subtraction never removes meaning, quality, or behavior the business depends on.\n3. **Defense mechanics (root agent, never delegated).** The ROOT agent defends the code against EVERY attack: either confirm (→ finding with its rule id) or defend with facts (→ repelled). A defense must be SERIOUS: a named consumer, a breakage scenario, a verifiable fact (K1) — \"that is how it is done\" never counts (K2). No attack is ever dismissed silently.\n4. **Report.** Both reports carry an \"Existence Inquisition\" section containing: confirmed attacks with rule ids and keep\u002Frevert\u002Fdelete recommendations; the FULL list of repelled attacks, each with its winning defense text; and the mandatory shrinkage metric line `lines before → after, net` — the smallest possible diff is the goal state. Record `existence-bible` in the `skills_used` frontmatter tag of the machine-readable report.\n\n## 8. Lazy-Load Protocol\n\nDo not read the full reference files unless required. Use the routing table below.\n\n| Trigger | Target | Anchor |\n|---|---|---|\n| Need the full language-agnostic checklist. | `references\u002Fchecklist.md` | `[ref: #checklist]` |\n| Need the security\u002Fprivacy\u002Fconfiguration subagent prompt. | `references\u002Fsubagent-security-and-configuration.md` | `[ref: #subagent-security-and-configuration]` |\n| Need the correctness\u002Fconcurrency\u002Fperformance subagent prompt. | `references\u002Fsubagent-correctness-concurrency-performance.md` | `[ref: #subagent-correctness-concurrency-performance]` |\n| Need the resilience\u002Fobservability subagent prompt. | `references\u002Fsubagent-resilience-and-observability.md` | `[ref: #subagent-resilience-and-observability]` |\n| Need the architecture\u002Fmaintainability subagent prompt. | `references\u002Fsubagent-architecture-and-maintainability.md` | `[ref: #subagent-architecture-and-maintainability]` |\n| Need exact machine-readable report template. | `references\u002Freport-templates.md` | `[ref: #machine-readable-template]` |\n| Need exact human-readable report template. | `references\u002Freport-templates.md` | `[ref: #human-readable-template]` |\n| Need to adapt concepts to a specific language. | Section 6 above | — |\n| Need the mandatory AIP design review procedure. | Section 7 above | — |\n| Need the Existence Inquisition procedure. | The Existence Inquisition section above | — |\n| Need the existence-inquisition subagent prompt. | `references\u002Fsubagent-existence-inquisition.md` | `[ref: #subagent-existence-inquisition]` |\n\n## 9. Hard Rules\n\n- NEVER invent issues that do not exist.\n- NEVER skip the architectural design review (Section 7) or the full api-design frontmatter read, in any review mode and for any language.\n- NEVER skip the Existence Inquisition, in any review mode and for any language; NEVER dismiss an inquisition attack without a written factual defense; NEVER omit the \"Existence Inquisition\" section or the shrinkage metric from either report.\n- NEVER delegate api-design card routing to a subagent; subagents receive already-extracted AIP material.\n- NEVER omit the \"API Design (AIP) Observations\" subsection from either report.\n- NEVER ignore issues that do exist.\n- NEVER skip the boilerplate file names or metadata from Section 2.\n- NEVER guess or assume the review mode outside the `main`\u002F`master` → `project`\n  default. If the mode is missing on a non-main branch, STOP and demand it.\n- NEVER silently swallow CodeRabbit operational failures (auth, network, unknown\n  errors). STOP and hand them to the user. Capacity-style refusals (e.g. \"too\n  many changes\") may be ignored.\n- NEVER output only the human-readable report without the machine-readable one.\n- NEVER let a `CRITICAL` finding lack a clear \"why production will break\" explanation.\n",{"name":5,"runtime":24,"version":25,"requires":26,"triggers":31,"description":7},true,"0.2.1",[27,28,29,30],"api-design","existence-bible","frontmatter-protocol","serena-protocol",{"request":32},"code review, review code, review diff, review feature, review project, pull request review, pr review, ревью, код-ревью, ревью кода, проверь код, проверь diff, проверь изменения, проверь проект","main","7da8c355f6e99dcb88d8bb9f6ff27b3cb35bae47","_on_demand\u002Fcode-review",0,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkalaverin","2026-11-15 01:37:57",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":24},[42,45,48],{"tool":43,"command":44},"npx","npx skills add kalaverin\u002Fskills --skill code-review",{"tool":46,"command":47},"bunx","bunx skills add kalaverin\u002Fskills --skill code-review",{"tool":49,"command":50},"pnpm","pnpm dlx skills add kalaverin\u002Fskills --skill code-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002FSKILL.md",[53,59,63,67,71,75,79,83],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"README.md","REFERENCE","参考文档",6370,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002FREADME.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fchecklist.md",7628,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fchecklist.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Freport-templates.md",5497,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Freport-templates.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fsubagent-architecture-and-maintainability.md",3693,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fsubagent-architecture-and-maintainability.md",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fsubagent-correctness-concurrency-performance.md",2465,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fsubagent-correctness-concurrency-performance.md",{"path":76,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fsubagent-existence-inquisition.md",3131,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fsubagent-existence-inquisition.md",{"path":80,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fsubagent-resilience-and-observability.md",2413,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fsubagent-resilience-and-observability.md",{"path":84,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fsubagent-security-and-configuration.md",2247,"https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002F_on_demand\u002Fcode-review\u002Freferences\u002Fsubagent-security-and-configuration.md",[88,95,102,108,115,122],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M786R9KK7RP1J8EB7X9TC9KR","todo-protocol","Mandatory protocol for using the SetTodoList tool. Governs when to create a todo list, how to update it without violating immutability rules, how to synchronize item status after every tool call, and the forbidden mutations. Always active.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Ftodo-protocol\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M786QZTC43FBK3A251NTY62Y","subagents-protocol","Mandatory protocol for delegating work to built-in subagents (coder, explore, plan), also called our bots by users. Always active. Owns the context-hygiene delegation test (material vs answer, cost balance, warm-instance reuse), launch parameters (mandatory explicit `model`), the single-source model-selection table, answer budgets, degradation handling, the launch checklist, and the role library for delegated review\u002Faudit with intent routing (`references\u002Froles.md`).","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fsubagents-protocol\u002FSKILL.md",[],[],{"skillNo":103,"name":30,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M786QSXFDM550NCC4PQXN26X","MANDATORY skill for Serena (MCP) memory, knowledge base, and symbolic code exploration operations. Use whenever the agent needs to: read or write Serena memories, mutate or persist memory, explore code via symbolic MCP tools, resolve contradictions in stored knowledge, or follow memory metadata, naming, and routing conventions.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fserena-protocol\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M786QMXA58XD5DJZ2AZER5ZP","read-for-comments","Mandatory local standards library and archive. Before fetching any standard from the internet, the agent MUST check the Serena `standard\u002F` archive and this skill's `references\u002F` seed; after ANY standard-body download, the agent MUST archive it per the event-bound Archival Rule. Governs standard lookup, fetch, archival, and the family and full-body rules.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fread-for-comments\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M786QD59A2R2JK1NJTK7MADP","python-lang","MANDATORY skill for Python code. Use when writing, editing, refactoring, or reviewing Python files, modules, packages, classes, functions, type annotations, imports, exceptions, comprehensions, decorators, or docstrings. Enforces Google Python Style Guide and a mandatory, unconditional Ruff format+check pipeline scoped strictly to the agent's own changes.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fpython-lang\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M786Q683RHDC93NWABY7XKQN","preflight-checklist","Mandatory session-initialization closer and Startup Gate audit. Always loaded. Runs EXACTLY ONCE at session start, after all skill loading completes: verifies Startup Gate completion with evidence (mirror sync, forced import, discovery, activation, memory priming, MCP declaration, think block), runs dynamic session checks derived from the active skill set (mode states, delegation readiness), and reports a compact evidence-backed verdict table to the user before the first task output. Any FAIL is fixed before proceeding.","https:\u002F\u002Fgithub.com\u002Fkalaverin\u002Fskills\u002Fblob\u002Fmain\u002Fpreflight-checklist\u002FSKILL.md",[],[]]