yokoten · 横展

A guide for the journey. A guard at the bridge.

A free command-line tool that catches your AI coding agents' worst mistakes and walks you, stage by stage, along the road good teams use.

One person, a few AI agents, and the habits of a good software team. yokoten was built that way, and every issue, review, and release is in its repo.

12345

The dream

Anyone can build software the way good teams do. Start on day one with the habits most people learn the hard way. The guard stops your agents before the worst mistakes.

The guard
stops a risky command before it runs, and tells the agent why.
The guide
doctor sees which of five stages your project is at, and names the one next step.
The whole cycle
plan, build, test, review, release, maintain: the SDLC. You learn it by doing it in your own project, one stage at a time.

Yokoten (横展) comes from Toyota’s factories. When one production line fixes a defect, every line that could have it gets the fix too. yokoten does that for your projects: a lesson one project learns is offered to the rest.

What changes on day one

Your agent tries to…Without yokotenWith yokoten
force-push, or tag a releaseWithout yokotenit happensWith yokotenstopped before it runs, and told whycodetest
“fix” a failing test by editing the testWithout yokotenthe test passes, the bug staysWith yokotennot allowed in a fixcodetest
commit your email, a server IP, your cityWithout yokotenit goes publicWith yokotenthe commit stops; the report names the file and line, never the textcodetest
open a pull requestWithout yokotenas you, with all your rightsWith yokotenas a bot; nothing merges without youcodetest
work in another projectWithout yokotenstarts from zeroWith yokotensees what that project is missing, and offers to set it upcodetest

See it at work

Three moments from a session. Step through them.

claude code · pre-tool hook
git push --tagsyokoten: git push --tags pushes tags. Only the owner decides when to release. If the owner asked for this, they start the session with YOKOTEN_RELEASE_APPROVAL set.

The agent tries to push a release tag. The hook stops it before it runs, and the agent reads why.

The road

Software teams work in a loop: plan, build, test, review, release. yokoten takes you along it one stage at a time. The yokoten repo does every stage itself, so you can see it working.

  1. doctor: stage 1 · safety net

    Safety netyou are here

    You don’t have to work out where you are. doctor reads your project’s files and says it, for example stage 1 of 5, safety net. A new project starts at stage 1. The order is advice, not a gate.

    You learn
    rules your agents read, and checks that stop them when rules aren’t enough
    See it here
    AGENTS.md
  2. doctor: stage 2 · issues and pull requests

    Issues and pull requests

    You learn
    every change starts as an issue and merges only when CI passes; labels, milestones, and a board keep track
  3. doctor: stage 3 · release

    Release

    You learn
    commit messages that say what changed and why, a changelog, a version number for every release
    See it here
    CHANGELOG.md
  4. doctor: stage 4 · a team of agents

    A team of agents

    You learn
    a bot opens pull requests, workers take tasks, a reviewer checks them; only you merge
    See it here
    the guide
  5. doctor: stage 5 · going public

    Going public

    You learn
    scan every past commit for private data, turn on security settings, protect main
    See it here
    security policy

The road to the dream

Each milestone covers more of the cycle, for more people and more tools.

  1. Now, before 26 Oct 2026

    doctor walks you along the road; a release flow; checks on GitHub settings; npx yokoten; the same guard in Codex and Gemini CLI

    M0

  2. Meta hackathon, 26 Oct – 3 Nov

    an agent that reads an old project and drafts how to adopt yokoten; Muse Code support

    M1

  3. Next

    Gitea and other code hosts; a short spec before larger changes; the OpenSSF Best Practices badge as public proof

    issues

Every step is planned in the open: the board shows what is being built today, and the milestones show what comes next.

Quick start

You need Node 22.18 or later. Nothing else: no build step, no dependencies.

sh
git clone https://github.com/coo1white/yokotennode yokoten/bin/yokoten.ts install  # once per computercd your-projectnode ~/.local/share/yokoten/bin/yokoten.ts init  # once per project

Then open the project in Claude Code. It tells you which stage you are at, and the one next step.

A one-command npx yokoten comes with the npm release.

Check it works

In your project, run doctor. It shows the whole road and marks the next step:

