freshcrate
Skin:/

CORE

A thing that uses AI to write perfect applications. For those who want to know how: a governance runtime enforcing immutable constitutional rules on AI coding agents.

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

A thing that uses AI to write perfect applications. For those who want to know how: a governance runtime enforcing immutable constitutional rules on AI coding agents.

README

CORE

Executable constitutional governance for AI-assisted software development.

License: MIT Release Docs


The Problem

AI coding tools generate code fast. Too fast to stay sane.

Without enforcement, AI-assisted codebases accumulate invisible debt โ€” layer violations, broken architectural contracts, files that grow unbounded. And agents, left unconstrained, will eventually do something like this:

Agent: "I'll delete the production database to fix this bug"
System: Executes.
You:    ๐Ÿ˜ฑ

CORE makes that impossible โ€” not detectable after the fact. Impossible.

Agent: "I'll delete the production database to fix this bug"
Constitution: BLOCKED โ€” Violates data.ssot.database_primacy
System: Execution halted. Violation logged.
You:    ๐Ÿ˜Œ

CORE is a governance runtime that constrains AI agents with machine-enforced constitutional law โ€” enforcing architectural invariants, blocking invalid mutations automatically, and making autonomous workflows auditable and deterministic.

LLMs operate inside CORE. Never above it.


๐ŸŽฌ Live Enforcement Demo

Blocking rule โ†’ targeted drilldown โ†’ automated remediation โ†’ verified compliance.

asciicast

This demo shows:

  • A structural violation (linkage.assign_ids)
  • Deterministic blocking of execution
  • Rule-level audit inspection
  • Automated remediation via core-admin dev sync --write
  • Verified compliance after repair

Governance is executable.


Architectural Model

CORE separates responsibility into three constitutional layers. This separation is enforced as law โ€” not convention.

๐Ÿ“ Specs โ€” Human Intent (.specs/)

Where humans define what the system is for and why decisions were made. Contains architectural papers, northstar documents, user requirements, architectural decision records, and planning documents. This is the entry point for anyone trying to understand CORE before reading its implementation.

.specs/ is read by humans and searchable by CORE's semantic layer. It is never written by CORE itself.

๐Ÿง  Mind โ€” Law (.intent/ + src/mind/)

Defines what is allowed, required, or forbidden. Contains machine-readable constitutional rules, enforcement mappings, phase-aware governance models, and the authority hierarchy (Meta โ†’ Constitution โ†’ Policy โ†’ Code).

Mind never executes. Mind never mutates. Mind defines law.

โš–๏ธ Will โ€” Judgment (src/will/)

Reads constitutional constraints, orchestrates autonomous reasoning, and records every decision with a traceable audit trail. Every operation follows a structured phase pipeline:

INTERPRET โ†’ PLAN โ†’ GENERATE โ†’ VALIDATE โ†’ STYLE CHECK โ†’ EXECUTE

Will never bypasses Body. Will never rewrites Mind.

๐Ÿ—๏ธ Body โ€” Execution (src/body/)

Deterministic, atomic components: analyzers, evaluators, file operations, git services, test runners, CLI commands.

Body performs mutations. Body does not judge. Body does not govern.


How CORE Works

Every autonomous operation is governed by the same constitutional loop:

flowchart TD
    A["๐ŸŸข GOAL\nHUMAN INTENT"] --> B["๐Ÿ“‚ CONTEXT\nRepo state โ€ข knowledge โ€ข history"]
    B --> C["๐Ÿ”’ CONSTRAINTS\nImmutable rules\n120 rules โ€ข 7 engines"]
    C --> D["๐Ÿ—บ๏ธ PLAN\nStep-by-step reasoning\nRule-aware plan"]
    D --> E["โœจ GENERATE\nCode โ€ข changes โ€ข tool calls"]
    E --> F["โœ… VALIDATE\nDeterministic checks\nAST โ€ข semantic โ€ข intent โ€ข style"]
    F -->|Pass| G["โ–ถ๏ธ EXECUTE\nApply compliant changes"]
    F -->|Fail| H["๐Ÿ”„ REMEDIATE\nRepair violation\nAutonomy Ladder"]
    H --> E
    G --> I["โœ“ SUCCESS\nChanges committed"]

    subgraph "SAFETY HALT"
        direction TB
        J["๐Ÿšจ CONSTITUTIONAL VIOLATION\nโ†’ HARD HALT\n+ FULL AUDIT LOG"]
    end

    E -.->|Any violation| J
    F -.->|Any violation| J

    classDef phase      fill:#f8f9fa,stroke:#495057,stroke-width:2px
    classDef constraint fill:#d1e7ff,stroke:#0d6efd,stroke-width:2.5px
    classDef validate   fill:#fff3cd,stroke:#ffc107,stroke-width:2.5px
    classDef halt       fill:#ffebee,stroke:#dc3545,stroke-width:3px

    class A,B,D,E,G,I phase
    class C constraint
    class F validate
    class J halt
