Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ columns or more.

1. **Plan.** Ask for one, like _"plan the export feature"_. Claude grills you on the
design until you both agree, then writes `SCOPE.md`, `TASKS.md`, `QUESTIONS.md`
and `PROGRESS.md` in your configured `projectsDir`.
and `PROGRESS.md` in your plan folder (see Where plans live).
2. **Agree the criteria.** Settle each pull request's acceptance criteria before its
first task starts.
3. **Run a task.** `/next-task` picks the first task that isn't blocked (or use
Expand Down Expand Up @@ -117,6 +117,32 @@ columns or more.
| `progress-reminder` | After a commit, reminds you to close the task in `PROGRESS.md` |
| `version-bump` | In a repo that ships `.claude-plugin/plugin.json`, bumps the patch version on a branch's first commit and blocks a push that didn't bump it |

## Where plans live 🗂️

Plans are written to one of two places:

- **The repo** (default, and the source of truth). `projectsDir` in `workflow.json`,
`docs/projects` unless you change it.
- **An Obsidian vault**, chosen per machine. Set it in `.claude/workflow.env`, which
is untracked: `.claude/.gitignore` keeps it out of git, so teammates keep the repo
folder.

| Key in `.claude/workflow.env` | What it holds |
| --- | --- |
| `TASKFLOW_PLANS_SOURCE` | `repo` or `obsidian`. Anything else, or missing, means `repo` |
| `TASKFLOW_OBSIDIAN_VAULT` | The vault's folder name, looked up in Obsidian's vault list |
| `TASKFLOW_OBSIDIAN_VAULT_PATH` | The vault's absolute path instead; it wins over the name |
| `TASKFLOW_OBSIDIAN_PATH` | The folder inside the vault, e.g. `taskflow/my-repo` |

See [`examples/workflow.env.example`](examples/workflow.env.example). `/init-workflow`
and the Taskflow panel both set it for you. With Obsidian on, plans are read and
written in the vault only, and a bad vault setting stops with a message instead of
falling back to the repo.

> 💡 Plan files in a vault are written by absolute path, which asks permission every
> time. Add the vault to `permissions.additionalDirectories` in
> `.claude/settings.local.json` to stop the prompts.

## Configuration ⚙️

Everything specific to your repo lives in one file you own: `.claude/workflow.json`.
Expand All @@ -125,7 +151,7 @@ Everything specific to your repo lives in one file you own: `.claude/workflow.js

| Key | What it holds |
| --- | --- |
| `projectsDir` | Where plan folders live |
| `projectsDir` | Where plan folders live in the repo (see Where plans live above) |
| `gates` | Your lint, types, unit and e2e commands |
| `e2eTriggerPaths` | File patterns whose changes make the e2e suite run |
| `docsChecklist` | Each doc and what it covers, checked before a behaviour change is done |
Expand Down
3 changes: 2 additions & 1 deletion commands/deviation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ argument-hint: "<what turned out differently>"
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
Expand Down
2 changes: 2 additions & 0 deletions commands/next-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions commands/plan-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<projectsDir>/$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 `<plan dir>/$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.
Expand Down
13 changes: 13 additions & 0 deletions examples/workflow.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copy to .claude/workflow.env - machine-specific and never committed
# (.claude/.gitignore lists it). Leave it out to keep plans in the repo.

# Where plans live: "repo" (projectsDir in workflow.json) or "obsidian".
TASKFLOW_PLANS_SOURCE=obsidian

# The vault, by folder name (matched against your Obsidian vault list)...
TASKFLOW_OBSIDIAN_VAULT=MyVault
# ...or by absolute path, which wins over the name.
# TASKFLOW_OBSIDIAN_VAULT_PATH=/Users/you/Documents/MyVault

# The folder inside the vault: no "..", no leading "/".
TASKFLOW_OBSIDIAN_PATH=taskflow/my-repo
53 changes: 47 additions & 6 deletions skills/init-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ 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.

| What you found | What to do |
| -------------- | ---------- |
| 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.
Expand All @@ -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 |
Expand Down Expand Up @@ -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/<repo-name>`.

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:
Expand Down Expand Up @@ -210,11 +240,22 @@ 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=<basename>`
for a listed vault whose basename no other vault shares, or
`TASKFLOW_OBSIDIAN_VAULT_PATH=<path>` for a typed one or a shared basename, and
`TASKFLOW_OBSIDIAN_PATH=<inner path>`. On a re-run, change only the keys asked
about; moving back to the repo sets `TASKFLOW_PLANS_SOURCE=repo` and keeps the
vault keys. 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.

Expand Down Expand Up @@ -269,4 +310,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.
5 changes: 3 additions & 2 deletions skills/init-workflow/templates/CLAUDE-workflow-section.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<PROJECTS_DIR>/<project-name>/`. Run `/plan-start
<project-name>` to scaffold them.
`PROGRESS.md` in `<project-name>/` under the plan directory
`.claude/workflow.json` / `.claude/workflow.env` resolve (see plan-start). Run
`/plan-start <project-name>` to scaffold them.

<!-- Keep the next paragraph only if this repo also uses another planning or
implementation workflow. Delete it otherwise: it answers a question a
Expand Down
17 changes: 16 additions & 1 deletion skills/plan-start/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<projectsDir>/<project-name>/` 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: `<plan dir>/<project-name>/` - 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:

Expand All @@ -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 `<vault>/<TASKFLOW_OBSIDIAN_PATH>`; otherwise it is `<repo>/<projectsDir>`. 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.
Expand Down
6 changes: 5 additions & 1 deletion skills/task-run/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down Expand Up @@ -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.

Expand Down
Loading