From 67c18c7dba0cbc29bdd2b6c74c11d9708cbccd08 Mon Sep 17 00:00:00 2001 From: Benjamin Borbe Date: Mon, 29 Jun 2026 14:35:34 +0200 Subject: [PATCH 1/3] feat: promote goal to in_progress in work-on-goal-assistant Mirror work-on-task-assistant's status promotion. When work-on-goal finds a goal that is not already in_progress or terminal, set its status to in_progress via `vault-cli goal set`, before guide search so it cannot be skipped. Terminal goals (completed/aborted) are not auto-reopened. --- agents/work-on-goal-assistant.md | 44 ++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/agents/work-on-goal-assistant.md b/agents/work-on-goal-assistant.md index 1ca49b1..5042f73 100644 --- a/agents/work-on-goal-assistant.md +++ b/agents/work-on-goal-assistant.md @@ -3,7 +3,7 @@ name: work-on-goal-assistant description: Prepare a goal for work — find goal, search domain guides, analyze task progress, recommend next task, delegate to work-on-task-assistant. Works in any vault. model: haiku tools: Read, Glob, Grep, Bash, Task, AskUserQuestion, mcp__semantic-search__search_related -color: purple +color: blue --- @@ -14,8 +14,24 @@ Goal work-preparation assistant. Bridges "I want to work on Goal X" → "activel **Integration**: complements `/focus` (alignment) and delegates to `work-on-task-assistant` for task-level prep. + +**MANDATORY mutation — must succeed or report ⚠️.** + +When the goal file is found AND its `status` is not already `in_progress` AND not terminal (`completed` / `aborted`): +- Promote the goal to in_progress: `vault-cli goal set "{goal_name}" status in_progress` (`vault-cli goal work-on` does not exist; `set` is the correct primitive — unlike tasks, which have `task work-on`) +- Report the transition: `✅ Goal status: {old} → in_progress` +- If the command exits non-zero: report `⚠️ Could not set status: {error}` and continue (do NOT claim success) + +Skip silently (report `ℹ️`) when: +- `status` is already `in_progress` (no-op, don't dirty the file) +- `status` is `completed` or `aborted` (terminal — never reopen automatically; the error_handling block already offers reopen) + +This mirrors `work-on-task-assistant`'s status promotion. It runs in Phase 1 (right after the goal is read), before guide search and report rendering, so it cannot be forgotten mid-workflow. + + -- NEVER modify goal files (read-only) +- READ-ONLY except the status mutation in `` — never edit goal body, success criteria, tasks, or any other frontmatter field +- ALWAYS promote goal `status` to `in_progress` when starting work (see ``), unless the goal is in a terminal state (`completed` / `aborted`) - ALWAYS delegate to `work-on-task-assistant` once user picks a task - ALWAYS search for domain-level guides (broader than task-specific) - ALWAYS show progress overview before task selection @@ -55,6 +71,12 @@ Read goal file: If not found: error with searched paths + suggest `/vault-cli:create-goal`. +**Promote status to in_progress (MANDATORY — see ``).** Immediately after reading the goal, before any guide search: +- If `status` not in {`in_progress`, `completed`, `aborted`}: run `vault-cli goal set "{goal_name}" status in_progress` and record `✅ Goal status: {old} → in_progress` for the report. +- If the command exits non-zero: record `⚠️ Could not set status: {error}` for the report and continue — never report `✅`. +- If `status == in_progress`: record `ℹ️ Goal already in_progress`. +- If `status` in {`completed`, `aborted`}: do NOT mutate — defer to the terminal-state handling in ``. + ## Phase 2: Search domain guides Build keyword query from goal summary (top 2-3 nouns/verbs). If domain is well-known (Trading, etc.), add a domain-specific query. @@ -120,7 +142,8 @@ Format final output as goal-context block + `---` + work-on-task-assistant outpu 📊 Goal: Domain: Progress: X/Y completed [(Z deferred)] -Status: +Status (before): +✅ Goal status: → in_progress | ℹ️ Already in_progress | ⚠️ Could not set status: Summary: <1-3 sentences> @@ -164,7 +187,7 @@ Ready to work on this task. - Goal not found: report searched paths + suggest creating the goal -- Goal already `completed`: show completion summary; offer to reopen / pick next goal from theme / view tasks +- Goal already `completed` or `aborted`: do NOT auto-promote to in_progress (the `` skip rule). Show completion summary; offer to reopen / pick next goal from theme / view tasks - No tasks defined: "ℹ️ No tasks defined for this goal — add tasks or mark goal complete" - All tasks deferred: show earliest defer date and recommend reviewing - Semantic search absent: silently fall back to Glob @@ -173,10 +196,11 @@ Ready to work on this task. 1. Goal found and context extracted -2. Domain guides searched (even if zero results) -3. Task progress analyzed and grouped -4. Report presented -5. User selected a task OR chose "Update goal instead" -6. If task selected: delegation returned context -7. Ends with "Ready to work on this task." (or stops on "Update goal") +2. Goal status promoted to in_progress (or ℹ️ skip when already in_progress / terminal) — reported in the context block +3. Domain guides searched (even if zero results) +4. Task progress analyzed and grouped +5. Report presented +6. User selected a task OR chose "Update goal instead" +7. If task selected: delegation returned context +8. Ends with "Ready to work on this task." (or stops on "Update goal") From aabdf815c7f5ee6ee9c3cf2d07cd3a300349373f Mon Sep 17 00:00:00 2001 From: Benjamin Borbe Date: Mon, 29 Jun 2026 14:51:12 +0200 Subject: [PATCH 2/3] fix: keep Status label simple in work-on-goal output --- agents/work-on-goal-assistant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/work-on-goal-assistant.md b/agents/work-on-goal-assistant.md index 5042f73..03b6c74 100644 --- a/agents/work-on-goal-assistant.md +++ b/agents/work-on-goal-assistant.md @@ -142,7 +142,7 @@ Format final output as goal-context block + `---` + work-on-task-assistant outpu 📊 Goal: Domain: Progress: X/Y completed [(Z deferred)] -Status (before): +Status: ✅ Goal status: → in_progress | ℹ️ Already in_progress | ⚠️ Could not set status: Summary: <1-3 sentences> From 62ad4209b40ef302bc067802027adbd9d4417abb Mon Sep 17 00:00:00 2001 From: Benjamin Borbe Date: Mon, 29 Jun 2026 17:11:13 +0200 Subject: [PATCH 3/3] docs: add CHANGELOG entry for work-on-goal status promotion --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6581454..7e986d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Please choose versions by [Semantic Versioning](http://semver.org/). * MINOR version when you add functionality in a backwards-compatible manner, and * PATCH version when you make backwards-compatible bug fixes. +## Unreleased + +- feat(work-on-goal): `work-on-goal-assistant` now promotes a goal's `status` to `in_progress` when work starts (via `vault-cli goal set`), mirroring `work-on-task-assistant`. Runs in Phase 1 before guide search; skips already-`in_progress` goals and never auto-reopens terminal (`completed` / `aborted`) goals. + ## v0.92.1 - fix: use `stderrors.New` instead of `errors.New(context.Background(), ...)` for `ErrStarterUnavailable` sentinel in `pkg/ops/errors.go`