diff --git a/CHANGELOG.md b/CHANGELOG.md index eb21c01..457c0ce 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 + +- fix(command): `plan-goal` and `execute-goal` now treat only the **leading** `[[...]]` of each `# Tasks` list item as the task — wikilinks in a task item's trailing description (cross-references to a guide, Success Criterion, or another goal) are no longer mis-read as phantom missing tasks. Found by dogfooding against a real goal whose Task 4 line references `[[Task Lifecycle Guide]]` in prose + ## v0.101.0 - feat(command): add `/vault-cli:plan-goal` slash command — goal-side planning gate mirroring `plan-task`; 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), runs `goal-auditor`, leaves the goal at `phase: planning`, and hands off to `execute-goal` (never flips phase itself) diff --git a/commands/execute-goal.md b/commands/execute-goal.md index 0007bf5..a007e2a 100644 --- a/commands/execute-goal.md +++ b/commands/execute-goal.md @@ -67,7 +67,7 @@ Check (in order, collect ALL failures — don't short-circuit): 1. **Required sections present** — each of `# Success Criteria`, `# Definition of Done`, `# Non-goals` exists as a heading. Report each missing section by name. 2. **Success Criteria binary** — `# Success Criteria` has ≥ 2 binary checkboxes (`- [ ]` / `- [x]`). -3. **Every `# Tasks` wikilink resolves** — each `[[Task Title]]` in the `# Tasks` section resolves to an existing `/.md` (skip `[[...]]` inside inline-code spans; strip `|alias` display text). Report each unresolved task by name. +3. **Every `# Tasks` wikilink resolves** — for each `# Tasks` list item, its task file `/.md` exists. The task is the **leading `[[...]]` of each list item only** — wikilinks later in the same item (trailing description after `—`: cross-references to a guide / Success Criterion / other goal) are references, not tasks; ignore them. Also skip `[[...]]` inside inline-code spans and strip `|alias` display text. Report each unresolved task by name. ### 6. Phase transition or refusal @@ -96,7 +96,7 @@ Continue to step 7. ### 7. Recommend the next open task (or signal drain-complete) — final output -Walk the `# Tasks` section's wikilinks **in listed order**. For each `[[Task Title]]` (inline-code spans skipped, `|alias` stripped), resolve to `/.md` and read its status: +Walk the `# Tasks` section's list items **in listed order**. Each item's task is its **leading `[[...]]` only** (wikilinks later in the item's description — guide / SC / goal cross-references — are ignored; inline-code spans skipped, `|alias` stripped). For each task, resolve to `/.md` and read its status: ```bash vault-cli task get "" status --output json diff --git a/commands/plan-goal.md b/commands/plan-goal.md index b694211..112d9c3 100644 --- a/commands/plan-goal.md +++ b/commands/plan-goal.md @@ -65,9 +65,10 @@ Three checks beyond the auditor's general scoring — all hard (any failure → - **Required sections present** — each of `# Success Criteria`, `# Definition of Done`, `# Non-goals` exists as a heading. Report each missing section **by name**. - **Success Criteria binary** — `# Success Criteria` section has ≥ 2 binary checkboxes (`- [ ]` / `- [x]`). -- **Every `# Tasks` wikilink resolves** — extract each `[[Task Title]]` from the `# Tasks` section and confirm a file `/.md` exists (vault-cli config `tasks_dir`; use `Glob`). Report each **unresolved task by name**. Two rules on extraction: - 1. **Skip inline-code spans** — a `[[wikilink]]` inside backticks (e.g. a literal example in prose) is NOT a task reference; exclude it. Only bare `[[...]]` in the `# Tasks` list counts. - 2. **Strip display aliases** — `[[Real Title|shown]]` resolves against `Real Title`. +- **Every `# Tasks` wikilink resolves** — for each `# Tasks` list item, confirm its task file `/.md` exists (vault-cli config `tasks_dir`; use `Glob`). Report each **unresolved task by name**. Three rules on extraction: + 1. **One task per list item — the leading wikilink only.** Each `# Tasks` entry is a list item (`- ` or `N.`); the task is the **first** `[[...]]` on that item. Wikilinks appearing *later* in the same item — in the trailing description after `—`, e.g. a cross-reference to a guide, a Success Criterion, or another goal — are references, NOT tasks; ignore them. (Example: `4. [[Write Goal Lifecycle Guide]] — grid mirroring [[Task Lifecycle Guide]]` names exactly one task, `Write Goal Lifecycle Guide`; `[[Task Lifecycle Guide]]` is a reference, not a phantom missing task.) + 2. **Skip inline-code spans** — a `[[wikilink]]` inside backticks (a literal example in prose) is NOT a task reference; exclude it. + 3. **Strip display aliases** — `[[Real Title|shown]]` resolves against `Real Title`. An unresolved wikilink is the goal-side equivalent of a missing subtask: the goal names work that has no home yet. The owner creates it (`/vault-cli:create-task ""` or clicking the wikilink in Obsidian) before the goal is execution-ready.