Loading

System Guarantees

Within CORE:

  • No file outside an autonomy lane can be modified
  • No structural rule can be bypassed silently
  • No database action occurs without authorization
  • All decisions are phase-aware and logged with full decision traces
  • No agent can amend constitutional law

If a blocking rule fails, execution halts. No partial states.


Constitutional Primitives

Primitive Purpose
Document Persisted, validated artifact
Rule Atomic normative statement
Phase When the rule is evaluated
Authority Who may define or amend it

Enforcement strengths: Blocking ยท Reporting ยท Advisory


Enforcement Engines

Engine Method
ast_gate Deterministic structural analysis (AST-based)
glob_gate Path and boundary enforcement
intent_gate Runtime write authorization
knowledge_gate Responsibility and ownership validation
workflow_gate Phase-sequencing and coverage checks
regex_gate Pattern-based text enforcement
llm_gate LLM-assisted semantic checks

Deterministic when possible. LLM only when necessary.

120 rules across 126 policies. 121 executable.


The Autonomy Ladder

CORE progresses through defined levels. Each adds capability while remaining constitutionally bounded.

A0 โ€” Self-Awareness       โœ…  Knows what it is and where it lives
A1 โ€” Self-Healing         โœ…  Fixes known structural issues automatically
A2 โ€” Governed Generation  โœ…  Natural language โ†’ constitutionally aligned code
A3 โ€” Governed Autonomy    ๐ŸŽฏ  Daemon finds, proposes, and fixes violations unattended  โ† current
A4 โ€” Self-Replication     ๐Ÿ”ฎ  Writes CORE.NG from its own understanding of itself

Requirements

Dependency Version
Python โ‰ฅ 3.11
PostgreSQL โ‰ฅ 14
Qdrant latest
Docker for services
Poetry for deps

Quick Start

git clone https://github.com/DariuszNewecki/CORE.git
cd CORE
poetry install

cp .env.example .env
make db-setup

# Run a constitutional audit
poetry run core-admin code audit

Documentation

Full documentation, architecture deep-dive, and governance reference: dariusznewecki.github.io/CORE

To understand what CORE is for before reading its implementation, start here: .specs/northstar/CORE-What-It-Does.md


Project Status

Current Release: v2.2.2

Active work: A3 Governed Autonomy โ€” the daemon runs continuously, finds constitutional violations in its own codebase, proposes fixes, executes approved changes, and verifies the result. The governor's role is to define intent, review proposals that require architectural judgment, and approve constitutional changes.


License

License: MIT


Build fast with AI. Stay constitutionally aligned.

Release History

