Agent skill
adding-phases
Use this skill to add planned work discovered during execution to the end of the current milestone in the roadmap. This skill appends sequential phases to the current milestone's phase list, automatically calculating the next phase number. Triggers include "add phase", "append phase", "new phase", and "create phase". This skill updates ROADMAP.md and STATE.md accordingly.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/adding-phases
Metadata
Additional technical details for this skill
- version
- 0.1.0
SKILL.md
<user_command>/kata:add-phase</user_command>
This command appends sequential phases to the current milestone's phase list, automatically calculating the next phase number based on existing phases.
Purpose: Add planned work discovered during execution that belongs at the end of current milestone.
IMPORTANT: When showing examples to users, always use /kata:add-phase (the command), not the skill name.
<execution_context> @.planning/ROADMAP.md @.planning/STATE.md </execution_context>
If no arguments provided:
ERROR: Phase description required
Usage: /kata:add-phase <description>
Example: /kata:add-phase Add authentication system
Exit.
if [ -f .planning/ROADMAP.md ]; then
ROADMAP=".planning/ROADMAP.md"
else
echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
exit 1
fi
Read roadmap content for parsing.
- Locate the "## Current Milestone:" heading
- Extract milestone name and version
- Identify all phases under this milestone (before next "---" separator or next milestone heading)
- Parse existing phase numbers (including decimals if present)
Example structure:
## Current Milestone: v1.0 Foundation
### Phase 4: Focused Command System
### Phase 5: Path Routing & Validation
### Phase 6: Documentation & Distribution
- Extract all phase numbers from phase headings (### Phase N:)
- Filter to integer phases only (ignore decimals like 4.1, 4.2)
- Find the maximum integer value
- Add 1 to get the next phase number
Example: If phases are 4, 5, 5.1, 6 → next is 7
Format as two-digit: printf "%02d" $next_phase
# Example transformation:
# "Add authentication" → "add-authentication"
# "Fix critical performance issues" → "fix-critical-performance-issues"
slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
Phase directory name: {two-digit-phase}-{slug}
Example: 07-add-authentication
phase_dir=".planning/phases/${phase_num}-${slug}"
mkdir -p "$phase_dir"
Confirm: "Created directory: $phase_dir"
-
Find the insertion point (after last phase in current milestone, before "---" separator)
-
Insert new phase heading:
### Phase {N}: {Description} **Goal:** [To be planned] **Depends on:** Phase {N-1} **Plans:** 0 plans Plans: - [ ] TBD (run /kata:plan-phase {N} to break down) **Details:** [To be added during planning] -
Write updated roadmap back to file
Preserve all other content exactly (formatting, spacing, other phases).
- Read
.planning/STATE.md - Under "## Current Position" → "Next Phase:" add reference to new phase
- Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
- Phase {N} added: {description}
If "Roadmap Evolution" section doesn't exist, create it.
Phase {N} added to current milestone:
- Description: {description}
- Directory: .planning/phases/{phase-num}-{slug}/
- Status: Not planned yet
Roadmap updated: {roadmap-path}
Project state updated: .planning/STATE.md
---
## ▶ Next Up
**Phase {N}: {description}**
`/kata:plan-phase {N}`
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/kata:add-phase <description>` — add another phase
- Review roadmap
---
<anti_patterns>
- Don't modify phases outside current milestone
- Don't renumber existing phases
- Don't use decimal numbering (that's /kata:insert-phase)
- Don't create plans yet (that's /kata:plan-phase)
- Don't commit changes (user decides when to commit) </anti_patterns>
<success_criteria> Phase addition is complete when:
- Phase directory created:
.planning/phases/{NN}-{slug}/ - Roadmap updated with new phase entry
- STATE.md updated with roadmap evolution note
- New phase appears at end of current milestone
- Next phase number calculated correctly (ignoring decimals)
- User informed of next steps </success_criteria>
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?