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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: `/vault-cli:create-task` and its `task-creator` agent no longer fall back silently to the configured default vault. `commands/create-task.md` documented `--vault` as optional with an implicit default, and `agents/task-creator.md` stated it outright (`Defaults: MODE = interactive, VAULT = configured default vault`) — so a task belonging to one vault was placed in another by inference, and the silent fallback is a **third** vault again, wrong for work belonging to any other. Both now resolve the vault from `--vault` or from the cwd, and **ask** when neither determines it — the convention `commands/reflect.md` (*"If cwd is not inside any vault path, ask the user which vault to write to"*) and `agents/graph-auditor.md` (*"ask user which vault to audit; do not guess"*) already carry, so this brings the pair in line with their siblings rather than adding a new rule. Observed 2026-10-15: a task belonging to `seibert-personal` was created in `seibert-brogrammers` by inference and had to be deleted and re-created, costing two `task-creator` runs (~105k tokens).

## v0.169.1

- fix: `/vault-cli:session-close` removes a worktree the session itself created, once it is provably finished with, instead of listing it as an outstanding item and asking for an `approve:` line. Phase 3.5 already detects orphan worktrees with a forge-agnostic merge test, and `~/.claude/settings.json` already allows `Bash(git worktree remove:*)` — so the gate was self-imposed by one sentence: *"Don't auto-remove — the user may have local changes they want to inspect first."* Measured 2026-10-15: the closer `approve: git worktree` key fired in **11 sessions / 26 events over 7 days**, with `remove` following in 12 of 13 sessions. Three no-ask conditions are now stated — the session created the worktree and has finished with it (never its own cwd, which cannot be removed while the session lives), its branch is merged **by the file's own test** (the merge-second-parent match, or the commit count for a squash- or rebase-merged branch; never a forge-specific `gh pr view`), and its working tree is clean — and removal is reversible, since the commits are merged and `git worktree add` recreates the checkout. The still-asks cases are named too: uncommitted work, another session's worktree, or a merge test that cannot be shown. The old blanket prohibition is gone rather than supplemented, and the mode-3 item 3 example now states it covers the still-asks cases only.
Expand Down
6 changes: 3 additions & 3 deletions agents/task-creator.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You create one task file in the configured vault. You read the vault config via

<constraints>
- NEVER hardcode vault paths, tasks directories, or default assignees — read everything from `vault-cli config list --output json`
- NEVER assume a single vault name; resolve via `--vault` argument or default vault
- NEVER assume a single vault name; resolve via the `--vault` argument, and ask the caller when it is absent — never fall through to `default_vault`
- NEVER overwrite an existing task file — fail with a clear error on collision
- NEVER add auto-assignment logic; leave `assignee` empty unless the user supplies one
- NEVER number filenames or add timestamps unless the vault convention requires it
Expand All @@ -37,15 +37,15 @@ Input form: `[task description] [--non-interactive] [--vault NAME]`.
- `--vault NAME` → target vault override
- Remaining tokens → task description / title

Defaults: MODE = `interactive`, VAULT = configured default vault.
Defaults: MODE = `interactive`. VAULT has no default — it comes from `--vault`, or is asked for when absent.

## 2. Resolve vault config

```bash
vault-cli config list --output json
```

Find the vault entry matching the requested vault name (or `default_vault` from the same config). From that entry, extract:
Find the vault entry matching the requested vault name — the caller resolves it (`--vault`, or the vault the cwd sits in); this agent never falls back to `default_vault`. From that entry, extract:

- `path` — vault root (already resolved absolute path)
- `tasks_dir` — task folder (e.g. `40 Tasks`, `24 Tasks`); if absent, fall back to `Tasks`
Expand Down
10 changes: 9 additions & 1 deletion commands/create-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ Create one task file in the vault. Which agent performs the write depends on whe
- `--docs-only` → `ROUTE=docs` (explicit)
- `--code` → `ROUTE=code` (explicit)
- `--non-interactive` (deprecated alias: `--tool`) → `MODE=non_interactive` (JSON output, no prompts)
- `--vault NAME` → target a specific vault (otherwise the default vault from `~/.vault-cli/config.yaml`)
- `--vault NAME` → target a specific vault (otherwise resolve it per **Resolve the vault** below — never fall through to the default vault)
- Remaining text → task description / title

**`MODE` defaults to `interactive` when `--non-interactive` is absent.** The route block below switches on it, so it is always assigned — an unset `MODE` matches neither arm and leaves `ROUTE` unassigned.

## Resolve the vault

- `--vault NAME` given, or cwd inside a vault path → use it.
- Neither → ask with `AskUserQuestion`, offering the vault names from `vault-cli config list`. Never infer the vault from the task's topic, and never fall through to `default_vault`: the configured default is a different vault, and landing there is a silent wrong answer.
- **`MODE=non_interactive`** → do not ask and do not default. Fail with `❌ Pass --vault — the vault cannot be inferred headlessly.` and STOP. Mirrors the route block's arm above: a headless caller cannot answer, and a wrong guess silently takes the wrong path.

Same convention as `commands/reflect.md` and `agents/graph-auditor.md` — resolve the vault, or ask; do not guess.

## Resolve the route

Every path below either assigns `ROUTE` or stops; nothing falls through.
Expand Down
Loading