codebugs CLAUDE.md

Repository instructions for Codebugs, a code-finding and requirements tracker backed by SQLite and exposed through an MCP server and command-line tool. SQLite is a file-based database.

In plain words
What is it for?
Use them when editing Codebugs, following its branch and worktree rules, installing its hooks, or preparing and merging changes.
Why use it?
They define the project's enforced workflow so code changes happen on branches and in separate worktrees instead of directly on the main branch.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/faxik/codebugs/claude-md
Clone the repo
git clone --depth 1 https://github.com/faxik/codebugs
Per session 45,188 This file is loaded in full into every session.
When invoked 45,188 The same file — it is already loaded in full.
Security scan C 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.45188 $0.45188
Opus 5 $0.22594 $0.22594
Sonnet 5 $0.09038 $0.09038
Haiku 4.5 $0.04519 $0.04519

Measured yesterday against content hash 521fb95fb9f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

codebugs CLAUDE.md scanned grade C with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

**(12) STRIP WITH VISIBILITY, ON THE ADD PATH ONLY (CB-56/CB-60, closed by the wire pin at CB-160).** `add`/`batch_add` do not REFUSE a caller-supplied `meta` key that is identity machinery's own OUTPUT (`occurrences`, `

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

over stdio — and `subprocess` is used legitimately for git, which can of course run `curl`. What is

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **`OSError` arrives from ambient sources, not just from `open()` — and a guard spelled as one errno is an enumeration (CB-79).** A sweep for `open(` structurally cannot see `os.getcwd()`, `subprocess`, `Path.read_text`
CLAUDE.md · 1,156 lines

How it starts

The opening of the file, as written. The whole thing — 1,156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebugs

AI-native code finding & requirements tracker. SQLite-backed, exposed via MCP server + CLI.

Workflow — main is never edited directly

Every code edit happens on a short-lived branch, in a worktree, and tools/ enforces it. Borrowed from ../autosorter (2026-08-16), including a scaled-down port of its tools/worktree-*.sh harness.

This section once said the harness was unnecessary — "plain git is enough" — and that claim was falsified within two hours by the very rule it was introducing (CB-50). It landed at 13:37 on 2026-08-16 (2957070) mandating a typed branch and git merge --no-ff; at 15:30 main was advanced by merge worktree-cb-45-similarity-seam: Fast-forward — no type prefix, no merge commit, and by then pointing at main's own SHA, so every further merge would fast-forward again. Two sentences earlier the same section had stated the reason — a convention that exists only as a pattern in the log is not a rule — and then declined to bind it. Prose cannot enforce prose; the harness below is the fix.

What is now mechanically enforced (tools/install-hooks.sh arms it; run once per clone):

Rule Mechanism Refuses with
Branch carries fix/|feature/|refactor/|docs/ _guard_branch_type (7) + pre-commit hook (1) exit 7 / 1
Nothing but .claude/plans/*.md or .claude/plans/briefs/*.html is committed on main pre-commit hook exit 1
A plan note committed on main is NAMED in the commit message commit-msg hook exit 1
A cascade id added to .claude/plans/CASCADE-IDS.md on main is the one tools/cascade-mint.sh would have computed (max+1 per family, annulled lines and mentions included) pre-commit hook exit 1
A merge onto main comes from a typed local branch, or from main's own upstream main pre-merge-commit hook (clean merge) + pre-commit hook (conflicted merge) exit 1
An in-progress cherry-pick/revert marker no longer exempts a commit pre-commit hook exit 1
Integration never fast-forwards --no-ff + git config merge.ff false
One integration at a time flock on .worktrees/.integrate.lock exit 1
The tested state still matched at the moment it was re-checked in-lock SHA re-check exit 13
The suite ran under the interpreter main has _guard_interpreter_matches_main exit 14
This clone is actually armed _guard_enforcement_armed exit 12
Main has main checked out, and is clean _guard_workspace_on_main, _guard_main_clean exit 8, 11
The branch actually carries a change _guard_nonempty_diff exit 9
No conflict markers, no scratch or temp file at root, no stale base _guard_conflict_markers, _guard_untracked_scratch_at_root, _guard_stale_base exit 5, 4, 6

Read the full file on GitHub · 1,156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 1,156 lines · 45,188 tokens per session scan C 521fb95fb9f9

Subscribe to this mod's changes

codebugs CLAUDE.md is an instructions file published in the GitHub repository faxik/codebugs (1 stars, last pushed yesterday), licensed MIT. It adds 45,188 tokens to every session, about $0.2259 per session on Opus 5. A static security scan graded it C with 3 findings (tells the agent never to refuse, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.