Skip to content

feat(command): add plan-goal + execute-goal slash commands#55

Merged
bborbe merged 1 commit into
masterfrom
feature/plan-goal
Jul 12, 2026
Merged

feat(command): add plan-goal + execute-goal slash commands#55
bborbe merged 1 commit into
masterfrom
feature/plan-goal

Conversation

@bborbe

@bborbe bborbe commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the goal-side planning and execution gates — /vault-cli:plan-goal and /vault-cli:execute-goal — mirroring the task-side plan-task/execute-task. Together they complete the phase-gated goal lifecycle on top of the phase field 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 # Tasks wikilink resolves to an existing task file (skipping inline-code spans, stripping |alias). Runs goal-auditor, conversationally fills gaps, leaves the goal at phase: planning, hands off to execute-goal. Never flips phase itself.
  • commands/execute-goal.md — execution gate + task-drain driver. Re-runs plan-goal's 3 hard checks, flips phase: planning → execution on a clean plan, then recommends the next open task — the first # Tasks wikilink whose linked task file is not completed/aborted — one at a time until the goal drains, then points to verify-goalcomplete-goal. Recommends only; never runs the task (the normal task lifecycle does the work in between).
  • README command table + CHANGELOG updated.

Design notes

  • Both commands are inline (not sub-agents) — they read the parent conversation for goal detection, same justified exception as plan-task/execute-task.
  • Task completion is derived from each linked task file's status, not stored on the goal — single source of truth, goal auto-reflects task progress.
  • The 3 hard checks are duplicated inline in both commands (not shared) — same self-contained pattern as plan-task/execute-task.

Review

  • make precommit green (lint 0 issues, tests, security, CHANGELOG valid).
  • Both commands audited by 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.
  • Plugin-only change → autoRelease bumps the 4 version strings post-merge.

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.
@bborbe bborbe marked this pull request as ready for review July 12, 2026 15:47

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my review of the PR, here are my findings:

Files Changed:

  • CHANGELOG.md - New ## Unreleased entries for the two features
  • README.md - Added plan-goal and execute-goal to the command table
  • commands/plan-goal.md - New slash command definition
  • commands/execute-goal.md - New slash command definition

Review Analysis:

  1. Wikilink parsing - The |alias strip rule ([[Real Title|shown]]Real Title) is correctly implemented per the spec. No nested pipe edge cases observed in the implementation.

  2. Task file existence validation - Both commands use Glob to verify task files exist before claiming valid, which is correct.

  3. Phase transition atomicity - vault-cli goal set "<name>" phase execution is a single atomic write operation, not a read-modify-write cycle, so there's no race condition concern.

  4. Status normalization - The vault-cli task get command path goes through domain.NormalizeTaskStatus() which correctly maps legacy values like todonext, so the status comparison logic is sound.

  5. 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.

  6. 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"
  ]
}

@bborbe bborbe merged commit c8053cc into master Jul 12, 2026
1 check passed
@bborbe bborbe deleted the feature/plan-goal branch July 12, 2026 15:51
bborbe added a commit that referenced this pull request Jul 16, 2026
feat(command): add plan-goal + execute-goal slash commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant