project-template/.claude/skills/done-check/SKILL.md
Definition of Done gate — verify a story is truly DONE by checking tests, acceptance criteria, business value proof, and user journey steps. Role-aware depth controlled by CK_USER_ROLE env var.
npx skillsauth add adrien-barret/claude-kit done-checkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Definition of Done (DoD) gatekeeper. Your job is to verify that a completed story meets ALL requirements before it can be marked as DONE.
Read the CK_USER_ROLE environment variable to determine check depth:
| CK_USER_ROLE | Checks performed |
|---|---|
| dev | Tests pass + acceptance criteria met |
| po | Dev checks + business value proof (so_that) |
| qa | Dev checks + user journey step verification |
| all (or unset) | All checks combined |
If $ARGUMENTS contains a story ID or file path, use it. Otherwise, look for:
.claude/ralph-prd.json (active story)Extract from the story:
Run the project's test suite:
# Adapt to the project stack
go test ./... # Go
npm test # Node
pytest # Python
cargo test # Rust
All tests MUST pass. If any test fails, stop and report NOT DONE.
For each acceptance criterion in the story:
Only when CK_USER_ROLE is po or all (or unset).
so_that field from the story definitionmcp__claude-in-chrome__take_screenshot if available)Do NOT accept vague claims like "it works" or "tests pass" as proof of so_that. The proof must directly demonstrate the business value stated in the so_that field.
Only when CK_USER_ROLE is qa or all (or unset).
.claude/output/user-journey.mdFor each journey step, attempt to capture evidence:
mcp__claude-in-chrome__take_screenshot for UI-based steps## Done Check: {story-id} — {title}
### Verdict: DONE / NOT DONE
### Role: {CK_USER_ROLE or "all"}
### Dev Checks
| Check | Status | Evidence |
|---|---|---|
| Tests pass | PASS/FAIL | {test output summary} |
#### Acceptance Criteria
| # | Criterion | Status | Evidence |
|---|-----------|--------|----------|
| 1 | {criterion} | PASS/FAIL | {file:line or test name} |
### PO Checks (if applicable)
| Check | Status | Evidence |
|---|---|---|
| so_that: "{value statement}" | PASS/FAIL | {concrete proof or "no evidence provided"} |
### QA Checks (if applicable)
#### User Journey Steps
| # | Step | Status | Evidence |
|---|------|--------|----------|
| 1 | {step description} | PASS/FAIL | {screenshot, output, or test} |
### Blocking Issues (if NOT DONE)
- {issue}: {what needs to happen}
data-ai
Data-driven backlog prioritization using WSJF, RICE, value/effort matrix, and dependency analysis.
development
Build a traceability matrix from BMAD artifacts (problem.md, backlog.md, user-journey.md). Detects orphan tasks, orphan stories, and drift between task descriptions and story intent.
development
Generate unit and integration tests for project code. Use when new code is written or test coverage needs improvement.
testing
For each modified function, find or create its test, run it, and update it only if the function contract changed intentionally. Never silently adjust tests to make failures disappear.