Loading...
Loading...
Check project progress, show context, and route to next action (execute or plan). Triggers include "progress".
npx skill4agent add gannonh/kata-skills kata-track-progresstest -d .planning && echo "exists" || echo "missing".planning/No planning structure found.
Run /kata-new-project to start a new project./kata-new-project/kata-new-project.planning/STATE.md.planning/ROADMAP.md.planning/PROJECT.md.planning/config.jsonPR_WORKFLOW=$(cat .planning/config.json 2>/dev/null | grep -o '"pr_workflow"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false"){phase}-CONTEXT.mdfind .planning/issues/open -maxdepth 1 -name "*.md" 2>/dev/null | wc -lfind .planning/debug -maxdepth 1 -name "*.md" 2>/dev/null | grep -v resolved | wc -l# [Project Name]
**Progress:** [████████░░] 8/10 plans complete
**Profile:** [quality/balanced/budget]
## Recent Work
- [Phase X, Plan Y]: [what was accomplished - 1 line]
- [Phase X, Plan Z]: [what was accomplished - 1 line]
## Current Position
Phase [N] of [total]: [phase-name]
Plan [M] of [phase-total]: [status]
CONTEXT: [✓ if CONTEXT.md exists | - if not]
## Key Decisions Made
- [decision 1 from STATE.md]
- [decision 2]
## Blockers/Concerns
- [any blockers or concerns from STATE.md]
## Pending Issues
- [count] pending — /kata-check-issues to review
## Active Debug Sessions
- [count] active — /kata-debug to continue
(Only show this section if count > 0)
## PR Status
(Only show this section if PR_WORKFLOW is true)
Check for PR on current branch:
```bash
if [ "$PR_WORKFLOW" = "true" ]; then
CURRENT_BRANCH=$(git branch --show-current)
PR_INFO=$(gh pr list --head "$CURRENT_BRANCH" --json number,state,title,url --jq '.[0]' 2>/dev/null)
if [ -n "$PR_INFO" ] && [ "$PR_INFO" != "null" ]; then
PR_NUMBER=$(echo "$PR_INFO" | jq -r '.number')
PR_STATE=$(echo "$PR_INFO" | jq -r '.state')
PR_TITLE=$(echo "$PR_INFO" | jq -r '.title')
PR_URL=$(echo "$PR_INFO" | jq -r '.url')
# Check if draft
if [ "$PR_STATE" = "OPEN" ]; then
IS_DRAFT=$(gh pr view "$PR_NUMBER" --json isDraft --jq '.isDraft' 2>/dev/null)
if [ "$IS_DRAFT" = "true" ]; then
STATE_DISPLAY="Draft"
else
STATE_DISPLAY="Ready for review"
fi
elif [ "$PR_STATE" = "MERGED" ]; then
STATE_DISPLAY="Merged"
elif [ "$PR_STATE" = "CLOSED" ]; then
STATE_DISPLAY="Closed"
else
STATE_DISPLAY="$PR_STATE"
fi
fi
fi## PR Status
PR #[number]: [title]
Status: [Draft | Ready for review | Merged]
URL: [url]## PR Status
No open PR for current branch.
Branch: [current_branch]
</step>
<step name="route">
**Determine next action based on verified counts.**
**Step 1: Find current phase directory and count plans, summaries, and issues**
Find the current phase directory using universal discovery:
```bash
PADDED=$(printf "%02d" "$CURRENT_PHASE" 2>/dev/null || echo "$CURRENT_PHASE")
PHASE_DIR=""
for state in active pending completed; do
PHASE_DIR=$(find .planning/phases/${state} -maxdepth 1 -type d -name "${PADDED}-*" 2>/dev/null | head -1)
[ -z "$PHASE_DIR" ] && PHASE_DIR=$(find .planning/phases/${state} -maxdepth 1 -type d -name "${CURRENT_PHASE}-*" 2>/dev/null | head -1)
[ -n "$PHASE_DIR" ] && break
done
# Fallback: flat directory (backward compatibility)
if [ -z "$PHASE_DIR" ]; then
PHASE_DIR=$(find .planning/phases -maxdepth 1 -type d -name "${PADDED}-*" 2>/dev/null | head -1)
[ -z "$PHASE_DIR" ] && PHASE_DIR=$(find .planning/phases -maxdepth 1 -type d -name "${CURRENT_PHASE}-*" 2>/dev/null | head -1)
fifind "${PHASE_DIR}" -maxdepth 1 -name "*-PLAN.md" 2>/dev/null | wc -l
find "${PHASE_DIR}" -maxdepth 1 -name "*-SUMMARY.md" 2>/dev/null | wc -l
find "${PHASE_DIR}" -maxdepth 1 -name "*-UAT.md" 2>/dev/null | wc -l# Check for diagnosed UAT with gaps
find "${PHASE_DIR}" -maxdepth 1 -name "*-UAT.md" -exec grep -l "status: diagnosed" {} + 2>/dev/nulluat_with_gaps| Condition | Meaning | Action |
|---|---|---|
| uat_with_gaps > 0 | UAT gaps need fix plans | Go to Route E |
| summaries < plans | Unexecuted plans exist | Go to Route A |
| summaries = plans AND plans > 0 | Phase complete | Go to Step 3 |
| plans = 0 | Phase not yet planned | Go to Route B |
<objective>---
## ▶ Next Up
**{phase}-{plan}: [Plan Name]** — [objective summary from PLAN.md]
{If PR_WORKFLOW is true AND PR exists: PR #[number] ([state]) — [url]}
`/kata-execute-phase {phase}`
<sub>`/clear` first → fresh context window</sub>
---{phase}-CONTEXT.md---
## ▶ Next Up
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
<sub>✓ Context gathered, ready to plan</sub>
`/kata-plan-phase {phase-number}`
<sub>`/clear` first → fresh context window</sub>
------
## ▶ Next Up
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
`/kata-discuss-phase {phase}` — gather context and clarify approach
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-plan-phase {phase}` — skip discussion, plan directly
- `/kata-listing-phase-assumptions {phase}` — see Claude's assumptions
------
## ⚠ UAT Gaps Found
**{phase}-UAT.md** has {N} gaps requiring fixes.
`/kata-plan-phase {phase} --gaps`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-execute-phase {phase}` — execute phase plans
- `/kata-verify-work {phase}` — run more UAT testing
---| Condition | Meaning | Action |
|---|---|---|
| current phase < highest phase | More phases remain | Go to Route C |
| current phase = highest phase | Milestone complete | Go to Route D |
---
## ✓ Phase {Z} Complete
## ▶ Next Up
{If PR_WORKFLOW is true AND PR exists:
**⚠️ Merge PR #[number] first** — [url]
Then continue with:
}
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
`/kata-discuss-phase {Z+1}` — gather context and clarify approach
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-plan-phase {Z+1}` — skip discussion, plan directly
- `/kata-verify-work {Z}` — user acceptance test before continuing
------
## 🎉 Milestone Complete
All {N} phases finished!
## ▶ Next Up
{If PR_WORKFLOW is true: **⚠️ Merge all phase PRs first** before completing milestone
Then continue with:
}
**Complete Milestone** — archive and prepare for next
`/kata-complete-milestone`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata-verify-work` — user acceptance test before completing milestone
---/kata-add-milestone/clear/kata-plan-phase [next]/kata-resume-work