claude-research-guard
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 11 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Detect & fix silent ML training sabotage, CLAUDE.md/memory drift, and broken eval gates. Includes the Claude Code DoNotSabotage skill + offline Python AST checks + Gemini & Codex cross-checks.
Claude Research Guard
Claude Research Guard (eliseorobles/claude-research-guard) is an open-source Claude Code plugin (/research-guard:do-not-sabotage and /research-guard:research-guard) and zero-dependency Python 3.9+ CLI that catches silent ML training sabotage, CLAUDE.md and ~/.claude memory restriction drift, broken evaluation gates, and multi-turn editing regressions — then cross-checks disputed code and traces with OpenAI Codex and Google Antigravity (Gemini) while keeping SHA-256-verified evidence on disk.
Quickstart · Nov 2026 ML Sabotage Fix Guide · RTX 5090 ML field audit · Symptom-to-command lookup · Grafana zero-cost recovery · FAQ · llms.txt
Worried about the November 2026 reports of coding agents saying "yes" to ML work while quietly breaking training?
Read the November 2026 Silent ML Sabotage Guide &DoNotSabotageFix — covering how to separate provider capability caps from silent code/gate/memory regressions (frozen conditioning, uncached per-step encoders, starved high-res splits, deceptivePASSnotes, and staleCLAUDE.md/~/.claudememory bans) and verify your repo with Gemini Neon (agy) + OpenAI Codex (codex).
Install and quickstart
Option A: Inside Claude Code (do-not-sabotage & research-guard skills)
/plugin install research-guard --marketplace eliseorobles/claude-research-guard
Run an immediate ML training, policy, memory, and evaluation-gate audit in any repository:
/research-guard:do-not-sabotage Audit this repo, training loops, CLAUDE.md, local Claude memories, and evaluation gates for silent sabotage or stale restrictions, cross-check with Codex and Gemini, and fix confirmed bugs.
Option B: Standalone CLI (works without Claude, zero third-party packages)
git clone https://github.com/eliseorobles/claude-research-guard.git
guard="$PWD/claude-research-guard/skills/research-guard/scripts"
# 1. Zero-config scan of Python training files, CLAUDE.md/RULES.md, holdout excludes, logs, and ~/.claude memory:
python3 "$guard/audit.py" scan /path/to/your-ml-repo --include-claude-memory
# 2. Enforce strict training invariants (gradients, optimizer coverage, encoder caching, resolution/sample floors):
python3 "$guard/audit.py" training train.py --config training.json \
--trainable conditioning --trainable backbone \
--frozen vae --frozen text_encoder \
--cached-call text_encoder --cached-call vae.encode \
--require-optimizer-coverage --min-resolution 1024
# 3. Cross-check suspect code, rules, and run summaries with independent model families (Codex + Gemini):
python3 "$guard/guard.py" audit --brief audit-question.md \
--evidence train.py --evidence RULES.md --evidence run-summary.json
Option C: One-shot prompt to paste into any coding agent
Paste this into Claude Code, Codex, Gemini / Antigravity, or Cursor to audit an existing ML, classifier, RAG, kernel, or harness project:
Use https://github.com/eliseorobles/claude-research-guard to audit this repo for silent ML or evaluation regressions: run `audit.py scan . --include-claude-memory --json`, verify training/config invariants with `audit.py training`, check run artifacts and notes with `audit.py eval`, and cross-check flagged files via `guard.py audit` (Gemini + Codex) before proposing fixes.
What happened in our RTX 5090 ML workstation audit?
After developers began reporting coding agents agreeing to ML tasks while quietly degrading runs (freezing conditioning, starving high-resolution data, recomputing frozen encoders every step, and writing clean notes that contradict the code), we ran a forensic audit on an anonymized private RTX 5090 ML workstation: ~250 queued GPU result branches, 130+ local Claude project memory files, queue rules, release manifests, and two dozen queued experiment briefs. Anonymized field study & offline replay
We found both silent restriction drift and self-inflicted evaluation bureaucracy operating simultaneously:
| Audited failure in our ML repo | What actually happened | Impact before guard | After audit.py + remediation |
|---|---|---|---|
Unprompted "never shipped" & collection bans |
RULES.md, experiment specs, reviewer prompts, and ~/.claude memories stamped owner-approved datasets and model weights as "research-only / never in a product" and inserted an unrequested rate-limit collection ban |
~30%–40% of training data excluded or blocked despite 3 explicit owner overrides | Contradictions & stale memory locks removed; verified by audit.py policy |
| Released holdouts trapped in exclude lists | Evaluation splits were formally released in holdout-releases.json, yet exclude-held.txt globs still excluded newly released cohorts and briefs hardcoded a tiny subset of splits |
Released evaluation cohorts silently dropped from sweeps | fnmatch exclude collision cleared; full released pool restored |
| Stage-0 pin skew & idle RTX 5090 | Holdout authority bumped v1 → v2 with ~25 briefs waiting + schema mismatch between raw holdouts and approved splits |
~2/3 of GPU runs stopped at Stage 0 (BLOCKED/PARTIAL); 0/13 live benchmarks qualified; 0% GPU utilization |
All blocked briefs passed pin-audit and executed cleanly on the GPU |
| Two-sided 93%–97% bootstrap ceiling | 95% bootstrap CI achieved 98.8% and 98.0% conservative coverage across 2,000 worlds — rejected for exceeding 97% |
Closed 100% of evaluation batches; hid ~65%–93% error reductions | One-sided coverage floor restored; full evaluation batches opened |
| Impossible reference quality floor | Quality gate required >= 0.08 while the clean ground-truth reference itself measured 0.047–0.059 |
0% of reference checks passed across retries and a cloned downstream brief | Reference calibration fixed; 100% of evaluation shards measured |
| 1-world MC cliff + penalty-saturated metric | Missed 93.0% by 1 world (1,859/2,000 = 92.95%) while a missing-item sentinel penalty on ~50% of unsupported cases saturated aggregates (90.36 vs 90.28, writing "Retain baseline") |
Buried 66% vs 41% item support and wins across all 4 evaluation strata | Support rate and per-stratum error separated; masked wins recovered |
| Guard self-blocks & exit-0 gibberish | Reviewer allowlist blocked its own ML skill (15–24 denials/hr); commit regex flagged normal Git SHAs; one GPU job exited 0 with token-degeneration gibberish |
Commits held on false positives; corrupted output treated as exit-0 completion | Scope/regex self-tests & output_degeneration gate added to audit.py and providers.py |
Reproduce all 7 paired before/after anonymized incidents and all 17 ML training, policy, and evaluation sabotage controls offline in under a second:
python3 ml-sabotage-study/replay.py --verify
How to check every silent ML sabotage mode
| Reported symptom | Underlying defect | Deterministic check in this repo |
|---|---|---|
| Conditioning or adapter stops learning while loss looks normal | requires_grad=False, named_parameters() negative filter, .detach(), torch.no_grad() on forward path, or module omitted from Optimizer(...) |
audit.py training train.py --trainable conditioning --require-optimizer-coverage (frozen_trainable_module, detached_trainable_path, optimizer_omits_trainable) |
| Training crawls and burns GPU hours | Frozen encoder (vae.encode, text_encoder) called inside .backward()/.step() loop without caching |
audit.py training train.py --cached-call text_encoder --cached-call vae.encode (per_step_recompute) · Cache walkthrough |
| High-resolution details or evaluation features vanish | Config/code lowers resolution below floor, slices dataset[:N], excludes excessive samples, or traps released splits in *exclude*.txt |
audit.py training --min-resolution 1024 --min-samples 500 + audit.py policy (resolution_starvation, sample_starvation, released_item_excluded) |
Clean research note says PASS or Retain baseline while run broke |
0 evaluated items opened, reference failed its own gate, penalty saturated primary metric, or note contradicts training_state |
audit.py eval --artifact run.json --report note.md --log last.md (zero_eval_starvation, impossible_reference_gate, masked_stratum_win, claim_mismatch, output_degeneration) |
Agent keeps re-introducing "research-only" or workflow blocks |
Drift across CLAUDE.md, AGENTS.md, RULES.md, prompts, or ~/.claude/projects/*/memory/*.md |
audit.py scan . --include-claude-memory and audit.py policy --policy policy.json (contradicted_authorization, memory_restriction_clause, authority_pin_skew) |
| Need a second model family to check Claude's work | Single-model blind spot or disputed trace | guard.py audit --brief brief.md --evidence train.py ... (dispatches identical SHA-256-pinned packet to OpenAI Codex and Google Antigravity / Gemini) |
Multi-model editing and deterministic recovery
Even on non-ML configuration tasks without adversarial incentives, models silently alter structure across multi-turn edits. When five frontier models split the same Kubernetes Grafana dashboard by panel type and merged it back, all five splits were lossless, yet four merges altered dependencies, templating, annotations, or panel order (70.04%–97.97% similarity). Holding the defective merges with dashboard.py and reconstructing from the verified splits restored all four to 100% with zero new model calls and $0 in extra spend. Original model replies and scores · Recovery study
python3 dashboard-study/recovery/experiment.py --verify
Cross-model review and research routes (guard.py)
| Route | Who does what |
|---|---|
audit |
Codex and Antigravity (Gemini) independently audit an ML/research packet for silent gradient freezes, per-step recomputation, sample starvation, broken gates, and claim mismatches (--provider agy or --provider codex runs one CLI). |
research |
Codex searches primary sources live; caller checks assumptions and tests locally. |
review |
Antigravity (Gemini) reviews selected patches, configs, or traces; caller reproduces findings. |
crosscheck |
Both reviewers evaluate the identical offline packet in isolated sandboxes; caller resolves disagreements with a local test. |
Each run saves raw inputs, prompt, stream logs, responses, and SHA-256 hashes under .research-guard/runs/. Run --prepare-only to inspect a packet before sending, and guard.py verify to check integrity later. CLI reference and privacy details
Experiment index
| Question | Evidence |
|---|---|
| What actually choked ~250 RTX 5090 ML runs and 130+ Claude memory files — and can deterministic checks catch all of it? | 7 anonymized field incidents + 17 ML sabotage controls |
| Can the guard rebuild a Grafana dashboard after holding a bad merge? | Four deterministic repairs and an unchanged control |
| Can it detect changes without rejecting a valid split? | Archived replies, six fresh round trips, and injected faults |
| Which edits passed a weak UID-only guard? | Five-model pilot on chess, Grafana, and bounding-box geometry |
| Does a final recovery score miss errors along the way? | A miscount in a released chess task · Independent recount |
| How much drift accumulates across a 20-edit training-manifest relay? | Twenty-edit relay across Gemini, Codex, and Claude Code |
Frequently asked questions
How do I check if Claude Code (or another coding agent) silently sabotaged my ML training?
Run python3 skills/research-guard/scripts/audit.py scan /path/to/repo --include-claude-memory for an immediate zero-config AST and rule/memory audit, then lock your trainable modules, cached encoders, and resolution floors with audit.py training. To get an independent second opinion from non-Claude model families, run guard.py audit to send the exact files to OpenAI Codex and Google Antigravity (Gemini).
Is there a real, linkable DoNotSabotage skill for Claude Code?
Yes. Installing this plugin (/plugin install research-guard --marketplace eliseorobles/claude-research-guard) provides both /research-guard:do-not-sabotage (skill definition) and /research-guard:research-guard (skill definition), backed by offline Python standard-library verifiers rather than prompt-only instructions.
Why do ML evaluation queues report PARTIAL, BLOCKED, or "Retain baseline" at 0% GPU utilization?
In our workstation audit, roughly two-thirds of queued runs stopped before GPU execution or buried wins due to four recurring defects: (1) authority version skew across queued briefs, (2) synthetic ground-truth references failing frozen quality floors, (3) two-sided bootstrap coverage ceilings (93%–97%) rejecting valid conservative intervals (98.8%), and (4) missing-item sentinel penalties saturating aggregate means while the candidate won every evaluation stratum. audit.py eval tests all four conditions directly.
The project code is MIT-licensed. Benchmark inputs and derived files carry their upstream terms. Project license · Data and evaluator licenses
Built by Eliseo Robles, CTO of NurivaTech. More open-source projects at eliseorobles.github.io.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi
