Skip to content

DariuszNewecki/CORE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CORE

Where governance keeps AI accountable.

Status: A2 โ€” Governed Governance: Constitutional Documentation License: MIT codecov

CORE is a constitutionally governed AI software system that enables humans to plan, build, validate, and evolve software without losing accountability, traceability, or control.

It is designed for environments where trust and governance matter as much as raw capability, and where AI must be powerfulโ€”but provably bounded by human-authored constraints.


See It in Action

asciicast

View full screen โ†’


Why CORE Exists

Modern systems fail less because code is hard to write, and more because intent gets lost:

  • Architecture drifts from implementation
  • Documentation rots
  • Decisions lose their rationale
  • Ownership becomes unclear
  • No one can explain why the system behaves the way it does

AI accelerates this problem unless governance becomes structural.

CORE exists to prevent unowned complexity. It does not replace humans. It replaces technical gatekeeping, translation loss, and unmanaged drift.


๐Ÿ›๏ธ Project Status: A2 Governed Autonomy (Operational)

CORE currently operates at Level A2: Governed Autonomy.

At this level, AI systems can generate and modify code autonomously, but only within explicitly defined and continuously enforced governance boundaries.

Current Capabilities

  • โœ… A0 โ€” Self-Awareness: Knowledge graph operational (symbols, modules, relations)
  • โœ… A1 โ€” Self-Healing: Autonomous repairs (docstrings, headers, imports, formatting, compliance)
  • โœ… A2 โ€” Governed Code Generation: New code produced under constitutional validation (coverage-bounded)
  • ๐ŸŽฏ A3 โ€” Strategic Refactoring: Next frontier โ€” multi-file architectural improvements

Live Metrics (v2.0.0)

Metrics reflect current enforcement scope and evolve as new rules and checkers are added.

Governance

  • 32 constitutional policies documented

  • 60+ rules actively enforced (~40% enforcement coverage; target: 50%+)

  • 100% enforcement coverage for:

    • agent_governance
    • dependency_injection
    • code_execution

Autonomy & Quality

  • Governed code generation success rate: 70โ€“80%
  • Semantic placement accuracy: 100%
  • Knowledge graph: 500+ symbols, 60+ module anchors, 70+ policy chunks vectorized
  • Test coverage: ~50% (constitutional target: 75%)

๐Ÿง  What Is CORE?

CORE fixes drift by making architecture machine-readable and enforceable, rather than implicit, tribal, or documentation-bound.

It is built around a strict separation of concerns using the Mindโ€“Bodyโ€“Will model.


๐Ÿง  Mind โ€” Constitution & State (.intent/, PostgreSQL)

The Mind is the authority layer.

  • The Constitution defines immutable laws: principles, boundaries, schemas, and allowed dependencies
  • The database stores symbols, capabilities, and relations as the single source of truth
  • Semantic infrastructure enables AI reasoning about architecture and constraints

This is where responsibility and authority live.


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

The Body is the deterministic execution layer.

  • Auditing, filesystem operations, code parsing, and git control
  • Central Service Registry for lifecycle and dependency management
  • Constitutional Auditor enforcing rules and tracking violations
  • 45+ specialized checkers validating compliance across the codebase

This is where rules are enforced, not negotiated.


โšก Will โ€” Reasoning Layer (src/will/)

The Will hosts AI agents that plan and propose actions.

  • Agents can write, review, and improve code
  • Every action is validated against constitutional rules
  • Explicit bounded autonomy lanes define permissions and limits

This is where intelligence works โ€” not where authority resides.


Two Roles, One Authority

CORE enforces a strict role separation.

  • CORE-admin defines governance, constraints, and evolution rules
  • End users interact only through chat and requests within those constraints

Chat is not the capability surface.

Governance is the capability surface.


๐Ÿ›๏ธ Governance Architecture

CORE implements a layered governance model with progressive disclosure:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               CONSTITUTIONAL LAYER                          โ”‚
โ”‚        Principles โ€” System-Level Governance                 โ”‚
โ”‚                                                             โ”‚
โ”‚  authority.yaml           โ†’ Who decides what                โ”‚
โ”‚  boundaries.yaml          โ†’ What is immutable               โ”‚
โ”‚  risk_classification.yaml โ†’ What needs oversight            โ”‚
โ”‚                                                             โ”‚
โ”‚  Paradigm: Foundational, coarse-grained, very stable         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    POLICY LAYER                             โ”‚
โ”‚             Rules โ€” Code-Level Enforcement                  โ”‚
โ”‚                                                             โ”‚
โ”‚  code_standards.yaml      โ†’ Enforced requirements            โ”‚
โ”‚  logging_standards.yaml   โ†’ Operational standards            โ”‚
โ”‚  data_governance.yaml     โ†’ Data & integrity rules           โ”‚
โ”‚  agent_governance.yaml    โ†’ Autonomy bounds                  โ”‚
โ”‚                                                             โ”‚
โ”‚  Paradigm: Fine-grained, implementation-specific, dynamic    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  ENFORCEMENT LAYER                          โ”‚
โ”‚           Continuous Verification & Audit                   โ”‚
โ”‚                                                             โ”‚
โ”‚  Checkers ร— Rules โ†’ measurable enforcement coverage          โ”‚
โ”‚  Auto-discovery via flat rules array                         โ”‚
โ”‚  Progressive disclosure output                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“š Constitutional Documentation

CORE includes machine-readable governance artifacts aligned to industry-grade patterns:

Document Purpose Status
GLOBAL-DOCUMENT-META-SCHEMA Universal metadata requirements โœ… Active
CONSTITUTION-STRUCTURE System-level governance principles ๐Ÿ†• v2.0
RULES-STRUCTURE Flat, enforceable rule definitions ๐Ÿ†• v2.0
POLICY-STRUCTURE Code-level policy standards ๐Ÿ†• v2.0
PATTERN-STRUCTURE Architectural & behavioral patterns ๐Ÿ†• v2.0

Key innovation: the flat rules array pattern โ€” parser-friendly, extensible, and self-documenting.


๐Ÿ”’ Constitutional Governance

COREโ€™s claim is not that AI can code.

It is that:

AI can code safely when governance is explicit, enforced, and auditable.

CORE ensures:

  1. Human authority for critical decisions
  2. Immutable constitutional boundaries
  3. Continuous, machine-verifiable audit
  4. Semantic understanding of constraints by agents
  5. Progressive disclosure of results and violations

CORE does not prevent bad decisions. It prevents unowned decisions.


๐ŸŽฏ Autonomy Ladder

A0 โ€” Self-Awareness        โœ… Knowledge graph & symbol tracking
A1 โ€” Self-Healing          โœ… Autonomous compliance repair
A2 โ€” Governed Generation   โœ… Coverage-bounded code generation
A3 โ€” Strategic Refactoring ๐ŸŽฏ Multi-file architectural change
A4 โ€” Self-Replication     ๐Ÿ”ฎ CORE generates CORE.NG from intent

Current focus: increase enforcement coverage beyond 50% and unlock A3 safely.


๐Ÿš€ Getting Started (5-Minute Demo)

Run a minimal walkthrough: create an API, break a rule, and watch CORE catch it.

๐Ÿ‘‰ Run the Worked Example: docs/09_WORKED_EXAMPLE.md


๐Ÿ“– Documentation Portal

๐ŸŒ https://dariusznewecki.github.io/CORE/

  • Foundations & philosophy
  • Architecture (Mind / Body / Will)
  • Governance and enforcement model
  • Autonomy ladder and roadmap
  • Contributing

โš™๏ธ Installation & Quick Start

Requirements: Python 3.12+, Poetry, PostgreSQL, Qdrant (optional)

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

cp .env.example .env
# add LLM provider keys

make db-setup
poetry run core-admin fix vector-sync --write
poetry run core-admin check audit
poetry run core-admin governance coverage
poetry run core-admin chat "create a CLI command that validates JSON files"

๐Ÿ› ๏ธ Common Commands

Command Description
make check Run lint, tests, and constitutional audit
core-admin fix all Autonomous compliance repair
core-admin governance coverage Show enforcement coverage
core-admin check audit Run full constitutional audit
core-admin inspect status System health inspection
core-admin run develop Execute governed autonomous task

๐Ÿ–ฅ๏ธ Local Infrastructure

CORE is designed to run locally by default for auditability, reproducibility, and governance reasons. External cloud-hosted LLM APIs are optional and not a design requirement.

Details about the current development platform and the rationale behind local infrastructure decisions are documented in:

๐Ÿ‘‰ docs/infrastructure.md


๐Ÿ“„ License

Licensed under the MIT License. See LICENSE.

About

The first autonomous coding agent with an immutable constitution and human quorum

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages