[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M755ZDGDF6BFSYWJ44FPQGHF":3,"skill-same:01M755ZDGDF6BFSYWJ44FPQGHF":61},{"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":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":50},"01M755ZDGDF6BFSYWJ44FPQGHF","x-review-pr",null,"Tech Lead holistic review with 45-point checklist covering Clean Code, SOLID, architecture, framework conventions, tests, TDD process, security, and cross-file consistency. Produces GO\u002FNO-GO decision. Use for final review before merge.","review-bench\u002Federcnj_ia-dev-environment","review-bench","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286778065?v=4","01M7517F9NTEPDZDAXJBR30FWT","ReviewBench","01M7517FAC9F4P7TGWCNJ8VYVW",0,"MIT","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-neo4j\u002F.claude\u002Fskills\u002Fx-review-pr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: x-review-pr\ndescription: \"Tech Lead holistic review with 45-point checklist covering Clean Code, SOLID, architecture, framework conventions, tests, TDD process, security, and cross-file consistency. Produces GO\u002FNO-GO decision. Use for final review before merge.\"\nuser-invocable: true\nallowed-tools: Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion, Skill\nargument-hint: \"[PR-number or STORY-ID] [--no-auto-remediation] [--interactive] [--non-interactive] [--resume-review \u003Cpr>]\"\ncontext-budget: heavy\nrequires-capabilities: []\n---\n\n## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n# Skill: Review PR (Tech Lead Review)\n\n## Purpose\n\nExecute a senior-level holistic review with a 45-point rubric. This is the standalone version of Phase 6 from x-implement-story. The Tech Lead reviews the consolidated PR diff for cross-file consistency and overall quality.\n\n## Triggers\n\n- `\u002Fx-review-pr` — review current branch against main\n- `\u002Fx-review-pr NNN` — review PR #NNN\n- `\u002Fx-review-pr STORY-ID` — review by story ID\n\n## Prerequisites\n\n- Code must be committed\n- Branch should have changes relative to main\n- Ideally, specialist reviews (`\u002Fx-review-codebase`) have already been run\n\n## Workflow\n\nFive phases (Rule 25 REGRA-001, EPIC-0055). Each opens with `TaskCreate` + `--mode pre` gate, closes with `TaskUpdate(completed)` + POST\u002FFINAL gate. P3 iterates sub-tasks per cycle. Mapping: P0 Context (Steps 0-3) · P1 Review (Step 4) · P2 Verdict (Steps 5,7) · P3 Remediation (Steps 6,8, iterative) · P4 Final approval.\n\n\u003C!-- phase-no-gate: read-only pre-check + context gathering; no artifact produced until Phase 1 -->\n## Phase 0 — Context & idempotency\n\nOpen (close with `TaskUpdate(id: phase0TaskId, status: \"completed\")` after Step 3):\n\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 0 - Context\", activeForm: \"Loading PR context\")\n\n### Step 0 — Idempotency Pre-Check (RULE-002 — Artifact reuse)\n\nBefore executing the Tech Lead review, check if a report already exists and is still valid.\n\n1. Extract story ID from argument or branch name (e.g., `story-XXXX-YYYY`)\n2. Derive epic directory: `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002F`\n3. Check if Tech Lead report exists:\n   ```bash\n   ls ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md 2>\u002Fdev\u002Fnull\n   ```\n4. If report exists AND the branch has no new commits since last report:\n   ```bash\n   # Compare report mtime with latest commit date\n   stat -c %Y ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md 2>\u002Fdev\u002Fnull\n   git log -1 --format=%ct HEAD\n   ```\n   - If `mtime(report) >= commit_date`: log `Reusing existing tech lead review from {date}` and skip to Step 5 (dashboard update)\n   - If code changed after report: proceed with full review\n5. If no report exists, proceed normally\n\n**Idempotency Summary:**\n\n| Aspect | Behavior |\n|--------|----------|\n| **Check** | Compare `mtime(report)` vs `mtime(latest commit)` |\n| **Skip** | Reuse existing report when `mtime(report) >= commit_date` |\n| **Override** | Proceed with full review when code changed after report |\n\n### Step 1 — Detect Context\n\nDetermine what to review and set `[BASE_BRANCH]`:\n\n- **PR number:** `gh pr view NNN --json title,body,baseRefName,headRefName,files`\n- **STORY reference:** Find and checkout the branch\n- **No argument:** Use current branch, `BASE_BRANCH=main`\n\nValidate diff exists:\n```bash\ngit diff [BASE_BRANCH] --stat\ngit diff [BASE_BRANCH] --name-only\n```\n\n### Step 2 — Gather Context\n\nRead knowledge packs to calibrate the review:\n- `knowledge\u002Fcoding-standards\u002Fcoding-conventions.md` — {{LANGUAGE}} naming, injection, mapper conventions\n- `knowledge\u002Farchitecture\u002Farchitecture-principles.md` — layer boundaries, dependency direction\n- `rules\u002F05-quality-gates.md` — coverage thresholds, merge checklist\n- `knowledge\u002Ftesting\u002Ftesting-philosophy.md` — TDD workflow, Double-Loop TDD, TPP ordering\n\nCheck for existing artifacts (extract epic ID XXXX and story sequence YYYY from story ID):\n- Specialist review reports (`ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-*-story-XXXX-YYYY.md`)\n- Implementation plan (`ai\u002Fepics\u002Fepic-XXXX\u002Fplans\u002Fplan-story-XXXX-YYYY.md`)\n- Test plan (`ai\u002Fepics\u002Fepic-XXXX\u002Fplans\u002Ftests-story-XXXX-YYYY.md`)\n- Common mistakes document\n\n### Step 3 — Template Detection\n\nBefore executing the review, check if the Tech Lead review template exists:\n\n```bash\ntest -f .claude\u002Ftemplates\u002F_TEMPLATE-TECH-LEAD-REVIEW.md && echo \"TL_TEMPLATE_AVAILABLE\" || echo \"TL_TEMPLATE_MISSING\"\n```\n\n- If `TL_TEMPLATE_AVAILABLE`: Read template at `.claude\u002Ftemplates\u002F_TEMPLATE-TECH-LEAD-REVIEW.md` for required output format. Follow ALL sections defined in the template. The report MUST include a standardized header with Story ID, Date, Author (Tech Lead), and Template Version (RULE-011 — Standardized artifact headers). Score MUST be in format `XX\u002F45` with status `GO`\u002F`NO-GO` (RULE-005 — Quality gates).\n- If `TL_TEMPLATE_MISSING`: log warning `Template not found, using inline format` and use the inline format as fallback (RULE-012 — Graceful template fallback). Dashboard and remediation updates are skipped when template is absent.\n\n> **Fallback (RULE-012 — Graceful template fallback):** When template is not available (pre-EPIC-0024 projects), the current inline format is used as fallback. Skip dashboard and remediation updates since they depend on template-based artifacts.\n\nPersist interactiveMode to execution-state.json (EPIC-0068 — consumed by Stop hook `enforce-continuous-flow.sh`):\n\n    Skill(skill: \"x-internal-update-status\", args: \"--file ai\u002Fepics\u002Fepic-XXXX\u002Fexecution-state.json --type story --id \u003CSTORY-ID> --field interactiveMode --value \u003Cinteractive|non-interactive>\")\n\nValue: `\"interactive\"` when `--interactive` passed or `CLAUDE_LEGACY_INTERACTIVE=1`; otherwise `\"non-interactive\"` (Rule 20 default, EPIC-0061).\n\n    TaskUpdate(id: phase0TaskId, status: \"completed\")\n\n## Phase 1 — Execute 45-point review\n\nOpen a phase tracker; PRE gate ensures Phase 0 completed:\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-1-Review\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 1 - Review\", activeForm: \"Running 45-point tech-lead review\")\n\nClose with `TaskUpdate(id: phase1TaskId, status: \"completed\")` + POST gate after Step 4 finishes (the rubric execution is the evidence):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --skill x-review-pr --phase Phase-1-Review --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md\")\n\n### Step 4 — Execute Tech Lead Review\n\nThe Tech Lead review covers:\n\n1. List ALL modified files: `git diff [BASE_BRANCH] --name-only`\n2. View FULL diff: `git diff [BASE_BRANCH]`\n3. For EACH source file, read FULL content and apply 45-point checklist\n4. Focus on CROSS-FILE issues (inconsistencies, cross imports, repeated patterns)\n5. Compile and verify: `{{COMPILE_COMMAND}}` + `{{BUILD_COMMAND}}`\n6. **Execute full test suite** (MANDATORY — EPIC-0042):\n   ```bash\n   {{TEST_COMMAND}}\n   ```\n   - If ANY test fails: record test failures in report AND set decision to **automatic NO-GO** (overrides rubric score)\n   - Log each failing test name and failure reason in the report under a dedicated **Test Execution Results** section\n7. **Execute coverage analysis** (MANDATORY — EPIC-0042):\n   ```bash\n   {{COVERAGE_COMMAND}}\n   ```\n   - If line coverage \u003C 95% or branch coverage \u003C 90%: record as CRITICAL finding in report\n   - Include coverage percentages in the **Test Execution Results** section\n   - **Absolute-gate note (Rule 05 RULE-005-01):** the gate fires regardless of whether the deficit was caused by this PR or was pre-existing on the base branch. The Tech Lead MUST NOT override NO-GO with a \"pre-existing\" justification. The only permitted escape paths are: (a) close the gap in this PR, (b) close it in a predecessor PR, or (c) merge an approved ADR that temporarily lowers the gate for a specific package (with sunset date).\n8. **Execute smoke tests** (CONDITIONAL — EPIC-0042, only when `testing.smoke_tests == true`):\n   ```bash\n   {{SMOKE_COMMAND}}\n   ```\n   - If ANY smoke test fails: record as CRITICAL finding AND set decision to **automatic NO-GO**\n   - If `testing.smoke_tests == false`: log `\"Smoke tests skipped (testing.smoke_tests=false)\"` and proceed\n9. If specialist reports exist, verify CRITICAL issues were fixed\n\n## 45-Point Rubric\n\n| Section                  | Points | What it checks                                                      |\n| ------------------------ | ------ | ------------------------------------------------------------------- |\n| A. Code Hygiene          | 8      | Unused imports\u002Fvars, dead code, warnings, method signatures, magic  |\n| B. Naming                | 4      | Intention-revealing, no disinformation, meaningful distinctions      |\n| C. Functions             | 5      | Single responsibility, size \u003C= 25 lines, max 4 params, no flags     |\n| D. Vertical Formatting   | 4      | Blank lines between concepts, Newspaper Rule, class size \u003C= 250     |\n| E. Design                | 3      | Law of Demeter, CQS, DRY                                           |\n| F. Error Handling        | 3      | Rich exceptions, no null returns, no generic catch                  |\n| G. Architecture          | 5      | SRP, DIP, architecture layer boundaries (per project rules), follows plan |\n| H. Framework & Infra     | 4      | DI, externalized config, native-compatible, observability           |\n| I. Tests & Execution     | 6      | ALL tests pass, coverage >= 95%\u002F90%, smoke tests pass, test quality |\n| J. Security & Production | 1      | Sensitive data protected, thread-safe                               |\n| K. TDD Process           | 5      | Test-first commits, Double-Loop TDD, TPP progression, atomic cycles |\n\n## Decision Criteria\n\n| Condition                              | Decision        |\n| -------------------------------------- | --------------- |\n| >= 38\u002F45 + zero issues | GO              |\n| \u003C 38\u002F45 OR any issue   | NO-GO           |\n| ANY test failure (unit, integration, or smoke) | NO-GO (automatic, overrides score) |\n| Coverage below 95% line OR 90% branch  | NO-GO (automatic, overrides score — **absolute gate per Rule 05 RULE-005-01; pre-existing deficits are NOT an excuse**) |\n\n## Phase 2 — Compile verdict & publish dashboard\n\nOpen a phase tracker (PRE gate: Phase 1 must have completed):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-2-Verdict\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 2 - Verdict\", activeForm: \"Compiling GO\u002FNO-GO verdict\")\n\nClose with `TaskUpdate(id: phase2TaskId, status: \"completed\")` + POST gate after Step 7:\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --skill x-review-pr --phase Phase-2-Verdict --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md\")\n\n### Step 5 — Update Consolidated Dashboard\n\nAfter saving the Tech Lead report, update the consolidated dashboard (RULE-006).\n\nThe dashboard is **cumulative** (RULE-006): created by `\u002Fx-review-codebase` (specialist scores), updated by `\u002Fx-review-pr` (Tech Lead Score).\n\n1. **Check if dashboard exists:**\n   ```bash\n   test -f ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md && echo \"DASHBOARD_EXISTS\" || echo \"DASHBOARD_MISSING\"\n   ```\n\n2. **If dashboard exists (created by x-review-codebase):**\n   - Read `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md`\n   - Update the **Tech Lead Score** section: replace placeholder `--\u002F45 | Status: Pending` with actual score `XX\u002F45 | Status: GO\u002FNO-GO`\n   - Update the **Overall Score** to include Tech Lead score in the total\n   - Update the **Overall Status** considering both specialist scores and Tech Lead decision: status is updated to reflect all 8 specialists + Tech Lead combined assessment\n   - Append a new **Round** to the **Review History** section with date, Tech Lead score, and status\n   - Preserve all existing specialist scores and previous rounds\n\n3. **If dashboard does not exist (x-review-codebase was not executed):**\n   - Log: `Dashboard not found, creating fresh dashboard`\n   - Check dashboard template:\n     ```bash\n     test -f .claude\u002Ftemplates\u002F_TEMPLATE-CONSOLIDATED-REVIEW-DASHBOARD.md && echo \"DASHBOARD_TEMPLATE_AVAILABLE\" || echo \"DASHBOARD_TEMPLATE_MISSING\"\n     ```\n   - If template available: read template and create `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md` with only the Tech Lead Score populated (specialist scores marked as `--` \u002F `Pending`)\n   - If template missing: skip dashboard creation with warning\n\n\u003C!-- phase-no-gate: remediation is iterative by nature; each cycle K emits its own sub-task. Gate would fire inside the loop. -->\n## Phase 3 — Remediation loop (iterative)\n\nRuns only on NO-GO (or `--no-auto-remediation` bypass at Step 8.4). Each cycle chained via `addBlockedBy`, cap 3 per Rule 20:\n\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 3 - Remediation cycle 1\", activeForm: \"Running remediation cycle 1\")\n    TaskUpdate(id: cycle1Id, status: \"completed\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 3 - Remediation cycle 2\", activeForm: \"Running remediation cycle 2\") \u002F* addBlockedBy: [cycle1Id] *\u002F\n    TaskUpdate(id: cycle2Id, status: \"completed\")\n\nOn convergence (GO) or exhaustion (`REVIEW_REMEDIATION_EXHAUSTED` \u002F `REVIEW_FIX_LOOP_EXCEEDED`), proceed to Phase 4.\n\n### Step 6 — Update Remediation Tracking\n\nAfter updating the dashboard, update the remediation tracking file.\n\n1. **Check if remediation exists:**\n   ```bash\n   test -f ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md && echo \"REMEDIATION_EXISTS\" || echo \"REMEDIATION_MISSING\"\n   ```\n\n2. **If remediation exists (created by x-review-codebase):**\n   - Read `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md`\n   - For each finding in the remediation tracker:\n     - If the Tech Lead confirms the finding is fixed (code reviewed and issue resolved): update status from `Open` -> `Fixed`\n     - If the finding remains unfixed: keep status as `Open`\n   - Add new findings identified by the Tech Lead that are not present in the existing remediation tracker, with status `Open`\n   - Update the **Remediation Summary** counts to reflect new statuses\n\n3. **If remediation does not exist (x-review-codebase was not executed):**\n   - Log: `Remediation not found, creating fresh remediation with Tech Lead findings`\n   - Check remediation template:\n     ```bash\n     test -f .claude\u002Ftemplates\u002F_TEMPLATE-REVIEW-REMEDIATION.md && echo \"REMEDIATION_TEMPLATE_AVAILABLE\" || echo \"REMEDIATION_TEMPLATE_MISSING\"\n     ```\n   - If template available: read template and create `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md` with only findings from the Tech Lead review (all as `Open`)\n   - If template missing: skip remediation creation with warning\n\n## Phase 4 — Final approval & report\n\nOpen a phase tracker (PRE gate: Phase 2 verdict must be resolved; Phase 3 may have run):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-4-Approval\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 4 - Approval\", activeForm: \"Finalizing approval and report\")\n\nClose with `TaskUpdate(id: phase4TaskId, status: \"completed\")` + FINAL gate (composes with Rule 24 mandatory-artifact scan):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode final --skill x-review-pr --phase Phase-4-Approval --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md,ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md,ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md\")\n\n### Step 7 — Process Result\n\n```\n============================================================\n TECH LEAD REVIEW — [STORY_ID]\n============================================================\n Decision:  GO | NO-GO\n Score:     XX\u002F45 (GO >= 38)\n Critical:  N issues\n Medium:    N issues\n Low:       N issues\n\n Test Execution Results (EPIC-0042):\n Test Suite:    PASS (XXX tests, X failures)\n Coverage:      XX% line, XX% branch\n Smoke Tests:   PASS\u002FFAIL\u002FSKIP (N tests)\n------------------------------------------------------------\n Report:      ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md\n Dashboard:   ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md (updated)\n Remediation: ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md (updated)\n============================================================\n```\n\nReplace \"Test Suite\", \"Coverage\", and \"Smoke Tests\" placeholders with actual values from Step 4 execution (Steps 4.6, 4.7, 4.8). If smoke tests were skipped (testing.smoke_tests=false), show `SKIP (0 tests)`.\n\n### Step 8 — Handle NO-GO (Auto-Remediation — EPIC-0042)\n\nWhen the review results in NO-GO, automatically dispatch remediation instead of waiting for manual input:\n\n1. **Classify NO-GO findings:**\n   - `TEST_FAILURE`: unit\u002Fintegration\u002Fsmoke test failures detected in Step 4.6-4.8\n   - `COVERAGE_GAP`: coverage below 95% line or 90% branch detected in Step 4.7\n   - `CODE_QUALITY`: rubric score below threshold (non-test issues)\n\n2. **Auto-remediate by classification:**\n\n   **For TEST_FAILURE:**\n   Dispatch a general-purpose agent to fix failing tests:\n   ```\n   Agent(\n     subagent_type: \"general-purpose\",\n     description: \"Fix failing tests for NO-GO remediation\",\n     prompt: \"Read the failing test output from the review report at ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md. Identify the root cause of each failing test. Fix the IMPLEMENTATION (NOT the test) to make tests pass. Run {{TEST_COMMAND}} to verify the fix. Commit via Skill(skill: 'x-commit-changes', args: '--type fix --subject \\\"fix failing tests from tech lead review\\\"').\"\n   )\n   ```\n\n   **For COVERAGE_GAP:**\n   Dispatch a general-purpose agent to add missing test coverage:\n   ```\n   Agent(\n     subagent_type: \"general-purpose\",\n     description: \"Add test coverage for NO-GO remediation\",\n     prompt: \"Read the coverage report. Identify uncovered lines\u002Fbranches. Write tests for the uncovered code paths following TDD discipline (test first). Run {{TEST_COMMAND}} + {{COVERAGE_COMMAND}} to verify coverage meets 95% line \u002F 90% branch. Commit via Skill(skill: 'x-commit-changes', args: '--type test --subject \\\"add test coverage for uncovered branches\\\"').\"\n   )\n   ```\n\n   **For CODE_QUALITY:**\n   Apply fixes inline following the remediation tracking file guidance.\n\n3. **Re-run review automatically** (max 2 cycles total):\n   - After remediation agent completes, re-execute Step 4 (full review)\n   - If still NO-GO after 2 cycles: proceed to Step 8.4 (Exhausted-Retry Gate)\n\n4. **Opt-out:** Pass `--no-auto-remediation` flag to force manual mode (skips auto-remediation agents; proceeds directly to Step 8.4 on NO-GO).\n\n#### Step 8.4 — Exhausted-Retry Gate (Rule 20 Interactive Gate)\n\nReached when auto-remediation cycles are exhausted (2 retries without convergence) or when `--no-auto-remediation` is set and the review returns NO-GO.\n\n**Non-interactive path (default — `--interactive` absent or `--non-interactive` deprecated flag):**\nSkip `AskUserQuestion`. Print HALT text and return NO-GO:\n```\nREVIEW NO-GO: Auto-remediation exhausted without convergence. Remaining issues recorded in report.\nRun with --resume-review \u003Cpr> --interactive to re-enter the gate interactively.\n```\nExit with NO-GO. No state file written. (`--non-interactive` DEPRECATED — same as default; WARN emitted per Rule 20 EPIC-0061.)\n\n**Interactive path (`--interactive` present):**\n\nInitialize `gateAttempts = 0`.\n\n**Gate loop:**\n\n```\nWHILE gateAttempts \u003C 3:\n  Present AskUserQuestion:\n    question: \"Auto-remediation exhausted after 2 retry cycles. The Tech Lead review returned NO-GO. How would you like to proceed?\"\n    options:\n      - { header: \"Proceed\", label: \"Continue (Recommended)\", description: \"Re-dispatch auto-remediation (+2 loops). If the review converges to GO, the gate closes and the skill exits normally.\" }\n      - { header: \"Fix PR\", label: \"Run x-fix-pr and retry\", description: \"Invokes x-fix-pr on the current PR; reapresents this menu on return.\" }\n      - { header: \"Abort\", label: \"Cancel the operation\", description: \"Terminates the skill with REVIEW_REMEDIATION_EXHAUSTED. No further remediation is attempted.\" }\n\n  On PROCEED (slot 1):\n    gateAttempts++\n    Re-dispatch auto-remediation agents (same classification logic as Step 8 sub-steps 1-3, with 2 new retry cycles)\n    Re-execute Step 4 (full review)\n    IF review returns GO:\n      Exit gate with GO — skill completes normally\n    ELSE:\n      IF gateAttempts >= 3:\n        Emit REVIEW_FIX_LOOP_EXCEEDED and terminate (see below)\n      ELSE:\n        Continue loop (reapresent menu)\n\n  On FIX-PR (slot 2):\n    gateAttempts++\n    Write\u002Fupdate state file at plans\u002Freview\u002F\u003Cpr>\u002Fstate.json (opt-in persistence):\n      phase: \"GATE_FIX_PR\"\n      lastPhaseCompletedAt: \u003CISO-8601 UTC now>\n      lastGateDecision: \"FIX_PR\"\n      fixAttempts: [... previous ..., { at: \u003Cnow>, delegateSkill: \"x-fix-pr\", prNumber: \u003CPR>, outcome: \"pending\" }]\n      schemaVersion: \"1.0\"\n    Invoke x-fix-pr via Rule 13 Pattern 1 INLINE-SKILL:\n\n        Skill(skill: \"x-fix-pr\", args: \"\u003CPR>\")\n\n    Update last fixAttempt.outcome to \"applied\" (or appropriate outcome)\n    Update state file: lastGateDecision = \"FIX_PR\", lastPhaseCompletedAt = \u003Cnow>\n    IF gateAttempts >= 3:\n      Emit REVIEW_FIX_LOOP_EXCEEDED and terminate (see below)\n    ELSE:\n      Continue loop (reapresent menu)\n\n  On ABORT (slot 3):\n    Emit: \"Review NO-GO final: operator aborted after ${gateAttempts} remediation attempt(s) on PR ${PR}\"\n    Exit with code REVIEW_REMEDIATION_EXHAUSTED\n```\n\n**Guard-rail — `REVIEW_FIX_LOOP_EXCEEDED` (3 consecutive PROCEED or FIX-PR without convergence):**\n\nWhen `gateAttempts >= 3` without converging to GO, terminate the gate automatically:\n```\nREVIEW_FIX_LOOP_EXCEEDED: Loop de fix excedeu 3 tentativas no review do PR ${PR};\ngate encerrado com ABORT automático.\nRetomar via --resume-review ${PR} com --non-interactive ou intervenção manual.\n```\nNo 4th option is offered. The gate terminates immediately. The menu was presented exactly 3 times (RULE-002 invariant: total option count remains 3 at all previous presentations).\n\n## State File (opt-in)\n\nWritten only when the operator selects **FIX-PR** (slot 2) in Step 8.4. Enables resume via `--resume-review \u003Cpr>`. Path: `plans\u002Freview\u002F\u003Cpr-number>\u002Fstate.json`. Schema version `\"1.0\"` with fields `phase`, `lastPhaseCompletedAt`, `lastGateDecision`, `fixAttempts[]`, `schemaVersion`.\n\nSee [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) for the full JSON schema, field definitions, and `--resume-review` resume semantics.\n\n## Phase 5 — Emit Frontmatter (MANDATORY — Rule 24 §Camada-1)\n\n\u003C!-- TELEMETRY: phase.start -->\nBash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fhooks\u002Ftelemetry-phase.sh start x-review-pr Phase-5-Frontmatter`\n\n> **MANDATORY TOOL CALL (Rule 24 §Camada-1):** This phase MUST NOT be inlined, simulated,\n> or omitted. The LLM MUST prepend the populated YAML frontmatter to the tech-lead review\n> artifact. Absent frontmatter is detected by `audit-review-frontmatter.sh` (Layer 3 CI)\n> and the Stop hook (Layer 2 runtime). There is no fallback when frontmatter emission fails.\n\nTaskCreate(\n  subject: \"\u003CSTORY_ID> › Phase 5 › Emit tech-lead review frontmatter\",\n  activeForm: \"Emitting tech-lead review frontmatter\",\n  metadata: {\n    \"phase\": \"Phase 5\",\n    \"parentSkill\": \"x-review-pr\",\n    \"storyId\": \"\u003CSTORY_ID>\",\n    \"epicId\": \"\u003CEPIC_ID>\",\n    \"expectedArtifacts\": [\"\u003Cpath to techlead-review-story-XXXX-YYYY.md>\"]\n  }\n)\n\nInvoke pre-gate (Rule 25 §Invariants 4):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --phase 'Phase 5' --skill x-review-pr\")\n\nAfter Phase 4 has produced the prose body of `techlead-review-story-\u003CSTORY_ID>.md`,\nprepend the YAML frontmatter block conforming to `governance\u002Fschemas\u002Freview-frontmatter-1.0.json`.\nThe full YAML template and field notes are in [`references\u002Ffull-protocol.md §Phase 5`](references\u002Ffull-protocol.md).\n\nKey fields: `schema-version: \"1.0\"`, `generated-by: x-review-pr@\u003C40-hex SHA>` (matches schema pattern `^(x-review-codebase|x-review-pr)@[0-9a-f]{40}$`), `decision` (GO|NO-GO|GO-WITH-RESERVATIONS), `score`, `score-max: 55`, `severity-counts`, `blocking-findings`. The `reviewers` field is NOT emitted (Tech Lead is sole reviewer). Use `checklist:` with sub-fields `passed:` (integer), `total: 45`, and `failed-sections:` (YAML list) instead.\n\nAfter writing the artifact, validate:\n\n    Bash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fscripts\u002Faudit-review-frontmatter.sh --story \u003CSTORY_ID>`\n\nIf the script returns exit ≠ 0, abort with `REVIEW_FRONTMATTER_INVALID`. No fallback.\n\nInvoke post-gate (Rule 25 §Invariants 4):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --phase 'Phase 5' --skill x-review-pr --expected-artifacts \u003Cpath to techlead-review-story-XXXX-YYYY.md>\")\n\nTaskUpdate(taskId: \u003Cid from TaskCreate above>, status: \"completed\")\n\n\u003C!-- TELEMETRY: phase.end -->\nBash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fhooks\u002Ftelemetry-phase.sh end x-review-pr Phase-5-Frontmatter ok`\n\n## Error Codes\n\n| Code | Condition | Message |\n|------|-----------|---------|\n| `REVIEW_REMEDIATION_EXHAUSTED` | Operator selected ABORT in Step 8.4 gate | `\"Review NO-GO final: operador abortou após ${N} tentativas de remediation no PR ${PR}\"` |\n| `REVIEW_FIX_LOOP_EXCEEDED` | 3 consecutive PROCEED or FIX-PR attempts without converging to GO | `\"Loop de fix excedeu 3 tentativas no review do PR ${PR}; gate encerrado com ABORT automático. Retomar via --resume-review ${PR} com --non-interactive ou intervenção manual.\"` |\n| `GATE_SCHEMA_INVALID` | State file at `plans\u002Freview\u002F\u003Cpr>\u002Fstate.json` fails Rule 20 schema validation | `\"State file inválido para gate em {path}: {campo} ausente ou mal-formado\"` |\n\n## Output Artifacts\n\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md` — Tech Lead review report\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md` — Updated consolidated dashboard\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md` — Updated remediation tracking\n- `plans\u002Freview\u002F\u003Cpr-number>\u002Fstate.json` — Gate state (opt-in, written only on FIX-PR selection)\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| No diff exists between branches | Abort with message: \"No changes detected between current branch and base. Nothing to review.\" |\n| Template `_TEMPLATE-TECH-LEAD-REVIEW.md` missing | Log warning, use inline format as fallback (RULE-012 — Graceful template fallback). Skip dashboard and remediation updates. |\n| Specialist review reports not found | Proceed with Tech Lead review only; note absence in report |\n| Compilation or build failure | Record failure in report, deduct points from Framework & Infra section |\n| Test suite failure (unit\u002Fintegration) | Automatic NO-GO regardless of rubric score; record all failing tests in report |\n| Coverage below threshold (\u003C 95% line or \u003C 90% branch) | Automatic NO-GO; record coverage gap as CRITICAL finding |\n| Smoke test failure | Automatic NO-GO; record failing smoke tests as CRITICAL finding |\n| NO-GO after 2 retry cycles | Route to Step 8.4 Exhausted-Retry Gate |\n| NO-GO with `--no-auto-remediation` | Route directly to Step 8.4 Exhausted-Retry Gate |\n| `--non-interactive` after retry exhausted | Skip gate; emit legacy HALT text; return NO-GO |\n| State file missing on `--resume-review` | Start gate fresh; emit warning |\n| State file schema invalid | Emit `GATE_SCHEMA_INVALID`; start gate fresh |\n\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n|-------|-------------|---------|\n| x-implement-story | called-by | Produces the same artifact as Phase 6 |\n| x-review-codebase | reads | Reads specialist review reports for cross-validation |\n| x-review-codebase | complements | `\u002Fx-review-codebase` = breadth (7 specialists), `\u002Fx-review-pr` = depth (1 Tech Lead) |\n\n- Dashboard (Step 5) is **cumulative** — created by `\u002Fx-review-codebase`, updated by `\u002Fx-review-pr` (RULE-006)\n- Remediation tracking (Step 6) enables FIXED status tracking after Tech Lead review\n- Templates in `.claude\u002Ftemplates\u002F` are copied verbatim by `PlanTemplatesAssembler` — not rendered by the engine\n- Fallback (RULE-012 — Graceful template fallback): When templates are absent (pre-EPIC-0024 projects), inline format is used and dashboard\u002Fremediation updates are skipped\n","## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n# Skill: Review PR (Tech Lead Review)\n\n## Purpose\n\nExecute a senior-level holistic review with a 45-point rubric. This is the standalone version of Phase 6 from x-implement-story. The Tech Lead reviews the consolidated PR diff for cross-file consistency and overall quality.\n\n## Triggers\n\n- `\u002Fx-review-pr` — review current branch against main\n- `\u002Fx-review-pr NNN` — review PR #NNN\n- `\u002Fx-review-pr STORY-ID` — review by story ID\n\n## Prerequisites\n\n- Code must be committed\n- Branch should have changes relative to main\n- Ideally, specialist reviews (`\u002Fx-review-codebase`) have already been run\n\n## Workflow\n\nFive phases (Rule 25 REGRA-001, EPIC-0055). Each opens with `TaskCreate` + `--mode pre` gate, closes with `TaskUpdate(completed)` + POST\u002FFINAL gate. P3 iterates sub-tasks per cycle. Mapping: P0 Context (Steps 0-3) · P1 Review (Step 4) · P2 Verdict (Steps 5,7) · P3 Remediation (Steps 6,8, iterative) · P4 Final approval.\n\n\u003C!-- phase-no-gate: read-only pre-check + context gathering; no artifact produced until Phase 1 -->\n## Phase 0 — Context & idempotency\n\nOpen (close with `TaskUpdate(id: phase0TaskId, status: \"completed\")` after Step 3):\n\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 0 - Context\", activeForm: \"Loading PR context\")\n\n### Step 0 — Idempotency Pre-Check (RULE-002 — Artifact reuse)\n\nBefore executing the Tech Lead review, check if a report already exists and is still valid.\n\n1. Extract story ID from argument or branch name (e.g., `story-XXXX-YYYY`)\n2. Derive epic directory: `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002F`\n3. Check if Tech Lead report exists:\n   ```bash\n   ls ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md 2>\u002Fdev\u002Fnull\n   ```\n4. If report exists AND the branch has no new commits since last report:\n   ```bash\n   # Compare report mtime with latest commit date\n   stat -c %Y ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md 2>\u002Fdev\u002Fnull\n   git log -1 --format=%ct HEAD\n   ```\n   - If `mtime(report) >= commit_date`: log `Reusing existing tech lead review from {date}` and skip to Step 5 (dashboard update)\n   - If code changed after report: proceed with full review\n5. If no report exists, proceed normally\n\n**Idempotency Summary:**\n\n| Aspect | Behavior |\n|--------|----------|\n| **Check** | Compare `mtime(report)` vs `mtime(latest commit)` |\n| **Skip** | Reuse existing report when `mtime(report) >= commit_date` |\n| **Override** | Proceed with full review when code changed after report |\n\n### Step 1 — Detect Context\n\nDetermine what to review and set `[BASE_BRANCH]`:\n\n- **PR number:** `gh pr view NNN --json title,body,baseRefName,headRefName,files`\n- **STORY reference:** Find and checkout the branch\n- **No argument:** Use current branch, `BASE_BRANCH=main`\n\nValidate diff exists:\n```bash\ngit diff [BASE_BRANCH] --stat\ngit diff [BASE_BRANCH] --name-only\n```\n\n### Step 2 — Gather Context\n\nRead knowledge packs to calibrate the review:\n- `knowledge\u002Fcoding-standards\u002Fcoding-conventions.md` — {{LANGUAGE}} naming, injection, mapper conventions\n- `knowledge\u002Farchitecture\u002Farchitecture-principles.md` — layer boundaries, dependency direction\n- `rules\u002F05-quality-gates.md` — coverage thresholds, merge checklist\n- `knowledge\u002Ftesting\u002Ftesting-philosophy.md` — TDD workflow, Double-Loop TDD, TPP ordering\n\nCheck for existing artifacts (extract epic ID XXXX and story sequence YYYY from story ID):\n- Specialist review reports (`ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-*-story-XXXX-YYYY.md`)\n- Implementation plan (`ai\u002Fepics\u002Fepic-XXXX\u002Fplans\u002Fplan-story-XXXX-YYYY.md`)\n- Test plan (`ai\u002Fepics\u002Fepic-XXXX\u002Fplans\u002Ftests-story-XXXX-YYYY.md`)\n- Common mistakes document\n\n### Step 3 — Template Detection\n\nBefore executing the review, check if the Tech Lead review template exists:\n\n```bash\ntest -f .claude\u002Ftemplates\u002F_TEMPLATE-TECH-LEAD-REVIEW.md && echo \"TL_TEMPLATE_AVAILABLE\" || echo \"TL_TEMPLATE_MISSING\"\n```\n\n- If `TL_TEMPLATE_AVAILABLE`: Read template at `.claude\u002Ftemplates\u002F_TEMPLATE-TECH-LEAD-REVIEW.md` for required output format. Follow ALL sections defined in the template. The report MUST include a standardized header with Story ID, Date, Author (Tech Lead), and Template Version (RULE-011 — Standardized artifact headers). Score MUST be in format `XX\u002F45` with status `GO`\u002F`NO-GO` (RULE-005 — Quality gates).\n- If `TL_TEMPLATE_MISSING`: log warning `Template not found, using inline format` and use the inline format as fallback (RULE-012 — Graceful template fallback). Dashboard and remediation updates are skipped when template is absent.\n\n> **Fallback (RULE-012 — Graceful template fallback):** When template is not available (pre-EPIC-0024 projects), the current inline format is used as fallback. Skip dashboard and remediation updates since they depend on template-based artifacts.\n\nPersist interactiveMode to execution-state.json (EPIC-0068 — consumed by Stop hook `enforce-continuous-flow.sh`):\n\n    Skill(skill: \"x-internal-update-status\", args: \"--file ai\u002Fepics\u002Fepic-XXXX\u002Fexecution-state.json --type story --id \u003CSTORY-ID> --field interactiveMode --value \u003Cinteractive|non-interactive>\")\n\nValue: `\"interactive\"` when `--interactive` passed or `CLAUDE_LEGACY_INTERACTIVE=1`; otherwise `\"non-interactive\"` (Rule 20 default, EPIC-0061).\n\n    TaskUpdate(id: phase0TaskId, status: \"completed\")\n\n## Phase 1 — Execute 45-point review\n\nOpen a phase tracker; PRE gate ensures Phase 0 completed:\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-1-Review\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 1 - Review\", activeForm: \"Running 45-point tech-lead review\")\n\nClose with `TaskUpdate(id: phase1TaskId, status: \"completed\")` + POST gate after Step 4 finishes (the rubric execution is the evidence):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --skill x-review-pr --phase Phase-1-Review --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md\")\n\n### Step 4 — Execute Tech Lead Review\n\nThe Tech Lead review covers:\n\n1. List ALL modified files: `git diff [BASE_BRANCH] --name-only`\n2. View FULL diff: `git diff [BASE_BRANCH]`\n3. For EACH source file, read FULL content and apply 45-point checklist\n4. Focus on CROSS-FILE issues (inconsistencies, cross imports, repeated patterns)\n5. Compile and verify: `{{COMPILE_COMMAND}}` + `{{BUILD_COMMAND}}`\n6. **Execute full test suite** (MANDATORY — EPIC-0042):\n   ```bash\n   {{TEST_COMMAND}}\n   ```\n   - If ANY test fails: record test failures in report AND set decision to **automatic NO-GO** (overrides rubric score)\n   - Log each failing test name and failure reason in the report under a dedicated **Test Execution Results** section\n7. **Execute coverage analysis** (MANDATORY — EPIC-0042):\n   ```bash\n   {{COVERAGE_COMMAND}}\n   ```\n   - If line coverage \u003C 95% or branch coverage \u003C 90%: record as CRITICAL finding in report\n   - Include coverage percentages in the **Test Execution Results** section\n   - **Absolute-gate note (Rule 05 RULE-005-01):** the gate fires regardless of whether the deficit was caused by this PR or was pre-existing on the base branch. The Tech Lead MUST NOT override NO-GO with a \"pre-existing\" justification. The only permitted escape paths are: (a) close the gap in this PR, (b) close it in a predecessor PR, or (c) merge an approved ADR that temporarily lowers the gate for a specific package (with sunset date).\n8. **Execute smoke tests** (CONDITIONAL — EPIC-0042, only when `testing.smoke_tests == true`):\n   ```bash\n   {{SMOKE_COMMAND}}\n   ```\n   - If ANY smoke test fails: record as CRITICAL finding AND set decision to **automatic NO-GO**\n   - If `testing.smoke_tests == false`: log `\"Smoke tests skipped (testing.smoke_tests=false)\"` and proceed\n9. If specialist reports exist, verify CRITICAL issues were fixed\n\n## 45-Point Rubric\n\n| Section                  | Points | What it checks                                                      |\n| ------------------------ | ------ | ------------------------------------------------------------------- |\n| A. Code Hygiene          | 8      | Unused imports\u002Fvars, dead code, warnings, method signatures, magic  |\n| B. Naming                | 4      | Intention-revealing, no disinformation, meaningful distinctions      |\n| C. Functions             | 5      | Single responsibility, size \u003C= 25 lines, max 4 params, no flags     |\n| D. Vertical Formatting   | 4      | Blank lines between concepts, Newspaper Rule, class size \u003C= 250     |\n| E. Design                | 3      | Law of Demeter, CQS, DRY                                           |\n| F. Error Handling        | 3      | Rich exceptions, no null returns, no generic catch                  |\n| G. Architecture          | 5      | SRP, DIP, architecture layer boundaries (per project rules), follows plan |\n| H. Framework & Infra     | 4      | DI, externalized config, native-compatible, observability           |\n| I. Tests & Execution     | 6      | ALL tests pass, coverage >= 95%\u002F90%, smoke tests pass, test quality |\n| J. Security & Production | 1      | Sensitive data protected, thread-safe                               |\n| K. TDD Process           | 5      | Test-first commits, Double-Loop TDD, TPP progression, atomic cycles |\n\n## Decision Criteria\n\n| Condition                              | Decision        |\n| -------------------------------------- | --------------- |\n| >= 38\u002F45 + zero issues | GO              |\n| \u003C 38\u002F45 OR any issue   | NO-GO           |\n| ANY test failure (unit, integration, or smoke) | NO-GO (automatic, overrides score) |\n| Coverage below 95% line OR 90% branch  | NO-GO (automatic, overrides score — **absolute gate per Rule 05 RULE-005-01; pre-existing deficits are NOT an excuse**) |\n\n## Phase 2 — Compile verdict & publish dashboard\n\nOpen a phase tracker (PRE gate: Phase 1 must have completed):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-2-Verdict\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 2 - Verdict\", activeForm: \"Compiling GO\u002FNO-GO verdict\")\n\nClose with `TaskUpdate(id: phase2TaskId, status: \"completed\")` + POST gate after Step 7:\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --skill x-review-pr --phase Phase-2-Verdict --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md\")\n\n### Step 5 — Update Consolidated Dashboard\n\nAfter saving the Tech Lead report, update the consolidated dashboard (RULE-006).\n\nThe dashboard is **cumulative** (RULE-006): created by `\u002Fx-review-codebase` (specialist scores), updated by `\u002Fx-review-pr` (Tech Lead Score).\n\n1. **Check if dashboard exists:**\n   ```bash\n   test -f ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md && echo \"DASHBOARD_EXISTS\" || echo \"DASHBOARD_MISSING\"\n   ```\n\n2. **If dashboard exists (created by x-review-codebase):**\n   - Read `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md`\n   - Update the **Tech Lead Score** section: replace placeholder `--\u002F45 | Status: Pending` with actual score `XX\u002F45 | Status: GO\u002FNO-GO`\n   - Update the **Overall Score** to include Tech Lead score in the total\n   - Update the **Overall Status** considering both specialist scores and Tech Lead decision: status is updated to reflect all 8 specialists + Tech Lead combined assessment\n   - Append a new **Round** to the **Review History** section with date, Tech Lead score, and status\n   - Preserve all existing specialist scores and previous rounds\n\n3. **If dashboard does not exist (x-review-codebase was not executed):**\n   - Log: `Dashboard not found, creating fresh dashboard`\n   - Check dashboard template:\n     ```bash\n     test -f .claude\u002Ftemplates\u002F_TEMPLATE-CONSOLIDATED-REVIEW-DASHBOARD.md && echo \"DASHBOARD_TEMPLATE_AVAILABLE\" || echo \"DASHBOARD_TEMPLATE_MISSING\"\n     ```\n   - If template available: read template and create `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md` with only the Tech Lead Score populated (specialist scores marked as `--` \u002F `Pending`)\n   - If template missing: skip dashboard creation with warning\n\n\u003C!-- phase-no-gate: remediation is iterative by nature; each cycle K emits its own sub-task. Gate would fire inside the loop. -->\n## Phase 3 — Remediation loop (iterative)\n\nRuns only on NO-GO (or `--no-auto-remediation` bypass at Step 8.4). Each cycle chained via `addBlockedBy`, cap 3 per Rule 20:\n\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 3 - Remediation cycle 1\", activeForm: \"Running remediation cycle 1\")\n    TaskUpdate(id: cycle1Id, status: \"completed\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 3 - Remediation cycle 2\", activeForm: \"Running remediation cycle 2\") \u002F* addBlockedBy: [cycle1Id] *\u002F\n    TaskUpdate(id: cycle2Id, status: \"completed\")\n\nOn convergence (GO) or exhaustion (`REVIEW_REMEDIATION_EXHAUSTED` \u002F `REVIEW_FIX_LOOP_EXCEEDED`), proceed to Phase 4.\n\n### Step 6 — Update Remediation Tracking\n\nAfter updating the dashboard, update the remediation tracking file.\n\n1. **Check if remediation exists:**\n   ```bash\n   test -f ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md && echo \"REMEDIATION_EXISTS\" || echo \"REMEDIATION_MISSING\"\n   ```\n\n2. **If remediation exists (created by x-review-codebase):**\n   - Read `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md`\n   - For each finding in the remediation tracker:\n     - If the Tech Lead confirms the finding is fixed (code reviewed and issue resolved): update status from `Open` -> `Fixed`\n     - If the finding remains unfixed: keep status as `Open`\n   - Add new findings identified by the Tech Lead that are not present in the existing remediation tracker, with status `Open`\n   - Update the **Remediation Summary** counts to reflect new statuses\n\n3. **If remediation does not exist (x-review-codebase was not executed):**\n   - Log: `Remediation not found, creating fresh remediation with Tech Lead findings`\n   - Check remediation template:\n     ```bash\n     test -f .claude\u002Ftemplates\u002F_TEMPLATE-REVIEW-REMEDIATION.md && echo \"REMEDIATION_TEMPLATE_AVAILABLE\" || echo \"REMEDIATION_TEMPLATE_MISSING\"\n     ```\n   - If template available: read template and create `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md` with only findings from the Tech Lead review (all as `Open`)\n   - If template missing: skip remediation creation with warning\n\n## Phase 4 — Final approval & report\n\nOpen a phase tracker (PRE gate: Phase 2 verdict must be resolved; Phase 3 may have run):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --skill x-review-pr --phase Phase-4-Approval\")\n    TaskCreate(subject: \"{STORY_ID} › Review-PR › Phase 4 - Approval\", activeForm: \"Finalizing approval and report\")\n\nClose with `TaskUpdate(id: phase4TaskId, status: \"completed\")` + FINAL gate (composes with Rule 24 mandatory-artifact scan):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode final --skill x-review-pr --phase Phase-4-Approval --expected-artifacts ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md,ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md,ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md\")\n\n### Step 7 — Process Result\n\n```\n============================================================\n TECH LEAD REVIEW — [STORY_ID]\n============================================================\n Decision:  GO | NO-GO\n Score:     XX\u002F45 (GO >= 38)\n Critical:  N issues\n Medium:    N issues\n Low:       N issues\n\n Test Execution Results (EPIC-0042):\n Test Suite:    PASS (XXX tests, X failures)\n Coverage:      XX% line, XX% branch\n Smoke Tests:   PASS\u002FFAIL\u002FSKIP (N tests)\n------------------------------------------------------------\n Report:      ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md\n Dashboard:   ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md (updated)\n Remediation: ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md (updated)\n============================================================\n```\n\nReplace \"Test Suite\", \"Coverage\", and \"Smoke Tests\" placeholders with actual values from Step 4 execution (Steps 4.6, 4.7, 4.8). If smoke tests were skipped (testing.smoke_tests=false), show `SKIP (0 tests)`.\n\n### Step 8 — Handle NO-GO (Auto-Remediation — EPIC-0042)\n\nWhen the review results in NO-GO, automatically dispatch remediation instead of waiting for manual input:\n\n1. **Classify NO-GO findings:**\n   - `TEST_FAILURE`: unit\u002Fintegration\u002Fsmoke test failures detected in Step 4.6-4.8\n   - `COVERAGE_GAP`: coverage below 95% line or 90% branch detected in Step 4.7\n   - `CODE_QUALITY`: rubric score below threshold (non-test issues)\n\n2. **Auto-remediate by classification:**\n\n   **For TEST_FAILURE:**\n   Dispatch a general-purpose agent to fix failing tests:\n   ```\n   Agent(\n     subagent_type: \"general-purpose\",\n     description: \"Fix failing tests for NO-GO remediation\",\n     prompt: \"Read the failing test output from the review report at ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md. Identify the root cause of each failing test. Fix the IMPLEMENTATION (NOT the test) to make tests pass. Run {{TEST_COMMAND}} to verify the fix. Commit via Skill(skill: 'x-commit-changes', args: '--type fix --subject \\\"fix failing tests from tech lead review\\\"').\"\n   )\n   ```\n\n   **For COVERAGE_GAP:**\n   Dispatch a general-purpose agent to add missing test coverage:\n   ```\n   Agent(\n     subagent_type: \"general-purpose\",\n     description: \"Add test coverage for NO-GO remediation\",\n     prompt: \"Read the coverage report. Identify uncovered lines\u002Fbranches. Write tests for the uncovered code paths following TDD discipline (test first). Run {{TEST_COMMAND}} + {{COVERAGE_COMMAND}} to verify coverage meets 95% line \u002F 90% branch. Commit via Skill(skill: 'x-commit-changes', args: '--type test --subject \\\"add test coverage for uncovered branches\\\"').\"\n   )\n   ```\n\n   **For CODE_QUALITY:**\n   Apply fixes inline following the remediation tracking file guidance.\n\n3. **Re-run review automatically** (max 2 cycles total):\n   - After remediation agent completes, re-execute Step 4 (full review)\n   - If still NO-GO after 2 cycles: proceed to Step 8.4 (Exhausted-Retry Gate)\n\n4. **Opt-out:** Pass `--no-auto-remediation` flag to force manual mode (skips auto-remediation agents; proceeds directly to Step 8.4 on NO-GO).\n\n#### Step 8.4 — Exhausted-Retry Gate (Rule 20 Interactive Gate)\n\nReached when auto-remediation cycles are exhausted (2 retries without convergence) or when `--no-auto-remediation` is set and the review returns NO-GO.\n\n**Non-interactive path (default — `--interactive` absent or `--non-interactive` deprecated flag):**\nSkip `AskUserQuestion`. Print HALT text and return NO-GO:\n```\nREVIEW NO-GO: Auto-remediation exhausted without convergence. Remaining issues recorded in report.\nRun with --resume-review \u003Cpr> --interactive to re-enter the gate interactively.\n```\nExit with NO-GO. No state file written. (`--non-interactive` DEPRECATED — same as default; WARN emitted per Rule 20 EPIC-0061.)\n\n**Interactive path (`--interactive` present):**\n\nInitialize `gateAttempts = 0`.\n\n**Gate loop:**\n\n```\nWHILE gateAttempts \u003C 3:\n  Present AskUserQuestion:\n    question: \"Auto-remediation exhausted after 2 retry cycles. The Tech Lead review returned NO-GO. How would you like to proceed?\"\n    options:\n      - { header: \"Proceed\", label: \"Continue (Recommended)\", description: \"Re-dispatch auto-remediation (+2 loops). If the review converges to GO, the gate closes and the skill exits normally.\" }\n      - { header: \"Fix PR\", label: \"Run x-fix-pr and retry\", description: \"Invokes x-fix-pr on the current PR; reapresents this menu on return.\" }\n      - { header: \"Abort\", label: \"Cancel the operation\", description: \"Terminates the skill with REVIEW_REMEDIATION_EXHAUSTED. No further remediation is attempted.\" }\n\n  On PROCEED (slot 1):\n    gateAttempts++\n    Re-dispatch auto-remediation agents (same classification logic as Step 8 sub-steps 1-3, with 2 new retry cycles)\n    Re-execute Step 4 (full review)\n    IF review returns GO:\n      Exit gate with GO — skill completes normally\n    ELSE:\n      IF gateAttempts >= 3:\n        Emit REVIEW_FIX_LOOP_EXCEEDED and terminate (see below)\n      ELSE:\n        Continue loop (reapresent menu)\n\n  On FIX-PR (slot 2):\n    gateAttempts++\n    Write\u002Fupdate state file at plans\u002Freview\u002F\u003Cpr>\u002Fstate.json (opt-in persistence):\n      phase: \"GATE_FIX_PR\"\n      lastPhaseCompletedAt: \u003CISO-8601 UTC now>\n      lastGateDecision: \"FIX_PR\"\n      fixAttempts: [... previous ..., { at: \u003Cnow>, delegateSkill: \"x-fix-pr\", prNumber: \u003CPR>, outcome: \"pending\" }]\n      schemaVersion: \"1.0\"\n    Invoke x-fix-pr via Rule 13 Pattern 1 INLINE-SKILL:\n\n        Skill(skill: \"x-fix-pr\", args: \"\u003CPR>\")\n\n    Update last fixAttempt.outcome to \"applied\" (or appropriate outcome)\n    Update state file: lastGateDecision = \"FIX_PR\", lastPhaseCompletedAt = \u003Cnow>\n    IF gateAttempts >= 3:\n      Emit REVIEW_FIX_LOOP_EXCEEDED and terminate (see below)\n    ELSE:\n      Continue loop (reapresent menu)\n\n  On ABORT (slot 3):\n    Emit: \"Review NO-GO final: operator aborted after ${gateAttempts} remediation attempt(s) on PR ${PR}\"\n    Exit with code REVIEW_REMEDIATION_EXHAUSTED\n```\n\n**Guard-rail — `REVIEW_FIX_LOOP_EXCEEDED` (3 consecutive PROCEED or FIX-PR without convergence):**\n\nWhen `gateAttempts >= 3` without converging to GO, terminate the gate automatically:\n```\nREVIEW_FIX_LOOP_EXCEEDED: Loop de fix excedeu 3 tentativas no review do PR ${PR};\ngate encerrado com ABORT automático.\nRetomar via --resume-review ${PR} com --non-interactive ou intervenção manual.\n```\nNo 4th option is offered. The gate terminates immediately. The menu was presented exactly 3 times (RULE-002 invariant: total option count remains 3 at all previous presentations).\n\n## State File (opt-in)\n\nWritten only when the operator selects **FIX-PR** (slot 2) in Step 8.4. Enables resume via `--resume-review \u003Cpr>`. Path: `plans\u002Freview\u002F\u003Cpr-number>\u002Fstate.json`. Schema version `\"1.0\"` with fields `phase`, `lastPhaseCompletedAt`, `lastGateDecision`, `fixAttempts[]`, `schemaVersion`.\n\nSee [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) for the full JSON schema, field definitions, and `--resume-review` resume semantics.\n\n## Phase 5 — Emit Frontmatter (MANDATORY — Rule 24 §Camada-1)\n\n\u003C!-- TELEMETRY: phase.start -->\nBash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fhooks\u002Ftelemetry-phase.sh start x-review-pr Phase-5-Frontmatter`\n\n> **MANDATORY TOOL CALL (Rule 24 §Camada-1):** This phase MUST NOT be inlined, simulated,\n> or omitted. The LLM MUST prepend the populated YAML frontmatter to the tech-lead review\n> artifact. Absent frontmatter is detected by `audit-review-frontmatter.sh` (Layer 3 CI)\n> and the Stop hook (Layer 2 runtime). There is no fallback when frontmatter emission fails.\n\nTaskCreate(\n  subject: \"\u003CSTORY_ID> › Phase 5 › Emit tech-lead review frontmatter\",\n  activeForm: \"Emitting tech-lead review frontmatter\",\n  metadata: {\n    \"phase\": \"Phase 5\",\n    \"parentSkill\": \"x-review-pr\",\n    \"storyId\": \"\u003CSTORY_ID>\",\n    \"epicId\": \"\u003CEPIC_ID>\",\n    \"expectedArtifacts\": [\"\u003Cpath to techlead-review-story-XXXX-YYYY.md>\"]\n  }\n)\n\nInvoke pre-gate (Rule 25 §Invariants 4):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode pre --phase 'Phase 5' --skill x-review-pr\")\n\nAfter Phase 4 has produced the prose body of `techlead-review-story-\u003CSTORY_ID>.md`,\nprepend the YAML frontmatter block conforming to `governance\u002Fschemas\u002Freview-frontmatter-1.0.json`.\nThe full YAML template and field notes are in [`references\u002Ffull-protocol.md §Phase 5`](references\u002Ffull-protocol.md).\n\nKey fields: `schema-version: \"1.0\"`, `generated-by: x-review-pr@\u003C40-hex SHA>` (matches schema pattern `^(x-review-codebase|x-review-pr)@[0-9a-f]{40}$`), `decision` (GO|NO-GO|GO-WITH-RESERVATIONS), `score`, `score-max: 55`, `severity-counts`, `blocking-findings`. The `reviewers` field is NOT emitted (Tech Lead is sole reviewer). Use `checklist:` with sub-fields `passed:` (integer), `total: 45`, and `failed-sections:` (YAML list) instead.\n\nAfter writing the artifact, validate:\n\n    Bash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fscripts\u002Faudit-review-frontmatter.sh --story \u003CSTORY_ID>`\n\nIf the script returns exit ≠ 0, abort with `REVIEW_FRONTMATTER_INVALID`. No fallback.\n\nInvoke post-gate (Rule 25 §Invariants 4):\n\n    Skill(skill: \"x-internal-verify-phase-gates\", model: \"haiku\", args: \"--mode post --phase 'Phase 5' --skill x-review-pr --expected-artifacts \u003Cpath to techlead-review-story-XXXX-YYYY.md>\")\n\nTaskUpdate(taskId: \u003Cid from TaskCreate above>, status: \"completed\")\n\n\u003C!-- TELEMETRY: phase.end -->\nBash command: `$CLAUDE_PROJECT_DIR\u002F.claude\u002Fhooks\u002Ftelemetry-phase.sh end x-review-pr Phase-5-Frontmatter ok`\n\n## Error Codes\n\n| Code | Condition | Message |\n|------|-----------|---------|\n| `REVIEW_REMEDIATION_EXHAUSTED` | Operator selected ABORT in Step 8.4 gate | `\"Review NO-GO final: operador abortou após ${N} tentativas de remediation no PR ${PR}\"` |\n| `REVIEW_FIX_LOOP_EXCEEDED` | 3 consecutive PROCEED or FIX-PR attempts without converging to GO | `\"Loop de fix excedeu 3 tentativas no review do PR ${PR}; gate encerrado com ABORT automático. Retomar via --resume-review ${PR} com --non-interactive ou intervenção manual.\"` |\n| `GATE_SCHEMA_INVALID` | State file at `plans\u002Freview\u002F\u003Cpr>\u002Fstate.json` fails Rule 20 schema validation | `\"State file inválido para gate em {path}: {campo} ausente ou mal-formado\"` |\n\n## Output Artifacts\n\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Freview-tech-lead-story-XXXX-YYYY.md` — Tech Lead review report\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fdashboard-story-XXXX-YYYY.md` — Updated consolidated dashboard\n- `ai\u002Fepics\u002Fepic-XXXX\u002Freviews\u002Fremediation-story-XXXX-YYYY.md` — Updated remediation tracking\n- `plans\u002Freview\u002F\u003Cpr-number>\u002Fstate.json` — Gate state (opt-in, written only on FIX-PR selection)\n\n## Error Handling\n\n| Scenario | Action |\n|----------|--------|\n| No diff exists between branches | Abort with message: \"No changes detected between current branch and base. Nothing to review.\" |\n| Template `_TEMPLATE-TECH-LEAD-REVIEW.md` missing | Log warning, use inline format as fallback (RULE-012 — Graceful template fallback). Skip dashboard and remediation updates. |\n| Specialist review reports not found | Proceed with Tech Lead review only; note absence in report |\n| Compilation or build failure | Record failure in report, deduct points from Framework & Infra section |\n| Test suite failure (unit\u002Fintegration) | Automatic NO-GO regardless of rubric score; record all failing tests in report |\n| Coverage below threshold (\u003C 95% line or \u003C 90% branch) | Automatic NO-GO; record coverage gap as CRITICAL finding |\n| Smoke test failure | Automatic NO-GO; record failing smoke tests as CRITICAL finding |\n| NO-GO after 2 retry cycles | Route to Step 8.4 Exhausted-Retry Gate |\n| NO-GO with `--no-auto-remediation` | Route directly to Step 8.4 Exhausted-Retry Gate |\n| `--non-interactive` after retry exhausted | Skip gate; emit legacy HALT text; return NO-GO |\n| State file missing on `--resume-review` | Start gate fresh; emit warning |\n| State file schema invalid | Emit `GATE_SCHEMA_INVALID`; start gate fresh |\n\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n|-------|-------------|---------|\n| x-implement-story | called-by | Produces the same artifact as Phase 6 |\n| x-review-codebase | reads | Reads specialist review reports for cross-validation |\n| x-review-codebase | complements | `\u002Fx-review-codebase` = breadth (7 specialists), `\u002Fx-review-pr` = depth (1 Tech Lead) |\n\n- Dashboard (Step 5) is **cumulative** — created by `\u002Fx-review-codebase`, updated by `\u002Fx-review-pr` (RULE-006)\n- Remediation tracking (Step 6) enables FIXED status tracking after Tech Lead review\n- Templates in `.claude\u002Ftemplates\u002F` are copied verbatim by `PlanTemplatesAssembler` — not rendered by the engine\n- Fallback (RULE-012 — Graceful template fallback): When templates are absent (pre-EPIC-0024 projects), inline format is used and dashboard\u002Fremediation updates are skipped\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":25,"context-budget":26,"user-invocable":27,"requires-capabilities":28},"Read, Write, Edit, Bash, Grep, Glob, AskUserQuestion, Skill","[PR-number or STORY-ID] [--no-auto-remediation] [--interactive] [--non-interactive] [--resume-review \u003Cpr>]","heavy",true,[],"main","952a630c6f38d193a349d86fa18db1de8843e837","src\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-neo4j\u002F.claude\u002Fskills\u002Fx-review-pr",1,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment","https:\u002F\u002Fgithub.com\u002Freview-bench","https:\u002F\u002Freview-bench.ai","An open benchmark for AI code review.","2026-10-27 06:56:37",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":27},[40,43,46],{"tool":41,"command":42},"npx","npx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-review-pr",{"tool":44,"command":45},"bunx","bunx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-review-pr",{"tool":47,"command":48},"pnpm","pnpm dlx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-review-pr","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-neo4j\u002F.claude\u002Fskills\u002Fx-review-pr\u002FSKILL.md",[51,57],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"README.md","REFERENCE","参考文档",2217,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-neo4j\u002F.claude\u002Fskills\u002Fx-review-pr\u002FREADME.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Ffull-protocol.md",3213,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-neo4j\u002F.claude\u002Fskills\u002Fx-review-pr\u002Freferences\u002Ffull-protocol.md",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M757M8J48TQ1Y3X25GSJBXAS","x-parallel-eval","Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan \u002F x-story-plan, applies the parallelism-heuristics knowledge pack (hard \u002F regen \u002F soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fx-parallel-eval\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M757M57XMR9546S69466HDWT","parallelism-heuristics","Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard \u002F regen \u002F soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fparallelism-heuristics\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M757M11SZ8P1VCQABT08QVYA","x-watch-pr-ci","Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-watch-pr-ci\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M757KW53K8KFPGADFB4PH949","x-validate-docs","Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared\u002Fauto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-validate-docs\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M757KQZHSA10MKC0CR571D60","x-update-system-architecture","Incrementally updates docs\u002Farchitecture\u002Fsystem.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component\u002Fintegration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-system-architecture\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M757KKBT5Q1SVF8DMJBVF46M","x-update-architecture","Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-architecture\u002FSKILL.md",[],[]]