---
name: obsidian-plan
description: Create or update repository-backed Obsidian project plans with research, decisions, phase cards and a Kanban board. Use for explicit planning work, not routine code changes that do not need a project plan.
---

# Plan a project in Markdown

Use the repository's planning conventions. The companion AGENTS.md defines the
default layout and board reconciliation rules; it should be merged into the
repository instructions during setup. If it is absent, the self-contained
defaults below are enough to create a project. Adapt to an existing vault when
the repository already defines one, without creating a competing structure.

## Establish the work

Use the feature and constraints supplied by the user or current task. Ask for
missing scope only when it prevents useful planning. Read the relevant code,
tests and existing plans before deciding the phases. Separate observed behavior
from assumptions; record concrete paths and unresolved questions.

Planning does not by itself authorize implementing the feature, changing
external systems or committing files. Carry out whichever of those activities
the user has actually requested.

## Create the project

The default vault is `planning/` at the repository root. Keep one board at
`planning/Boards/NN. Project Name.md` and all project notes directly inside
`planning/projects/NN. Project Name/`. Choose the next unused project number
after scanning existing boards and project folders. Leave folders and phase
filenames in place as status changes.

Create these project files:

- `Research.md`: frontmatter `project: "NN. Project Name"` and
  `status: research complete` when supported by the research. Cover the problem,
  existing implementation, architectural constraints, limitations and questions.
  Link older documents where they already live instead of copying them.
- `Planning.md`: the same project property and `status: planned`; a goal, a
  `## Phases` list with one link and one-line description per phase, design
  principles and non-goals. Detailed work belongs in phase cards.
- `decisions.md`: the same project property; append dated entries with Decision,
  Reason, Alternatives and Impact when direction changes. Preserve earlier
  decisions, including ones that later become obsolete.

Also create the board's note, `planning/Boards/NN. Project Name notes.md`. It
carries no frontmatter: a paragraph saying what the project is for, a line
saying where it stands, and links to Research, Planning and decisions. A Kanban
board has nowhere to keep that text — outside a lane the plugin discards it,
inside one it becomes a card — so a client that shows a list's description reads
it from this file, and a reader who only sees the board gets the goal with the
card titles. Do not repeat the phase list in it; the board is already that list.
Keep the note's name in step with the board's when either is renamed.

Number phases from 0. Phase 0 covers the actual prerequisites or foundation;
avoid inventing extra infrastructure to fill it. Make later phases small enough
to implement and validate separately, with dependencies named explicitly.

Each phase file is named `NN.X Project Name — Phase Title.md`, with frontmatter:

```yaml
---
phase: "NN.X"
project: "NN. Project Name"
status: pending
---
```

Include its full title, `Kanban: [[Boards/NN. Project Name]]` and
`Planning: [[projects/NN. Project Name/Planning]]`. Required sections are Goal,
Context, Files, Tasks and Done Criteria. Tasks contains numbered implementation
steps; Done Criteria states observable acceptance and how to check it. Use real
file paths and only commands available in the repository. A fresh session must
be able to act on the phase without reading the conversation.

Mark optional work `status: deferred` and give its resumption condition. Keep
reference-only material as `status: documentation`, without a phase number or
board card.

## Define validation before implementation

Use appropriate existing tests or reproducible checks where they prove the
behavior. A passing build alone does not prove an interaction works. If a person
must run the flow or judge the result, set `verification: manual` and one or more
`verification_kind` values: `app`, `install`, `platform`, `visual`, `live-data`,
`users`.

Add Test Steps with one checkbox and stable ID such as `NN.X-TC01` per
independently confirmable outcome. Each case states prerequisites, test data,
actions, expected result and pass condition. Include blank Actual result and
Verified by and date fields for the runner. Done Criteria requires every manual
case to pass plus any automated gates. Code still to be written remains an
implementation task, even when its phase also requires human acceptance.

Keep performed checks in Evidence. Never prefill a successful result or treat
automated output as a human's sign-off.

## Reconcile the board

Board frontmatter has `kanban-plugin: board`, `project:`, `status:`,
`phases: "done/total"`, `docs:` links to Research, Planning and decisions, and
`notes: "[[Boards/NN. Project Name notes|notes]]"` pointing at the board's note.
Use vault-relative links without the `.md` extension. Write the notes pointer
explicitly rather than leaving the note to be found by name, so a board renamed
in Obsidian keeps it. Each card looks like:

```markdown
- [ ] [[projects/NN. Project Name/NN.X Project Name — Phase Title|NN.X Phase Title]]
```

Always include phases and completed lanes. Pending and in-progress phases go
in phases; done phases go in completed with `[x]`; deferred phases go in
deferred and are excluded from both counts. Use testing only when all remaining
counted work is ready for human verification and at least one phase is done.

Phase status and evidence govern completion. Inspect a changed board checkbox
before accepting it; record the result in the phase. Keep existing cards in
their lane order, append moved cards in their prior board order, then append
new cards in numeric phase order. Preserve annotations and Kanban settings.
Flag malformed or missing phase files rather than deleting their cards.

Update the board's note when the state it describes has changed, and report a
board that has none. Derive planned, started, testing or done from the work; a
zero-phase project is not done. Preserve explicitly deferred or archived
projects. Match the status in Planning.md, refresh its phase links and maintain
`planning/Manual verification.md` as an index of unfinished human gates and
their readiness.

No synchronization command is assumed or supplied. Make the necessary edits,
review the diff, links, counts and manual ordering, and ensure repeating the
reconciliation would not change anything.

When implementation is also requested, keep Tasks and Evidence current and
append decisions as they arise. Once the last counted phase passes, audit the
finished work against code and update current requirements using
`obsidian-prune`, or the repository's equivalent completion procedure. Report
what was created, uncertainties and the next actionable phase; follow the user's
Git instructions rather than assuming a commit or push.
