spec:refresh
Compatibility: If
AskUserQuestionis unavailable, present options as a numbered list and wait for the user's reply. IfTaskis unavailable, run parallel steps sequentially. Thecontext: forkandagent:frontmatter fields are Claude Code-specific — on OpenCode and VS Code Copilot they are ignored and the skill runs inline using the current model.
Step -1: Parse Flags
BG_MODE = true if --bg present
SILENT = true if --silent present
If BG_MODE=true, after completing Step 4, send a desktop notification (see Step 4.5).
Step 0: Select Plan
Check for plan name argument: /refresh plan-name
If not provided:
- Get all active plans with Last Updated timestamps:
npx @codevoyant/agent-kit plans migrate npx @codevoyant/agent-kit plans list --status Active - Sort plans by Last Updated (most recent first)
- If only one plan exists, auto-select it
- If multiple plans exist, use
AskUserQuestionto present the list (name, progress %, last-updated) and ask the user to choose. Example prompt: "Which plan would you like to work on?\n (1) feature-auth — 60% — updated 2h ago\n (2) refactor-api — 20% — updated 1d ago" - Report to user: "Refreshing plan: {plan-name} (last updated: {timestamp})"
- If no plans exist, inform user to create with
/new
Step 1: Read Current Plan
Read .codevoyant/plans/{plan-name}/plan.md and analyze:
- The objective and overall scope
- All phases and their tasks
- Current completion status (checked vs unchecked tasks)
- Phase completion markers (✅)
Extract Branch Context:
# Parse plan metadata to extract branch and worktree
PLAN_BRANCH=$(grep "^- \*\*Branch\*\*:" .codevoyant/plans/{plan-name}/plan.md | sed 's/^- \*\*Branch\*\*: //' | sed 's/ *$//')
PLAN_WORKTREE=$(grep "^- \*\*Worktree\*\*:" .codevoyant/plans/{plan-name}/plan.md | sed 's/^- \*\*Worktree\*\*: //' | sed 's/ *$//')
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
Store these values for use in reporting.
Step 2: Verify Checklist Status
For each phase:
- Count checked
[x]vs unchecked[ ]tasks - Verify phase has ✅ marker if and only if all tasks are complete
- Report any inconsistencies
Step 3: Update Phase Markers
If status is inconsistent:
- Add ✅ to phase headers where all tasks are complete
- Remove ✅ from phase headers where tasks remain incomplete
- Update
.codevoyant/plans/{plan-name}/plan.mdwith corrections
Step 4: Update Registry and Report Status
After updating plan.md, update the registry:
npx @codevoyant/agent-kit plans update-progress \
--name "$PLAN_NAME" \
--completed $COMPLETED \
--total $TOTAL
If plan is fully complete (100%), also update status:
npx @codevoyant/agent-kit plans update-status --name "$PLAN_NAME" --status Complete
Provide a summary:
Plan Status: {plan-name}
Branch Context:
- Plan Branch: {PLAN_BRANCH or "(none)"}
- Current Branch: {CURRENT_BRANCH}
{if PLAN_BRANCH != CURRENT_BRANCH and PLAN_BRANCH != "(none)"}
⚠️ Warning: You're on '{CURRENT_BRANCH}' but plan is for '{PLAN_BRANCH}'
{endif}
{if PLAN_WORKTREE != "(none)"}
- Worktree: {PLAN_WORKTREE}
{endif}
Progress:
- Phase 1 - Setup Infrastructure: 5/5 complete ✅
- Phase 2 - Core Features: 3/7 complete (in progress)
- Phase 3 - Testing: 0/4 complete (not started)
Overall: 8/16 tasks complete (50%)
{if markers changed}Updated {N} phase marker(s) to reflect current status.{else}All markers already correct — no changes needed.{endif}
Step 4.5: Desktop Notification (--bg only)
If BG_MODE=true and SILENT=false, send a desktop notification:
npx @codevoyant/agent-kit notify \
--title "Claude Code — Spec" \
--message "Plan '{plan-name}' refreshed — {completed}/{total} tasks complete"
If branch mismatch warning shown, add suggestion:
Tip: Switch to plan's branch with: git checkout {PLAN_BRANCH}
{if PLAN_WORKTREE != "(none)"}
Or work in worktree: cd {PLAN_WORKTREE}
{endif}
If the plan is fully complete, report completion:
Plan "{plan-name}" Status: All phases complete! ✅
Overall: 16/16 tasks complete (100%)
The plan is complete. Next steps:
- Run /done {plan-name} to archive this plan
- Use /new to start a new plan
More from cloudvoyant/codevoyant
mem:help
Use when the user asks about available mem commands or needs help choosing a skill. Triggers on: \"mem help\", \"help mem\", \"what can mem do\", \"mem commands\", \"list mem skills\", \"mem reference\". Lists all mem commands with descriptions, arguments, and usage guidance.
14dev:plan
Use when planning architecture for a project or feature. Triggers on: "dev plan", "architecture plan", "plan architecture", "design architecture", "technical design", "system design for". Produces draft plan artifacts in .codevoyant/plans/{slug}/. Use /dev:approve to promote to docs/architecture/.
14em:review
Use when reviewing an engineering roadmap for quality and realism. Triggers on: "em review", "review roadmap", "sanity check roadmap", "em check", "review this plan". Checks capacity realism, dependency gaps, missing risks, and phasing quality. Auto-launched after em:plan.
13dev:explore
Use when researching technical approaches before building. Triggers on: "explore options", "what are my options for", "research approaches", "compare solutions", "dev explore", "generate proposals", "help me decide between". Runs parallel proposal generation via subagents and outputs to .codevoyant/explore/.
13em:plan
Use when planning a project (epic) or initiative with Linear as tracker.
13pm:plan
Plan a product roadmap for a quarter, half-year, or year. Writes a draft roadmap to .codevoyant/roadmaps/ using capability tiers. Triggers on: "pm plan", "product roadmap", "plan a roadmap", "quarterly roadmap", "annual plan".
13