Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

About

PFC-inspired Coherent Induction Substrate v2 — brain-inspired, fail-closed cognitive control loop with sha256 evidence ledger

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PFC-Coherent Induction Substrate v2

ci python license mypy coverage

Engineering analogue of prefrontal-cortex cognitive control for human–LLM idea-to-artifact pipelines. Production-ready: SDK + CLI + HTTP API + Docker.

Role context = top-down bias. ConflictMonitor = ACC analogue. ValuePolicyEvaluator = vmPFC/OFC analogue. MemoryRecombiner = hippocampal recombination analogue. ReleaseGate = fail-closed evidence ledger.


Loop

RAW IDEA
  → GoalWorkingMemory       (lateral PFC)
  → RoleBiasController      (dlPFC top-down bias)
  → HypothesisCompiler      (claim_status + falsifier)
  → MemoryRecombiner        (hippocampal recombination)
  → ConflictMonitor         (ACC conflict signal)
  → InhibitoryNoiseGate     (semantic-noise suppression)
  → ArtifactConstructor     (action policy)
  → ValuePolicyEvaluator    (vmPFC/OFC value gate)
  → ReleaseGate             (fail-closed PASS / BLOCK / FAIL)
  → EvidenceLedger          (sha256 audit trail)

Hard non-claims

  • no literal human–AI fusion
  • no LLM consciousness
  • no unmeasured neural synchrony
  • no medical inference
  • no 10× claim without benchmark

Claim status

Claim Status
PFC as engineering inspiration VALID_ANALOGY
Role context as top-down bias TESTABLE_MODEL
ACC-inspired conflict monitor VALID_ANALOGY
vmPFC-inspired value policy VALID_ANALOGY
Hippocampus-inspired recombination VALID_ANALOGY
PFC as exact model of LLM orchestration REJECTED
Literal brain–AI synchronization REJECTED
Improved artifact quality REQUIRES_BENCHMARK

Quickstart

Python SDK

from pfc_ci import PFCInductionEngine, RawIdea, MemoryTrace, default_goal_memory

engine = PFCInductionEngine()
result = engine.run(
    raw_idea=RawIdea(text="Build a PFC-inspired loop"),
    goal_memory=default_goal_memory(),
    traces=(MemoryTrace(source="pfc", content="PFC bias", relevance=0.9),),
    candidate_output=(
        "role context required evidence artifact_tests conflict_report "
        "value_score safety_verdict evidence_ledger"
    ),
)
print(result.ledger.final_verdict, result.ledger.value_score)

CLI

pip install -e ".[dev]"
pfc-ci info
pfc-ci --seed 42 repro
pfc-ci run --idea "ship a PFC loop" --json

HTTP API (FastAPI)

uvicorn pfc_ci.api.app:app --port 8080
curl http://127.0.0.1:8080/healthz
curl -X POST http://127.0.0.1:8080/api/v1/run \
  -H 'Content-Type: application/json' \
  -d '{"idea":"loop","candidate":"role context required evidence artifact_tests conflict_report value_score safety_verdict evidence_ledger"}'
curl http://127.0.0.1:8080/metrics | head

Docker

docker build -t pfc-ci:local .
docker run -p 8080:8080 --rm pfc-ci:local

Benchmark + dashboard

PYTHONPATH=src python -c "
from pfc_ci.benchmark.runner import run_default_suite
from pfc_ci.dashboard.render import render_dashboard_html
r = run_default_suite()
open('benchmark_report.html','w').write(render_dashboard_html(r))
print(r.to_dict())
"

Quality gates (all green)

Gate Tool Status
Lint ruff check clean
Format ruff format --check + black --check clean
Types mypy --strict clean (57 source files)
Tests pytest 70+ tests, 100% green
Coverage pytest --cov-fail-under=95 ≥96%
Benchmark 5-case suite accuracy 1.00, unsupported_claim_rate 0.00

Architecture

See docs/architecture.md. ADRs in docs/adr/.

Plugin system

Components are discoverable via importlib.metadata entry points (pfc_ci.compilers, pfc_ci.evaluators, …). Reference example in examples/plugin_example/.

Bibliography

  1. Miller & Cohen, 2001 — An integrative theory of prefrontal cortex function. Annu. Rev. Neurosci.
  2. Miller & Constantinidis, 2024 — Timescales of learning in prefrontal cortex. Nat. Rev. Neurosci.
  3. Friedman & Robbins, 2022 — Prefrontal cortex in cognitive control. Neuropsychopharmacology.
  4. Botvinick, Cohen, Carter, 2004 — Conflict monitoring and ACC. Trends Cogn. Sci.
  5. Bartra, McGuire, Kable, 2013 — Valuation system meta-analysis. NeuroImage.
  6. Lockwood et al., 2024 — vmPFC and prosocial motivation. Nat. Hum. Behav.
  7. Weilbächer & Gluth, 2016 — Hippocampus + vmPFC in memory-based decisions. Brain Sciences.
  8. Preston & Eichenbaum, 2013 — Hippocampus and PFC in memory. Curr. Biol.

License

MIT. See LICENSE.

About

PFC-inspired Coherent Induction Substrate v2 — brain-inspired, fail-closed cognitive control loop with sha256 evidence ledger

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages