/d3nexus:principal-reviewfrom d3nexus
Performs Shift-Left architectural and task design document reviews (HLD, BDD, Tasks, RFC) against source code before implementation begins.
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Principal Review provides rigorous, cross-model architectural inspection of High-Level Designs (HLDs), BDD scenarios, Kanban task breakdowns, and standalone RFC documents against the active source codebase.
Operating on the principle of Shift-Left Quality Assurance, it catches misunderstandings, missing contracts, scope regressions, and symbol drift before implementation starts, when resolving them in documents is an order of magnitude faster and cheaper than debugging in code.
Announce at start: "I'm using the principal-review skill to conduct an architectural review."
Automatically invoked at the end of Stage 2 (dev-lifecycle / dev-designer) after all epic artefacts pass Gate 2 and mechanical readiness checks and the developer specifies the provider/model priority order. Packaging (package_epic.py / handoff.md) runs at the end of Principal Review once convergence is reached.
/principal-review provider/model priority order at the end of Stage 2 (or standalone /principal-review on an epic)..devtool/epic/<epic_dir>/:
*-design.md)<epic_dir>.md)bdd_scenarios.md).en.md names are accepted for these three; Vietnamese mirrors are not SSOT, so never review or open themtask_*.md)handoff.md, when already present)python3 skills/dev-implementation/resources/scripts/run_external_review.py run \
--kind principal --epic-dir <epic_dir> --base <base_branch> [--auto-quota [--provider-priority <order>] | --cli <claude|codex|kiro|agy> [--model <model>]]
.devtool/epic/<epic_dir>/principal_review.md (with - **CLI**: and - **Profile**: metadata); non-verdict attempts log only to git-ignored build/reviews/.Invoked on-demand to review standalone design documents, architecture proposals, or RFCs without requiring an epic directory.
/principal-review <path> (e.g. /principal-review docs/rfc/payment-service.md).HEAD.# Title, ## Overview).python3 skills/dev-implementation/resources/scripts/run_external_review.py run \
--kind principal --doc <path> --base <base_branch> [--auto-quota | --cli <claude|codex|kiro|agy> [--model <model>]]
build/ (git-ignored) for inspection.Pre-Check:
check_epic_readiness.py runs first (enforcing R1–R8, BDD Scenario Count Parity Count(bdd_scenarios.md) == Count(task_acceptance.md), and check_task_contract.py --design). If any check fails, or if max_principal_review_passes (default: 3, via /d3nexus:dev-config limits --principal-review N, or --max-rounds N) has already been reached without --force, review halts immediately with [PRECONDITION BLOCKED] without calling external model CLIs (0 credits used).Nested (provider, profile) Candidate Exhaustion, 3-Round Convergence Funnel & Shared Context:
Claude -> Codex -> Kiro -> Argon): Configured via layered /d3nexus:dev-config review and /d3nexus:dev-config limits (CLI flags > .agents/config/personas.json > $REAL_HOME/.d3nexus/personas.json > .devtool/review_config.json read-only fallback > scripts/personas.default.json; defaults: provider_priority: ["claude", "codex", "kiro", "agy"], max_principal_review_passes: 3). Runtime last_used_provider is isolated in .devtool/state/review_runtime.json without mutating .devtool/review_config.json. run_external_review.py walks candidates as nested (provider, profile) loops — resolved provider_priority outer (--auto-quota) or a single targeted provider (--cli <provider> or sticky default; --model requires single-provider mode and is rejected with --auto-quota), and provider profiles inner (default for claude/codex/kiro, or leased agy pool profiles from agy_profile_pool.py ordered by max_headroom in the model's exact quota bucket). Pre-launch checks enforce review.quota_thresholds (defaults: Claude/Codex 5H >= 15% AND 7D > 2%; Kiro Monthly Credits >= 3% AND >= 15.0 credits; agy model entitlement plus model-bucket matching across argonWeekly >= 10% [plus gemini5h >= 15% when sharedPool], gemini5h >= 15% AND geminiWeekly > 2%, or third-party claude5h >= 15% AND claudeWeekly > 2%). Runtime quota, auth, disabled-account, or unentitled-model failures advance to the next (provider, profile) pair without writing to principal_review.md. Rounds are recorded only when a valid verdict is produced (capturing - **CLI**: <provider> and - **Profile**: <profile>). If every (provider, profile) candidate is exhausted, run_external_review.py exits 3 (EXIT_CANDIDATES_EXHAUSTED) with a per-pair ledger; checkpoint quota_low or model_unavailable, record --pending-decision (decision-kind quota or blocker), and stop without running triage.Scope: full): Full audit of all epic artefacts against active code (enforcing the Exhaustive Per-File Pass anti-drip-feed rule).Scope: delta): Verifies fixed in <sha> items and inspects only prev_sha..curr_sha diff hunks; prohibits new Minor findings on untouched files.Scope: convergence): Strict Blocker-Only Convergence Mode (incomplete fixes or new Critical/Important regressions in prev_sha..curr_sha)..devtool/epic/<epic_dir>/principal_review.md acts as the persistent Shared Context SSOT across rounds (Earlier Rounds Shared Context Ledger). delta_round_context() injects the Universal Anti-Ping-Pong Guardrail (both single-model and mixed-model), the Previously Fixed Locations Registry (Verify-Then-Close), and Diff-Hunk Isolation on fixed files. See document-triage.md for the complete 4-strategy specification.Role Matrix (Role 2.1 AI Architect & Reviser) & Auto-Triage Gate — see orchestration-roles.md:
run_external_review.py run --kind principal --base <base_branch> & triage synchronously and inspects the triage table; it never edits src//tests/, runs test suites, or spawns and waits on subagents. In autonomous mode lifecycle_runner.py dispatches the reviser through dev_config.py resolve ai_architect_reviewer.principal-reviser (Role 2.1): Document revisions are Role 2.1 work (CRITICAL_RULES §8), so whenever findings exist (AUTO_FIX_ELIGIBLE, AUTO_PASS_FINAL_MINOR_SWEEP, or AUTO_PASS_FINAL_SWEEP) the revision runs inline in the Stage 2 session or as a same-model subagent on the ai_architect_reviewer binding (python3 scripts/dev_config.py resolve ai_architect_reviewer --format argv --mode write; the in-runtime tool must pin that model). The reviser is read-only on src//tests/ and edits only .devtool/epic/<epic_dir>/ docs and task prose:
Debatable, Not shown, a CRITICAL_CONFLICT, or touches shared-contracts/: return status: ESCALATE with the reasons.PROPOSED ACTION, commit [<EPIC_NAME>] Revise epic after Principal Review round <n>, record fixed in <sha> in principal_review.md, commit [<EPIC_NAME>] Record Principal Review decisions for round <n>, and return the principal-reviser JSON summary.check_epic_readiness.py <epic_dir> itself (must exit 0) and git diff --name-only <pre_sha>..HEAD (any path outside .devtool/epic/<epic_dir>/ or the epic's task files halts with CRITICAL_CONFLICT).CIRCUIT_BREAKER_HALT / Escalation): Stop immediately and record python3 scripts/resume_context.py --pending-decision "Resolve Principal Review blocker (<reason>)" --decision-kind blocker --epic <epic_slug> ONLY on reviser ESCALATE, CRITICAL_CONFLICT, Debatable trade-offs, SHARED_CONTRACT_CONFLICT, FIX_LOOP, or MAX_ROUNDS_CRITICAL_REMAINING:
Principal Review Triage: Round <N> (<CLI>)
*(or `Principal Review Triage: <doc_path> (<CLI>)`)*
• Candidate SHA: <commit_sha>
• Reviewer: <CLI> ( <model> )
• Profile: <profile>
• Thinking Level: <Light | Low | Medium | High | Extra High | None>
• Verdict: <VERDICT> (<count> <Severity> findings)
Round Progression, Convergence & Post-Review Packaging (package_epic.py + /save-context):
Round n -> n+1): Once the reviser returns REVISED and the check_epic_readiness.py run exits 0, Role 2.1 immediately triggers Round n+1 (never running package_epic.py mid-loop). Never pause to ask the developer to confirm applying verified Valid fixes or advancing to Round n+1. Sub-step heartbeats (--phase fixing / --phase verifying) are emitted during execution.AUTO_PASS_CLEAN, AUTO_PASS_FINAL_MINOR_SWEEP, or AUTO_PASS_FINAL_SWEEP):
python3 skills/dev-implementation/resources/scripts/package_epic.py <epic_dir> (--revise --reason "Revise after Principal Review round <n>" if handoff.md exists) and commit [<EPIC_NAME>] Package epic for handoff.python3 scripts/resume_context.py --gate 2 --epic <epic_slug> --approved "Passed Principal Review round <n> and packaged"), save state (--state --epic <epic_slug> --status "Stage 2: Packaged & Ready"), and print python3 scripts/resume_context.py --emit-prompt implement --epic <epic_slug> + handoff.md path.lifecycle_runner.py), OR in interactive mode when Triển khai (tự động) was already confirmed at Gate 2 Unified Confirmation: do NOT pause or ask for confirmation again — transition directly to d3nexus:dev-implementation without stopping. When Dừng lại was confirmed at Gate 2, stop cleanly here. Only in standalone interactive mode (no prior Gate 2 execution mode chosen), state the configured orchestrator binding in the prompt (Stage 3 would otherwise run on this session's model), record --pending-decision "Choose Triển khai (tự động) vs Dừng lại" --decision-kind choice_a, stop calling tools, and ask Triển khai (tự động) vs Dừng lại.Read these on demand, not up front. run_external_review.py loads the prompt template and review rules itself, so do not open them to run a review.
\| pipe escaping, env VAR=val prefixing, slash-containing search pattern rules, and portable CLI usage). Escaped pipes \| in table command cells are unescaped by task_contract.py and must not be flagged as syntax errors.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job