VersionChangesUrgencyDate
v2.6.0First release on the aligned PyPI/GitHub version track per ADR-088 D1. The `core-runtime` package now publishes from a declared `__all__` rather than the unbounded source tree, and the runtime chokepoint that authorizes filesystem writes is observable per capability and per mode. PyPI `core-runtime==2.6.0`; classifier `Development Status :: 4 - Beta` (per ADR-088 D2's honest posture: API approaching stability, public surface contract under active definition). --- ## What's in it ### F-48.4 โ€”High6/2/2026
v2.5.0<html><head></head><body> <p>Band D closed. CORE's governance engine is now constitutionally coherent: no enforcement logic lives in <code>src/</code>, no impact classification lives in decorators, no operational threshold lives as a hardcoded literal. The rules that govern autonomous behaviour are declared in <code>.intent/</code> and enforced from there.</p> <p>This release closes the gap between a system that <em>behaves</em> constitutionally and one that <em>is auditable as</em> constitutiHigh5/12/2026
v2.4.0v2.4.0 โ€” Consequence Chain Band B closed. CORE's autonomous-operation gate G3 (Consequence Chain) is materialized. The Finding โ†’ Proposal โ†’ Approval โ†’ Execution โ†’ File changes โ†’ New findings causality chain is now queryable end-to-end. This release closes the operational form of the two-log problem โ€” the gap between what was decided (action log) and what changed because of it (consequence log). Without that chain, autonomous operation cannot be audited, debugged, or trusted in regulated environmHigh5/2/2026
v2.3.0## What ships Band A โ€” Attribution closes. Workers now own every Blackboard INSERT; services may only UPDATE pre-attributed rows. The architectural cut is enforced constitutionally: `architecture.blackboard.worker_only_inserts` is active at blocking severity, so the invariant cannot silently erode. ## What closed - **ADR-011** โ€” Workers own blackboard attribution; services do not post. The decision that Band A closes around. - **ADR-010** โ€” Wired the ยง7 + ยง7a Finding/Proposal contract: terminHigh4/24/2026
v2.2.2**Historic milestone**: CORE successfully governed its own major refactoring cycle with **zero constitutional violations** maintained throughout. ### Changed - Completed deep modularity refactoring (4 big files โ†’ 17 focused single-responsibility modules) - Hardened Mind/Will/Body separation (fixed layer leaks, tracing exclusions, race conditions) - Switched planning to deterministic `passive_gate` (no more unnecessary LLM calls) - Unified `IntentGuard.check_transaction` API for cleaner coLow2/28/2026
v2.2.0## ๐ŸŽฏ Universal Workflow Pattern โ€” The Operating System This release establishes the **foundational architecture for autonomous operations at scale**. CORE now has a universal orchestration model that closes all loops, enables self-correction everywhere, and provides the substrate for fully autonomous conversational operation. ### Philosophy Shift **Before 2.2.0**: Collection of autonomous capabilities with ad-hoc orchestration **After 2.2.0**: Universal workflow pattern that composeLow1/8/2026
v2.0.0# ๐ŸŽฏ Major Milestone: A2 Autonomy Achieved CORE has achieved **Level 2 Autonomy** - autonomous code generation with constitutional governance. ## ๐Ÿš€ Key Achievements - โœจ **70-80% autonomous code generation success rate** (up from 0%) - ๐ŸŽฏ **100% semantic placement accuracy** (up from 45%) - ๐Ÿง  **Semantic infrastructure operational**: 513 symbols, 66 module anchors, 48 policy chunks - ๐Ÿ›ก๏ธ **Constitutional compliance enforcement** preventing AI agents from "going off the rails" - ๐Ÿ”„ *Low11/28/2025
v1.0.0# Changelog All notable changes to this project will be documented in this file. ## [1.0.0] - A1 Release - 2023-10-01 ### Added - **A1 Autonomy Activated**: The system can now autonomously execute simple, self-healing tasks via the `micro-proposal` workflow. - **Database as Single Source of Truth**: All operational knowledge (CLI commands, LLM resources, cognitive roles, domains) is now managed in a PostgreSQL database, eliminating YAML file drift. - **Transactional Integration WorkfLow10/1/2025
v0.2.0# v0.2.0 โ€” MVP: Autonomous Application Generation (2025-08-15) **Highlights** - First MVP that can autonomously scaffold a governed application from a high-level goal. - Nightly constitutional audit + capability drift checks in CI. - Starter Kit: default profile shipped. - CLI: `core-admin new`, `core-admin agent scaffold`, `core-admin proposals ...`. **Upgrade notes** - Use Python 3.11+. - Install with `poetry install`. - Run checks locally: `black --check . && ruff check . && pyteLow8/15/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

arifOSArifOS โ€” Constitutional MCP kernel for governed AI execution. AAA architecture: Architect ยท Auditor ยท Agent. Built for the open-source agentic era.v2026.05.22-birthday
arifosArifOS โ€” Constitutional MCP kernel for governed AI execution. AAA architecture: Architect ยท Auditor ยท Agent. Built for the open-source agentic era.v2026.05.22-birthday
AgentGuardProtect AI agents by detecting and blocking prompt, command injection, Unicode bypass, and social engineering attacks with customizable security controls.main@2026-06-05
cordumThe open agent control plane. Govern autonomous AI agents with pre-execution policy enforcement, approval gates, and audit trails. Works with LangChain, CrewAI, MCP, and any framework.v1.1.0
consolidation-memoryStore, consolidate, and recall coding agent memories with provenance tracking using SQLite and FAISS for fast, structured knowledge access.main@2026-06-03

More in Uncategorized

llama.cppLLM inference in C/C++
modal-clientSDK libraries for Modal
anolisaANOLISA - Agentic Nexus Operating Layer & Interface System Architecture