.claude/skills/populate-state/SKILL.md
Generate `.claude/phase-state.json` from the main execution plan and git history. Use to recover phase state after context loss or when joining an existing project.
npx skillsauth add benjaminshoemaker/ai_coding_project_base populate-stateInstall 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.
Generate .claude/phase-state.json from the active greenfield execution plan and git history.
Use this command when:
Copy this checklist and track progress:
Populate State Progress:
- [ ] Directory guard (verify main execution plan exists)
- [ ] Ensure .claude directory exists
- [ ] Parse the main execution plan (phases, tasks, criteria)
- [ ] Parse git history (commits, branches, timestamps)
- [ ] Detect features (features/*/EXECUTION_PLAN.md)
- [ ] Identify blockers (BLOCKED markers, stale tasks)
- [ ] Generate .claude/phase-state.json
- [ ] Determine task and phase statuses
- [ ] Output summary report
Before starting:
.toolkit-marker exists), STOP and tell the user to run /populate-state from their project directory instead.EXECUTION_PLAN.md in the current working directoryplans/greenfield/EXECUTION_PLAN.md in the current working directorycd into the directory containing the active EXECUTION_PLAN.md and re-run /populate-state.Ensure directory exists
mkdir -p .claude
Parse the main execution plan to extract:
## Phase N headers)#### Task X.Y.Z headers)- [x] vs - [ ] in acceptance criteria)[x]Parse git history to extract:
task(X.Y.Z):)phase-N)Detect features by scanning for:
features/*/EXECUTION_PLAN.md filesIdentify blockers by scanning the main execution plan for:
**Status:** BLOCKED markerGenerate .claude/phase-state.json with this structure:
{
"schema_version": "1.0",
"project_name": "{from directory name}",
"last_updated": "{ISO timestamp}",
"generated_by": "populate-state",
"main": {
"current_phase": 2,
"total_phases": 6,
"status": "IN_PROGRESS",
"phases": [
{
"number": 1,
"name": "Foundation",
"status": "COMPLETE",
"tasks_total": 8,
"tasks_complete": 8,
"completed_at": "2026-01-10T14:22:00Z"
},
{
"number": 2,
"name": "Core Features",
"status": "IN_PROGRESS",
"tasks_total": 12,
"tasks_complete": 5,
"started_at": "2026-01-11T09:00:00Z",
"tasks": {
"2.1.A": {"status": "COMPLETE", "completed_at": "..."},
"2.1.B": {"status": "COMPLETE", "completed_at": "..."},
"2.2.A": {"status": "IN_PROGRESS", "failures": {"consecutive": 0, "verification_attempts": {}, "last_errors": []}},
"2.2.B": {"status": "NOT_STARTED"},
"2.3.A": {"status": "BLOCKED", "blocker": "Needs API key", "since": "...", "failures": {"consecutive": 1, "verification_attempts": {"V-003": 3}, "last_errors": ["timeout connecting to API"]}}
}
}
]
},
"features": {
"improved_metrics": {
"path": "features/improved_metrics",
"current_phase": 2,
"total_phases": 4,
"status": "IN_PROGRESS",
"phases": [...]
}
}
}
Determine task status using this logic:
COMPLETE: All acceptance criteria are [x] AND git commit exists for taskIN_PROGRESS: Some criteria are [x] OR git commit exists but not all criteria doneBLOCKED: Has **Status:** BLOCKED marker OR stale (7+ days, incomplete)NOT_STARTED: No criteria are [x] AND no git commit for taskDetermine phase status using this logic:
COMPLETE: All tasks are COMPLETEIN_PROGRESS: At least one task is IN_PROGRESS or COMPLETE, but not all COMPLETEBLOCKED: Current task is BLOCKEDNOT_STARTED: No tasks have any progressOutput summary after generation:
Phase State Generated: .claude/phase-state.json
Main Project: Phase 2 of 6 (IN_PROGRESS)
- Phase 1: COMPLETE (8/8 tasks)
- Phase 2: IN_PROGRESS (5/12 tasks, 1 blocked)
Features:
- improved_metrics: Phase 2 of 4 (IN_PROGRESS)
- github_oauth: Phase 3 of 4 (IN_PROGRESS)
Blockers Found: 2
- Task 2.3.A: Needs API key (blocked 3 days)
- Feature improved_metrics Task 2.1.C: Test failures (blocked 1 day)
| Situation | Action |
|-----------|--------|
| No main execution plan found in working directory | STOP and tell user to cd into the directory containing the active EXECUTION_PLAN.md |
| Main execution plan has non-standard phase/task headers that cannot be parsed | Report which headers were unrecognized, generate state for parseable phases, and warn about skipped sections |
| Git history is unavailable (not a git repo or shallow clone) | Skip git-based timestamp and commit detection; derive status solely from checkbox state in the main execution plan |
| .claude/ directory cannot be created (permissions issue) | Report the permission error and suggest running with appropriate permissions or creating the directory manually |
| Existing phase-state.json is malformed or from an incompatible schema version | Overwrite it with freshly generated state and warn user that the previous file was replaced |
testing
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.