| name | setup |
| description | Turn your team's AI friction into better docs — sets up togi with an inert adoption note, a reviewable PR, and per-developer opt-in capture |
| allowed-tools | ["Bash(git add *)","Bash(git branch *)","Bash(git checkout *)","Bash(git fetch *)","Bash(git rev-parse *)","Bash(git remote *)","Edit","Read","Skill(togi:enable)","Write"] |
Instructions
If any step in any phase fails, stop and report the error — do not improvise workarounds.
Phase 1: Explain and get consent
Output the following text verbatim before taking any other action:
Togi (研ぎ, to sharpen) turns AI friction — corrections, clarifications, denied tool calls — into context-doc pull requests. For developers who opt in, the working model jots a short note when it hits friction (and a hook records denied tool calls); once enough notes accumulate under .togi/friction/pending/, /togi:update-context-docs turns them into a doc PR.
What this setup commits: nothing executable. Three inert files — .gitignore entries, an adoption note at adopt-togi.md, and a pointer in CONTRIBUTING.md (or README.md). No repo-level marketplace registration or plugin enablement: teammates get togi only by installing it themselves, and capture stays off for everyone (TOGI_ENABLED=0) until each developer personally opts in — you'll be offered that at the end of this setup.
Cost. Capture runs inside your normal Claude Code session — the model writes a short note when it hits friction — so there is no separate API call and no meaningful added cost. Denied tool calls are recorded by a local hook for free.
Privacy. Everything stays on your machine: friction notes are written locally under .togi/friction/ (git-ignored), and nothing is sent to any third party. Capture happens in your own session under your own credentials.
Opt in or out any time with /togi:enable / /togi:disable — personal, never committed.
Use AskUserQuestion to ask: "Do you want to proceed with the installation?" Options: Yes, proceed / No, cancel.
If the user selects No, stop.
Phase 2: Commit the adoption note and .gitignore entries
Output the following text verbatim before taking any other action in this phase:
Making three inert changes:
- the adoption note
adopt-togi.md
- a pointer in
CONTRIBUTING.md / README.md
.gitignore entries
Nothing touches .claude/settings.json — committing marketplace or plugin entries would push togi's hooks onto every teammate's machine, and togi only runs where its owner installed it.
Teammates who have togi see a one-time notice toward /togi:enable; until they opt in, nothing runs. Set TOGI_EVENT_THRESHOLD (default 10) to choose how many friction events trigger the startup reminder.
1. Adoption note
Write adopt-togi.md with exactly this content:
# This repo uses togi (研ぎ)
[Togi](https://github.com/gwenneg/togi) turns AI friction — corrections, clarifications, denied tool calls — into context-doc pull requests. Capture is opt-in per developer and runs inside your normal Claude Code session, so it adds no meaningful cost.
To participate, run in Claude Code:
/plugin marketplace add gwenneg/claude-ichiba
/plugin install togi@claude-ichiba
/reload-plugins
/togi:enable
Disable togi any time with /togi:disable. This file is togi's adoption note: it records that this repo adopted togi, and its presence lets togi show a one-time opt-in notice to developers who already have the plugin installed — nothing in this repo installs or runs anything by itself.
2. Contributor docs pointer
If CONTRIBUTING.md exists, append the following section to it; otherwise append it to README.md:
## AI friction capture (togi)
This repo uses [togi](https://github.com/gwenneg/togi) to turn AI friction into context-doc improvements. Participation is opt-in per developer — see [adopt-togi.md](adopt-togi.md) for the setup commands.
3. .gitignore
Append any of the following lines that are not already present in .gitignore. Do not gitignore .claude/ wholesale — that would hide files teams commit deliberately (commands, agents, skills):
/.claude/settings.local.json
/.togi/
Report
After completing all steps, print a summary of what was added vs. already present for each file touched: adopt-togi.md, the CONTRIBUTING.md/README.md pointer, and .gitignore.
Phase 3: Offer to enable capture for this developer
Capture is dormant until each developer opts in. Use AskUserQuestion to ask: "Enable friction capture for yourself now?" Options: This repo only / All my repos / Not now.
- This repo only — run
/togi:enable repo.
- All my repos — run
/togi:enable all.
- Not now — skip; mention that
/togi:enable works at any time.
The enable skill owns the opt-in commands and confirmation outputs — do not inline or restate them here.
Phase 4: Commit and open a PR
-
Pick the base remote: upstream if it exists (fork workflow — origin is the fork and may be stale), otherwise origin. Call it <remote> below. Detect that remote's default branch, falling back to main if it can't be determined.
-
Pick a unique branch name: chore/setup-togi, appending -2, -3, … if git branch --list shows it taken.
-
Branch from the up-to-date default — never from the current HEAD, which may carry unrelated work. The Phase 2 changes are uncommitted and carry over:
git fetch <remote>
git checkout -b chore/setup-togi <remote>/<default-branch>
-
Stage exactly the three Phase 2 files — adopt-togi.md, .gitignore, and the pointer file — then commit with message: chore: set up togi
-
Push the branch to origin (on a fork that is your fork; gh pr create then targets the upstream repo automatically), and open a PR titled Set up togi with this body (adjust the pointer filename; append the standard Generated with Claude Code footer):
Sets up [togi](https://github.com/gwenneg/togi). Every time Claude stumbles in this repo — a wrong assumption, a missing convention, a denied command — that's a gap in our context docs. Togi captures those moments and turns them into doc PRs, so the same stumble doesn't happen twice.
**Is this safe to merge?** Yes — and you can verify it from the diff alone. The entire change is three inert text files: the adoption note `adopt-togi.md`, a pointer in `CONTRIBUTING.md`, and `.gitignore` entries. No settings, no hooks, no code: merging installs nothing and runs nothing on anyone's machine. If the diff shows anything beyond those files, reject this PR.
**Trying it costs a minute.** Run the commands in `adopt-togi.md`, work normally, and check `.togi/friction/pending/` after a few sessions. Capture is opt-in per developer and runs inside your own session — the model writes a short note when it hits friction, nothing is sent to any third party, and there's no meaningful added cost. Haven't opted in? You'll see a one-time notice and nothing else will ever run. Leave any time with `/togi:disable`.