CORE

mcp
Guvenlik Denetimi
Gecti
Health Gecti
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 39 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.

SUMMARY

Constitutional code governance for AI coding agents: the rulebook your agent has to pass before its changes merge. Rules committed with your code, checked outside the agent, a human decides what ships. Not another agent. Python, MIT.

README.md

CORE

CORE is the rulebook your AI agent has to pass before its changes merge.

Not another swarm of agents: CORE is constitutional code governance for AI
coding agents. Your rules are committed with your code in .intent/, checked
by engines outside the agent, and a human decides what ships. With pip install you get a verdict on every pull request, plus your merge (required
only if you set branch protection); with the full runtime, a promotion only
the governor can approve. An agent can propose changes, including changes to
that law; in CORE's own repository they merge into main on green checks, but
nothing runs live until a human approves the promotion, whose summary puts
host and law changes at the top. Within five minutes of install you see
what your agent's code violates; Known limits
says where CORE gets it wrong.

License: MIT
Release
Docs

Current Release: v3.3.0 — see CHANGELOG.md.

What CORE is

CORE audits a codebase against declared rules in .intent/, records every
violation, proposes fixes, and logs the chain from finding to commit. AI
assistants and CORE's own loop can propose changes. In CORE's own repository,
pull requests into main merge themselves when the required checks pass; only
the promotion of main to live needs the human governor's approval. What it is
for, in plain words: What CORE does.
Real findings, with their limits: Violation gallery.
What CORE does not do yet: Known limits.

The pip install below gives you the offline audit, CORE's audit on every pull
request (GitHub Action) and, for your AI assistant, the rules and a verdict on
its change before it commits. Recording findings, proposing fixes, CORE's own
loop and changes submitted for your approval need the full local runtime (last
block of this section).

Install and first run

You need Python 3.12 or later and git. On Debian and Ubuntu, python3 -m venv
also needs the python3-venv package (sudo apt install python3-venv git).

python3 -m venv .venv && . .venv/bin/activate
pip install core-runtime

Current Ubuntu and Debian refuse a bare pip install outside a virtual
environment ("externally-managed-environment"); the first line creates one
(pipx install core-runtime works too). This gives you the core-admin CLI. In a repository that already has a
.intent/ constitution, audit it with no services running:

core-admin code audit --offline

To bring CORE into an existing repository, no services are needed either:

cd your-repo
core-admin project init . --write --yes
core-admin project adopt-pack core/starter-python --write
git add .intent .github && git commit -m "Adopt CORE"
core-admin code audit --offline

project init --write asks for confirmation at a terminal; --yes skips the
question, and without a terminal (CI, scripts, AI agents) it stops at once
unless --yes is given.

The audit judges the law committed at HEAD, so commit .intent/ first;
uncommitted law reads DEGRADED, never PASS. project init also writes CORE's
GitHub Action (.github/workflows/core-audit.yml); commit it with the law. The
audit lists blocking and high findings; reporting and advisory ones are only
counted. Add --severity info to list them too.

Connect your AI assistant (Claude Code shown; any MCP client works) so it asks
CORE about your project's rules and checks its change before committing; see
Connect your AI assistant:

claude mcp add --scope project core -- core-admin mcp run

Claude Code starts core-admin itself, so it must be on PATH in the shell
you start claude from: activate the virtual environment first, or install
with pipx install core-runtime (then pipx ensurepath) so it is on PATH in
every shell; get pipx first with sudo apt install pipx on Debian/Ubuntu. Everyone who uses the committed .mcp.json needs the same.

A new project:

core-admin project new myproject --write
cd myproject
git init
core-admin project adopt-pack core/starter-python --write
git add -A && git commit -m "Adopt core/starter-python"
core-admin code audit --offline

The new project is clean, so that audit passes. Add a file with the kind of
code an agent often writes, a bare except:, and audit again:

cat > src/myproject/agent_code.py <<'EOF'
"""Code an AI agent might write."""


def read_config(path):
    """Return the file's text, or an empty string if it cannot be read."""
    try:
        with open(path, encoding="utf-8") as f:
            return f.read()
    except:
        return ""
EOF
core-admin code audit --offline

The verdict is FAIL, with one blocking finding: starter.no_bare_except, line 9
(add --verbose to see the file). Name the exception and the audit passes again:

sed -i.bak 's/except:/except OSError:/' src/myproject/agent_code.py && rm src/myproject/agent_code.py.bak
core-admin code audit --offline

To run the full local runtime (Postgres + Qdrant) from a clone (it also needs
Docker with Compose v2 and Poetry; every prerequisite is in
Run the full runtime):

git clone https://github.com/DariuszNewecki/CORE.git
cd CORE
./install-core.sh

More

License

MIT — see LICENSE.

Yorumlar (0)

Sonuc bulunamadi