feat(command): add plan-goal + execute-goal slash commands#55
Conversation
Goal-side planning and execution gates mirroring plan-task/execute-task. plan-goal validates required sections + that every # Tasks wikilink resolves to an existing task file (via goal-auditor), leaves phase: planning. execute-goal re-runs those checks, flips planning -> execution, and recommends the next open task (derived from each linked task's status) one at a time until the goal drains, then points to verify-goal -> complete-goal. Recommends only; never runs the task.
There was a problem hiding this comment.
Based on my review of the PR, here are my findings:
Files Changed:
CHANGELOG.md- New## Unreleasedentries for the two featuresREADME.md- Addedplan-goalandexecute-goalto the command tablecommands/plan-goal.md- New slash command definitioncommands/execute-goal.md- New slash command definition
Review Analysis:
-
Wikilink parsing - The
|aliasstrip rule ([[Real Title|shown]]→Real Title) is correctly implemented per the spec. No nested pipe edge cases observed in the implementation. -
Task file existence validation - Both commands use
Globto verify task files exist before claiming valid, which is correct. -
Phase transition atomicity -
vault-cli goal set "<name>" phase executionis a single atomic write operation, not a read-modify-write cycle, so there's no race condition concern. -
Status normalization - The
vault-cli task getcommand path goes throughdomain.NormalizeTaskStatus()which correctly maps legacy values liketodo→next, so the status comparison logic is sound. -
Test coverage - These are Claude Code plugin slash commands (markdown definitions), not Go code. The underlying Go operations they call (
goal_workon,goal_complete, etc.) have existing test coverage. No new Go code was added that requires tests. -
Security - Commands read from local vault filesystem; wikilink resolution is filesystem-based with no network exposure.
No critical issues found.
{
"verdict": "approve",
"summary": "The plan-goal and execute-goal slash commands are well-designed additions that properly gate goal lifecycle transitions, correctly implement wikilink parsing with alias stripping, and integrate cleanly with existing vault-cli infrastructure. No security, correctness, or test coverage issues identified.",
"comments": [],
"concerns_addressed": [
"correctness: wikilink alias stripping correctly handles [[Real Title|alias]] format - no nested pipe edge case found in scope",
"correctness: task file existence validation implemented via Glob before claiming valid (plan-goal step 5, execute-goal step 5)",
"correctness: phase transition uses atomic vault-cli goal set operation, not read-modify-write - no race condition",
"correctness: status values normalized via domain.NormalizeTaskStatus() which maps todo→next and other aliases",
"tests: slash commands are Claude Code plugin definitions (markdown), not Go code - underlying operations have existing test coverage",
"security: wikilink resolution reads local vault filesystem only, no sensitive data exposure"
]
}feat(command): add plan-goal + execute-goal slash commands
Summary
Adds the goal-side planning and execution gates —
/vault-cli:plan-goaland/vault-cli:execute-goal— mirroring the task-sideplan-task/execute-task. Together they complete the phase-gated goal lifecycle on top of thephasefield shipped in v0.100.0. Part of the [[Phase-Gated Goal Flow]] goal.What
commands/plan-goal.md— planning gate. Validates the required decision sections (# Success Criteria/# Definition of Done/# Non-goals) and that every# Taskswikilink resolves to an existing task file (skipping inline-code spans, stripping|alias). Runsgoal-auditor, conversationally fills gaps, leaves the goal atphase: planning, hands off toexecute-goal. Never flips phase itself.commands/execute-goal.md— execution gate + task-drain driver. Re-runs plan-goal's 3 hard checks, flipsphase: planning → executionon a clean plan, then recommends the next open task — the first# Taskswikilink whose linked task file is notcompleted/aborted— one at a time until the goal drains, then points toverify-goal→complete-goal. Recommends only; never runs the task (the normal task lifecycle does the work in between).Design notes
plan-task/execute-task.status, not stored on the goal — single source of truth, goal auto-reflects task progress.plan-task/execute-task.Review
make precommitgreen (lint 0 issues, tests, security, CHANGELOG valid).coding:slash-command-auditor: plan-goal's forward-reference to execute-goal resolved by shipping both together; execute-goal 8/10 with the dangling-wikilink / empty-tasks / wording fixes applied.