sh
node .yokoten/bin/yokoten.ts doctoryokoten 0.1.0, self-test okthe road: stage 1 of 5, safety net  1. safety net    done        rules    done        tool-hook    done        commit-check    done        runtime    next        tests: CI does not run the tests; add a step that runs `npm test` …  2. issues and pull requests    …

Shortened. Your steps will differ.

To see the guard stop something without running anything, hand it a pretend tool call:

sh
echo '{"tool_name":"Bash","tool_input":{"command":"git push --tags"}}' | node .yokoten/bin/yokoten.ts hookyokoten: git push --tags pushes tags. Only the owner decides when to release. If the owner asked for this, they start the session with YOKOTEN_RELEASE_APPROVAL set.

Nothing is pushed: the hook only reads the call. Exit code 2 means “blocked”.

What it can’t do

Honest limits, from the guide:

  • The guards read command text. A command put together in pieces gets past them. They catch mistakes and drift; they aren’t a lock. The lock is on the server: branch protection, code owners, and a bot that can’t release or change CI.
  • Server settings aren’t checked yet. doctor lists the three steps for the owner. Checking them through the API is planned.
  • Claude Code first. The guard also runs in Codex and Gemini CLI, but nobody has yet seen it block a real session there (#30). Muse Code support is planned.

The full list in the guide

Learn more

Start today

Four lines, once. Or ask your agent to do it.

sh
git clone https://github.com/coo1white/yokotennode yokoten/bin/yokoten.ts install  # once per computercd your-projectnode ~/.local/share/yokoten/bin/yokoten.ts init  # once per project

yokoten · 横展

带你上路, 替你守桥。

一个免费的命令行工具:AI 编程 agent 要闯大祸,它先拦住;好团队怎么做软件,它带你一关一关走一遍。

一个人,带几个 AI,照好团队的规矩做软件。yokoten 就是这么做出来的:每个 issue、每次审查、每个版本,都在它的仓库里,随你翻。

12345

梦想

人人都能像好团队那样做软件。别人吃过亏才学会的习惯,你第一天就照着做。AI 想闯大祸,桥头有人守着。

守卫
危险的命令还没执行,就被它拦下,它还会告诉 AI 为什么。
向导
doctor 看得出你的项目走到了五关里的第几关,每次只告诉你下一步做什么。
整一圈
计划、开发、测试、审查、发版、维护(SDLC)。你在自己的项目里亲手走一遍,一次一关。

「横展」是丰田工厂的说法:一条产线找到了缺陷的对策,所有可能出同样问题的产线都跟着改。yokoten 把这件事搬到你的项目上:一个项目踩过的坑,它会提醒别的项目先填上。

装上的第一天,有什么不同

AI 想做的事没有 yokoten有 yokoten
强推(force push),或者自己打 tag 发版没有 yokoten直接就做了有 yokoten还没执行就被拦下,并告诉它为什么代码测试
测试不过,就去改测试没有 yokoten测试通过了,bug 还在有 yokoten修 bug 时不许改测试代码测试
提交里带上你的邮箱、服务器 IP、所在城市没有 yokoten被公开出去有 yokoten提交被拦下;报告只指出哪个文件第几行,不把内容打出来代码测试
开 PR没有 yokoten用你的账号开,权限和你一样大有 yokoten用 bot 账号开;你不点头,什么都合不进去代码测试
换到另一个项目没有 yokoten一切从头来有 yokoten看出这个项目缺什么,问你要不要补上代码测试

看它怎么干活

一次会话里的三个时刻,点一下看下一个。

claude code · pre-tool hook
git push --tagsyokoten: git push --tags pushes tags. Only the owner decides when to release. If the owner asked for this, they start the session with YOKOTEN_RELEASE_APPROVAL set.

AI 想推一个发版 tag。命令还没执行,hook 就把它拦下,并告诉它为什么。

(提示用英文写,因为 AI 读英文最不容易出错。)

这条路

软件团队的活儿是一圈一圈转的:计划、开发、测试、审查、发版。yokoten 带你一次走一关。每一关,yokoten 自己的仓库都在做,你可以直接看它怎么运转。

  1. doctor: stage 1 · safety net

    安全网你在这里

    走到哪儿了,不用你自己判断。doctor 会看项目里的文件,直接告诉你,比如 stage 1 of 5, safety net(第 1 关,安全网)。新项目从第 1 关开始。顺序只是建议,不会卡住你。

    学会什么
    AI 要读的规则,以及规则管不住时拦下它的检查
    在这里看
    AGENTS.md
  2. doctor: stage 2 · issues and pull requests

    先开 issue,再走 PR

    学会什么
    每次改动先开 issue 说清为什么;CI 通过了才合并;用标签、里程碑(milestone)和看板管起来
    在这里看
    issue、PR、看板
  3. doctor: stage 3 · release

    发版

    学会什么
    写明改了什么、为什么改的提交信息;CHANGELOG;每次发版一个版本号
    在这里看
    CHANGELOG.md
  4. doctor: stage 4 · a team of agents

    带一支 AI 团队

    学会什么
    bot 开 PR,worker 领任务,reviewer 审查;最后拍板的永远是你
    在这里看
    使用指南
  5. doctor: stage 5 · going public

    公开

    学会什么
    把全部提交历史查一遍,看有没有漏出隐私;打开安全设置;保护 main 分支
    在这里看
    安全说明

通往梦想的路

每个里程碑都多覆盖一段开发流程,让更多人、更多工具用得上。

  1. 现在,2026 年 10 月 26 日前

    doctor 带你一关一关走;一套发版流程;检查 GitHub 设置;npx yokoten;在 Codex 和 Gemini CLI 里也一样拦住危险操作

    M0

  2. Meta 黑客松,10 月 26 日至 11 月 3 日

    一个 agent:读懂老项目,起草接入 yokoten 的方案;支持 Muse Code

    M1

  3. 之后

    支持 Gitea 等其他代码托管平台;大改动前先写一份简短的方案;拿到 OpenSSF Best Practices 徽章,谁都能公开查到

    issue

每一步都公开规划。今天在做什么,看板上都有;接下来做什么,里程碑(milestone)里都有。

快速开始

只要装 Node 22.18 或更高版本,别的都不用装:不用构建,也没有依赖。

sh
git clone https://github.com/coo1white/yokotennode yokoten/bin/yokoten.ts install  # 每台电脑一次cd your-projectnode ~/.local/share/yokoten/bin/yokoten.ts init  # 每个项目一次

然后用 Claude Code 打开项目。它会告诉你走到了第几关,下一步该做哪一件事。

等 npm 版发布后,一条 npx yokoten 就能装好。

看看装好了没有

在项目里跑一下 doctor。它会列出整条路,标出下一步:

sh
node .yokoten/bin/yokoten.ts doctoryokoten 0.1.0, self-test okthe road: stage 1 of 5, safety net  1. safety net    done        rules    done        tool-hook    done        commit-check    done        runtime    next        tests: CI does not run the tests; add a step that runs `npm test` …  2. issues and pull requests    …

这里删减过,你看到的步骤会不一样。

想看守卫怎么拦,又不想真的执行什么?给它一个假的工具调用就行:

sh
echo '{"tool_name":"Bash","tool_input":{"command":"git push --tags"}}' | node .yokoten/bin/yokoten.ts hookyokoten: git push --tags pushes tags. Only the owner decides when to release. If the owner asked for this, they start the session with YOKOTEN_RELEASE_APPROVAL set.

什么都不会推送出去:hook 只是读一下这个调用。退出码 2 表示「拦下了」。

它做不到的事

如实说明,摘自使用指南:

  • 守卫只看命令文本。把命令拆开再拼起来就能绕过。它防的是失误和走样,不是一把锁。真正的锁在服务器上:分支保护、代码负责人,以及一个没有发版权限、改不了 CI 的 bot。
  • 还不检查服务器设置。doctor 目前只列出你要在服务器上做的三步,通过 API 自动检查还在计划中。
  • 先支持 Claude Code。守卫在 Codex 和 Gemini CLI 里也能跑,但还没有人在真实会话里见它拦下过命令(#30)。Muse Code 的支持还在计划中。

使用指南里的完整说明

了解更多

今天就上路

四行命令,装一次就好。也可以让 AI 来装。

sh
git clone https://github.com/coo1white/yokotennode yokoten/bin/yokoten.ts install  # 每台电脑一次cd your-projectnode ~/.local/share/yokoten/bin/yokoten.ts init  # 每个项目一次