kata-add-milestone
Add a milestone to an existing project, starting a new milestone cycle, creating the first milestone after project init, or defining what's next after completing work. Triggers include "add milestone", "new milestone", "start milestone", "create milestone", "first milestone", "next milestone", and "milestone cycle".
What this skill does
<objective>
Add a milestone to the project through unified flow: questioning → research (optional) → requirements → roadmap.
This works for both first milestone (after /kata-new-project) and subsequent milestones (after completing a milestone).
**Creates/Updates:**
- `.planning/PROJECT.md` — updated with new milestone goals
- `.planning/research/` — domain research (optional, focuses on NEW features)
- `.planning/REQUIREMENTS.md` — scoped requirements for this milestone
- `.planning/ROADMAP.md` — phase structure (creates if first, continues if subsequent)
- `.planning/STATE.md` — reset for new milestone (creates if first)
**After this command:** Run `/kata-plan-phase [N]` to start execution.
</objective>
<execution_context>
@./references/questioning.md
@./references/ui-brand.md
@./references/project-template.md
@./references/requirements-template.md
@./references/github-mapping.md
</execution_context>
<context>
Milestone name: $ARGUMENTS (optional - will prompt if not provided)
**Load project context:**
@.planning/PROJECT.md
@.planning/STATE.md
@.planning/MILESTONES.md
@.planning/config.json
**Load milestone context (if exists):**
@.planning/MILESTONE-CONTEXT.md
</context>
<process>
## Phase 1: Load Context
- Read PROJECT.md (existing project, Validated requirements, decisions)
- Read MILESTONES.md (what shipped previously)
- Read STATE.md (pending todos, blockers)
- Check for MILESTONE-CONTEXT.md (if exists)
## Phase 1.2: Pre-flight Roadmap Format Check
If ROADMAP.md exists, check format and auto-migrate if old:
```bash
if [ -f .planning/ROADMAP.md ]; then
node "${CLAUDE_PLUGIN_ROOT}/skills/kata-add-milestone/scripts/kata-lib.cjs" check-roadmap 2>/dev/null
FORMAT_EXIT=$?
if [ $FORMAT_EXIT -eq 1 ]; then
echo "Old roadmap format detected. Running auto-migration..."
fi
fi
```
**If exit code 1 (old format):**
Invoke kata-doctor in auto mode:
```
Skill("kata-doctor", "--auto")
```
Continue after migration completes.
**If exit code 0 or 2:** Continue silently.
```bash
# Validate config
node "${CLAUDE_PLUGIN_ROOT}/skills/kata-add-milestone/scripts/kata-lib.cjs" check-config 2>/dev/null || true
```
## Phase 1.5: Optional Brainstorm
Use AskUserQuestion:
- header: "Brainstorm"
- question: "Brainstorm ideas before defining milestone goals?"
- options:
- "Brainstorm first" — Run explorer/challenger brainstorm session
- "Skip" — Continue without brainstorming
**If "Brainstorm first":**
Display:
```
Launching brainstorm session...
```
Run `/kata-brainstorm`
After brainstorm completes, continue to Phase 2.
**If "Skip":** Continue to Phase 2.
## Phase 2: Gather Milestone Goals
**If MILESTONE-CONTEXT.md exists:**
- Use features and scope from the context file
- Present summary for confirmation
**If no context file:**
- Present what shipped in last milestone
- Ask: "What do you want to build next?"
- Use AskUserQuestion to explore features
- Probe for priorities, constraints, scope
## Phase 3: Determine Milestone Version
- Parse last version from MILESTONES.md
- Suggest next version (v1.0 → v1.1, or v2.0 for major)
- Confirm with user
## Phase 4: Update PROJECT.md
Add/update these sections:
```markdown
## Current Milestone: v[X.Y] [Name]
**Goal:** [One sentence describing milestone focus]
**Target features:**
- [Feature 1]
- [Feature 2]
- [Feature 3]
```
Update Active requirements section with new goals.
Update "Last updated" footer.
## Phase 5: Update STATE.md
```markdown
## Current Position
Phase: Not started (defining requirements)
Plan: —
Status: Defining requirements
Last activity: [today] — Milestone v[X.Y] started
```
Keep Accumulated Context section (decisions, blockers) from previous milestone.
## Phase 5.5: Create GitHub Milestone (if enabled)
Read GitHub config:
```bash
GITHUB_ENABLED=$(node "${CLAUDE_PLUGIN_ROOT}/skills/kata-add-milestone/scripts/kata-lib.cjs" read-config "github.enabled" "false")
```
**If `GITHUB_ENABLED=true`:**
**Step 1: Validate GitHub remote exists**
```bash
HAS_GITHUB_REMOTE=$(git remote -v 2>/dev/null | grep -q 'github\.com' && echo "true" || echo "false")
```
**If `HAS_GITHUB_REMOTE=false`:**
Use AskUserQuestion to offer repo creation:
- header: "GitHub Repository"
- question: "GitHub tracking is enabled but no GitHub remote found. Create a repository now?"
- options:
- "Yes, create private repo (Recommended)" — Create private repository and push
- "Yes, create public repo" — Create public repository and push
- "Skip for now" — Continue without GitHub integration
**If "Yes, create private repo":**
```bash
gh repo create --source=. --private --push
```
If successful, set `HAS_GITHUB_REMOTE=true` and continue to Step 2 (Check authentication).
**If "Yes, create public repo":**
```bash
gh repo create --source=. --public --push
```
If successful, set `HAS_GITHUB_REMOTE=true` and continue to Step 2 (Check authentication).
**If "Skip for now":**
Display brief note and continue with local milestone initialization:
```
Continuing without GitHub integration. Run `gh repo create` later to enable.
```
Do NOT set github.enabled=false in config - user may add remote later.
**If `HAS_GITHUB_REMOTE=true`:**
**Step 2: Check authentication (non-blocking)**
```bash
if ! gh auth status &>/dev/null; then
echo "Warning: GitHub CLI not authenticated. Run 'gh auth login' to enable GitHub integration."
# Continue without GitHub operations - local milestone still created
else
# Proceed with milestone creation
fi
```
**Step 3: Check if milestone exists (idempotent)**
```bash
MILESTONE_EXISTS=$(gh api /repos/:owner/:repo/milestones 2>/dev/null | jq -r ".[] | select(.title==\"v${VERSION}\") | .number" 2>/dev/null)
```
**Step 4: Create milestone if doesn't exist**
```bash
if [ -z "$MILESTONE_EXISTS" ]; then
# Extract milestone description (first paragraph of goal, truncated to 500 chars)
MILESTONE_DESC=$(echo "$MILESTONE_GOALS" | head -1 | cut -c1-500)
gh api \
--method POST \
-H "Accept: application/vnd.github.v3+json" \
/repos/:owner/:repo/milestones \
-f title="v${VERSION}" \
-f state='open' \
-f description="${MILESTONE_DESC}" \
2>/dev/null && echo "GitHub Milestone v${VERSION} created" || echo "Warning: Failed to create GitHub Milestone (continuing)"
else
echo "GitHub Milestone v${VERSION} already exists (#${MILESTONE_EXISTS})"
fi
```
**If `GITHUB_ENABLED=false`:**
Skip GitHub operations silently (no warning needed - user opted out).
**Error handling principle:**
- All GitHub operations are non-blocking
- Missing remote warns but does not stop milestone initialization
- Auth failures warn but do not stop milestone initialization
- Planning files always persist locally regardless of GitHub status
## Phase 6: Cleanup and Commit
Delete MILESTONE-CONTEXT.md if exists (consumed).
Check planning config:
```bash
COMMIT_PLANNING_DOCS=$(node "${CLAUDE_PLUGIN_ROOT}/skills/kata-add-milestone/scripts/kata-lib.cjs" read-config "commit_docs" "true")
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
```
If `COMMIT_PLANNING_DOCS=false`: Skip git operations
If `COMMIT_PLANNING_DOCS=true` (default):
```bash
git add .planning/PROJECT.md .planning/STATE.md
git commit -m "docs: start milestone v[X.Y] [Name]"
```
## Phase 6.5: Resolve Model Profile
Read model profile for agent spawning:
```bash
MODEL_PROFILE=$(node "${CLAUDE_PLUGIN_ROOT}/skills/kata-add-milestone/scripts/kata-lib.cjs" read-config "model_profile" "balanced")
```
Default to "balanced" if not set.
**Model lookup table:**
| Agent | quality | balanced | budget |
| ------------------------- | ------- | -------- | ------ |
| kata-project-researcher | opus | sonnet | haiku |
| kata-research-synthesizer | sonnet | sonnet | haiku |
| kata-roadmapper | opus | sonnet | sonnet |
Store resolved models for use in Task calls below.
## Phase 7: Research Decision
Use AskUserQuestion:
- header: "ReseaRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.