with one click
doyaken
// Orchestrate the full Doyaken ticket lifecycle from planning through PR completion.
// Orchestrate the full Doyaken ticket lifecycle from planning through PR completion.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | doyaken |
| description | Orchestrate the full Doyaken ticket lifecycle from planning through PR completion. |
Orchestrate the full ticket lifecycle from planning through completion.
/doyakenThe terminal dk lifecycle runs phases in the same Claude Code session. Each phase has an audit loop that critically reviews the work before allowing completion; when the phase passes, the Stop hook injects the next phase instructions directly into the current session.
/dkplan โ gather context from the configured tracker (see doyaken.md ยง Integrations), draft implementation plan, create tasks.dk lifecycle, stop once immediately after approval so the Stop hook can audit the plan and inject Phase 2 in the same session. Do not tell the user to run /dkimplement./doyaken interactively without the wrapper, output PHASE_1_COMPLETE when the user approves.prompts/ticket-instructions.md (branch rename, branch push, ticket status โ In Progress) cannot run during Phase 1. If they have not already been done, run them now. Do NOT create the draft PR here โ that happens in Phase 5 (/dkpr) once the implementation has been committed.skill: "dkimplement" โ work through tasks with TDD discipline. Do NOT pause between bootstrap setup and implementation to ask the user for permission; the plan approval was the go-ahead. The user can interrupt at any time if they want to redirect./dkuicapture before Phase 2 completes. Capture screenshots/traces, record video for interactive flows, and link the artifacts from Doyaken's artifact directory.PHASE_2_COMPLETE when all tasks are implemented and the evidence table shows all criteria MET./dkreviewloop to run the adversarial 3-clean-pass review loop./dkreviewloop iteration runs /dkreview --single-pass in a fresh review subagent.SUCCESS.PHASE_3_COMPLETE when review is clean./dkverify โ format, lint, typecheck, generate, test./dkcommit โ atomic conventional commits, push to origin.PHASE_4_COMPLETE when all checks pass and code is pushed./dkpr โ generate PR description, create draft PR, attach request-type reviewers from doyaken.md ยง Reviewers, update tracker if available.@mention comments โ Phase 6 owns those steps so reviewers are notified at exactly the right moment.PHASE_5_COMPLETE when the draft PR is created and reviewers are attached.## Reviewers from doyaken.md. On the first cycle: gh pr ready, re-sync request reviewers (idempotent), post one @mention comment listing all mention reviewers./loop 2m /dkwatchci and /loop 5m /dkwatchpr.DOYAKEN_COMPLETE_WAIT_MINUTES minutes (default 30) per cycle. The Stop hook re-injects the audit and only authorizes outcome evaluation once the window has elapsed.request reviewers and post a fresh mention comment so reviewers know there's something new.DOYAKEN_COMPLETE_MAX_CYCLES (default 3) idle cycles with no progress, escalate to the user.request reviewers have approved, run /dkcomplete's final verification โ update tracker to Done, print summary.DOYAKEN_TICKET_COMPLETE once verification passes.If the session is interrupted, dk 999 or dk --resume picks up from the saved phase. Phase tracking is handled by the dk shell lifecycle (see dk.sh __dk_run_phases), which persists the current phase number in ~/.claude/.doyaken-phases/<session_id>.phase. The Stop hook is responsible for advancing phases in-session by updating phase state and injecting the next phase message and audit prompt.
As a fallback (e.g., when running /doyaken interactively without the wrapper), the agent can infer the correct phase by checking current state:
Check for existing PR: gh pr view --json state,isDraft,statusCheckRollup
Check task list: If tasks exist from a prior /dkplan, offer to resume from the first incomplete task rather than re-planning.
Check ticket state (if tracker configured):
| Phase | Trigger | Action |
|---|---|---|
| 1 | Plan ready | Present plan, wait for approval |
| 2 | Ambiguous requirement | Present options, ask user to choose |
| 2 | Scope change needed | Explain impact, ask approval |
| 2-5 | Normal phase completion | Stop once; the Stop hook injects the next phase automatically |
| 5 | Draft PR created | Stop; Phase 6 takes over automatically |
| 6 | CI secrets scan failure | Cancel all loops, alert immediately |
| 6 | 3 failed CI fix attempts | Cancel loops, escalate with details |
| 6 | Architectural review comment | Cancel loops, escalate to user |
| 6 | Max cycles reached idle | Escalate to user (no progress) |
When the session is started by dk, a Stop hook prevents premature exit and injects a phase-specific audit prompt. Activation is signaled via an .active file in ~/.claude/.doyaken-loops/ (and optionally the DOYAKEN_LOOP_ACTIVE=1 env var as a belt-and-suspenders mechanism). Each phase has its own quality criteria โ the loop continues until the audit is satisfied. This enables quality-gated autonomous execution:
/dkverify fails โ fix and retry automatically/dkreviewloop finds issues โ fix and re-review automaticallyThe loop continues until:
DOYAKEN_TICKET_COMPLETE when ALL of these are true:
Only output DOYAKEN_TICKET_COMPLETE when you have verified:
gh pr view --json state,mergedAt,statusCheckRollup shows all checks passedEven in autonomous mode, STOP and escalate to the user for:
/doyaken.