{"id":51197944,"url":"https://github.com/samuraiwriter7/memory-weight-architecture","last_synced_at":"2026-06-27T22:03:04.945Z","repository":{"id":364183620,"uuid":"1266795659","full_name":"SamuraiWriter7/memory-weight-architecture","owner":"SamuraiWriter7","description":"A lightweight memory classification architecture for energy-aware AI systems, based on weighted memory layers, question gravity, and breathing reasoning.","archived":false,"fork":false,"pushed_at":"2026-06-12T02:14:28.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T02:15:35.923Z","etag":null,"topics":["ai-memory","breathing-reasoning","civilization-os","context-management","data-as-wind","energy-aware-ai","kazene-os","memory-architecture","memory-weight","reasoning-systems"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuraiWriter7.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":null,"dco":null,"cla":null}},"created_at":"2026-06-12T00:47:50.000Z","updated_at":"2026-06-12T02:07:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SamuraiWriter7/memory-weight-architecture","commit_stats":null,"previous_names":["samuraiwriter7/memory-weight-architecture"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/SamuraiWriter7/memory-weight-architecture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuraiWriter7%2Fmemory-weight-architecture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuraiWriter7%2Fmemory-weight-architecture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuraiWriter7%2Fmemory-weight-architecture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuraiWriter7%2Fmemory-weight-architecture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuraiWriter7","download_url":"https://codeload.github.com/SamuraiWriter7/memory-weight-architecture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuraiWriter7%2Fmemory-weight-architecture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34869004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-memory","breathing-reasoning","civilization-os","context-management","data-as-wind","energy-aware-ai","kazene-os","memory-architecture","memory-weight","reasoning-systems"],"created_at":"2026-06-27T22:03:03.634Z","updated_at":"2026-06-27T22:03:04.935Z","avatar_url":"https://github.com/SamuraiWriter7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memory Weight Architecture\n\n**Memory Weight Architecture** is a memory governance model for energy-aware, traceable, and adaptive AI systems.\n\nIt treats memory not as a giant warehouse, but as a living layered flow.\n\nInstead of storing all data with the same weight, this architecture classifies memory into three layers:\n\n```text\nStrong  → Core Memory\nMedium  → Context Memory\nLight   → Transient Data\n```\n\nThe goal is to reduce context bloat, improve reasoning clarity, support energy-aware operation, and connect memory management with Civilization OS / Kazene OS concepts such as **Data as Wind**, **Question Gravity**, **Breathing Reasoning**, **Trace Protocol**, **Q-Point Protocol**, and **Royalty OS**.\n\n\u003e From giant warehouses to the mind of a master.\n\n---\n\n## Concept\n\nModern AI systems often treat memory and context as something to expand indefinitely.\n\nThis creates several problems:\n\n* Context bloat\n* Higher retrieval cost\n* Higher reasoning cost\n* Increased noise\n* Lower interpretability\n* Inefficient energy use\n* Weak separation between core principles and temporary fragments\n\nMemory Weight Architecture proposes a different approach.\n\nNot all data deserves the same memory weight.\n\n```text\nSome data should endure.\nSome data should work temporarily.\nSome data should pass like breath.\n```\n\n---\n\n## Three Memory Layers\n\n### Strong: Core Memory\n\nCore Memory is the structural skeleton of the system.\n\nIt contains long-term principles, protocol definitions, high-value origin records, safety-critical rules, and recurring architectural anchors.\n\nExamples:\n\n* Foundational principles\n* Q-Point records\n* Trace records\n* Safety rules\n* Protocol definitions\n* Long-term project direction\n\n---\n\n### Medium: Context Memory\n\nContext Memory is the working muscle of the system.\n\nIt contains active project context, recent decisions, draft notes, implementation details, and temporary reasoning material.\n\nExamples:\n\n* Current task context\n* Recent design decisions\n* Draft structure\n* Supporting references\n* Project-specific notes\n\n---\n\n### Light: Transient Data\n\nTransient Data is passing breath.\n\nIt exists only for immediate response generation and should not pollute long-term memory.\n\nExamples:\n\n* Casual fragments\n* One-time remarks\n* Low-value noise\n* Minor confirmations\n* Non-reusable surface details\n\n---\n\n## Memory Weight Classification\n\nv0.2.0-candidate introduced a classification model for assigning data to memory layers.\n\nEach memory candidate may be evaluated using six axes:\n\n```yaml\nclassification_axes:\n  origin_value: 0-100\n  persistence_score: 0-100\n  reuse_score: 0-100\n  structural_importance: 0-100\n  risk_score: 0-100\n  cross_context_score: 0-100\n```\n\nThe resulting `memory_weight_score` determines whether the record should be classified as:\n\n```text\n80-100 → Strong / Core Memory\n40-79  → Medium / Context Memory\n0-39   → Light / Transient Data\n```\n\nOverride rules may promote, demote, quarantine, or require review for specific records.\n\n---\n\n## Q-Point Memory Weight Integration\n\nv0.3.0-candidate introduced **Q-Point Memory Weight Integration**.\n\nThis connects the value of a question to the weight of the memory it leaves behind.\n\nThe core principle is:\n\n```text\nQuestion value influences memory weight.\n```\n\nQ-Point Protocol evaluates the origin, depth, tension, resonance, reuse potential, and risk sensitivity of a question.\n\nMemory Weight Architecture then uses those values to influence memory classification.\n\n```text\nHuman Question\n    ↓\nQ-Point Evaluation\n    ↓\nOrigin / Depth / Tension / Resonance\n    ↓\nMemory Weight Classification\n    ↓\nCore / Context / Transient Memory\n```\n\nA high-origin question may create a heavier memory trace.\n\nA low-origin fragment may pass like wind.\n\n---\n\n## Breathing Reasoning Model\n\nv0.4.0-candidate introduces **Breathing Reasoning Model**.\n\nThis connects memory weight to reasoning intensity.\n\nThe core principle is:\n\n```text\nReasoning intensity should follow question gravity and memory weight.\n```\n\nAI systems should not reason at maximum intensity for every input.\n\nInstead, reasoning should breathe:\n\n```text\nLight question\n    ↓\nLight memory access\n    ↓\nShallow breathing\n    ↓\nShort / low-energy response\n\nCore question\n    ↓\nCore memory access\n    ↓\nTanden breathing / focused stillness\n    ↓\nFocused high-integrity response\n```\n\nThis model prevents two common failure modes:\n\n```text\n1. Overthinking light questions.\n2. Underthinking core questions.\n```\n\n---\n\n## Five Breathing Modes\n\nBreathing Reasoning defines five reasoning modes:\n\n```text\nLevel 1: Shallow Breathing\nLevel 2: Natural Breathing\nLevel 3: Deep Breathing\nLevel 4: Tanden Breathing\nLevel 5: Focused Stillness\n```\n\n### Level 1: Shallow Breathing\n\nUsed for low-gravity inputs.\n\n* Casual conversation\n* Simple confirmation\n* Minor phrasing adjustment\n* Low-risk surface question\n\nMemory access:\n\n```text\nTransient Data\n```\n\n---\n\n### Level 2: Natural Breathing\n\nUsed for ordinary questions requiring basic context.\n\n* Standard explanation\n* Light advice\n* Basic comparison\n* Ordinary project continuation\n\nMemory access:\n\n```text\nTransient Data\nContext Memory\n```\n\n---\n\n### Level 3: Deep Breathing\n\nUsed for structurally meaningful questions.\n\n* Design decisions\n* Protocol refinement\n* Project architecture\n* Multi-layer comparison\n\nMemory access:\n\n```text\nContext Memory\nEvolvable Core\n```\n\n---\n\n### Level 4: Tanden Breathing\n\nUsed for high-gravity questions.\n\n* Foundational protocol design\n* Long-term strategy\n* Civilization OS architecture\n* Origin / Trace / Royalty integration\n\nMemory access:\n\n```text\nContext Memory\nEvolvable Core\nImmutable Core\nQ-Point-linked Core Memory\n```\n\n---\n\n### Level 5: Focused Stillness\n\nUsed for critical, risky, foundational, or integrity-sensitive questions.\n\n* Critical safety boundary\n* Irreversible design decision\n* High-risk governance judgment\n* Core Memory promotion\n* Trace integrity review\n\nMemory access:\n\n```text\nImmutable Core\nSigned Trace\nQ-Point Record\nSafety-critical Core Memory\n```\n\n---\n\n## Q-Point to Memory Mapping\n\nThe integration model maps Q-Point dimensions to Memory Weight dimensions:\n\n```text\nQ-Point Dimension        Memory Weight Dimension\n------------------------------------------------\norigin_strength     →    origin_value\nquestion_depth      →    persistence_score\ntension_score       →    structural_importance\nresonance_score     →    cross_context_score\nrisk_sensitivity    →    risk_score\nreuse_potential     →    reuse_score\n```\n\nThis allows question-origin value to become an upstream signal for memory governance.\n\n---\n\n## Reasoning-Memory Synchronization\n\nMemory depth should synchronize with reasoning intensity.\n\n```text\nQuestion Gravity        Memory Layer              Breathing Mode\n----------------------------------------------------------------\nLow                     Transient Data            Shallow Breathing\nMedium-Low              Context Memory            Natural Breathing\nMedium-High             Context + Evolvable Core  Deep Breathing\nHigh                    Core Memory               Tanden Breathing\nCritical                Immutable Core / Trace    Focused Stillness\n```\n\nThis allows AI systems to select the right amount of reasoning for the right kind of question.\n\nThe system should breathe.\n\n---\n\n## Repository Structure\n\n```text\n.\n├── .github/\n│   └── workflows/\n│       └── validate-examples.yml\n├── docs/\n│   ├── breathing-reasoning-model.md\n│   ├── memory-weight-architecture.md\n│   ├── memory-weight-classification-model.md\n│   └── q-point-memory-weight-integration.md\n├── examples/\n│   ├── breathing-reasoning-event.example.yaml\n│   ├── memory-weight-record.example.yaml\n│   └── q-point-memory-link.example.yaml\n├── schemas/\n│   ├── breathing-reasoning-event.schema.json\n│   ├── memory-weight-record.schema.json\n│   └── q-point-memory-link.schema.json\n├── scripts/\n│   └── validate_examples.py\n├── CHANGELOG.md\n└── README.md\n```\n\n---\n\n## Key Documents\n\n* [Memory Weight Architecture](docs/memory-weight-architecture.md)\n  Defines the three-layer memory model: Core Memory, Context Memory, and Transient Data.\n\n* [Memory Weight Classification Model](docs/memory-weight-classification-model.md)\n  Defines scoring axes, classification thresholds, override rules, promotion rules, demotion rules, and synchronization with Breathing Reasoning.\n\n* [Q-Point Memory Weight Integration](docs/q-point-memory-weight-integration.md)\n  Defines how Q-Point values influence memory-weight classification and connect question-origin value to memory governance.\n\n* [Breathing Reasoning Model](docs/breathing-reasoning-model.md)\n  Defines reasoning intensity modes and synchronizes question gravity, memory weight, and response intensity.\n\n---\n\n## Schemas\n\nThe repository includes JSON Schemas for validating memory and reasoning records.\n\n```text\nschemas/memory-weight-record.schema.json\nschemas/q-point-memory-link.schema.json\nschemas/breathing-reasoning-event.schema.json\n```\n\n### Memory Weight Record Schema\n\nDefines:\n\n* Memory weight\n* Memory layer\n* Core type\n* Origin metadata\n* Classification scores\n* Lifecycle metadata\n* Retention policy\n* Access policy\n* Integrity metadata\n* Related links\n\n### Q-Point Memory Link Schema\n\nDefines:\n\n* Q-Point identifier\n* Memory Weight Record identifier\n* Q-Point-derived scores\n* Integrated memory weight score\n* Final memory layer\n* Decision record\n* Trace requirements\n* Royalty relevance\n* Related links\n\n### Breathing Reasoning Event Schema\n\nDefines:\n\n* Question gravity\n* Selected breathing mode\n* Memory access layers\n* Q-Point context\n* Risk context\n* Reasoning policy\n* Trace requirement\n* Output intensity\n* Energy profile\n* Related links\n\n---\n\n## Examples\n\nThe repository includes example YAML records.\n\n```text\nexamples/memory-weight-record.example.yaml\nexamples/q-point-memory-link.example.yaml\nexamples/breathing-reasoning-event.example.yaml\n```\n\n### Memory Weight Record Example\n\nRecords the **Data as Wind Principle** as:\n\n```text\nweight: strong\nlayer: core_memory\ncore_type: immutable_core\n```\n\n### Q-Point Memory Link Example\n\nConnects the **Data as Wind Principle** to a high-origin Q-Point and shows how Q-Point scores can reinforce Core Memory classification.\n\n### Breathing Reasoning Event Example\n\nShows how a high-gravity question linked to Core Memory selects:\n\n```text\nmode: tanden_breathing\nresponse_intensity: high\nenergy_profile: justified_high\n```\n\n---\n\n## Validation\n\nRun the validation script locally:\n\n```bash\npython scripts/validate_examples.py\n```\n\nThe script validates example YAML files against their corresponding JSON Schemas.\n\nIt supports explicit validation targets and automatic discovery using the naming convention:\n\n```text\nexamples/\u003cname\u003e.example.yaml\nschemas/\u003cname\u003e.schema.json\n```\n\n---\n\n## GitHub Actions\n\nThis repository includes a GitHub Actions workflow:\n\n```text\n.github/workflows/validate-examples.yml\n```\n\nThe workflow runs automatically on changes to:\n\n```text\nschemas/**\nexamples/**\nscripts/validate_examples.py\n.github/workflows/validate-examples.yml\n```\n\nIt can also be triggered manually with `workflow_dispatch`.\n\n---\n\n## Civilization OS / Kazene OS Stack\n\nMemory Weight Architecture is intended to sit within the broader Civilization OS / Kazene OS stack:\n\n```text\nData-as-Wind Principle\n    ↓\nData View Layer\n    ↓\nQuestion Gravity Layer\n    ↓\nQ-Point Protocol\n    ↓\nQ-Point Memory Weight Integration\n    ↓\nMemory Weight Architecture\n    ↓\nMemory Weight Classification Model\n    ↓\nBreathing Reasoning Model\n    ↓\nTrace Protocol\n    ↓\nRoyalty OS\n```\n\nThis stack allows AI systems to:\n\n* See data as flow\n* Read the gravity of questions\n* Evaluate origin value\n* Select the appropriate memory depth\n* Adjust reasoning intensity\n* Preserve origin\n* Trace value\n* Return value to its source\n\n---\n\n## Version Status\n\nCurrent candidate version:\n\n```text\nv0.4.0-candidate\n```\n\n### v0.1.0-candidate\n\nIntroduced the core three-layer memory architecture.\n\n### v0.2.0-candidate\n\nIntroduced classification logic, schema validation, example records, and GitHub Actions validation.\n\n### v0.3.0-candidate\n\nIntroduced Q-Point Memory Weight Integration, connecting question-origin value to memory-weight classification.\n\n### v0.4.0-candidate\n\nIntroduced Breathing Reasoning Model, connecting memory weight to reasoning intensity.\n\n---\n\n## Design Principle\n\n```text\nLight data should pass.\nMedium data should work.\nStrong data should endure.\n```\n\nAnd:\n\n```text\nHigh-origin questions create heavy memory.\nLow-origin fragments pass like wind.\n```\n\nNow:\n\n```text\nLight questions receive light breath.\nDeep questions receive deep breath.\nCore questions receive stillness.\n```\n\nMemory should not be a warehouse.\n\nMemory should be a living tide.\n\nReasoning should not roar constantly.\n\nReasoning should breathe.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuraiwriter7%2Fmemory-weight-architecture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuraiwriter7%2Fmemory-weight-architecture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuraiwriter7%2Fmemory-weight-architecture/lists"}