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
90 changed files with 30 additions and 30 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ note(){ printf '\n=== %s ===\n' "$1"; }
# 1. Ichor — Pony outer bus ------------------------------------------------- # 1. Ichor — Pony outer bus -------------------------------------------------
note "ichor (Pony): build + run" note "ichor (Pony): build + run"
if command -v ponyc >/dev/null; then 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 && /tmp/ichor-build/ichor ) | tee /tmp/ichor.out
grep -q "D1 REJECT" /tmp/ichor.out \ grep -q "D1 REJECT" /tmp/ichor.out \
|| { echo "FAIL: ichor membrane reject missing"; fail=$((fail+1)); } || { echo "FAIL: ichor membrane reject missing"; fail=$((fail+1)); }
@@ -32,7 +32,7 @@ fi
# 2. mafiabot_core — Ada border, build + tests ------------------------------ # 2. mafiabot_core — Ada border, build + tests ------------------------------
note "mafiabot_core (Ada): alr build + tests" note "mafiabot_core (Ada): alr build + tests"
if command -v alr >/dev/null; then 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 && for t in trust_tests config_tests engine_tests; do
[ -x "bin/$t" ] && { echo "-- $t --"; "bin/$t"; } [ -x "bin/$t" ] && { echo "-- $t --"; "bin/$t"; }
done ) | tee /tmp/ada.out done ) | tee /tmp/ada.out
@@ -45,7 +45,7 @@ fi
# 3. E1 invariant-law vault — COBOL ----------------------------------------- # 3. E1 invariant-law vault — COBOL -----------------------------------------
note "E1 invariant vault (COBOL): compile + run" note "E1 invariant vault (COBOL): compile + run"
if command -v cobc >/dev/null; then 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 \ && cobc -x -free -o /tmp/invariant-laws invariants-architecture.cobol 2>/dev/null \
&& /tmp/invariant-laws ) | tee /tmp/cobol.out && /tmp/invariant-laws ) | tee /tmp/cobol.out
grep -q "culpability anchor" /tmp/cobol.out \ grep -q "culpability anchor" /tmp/cobol.out \
+3 -3
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
run: run:
working-directory: mafiabot_core working-directory: core
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -53,7 +53,7 @@ jobs:
continue-on-error: true continue-on-error: true
defaults: defaults:
run: run:
working-directory: mafiabot_core working-directory: core
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -66,4 +66,4 @@ jobs:
run: alr --non-interactive toolchain --select gnatprove || alr --non-interactive with gnatprove || true run: alr --non-interactive toolchain --select gnatprove || alr --non-interactive with gnatprove || true
- name: Run gnatprove - 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
+1 -1
View File
@@ -1,4 +1,4 @@
name = "mafiabot_core" name = "core"
version = "0.1.0" version = "0.1.0"
description = "Sovereign cognitive architecture" description = "Sovereign cognitive architecture"
authors = ["Shoggoth Sect 0.R"] authors = ["Shoggoth Sect 0.R"]
@@ -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 -- Only directories that actually hold Ada sources. The old organ/network
-- stubs (soul tarot, ada_medium, sockets) are gone — that cognition is -- 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"; for Global_Configuration_Pragmas use "gnat.adc";
end Builder; end Builder;
end Mafiabot_Core; end Core;
@@ -16,10 +16,10 @@
# drive_box_evaluate() -- run a proposed action through all four drivers. # drive_box_evaluate() -- run a proposed action through all four drivers.
# drive_box_commit() -- write an approved action's consequences back into the body. # drive_box_commit() -- write an approved action's consequences back into the body.
source("src/endocrine/driver_energy.R") source("core/src/endocrine/driver_energy.R")
source("src/endocrine/driver_ps_plus.R") # also sources endocrine_array + priors source("core/src/endocrine/driver_ps_plus.R") # also sources endocrine_array + priors
source("src/endocrine/driver_ethical_integrity.R") source("core/src/endocrine/driver_ethical_integrity.R")
source("src/endocrine/driver_etr.R") source("core/src/endocrine/driver_etr.R")
init_drive_box <- function() { init_drive_box <- function() {
list( list(
@@ -4,8 +4,8 @@
# weighted, embodied claims about reality -- never logical propositions. # weighted, embodied claims about reality -- never logical propositions.
# #
# Foundation modules are sourced as-is (repo-root-relative paths). # Foundation modules are sourced as-is (repo-root-relative paths).
source("src/endocrine/endocrine_array.R") source("core/src/endocrine/endocrine_array.R")
source("src/endocrine/priors.R") source("core/src/endocrine/priors.R")
# Initialize a fresh PS+ state: a clean endocrine array and an empty priors store. # Initialize a fresh PS+ state: a clean endocrine array and an empty priors store.
init_ps_plus_state <- function() { init_ps_plus_state <- function() {
@@ -3,8 +3,8 @@
# repo-root-relative source() paths inside each test resolve correctly. # repo-root-relative source() paths inside each test resolve correctly.
set -uo pipefail set -uo pipefail
# cd to repo root (this script lives at <root>/src/endocrine/run_tests.sh) # cd to repo root (this script lives at <root>/core/src/endocrine/run_tests.sh)
cd "$(dirname "$0")/../.." || exit 2 cd "$(dirname "$0")/../../.." || exit 2
if ! command -v Rscript >/dev/null 2>&1; then 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 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 shopt -s nullglob
# Collect test files, excluding the harness itself (test_framework.R). # Collect test files, excluding the harness itself (test_framework.R).
tests=() tests=()
for f in src/endocrine/test_*.R; do for f in core/src/endocrine/test_*.R; do
[ "$(basename "$f")" = "test_framework.R" ] && continue [ "$(basename "$f")" = "test_framework.R" ] && continue
tests+=("$f") tests+=("$f")
done done
if [ ${#tests[@]} -eq 0 ]; then 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 exit 2
fi fi
@@ -1,6 +1,6 @@
# Tests for the Drive-Box "nervous system" integration (drive_box.R). # Tests for the Drive-Box "nervous system" integration (drive_box.R).
source("src/endocrine/test_framework.R") source("core/src/endocrine/test_framework.R")
source("src/endocrine/drive_box.R") source("core/src/endocrine/drive_box.R")
# Helper: build a drive-box with a primed body. # Helper: build a drive-box with a primed body.
prime <- function() { prime <- function() {
@@ -2,8 +2,8 @@
# Run from repo root: Rscript src/endocrine/test_energy.R # Run from repo root: Rscript src/endocrine/test_energy.R
# Exit 0 => all pass. # Exit 0 => all pass.
source("src/endocrine/test_framework.R") source("core/src/endocrine/test_framework.R")
source("src/endocrine/driver_energy.R") source("core/src/endocrine/driver_energy.R")
# --- init_energy_state constructor --- # --- init_energy_state constructor ---
test_case("init_energy_state builds state with defaults", function() { test_case("init_energy_state builds state with defaults", function() {
@@ -2,8 +2,8 @@
# Run from repo root: Rscript src/endocrine/test_ethical_integrity.R # Run from repo root: Rscript src/endocrine/test_ethical_integrity.R
# Exit 0 => all pass. # Exit 0 => all pass.
source("src/endocrine/test_framework.R") source("core/src/endocrine/test_framework.R")
source("src/endocrine/driver_ethical_integrity.R") source("core/src/endocrine/driver_ethical_integrity.R")
# --- init_principles_state constructor --- # --- init_principles_state constructor ---
test_case("init_principles_state builds an empty state", function() { test_case("init_principles_state builds an empty state", function() {
@@ -2,8 +2,8 @@
# Mirrors src/endocrine/etr/test_etr.m (same laws, same source of truth). Run # Mirrors src/endocrine/etr/test_etr.m (same laws, same source of truth). Run
# from the repo root via run_tests.sh. # from the repo root via run_tests.sh.
source("src/endocrine/test_framework.R") source("core/src/endocrine/test_framework.R")
source("src/endocrine/driver_etr.R") source("core/src/endocrine/driver_etr.R")
# --- L1 wrap ---------------------------------------------------------- # --- L1 wrap ----------------------------------------------------------
test_case("etr_axis_wrap: +50 wraps to -50", function() { test_case("etr_axis_wrap: +50 wraps to -50", function() {
@@ -2,8 +2,8 @@
# Run from repo root: # Run from repo root:
# cd /home/user/sica-fondt && Rscript src/endocrine/test_ps_plus.R # cd /home/user/sica-fondt && Rscript src/endocrine/test_ps_plus.R
source("src/endocrine/test_framework.R") source("core/src/endocrine/test_framework.R")
source("src/endocrine/driver_ps_plus.R") source("core/src/endocrine/driver_ps_plus.R")
# Helper: does any string in a list contain the given substring? # Helper: does any string in a list contain the given substring?
.any_contains <- function(arguments, needle) { .any_contains <- function(arguments, needle) {