kata-verify-work
npx skills add https://github.com/gannonh/kata-skills --skill kata-verify-work
Agent 安装分布
Skill 文档
Purpose: Confirm what Claude built actually works from user’s perspective. One test at a time, plain text responses, no interrogation. When issues are found, automatically diagnose, plan fixes, and prepare for execution.
Output: {phase}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /kata-execute-phase
<execution_context> @./references/verify-work.md @./references/UAT-template.md </execution_context>
@.planning/STATE.md @.planning/ROADMAP.md
<pre_flight> Run validation checks before starting verification:
# Validate config and template overrides
bash "../kata-doctor/scripts/check-config.sh" 2>/dev/null || true
bash "../kata-doctor/scripts/check-template-drift.sh" 2>/dev/null || true
If warnings are printed, relay them to the user before proceeding with verification. </pre_flight>
<step_7_5_pr_workflow>
7.5. Finalize Changes (pr_workflow only)
Read pr_workflow config:
PR_WORKFLOW=$(cat .planning/config.json 2>/dev/null | grep -o '"pr_workflow"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false")
If PR_WORKFLOW=false: Skip to offer_next.
If PR_WORKFLOW=true:
-
Check for uncommitted changes:
git status --porcelain -
If changes exist, stage and commit them:
git add -u git commit -m "fix({phase}): UAT fixes" -
Push to branch:
BRANCH=$(git branch --show-current) git push origin "$BRANCH" -
Check if PR exists:
PR_NUMBER=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number' 2>/dev/null) -
If PR exists, mark ready (if still draft):
gh pr ready "$PR_NUMBER" 2>/dev/null || true PR_URL=$(gh pr view --json url --jq '.url')
Store PR_NUMBER and PR_URL for offer_next. </step_7_5_pr_workflow>
<step_7_6_pr_review>
7.6. Run PR Review (pr_workflow only, optional)
After marking PR ready, offer to run automated review:
Use AskUserQuestion:
- header: “PR Review”
- question: “Run automated PR review before team review?”
- options:
- “Yes, run full review” â Run kata-review-pull-requests with all aspects
- “Quick review (code only)” â Run kata-review-pull-requests with “code” aspect only
- “Skip” â Proceed without review
If user chooses review:
- Invoke skill:
Skill("kata-review-pull-requests", "<aspect>") - Display review summary with counts: {N} critical, {M} important, {P} suggestions
- STOP and ask what to do with findings (see step 7.7)
If user chooses “Skip”: Continue to offer_next without review. </step_7_6_pr_review>
<step_7_7_handle_findings>
7.7. Handle Review Findings (required after review completes)
STOP here. Do not proceed to offer_next until user chooses an action.
Use AskUserQuestion with options based on what was found:
- header: “Review Findings”
- question: “How do you want to handle the review findings?”
- options (show only applicable ones):
- “Fix critical issues” â (if critical > 0) Fix critical, then offer to add remaining to backlog
- “Fix critical & important” â (if critical + important > 0) Fix both, then offer to add suggestions to backlog
- “Fix all issues” â (if any issues) Fix everything
- “Add to backlog” â Create issues for all findings without fixing
- “Ignore and continue” â Skip all issues
After user chooses:
Path A: “Fix critical issues”
- Fix each critical issue
- If important or suggestions remain, ask: “Add remaining {N} issues to backlog?”
- “Yes” â Create issues, store TODOS_CREATED count
- “No” â Continue
- Commit and push fixes
- Continue to offer_next
Path B: “Fix critical & important”
- Fix each critical and important issue
- If suggestions remain, ask: “Add {N} suggestions to backlog?”
- “Yes” â Create issues, store TODOS_CREATED count
- “No” â Continue
- Commit and push fixes
- Continue to offer_next
Path C: “Fix all issues”
- Fix all critical, important, and suggestion issues
- Commit and push fixes
- Continue to offer_next
Path D: “Add to backlog”
- Create issues for all findings using
/kata-add-issue - Store TODOS_CREATED count
- Continue to offer_next
Path E: “Ignore and continue”
- Continue to offer_next
Store REVIEW_SUMMARY and TODOS_CREATED for offer_next output. </step_7_7_handle_findings>
<anti_patterns>
- Don’t use AskUserQuestion for test responses â plain text conversation
- Don’t ask severity â infer from description
- Don’t present full checklist upfront â one test at a time
- Don’t run automated tests â this is manual user validation
- Don’t fix issues during testing â log as gaps, diagnose after all tests complete </anti_patterns>
<offer_next> Output this markdown directly (not as a code block). Route based on UAT results:
| Status | Route |
|---|---|
| All tests pass + more phases | Route A (next phase) |
| All tests pass + last phase | Route B (milestone complete) |
| Issues found + fix plans ready | Route C (execute fixes) |
| Issues found + planning blocked | Route D (manual intervention) |
Route A: All tests pass, more phases remain
Step 1: If PR_WORKFLOW=true, STOP and ask about merge BEFORE showing completion output.
Use AskUserQuestion:
- header: “PR Ready for Merge”
- question: “PR #{pr_number} is ready. Merge before continuing to next phase?”
- options:
- “Yes, merge now” â merge PR, then show completion
- “No, continue without merging” â show completion with PR status
Step 2: Handle merge response (if PR_WORKFLOW=true)
If user chose “Yes, merge now”:
gh pr merge "$PR_NUMBER" --merge --delete-branch
git checkout main && git pull
Set MERGED=true for output below.
Step 3: Show completion output
âââââââââââââââââââââââââââââââââââââââââââââââââââââ Kata ⺠PHASE {Z} VERIFIED â âââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase {Z}: {Name}
{N}/{N} tests passed UAT complete â {If PR_WORKFLOW and MERGED: PR: #{pr_number} â merged â} {If PR_WORKFLOW and not MERGED: PR: #{pr_number} ({pr_url}) â ready for review} {If REVIEW_SUMMARY: PR Review: {summary_stats}} {If TODOS_CREATED: Backlog: {N} issues created from review suggestions}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â¶ Next Up
Phase {Z+1}: {Name} â {Goal from ROADMAP.md}
/kata-discuss-phase {Z+1} â gather context and clarify approach
/clear first â fresh context window
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Also available:
- /kata-plan-phase {Z+1} â skip discussion, plan directly
- /kata-execute-phase {Z+1} â skip to execution (if already planned)
{If PR_WORKFLOW and not MERGED: –
gh pr view --webâ review PR in browser before next phase}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Route B: All tests pass, milestone complete
Step 1: If PR_WORKFLOW=true, STOP and ask about merge BEFORE showing completion output.
Use AskUserQuestion:
- header: “PR Ready for Merge”
- question: “PR #{pr_number} is ready. Merge before completing milestone?”
- options:
- “Yes, merge now” â merge PR, then show completion
- “No, continue without merging” â show completion with PR status
Step 2: Handle merge response (if PR_WORKFLOW=true)
If user chose “Yes, merge now”:
gh pr merge "$PR_NUMBER" --merge --delete-branch
git checkout main && git pull
Set MERGED=true for output below.
Step 3: Show completion output
âââââââââââââââââââââââââââââââââââââââââââââââââââââ Kata ⺠PHASE {Z} VERIFIED â âââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase {Z}: {Name}
{N}/{N} tests passed Final phase verified â {If PR_WORKFLOW and MERGED: PR: #{pr_number} â merged â} {If PR_WORKFLOW and not MERGED: PR: #{pr_number} ({pr_url}) â ready for review} {If REVIEW_SUMMARY: PR Review: {summary_stats}} {If TODOS_CREATED: Backlog: {N} issues created from review suggestions}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â¶ Next Up
Audit milestone â verify requirements, cross-phase integration, E2E flows
/kata-audit-milestone
/clear first â fresh context window
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Also available:
- /kata-complete-milestone â skip audit, archive directly
{If PR_WORKFLOW and not MERGED: –
gh pr view --webâ review PR in browser before audit}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Route C: Issues found, fix plans ready
âââââââââââââââââââââââââââââââââââââââââââââââââââââ Kata ⺠PHASE {Z} ISSUES FOUND â âââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase {Z}: {Name}
{N}/{M} tests passed {X} issues diagnosed Fix plans verified â
Issues Found
{List issues with severity from UAT.md}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â¶ Next Up
Execute fix plans â run diagnosed fixes
/kata-execute-phase {Z} –gaps-only
/clear first â fresh context window
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Also available:
- cat ${PHASE_DIR}/*-PLAN.md â review fix plans
- /kata-plan-phase {Z} –gaps â regenerate fix plans
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Route D: Issues found, planning blocked
âââââââââââââââââââââââââââââââââââââââââââââââââââââ Kata ⺠PHASE {Z} BLOCKED â âââââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase {Z}: {Name}
{N}/{M} tests passed Fix planning blocked after {X} iterations
Unresolved Issues
{List blocking issues from planner/checker output}
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â¶ Next Up
Manual intervention required
Review the issues above and either:
- Provide guidance for fix planning
- Manually address blockers
- Accept current state and continue
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Options:
- /kata-plan-phase {Z} –gaps â retry fix planning with guidance
- /kata-discuss-phase {Z} â gather more context before replanning
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ </offer_next>
<success_criteria>
- UAT.md created with tests from SUMMARY.md
- Tests presented one at a time with expected behavior
- Plain text responses (no structured forms)
- Severity inferred, never asked
- Batched writes: on issue, every 5 passes, or completion
- Committed on completion
- If issues: parallel debug agents diagnose root causes
- If issues: kata-planner creates fix plans from diagnosed gaps
- If issues: kata-plan-checker verifies fix plans (max 3 iterations)
- Ready for
/kata-execute-phasewhen complete </success_criteria>