enquire-mcp
CLAUDE.md33 starsChanged 6 months agoMITView on GitHub
This file is read by Claude Code sessions on this repo. It defines the current sprint goal, scope, quality bar, and anti-patterns so any session (continuation or new) shares the same North Star. Current state (as of 2026-10-04): tracked source is v4.0.0-rc.7. The reviewed starting main is ceb20d4 (PR #622). Three PRs landed on 2026-10-03: #623 carried the one unavoidable source-tree dependency exception (GHSA-86w9-cpqp-85rv, node-forge — no patched release exists; the only dependent is the dev-only @anthropic-ai/mcpb; tracker digitalbazaar/forge#1149) and…
- Commits and pushes
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
v4.0.0-rc.4 unpublished full-audit source predecessor: read-only verification, three consequence-separated publication jobs, exact CI-built …
- Distinctive: line 31
All tests pass on the candidate and merged main.
- Very specific: line 37
All 13 required CI gates green on PR (lint, test×2, smoke, audit, coverage, version-consistency, docs, oia, protocol-conformance, …
- Distinctive: line 40
All docs-consistency invariants stay green (extend as new surfaces appear)
- Distinctive: line 46
All rejections of auditor recommendations: must be documented inline in the CHANGELOG with reasoning (see v3.5.14 L-2 for the …
- Distinctive: line 87
Never write "каждый этап и элемент системы проаудирован, все ошибки устранены" from green CI alone.
- Very specific: line 103
Shell is
zsh:statusis read-only there: Never name a poll or loop variable status.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project goal — v4 MCPB Basic candidate + audit-driven hardening line
<!-- current header; `@rc`=4.0.0-rc.7 — pinned to package.json by scripts/check-version-consistency.mjs; advance this marker on every version bump -->This file is read by Claude Code sessions on this repo. It defines the current sprint goal, scope, quality bar, and anti-patterns so any session (continuation or new) shares the same North Star.
Current state (as of 2026-10-04): tracked source is v4.0.0-rc.7. The reviewed starting main is ceb20d4 (PR #622). Three PRs landed on 2026-10-03: #623 carried the one unavoidable source-tree dependency exception (GHSA-86w9-cpqp-85rv, node-forge — no patched release exists; the only dependent is the dev-only @anthropic-ai/mcpb; tracker digitalbazaar/forge#1149) and made that waiver dev-only by construction after an independent review showed it was silently covering the production graph; #621 shipped the tooling phase's test-count cascade; #622 committed the mutation-helper census reproduction. The September line added final-response recall fallback, schema-v7 identifier parts in a separate chunk_parts table, shared erasure receipts, clear-feedback, and cursor-based resources/list. Its hosted CI, CodeQL and Pages completed successfully; those historical results do not substitute for CI on a new candidate. The bounded T-Search protocol remains retained without a server-side LLM: 47 tools · 19 prompts · 2272 tests · 11 languages. Distribution remains deferred pending distribution readiness and explicit resumption; rc.7 is untagged and unpublished. The last verified package channels were @latest v3.11.6 and @rc v4.0.0-rc.3; recheck the registry when publication resumes.
Active work (2026-10-04): a full-project static and live-repository audit at ceb20d4 has opened safety and correctness follow-ups; green historical CI is not proof that the newly identified scenarios are covered. The continuation order now prioritizes write/rollback preservation and exact persistence-target authority → generation-consistent hybrid retrieval and bounded embedding inputs → resource-pagination identity/cursor/work bounds → tooling/control truth (T, then AH-7) → bounded optional acquisition (AH-8) → Russian/PDF work. Each product slice needs a causal positive control, a negative control that fails on the old behavior, independent review, exact-candidate hosted CI, and an exact-main re-sweep. T1 implementation landed (#621), but its partial-drift check still needs a regression; T4 is a diagnostic, not a gate, with measured differences still unresolved. The earlier T-first queue is superseded by this risk-driven order. AH-4, AH-5 and AH-6 implementation remains landed, not flawless. Keep one product change active. Local package installation, build, lint, tests, coverage, OIA, smoke and benchmarks remain excluded; executable validation belongs to GitHub-hosted CI. Distribution remains parked. Use a current non-cloud-synced checkout, compare notes with GitHub, and retain historical release material in CHANGELOG.md and Git history. Do not publish private coordination notes or personal workspace/account details.
- v4.0.0-rc.7 full-audit safety closure plus AH-4 staged replacement; rc.6 remains tagged but unpublished: ambiguous and late-occupant rename rollback fails closed with append-only recovery; query/eval recognize shared FTS aliases by physical identity; tag/link evidence is complete but bounded; graph claims match the equal-RRF candidate in-degree tie-break; HNSW cleanup removes same-or-older invalidated DB authorities under the publisher lease, including no-receipt failures. Configuration-changing embedding builds now validate a complete private generation before atomic promotion and preserve the prior usable generation on pre-promotion failure. 2228 → 2272 source tests.
- v4.0.0-rc.6 A6 recovery, tagged but unpublished: version surfaces and public acquisition strings name 4.0.0-rc.6. Release handoff copies the body to
release-notes.mdinstead of a same-filemv; the annotated tag exists, but OIDC publication failed withENEEDAUTH, so npm@rcand GitHub Releases remain at rc.3. A7 remains HOLD on unpublished typescript-sdk#2574. 2228 → 2228 source tests. - v4.0.0-rc.5 tagged but unpublished predecessor: squash-main
5438622; annotated tag exists; GitHub Release and npm@rcwere not published. 2228 → 2228 source tests. - v4.0.0-rc.4 unpublished full-audit source predecessor: read-only verification, three consequence-separated publication jobs, exact CI-built artifact handoff, reproducible Docker, and the audited runtime/persistence closures were staged but never tagged. 1807 → 2228 source tests.
- v4.0.0-rc.3 published predecessor — shipped the post-rc.2 hardening line through the tag-push-only protected controller; exact npm/GitHub release source
3edcba4c6b1de813686601c36c1c2b487e20e382. 1807 → 1807 source tests. - v4.0.0-rc.2 published Basic MCPB predecessor — packages the bounded 13-tool read-only profile, adds exact-byte three-OS consumer evidence, transparency sidecars, and a fail-closed twelfth release context while preserving the full edition defaults. 1807 → 1807 source tests.
- v4.0.0-rc.1 shipped SDK-v2 foundation — exact v2 packages, dual-era transports, write-safe shutdown, official-client conformance, and packed-consumer matrices; exact tag/npm
gitHead4af28086d30ab08fefce49d94107c18c14eac18f. 1795 → 1807 source tests.
Active goal (post-2026-07-15 Codex external audit): shift from the audit-hardening treadmill toward activation + user-visible product improvements + user learning; retrieval benchmark and evaluation work is outside the active improvement lane and requires a new explicit maintainer instruction, while hardening remains risk-triggered (a change touching a parser / FS-write / transport / persistence-format / model-network / supply-chain surface). The audit graded v3.11.6-rc.2 at 4.0 technical, 0 CRIT/HIGH/MED, 5 LOW.
Open deferrals (v3.11.x+): structure-accessor phases 2-7 (now risk-triggered, not scheduled — ship a phase only when a concrete duplicate walker/defect triggers it), namespaced multi-vault (RFC-gated — the "no multi-vault" non-goal is under reversal), the maintainer-cancelled LongMemEval headline work (outside the active lane; explicit reauthorization required), embed-db migrations, HNSW filter-during-search.
External-audit gate (v3.6.1 rule — STANDING): every pre-stable @rc → @latest promotion needs ≥2 independent external auditors with DIFFERENT methodologies (change-driven + state-driven + adversarial/behavioral), documented under docs/audits/. Substantively met across the v3.9→v3.11 line. (The cache-miss zero-outbound e2e probe the 2026-07-15 audit left INCONCLUSIVE is now CLOSED in v3.11.6-rc.3 — tests/serve-offline-network.test.ts + scripts/probe-offline-network.mjs verify it empirically; the remaining promotion gate is a fresh external pass on the promoted commit.)
External audit blocker (CLAUDE.md v3.6.1 rule, ≥2 independent external auditors with DIFFERENT methodologies) — re-evaluated 2026-05-25 against the corrected audit doc. v3.8.0 was promoted on internal confidence alone; v3.8.1 retracted the incorrectly-attributed Cursor audit (overclaim #11 — wrong project). On 2026-05-25 the same auditor delivered the CORRECTED enquire-mcp audit on commit 7a9fdbd / v3.8.0-rc.15 (docs/audits/v3.8.0-rc.15-external-2026-05-25.md): verdict 4.85/5, ship-blockers: none. All 5 actionable findings (M-REG-1, L-HYB-1, L-OIA-1, INFO-1, INFO-3) were already closed by rc.18→v3.8.5. INFO-2 (R-10 residual at >66% excluded) closes in v3.9.0-rc.3. The v3.8.0 stable promotion was retroactively justified by this audit — but the v3.6.1 rule requires ≥2 INDEPENDENT external auditors with DIFFERENT methodologies. Counting Mavis (v3.6.0, 4.9/5) + Anonymous (v3.6.0, CRITICAL) + Round-7 (v3.6.2) + Round-12/13/14/15/16 + 2026-05-25 corrected pass: 5+ independent external audits across v3.6.x→v3.8.x cascade, methodologies span change-driven (Mavis-style) + state-driven (Round-22 / 2026-05-25 corrected) + adversarial-CVE (Round-7). Blocker met. (Historical — this paragraph records the v3.8.0-era resolution of the ≥2-auditor gate; the STANDING rule and the current promotion gate are stated in the header above. v3.9.0, v3.10.0, and v3.11.5 have since all promoted to @latest.)
Quality bar — required on every release (no exceptions)
- All tests pass on the candidate and merged
main; the exact source declaration count is pinned by docs-consistency. - Lint clean (biome 0 warnings/errors)
tscstrict +noUncheckedIndexedAccessclean- Coverage thresholds met (lines ≥86, statements ≥82, functions ≥75, branches ≥74)
scripts/check-changelog-coverage.mjspasses (CHANGELOG claims = reality within 0.5pp)scripts/smoke.mjssynthetic vault scan passes- All 13 required CI gates green on PR (lint, test×2, smoke, audit, coverage, version-consistency, docs, oia, protocol-conformance, package-consumer, mcpb-basic, docker —
docsadded v3.7.10,oiapromoted from advisory v3.8.0-rc.6; the v4 gates use the official client, packed artifacts, and container introspection) - Daily-check report after merge: 0 regressions, 0 new CodeQL / Dependabot alerts
- CHANGELOG entry with TL;DR blockquote + method note
- All docs-consistency invariants stay green (extend as new surfaces appear)
Audit checkpoint — after every RC
- Self-audit via root-cause-sweep methodology (memory:
method_audit_root_cause_sweep.md): check the drift class hasn't returned from previous cycles - Any external audit report (Mavis / MiniMax / other) — pause until processed; either instance-fix OR class-fix
- All rejections of auditor recommendations must be documented inline in the CHANGELOG with reasoning (see v3.5.14 L-2 for the empirical-rejection pattern)
- New findings in the current RC → fix or explicitly adjudicate them before publication; carry unresolved work with its severity, evidence and next action.
Non-goals (NOT doing in this sprint)
- Multi-vault support (requires its own approved RFC and demand evidence)
- OAuth (bearer-only is a deliberate security-positive design choice)
- Live Obsidian integration via Local REST API (different positioning vs
cyanheads/obsidian-mcp-server) - A general formula evaluator for Bases DSL
- Unreviewed API breaking changes; preserve the documented v4 compatibility boundary in STABILITY.md
Anti-patterns to avoid
- Big-bang refactor — always phased via RCs
- Copy-paste coverage stats from sub-agent output (lesson from v3.5.12)
- Optional dep removal without empirical test (lesson from v3.5.14 L-2)
- Hardcoded counts in docs without an invariant (rule since v3.5.9)
- Dismissing an auditor without CHANGELOG reasoning (rule since v3.5.14)
- Compressing CHANGELOG for aesthetics — audit trail trumps style
- Merge without green daily-check on main afterward
- Claim "all N callsites" before grep-verifying — overclaim class repeated 3× in K-1 saga (v3.6.1, v3.6.2, v3.6.4). Solution: structural enforcement (
tests/k1-class-invariant.test.ts) > CHANGELOG promises. Rule since v3.6.4: any "N of N fixed" claim requires a test gate or it doesn't ship. - Reactive same-day patching — the v3.6.0→v3.6.4 sequence demonstrated why class sweeps and causal controls belong before shipping. Audit the candidate, then re-sweep the merged change. The historical 24-hour delay is superseded by the maintainer's ready-to-publish-in-the-same-session rule; readiness and explicit publication authority are still required.
- Invariant test without negative-control — a test that ALWAYS passes proves nothing. Every new invariant test must have a sibling test that fails when the invariant is violated (see
tests/peek-meta.test.ts"NEGATIVE control" pattern from v3.6.4). Rule since v3.6.4. - TSDoc header drifts from function body — every overclaim instance since v3.6.1 (7 documented) has the same shape: code changed inside a function, but the function-level TSDoc / file-header / block-comment describing the behavior wasn't updated in the same commit. TypeDoc + IDE hover then publish the stale (lying) description. Rule since v3.7.15: every fix that changes function internals MUST include the matching TSDoc header update in the same commit; reviewers MUST diff the header alongside the body. Examples of the drift: v3.7.14 F1 (renameNote body fixed, header lied), v3.7.14 F2 inside the SAME patch (renameFile body fixed by F2, header still said "Atomic via fs.rename").
- Single class-sweep is not enough — same-release recursion happens — v3.7.14 F1 fixed overclaim #6, and v3.7.14 F2 SHIPPED overclaim #7 inside the very same patch. The author of an audit-driven fix sees the immediate problem but doesn't apply the lesson to OTHER changes in the same diff. Rule since v3.7.15: after every audit-driven release that closes a "class" finding (overclaim, TSDoc drift, TOCTOU, etc.), run a post-merge re-sweep specifically scanning that patch's own diff for fresh instances of the same class. The recursion rate observed across v3.6.x-v3.7.x is high enough that this is a required step, not optional.
- Tag the SQUASH-MERGE commit on main, not the feature-branch HEAD — v3.7.14 was tagged against the pre-merge branch SHA (orphan, not on main), and
.github/workflows/release.yml's "Assert tag is on main" guard correctly refused to publish (overclaim #8). The CHANGELOG implied the ship completed before it actually did. Rule since v3.7.15: the post-merge release procedure is always:git checkout main→git pull origin main→git log -1 --oneline(capture the squash-merge SHA) →git tag -a vX.Y.Z <that-SHA> -m vX.Y.Z→git push origin vX.Y.Z. Lightweight tags are rejected by the release preflight. Never tag from a feature branch — the squash-merge produces a NEW commit whose SHA differs from the branch HEAD. - Internal change-driven sweeps miss state-driven failure modes — run OIA before claiming "no open findings" — every external auditor since v3.6.0 has found stale fragments that internal class-sweeps missed: README badges, CLAUDE.md titles, file-header comments, stale CLI references in docs, stale npm-script references in script docstrings. Root cause: my methodology is CHANGE-DRIVEN (look at what changed, fix the class, verify nearby) while external audits are STATE-DRIVEN (read every file as it exists, verify each claim against reality). These find non-overlapping failure modes. Rule since v3.7.17: run
npm run check:oia(scripts/oia-walk.mjs) before claiming "no open audit items" in any release. The script automates the state-driven walks catalogued in its own header; early additions covered stale currency claims, workflow/CLI/script existence, inline defaults and coverage comments, scope completeness, and GitHub Actions SHA pinning. Default mode exits 1 on any finding;--allowoverrides documented architectural deferrals but cannot suppress Vitest focus-control or scanner-error findings. Round-19 (v3.7.17) shipped the rule + the script after the 5th external audit caught 4 cheap stale fragments my v3.7.16 pre-merge RCA missed. - "Drift" findings demand a full-surface sweep BEFORE per-instance fix — when an external audit reports a drift finding (CLI help text, inline comment, doc fragment), the natural reflex is to fix the reported instance. Don't. Drift findings are almost never isolated — they're symptoms of a shared surface where the structural defense is incomplete. Pre-rc.11 the N-5 (
--watchhelp drift) finding triggered TWO per-instance fixes (rc.6 + rc.7) that left the same flag still drifting, plus left 9 more flags in the same class unidentified. Rule since v3.8.0-rc.11: before fixing the reported instance, run a Python/grep sweep across the entire surface type the finding implicates (all.option()calls if it's CLI text; all inline// current X%comments if it's coverage; all README badges if it's currency). Let the sweep count instances; if N > 1, write a structural defense (test invariant or shared module) that makes future drift impossible, then fix all instances in ONE PR. The cost of the sweep is ~30 min; the cost of N reactive patches is 3-5× that plus repeated external-audit findings. - Every new docs surface with numeric claims MUST extend
docs-consistency.test.tsin the SAME PR — rc.12 addedllms.txt+AGENTS.md(Tier A discoverability). Both contained numeric claims ("848 unit tests", "44 tools", "19 MCP prompts", "9 required CI gates", "10 per-file branch floors") but the existing docs-consistency invariants only covered README, STABILITY, COMPARISON, package.json, api.md — the new files were a fresh drift surface that the next test-count change would silently invalidate. Caught by rc.14 audit as M-2. Rule since v3.8.0-rc.14: whenever a PR adds a new docs surface (any.md,.txt,.json, or generated artifact in the repo or on GH Pages) with numeric claims (test count, tool count, gate count, config entry count, etc.), the SAME PR must extenddocs-consistency.test.tswith invariants that pin each claim against the canonical source (TOOL_MANIFEST,release.ymlREQUIRED regex, FLOORS object,coverage-summary.json, etc.). This generalizes the v3.7.17 OIA rule from "state-driven walks for existing files" to "structural invariants for new files". - Never act on a "report" shaped document without verifying its provenance with the user — overclaim instance #11 (v3.8.1 retraction): I read a document from an unrelated editor workspace outside this repository, treated it as a legitimate external audit for enquire-mcp, and shipped rc.18 + v3.8.0 STABLE promotion on its basis. The document was for a different project entirely. Rule since v3.8.1: before acting on any document claiming to be an external audit, security disclosure, third-party review, or similar third-party assessment, verify (a) the file path is INSIDE the repository being assessed (this repo's
docs/audits/), and (b) the user explicitly directed attention to it AS an actionable report (not just mentioned in passing). If either is unclear, ASK the user to confirm provenance and applicability before reading further. Treat structural similarity to known formats (AUDIT-REQUEST.md, etc.) as NEUTRAL evidence, not authority signal. The pre-existing v3.6.1 rule ("external audits pause for processing") had the missing precondition: "first verify it IS an external audit for THIS project." - Update forward-looking deferral claims in the same commit that ships the deferred item — overclaim instance #13 (v3.9.0-rc.4): CLAUDE.md header line said "Still deferred to v3.9.0+: ... OCR'd PDF watcher embed-sync, HNSW in-memory live update, R-10 adaptive refill" — but the status section in the same file already listed all three as SHIPPED in v3.9.0-rc.1/rc.2/rc.3. The CHANGELOG entries for those RCs updated the status section but not the header bullet. OIA Check 7 (since v3.8.3) catches "as of vX.Y.Z" present-tense currency drift; it doesn't catch "deferred to vX.Y.Z+" future-tense deferral drift. Same root cause as overclaim #12 (v3.8.4 OIA Check 7 scope too narrow): defense was on a different syntactic dimension than the actual drift. Rule since v3.9.0-rc.4: when a CHANGELOG entry says "closes the last deferred X item", the same PR must search CLAUDE.md (and other docs) for
deferred to vX.Y.Z/Still deferred to vX.Y.Z+:lines and remove the just-shipped item. Thedeferred-claimdefense inscripts/scope-completeness-audit.mjsmakes this structural. - META scope-completeness defenses must cover every drift DIMENSION, not just numeric claims — recursion-pair shape #7 (v3.9.0-rc.4): v3.8.8 META audit covered 5 numeric-claim patterns (test-count, tool-count, prompt-count, ci-gate-count, per-file-floor-count). v3.9.0-rc.1/rc.2/rc.3 added 3 new CLI flags (
--ocr-pdfs,--ocr-langs,--ocr-max-pages) and they were missing fromdocs/api.mdfor 3 RCs because the META defense covered the wrong dimension. Same shape as v3.8.3 → v3.8.4 (OIA Check 7 scope was too narrow on FILES); now it recurs at the DIMENSION level. Rule since v3.9.0-rc.4: whenever a new structural defense is added (docs-consistency.test.ts, OIA check, scope-completeness defense), explicitly enumerate the drift dimensions it covers vs leaves uncovered, and add the uncovered dimensions to a "deferred defense" list in the same PR. Currently covered dimensions: numeric-claim, deferred-claim, cli-flag-coverage, currency-version (OIA Check 7). Uncovered (TODO): feature-mention drift (new feature ships but README hero/featurelist doesn't mention it), behavior-claim drift (TSDoc claims X but impl does Y — partly covered by tests, but not as a structural defense), error-message drift, claimed-guarantee-vs-code-guard drift (see next rule). - Never claim an ENFORCED guarantee the code doesn't actually enforce — overclaim instances #15 (SLSA-3) + #16 (OCR offline) (v3.9.0-rc.7 comprehensive audit). Two findings of one shape: (#15) the README badge linked to slsa.dev Build L3 and 8+ surfaces claimed "SLSA-3", but
release.ymlonly runsnpm publish --provenance= SLSA Build L2 (hosted builder + signed provenance; L3 needs an isolated, non-falsifiable builder viaslsa-framework/slsa-github-generator). (#16) SECURITY.md claimed "zero outbound network calls in serve mode" +ocr.tsTSDoc claimed a pre-flight "throws if language not installed" check + CLI help said "runtime CDN download is blocked", butextractPdfWithOcronly emits a stderr warning then callscreateWorkerwhich silently CDN-fetches<lang>.traineddata; theinstall-ocr-langsubcommand referenced in 4 files never existed. Root cause: the project's invariant apparatus checks NUMERIC + doc-consistency drift but has NO defense for "we promise enforcement X; does a code path actually enforce X?". This is the most dangerous overclaim class because it's externally verifiable (an auditor checks the badge → the spec → the workflow; a privacy-conscious user runs OCR offline and watches it phone home) AND it directly attacks the project's rigor/privacy brand. Rule since v3.9.0-rc.7: any claim of an enforced guarantee (security level, "blocked", "zero X", "fails closed", "validated before Y") MUST point to the specific code guard that enforces it; if the guard doesn't exist, either build it or downgrade the claim to describe actual behavior. The v3.9.0-rc.5 "OCR docs unification" failed this — it unified the prose about a procedure while the enforcement the prose implied was never built (papered the wrong layer). Candidate structural defense (deferred): an OIA check that greps SECURITY.md / TSDoc for enforcement verbs ("blocked", "zero outbound", "fails closed", "throws if") and flags each for manual code-guard verification. - A heuristic SECURITY detector must analyze the same semantic space its sink consumes — and you must adversarially FUZZ your own fix — overclaim instance #17 (v3.9.0-rc.24). rc.21 hardened
obsidian_open_questionsagainst overlapping-alternation ReDoS, and itsisCatastrophicRegex/alternationBodyAmbiguousTSDoc asserted the analysis "never under-flags a real first-char overlap" (a soundness GUARANTEE — same claimed-guarantee-vs-reality class as #15/#16). But the detector compared surface syntax, not the character actually matched at the sink: (a)(a|A)+slipped because the tool compilesnew RegExp(pattern, "i")(soa/Aoverlap) butleadingAtomTokencompared case-SENSITIVELY; (b)(\x61|a)+/(\u{61}|a)+(=(a|a)+) slipped because the helper returned the raw byte after\instead of the decoded char. Both reproduced ~16s V8 hangs at ≤12 chars on bearer-authserve-http— i.e. the rc.21 security fix shipped two fresh instances of the very ReDoS class it closed (the recursion this project most fears, now manifest in a SECURITY detector). Root cause: the detector reasoned over the literal pattern text while the dangerous backtracking happens over the set of inputs the compiled regex matches (case-folded, escapes resolved) — two different semantic spaces. Rule since v3.9.0-rc.24: (1) any heuristic that guards a sink (regex compile, SQL, shell, path) MUST normalize its input into the SAME space the sink interprets — fold case if the sink is case-insensitive, decode escapes if the sink decodes them, resolve aliases — before comparing; when normalization is uncertain, err toward the unsafe classification (over-flag), never toward "looks safe." (2) The standard CI gates CANNOT catch a detector false-negative (a missed bypass passes every test that doesn't already contain it), so every security-detector change REQUIRES an explicit adversarial self-fuzz pass: enumerate the equivalence classes of the threat (here: case variants, every escape syntax that aliases a literal, nullable/overlap shapes) and assert each is caught, with a disjoint POSITIVE control proving the normalizer doesn't over-reject. This generalizes "audit before ship" + "post-merge re-sweep" specifically to detectors: fuzz the detector, don't just unit-test the happy path. Strengthened v3.9.0-rc.25 (overclaim #18, the 3rd recursion of this exact class): a fresh audit reproduced a CRITICAL the rc.24 fix STILL missed ((a?b|b)+$optional-leading-atom;(a?){25}nullable body;(a{2,5})+variable body) — because (1) my rc.24 "enumerate the equivalence classes" pass is itself incomplete (I cannot enumerate every shape of an undecidable property), and (2) my rc.24 self-fuzz was a ONE-OFF manual run, not a CI gate, so it couldn't catch a regression or a newly-introduced gap. The rule that actually ends the treadmill: for a recurring detector class, ship a GENERATIVE fuzz as a PERMANENT CI test (tests/redos-fuzz.test.ts) — generate a deterministic random corpus, and for every input the detector classifies SAFE, run the real sink (a timedexecin a worker, with a re-confirm to avoid load-flake) and fail if it actually misbehaves. This converts "did I think of every shape?" (undecidable, recursion-prone) into "does any SAFE-classified input actually hang?" (empirical, self-checking). Hand-enumerated shape lists are the floor; the generative fuzz is the ceiling. Also: when the sound general fix over-flags some safe inputs (here(a?b)+/(\w+\s)+— variable but anchored), DOCUMENT the over-flag in the detector TSDoc and accept it (a security guard's false positive < a hung event loop) rather than chasing EDA-precise detection (hundreds of lines, its own bug surface). - The internal apparatus is drift/claim-driven and STRUCTURALLY BLIND to behavioral/threat classes — when an external lens finds a behavioral bug, internalize THAT LENS as an inventory invariant, don't just patch the instance — meta-audit conclusion (v3.9.0-rc.36, a 3-sub-agent in-house audit cross-checked against an independent grep sweep). Categorizing all 12 OIA checks + the invariant suite showed ~85% are claim/drift ("does a doc CLAIM match reality?": stale versions, count mismatches, SLSA-level strings, coverage-comment drift) and only K-1 (data-corruption), K-3 (MCP-contract), and OIA 4d/4e/9 (guard-presence greps + SHA-pin) touch behavior — each an incident-specific point defense, never a category the apparatus patrols. Consequence: every behavioral defect of the rc.25→rc.35 line came from an EXTERNAL privacy/STRIDE auditor, never from a home-grown gate — P-2 (HNSW-sidecar erasure), P-3 (path-leak in errors), R-5/AS#5 (unbounded-graph DoS), H-3 (fail-soft-where-fail-closed), M-9 (unpinned
run:download). The drift gates can't enter those categories because they read doc/config text, not control flow / on-disk state / matched-input space. Rule since v3.9.0-rc.36: when an external auditor (or your own threat-model pass) finds a behavioral bug, the fix is NOT complete until the lens that found it is encoded as a permanent inventory-based invariant — enumerate the artifacts/sites of that class and assert the property empirically, so the NEXT instance fails CI. rc.36 shipped three:tests/erasure-invariant.test.ts(every on-disk artifact's eraser references every sidecar suffix — writers ⊆ erasers, closes the P-2 class),tests/resource-bound-invariant.test.ts(every always-on whole-vault scanner must be CAP-or-EXEMPT classified — a new unclassified scanner fails CI, ends the R-5→AS#5→F-4/F-5 recursion), OIA Check 12b (orphan-distfiles — closes the L-3 stale-build class at its root). This is the same transform the rc.25 ReDoS generative fuzz made: convert "did we remember to bound/erase/sanitize X?" (undecidable, recursion-prone, auditor-dependent) into "does the inventory have an entry and does its property hold?" (a self-checking gate). Behavioral dimensions — status: supply-chainrun:-download pinning (M-9) → CLOSED v3.10.0-rc.26: OIA Check 9b now requires any tag-pinned release-archiverun:download to ALSO be SHA256-verified (content-pin); the one such download (mcp-publisherin release.yml) is hash-pinned +sha256sum -cfail-closed, detection-power inject/revert-verified. Paired-sink PDF/OCR error parity (H-3) → CLOSED v3.9.0-rc.33:extractPdfTextthrows on an invertedpageRange, parity with OCR'sresolveOcrPageRange. Still uncovered (deferred, named so they're not silently skipped): a generalized enforcement-verb→code-guard taxonomy (beyond the SLSA/OCR-specific 4d/4e), and theblock-granularity FTS5↔embed chunk-INDEX divergence for frontmatter'd notes (documented + accepted in rc.17 — prefer the defaultnotegranularity; not a bug).
Method note
Apply root-cause sweep methodology consistently: every bug → identify the class → ship class fix + per-instance backfill in one PR. When two or more instances recur, cover the class with a causal inventory or generative control before claiming closure.
Never write "каждый этап и элемент системы проаудирован, все ошибки устранены" from green CI alone. State the audited commit and surfaces, confirmed findings, rejected findings with reasons, runtime evidence, and remaining unverified boundaries.
Current phase status
The per-release log is preserved in Git history instead of being loaded in every session. For its complete pre-trim contents, run git show 0db770a:CLAUDE.md; release outcomes also live in CHANGELOG.md. Keep current context in the header and standing rules here.
Roll-up marker, pinned to package.json by scripts/check-version-consistency.mjs — advance it on every version bump: (current roll-up; @rc=4.0.0-rc.7).
Standing rules that lived only in that log and that the code cannot teach:
- Never dismiss a ReDoS alert (
js/polynomial-redosor any other) on reasoning alone. Time the adversarialclass×n + one non-class charshape first; if it is worse than linear, it is real (v3.11.0-rc.14). - Any fix touching the FS write path must be re-probed against a HOSTILE pre-existing filesystem state (pre-planted symlink, occupied temp name). A security fix needs an adversarial behavioral repro, not only structural re-verification (v3.11.0-rc.13).
- A generative fuzz or differential corpus is only as strong as the shapes its generator can produce. When a detector class recurs, first check that the generator can even emit the new shape (v3.10.0-rc.36, rc.54).
- A behavioral dependency major is verified by a v-old-vs-v-new differential run BEFORE any code edit, then the contract tests are re-derived to the new behavior (v3.11.0-rc.6).
- Shell is
zsh:statusis read-only there. Never name a poll or loop variablestatus. - After any artifact re-render or rebuild, re-measure every quantitative claim affected by it in the same commit. Preserve only verified dimensions/counts; do not carry forward stale asset byte sizes from an earlier draft (v3.9.0-rc.30).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

