{"id":44573115,"url":"https://github.com/srobinson/attention-matters","last_synced_at":"2026-04-01T21:17:38.415Z","repository":{"id":338251047,"uuid":"1157187634","full_name":"srobinson/attention-matters","owner":"srobinson","description":"Geometric memory engine on the S³ hypersphere — quaternion drift, phasor interference, MCP server","archived":false,"fork":false,"pushed_at":"2026-03-21T15:09:41.000Z","size":1033,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T21:38:18.127Z","etag":null,"topics":["ai","cli","geometric","hypersphere","kuramoto","llm","mcp","memory","model-context-protocol","quaternion","rust","slerp","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srobinson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-13T14:33:54.000Z","updated_at":"2026-03-21T15:09:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/srobinson/attention-matters","commit_stats":null,"previous_names":["srobinson/attention-matters"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/srobinson/attention-matters","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srobinson%2Fattention-matters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srobinson%2Fattention-matters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srobinson%2Fattention-matters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srobinson%2Fattention-matters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srobinson","download_url":"https://codeload.github.com/srobinson/attention-matters/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srobinson%2Fattention-matters/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","geometric","hypersphere","kuramoto","llm","mcp","memory","model-context-protocol","quaternion","rust","slerp","sqlite"],"created_at":"2026-02-14T03:53:21.598Z","updated_at":"2026-04-01T21:17:38.407Z","avatar_url":"https://github.com/srobinson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# attention-matters\n\nA geometric memory engine built on the S³ hypersphere. Memories aren't retrieved, they're surfaced through quaternion drift, phasor interference, and Kuramoto phase coupling across dual manifolds.\n\nEvery query reshapes the manifold. Every recall changes what gets recalled next. The geometry does the thinking.\n\n## Origins\n\nThe mathematical framework: quaternion geometry on S³, golden-angle phasors, IDF-weighted drift, Kuramoto phase coupling across dual manifolds - was created by **Smaxforn** ([@smaxforn](https://x.com/smaxforn)). His original implementation was DAE v0.7.2: a zero-dependency Node.js engine that fit the entire geometric memory system in 984 lines of pure math, with WebGPU compute shaders for batch SLERP and interference. He open-sourced three repositories in February 2026 - dae-stand-alone, dae-openclaw, and DAE-moltbook - then disappeared from the internet. His GitHub account no longer exists.\n\nThis Rust workspace is a faithful port of his mathematics, maintaining numerical compatibility with the v0.7.2 wire format so that state files from the original implementation (including Echo, a Claude instance with 27,712 occurrences of geometric memory) can be imported directly.\n\nThe math is old. The synthesis is his. For the full mathematical narrative, see [MANIFOLD.md](MANIFOLD.md).\n\n## How it works\n\n```\nQuery: \"quaternion drift\"\n    │\n    ▼\n┌─ activate ──── drift ──── interfere ──── couple ──── surface ──── compose ─-┐\n│                                                                             │\n│  Words activate      Occurrences    Conscious \u0026     Phases         Score,   │\n│  on the manifold     SLERP toward   subconscious    synchronize    rank,    │\n│  with IDF weights    each other     phasors         via Kuramoto   return   │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\nWords live as points on a 4D unit sphere. When a query activates them, they drift toward each other along geodesics. Interference between conscious and subconscious manifolds determines what surfaces. Phase coupling synchronizes related memories over time. The system has genuine history. It learns from being used.\n\nTwo conservation laws keep it grounded: total mass M=1 (finite attention budget) and coupling constants K_CON + K_SUB = 1 (zero-sum attention between manifolds). Every constant derives from φ and π.\n\n## Install\n\n```bash\nnpx -y attention-matters          # CLI\nnpx -y attention-matters serve    # MCP server\n```\n\nOr build from source:\n\n```bash\ncargo install --path crates/am-cli\n```\n\n## MCP server\n\nRuns as a Model Context Protocol server, giving AI agents persistent geometric memory across sessions.\n\n```bash\nam serve\n```\n\nTools: `am_query`, `am_query_index`, `am_retrieve`, `am_buffer`, `am_ingest`, `am_salient`, `am_feedback`, `am_activate_response`, `am_batch_query`, `am_export`, `am_import`, `am_stats`\n\n## CLI\n\n```bash\nam query \"what did we decide about the API\"    # recall from memory\nam ingest document.md                          # add to the manifold\nam stats                                       # system state\nam inspect neighborhoods --limit 5             # peek at the geometry\nam export \u003e state.json                         # portable state\nam import \u003c state.json                         # restore\nam sync                                        # sync session transcripts\n```\n\n## Architecture\n\n```\n┌──────────────────────────────────────────────────────────-──-──┐\n│  DAESystem                                                     │\n│                                                                │\n│  ┌─────────────-──────┐         ┌───────────────────────────┐  │\n│  │  Conscious         │         │  Subconscious             │  │\n│  │  Episode           │         │  Episodes (N)             │  │\n│  │                    │         │                           │  │\n│  │  Neighborhoods     │         │  Neighborhoods            │  │\n│  │    → Occurrences   │         │    → Occurrences          │  │\n│  └────────┬───────────┘         └─────────────┬─────────────┘  │\n│           │                                   │                │\n│           └───── phasor interference ─────────┘                │\n│                                                                │\n│  QueryEngine: activate → drift → interfere → couple → surface  │\n└────────────────────────────────────────────────────────────--──┘\n```\n\nThree crates, clean separation:\n\n| Crate      | What it does                                                                                                       |\n| ---------- | ------------------------------------------------------------------------------------------------------------------ |\n| `am-core`  | Pure math. Quaternions, phasors, drift, interference, Kuramoto coupling, context composition. Zero I/O.             |\n| `am-store` | Persistence. SQLite-backed brain.db : one database per developer, queryable from any project.                      |\n| `am-cli`   | CLI + MCP server. Session sync, import/export, inspection tools.                                                   |\n\n## The math\n\nAll constants derive from φ (golden ratio) and π.\n\n| Mechanism                       | What it does                                                                               |\n| ------------------------------- | ------------------------------------------------------------------------------------------ |\n| **Quaternion positions**        | Each word instance lives on S³. SLERP interpolation along geodesics.                       |\n| **IDF-weighted drift**          | Query activation pulls related occurrences closer. The manifold reshapes with every query. |\n| **Golden-angle phasors**        | Phase distribution follows phyllotaxis (2π/φ²) for maximal separation.                     |\n| **Cross-manifold interference** | Subconscious memories resonate with conscious ones via cos(phase_diff).                    |\n| **Kuramoto coupling**           | Phases synchronize between co-activated neighborhoods, modulated by plasticity.            |\n| **Anchoring**                   | High-activation occurrences crystallize in place, stable structures emerge.                |\n\nThe system has two conservation laws:\n\n- **M = 1** - total mass is conserved. Attention is a finite resource.\n- **K_CON + K_SUB = 1** - coupling between manifolds is zero-sum.\n\n## Development\n\nRust 2024 edition. [just](https://github.com/casey/just) as task runner.\n\n```bash\njust check    # clippy (warnings = errors)\njust build    # cargo build --workspace\njust test     # nextest + doctests\njust fmt      # rustfmt\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrobinson%2Fattention-matters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrobinson%2Fattention-matters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrobinson%2Fattention-matters/lists"}