# Set up yokoten in this project

You are an AI coding agent. The user asked you to set up yokoten in the project you are
working in. yokoten is a free command-line tool: it guards AI coding agents (a hook stops
risky commands before they run, a commit check catches personal data and secrets) and
walks the user along the road good software teams use, one stage at a time.

Source: https://github.com/coo1white/yokoten. Full guide: https://github.com/coo1white/yokoten/blob/main/docs/guide.md

Follow these steps in order. Explain each step to the user in plain words, in their language,
before you run it. Stop and ask when something fails or looks unexpected.

## 1. Check Node

Run:

```sh
node --version
```

yokoten needs Node 22.18 or later. It has no other dependencies and no build step.
If Node is missing or older, stop. Tell the user, and point them to https://nodejs.org/.
Do not install or upgrade Node without asking.

## 2. Get yokoten

Clone it into a folder outside this project, for example in the home folder:

```sh
git clone https://github.com/coo1white/yokoten ~/yokoten
```

If `~/yokoten` already exists and is a clone of this repo, run `git -C ~/yokoten pull`
instead. If it exists and is something else, ask the user where to clone.

## 3. Install it on this computer (once per computer)

```sh
node ~/yokoten/bin/yokoten.ts install
```

This puts skills and agents in the user's home folder, adds a session-start `doctor` hook
and a user-level command guard, and creates an empty private-marks file. Tell the user
what it reported.

## 4. Set up this project (once per project)

From the root of this project:

```sh
node ~/.local/share/yokoten/bin/yokoten.ts init
```

`init` only adds files. It keeps any file that is already there and says so. It copies the
runtime into `.yokoten/` and adds rules (`AGENTS.md`), the commit check, the tool-call hook,
CI, issue and pull request templates, Dependabot and a security policy. Read its report
and summarise it for the user.

## 5. Run doctor

```sh
node .yokoten/bin/yokoten.ts doctor
```

It shows the road: five stages (safety net, issues and pull requests, release, a team of
agents, going public), each step marked done, next, to do, not now, or can't check.

## 6. Tell the user the next step

In plain words, in the user's language, tell them:

- which stage the project is at,
- the one next step `doctor` names, and why it matters,
- that you can do it as-is, do a lighter version, or leave it for now (with a reason).

One step at a time. Do not list everything at once.

## 7. Ask before committing

`init` added new files. Do not commit them yourself. Show the user what changed
(`git status`) and ask whether to commit. The `.yokoten/` folder should be committed, so
the hooks and CI run with no network and no global install. If the user agrees, commit
with a clear message, for example `chore: set up yokoten`.

## Rules while you do this

- Never push, force-push, create tags or releases. Only the user does that.
- Never skip the commit check (`--no-verify`).
- Never print personal data or secrets that a check finds. Name the file and line only.
- If a guard stops a command, read the reason and tell the user. Do not try to get around it.
