with one click
dkimplement
// Execute the approved implementation plan with TDD discipline and completeness verification.
// Execute the approved implementation plan with TDD discipline and completeness verification.
| name | dkimplement |
| description | Execute the approved implementation plan with TDD discipline and completeness verification. |
Execute the approved plan, working through tasks with TDD discipline.
/dkplanBefore starting, read the implementation guardrails from prompts/guardrails.md. Apply them throughout.
If .doyaken/learnings.md exists, read it โ it contains conventions, failure patterns, and interface details discovered during earlier tasks in this session that may save you time.
For each task in the approved plan:
TaskUpdate(task_id, "in_progress")TaskUpdate(task_id, "completed").doyaken/ in SyncAfter completing each task, check if your changes require updating project documentation in .doyaken/:
.doyaken/doyaken.md ยง Tech Stack or Quality Gates.doyaken/rules/*.md file.doyaken/guards/.doyaken/doyaken.md ยง IntegrationsOnly update when the change is meaningful and lasting โ don't document one-off implementation details.
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 (e.g., PHASE_2_COMPLETE). Simply halt and wait for user input. The phase audit loop will detect that the completion signal file was not written and keep the session alive. Once the user provides direction, resume implementation from where you left off.
Update the ticket via the configured tracker (see doyaken.md ยง Integrations) with the scope change details. If no tracker is configured, inform the user in conversation.
After all tasks are completed, run a two-perspective review to catch issues you may have missed:
Step 1 โ Your own 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 โ Independent review via self-reviewer agent:
Spawn the self-reviewer agent with:
The agent reviews independently and produces its own findings report.
Step 3 โ Merge inventories: Combine your findings (Step 1) with the agent's findings (Step 2). Deduplicate by file:line. The union is the master inventory.
Step 4 โ Batch fix: Fix all items from the merged inventory in severity order (high first).
Step 5 โ Re-verify: Re-spawn the self-reviewer agent to verify fixes against the FULL change set (not just fixed files). If new findings emerge, fix and re-spawn. Maximum 3 total agent spawns.
Step 6 โ 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 is blocked unless every acceptance criterion and verification gate is exactly MET. Treat NOT MET, NOT FOUND, DEFERRED, SKIPPED, BLOCKED, N/A, "CI will cover it", "port busy", "tool unavailable", or equivalent as a blocker unless the user explicitly approved a plan change. If a local port is busy, use another port or stop the conflicting process and rerun the required check; do not defer required Phase 2 verification to future CI.
Before declaring PASS, confirm that no self-reviewer, implementation helper, UI capture, test runner, dev server, or other Phase 2 background process/agent is still in flight.
If the final agent result is PASS and the evidence table has zero NOT FOUND entries: implementation is complete. When run via dk, the next phase (Review) follows automatically after the Stop hook audits this phase.
After the self-review loop passes (Step 4 produces PASS with 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 /dkreview from Phase 2; the dedicated Phase 3 /dkreviewloop handles adversarial review after implementation is complete.
If the change affects browser UI, invoke the dkuicapture skill before Phase 2 completes. Capture desktop/mobile screenshots, Playwright traces, and video for interactive flows. Artifacts must stay in Doyaken's artifact directory and must not be committed. Add absolute links to screenshots, videos, traces, and logs to the implementation evidence.
If no browser UI changed, add UI capture: N/A โ no UI-affecting files changed to the evidence.
When running inside a terminal dk lifecycle (DOYAKEN_SESSION_ID is present), write the Phase 2 ready marker only after all of these are true:
MET.source "${DOYAKEN_DIR:-$HOME/work/doyaken}/lib/common.sh"
touch "$(dk_phase_ready_file "${DOYAKEN_SESSION_ID:-$(dk_session_id)}" 2)"
Do not write this marker early. The Stop hook ignores PHASE_2_COMPLETE without it.
During implementation (Phase 2), you MUST NOT:
git commit or git push (that is Phase 4: Verify & Commit)gh pr (that is Phase 5: PR)dk)You SHOULD:
/dkuicapture for UI-affecting changes and link the artifacts.doyaken/ project docs if your changes require it[HINT] Download the complete skill directory including SKILL.md and all related files