/d3nexus:dev-implementationfrom d3nexus
Use when an epic already has an approved HLD and Kanban task files (`.devtool/epic/<epic_dir>/` + `.devtool/features/task_*.md`) and you need to actually execute those tasks against the codebase, in the right order, inside an isolated worktree across Web Applications, Flutter, Android Native, iOS Native, Python, or Rust projects.
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.
Runs an approved epic's Kanban tasks end-to-end: reload epic context, detect the platform (Flutter, Android Native, iOS Native, Web, Python, or Rust), compute parallel execution waves, bootstrap the epic worktree and 2-slot worker pool, and orchestrate subagents via APFS clone / shared cache.
Core principle: Role 2.2 Orchestrator runs Stage 3; Role 2.3 Programmer subagents execute tasks in a 2-slot ephemeral worker pool + shared cache, Role 2.1 subagents review and plan fixes; one commit per task, docs stay truthful.
Announce at start: "I'm using the dev-implementation skill to implement the <epic_slug> epic."
This skill uses two distinct placeholders, and they are usually different strings — do not substitute one for the other:
| Placeholder | What it is | Where it appears | Worked example |
|---|---|---|---|
<epic_dir> | The epic's directory name on disk | .devtool/epic/<epic_dir>/<epic_dir>.md (legacy <epic_dir>.en.md), the worktree directory name | logging_refactor (underscores) |
<epic_slug> | The epic's frontmatter epic: value | The calculator's CLI arg, matching epic: in task_*.md, the epic/<epic_slug> branch name, the [EPIC_NAME] commit prefix | logging-refactor (hyphens) |
Read both values off disk at the start — never derive one from the other by guessing the separator.
.devtool/epic/<epic_dir>/<epic_dir>.md (legacy <epic_dir>.en.md) HLD and one or more .devtool/features/task_*.md files with epic: "<epic_slug>" in frontmatter, and a human has already approved that design.handoff.md present, Status Packaged) or interrupted midway through Stage 3. Invoke this skill with the epic's directory name or slug; Entry-Point Detection in Phase 0 decides where to start.Don't use when: the epic/tasks don't exist yet (use d3nexus:dev-brainstorming then dev-designer first), or you're implementing a single one-off task with no epic context (just use d3nexus:subagent-driven-development directly).
This skill is Stage 3 of the Epic Lifecycle. The surrounding stages, the five approval gates, and what each stage hands over are owned by the dev-lifecycle skill (with diagrams preserved in docs/lifecycles.en.md). Gate 3 (execution order confirmed) is enforced below, in Phase 1.
.devtool/epic/<name>/ exists, <epic_dir> is <name>, and <epic_slug> is the epic: value of its task mirrors: grep -h -m1 '^epic:' .devtool/epic/<name>/task_*.md.<name> is a slug, and <epic_dir> is the directory holding the files grep -l -F 'epic: "<name>"' .devtool/epic/*/task_*.md lists.Done and ask which one. Never guess, even when only one is listed..devtool/epic/<epic_dir>/handoff.md, when present — packaging record and Open Notes (never edited manually; updated only via package_epic.py <epic_dir> --revise --reason "<text>")..devtool/epic/<epic_dir>/<epic_dir>.md (legacy <epic_dir>.en.md) — canonical HLD & Maintenance Map ("Prompt to Maintain"; English SSOT, never open a .vi.md mirror). Read Meta Data, Architecture, Feature Map & Technical Design, Integration Test Plan, and Verification Environment.Covers:, and Dependencies of .devtool/features/task_*.md matching epic: "<epic_slug>" (read full task bodies one at a time in Phase 2).python3 scripts/resume_context.py --role orchestrator --epic <epic_slug>.python3 scripts/dev_config.py quota-check; exit 2: checkpoint quota_low, record a quota pending decision, stop.Before implementing any task in Phase 2, adhere strictly to Bounded Context Injection:
.devtool/features/task_*.md — the Execution SSOT embedding assigned edge-case ### BDD SCENARIOS from bdd_scenarios.md and Decisions Already Made).Allowed files: and Read-only context: using Rule 3 bounded reads (StartLine/EndLine at target_files ranges + symbol search when files exceed 200 lines).Decisions Already Made (avoid undirected whole-repo searches). Enforce Rule 5 Zero-Fluff Output Cap (omit filler narration while preserving Verdicts, Findings, and gate outputs).Strict Spec Fidelity: Stay strictly within the active task and Allowed files; avoid unrequested abstractions or adjacent refactors.
Symlink & Multi-Repo Boundary Invariant: Where shared-contracts/ is a symlink (lyrics-sync, nexus), treat it as read-only for git (never git add shared-contracts/... -> fatal: pathspec is beyond a symbolic link); report BLOCKED with an Upstream Contract Handoff Summary if upstream changes are required.
SKILL_DIR is the directory this SKILL.md was loaded from:
SKILL_DIR=<absolute path of the directory containing this SKILL.md>
REPO_ROOT=$(git rev-parse --show-toplevel)
INTEGRATE="$SKILL_DIR/../finishing-a-development-branch/resources/scripts/integrate_branch.py"
PROJECT_TYPE=$("$SKILL_DIR"/resources/scripts/detect_project_type.sh "$REPO_ROOT")
echo "Detected project type: $PROJECT_TYPE"
Supported platforms: flutter, android, ios, web, python, rust.MANDATORY: read references/entry-point-and-resume.md before Phase 1. It holds the read-only signals and the 7-row entry table. Evaluate the rows top-down (first match wins) and announce it: "Entry point: row N — ."
Rows 4 and 5 only. MANDATORY: read references/entry-point-and-resume.md before Phase 1. Phase 1 step 4's git worktree add -b never runs here.
Run:
python3 "$SKILL_DIR"/resources/scripts/compute_execution_order.py <epic_slug> --parallel
Check scan summary line (Scanned N task_*.md files; M matched epic ...). If M is smaller than expected, fix broken frontmatter before proceeding. Inspect the computed parallel batches.
Read "Manual review advised" section (if any) and cross-check against Phase 0 context. Adjust flattened order by hand if a prose note should win.
Automated Gate 3 Bootstrap (Zero Manual Confirmation):
The Orchestrator computes and resolves the execution order automatically via compute_execution_order.py.
Record Gate 3 approval in the Gate Approval Ledger:
python3 scripts/resume_context.py --gate 3 --epic <epic_slug> --approved "<execution order auto-resolved>"
Query or verify Gate 3 status at any time via:
python3 scripts/resume_context.py --check-gate 3 --epic <epic_slug>
Run BDD traceability plan check:
SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.md"; [ -f "$SCENARIOS" ] || SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.en.md"
python3 "$SKILL_DIR"/resources/scripts/check_bdd_traceability.py plan \
--scenarios "$SCENARIOS" \
--tasks .devtool/epic/<epic_dir>/task_*.md
Proceed directly to worktree creation (Step 4) and task execution. Do NOT prompt the developer for manual confirmation on execution order. (Halt ONLY on cyclic DAG dependencies, malformed frontmatter, or unresolvable prerequisites).
Verify Principal Review state: python3 "$SKILL_DIR"/resources/scripts/run_external_review.py check --kind principal --epic-dir <epic_dir>. Principal Review must be not run, round <n>: PASS, or round <n>: decided.
If needed, add bracketed identifiers to bdd_scenarios.md (legacy bdd_scenarios.en.md), Covers: lines to task files, and Integration test roots: to HLD. Commit as [EPIC_NAME] Add BDD scenario identifiers.
Then check task contract (validated via resources/scripts/_stack_lifecycle_registry.py: TierBContractAdapter for 6-stack TIER-B gates and TierCTaxonomy for # tier: C2 Needs: gating + Integration test roots:; default compact 1-line PASS stdout, opt-in --verbose / --json):
HLD=".devtool/epic/<epic_dir>/<epic_dir>.md"; [ -f "$HLD" ] || HLD=".devtool/epic/<epic_dir>/<epic_dir>.en.md"
python3 "$SKILL_DIR"/resources/scripts/check_task_contract.py \
--hld "$HLD" \
--tasks .devtool/epic/<epic_dir>/task_*.md
Do not create worktree until both checks exit 0. In AUTO MODE (Triển khai (tự động)), proceed directly to worktree bootstrap without pausing for execution-order confirmation.
Bring local develop up to date with upstream, then create one worktree for whole epic (d3nexus:using-git-worktrees):
python3 "$INTEGRATE" sync-base --base develop
git worktree add .worktrees/<epic_dir> -b epic/<epic_slug> develop
If sync-base exits 3 (diverged or dirty file), stop and ask.
If overview Status begins with Packaged, run python3 "$SKILL_DIR"/resources/scripts/sync_task_status.py epic <epic_dir> "In Progress".
Isolated IDE Window: Optionally open the worktree in a separate IDE profile window (antigravity <profile> .worktrees/<epic_dir>).
Bootstrap worktree using platform tooling (bootstrap_worktree.sh — installs Python [project.optional-dependencies] via uv sync --all-extras and [dependency-groups].dev via --group dev when declared; verify_polyglot_registry.py injects UV_NO_SYNC=1 on uv run capabilities to preserve extras — plus Gradle sync, Tuist, npm/pnpm, cargo check). bootstrap_worktree.sh CoW-seeds each subproject's .venv (verified with uv … sync --check), node_modules/.dart_tool when lockfiles match, and target/.gradle/secureFiles through _worktree_storage.py bootstrap-seed (halting with exit 3 below the disk floor); run_task_checks.py, verify_polyglot_registry.py, and agy_dispatch.py inject build_isolated_python_env() automatically, while commands run by hand go through python3 "$D3NEXUS_KIT"/scripts/_worktree_storage.py exec --worktree "$WORKTREE_ROOT" -- <cmd>, because UV_NO_SYNC=1 PYTHONPATH="$WORKTREE_ROOT/src" loads no isolation shim and cannot block parent-only modules.
Never copy build caches (.dart_tool/, /build/, .build/, android/**/.cxx/) from another checkout into this worktree.
Initialize 2-Slot Ephemeral Worker Pool:
Set up isolated worktree slots via PoolWorkspaceStrategy in _stack_lifecycle_registry.py (symlinks for node_modules/.venv at root and apps/* plus Pods, and per-slot APFS cow_copy for target/.gradle/.build/.astro, lint/test caches, plugin android/ state, .dart_tool trees, and local secrets — never symlinking .dart_tool); d3nexus worktree-gc (dry-run by default) reclaims ghost, merged, and cache space:
python3 "$SKILL_DIR"/resources/scripts/manage_worker_pool.py init --epic-dir <epic_dir> --epic-slug <epic_slug>
Dispatch Role 2.3 with python3 scripts/dev_config.py dispatch --persona programmer --mode write --prompt-file <file> --cwd <slot> --log <log> --epic <epic_slug> --task <task_id> --slot <n>; the lease file agy_profile_leases.json records the agy profile in use. Exit code 2 means record a quota pending decision with the printed report and stop. Never hand-build the agy environment, substitute a lighter model, fall back or retry (checkpoint model_unavailable, record a blocker, stop); other personas use dev_config.py resolve <persona> (programmer default gemini-4-hydrogen-xhigh).
Autonomous Mode: lifecycle_runner.py dispatches itself (build_agy_command, start_new_session=True, SIGTERM/SIGKILL supervision, per-task logs).
.worktrees/<epic_dir>-slot-1 / -slot-2 share caches with the main worktree .worktrees/<epic_dir>.python3 "$SKILL_DIR"/resources/scripts/manage_worker_pool.py <cmd> --epic-dir <epic_dir> --epic-slug <epic_slug>): init [--wave <k>] | sync --slot <1|2> --task <task_id> [--wave <k>] [--status working|review|idle] [--no-reset] [--review-file <json>] [--blockers-file <json>] | triage-fix --slot <1|2> --task <task_id> [--record-tier2 --risk-level <MEDIUM|HIGH> --rationale "<text>"] | finalize-slot --slot <1|2> --task <task_id> [--wave <k>] [--mode <pass1-approved|tier2-short-circuit|pass2-complete>] [--risk-level <LOW>] [--rationale "<text>"] [--review-file <json>] | merge --slot <1|2> --task <task_id> | cleanup (keeps dirty/unmerged work)Wave Setup (Orchestrator): MANDATORY: read references/worker-execution-rules.md before dispatching or acting as a task-implementer (test assertion health, anti-bloat and tiered test execution; the Tri-Persona model; anti-rationalization and doubt-driven verification). Run compute_execution_order.py <epic_slug> --parallel, monitor estimate_heartbeat.py, and log wave (resume_context.py --epic <epic_slug> --wave <k> --state --status "In progress: Wave <k>"). For each task (max 2 per wave), run manage_worker_pool.py sync ... --slot <1|2> --task <task_id> --wave <k> --status working (single-worktree mode: sync_task_status.py task <task_id> in-progress), then dispatch the slot's task-implementers together: ONE dev_config.py dispatch-wave --persona programmer --mode write --jobs-file <wave.json> --epic <epic_slug> --wave <k> runs all of the wave's implementers concurrently (jobs {slot, task, prompt_file, cwd, log}; exit 2 as for dispatch); a one-task wave may use dispatch. Never run finalize-slot or merge while another slot of the wave is working (it can rewrite the shared heartbeat and drop that slot's counters); reviewing a returned slot may start meanwhile.
task-implementer (Role 2.3 — Mandatory Per-Task Mechanical Verification): Inside the slot, run check_code_impact.py (halt on 🔴 DIVERGENCE DETECTED; add characterization tests on ⚠️ UNPROTECTED CODE), write RED tests -> GREEN code, and execute the full mechanical Verification table (RED -> GREEN -> REGRESSION -> TIER-B -> TIER-C, covering touched module + Downstream Callers regression suites and TIER-B static checks across all Allowed files) via run_task_checks.py red and run_task_checks.py verify. Once run_task_checks.py verify passes, tick every - [ ] checkbox in ## Definition of Done to - [x] with a brief post-reference mechanical result summary (e.g. - [x] Criterion (V2, V3) — exit 0, 42 passed) and confirm run_task_checks.py status prints done gate: PASS (updating frontmatter to status: "done" or completedAt while any - [ ] remains is strictly forbidden and rejected by the validators). If needs_review (step 2 below) is false and done gate: PASS, finalize directly: sync_task_status.py task <task_id> done, git status, git add -A, commit [EPIC_NAME] <task_title> (no trailers). When needs_review is true, leave changes uncommitted (finalized: false) so run_task_checks.py patch_id stays valid. Return the JSON summary, then --checkpoint subagent_returned.
task-reviewer (Role 2.1, fresh read-only subagent — Selective LLM Review): LLM review does not run repeatedly on small, purely mechanical tasks (avoiding review bottlenecks); it is dispatched by the Orchestrator only at semantic/architectural boundaries or when Selective Gating triggers, after sync ... --status review (Pass 1 captures pre-fix pass1_tree_sha). Audits diff + AST + Zero Fakery + ticked [x] Definition of Done items via run_task_checks.py status and check_bdd_traceability.py only; never edits or commits. Pass 1 (--review-pass 1) audits comprehensively under the Blocker-Only rubric (BLOCKER triggers CHANGES_REQUESTED; minor nits are NON_BLOCKING_OBSERVATION in "observations" with "verdict": "APPROVED"). Empty blockers with done_gate: "PASS" coerces to APPROVED. On APPROVED, Orchestrator calls manage_worker_pool.py finalize-slot ... --mode pass1-approved.
Merge & Cleanup (Orchestrator): see steps 4–5 below (then --checkpoint wave_merged); cleanup before Phase 4; revisions use package_epic.py --revise --reason "<text>" <epic_dir>.
[!CRITICAL]
🎯 MANDATORY 100% BDD-TO-TEST TRACEABILITY RULE
100% Scenario Traceability: Every single BDD scenario authored in Phase 1 MUST map directly to at least one concrete automated test function or test block.
Tier Separation:
[Tier A - Unit]covered 100% by unit tests;[Tier C - Integration]split into mandatory fast host/VM subcutaneous Tier C1 (< 5s) and# tier: C2+Needs:-gated simulator/emulator/device/Playwright Tier C2 (TierCTaxonomy). Mocks do NOT substitute for Tier C integration tests.BDD Automation (Tier C, all platforms): For every identifier on task's
Covers:line, author at least one integration test under HLD'sIntegration test roots, carrying the identifier in test name, description, or tag.Gate to Done:
python3 "$SKILL_DIR"/resources/scripts/run_task_checks.py red <task mirror> # before implementing (exits 0 on expected fail) python3 "$SKILL_DIR"/resources/scripts/run_task_checks.py measure <task mirror> [--timeout 7200] [--resume] # for tasks with MEASURE rows python3 "$SKILL_DIR"/resources/scripts/run_task_checks.py verify <task mirror> # after last change (runs GREEN, REGRESSION, TIER-B, TIER-C) # After verify passes: tick every `- [ ]` in `## Definition of Done` to `- [x]` with a brief mechanical result note (e.g. `exit 0, 42 passed`) python3 "$SKILL_DIR"/resources/scripts/run_task_checks.py status <task mirror> # prints done gate: PASS (fails if any `- [ ]` remains)Never edit
.devtool/epic/<epic_dir>/evidence/<task_id>.jsonby hand.sync_task_status.py task <id> donerefuses unless evidence matches tree and table and every## Definition of Donecheckbox is ticked[x]. When task hasCovers:line, run traceability check (exit 0):SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.md"; [ -f "$SCENARIOS" ] || SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.en.md" python3 "$SKILL_DIR"/resources/scripts/check_bdd_traceability.py tests \ --scenarios "$SCENARIOS" \ --roots <Integration test roots from the HLD> \ --ids <identifiers on the task's Covers: line>Failure-Set Baseline & Regression Comparison: When isolating pre-existing test failures before making changes or comparing regression deltas:
python3 "$SKILL_DIR"/resources/scripts/record_failure_baseline.py \ --cmd "<test-command>" \ --out .devtool/epic/<epic_dir>/evidence/baseline.txt \ [--restore <path>] python3 "$SKILL_DIR"/resources/scripts/compare_failure_sets.py \ --baseline .devtool/epic/<epic_dir>/evidence/baseline.txt \ --current .devtool/epic/<epic_dir>/evidence/current.txt \ [--rerun-new] [--allow-isolated-pass]Task Text Replay: To replay structured directives (
Create,Replace in,Insert in) and test verification rows:python3 "$SKILL_DIR"/resources/scripts/replay_task_text.py <task.md> [--worktree <dir>] [--run-rows]Stop and Report: A
Stop and Report Ifcondition in task is reported asBLOCKED. Never edit Verification table, Definition of Done, Allowed files or Covers line, or protected path, to force a pass. In Satellite Mode, reportBLOCKEDif an unmerged upstream contract change prevents local tests from passing.
Selective task-reviewer Gating: needs_review is true when review_tier: "full" is in frontmatter, labels include security, architecture, concurrency, or contract, or > 2 non-test modules change. The Orchestrator recomputes the module count with git -C <slot> diff --name-only <base>..<head_sha> and dispatches task-reviewer on mismatch.
Fix Loop & Two-Tier Risk Assessment Gate (max_task_review_passes = 2, max_fix_passes = 1):
CHANGES_REQUESTED with >= 1 BLOCKER in Pass 1, the Orchestrator runs sync ... --status working --no-reset --review-file <p1.json> (fix = 1) and dispatches Role 2.3 task-implementer with pass1_blockers only (run_task_checks.py verify, uncommitted).triage-fix): Run manage_worker_pool.py triage-fix <epic> --slot <N> --task <id> against pass1_tree_sha (uses suffix-scoped TriageSurfaceRegistry from _stack_lifecycle_registry.py).RiskAssessment): When tier1_status == "ELIGIBLE_FOR_SHORT_CIRCUIT" (<= 30 non-test changed lines, zero sensitive-surface/test-weakening triggers), Role 2.2 evaluates bounded_diff vs. pass1_blockers in-place: LOW calls finalize-slot --mode tier2-short-circuit --risk-level LOW --rationale "<1-2 sentences>" (runs internal read-only mechanical status gates, logs audit note, marks done, commits, merges, skipping Pass 2); MEDIUM/HIGH runs triage-fix --record-tier2 and enters Pass 2.HIGH_RISK or Tier 2 MEDIUM/HIGH): Run sync ... --status review (review = 2) and dispatch fresh Role 2.1 task-reviewer (--review-pass 2 --pass1-tree-sha <sha> --blockers-file <p1_blockers.json>; DIRECT_REGRESSION only, zero new nitpicks). Once Pass 2 completes with green mechanical gates, run finalize-slot --mode pass2-complete --review-file <p2.json> (commits, marks done, merges, logs residual remarks to review_audit_notes.jsonl, zero Fix Pass 2).Merge: Once finalized (implementer finalized: true when needs_review == false -> manage_worker_pool.py merge, or finalize-slot after review/short-circuit), the slot merges into epic/<epic_slug> and resets to idle.
Log: After merge, the Orchestrator logs state (resume_context.py --log --epic <epic_slug> --task <task_id> --request "<summary>" --action "<verify status>" and resume_context.py --state --epic <epic_slug>, which syncs window.title).
If implementation diverged from HLD, perform Phase 3 Doc Sync before next task.
Integrate with develop (only when base branch moved). First check locally whether <base_ref> (develop) has any commits not in HEAD (git rev-parse develop != $(git merge-base HEAD develop)). If develop has not moved since the worktree branched, skip per-task rebase/verify-tier and proceed immediately to the next task (full integration runs at Stage 4). When develop has moved and no slot is working, the Orchestrator runs preflight from the epic worktree after merge, then dispatches a Role 2.3 subagent for rebase, conflict resolution and verify-tier:
python3 "$INTEGRATE" preflight --base develop
python3 "$INTEGRATE" rebase --base develop
python3 "$INTEGRATE" verify-tier --base develop
[EPIC_NAME] Fix integration with develop after <task_title>.Only when Phase 2 flags divergence:
<epic_dir>.md only.git commit -m "[EPIC_NAME] Sync HLD after <task_title>" -m "- <diagram or section updated>"
Once every task is done, a fix is never made by reopening a task. Make it as its own commit on the epic branch, titled [EPIC_NAME] Fix <what>. Do not move a done task back, and do not re-record its evidence. audit_epic.py lists these commits under "Commits outside tasks". After fixes, run Phase 4 again in full on the new SHA.
gate4-verifier Subagent)Once every task is done and slots are cleaned up, the Orchestrator dispatches a fresh Role 2.3 gate4-verifier (never the round's implementer, reviewer or fixer) to run steps 0–5 twice: as the Pre-Review Gate with --profile pr before /cross-model-review, and as Gate 4 with --profile epic once after convergence. It edits no code; on failure it returns FAIL, and the Orchestrator dispatches a fixer, then a new verifier. PASS counts only when candidate_sha == git rev-parse HEAD, the tree is clean, and the @quality_check report is bound to that SHA (orchestration-roles.md):
python3 "$SKILL_DIR"/resources/scripts/generate_smoke_checklist.py --epic-dir <epic_dir>
git add .devtool/epic/<epic_dir>/manual_smoke_checklist.md
git commit -m "[EPIC_NAME] Generate manual smoke walkthrough checklist"
Resolve candidate SHA (git rev-parse HEAD) on a clean tree:
.devtool/epic/<epic_dir>/review_results.md exists:
python3 "$SKILL_DIR"/resources/scripts/run_external_review.py check --epic-dir <epic_dir>
Exit 1 means unresolved finding: record decision or make Fix commit, then restart Phase 4 in full.python3 "$SKILL_DIR"/resources/scripts/audit_epic.py --epic-dir <epic_dir> --base <base_ref>
Must exit 0. Keep output for Phase 4.1.Integration results: line of HLD Integration Test Plan.check_bdd_traceability.py tests --results over those reports:
SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.md"; [ -f "$SCENARIOS" ] || SCENARIOS=".devtool/epic/<epic_dir>/bdd_scenarios.en.md"
python3 "$SKILL_DIR"/resources/scripts/check_bdd_traceability.py tests \
--scenarios "$SCENARIOS" \
--roots <Integration test roots from the HLD> \
--results <reports written by Integration results commands>
Must exit 0: every scenario in bdd_scenarios.md (legacy bdd_scenarios.en.md) is covered by at least one passing integration test. --roots and --ids accept space- or comma-separated values.@quality_check on the same SHA:
profile: "epic" for Gate 4 ("pr" for the Pre-Review Gate)base_ref: <base_ref>repository_sha: Candidate commit SHA from git rev-parse HEAD🟢 LGTM. The Pre-Review Gate writes a pr receipt, which review requires at round 1 (--no-receipt-check bypasses) and which can never be certified. Once steps 1–5 all pass with --profile epic on the clean candidate SHA, certify build/quality/gate4_receipt.json (gate4_complete=true) with:
python3 skills/quality_check/resources/scripts/verify_polyglot_registry.py --mark-gate4-complete --base-ref <base_ref>
MANDATORY: read references/gate4-semantic-integrity.md before running or judging Gate 4. Gate 4 rejects test fakery with FAIL: No Reconstructed Logic and Immutable Real Artifacts.
The loop invariant is Pre-Review Gate PASS → Automated Cross-model review → Gate 4 in full (or < 2s Code-Tree Equivalence Fast-Path on metadata-only convergence) → Finish → Gate 5.
On Pre-Review Gate PASS:
python3 scripts/resume_context.py --state --epic <epic_slug> --status "Stage 3: Cross-Model Review"; do not record Gate 4 yet.d3nexus:cross-model-review in epic worktree with clean tree (--auto-quota walks nested (provider, profile) pairs across Claude -> Codex -> Kiro -> Argon, 3-Round Funnel, max 3 rounds; unlike persona dispatch's no-fallback rule, external review exhausts all eligible pairs and exits 3 only when all are spent — on exit 3, checkpoint quota_low/model_unavailable, record --pending-decision, and stop before triage):python3 "$SKILL_DIR"/resources/scripts/run_external_review.py run \
--epic-dir <epic_dir> --base <base_ref> --auto-quota
0/1 (completed verdict round written), commit review_results.md ([EPIC_NAME] Record cross-model review round N), run python3 "$SKILL_DIR"/resources/scripts/run_external_review.py triage --epic-dir <epic_dir>, and inspect ## Auto-Triage Gate:
AUTO_PASS_CLEAN / AUTO_PASS_FINAL_MINOR_SWEEP / AUTO_FIX_ELIGIBLE: In AUTO MODE (Gate 2 Triển khai (tự động) or lifecycle_runner.py), never pause for developer confirmation between rounds; the Orchestrator routes by risk: low risk -> Role 2.3 review-fixer fast-track; high risk (any Critical, escalation marker, or the same Gate 4 check failing twice) -> Role 2.1 fix-planner (--mode read-only), whose fix_plan_round<N>.md is PLANNED (review-fixer runs apply-plan) or ESCALATE (--pending-decision, stop for Role 1.0). The fixer runs Tier 1 scoped tests only (use the 6-stack platform-mapped command table in references/worker-execution-rules.md), commits [<EPIC_NAME>] Fix <what>, records fixed in <sha> in review_results.md, and returns the review-fixer summary; the Orchestrator checks git diff --name-only <pre_sha>..HEAD for out-of-scope paths. On convergence:
< 2s): When Cross-Model Review converges with only REBIND_ALLOWED_METADATA_PATTERNS (review_results.md, ledgers, docs/) commits since verified_code_sha on a certified gate4_complete=true receipt and clean git status --porcelain -uall, verify run_external_review.py check --epic-dir <epic_dir> and audit_epic.py --epic-dir <epic_dir> --base <base_ref>, then run python3 skills/quality_check/resources/scripts/verify_polyglot_registry.py --rebind-if-code-unchanged --profile epic --base-ref <base_ref> to re-bind gate4_receipt.json to HEAD.epic receipt exists, any code, test, or epic BDD/task contract file changed, or --rebind-if-code-unchanged returns REBIND_INELIGIBLE, a fresh gate4-verifier runs Gate 4 in full (--profile epic) and stamps --mark-gate4-complete. Details: orchestration-roles.md.CIRCUIT_BREAKER_HALT: Halts cleanly via --pending-decision on CRITICAL_CONFLICT, SHARED_CONTRACT_CONFLICT, FIX_LOOP, or Critical findings surviving Round 3./cross-model-review completes (converged with 0 Critical findings) and Gate 4 passes on the latest candidate SHA, record it via python3 scripts/resume_context.py --gate 4 --epic <epic_slug> --approved "Gate 4 PASS (<candidate_sha>)":
## Top 3 Highest-Risk Findings (Executive Report).Once /cross-model-review has converged, @quality_check reports 🟢 LGTM on candidate SHA, and all tasks completed:
task_*.md files MUST remain in .devtool/features/done/ until the user chooses Merge or Push & PR.@quality_check verdict, BDD matrix, audit disclosure sections (Evidence, Protected paths, Commits outside tasks, Gate 5 items), and synthesized ## Top 3 Highest-Risk Findings (Executive Report)./finishing-a-development-branch Menu Combined): Record Choice A decision (python3 scripts/resume_context.py --pending-decision "Gate 5 Kanban review and Stage 4 finish option" --decision-kind gate_5 --epic <epic_slug>) and stop calling tools immediately — present Gate 5 status together with the Stage 4 integration options in one prompt (do NOT ask a separate "reply to proceed" confirmation before showing the Finish options):
"Epic
<epic_slug>tasks complete,@quality_check🟢 LGTM, Cross-model review converged; tasks remain in.devtool/features/done/. Choose how to finish (Gate 5 sign-off + Stage 4 integration):
- Merge back to
<base-branch>locally- Push and create a Pull Request
- Keep the branch as-is (I'll handle it later)"
--gate 5 (clears the pending decision automatically) and proceed directly to Phase 5 without re-presenting Step 4 of finishing-a-development-branch.Only after user picks their Finish option in Phase 4.1:
d3nexus:finishing-a-development-branch on epic branch (base = develop), proceeding directly to Step 5 for the user's chosen option (skipping duplicate Step 4 menu).
Pre-Finish Archival Hook executes automatically:
python3 skills/dev-implementation/resources/scripts/sync_task_status.py archive-done
This sets Epic Status to Done, moves completed task_*.md files into .devtool/epic/<epic_dir>/, updates links, and commits archival before merge or PR.Required workflow skills:
develop as base ref).references/entry-point-and-resume.md (opens in a new tab)references/external-review-prompt.md (opens in a new tab)references/gate4-semantic-integrity.md (opens in a new tab)references/local-review-checklists.md (opens in a new tab)references/local-review-platforms.md (opens in a new tab)references/local-review-prompt.md (opens in a new tab)references/local-review-setup.md (opens in a new tab)references/principal-review-prompt.md (opens in a new tab)references/principal-review-rules.md (opens in a new tab)references/review-rules.md (opens in a new tab)references/review-triage.md (opens in a new tab)references/worker-execution-rules.md (opens in a new tab)resources/scripts/_epic_docs.py (opens in a new tab)resources/scripts/_stack_lifecycle_registry.py (opens in a new tab)resources/scripts/audit_epic.py (opens in a new tab)resources/scripts/bootstrap_worktree.sh (opens in a new tab)resources/scripts/check_bdd_traceability.py (opens in a new tab)resources/scripts/check_epic_readiness.py (opens in a new tab)resources/scripts/check_task_contract.py (opens in a new tab)resources/scripts/compare_failure_sets.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
72 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.npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexusOther plugins' skills for the same job