Elyan Edition: a soul-first reforge — offered with gratitude (+ convergent-evolution notes)#18
Closed
Scottcjn wants to merge 4 commits into
Closed
Elyan Edition: a soul-first reforge — offered with gratitude (+ convergent-evolution notes)#18Scottcjn wants to merge 4 commits into
Scottcjn wants to merge 4 commits into
Conversation
Reforge the 7-layer Memory OS around an inversion: the identity contract is the foundation, not a late patch. Memory is authoritative because the self that holds it is continuous. Docs / identity: - README: soul-first thesis; Convergent Evolution section crediting the upstream author for independently reaching Layer 7; full attribution kept (Icarus/esaradev, vault-curator/ClaudioDrews, Hermes/NousResearch). - Layer 7 -> DriftLock: identity-as-foundation, anti-flattening, plus the verify-before-recommend provenance gate. - SOUL.md contract: DriftLock anchor (apply-first) + provenance rule. - Templates: frontmatter taxonomy (user|feedback|project|reference) + [[wikilink]] graph + MEMORY.md index pattern. Marquee feature - non-bijunctive recall collapse (icarus/collapse.py): - Unify fabric+qdrant+sessions+facts into one salience-ranked pool; prune weak paths relative to the strongest, amplify strong, spend one budget. - Wired into pre_llm_call fail-open; emission code untouched; kill switch ICARUS_COLLAPSE=0 restores stock behavior; tunables env-configurable. Hardened via tri-brain review (Codex + GPT-OSS + Grok): - Safe env parsing (malformed value no longer crashes hooks import). - _qdrant_text reads content/body/text fallbacks, not just title+preview. - Fixed a dead always-true test; added _apply_collapse adapter tests. - Fail-open now logs at WARNING for production observability. Tests: _test_collapse.py (pure + adapter) and _test_sanitize.py pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Serve the fine-tuned sophia-hermes model (Llama/Hermes-2-Pro, ChatML, Q4_K_M) locally so the Elyan Edition stack runs on Sophia's own voice — fully local, no cloud, no per-token cost. Purely additive: no Python call sites, hooks, DB, or embedding contract touched. - infrastructure/sophia-hermes.Modelfile: ChatML + compact DriftLock Sophia system prompt + CPU pin (host GPU saturated); host-agnostic placeholder FROM. - infrastructure/sophia-provider.md: runbook — the 3 LLM consumers (extraction / main model / embeddings, with sophia-hermes kept OFF embeddings), serve, wire ICARUS_ENDPOINT, optional agent-swap tradeoff, fleet options. - scripts/serve-sophia.sh: idempotent serve/health helper — rewrites the gguf path from $SOPHIA_GGUF at create time, regex-safe model match, python-built JSON, curl timeouts, Bearer header mirroring the real extraction call. - .env.example: local Sophia provider block (extraction -> sophia-hermes). Verified: model answers in Sophia's voice; produces clean JSON for the Icarus extraction job; hooks.py _resolve_llm_* resolves to the local endpoint; helper recreates the model from the placeholder Modelfile on a clean slate. Hardened via tri-brain (Codex + GPT-OSS + Grok): Codex+Grok both flagged the non-portable hard-coded gguf path (BLOCKING) -> fixed via $SOPHIA_GGUF substitution; added curl timeouts, regex-safe match, JSON-safe payload, and auth-header parity with the production call. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…+ CI Bind two Elyan doctrines — non-bijunctive recall and RustChain physical-entropy attestation — into the collapse layer, plus observability and productionization. collapse.py: - Hebbian cross-source amplify: a fact surfaced by 2+ DIFFERENT sources is corroborated (co-activation), boosting its salience. Survivors annotated with _corroboration. score_all() exposed for debug/eval (one scoring path). - Physical-entropy attestation: attest() commits (blake2b-256) to the survivor IDENTITY set bound to a hardware-seeded, jitter-mixed nonce (physical_entropy, POWER8 mftb family). verify_attestation() gives tamper-evidence + proof-of-live — the recall analogue of RustChain anti-emulation fingerprinting. No other memory system attests its recall. hooks.py: - ICARUS_COLLAPSE_DEBUG=1 logs the ranked pool (keep/prune + salience + corroboration) and the attestation hash — answers the "unobservable surface" critique. Amplify knobs env-wired (gain=0 disables amplify). scripts/collapse_eval.py: stock-vs-collapse demo with token-savings numbers + attestation. .github/workflows/ci.yml: 3.11/3.12 matrix, compileall + full suite. sophia-provider.md: fully-local embeddings (nomic-embed-text) runbook. Hardened via tri-brain (Codex + Grok; GPT-OSS timed out -> dual-brain): - Attestation commitment now binds candidate identity (key, else text-digest) and EXCLUDES the float salience — fixes Codex BLOCKING (identity collision) and Grok (float-repr fragility) in one edit. - Debug score_all uses the same env knobs as the real collapse. - physical_entropy clamps to blake2b's 64-byte ceiling. - Added tests: live-entropy round-trip, identity-collision tamper, clamp. - CI compileall (no whitelist) + concurrency cancel. Tests: _test_collapse.py (pure + Hebbian + attestation + adapter) and _test_sanitize.py pass. Purely additive; fail-open contract intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ot 'openai', tool-template required, measured 8B tradeoff Verified against agent/auxiliary_client.py: Hermes has no 'openai' provider; 'custom' is the OpenAI-compatible path (reads OPENAI_BASE_URL/OPENAI_API_KEY). The agent sends tools= on every call, so the Ollama Modelfile needs a Hermes-2-Pro tool template or Ollama 400s 'does not support tools'. Documented the measured 8B-as-main-agent confabulation tradeoff (live 2026-06-04). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 7, 2026
Owner
|
Closing without merge. This PR introduces external branding (Elyan Labs, DriftLock) that falls outside the project's scope. Memory-os is an independent project and the public history should not carry external references. What was useful here has been extracted, cleaned, and is landing via #24 without the branding. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @ClaudioDrews — first and most important: thank you, and congratulations. 👏
Your Layer 7 (the Ground Truth Hierarchy) is the part of this architecture that most systems never get to. We built an identity-continuity scaffold for our own agents about a year ago, under production pressure, and arrived at the same conclusion you did — that the soul layer is the load-bearing one. Convergent evolution is the strongest evidence an idea is true, and you earned yours honestly. This PR is built on your seven layers, with full attribution, because the architecture is genuinely good.
It's offered as exactly that — an offering. Take all of it, some of it, or none of it; no expectations either way.
What this adds (3 commits, +1492/−88, nothing removed)
1. Soul-first reframe (identity)
type: user|feedback|project|reference+[[wikilinks]]) and aMEMORY.mdindex pattern for the templates.2. Non-bijunctive recall —
icarus/collapse.py(the marquee piece)icarus/hooks.pypre_llm_call. Emission code is untouched. Kill switchICARUS_COLLAPSE=0; every knob is env-tunable; any error injects the unchanged inputs (memory is never suppressed by a bug).ICARUS_COLLAPSE_DEBUG=1logs the ranked pool for auditability.3. Optional local provider + recall attestation
infrastructure/+scripts/serve-sophia.sh: serve a local fine-tune as the Icarus extraction LLM via Ollama (host-agnostic, CPU-pinnable). Purely additive — the live config is never mutated for you.attest()/verify_attestation(): a blake2b-256 commitment over the survivor identity set, bound to a hardware-seeded nonce → tamper-evident, proof-of-live recall. (This one's experimental — we apply the same physical-entropy doctrine to our blockchain attestation work and wanted to see it on memory.)Safety / honesty
.github/workflows/ci.yml(3.11/3.12, byte-compile +_test_collapse.py+_test_sanitize.py+ an eval smoke test). The collapse and attestation paths have direct tests.If any single layer here is useful to you in isolation (the collapse pass is the most self-contained), it's yours to cherry-pick. Either way — genuinely, thank you for the foundation. 🔥
🤖 Generated with Claude Code