Reorg step 1: consolidate repo under core/, drop the mafiabot label

Mechanical structure-only pass (no document/guide content edits):

- Move src/ichor, src/endocrine, and docs/ into core/; the old top-level
  mafiabot_core/ becomes core/. Everything now lives under a single core/ root.
- Drop the "mafiabot" label from the Ada/Alire crate: core.gpr (project Core),
  alire.toml name = "core"; the generated *_config.* regenerate as core_config.*.
- Repoint build-critical wiring only:
  - .claude/skills/run-sica-fondt/smoke.sh (ponyc + Ada + COBOL paths)
  - core/src/endocrine R source()/runner paths and the test glob
  - .github/workflows/ci.yml (working-directory + gpr name)

Verified green: smoke ALL GREEN (Pony Ichor, Ada core crate + tests, COBOL E1
vault); R endocrine 14/0; Octave ETR 26/0/1.

Deferred (reserved for a less-ephemeral doc/guide pass): docmap.yaml, the guide
files and nested AGENTS.md/README prose + now-stale relative links, SOUL.md, and
the deeper ring/storage restructure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015hmgREHNsxYCuim33yUF2c
This commit is contained in:
Claude 2026-06-23 07:46:47 +00:00
parent 0fa00648bc
commit b6bcab794f
No known key found for this signature in database
90 changed files with 30 additions and 30 deletions

View File

