https://github.com/fr1j0/bonk
bonk — a pattern-interrupt plugin for Claude Code: stop the agent's wrong path, audit its assumptions, and restart from clean context.
https://github.com/fr1j0/bonk
ai-agents anthropic claude-code claude-code-plugin context-engineering developer-tools llm productivity prompt-engineering slash-commands
Last synced: 3 days ago
JSON representation
bonk — a pattern-interrupt plugin for Claude Code: stop the agent's wrong path, audit its assumptions, and restart from clean context.
- Host: GitHub
- URL: https://github.com/fr1j0/bonk
- Owner: fr1j0
- License: mit
- Created: 2026-06-16T05:46:14.000Z (23 days ago)
- Default Branch: main
- Last Pushed: 2026-06-23T09:52:21.000Z (15 days ago)
- Last Synced: 2026-06-23T12:11:57.960Z (15 days ago)
- Topics: ai-agents, anthropic, claude-code, claude-code-plugin, context-engineering, developer-tools, llm, productivity, prompt-engineering, slash-commands
- Language: Shell
- Size: 371 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bonk
Pattern-interrupt & context re-grounding for Claude Code — stop the wrong path, audit the assumptions, restart clean.
---
When the agent commits to a wrong path and keeps compounding it — defending the
bad approach turn after turn — `bonk` halts it, audits what it's actually
assuming, and (when the context is too far gone) restarts from a clean, verified
problem statement re-derived by a fresh-context subagent.
The real problem usually isn't the model's reasoning — it's the **polluted
context** it keeps conditioning on (stale assumptions, dead ends, its own prior
commitments). `bonk` is about re-grounding that context, not scolding the model.
## Install
In Claude Code:
```
/plugin marketplace add fr1j0/bonk
/plugin install bonk@bonk
```
Then use `/bonk:it` and `/bonk:resume`.
## Usage ritual
`bonk` runs *after* you've stopped the agent (a slash command can't interrupt a
running turn — only `Esc` can):
```
Esc # stop the wrong-path execution immediately
(Esc Esc # optional: rewind to undo bad edits
or /rewind)
/bonk:it [hint] # re-ground on the clean state
```
> Note: `/rewind` only undoes edits made by Claude's edit tools — not bash
> side-effects (`rm`/`mv`/generated files), which need git.
> Note: run `/bonk:it` and `/bonk:resume` in the **same project**. The clean brief
> is saved under the repo root's `.bonk/` (resolved via `git`, so any subdirectory
> of the repo works), but resuming from a *different* repo — or outside any repo,
> where it anchors to the working directory — won't find it.
## Commands
- **`/bonk:it [optional hint]`** — emits a **Drift check** report: what triggered
it, a plain-language verdict (*start over* or *keep going*), the load-bearing
assumptions ranked by confidence, and the context it's working from. On *start
over*, a fresh-context subagent re-derives the approach blind to the bad turns;
you approve, and it persists a clean brief.
- **`/bonk:resume`** — after you `/clear`, rehydrates the clean brief into the
fresh context and continues from the corrected approach.
> Want to see the report format? Run `bash plugins/bonk/scripts/preview-report.sh`
> for a rendered sample.
## Status
v0.5.0 shipped. See [the design spec](docs/superpowers/specs/2026-06-16-bonk-design.md)
for the full design and [the plan](docs/superpowers/plans/2026-06-16-bonk-v1.md)
for how it was built; the [report-format redesign](docs/superpowers/specs/2026-06-16-report-format-redesign-design.md)
and the [visual redesign](docs/superpowers/specs/2026-06-23-report-visual-redesign-design.md)
(banners, monochrome icons, grid) cover the current Drift-check report.