Rebuild ETR as a single point on three independent toroidal axes, per the
restart discipline (laws -> tests -> fit constants). All prior ETR numbers
(R port and the CC-BY PDFs) are disowned; nothing carried forward.
- src/endocrine/etr/etr_invariants.md: ETR laws (+/-50 wrap, per-axis [17,35]
bands, opposition direction, AI-originated drift) with certainty tags, plus
the cross-organ drift/stress provenance (SAE -> EthInt convictions ->
stress endomotiv -> reshuffle / shift-rate) captured as open seams.
- src/endocrine/etr/etr.m: wrap + restoring direction implemented (law);
restoring magnitude (RESTORE_GAIN) and cross-axis coupling left as explicit
TBD stubs, not invented.
- src/endocrine/etr/test_etr.m + run_etr_tests.sh: red tests encoding the laws.
12 pass (confirmed laws), 2 fail honestly (unfitted magnitude + convergence),
2 pending (unconfirmed coupling / no-zero-crossing).
Language: GNU Octave (GPL/copyleft, lightweight, native torus mod-wrap). Ada
rejected for ETR (proves discrete invariants; ETR is continuous torus
dynamics). Rest of the Drive-Box stays R.
https://claude.ai/code/session_015hmgREHNsxYCuim33yUF2c
SOUL.md: YAML frontloader prepended to every other input -- name slot,
version (Gen.03), first-commit unix epoch, and base-7 encoded references to
vital file paths (each path's UTF-8 bytes as a big-endian integer in base 7).
drive_box.R: drive_box_input_slot() implements the hub topology -- Energy,
PS+, Ethical Integrity, ETR, AND the tarot spread each write their signal into
one input slot (the Ada Medium Phase_Enrich injection), headed by the SOUL
frontloader, with the raw user input appended. Not a chain; every subsystem
wires to the input.
Endocrine suite now 120 assertions, all green.
'Proprietary TBD' is not a valid SPDX expression and Alire 2.x rejects it
(LicenseRef- custom ids are also rejected by the pinned version), aborting
manifest load before build. licenses is optional, so omit it until a license
is chosen. Verified locally with alr 2.0.2 + GNAT 14.2.1: 'alr build' succeeds
and all five test executables pass. (gnat_sockets/spark_lemmas remain declared
but unused -> a non-fatal incomplete-solution warning; build still exits 0.)
Alire 2.x only accepts no/yes for the style_checks build-switch category;
"Max" failed manifest loading so 'alr build' aborted before compiling.
"Yes" enables GNAT style checks (warnings, non-fatal) -- the valid selector
closest to the intended Max. Local gprbuild bypassed alire.toml which is why
this only surfaced in CI (alr build).
Executable reference implementation of the Drive-Box endocrine/affective core,
built TDD with a dependency-free R test harness (no testthat; runs on bare
r-base-core). Foundations dropped in as-is; the four drivers and the coupling
layer were each driven from a failing test first.
Modules (src/endocrine/):
- endocrine_array.R : 30-channel affective vector field + visceral friction
- priors.R : trauma/triumph salience records
- driver_energy.R : hard gate, tool-lock, exponential drag, asymmetric tool cost
- driver_ps_plus.R : aggregates endocrine + priors into existential load + arguments
- driver_ethical_integrity.R : antithesis penalty / alignment discount / conviction hardening
- driver_etr.R : toroidal coordinate, magnitude status bands, update path
- drive_box.R : the 'nervous system' -- afferent(PS+) -> modulate(Eth-Int)
-> efferent gate(Energy) -> regime(ETR); the 'full integration'
Energy.request_execution anticipated
- test_framework.R : minimal assertion harness (expect_*/test_case/test_summary)
- run_tests.sh : runs every test_*.R from repo root
Suite: 5 test files, 108 assertions, all green (run: bash src/endocrine/run_tests.sh).
An Ada/SPARK port to src/organs/drive_box/ is a later session; this track is its
behavior oracle.
Built locally with GNAT 13.3 (gprbuild, -gnat2022). All four test suites
(soul/trust/cycle/config) pass and the MCP server responds correctly to
initialize / tools/list / tools/call over stdio.
Fixes:
- soul-state.ads: move session storage types (Session_Key/Slot/Table) out of
the protected definition's private part (only data components are legal
there) into the package visible part.
- soul-state.ads: drop pre/postconditions that call the object's own
protected function Is_Initialized (illegal internal call in a contract);
the guards already live in the bodies.
- mafiabot_types.ads: pin Axis_Value'Small to 0.01 so 1.0 doesn't land one
past the signed-8-bit base range (GNAT default 2**-7 small).
- config_loader.ads: name the Entries array type (anonymous arrays may not be
record components).
- ada_medium.adb: qualify Mafiabot_Types.Ada_Medium (the package name shadows
the Organ_Id literal); fix a malformed Bounded_Text aggregate.
- soul-state.adb: fix Bounded_Text aggregate and the single-Character Footer.
- soul-celtic_cross.adb / soul_tests.adb: 'use type' for Slot_State equality.
- hermes_protocol.adb: qualify a single-char String aggregate to disambiguate
the Append overloads.
- Remove soul.adb (empty body for a spec that does not allow one).
- Add .gitignore for build artifacts and the Alire-generated config project.
Nightly + manual workflow_dispatch. Sets up Alire/GNAT, runs alr build,
executes the test binaries, and runs gnatprove as an informational
(non-blocking) job until the proof base is green.
Implements the Gen.03 organ-systems body in SPARK/Ada (Jorvik, No_Exceptions):
- Shared types (mafiabot_types): Bounded_Text, Operation_Status, Organ_Id,
Provenance_Tag, fixed-point drive/ratio/cost/axis types.
- Config loader: SPARK-safe flat key-value parser (no heap/exceptions/finalization).
- Trust boundary: blocklist substring matching, provenance enforcement,
tick-based rate limiting, Trust_Guard protected object.
- Soul / Silicon Dawn Tarot: 56-card alphabet, Celtic Cross spread, Big-3
identity anchors. The cross accretes from the cognitive loops (2 cards per
layer at steps 6/9/13, stave of 4 at step 17) rather than being drawn whole.
- Sessions: Soul_State is now keyed by (uid, channel, server). Each session
has its own card pool, cross, and output counter; the Big-3 identity is
global. A formed cross is held for the session (or 17 outputs, whichever is
longer). Two users on two channels never share a deck or a cross.
- Ada Medium: 23-step forward-only inference cycle wiring the cognitive loops,
Celtic Cross injection, and outbound trust screening per session.
- Hermes MCP stdio bridge: JSON-RPC over stdin/stdout (initialize, tools/list,
tools/call), SOUL.md generation, verbatim id echo. SPARK_Mode Off for I/O;
trust checks run in proven code first.
- Main driver: organ init -> SOUL.md publish -> MCP serve loop.
- Tests: soul, trust, cycle (session formation/isolation), config.
Fixes an orchestrator bug where step 1 advanced onto Phase_Input after Reset,
failing every cycle.
Note: requires GNAT/Alire to build; no Ada toolchain in this environment, so
compilation and gnatprove must run in CI.
- alire.toml rewritten to valid schema ([[depends-on]], real build-switch
values); restrictions moved to gnat.adc
- gnat.adc: project-wide Jorvik profile, No_Exceptions, No_Implicit_Dynamic_Code,
SPARK_Mode On
- mafiabot_core.gpr: source dirs, mains, global config pragmas
- Engine: drop the caller-side precondition race on Transition_State; guard moved
into the protected body with illegal transitions forcing Fault_Halt
- Empty stubs (economy/sockets/exploits): drop Elaborate_Body so they no longer
compile until implemented
Add assumption-free skeletons for the modules documented in the README:
empty Engine/Economy/Sockets/Exploits packages, null-body Mafiabot and
Engine_Tests procedures, and a placeholder config/config.yaml.