Tutorials

Tutorial: plan a change and build it

Step by step from an idea to built and tested code: a change brief, your agent's planning files, Change check, Build with agent and the Tests tab.

This tutorial takes one change from an idea to committed code. You write the intent. Your own AI agent writes the planning files and then the code, and Kitsune checks each step. On a real project it takes about 20 minutes.

You need: Kitsune with a project linked on this computer (see Getting started) and an agent CLI connected in User settings → Agents (see Working with your AI agent). Steps 1 to 3 are free. Steps 4 and 5 need Solo Pro or your organization's Team plan.

The screenshots use the demo project Atlas Payments, an OpenSpec project. A Kitsune-docs project works the same way with work units instead of changes.

1. Write the change brief#

Open your project. In its header, open the menu of Plan from an idea… (▾) and choose Change brief. The brief's steps are on the left. You can jump between them in any order without losing anything.

  1. Basics: a title, for example Refund to the original wallet.
  2. Why & scope: the problem in a sentence or two, then In scope and Out of scope items. Out of scope stops the agent from doing too much.
  3. Acceptance: the behaviour to check. Each criterion has a Trigger and a Response (When …, the system shall …). + Add error case adds what should happen when it goes wrong.
  4. Capabilities: the specs that change. Choose + Add changed capability, pick the spec and say what changes in it.

For a small change, that is the whole brief. Decisions (choices already made, or open ones with their options) and Quality & risks wait under More steps. Add them when you need them, or pick the Full profile.

The change brief creator on the Acceptance step: a criterion with its trigger, response and an error case

Stuck on a step? Press <kbd>⌘</kbd> <kbd>J</kbd> to open the Assistant. Its prompts fit the step, and a proposal it makes fills a field only when you choose Apply.

2. Hand it to your agent#

On Review, choose Create change. Kitsune creates the change folder and offers Hand to your agent. Choose Start with and your agent (for example Start with Claude Code). The agent reads the brief and the project, then writes the planning files: proposal.md, the delta specs, design.md and tasks.md.

Hand to your agent after Create change: the three steps, Start with Claude Code, and the commands for running your agent yourself

The agent can write only Markdown files inside this change's folder, through Kitsune's write tool. It has no shell and no network access. When it finishes, you review each file it wrote as a diff. Discard run puts everything back.

3. Check the change#

Open any file of the change and choose Check change. Kitsune reads the planning files together and lists what is missing or inconsistent, such as a requirement without a scenario, an acceptance criterion no task covers, or a task without a Verify line.

Check change on a change: warnings grouped by file, each with where it is and how to fix it

Fix a warning yourself, or choose Fix with agent to have your agent fix them all (Pro). Run the check again until it shows no warnings. A change with no warnings is approved.

4. Build it with your agent#

Once the change is approved, open its tasks.md and choose Build with agent in the document's header, next to Check change.

  1. A build starts from your last commit. If the planning files your agent wrote aren't committed yet, the sheet tells you first. Choose Commit planning files: one local commit of only this change's folder, with nothing pushed.
  2. Before anything runs, the sheet shows the tasks, the branch kitsune/build/<change>, the check commands Kitsune found in your project (for example npm test) and the limits per task.
  3. Choose how much of the build is yours: Check every task (a first build starts here), Call me when needed or Run overnight. Then choose the start button, which names the work, for example Build 2 tasks.

In a Kitsune-docs project, a work unit is built from its plan.md, and the plan comes only after the spec is accepted. Set the spec's Status to active in the reader's right-hand panel, then let your agent write plan.md. If you choose Build with agent too early, the sheet tells you which of these steps comes next and offers it (see Build with agent).

Kitsune builds in a separate Git worktree, one task at a time:

  1. the agent gets the task and the change's planning files, and edits only the worktree;
  2. Kitsune runs your check commands and Check change itself, and sends failures back for up to two fix rounds;
  3. a passing task is ticked in tasks.md and committed as task <id>: <title>;
  4. the build waits for you.

Build with agent after task 1.2: the line that says what to do next, the tasks, and the task's checks and summary

The line at the top says what to do next. Read the agent's summary and open the changed files to see their diffs. Then choose Continue for the next task, Retry task, or Discard build. If the plan leaves something open, the agent stops and asks instead of guessing. Answer in the sheet and the task runs again. Your own checkout never changes, and Kitsune never pushes. When every task is built, Sync spec with code lets the agent bring the planning files in line with what was built, and Merge into main merges the build into your checkout.

Planned several changes? Build queue builds all the ready ones in a row while you do something else, and the project page tells you how many are ready. See Build queue. If a change also needs work in another repository, tie the changes together in a feature and build them in the order it shows.

5. Turn the acceptance criteria into tests#

Open the project's Tests tab and pick the change as Scope. Each scenario and each acceptance criterion is a test case. The coverage line shows which requirements still have no test case or no error case.

The Tests tab: coverage counts, requirements with their test cases, and a selected test case with its steps

Choose a test case, then Edit steps to write its Gherkin steps, or Ask agent for steps. Kitsune saves the steps next to your specs in openspec/test-cases/, never in the spec itself. Export sends them to Xray, TestRail, Azure Test Plans or plain .feature files.

What you have now#

  • a change with a brief, planning files and no Check warnings, in your repository;
  • a branch with one reviewed commit per task;
  • test cases tied to the spec; they show Spec changed when the spec moves on.

Next: ask the Assistant about your project, or read how Build with agent keeps the agent inside the worktree.