用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mitchellfyi/dex --skill dximplement命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Orchestrate the full Dex ticket lifecycle from planning through PR completion.
Run independent full-scope Dex review waves until the selected risk tier's consecutive clean-pass gate succeeds.
Generate or update a PR description, create new pull requests as drafts by default, and attach request-type reviewers.
正在显示 SKILL.md
| name | dximplement |
| description | Execute the approved implementation plan with TDD discipline and completeness verification. |
Execute the approved plan, working through tasks with TDD discipline.
In terminal dx Phase 2, start by validating and reading
dx_review_criteria_file "$DEX_SESSION_ID". It is the portable copy of the
approved objectives, acceptance criteria, and verification requirements that
Phase 3 will receive. Do not delete, weaken, or silently reinterpret it. If the
user approves a plan change during implementation, atomically replace the
artifact with the updated approved requirements, validate it, and rotate the
approval seal explicitly:
SESSION_ID="${DEX_SESSION_ID:-$(dx_session_id)}"
CRITERIA_FILE="$(dx_review_criteria_file "$SESSION_ID")"
PREVIOUS_CRITERIA_HASH="$(dx_review_read_criteria_approval "$SESSION_ID")" || exit 1
# Atomically replace CRITERIA_FILE here with the newly reapproved requirements.
CRITERIA_HASH="$(dx_review_criteria_hash "$CRITERIA_FILE")" || exit 1
dx_review_approve_criteria "$SESSION_ID" reapproved "$PREVIOUS_CRITERIA_HASH" "$CRITERIA_HASH" || exit 1
Rotation clears earlier risk selection, clean credit, and receipts. Re-run the Phase 3 risk selection against the final scope afterward.
/dxplanBefore starting, read the implementation guardrails from prompts/guardrails.md. Apply them throughout.
If .dex/memory/index.md exists, read it and load only the memory entries
whose scope matches the approved plan, changed files, or current phase. Treat
memory as useful context, not proof: re-check current code before relying on an
old lesson.
Before editing UI-affecting files, invoke dxuicapture to make the visual-proof decision. Capture when a short walkthrough would materially help a reviewer; otherwise record SKIPPED with a concrete reason, or N/A when there is no browser-rendered impact. If capture is selected, record the representative baseline before UI edits whenever it is meaningful and reproducible. Do not synthesize a before state; use the skill's after_only contract and explain why when the feature had no useful baseline.
Before writing implementation code, map the test surface for the approved plan:
For each task in the approved plan:
TaskUpdate(task_id, "in_progress")TaskUpdate(task_id, "completed").dex/ in SyncAfter completing each task, check if your changes require updating project documentation in .dex/:
.dex/dex.md § Tech Stack or Quality Gates.dex/rules/*.md file.dex/guards/.dex/dex.md § Integrations/dxsync --dry-run or record the candidate in the implementation summary so dx sync can promote it through a reviewable .dex/memory/domains/ diffOnly update when the change is meaningful and lasting — don't document one-off implementation details.
Do not create .dex/learnings.md; raw observations are not trusted memory.
If during implementation you discover:
When running non-interactively (no user to respond — e.g., -p mode, automated harness, or if the user is unavailable): do NOT stop on ambiguity. Instead, choose the most comprehensive reasonable interpretation and document your assumptions in a README. Specifically:
Non-interactive mistakes to avoid (these cause the most quality failures):
When stopping for scope changes, do not output a completion promise (for
example, PHASE_2_COMPLETE), write a completion receipt, or create the Phase 2
ready marker. Halt and wait for user input. If a non-interactive run cannot get
that input after two materially different recovery strategies, use only the
exact generation-bound escalation command supplied for the current launch or
audit. It pauses the run without claiming completion. Once the user provides
direction and resumes the phase, continue from the approved scope.
Update the ticket via the configured tracker (see dex.md § Integrations) with the scope change details. If no tracker is configured, inform the user in conversation.
After all tasks are completed, run a focused implementation inventory to catch issues before the dedicated Phase 3 review loop takes over.
Step 1 — Build the inventory (find only, no fixes):
Walk through all changed files and build a numbered findings list. For each file, check: correctness (try to break it), design (workarounds, complexity), documentation (non-obvious logic explained?), and consistency (patterns match across files). Record each issue as [INV-N] file:line | description. Do NOT fix anything yet.
Step 2 — Batch fix: Fix all items from the inventory in severity order (high first).
Step 3 — Re-verify: Re-run the inventory against the FULL change set (not just fixed files). If new findings emerge, fix them and re-run the inventory.
Step 4 — Evidence table: Before declaring PASS, produce an acceptance criteria evidence table:
| # | Criterion | Implementation (file:line) | Test (test:line) | Status |
|---|
Every criterion must have status MET with specific file:line evidence. Any NOT FOUND blocks completion.
Use a plain GitHub Markdown table or short bullets. Do not use Unicode box-drawing tables; they wrap poorly in Claude Code transcripts.
Completion defaults to requiring every acceptance criterion and verification
gate to be exactly MET. Treat NOT MET, NOT FOUND, DEFERRED, SKIPPED,
BLOCKED, N/A, "CI will cover it", "port busy", "tool unavailable", or an
equivalent result as unresolved. Resolve it, ask the user for a plan change, or
apply a reasoned phase waiver under the shared guardrails. Never relabel a
waived or unverified result as MET. If a local port is busy, normally use
another port or stop the conflicting process and rerun the check.
Before declaring PASS, confirm that no implementation helper, UI capture, test runner, dev server, or other Phase 2 background process is still in flight.
If the final inventory is empty and the evidence table has zero NOT FOUND
entries: implementation is complete. When run via dx, the next phase (Review)
follows automatically after the Stop hook audits this phase.
After the implementation inventory passes and the evidence table has zero NOT
FOUND entries, run the project's relevant deterministic checks one more time and
update the evidence table with final pass/fail status. Do not invoke /dxreview
from Phase 2; the dedicated Phase 3 /dxreviewloop handles adversarial review
after implementation is complete.
Invoke dxuicapture before Phase 2 completes and record one outcome:
READY: link the short walkthrough, poster, editable storyboard, transcript, and manifest. The structured path should show the representative flow, use before/after parity or a truthful after-only reason, include captions, and remain under 90 seconds.SKIPPED: explain why a produced visual artifact would not improve this review. This is a valid agent judgment, not a failed gate.N/A: explain why no browser UI is affected.Use NEEDS_REVIEW while a selected capture is incomplete or needs another production pass. Do not leave the decision MISSING. Artifacts stay in Dex's temporary artifact directory and must not be committed. Run dx ui-capture show after the baseline and after production so the user sees the handoff path early.
A green test suite is not the same as a working feature. Before marking Phase 2 ready, exercise the change end-to-end the way a human reviewer would — run it locally and watch it actually work.
dxuicapture for web apps), then drive the real user-facing path this ticket changed.mcp__claude-in-chrome__*) when a live browser is available; otherwise fall back to Playwright (the Playwright MCP, or the pinned install dxuicapture provisions with dx ui-capture install). For non-UI changes, exercise it the matching way: hit the endpoint, run the command, trigger the job, or call the public API against a running instance.Manual smoke test: N/A — <reason> instead of silently skipping it; the reason must clear the same bar as any other N/A (see the blocker rule above).After the final in-scope edit and verification run, use
prompts/review-risk-assessment.md as the source of truth. Its first matching
rule wins:
complex when the scope touches a trust boundary; authentication,
authorization, permissions, secrets, payments, or destructive behavior;
persistence, schemas, or migrations; public API, CLI, configuration, or
compatibility contracts; concurrency or process lifecycle; hooks, guards,
CI, deployment, or packaging; broad cross-module behavior; or a concrete gap
in the supplied scope or verification that leaves material behavior
unbounded.small only when every change is localized and mechanically direct,
impact is narrow, focused verification is available, and no complex
condition applies.normal for everything else.Record one or more comma-separated lowercase reason codes from this set:
localized-change, focused-verification, bounded-production-change,
cross-module, public-contract, security-sensitive, data-migration,
concurrency, shell-hooks-ci, deployment-packaging, broad-impact, and
uncertain-coverage. Do not use free-form prose, paths, source excerpts,
prompts, or secrets.
Follow the tier-specific reason combination rules in the assessment prompt. An allowed code paired with a contradictory tier is invalid.
In a terminal dx lifecycle, persist the selection against the current scope
fingerprint:
source "${DEX_DIR:-$HOME/work/dex}/lib/common.sh" || exit 1
SESSION_ID="${DEX_SESSION_ID:-$(dx_session_id)}"
REVIEW_TIER="<small|normal|complex>"
REVIEW_REASON_CODES="<comma-separated-reason-codes>"
dx_review_write_selection "$SESSION_ID" "$REVIEW_TIER" "lifecycle-agent" "$REVIEW_REASON_CODES" "$PWD"
The tier selects the trusted clean-wave policy from the committed default
branch. The defaults are 1 for small, 3 for normal, and 6 for complex;
repositories may configure monotonic values from 1 through 30 in .dex/dex.md
## Review Policy. The persisted selection is bound to that resolved policy.
Candidate-branch edits cannot lower the active gate, and the launch-only
DEX_REVIEW_CLEAN_PASSES value can only raise it. An attributed
dx control override review.clean-passes <1-30> may lower the effective target
without changing the trusted policy: the loop still requires that many genuine
clean waves, binds the receipt to the decision, and records Phase 3 as waived.
Use dx control waive review.clean-passes only when skipping the remaining
review gate entirely.
The selection is not a review pass. Rewrite it if any later Phase 2 edit changes the scope.
When running inside a terminal dx lifecycle (DEX_SESSION_ID is present), write the Phase 2 ready marker only after all of these are true:
MET, or the
phase has a named, reasoned waiver that will be recorded as a waiver.READY, SKIPPED with a reason, or N/A with a reason. Choosing SKIPPED is allowed when a walkthrough would not improve the review.small, normal, or complex Phase 3 risk selection is
recorded for the final current scope and bound to the trusted clean-wave
policy.source "${DEX_DIR:-$HOME/work/dex}/lib/common.sh" || exit 1
touch "$(dx_phase_ready_file "${DEX_SESSION_ID:-$(dx_session_id)}" 2)"
Do not write this marker early. The Stop hook ignores PHASE_2_COMPLETE without it.
Keep Phase 2 focused on implementation and its evidence. By default, Phase 4 owns final verification, commits, and pushes; Phase 5 owns pull-request work; and Phase 6 owns final ticket state. Commits, pushes, and pull-request actions are still permitted in Phase 2 when the user directs them or the active workflow requires them. Record what changed so the later phase can continue from the current repository and PR state.
During implementation, avoid unrelated lifecycle administration:
dx unless the user requests a different branch.You SHOULD:
/dxuicapture early, then capture a concise walkthrough or record a reasoned SKIPPED/N/A decision.dex/ project docs if your changes require it