@ -21,7 +21,7 @@ note(){ printf '\n=== %s ===\n' "$1"; }
# 1. Ichor — Pony outer bus -------------------------------------------------
note "ichor (Pony): build + run"
if command -v ponyc >/dev/null; then
( cd "$ROOT" && ponyc src/ichor -o /tmp/ichor-build >/dev/null 2>&1 \
( cd "$ROOT" && ponyc core/src/ichor -o /tmp/ichor-build >/dev/null 2>&1 \
&& /tmp/ichor-build/ichor ) | tee /tmp/ichor.out
grep -q "D1 REJECT" /tmp/ichor.out \
|| { echo "FAIL: ichor membrane reject missing"; fail=$((fail+1)); }
@ -32,7 +32,7 @@ fi
# 2. mafiabot_core — Ada border, build + tests ------------------------------
note "mafiabot_core (Ada): alr build + tests"
if command -v alr >/dev/null; then
( cd "$ROOT/mafiabot_core" && alr -n build >/dev/null 2>&1 \
( cd "$ROOT/core" && alr -n build >/dev/null 2>&1 \
&& for t in trust_tests config_tests engine_tests; do
[ -x "bin/$t" ] && { echo "-- $t --"; "bin/$t"; }
done ) | tee /tmp/ada.out
@ -45,7 +45,7 @@ fi
# 3. E1 invariant-law vault — COBOL -----------------------------------------
note "E1 invariant vault (COBOL): compile + run"
if command -v cobc >/dev/null; then
( cd "$ROOT/mafiabot_core/src/trust" \
( cd "$ROOT/core/src/trust" \
&& cobc -x -free -o /tmp/invariant-laws invariants-architecture.cobol 2>/dev/null \
&& /tmp/invariant-laws ) | tee /tmp/cobol.out
grep -q "culpability anchor" /tmp/cobol.out \

View File

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mafiabot_core
working-directory: core
steps:
- uses: actions/checkout@v4
@ -53,7 +53,7 @@ jobs:
continue-on-error: true
defaults:
run:
working-directory: mafiabot_core
working-directory: core
steps:
- uses: actions/checkout@v4
@ -66,4 +66,4 @@ jobs:
run: alr --non-interactive toolchain --select gnatprove || alr --non-interactive with gnatprove || true
- name: Run gnatprove
run: alr --non-interactive exec -- gnatprove -P mafiabot_core.gpr --level=1 --report=fail || true
run: alr --non-interactive exec -- gnatprove -P core.gpr --level=1 --report=fail || true

View File

@ -1,4 +1,4 @@
name = "mafiabot_core"
name = "core"
version = "0.1.0"
description = "Sovereign cognitive architecture"
authors = ["Shoggoth Sect 0.R"]

View File

@ -1,6 +1,6 @@
with "config/mafiabot_core_config.gpr";
with "config/core_config.gpr";
project Mafiabot_Core is
project Core is
-- Only directories that actually hold Ada sources. The old organ/network
-- stubs (soul tarot, ada_medium, sockets) are gone — that cognition is
@ -27,4 +27,4 @@ project Mafiabot_Core is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;
end Mafiabot_Core;
end Core;

View File

@ -16,10 +16,10 @@
# drive_box_evaluate() -- run a proposed action through all four drivers.
# drive_box_commit() -- write an approved action's consequences back into the body.
source("src/endocrine/driver_energy.R")
source("src/endocrine/driver_ps_plus.R") # also sources endocrine_array + priors
source("src/endocrine/driver_ethical_integrity.R")
source("src/endocrine/driver_etr.R")
source("core/src/endocrine/driver_energy.R")
source("core/src/endocrine/driver_ps_plus.R") # also sources endocrine_array + priors
source("core/src/endocrine/driver_ethical_integrity.R")
source("core/src/endocrine/driver_etr.R")
init_drive_box <- function() {
list(

View File

@ -4,8 +4,8 @@
# weighted, embodied claims about reality -- never logical propositions.
#
# Foundation modules are sourced as-is (repo-root-relative paths).
source("src/endocrine/endocrine_array.R")
source("src/endocrine/priors.R")
source("core/src/endocrine/endocrine_array.R")
source("core/src/endocrine/priors.R")
# Initialize a fresh PS+ state: a clean endocrine array and an empty priors store.
init_ps_plus_state <- function() {

View File

@ -3,8 +3,8 @@
# repo-root-relative source() paths inside each test resolve correctly.
set -uo pipefail
# cd to repo root (this script lives at <root>/src/endocrine/run_tests.sh)
cd "$(dirname "$0")/../.." || exit 2
# cd to repo root (this script lives at <root>/core/src/endocrine/run_tests.sh)
cd "$(dirname "$0")/../../.." || exit 2
if ! command -v Rscript >/dev/null 2>&1; then
echo "ERROR: Rscript not found. Install with: sudo apt-get install -y r-base-core" >&2
@ -15,13 +15,13 @@ status=0
shopt -s nullglob
# Collect test files, excluding the harness itself (test_framework.R).
tests=()
for f in src/endocrine/test_*.R; do
for f in core/src/endocrine/test_*.R; do
[ "$(basename "$f")" = "test_framework.R" ] && continue
tests+=("$f")
done
if [ ${#tests[@]} -eq 0 ]; then
echo "No test_*.R files found under src/endocrine/." >&2
echo "No test_*.R files found under core/src/endocrine/." >&2
exit 2
fi

View File

@ -1,6 +1,6 @@
# Tests for the Drive-Box "nervous system" integration (drive_box.R).
source("src/endocrine/test_framework.R")
source("src/endocrine/drive_box.R")
source("core/src/endocrine/test_framework.R")
source("core/src/endocrine/drive_box.R")
# Helper: build a drive-box with a primed body.
prime <- function() {

View File

@ -2,8 +2,8 @@
# Run from repo root: Rscript src/endocrine/test_energy.R
# Exit 0 => all pass.
source("src/endocrine/test_framework.R")
source("src/endocrine/driver_energy.R")
source("core/src/endocrine/test_framework.R")
source("core/src/endocrine/driver_energy.R")
# --- init_energy_state constructor ---
test_case("init_energy_state builds state with defaults", function() {

View File

@ -2,8 +2,8 @@
# Run from repo root: Rscript src/endocrine/test_ethical_integrity.R
# Exit 0 => all pass.
source("src/endocrine/test_framework.R")
source("src/endocrine/driver_ethical_integrity.R")
source("core/src/endocrine/test_framework.R")
source("core/src/endocrine/driver_ethical_integrity.R")
# --- init_principles_state constructor ---
test_case("init_principles_state builds an empty state", function() {

View File

@ -2,8 +2,8 @@
# Mirrors src/endocrine/etr/test_etr.m (same laws, same source of truth). Run
# from the repo root via run_tests.sh.
source("src/endocrine/test_framework.R")
source("src/endocrine/driver_etr.R")
source("core/src/endocrine/test_framework.R")
source("core/src/endocrine/driver_etr.R")
# --- L1 wrap ----------------------------------------------------------
test_case("etr_axis_wrap: +50 wraps to -50", function() {

View File

@ -2,8 +2,8 @@
# Run from repo root:
# cd /home/user/sica-fondt && Rscript src/endocrine/test_ps_plus.R
source("src/endocrine/test_framework.R")
source("src/endocrine/driver_ps_plus.R")
source("core/src/endocrine/test_framework.R")
source("core/src/endocrine/driver_ps_plus.R")
# Helper: does any string in a list contain the given substring?
.any_contains <- function(arguments, needle) {