From b8a570cdd8ce4c39c21455ec1f7a1c80e4c80218 Mon Sep 17 00:00:00 2001 From: Guilherme Moraes Date: Wed, 21 Oct 2026 13:02:28 -0300 Subject: [PATCH 1/5] feat: skills and commands locate plans through the configured plan source Plans live under projectsDir in the repo, or in an Obsidian vault when .claude/workflow.env sets TASKFLOW_PLANS_SOURCE=obsidian. --- commands/deviation.md | 3 ++- commands/next-task.md | 2 ++ commands/plan-status.md | 4 ++-- skills/plan-start/SKILL.md | 17 ++++++++++++++++- skills/task-run/SKILL.md | 6 +++++- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/commands/deviation.md b/commands/deviation.md index 98f8203..29f14bb 100644 --- a/commands/deviation.md +++ b/commands/deviation.md @@ -4,7 +4,8 @@ argument-hint: "" allowed-tools: Read, Edit, Glob, Bash --- -Append a session-log entry to the active `PROGRESS.md` recording: `$1` +Append a session-log entry to the active `PROGRESS.md` - under the plan dir the +`plan-start` skill's **Where plans live** section locates - recording: `$1` Shape it as: today's date, the task ID, the commit hash if one has landed, then **Deviation:** what the plan called for, what turned out to be true, and what was diff --git a/commands/next-task.md b/commands/next-task.md index e99b955..38af039 100644 --- a/commands/next-task.md +++ b/commands/next-task.md @@ -4,6 +4,8 @@ argument-hint: "[TASK-ID]" allowed-tools: Read, Edit, Glob, Grep, Bash --- +Locate the plan as the `plan-start` skill's **Where plans live** section says. + Take the task named by `$1`. Without an argument, take the first ⬜ task row in `PROGRESS.md` whose blockers are all settled and whose pull request's acceptance criteria are agreed - and if the frontier holds more diff --git a/commands/plan-status.md b/commands/plan-status.md index a0bac4c..fcce422 100644 --- a/commands/plan-status.md +++ b/commands/plan-status.md @@ -4,8 +4,8 @@ argument-hint: "[project-name]" allowed-tools: Read, Glob, Bash --- -Find the active plan under the `projectsDir` from `.claude/workflow.json`. With -an argument, use `/$1/`. Without one, use the folder whose +Find the active plan under the plan dir, located as the `plan-start` skill's +**Where plans live** section says. With an argument, use `/$1/`. Without one, use the folder whose `PROGRESS.md` was modified most recently; if several are close, list them and ask. Read `PROGRESS.md` for state and `QUESTIONS.md` for the questions themselves. diff --git a/skills/plan-start/SKILL.md b/skills/plan-start/SKILL.md index e253ca9..8b1dee3 100644 --- a/skills/plan-start/SKILL.md +++ b/skills/plan-start/SKILL.md @@ -11,7 +11,7 @@ No code is touched until these four files exist. `.claude/workflow.json` gives `projectsDir` and the tier-to-model mapping. If it is missing, run `init-workflow` first - do not guess a mapping, it is the repo owner's call. -Target: `//` holding `SCOPE.md`, `TASKS.md`, `QUESTIONS.md` and `PROGRESS.md`. Kebab-case the project name from the user's words. If the folder already exists, read it and continue that plan instead of overwriting it. +Target: `//` - see [Where plans live](#where-plans-live) holding `SCOPE.md`, `TASKS.md`, `QUESTIONS.md` and `PROGRESS.md`. Kebab-case the project name from the user's words. If the folder already exists, read it and continue that plan instead of overwriting it. Four files, one job each: @@ -22,6 +22,21 @@ Four files, one job each: | `QUESTIONS.md` | every open decision, its options, its consequences, a recommendation | | `PROGRESS.md` | the ledger - tasks and questions interleaved in order, plus the log | +### Where plans live + +`.claude/workflow.json` `projectsDir` (default `docs/projects`) is the repo plan folder. The untracked `.claude/workflow.env` may override it with these keys, and no others: + +| Key | Meaning | +| ------------------------------ | -------------------------------------------------------------------- | +| `TASKFLOW_PLANS_SOURCE` | `repo` or `obsidian`; missing or anything else means `repo` | +| `TASKFLOW_OBSIDIAN_VAULT` | vault folder name, matched against the basenames of `vaults.*.path` in `~/Library/Application Support/obsidian/obsidian.json` | +| `TASKFLOW_OBSIDIAN_VAULT_PATH` | absolute vault path; wins over the name | +| `TASKFLOW_OBSIDIAN_PATH` | path inside the vault - no `..`, no leading `/` | + +When the source is `obsidian`, the plan dir is `/`; otherwise it is `/`. If neither vault key is set, the vault name matches no vault or several, or the inner path is invalid, stop and tell the user - never fall back to the repo silently. + +Plan files in a vault are read and written by absolute path. That prompts for permission unless the vault is listed in `permissions.additionalDirectories`. + ## 2. Understand before planning Read the code the work touches. A plan written from the request alone produces tasks that turn out wrong on contact. diff --git a/skills/task-run/SKILL.md b/skills/task-run/SKILL.md index 6114f0a..22f156d 100644 --- a/skills/task-run/SKILL.md +++ b/skills/task-run/SKILL.md @@ -13,6 +13,10 @@ then one task per **independent** pull request may run at once - see [Parallel pull requests](#parallel-pull-requests). Still one task each, and still reviewed one at a time. +The plan's `TASKS.md`, `QUESTIONS.md` and `PROGRESS.md` live under the plan dir +the `plan-start` skill's **Where plans live** section locates - possibly an +Obsidian vault outside the repo. + ## The cycle ``` @@ -116,7 +120,7 @@ shape changed. ### When a decision should outlive the plan -The plan folder is gitignored. A decision that meets all three of hard to +The plan folder is gitignored or outside the repo. A decision that meets all three of hard to reverse, surprising without context, and a genuine trade-off belongs in the repository, not in a file that dies with the project folder. From fe20ad335ec5e8c947d5ff1ae77ebb19e117ba75 Mon Sep 17 00:00:00 2001 From: Guilherme Moraes Date: Wed, 21 Oct 2026 13:03:03 -0300 Subject: [PATCH 2/5] chore: bump the plugin version to 0.8.0 --- .claude-plugin/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5bc57ce..56ca4d6 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "taskflow", "description": "Plan-and-task workflow: scope/tasks/questions/progress scaffolding split into pull requests under a line budget, acceptance criteria agreed up front, tests red before green, one-task-per-commit cycle, questions answered at the task that needs them, red-first bug fixes, docs-and-diagram sync, standards review.", - "version": "0.7.3", + "version": "0.8.0", "types": "./types/index.d.ts", "author": { "name": "Guilherme Moraes" }, "license": "MIT" From 8245c4684760b0813d25463dc1509db2e2d61b67 Mon Sep 17 00:00:00 2001 From: Guilherme Moraes Date: Wed, 21 Oct 2026 13:04:03 -0300 Subject: [PATCH 3/5] feat: init-workflow offers an Obsidian vault as the plan source --- skills/init-workflow/SKILL.md | 51 ++++++++++++++++--- .../templates/CLAUDE-workflow-section.md | 5 +- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/skills/init-workflow/SKILL.md b/skills/init-workflow/SKILL.md index 693eb6d..5153b18 100644 --- a/skills/init-workflow/SKILL.md +++ b/skills/init-workflow/SKILL.md @@ -9,11 +9,11 @@ Every other skill in this plugin reads `.claude/workflow.json`. This skill write ## 0. If the config already exists, this is a re-run -Read `.claude/workflow.json` before anything else. When it is there, the owner +Read `.claude/workflow.json` and `.claude/workflow.env` before anything else. When either is there, the owner has already answered - **never re-ask from scratch and never silently overwrite.** -Run the detection in step 1 anyway, then report the file's current values beside +Run the detection in step 1 anyway, then report both files' current values beside what you found, and ask a single question: keep the config as it stands, or change it. @@ -21,7 +21,7 @@ change it. | -------------- | ---------- | | Detection agrees with the file | Say so and stop. A re-run that changes nothing is the expected outcome | | Detection found drift - a renamed script, a doc that no longer exists, a new diagram folder | List each difference as `current -> found` and ask which to keep, per field | -| The owner wants a tier, the diagram decision or a pull-request convention changed | Re-ask **only** those questions, carrying the current value as the first option, labelled `(current)` | +| The owner wants a tier, the diagram decision, the plan source or a pull-request convention changed | Re-ask **only** those questions, carrying the current value as the first option, labelled `(current)` | Preserve every field you were not asked to change, including any the owner hand edited after the last run. Write the file only once the answers are in. @@ -30,7 +30,7 @@ edited after the last run. Write the file only once the answers are in. | Field | How to fill it | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `projectsDir` | An existing plan folder if the repo has one (`docs/projects`, `.planning`, or wherever plans already live); otherwise `docs/projects` | +| `projectsDir` | An existing plan folder if the repo has one (`docs/projects`, `.planning`, or wherever plans already live); otherwise `docs/projects`. Whether plans live there or in an Obsidian vault is **asked - see below** | | `gates` | Read `package.json` scripts, or the `Makefile`, `justfile`, `Cargo.toml`, `pyproject.toml`. Map lint / types / unit / e2e to the **script names that exist**. Omit a gate the repo has no script for - never invent one | | `e2eTriggerPaths` | The paths whose changes need the slow suite. Ask if it is not obvious | | `docsChecklist` | One row per doc that must stay true, each with what it owns. Read the repo's docs before writing rows | @@ -63,6 +63,36 @@ that does not keep one is a practice decision, and it belongs to the owner - say in your report that the key is unset and what that costs: a hard decision made during a plan lives only in the gitignored plan folder and is lost with it. +### Where plans live - ask + +The rule is in plan-start's [Where plans live](../plan-start/SKILL.md#where-plans-live). +The repo folder stays the default source of truth; a vault is the owner's choice. +List the vaults this machine knows: + +```bash +jq -r '.vaults[].path' "$HOME/Library/Application Support/obsidian/obsidian.json" +``` + +Ask with its own `AskUserQuestion` call, one option each: + +- the repo folder - `projectsDir` from above - labelled `(Recommended)`; +- each vault found - label the folder basename, description the path. With no + `obsidian.json`, offer none; +- an absolute vault path, typed through Other. + +On a vault, a follow-up asks the path inside it, default `taskflow/`. + +Then tell the owner how the Obsidian setup works, in a few lines: + +- `.claude/workflow.env` holds the machine-specific keys and is never committed; + `projectsDir` in `workflow.json` keeps the repo folder. +- `TASKFLOW_PLANS_SOURCE` picks the source of truth - `repo` unless it says + `obsidian`. Only that source is read. +- The Taskflow panel shows these settings and edits them. +- Plan files in the vault are written by absolute path, which prompts every + time. Adding the vault to `permissions.additionalDirectories` in + `.claude/settings.local.json` stops that - offer to do it. + ## 2. Ask which model takes each tier Every task in a plan declares a difficulty tier, and the tier binds the runner: @@ -210,11 +240,20 @@ Codex model id when a tier runs on Codex: "models": { "deep": "opus", "surface": "sonnet", "mechanical": "haiku" } ``` +Leave `projectsDir` as step 1 found it, whatever the plan source. + +On a vault choice, write `.claude/workflow.env` with only the keys plan-start +allows: `TASKFLOW_PLANS_SOURCE=obsidian`, `TASKFLOW_OBSIDIAN_VAULT=` +for a listed vault or `TASKFLOW_OBSIDIAN_VAULT_PATH=` for a typed one, and +`TASKFLOW_OBSIDIAN_PATH=`. On a re-run, change only the keys asked +about. Make sure `.claude/.gitignore` exists and lists `workflow.env`. + Write `"aiSignature": false` unless the owner asked for AI attribution in commits. It is the switch for every `Co-Authored-By` trailer and "Generated with" line the workflow writes, and a missing key means `false`. -Gitignore the per-project plan folders. Plans are working documents: committing +Gitignore the per-project plan folders - skip this for a vault source, which is +outside the repo. Plans are working documents: committing them invites code and commit messages to cite them, and a citation to a gitignored file points at nothing. @@ -269,4 +308,4 @@ A prose invariant rots the first time someone edits without reading it. force is needed. Confirm they are active with `/hooks`. Report the tier mapping, the diagram decision and the pull-request conventions that were chosen, which gates -were detected, which were missing, and what you gitignored. +were detected, which were missing, where plans live, and what you gitignored. diff --git a/skills/init-workflow/templates/CLAUDE-workflow-section.md b/skills/init-workflow/templates/CLAUDE-workflow-section.md index ca1e829..69b397c 100644 --- a/skills/init-workflow/templates/CLAUDE-workflow-section.md +++ b/skills/init-workflow/templates/CLAUDE-workflow-section.md @@ -7,8 +7,9 @@ Paste into the target repo's `CLAUDE.md`, replacing the bracketed values. ## Workflow Before touching code, create `SCOPE.md`, `TASKS.md`, `QUESTIONS.md` and -`PROGRESS.md` in `//`. Run `/plan-start -` to scaffold them. +`PROGRESS.md` in `/` under the plan directory +`.claude/workflow.json` / `.claude/workflow.env` resolve (see plan-start). Run +`/plan-start ` to scaffold them.