agentleFS
sipyourdrink-ltdsipyourdrink-ltd/bernstein/CLAUDE.md

bernstein

CLAUDE.md1.4k starsChanged 58 days agoApache-2.0View on GitHub

Bernstein is the open-source governance layer for AI agents. It runs on policy as code: you write the policy - who may do what, what needs approval, what must be recorded - and Bernstein enforces it and produces the verifiable record. A deterministic scheduler - no model in the coordination loop - runs agents in parallel, gates what they produce, and records every step, so a run can be verified after the fact, offline, from the artifacts alone. CLI coding…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 2 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 5 mentionsSep 2026: 37 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the sipyourdrink-ltd/bernstein repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about sipyourdrink-ltd/bernstein

The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 49

Talked about on GitHub and Hacker News (49 times).

On GitHub · 47

42 more on GitHub

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every PR that adds or changes a feature MUST update docs in the same PR:

    line 98

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

bernstein - CLAUDE.md

<!-- AUTO-GENERATED by `bernstein agents-md sync` - DO NOT edit by hand. Source: AGENTS.md. -->

Overview

Bernstein is the open-source governance layer for AI agents. It runs on policy as code: you write the policy - who may do what, what needs approval, what must be recorded - and Bernstein enforces it and produces the verifiable record. A deterministic scheduler - no model in the coordination loop - runs agents in parallel, gates what they produce, and records every step, so a run can be verified after the fact, offline, from the artifacts alone. CLI coding agents work out of the box (Claude Code, Codex, Gemini CLI, and 50+ more), and the same layer governs any agent workload: the deliverable can be a diff, a research report, a dataset, or an audit evidence pack. Air-gap install profile included. Apache-2.0.

Module map

Full per-file map: docs/sdd/module-map.md (generated).

PackagePurpose / detail
core/orchestration engine - src/bernstein/core/
adapters/CLI agent adapters - src/bernstein/adapters/AGENTS.md
agents/agent catalog & discovery - src/bernstein/agents/
cli/Click CLI - src/bernstein/cli/AGENTS.md
evolution/self-evolution engine - src/bernstein/evolution/
eval/evaluation harness - src/bernstein/eval/
plugins/plugin system (pluggy) - src/bernstein/plugins/
tui/Textual TUI - src/bernstein/tui/
github_app/GitHub App integration - src/bernstein/github_app/
mcp/MCP server - src/bernstein/mcp/
benchmark/SWE-bench - src/bernstein/benchmark/

Directory context files

Per-directory context files for agents working inside a subtree. Each covers: what the directory is for, key files, invariants, and how to test that subtree.

PathCovers
src/bernstein/adapters/AGENTS.mdCLI agent adapters
src/bernstein/cli/AGENTS.mdClick CLI
src/bernstein/core/lineage/AGENTS.mdLineage: artifact provenance
src/bernstein/core/orchestration/AGENTS.mdOrchestration engine
src/bernstein/core/quality/AGENTS.mdQuality gates and verification
src/bernstein/core/security/AGENTS.mdSecurity: audit chain, identity, policy
tests/AGENTS.mdTest suite

Build & test

uv sync                             # install + lock
uv run python scripts/run_tests.py  # tests (isolated per-file runner)
uv run ruff check .                 # lint
uv run ruff format .                # format
uv run mypy src                     # type-check

Setup

  1. uv sync to install + lock the project.
  2. uv run python -m bernstein --help (or your equivalent entry point).
  3. See Build & test for the recurring commands.

Architecture (entry points)

Top-level entry points exposed by the package:

CommandPurpose
bernsteinbernstein.cli.main:cli
bernstein-workerbernstein.core.worker:main
bernstein-benchbernstein.eval.bench.bench_cli:bench_group
verify-audit-receiptbernstein.core.verifier.audit_receipt_verifier:main

Back-compat aliases. Legacy import paths (e.g. bernstein.core.orchestrator) are served by a sys.meta_path finder, not by physical shim files. The mechanism lives in src/bernstein/core/__init__.py as _CoreRedirectFinder driven by the _REDIRECT_MAP dict - add new aliases there rather than creating shim modules at the old path.

Git workflow

Default branch: main.

Agent roles

Bernstein ships agent role prompts under templates/roles/. The orchestrator loads them at task-spawn time; you don't write to them manually.

  • adversary
  • analyst
  • architect
  • backend
  • ci-fixer
  • devops
  • docs
  • frontend
  • manager
  • ml-engineer
  • prompt-engineer
  • qa
  • resolver
  • retrieval
  • reviewer
  • security
  • visionary
  • vp

Documentation duty

Every PR that adds or changes a feature MUST update docs in the same PR:

  • User-visible behaviour: update the relevant README.md section.
  • Operator workflows: update docs/operations/<area>.md.
  • Public API surface: regenerate docs/api/ schemas.
  • Architecture or new module: update docs/sdd/ and run bernstein agents-md sync so AGENTS.md, CLAUDE.md, .goosehints, CONVENTIONS.md, and .cursor/rules/*.mdc stay aligned.
  • New test layer: also update docs/contributing/testing.md.

PRs without the matching docs change will be sent back. Docs and code ship together.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.