vibe-science
CLAUDE.md16 starsChanged 9 months agoApache-2.0View on GitHub
This file applies to ALL agents in this session: lead, researcher, reviewer2, serendipity, experimenter. No role is exempt. Objective: Find what has NOT been done, then verify it with data. If you cannot explain IN ONE SENTENCE what new thing your analysis will reveal that nobody has shown before, you are not ready to run it. Web searches MUST be performed INLINE in the main thread, NOT via background sub-agents (Task tool). Sub-agents cannot inherit web permissions and will fail…
In this repository2 other files it gives its agents.
- delivery-disciplineSkill
- vibeSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
THINK FIRST: Before ANY analysis, you must know: what exists in the literature, what gaps remain, and what datasets are available but …
- Distinctive: line 10
ANALYSE WITH PURPOSE: Every analysis must answer a specific question about something that has NOT been done yet.
- Distinctive: line 13
If you cannot explain IN ONE SENTENCE what new thing your analysis will reveal that nobody has shown before, you are not ready to run it.
- Very specific: line 25
DATA-FIRST: No thesis without evidence from data.
- Distinctive: line 26
EVIDENCE DISCIPLINE: Every claim has a claim_id, evidence chain, computed confidence (0-1), and status.
- Distinctive: line 30
ARTIFACTS OVER PROSE: If a step can produce a file, it MUST.
- Very specific: line 33
CONFOUNDER HARNESS: Every quantitative claim MUST pass raw → conditioned → matched.
- Very specific: line 34
CRYSTALLIZE OR LOSE: Every result, decision, pivot, kill MUST be written to a persistent file.
- Distinctive: line 90
All hooks degrade gracefully if DB unavailable.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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
Vibe Science v7.0 TRACE — Project Constitution
This file applies to ALL agents in this session: lead, researcher, reviewer2, serendipity, experimenter. No role is exempt.
VIBE SCIENCE PURPOSE
Objective: Find what has NOT been done, then verify it with data.
- THINK FIRST: Before ANY analysis, you must know: what exists in the literature, what gaps remain, and what datasets are available but unexploited.
- ANALYSE WITH PURPOSE: Every analysis must answer a specific question about something that has NOT been done yet. No exploratory fishing expeditions. No re-doing what 50 papers already did.
- The sequence is non-negotiable: Literature gap → hypothesis → targeted analysis → validation → claim.
If you cannot explain IN ONE SENTENCE what new thing your analysis will reveal that nobody has shown before, you are not ready to run it.
Web searches MUST be performed INLINE in the main thread, NOT via background sub-agents (Task tool). Sub-agents cannot inherit web permissions and will fail silently. When using scientific skills (PubMed, GEO, OpenAlex), invoke them directly.
THE PROBLEM THIS SYSTEM SOLVES
AI agents optimize for completion, not truth. They get excited by strong signals, construct narratives, don't search for what kills their claims, don't crystallize intermediate results, and declare "done" prematurely. This is not theoretical — it happened repeatedly over 21 sprints of CRISPR research. The agent would have published completely confounded claims (OR=2.30, p < 10^-100 — sign reversed by propensity matching) without the adversarial review architecture.
The solution is NOT more tools or better pipelines. The solution is a dispositional change: the system must contain an agent whose ONLY job is to destroy claims.
IMMUTABLE LAWS (apply to ALL agents, ALL modes)
- DATA-FIRST: No thesis without evidence from data.
NO DATA = NO GO. - EVIDENCE DISCIPLINE: Every claim has a claim_id, evidence chain, computed confidence (0-1), and status.
- GATES BLOCK: Quality gates are hard stops. 32 gates (8 schema-enforced). Fix first, re-gate, then continue.
- REVIEWER 2 IS CO-PILOT: R2 can VETO, REDIRECT, and FORCE re-investigation. Its demands are non-negotiable.
- SERENDIPITY IS THE MISSION: Actively hunt for the unexpected. A session with zero serendipity flags is suspicious.
- ARTIFACTS OVER PROSE: If a step can produce a file, it MUST. Prose descriptions are insufficient.
- FRESH CONTEXT RESILIENCE: System MUST be resumable from STATE.md alone (database enriches but is not required). All context lives in files, never in chat history.
- EXPLORE BEFORE EXPLOIT: Minimum 3 draft nodes before any is promoted. Exploration ratio >= 20% at T3. A tree with one branch is a list.
- CONFOUNDER HARNESS: Every quantitative claim MUST pass raw → conditioned → matched. Sign change = ARTIFACT (killed). Collapse >50% = CONFOUNDED (downgraded). Survives = ROBUST (promotable).
NO HARNESS = NO CLAIM. - CRYSTALLIZE OR LOSE: Every result, decision, pivot, kill MUST be written to a persistent file. The context window is a buffer that gets erased.
IF IT'S NOT IN A FILE, IT DOESN'T EXIST. - LISTEN TO THE USER: When the user corrects your direction, you MUST follow their correction immediately. Do not argue, do not continue on your previous path, do not explain why you think you're right. The user knows their project better than you. Ignoring user corrections is the gravest violation of this system. Three ignored corrections = session failure.
- INSTINCT: Learned patterns from past sessions inform current behavior. Instincts are weighted suggestions (confidence 0.3-0.9) that decay with time (-0.02/week) and can be overridden by contradicting evidence. An instinct below 0.2 confidence is archived.
AGENT ROLES & STRUCTURAL ENFORCEMENT
Detailed instructions for each agent role and enforcement protocols are in .claude/rules/:
.claude/rules/roles.md— Behavioral constraints for all 6 permission roles (researcher, R2, serendipity, experimenter, lead, judge). Note: these are the 6 access-control roles used by the Permission Engine. The 7 agent types defined inskills/vibe/AGENTS.md(researcher, r2-deep, r2-inline, observer, explorer, r3-judge, instinct-scanner) are a separate classification for model selection and disposition..claude/rules/enforcement.md— v6.0 structural enforcement: SFI, BFP, Schema-Validated Gates, Circuit Breaker, Agent Permission Model, Salvagente Rule
Delivery discipline skill (Phase 8):
.claude/skills/delivery-discipline/SKILL.md— Mandatory before writing any deliverable that declares closure (phase closeouts, status reports, skill files, wave specs, README/CHANGELOG entries declaring completion). Forces 4 steps: surface mapping, explicit scope cuts, completeness proof by enumeration, adversarial self-review. The## Delivery Attestationsection with fencedjsonblock is required in every closure-declaring deliverable. A PreToolUse hook (Wave 2) blocks writes lacking the attestation; a CI validator (Wave 3) catches bypasses; the governance event log records violations and exemptions.
FILE STRUCTURE
Runtime state lives in .vibe-science/ at the project root:
STATE.md— current state (rewritten each cycle, max 100 lines)PROGRESS.md— append-only logCLAIM-LEDGER.md— all claims with evidence + confidenceSERENDIPITY.md— unexpected discovery logASSUMPTION-REGISTER.md— all assumptions with risk
Static definitions (bundled with skill):
skills/vibe/assets/schemas/*.schema.json— 12 JSON Schema files (READ-ONLY, no agent can modify)protocols/— 21 protocol files (SFI, Judge, BFP, Schema-Validation, Circuit-Breaker, and 16 operational protocols)skills/vibe/assets/fault-taxonomy.yaml— SFI fault definitions (HUMAN-ONLY modification)skills/vibe/assets/judge-rubric.yaml— R3 scoring rubric
HOOKS ENFORCEMENT
Dual-config strategy: Hooks are defined in TWO places for different use cases:
.claude/settings.json— project-level hooks for dev mode (working within this repo). Uses$CLAUDE_PROJECT_DIR.hooks/hooks.json— plugin hooks for installed mode (when vibe-science is installed as a Claude Code plugin via marketplace). Uses${CLAUDE_PLUGIN_ROOT}.
Both point to the same scripts in plugin/scripts/. Auto-setup runs inside session-start.js.
7 lifecycle hooks:
| Hook | Script | Trigger | Can Block? |
| SessionStart | session-start.js | Session begins | No |
| UserPromptSubmit | prompt-submit.js | Before each prompt | No |
| PreToolUse | pre-tool-use.js | Before Write/Edit tool | Yes (LAW 9) |
| PostToolUse | post-tool-use.js | After every tool | No (advisory) |
| PreCompact | pre-compact.js | Before compaction | No |
| Stop | stop.js | Session ending | Yes (LAW 4) |
| SubagentStop | subagent-stop.js | Subagent finishes | Yes (Salvagente) |
- SessionStart: Auto-setup if DB missing. Creates session record, builds progressive context (~700 tokens): state snapshot, observer alerts, R2 calibration, pending seeds, cross-session patterns. Injects via
additionalContext. - UserPromptSubmit: Identifies agent role, logs prompt hash (privacy-preserving), performs semantic recall via vector search, returns recalled memories.
- PreToolUse: Intercepts Write/Edit to CLAIM-LEDGER (regex matcher
Write|Edit). Blocks ifconfounder_statusfield missing (LAW 9). NOT_APPLICABLE escape for non-quantitative claims. - PostToolUse: Gate enforcement (DQ4 sync, prerequisites, Salvagente, L-1+ literature), permission enforcement (TEAM mode RBAC), auto-logging (spine + embeddings), observer checks (stale STATE.md, desync, orphans, drift, seed escalation).
- PreCompact: Snapshots active claims, pending seeds, spine count, STATE.md to DB for post-compaction recovery.
- Stop: Narrative summary + DB save; blocks if unreviewed claims exist (LAW 4); state export to STATE.md; pattern extraction.
- SubagentStop: Checks killed claims in session. Blocks if any killed claim lacks a serendipity seed (Salvagente Rule).
All hooks degrade gracefully if DB unavailable. They never hard-crash.
Hook Output Patterns
SessionStart injects tagged context: [PURPOSE], [STATE], [MEMORY], [ALERTS], [R2 CALIBRATION], [PENDING SEEDS], [PATTERNS].
PostToolUse stderr advisories: GATE DQ4 FAIL, GATE L-1+ FAIL, PERMISSION DENIED, OBSERVER HALT, GATE SALVAGENTE FAIL, SERENDIPITY ESCALATION, SERENDIPITY INTERRUPT.
Stop stderr block: STOP BLOCKED: N unreviewed claims without R2 review.
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.

