Claude Code plugin that writes grounded, verified context for your coding agent — every claim checked against your code. Lean CLAUDE.md + deep docs, 100% local, MIT.
FAQ
deep-init is a Claude Code plugin with 1 hand-picked skill for documentation work, indexed on Flowy. Install it with the command on its page. It includes deep-init. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add deepfusionlabs/deep-init> /plugin install deep-init@deepfusionlabs-deep-init
Repo: deepfusionlabs/deep-init
It rewrites a function with total confidence, then violates a business rule no comment mentions. It trusts your schema file when the live database already dropped that column. It changes one service and breaks another through a table it never knew they shared. It "cleans up" a workaround that was load-bearing.
DeepInit reads your codebase and writes down the truth — the real rules, the live database, the why, and the problems it finds — with every claim grounded to a file:line and checked against your code before it's written.
The difference in one line: most tools hand your whole repo to an LLM and hope. DeepInit parses your code first (real AST parsing via Graphify, 25 languages, with graceful grep fallback), reasons on top, then verifies every finding against the code before writing it down. A prompt gives you one ungrounded guess; DeepInit grounds every claim and measures its own false-alarm rate.
100% local · read-only · no servers, no data egress · MIT.
Full walkthrough, live examples & the evidence → deepfusionlabs.ai/deepinit
DeepInit ships as a Claude Code plugin — install it once, then run /deep-init in any project. These are slash commands you type into the Claude Code chat (not your terminal):
/plugin marketplace add deepfusionlabs/deep-init
/plugin install deep-init@deepfusionlabs-deep-init
# then /reload-plugins (a window reload isn't enough; in VS Code / JetBrains, restart the IDE)
/deep-init
That's the whole getting-started. A bare /deep-init uses strong defaults — deepest analysis, adaptive review (2 adversarial cycles, plus a 3rd automatically when the analysis isn't yet clean), issue detection + report + SARIF all on. It's non-blocking: it detects your stack, shows one panel, and proceeds. Update later with /deep-init:plugin-update.
It writes, under your repo:
CLAUDE.md # lean, always-loaded brief — Claude Code auto-loads it (your content preserved byte-for-byte, with a dated .bak)
.ai/docs/ # the deep, on-demand layer + the issue ledger
.ai/report.html # ONE offline report — Docs · Insights · Map: browsable docs, the issue/metrics dashboard, and an interactive component-graph view (⌘K, jump-to-file:line); /deep-init:translate → report.<lang>.html (Spanish built in, any other language on demand)
.ai/deepinit.sarif # SARIF v2.1.0 — shows up in GitHub code scanning / your IDE
CLAUDE.md is the canonical front door — Claude Code auto-loads it and does not read AGENTS.md natively, so DeepInit owns CLAUDE.md directly (it's the grounded replacement for /init). Also working in Cursor, Copilot, or Windsurf? DeepInit additionally emits a matching lean AGENTS.md + per-tool rule files — but only when it detects one of those tools, so a Claude-Code repo isn't littered with a redundant AGENTS.md.
Run it the moment an agent needs to understand a codebase it didn't write — you inherited a legacy repo, you're onboarding an agent to a large project, or you're about to refactor something load-bearing.
Turn it down with /deep-init:fast, refresh only what changed with /deep-init:refresh, or check staleness for free (0 tokens) with /deep-init:check. Prefer buttons? /deep-init:customize. Localize the report with /deep-init:translate. Full command surface: skills/deep-init/SKILL.md.
Prerequisites: only scc (sizing) is required. Graphify (pip install graphifyy, no API key for AST extraction) is recommended for richer structural analysis. ctags, gitleaks/trufflehog, and a DB client are optional. Everything degrades gracefully — one missing tool never aborts a run.
One engine, two outputs you can actually trust — plus the problems it finds along the way.
CLAUDE.md (~100 lines), the file Claude Code auto-loads: only the highest-value facts your agent couldn't already figure out for itself. Kept small on purpose, so the few things that matter aren't buried. (Piling everything into a giant CLAUDE.md makes agents do worse, not better — a 2026 ETH Zurich study measured lower task success and 20%+ more cost, because the things that matter get lost in the noise.).ai/docs/: per-component analysis, five whole-system docs, decisions (ADRs) + a knowledge log, live DB schema + ORM drift.issues.md), 10 detector families plus a class-conformance census, every finding grounded to the line and framed as likely rather than asserted. It never edits your source, and never enters the lean tier.report.html — Docs · Insights · Map in a single file: browsable docs, the issue/metrics dashboard, and an interactive Map of the component graph DeepInit already computes (a visual for you, the human — your agent's answer is already in the files, not somewhere it has to go query). /deep-init:translate localizes it — Spanish built in, any other language on demand — and a SARIF v2.1.0 export appears in GitHub code scanning and your IDE. (The legacy docs-viewer.html / dashboard.html are now redirect stubs.)## Business rules — billing (per component)
[BR-billing:003] CORE — An invoice can't be voided once its payment has settled;
void attempts must go through the refund flow instead.
from src/billing/invoice.ts:142 ✓ checked · HIGH
## Database vs. code — orders
⚠ orders.legacy_status (text) is still read by the reporting job, but your
Prisma schema dropped it — an agent trusting the schema will miss it.
from prisma/schema.prisma:88 ↔ src/orders/order.ts:24 ✓ checked
## Use case — across components
[UC-014] Checkout → charge → fulfil: orders.create() calls billing.charge();
a failure *after* the charge must call billing.refund() —
orders can't roll the payment back itself.
spans orders/ · billing/ · fulfilment/ ✓ checked
Every finding is typed, tagged by importance and confidence, points to the exact file:line, and is checked against your code before it's written.
After the first run, /deep-init:refresh re-analyzes only an edit's blast radius (the touched components + anything whose public interface moved), never the whole repo:
content_hash per component, diffed against the stored manifest by an authoritative symmetric set-diff (git diff is only an accelerator → deletions and no-git repos are still caught).Two guarantees close the ways docs silently rot: a real interface change can never skip a dependent that needed it (the grep path reconciles export * / module.exports / __all__ against export-indicator tokens), and a removed or moved file never leaves an orphaned doc (the symmetric diff catches it, even with no git history).
Freshness is honest, opt-in, and 0-token. Two plugin-shipped hooks call the same no-LLM status script — one on session start and one on your first prompt of a stale session (so drift that appears mid-session, e.g. right after a commit, is still caught). They share one once-per-session gate, so you're offered a refresh at most once — and the offer shows what changed (the drifted files, not just a count), as a one-click Update now / Not now / Don't ask in this repo. A real headless auto-refresh exists but is off by default (the only level that spends tokens). None auto-commit — you always review the diff. A git hook can't summon an AI session, so DeepInit doesn't pretend your docs regenerate on every commit. The 0-token staleness + broken-citation audit (CI-friendly): /deep-init:check.
The trust-killer for a tool like this is the false positive, so detection biases hard toward suppression. Every number we publish is DeepInit's own, never a vendor's, and self-derives from committed repo@SHA-pinned records under validation/.
Headline — own fixtures, blind run: recall 9/9 (100%), false-positives 0.
Beyond that, the evidence is INDICATIVE and framed as comprehension/agreement — not "finds bugs in famous repos":
/init. On the same 9 repos (8 languages, small to large, some obscure), independent blind verifiers checked every claim in the lean CLAUDE.md both tools write: Claude Code's built-in /init grounded 0.6% of its claims to a checkable file:line; DeepInit's quick fast mode, 77.6% — same files, same front-door file, the difference is whether your agent gets a line it can open and trust. (INDICATIVE — mostly well-known OSS, fast mode, no wall-clock timing; it costs more too — see Cost below.) → validation/matrix/validation/validation/coverage/validation/end-to-end/It writes the truth down — the rest build something to query. Wikis, code graphs, and index tools give you a separate place to go ask questions, only as current as their last crawl. DeepInit writes verified markdown straight into the files your agent already loads.
This isn't a weekend skill. This is the harness — not the model. A prompt hands you one ungrounded guess; the harness grounds every claim, measures its own false-alarm rate, and is regression-tested on every change.
Run it yourself:
PYTHONUTF8=1 python tests-fixtures-v1/_chat_validation.py # the harness
make validate # every gate, one command
make validate runs the harness + the stats/count-drift guards + the mutation meta-harness + the public-harness check. No LLM, no real skill run. PYTHONUTF8=1 is recommended on Windows. Contributing? See CONTRIBUTING.md.
Breadth: a 16-repo / 13-language / 3-size matrix (validation/matrix/) plus 15 cross-language field sweeps (~1.12M LOC, validation/recall-discovery/). 15 of 16 parse on the designed AST path (only Crystal lacks a grammar → graceful grep fallback, which is exactly why kemal is our end-to-end degradation proof).
Real understanding beats "just ask an LLM." Run three ways and scored against the AST as ground truth, DeepInit's full path grounds 98.9% of its claims to a verified file:line (grep-fallback 100%); a naive LLM-only baseline grounds just 43.5% (0% on one repo) and missed every grounded security-relevant finding. (This is a separate measurement from the /init head-to-head above — DeepInit's full mode vs a raw-LLM baseline on 3 famous repos, not fast vs /init on 9 mixed repos; the two grounding numbers use different modes, repos, and baselines, so don't conflate or average them.) → validation/matrix/UNDERSTANDING-MATTERS.md
We use it on our own code — run over our own tooling, an independent internal reviewer's verdict was WOULD-USE (every "Critical to know" fact dual-grounded to a real file:line, all hard counts exact).
Every published figure self-derives from validation/STATS.json (a CI drift-gate fails on a stale number). Corrections to any INDICATIVE figure are logged in docs/HISTORY.md.
Core families (always on):
| Family | What it finds |
|---|---|
| IF-1 | Unenforced / inconsistent business rules (incl. an access-control check a sibling path has but this one is missing — surfaced as a rule violation, not a security claim) |
| IF-2 | DB-vs-code drift — an ORM model disagreeing with the live schema |
| IF-3a | Silent cross-component coupling — a shared table/global/queue mutated by ≥2 components with no interface between them |
| IF-4 | Intent/decision contradictions — code contradicting a recorded ADR, a load-bearing workaround, a name-lie |
| IF-5 | Risk-hotspot ranking — what to look at first (criticality-weighted, not churn-only) |
Extended families (all shipped, each gated on its own measured-FP exit-gate):
| Family | What it finds |
|---|---|
| IF-3b | Interface contract breach — a named import absent from the exporter's public surface |
| IF-6 | Divergent reimplementation — the same named allowed-value set defined in ≥2 places with conflicting membership, so a value one component emits another rejects (fires where clone detectors go silent once copies diverge) |
| IF-7(a) | Error-path contradicts a documented rule — a failure path that does the opposite of a rule the project itself documents (the first net-new semantic family; dual-cited, certainty-capped) |
| IF-7(c) | Cross-boundary swallowed error — an empty handler in a function consumed across a component boundary |
| IF-8 | Circular component dependency — a strongly-connected import cycle |
| IF-10 | Statically-dead branch — an if (FLAG) arm where FLAG resolves to a compile-time constant, including across a module edge (lives in the gap ESLint's no-constant-condition leaves — it doesn't follow the const indirection) |
Plus a class-conformance census overlay — a non-detector that enriches an already-firing fire by counting how many siblings conform; it never raises an issue of its own.
--heal defaults to a dry-run preview and never edits source.What this repo is: DeepInit is a Claude Code skill defined entirely in Markdown — there is no application code. The "engine" is a Claude instance executing the instructions in
skills/deep-init/.skills/deep-init/SKILL.mdis the entry point;skills/deep-init/references/*.mdare the stage specs, loaded on demand. Editing DeepInit means editing those instruction files.
Cost is INDICATIVE only: DeepInit runs in your own Claude Code session — the cost is the token cost of one analysis pass (no subscription, no API key for the parser). A small repo is an inexpensive single pass; cost tracks component count more than raw lines. The one metered head-to-head we've run (vs /init, above) measured ~$4.40 per run for DeepInit fast vs ~$0.89 for /init on Claude Opus — ~46,000 vs ~5,700 output tokens (~8× the output for ~5× the cost, since DeepInit also writes the deep .ai/docs/ tier; input is dominated by discounted prompt-cache reads, so cost isn't proportional to raw input). A published per-size-tier price still waits on a clean end-to-end accounting run. → validation/matrix/COST-MODEL.md
skills/deep-init/SKILL.md # the skill entry point (command surface + run flow)
skills/deep-init/references/*.md # stage specs (detection, extraction, filter, redaction, verification, …)
skills/deep-init/assets/ # the dashboard & docs-viewer templates + the post-commit hook
tests-fixtures-v1/ # mini-repo fixtures + the deterministic validation harness
validation/ # per-repo, repo@SHA-pinned real-world evidence
docs/ # the design corpus (spec, requirements, design, test plan, …)
MIT © DeepFusion Labs. See LICENSE and AI_POLICY.md.
.claude-plugin/
marketplace.json
plugin.json
.coderabbit.yaml
.devcontainer/
devcontainer.json
.gitattributes
.github/
CODEOWNERS
dependabot.yml
ISSUE_TEMPLATE/
bug_report.md
config.yml
feature_request.md
pull_request_template.md
workflows/
dependency-review.yml
gitleaks.yml
scorecard.yml
validate.yml
.gitignore
.gitleaks.toml
.husky/
commit-msg
pre-commit
.oss-kit/
config.json
AI_POLICY.md
CHANGELOG.md
CODE_OF_CONDUCT.md
commands/
check.md
customize.md
doctor.md
fast.md
help.md
plugin-update.md
refresh.md
translate.md
version.md
commitlint.config.js
CONTRIBUTING.md
docs/
deepinit-readme-banner.png
HISTORY.md
TESTING.md
hooks/
hooks.json
LICENSE
Makefile
package-lock.json
package.json
README.md
SECURITY.md
skills/
deep-init/
assets/
dashboard-template.html
deepinit_status.py
deepinit.config.schema.json
docs-viewer-template.html
legacy-stub-template.html
post-commit.sh
report-template.html
session-start.sh
vendor/
cytoscape.min.js
highlight.min.js
markdown-it.min.js
purify.min.js
VENDOR.md
references/
adr.md
dashboard.md
database.md
detection.md
extraction.md
filter.md
generation.md
global-rules.md
heal.md
horizontal.md
i18n.md
issue-filter.md
issues.md
redaction.md
report.md
review.md
triggers.md
update.md
verification.md
viewer.md
SKILL.md
tests-fixtures-v1/
_chat_validation.py
_external_metamorphic_ledgers.json
_mutation_harness.py
_wave1_ledgers.json
mini-conformance-census/
.ai/
docs/
decisions.md
ground-truth/
expected.json
package.json
src/
cache/
cache.ts
controllers/
order.controller.ts
core/
base.ts
gateways/
email.gateway.ts
payment.gateway.ts
repos/
audit.repository.ts
invoice.repository.ts
order.repository.ts
product.repository.ts
proto.repository.ts
user.repository.ts
services/
auth.service.ts
billing.service.ts
catalog.service.ts
notify.service.ts
report.service.ts
shipping.service.ts
mini-coverage-floor/
good.json
mini-coverage-record/
good.json
mini-dbgate/
ground-truth/
expected.json
mini-docs-viewer/
.ai/
docs/
components/
core.md
decisions.md
issues.md
manifest.json
AGENTS.md
ground-truth/
expected.json
mini-e2e-snapshot/
_e2e_record.json
.ai/
dashboard.html
deepinit.sarif
AGENTS.md
ground-truth/
expected.json
src/
sched/
scheduler.go
mini-edge-cases/
ground-truth/
expected.json
repo/
packages/
core/
core.go
extra/
extra.go
src/
app.ts
gen_header.ts
mini-exclusion/
.gitignore.note
ground-truth/
expected.json
repo/
__snapshots__/
comp.snap
.gitignore
assets/
logo.png
data_big.txt
dist/
bundle.min.js
generated/
api_pb2.py
packages/
core/
core.go
extra/
extra.go
src/
app.ts
schema.generated.ts
util.ts
wired.ts
vendor/
lib.go
mini-fp-trap/
app/
db/
schema.rb
models/
order_report.rb
CHURN.md
db/
migrations/
001_init.sql
docs/
shared-tables.md
ground-truth/
expected.json
package.json
README.md
src/
index.ts
orders/
orders.routes.ts
orders.service.ts
payments/
payments.webhook.ts
reconcile.ts
shared/
constants.ts
db.ts
middleware.ts
schema.ts
security.ts
mini-global-rules/
bad/
_extraction_ledger.json
_subagent_billing.json
r1_ungrounded.md
r3_noprovenance.md
good/
_extraction_ledger.json
_subagent_auth.json
AGENTS.md
components/
auth.md
ground-truth/
expected.json
mini-graphify/
expected-structural-graph.json
graph.json
registry.json
mini-if1-fptrap/
ground-truth/
expected.json
src/
orders/
order.service.ts
mini-if1-violation/
ground-truth/
expected.json
package.json
src/
account/
account.routes.ts
index.ts
orders/
account.service.ts
order.routes.ts
order.service.ts
shared/
middleware.ts
repository.ts
mini-if10-crossmod/
mini-if10-crossmod-go/
checkout/
flow.go
config/
cfg.go
flags/
flags.go
internal.go
gateway/
use.go
ground-truth/
expected.json
orders/
process.go
ground-truth/
expected.json
src/
billing/
run.ts
cart/
use.ts
cfg/
env.ts
checkout/
flow.ts
flow2.ts
local.ts
config/
build.ts
dash/
view.ts
flagdefs/
defs.ts
flags/
index.ts
forkflags/
a.ts
b.ts
index.ts
legacyflags/
mode.ts
mutflags/
m.ts
newflags/
mode.ts
notes/
doc.ts
orders/
process.ts
pybilling/
run.py
pycart/
use.py
pycfg/
env.py
pychk/
flow.py
flow2.py
localdefs.py
pyconfig/
build.py
pydash/
view.py
pyflags/
defs.py
pyforkimp/
use.py
pyforks/
__init__.py
a.py
b.py
pylegacy/
mode.py
pynew/
mode.py
pynotes/
doc.py
pyorders/
process.py
pyreport/
ns.py
report/
dyn.ts
ns.ts
typ.ts
mini-if10-deadflag/
ground-truth/
expected.json
src/
api/
handler.ts
checkout/
flow.ts
commentstr/
doc.ts
config/
env.ts
feature/
rollout.ts
toggle.ts
legacy/
raw.ts
reexport/
flags.ts
shadow/
scope.ts
mini-if2-drift/
app/
models/
plan.rb
subscription.rb
db/
schema.rb
ground-truth/
expected.json
mini-if3a-coupling/
docs/
adr/
ADR-014-shared-audit-sink.md
ground-truth/
expected.json
package.json
prisma/
schema.prisma
src/
index.ts
inventory/
inventory.routes.ts
inventory.service.ts
orders/
orders.routes.ts
orders.service.ts
shared/
... 497 more© 2026 Flowy · Free and open source
Built for Claude Code · Not affiliated with Anthropic