-
Notifications
You must be signed in to change notification settings - Fork 8
docs: Design Philosophy — "imperfection by design" #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
784763b
docs: add Design Philosophy ("imperfection by design")
claude 86f6862
docs(readme): rename "Live Demo" -> "Live progress track"
claude 570614a
docs(readme): move Design Philosophy to the top
claude acd2897
Merge branch 'main' into claude/design-philosophy
duanyiqun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| # Design Philosophy: Imperfection by Design | ||
|
|
||
| > **This document is an extension of `CLAUDE.md` and the [README](../README.md). Read those first for the system overview.** | ||
|
|
||
| CogniFold does **not** chase a perfect, omniscient, unbiased recall store. It models | ||
| memory the way cognition actually works — *situated, lossy, and opinionated* — because | ||
| that is precisely what makes proactivity possible. | ||
|
|
||
| This page explains why the biases below are deliberate design commitments rather than | ||
| defects we are slowly engineering away, and how each one maps to a concrete mechanism in | ||
| the system. | ||
|
|
||
| --- | ||
|
|
||
| ## The thesis | ||
|
|
||
| A memory that stored everything, weighted everything equally, and recalled it with | ||
| perfect fidelity would be a **database**. It would be faithful — and completely | ||
| **reactive**. It can only answer what you explicitly ask, in the framing you happen to | ||
| ask it. | ||
|
|
||
| What lets memory *act ahead of you* — surface a deadline you forgot, connect two | ||
| conversations you never linked, raise an intent you didn't think to query — is the same | ||
| machinery that makes it imperfect. To be proactive, a memory must **decide**: what | ||
| matters, what fades, what gets reinforced, and what crystallizes into an intent. Every | ||
| one of those decisions is a bias. **The bias is not a bug on the way to a perfect memory. | ||
| The bias is the mechanism.** | ||
|
|
||
| So CogniFold optimizes for **useful proactive structure**, not for maximal ground-truth | ||
| fidelity. The flaw is the point. | ||
|
|
||
| --- | ||
|
|
||
| ## Why "a faithful memory" is the wrong target | ||
|
|
||
| The dominant framing for agent memory is *retrieval accuracy*: store text, embed it, | ||
| fetch the nearest neighbors, measure how often the right chunk came back. Under that | ||
| framing, every departure from verbatim recall is an error to be minimized, and the ideal | ||
| system is a lossless index. | ||
|
|
||
| But human memory is not a lossless index, and it is not trying to be. It is **generative | ||
| and reconstructive** — it abstracts, forgets, distorts, and completes. Those are not | ||
| failures of the system; they are how it stays small, fast, and *forward-looking* enough to | ||
| be useful in an open-ended world. CogniFold takes the same position: the interesting | ||
| target is not "did we keep every token," but "did the structure that emerged let the | ||
| system act on the user's behalf." | ||
|
|
||
| This reframes what counts as a good memory and, consequently, what counts as a good | ||
| benchmark (see [What this means for evaluation](#what-this-means-for-evaluation)). | ||
|
|
||
| --- | ||
|
|
||
| ## Four cognitive realities we model on purpose | ||
|
|
||
| Each of the following is a well-studied feature of biological cognition that *also* shows | ||
| up in LLM-based agents. Rather than design around them, CogniFold embodies them. | ||
|
|
||
| ### 1. Situated cognition | ||
|
|
||
| **The phenomenon.** Cognition is never isolated. It is embedded in the current context, | ||
| the active goal, and the history that led here. The deeper you go into a problem, the more | ||
| your frame gets *locked* by that situation — and the harder it is to step outside it. | ||
|
|
||
| **The agent analogue.** A reasoning agent reads from where it already is: the active task | ||
| and recent trace condition everything that follows. There is no "view from nowhere." | ||
|
|
||
| **CogniFold's stance.** We make situatedness explicit rather than pretending to a neutral | ||
| global read. Retrieval is conditioned on the **active intent** and recent episodic trace, | ||
| so the graph reasons *from its current standpoint*. This is a feature: a proactive system | ||
| must be anchored in a situation to know what to push. | ||
|
|
||
| **Mechanism.** Intent-conditioned retrieval; the hierarchical context window's | ||
| `immediate / working / background` bands; edge-type weighting routed by query intent | ||
| (`symbolic/intent_router`). | ||
|
|
||
| ### 2. Confirmation bias / reasoning inertia | ||
|
|
||
| **The phenomenon.** Once an understanding forms in a particular direction, contradicting | ||
| signals get filtered out and the existing interpretation is reinforced. Belief has | ||
| momentum. | ||
|
|
||
| **The agent analogue.** The reasoning path accumulated in a context window builds | ||
| inertia — each step is anchored by the steps before it, so an early commitment propagates | ||
| forward whether or not it was right. | ||
|
|
||
| **CogniFold's stance.** We treat this inertia as **real and structural**, not something a | ||
| "fresh" prompt erases. Instead of pretending each turn is a clean slate, we bound and | ||
| correct accumulated belief through explicit graph rewrites over time. | ||
|
|
||
| **Mechanism.** The four structural debts of a streaming log — **accumulation, compression, | ||
| decay, completion** — resolved as transparent, auditable graph rewrites (test-time | ||
| learning, no gradient updates, no surface-text rewriting). Decay and re-linking are how an | ||
| over-reinforced path loses its grip. | ||
|
|
||
| ### 3. Locality of working memory | ||
|
|
||
| **The phenomenon.** Human working memory is finite. Only the currently relevant knowledge | ||
| nodes are activated at once; other perspectives are suppressed. You cannot hold the whole | ||
| of what you know in view simultaneously. | ||
|
|
||
| **The agent analogue.** An LLM's attention is similar: the weight distribution over the | ||
| current tokens decides *what is even seen*. Context is finite and the salience profile is | ||
| narrow by construction. | ||
|
|
||
| **CogniFold's stance.** We embrace locality as a **feature**, not a limit to paper over by | ||
| stuffing the window. The system deliberately surfaces a focused, partial view rather than | ||
| dumping the whole graph — because a partial-but-relevant view is what enables fast, | ||
| situated action. | ||
|
|
||
| **Mechanism.** The `HierarchicalContextSelector` and its bounded bands; scored, capped | ||
| context assembly instead of full-graph serialization. | ||
|
|
||
| ### 4. Metacognitive blind spots (unknown unknowns) | ||
|
|
||
| **The phenomenon.** The most dangerous gap is the part you don't know you don't know. You | ||
| can't feel its absence, so you never think to ask — and therefore can't be helped by any | ||
| system that only answers questions. | ||
|
|
||
| **The agent analogue.** A purely on-demand (query → retrieve → answer) memory is | ||
| structurally incapable of covering this gap: it can only return what you knew enough to | ||
| ask for. | ||
|
|
||
| **CogniFold's stance.** This is the deepest reason the substrate is **proactive**. Intents | ||
| that crystallize from graph *topology* — from conditions accumulating whether or not you | ||
| noticed — can surface something you never thought to query. That is partial coverage of a | ||
| blind spot that on-demand retrieval can never reach. | ||
|
|
||
| **Mechanism.** Intent crystallization: when a concept cluster crosses a density threshold, | ||
| an `intent` node forms and is surfaced through the proactive context window with no query | ||
| asked. Prospective memory as a property of the topology, not the agent's policy. | ||
|
|
||
| --- | ||
|
|
||
| ## What this means for the architecture | ||
|
|
||
| The philosophy is not decoration — it is why the tri-layer substrate looks the way it | ||
| does: | ||
|
|
||
| | Cognitive commitment | Mechanism in CogniFold | | ||
| |---|---| | ||
| | Situated cognition | Intent-conditioned retrieval; intent-routed edge weights; context bands | | ||
| | Reasoning inertia is real | Accumulation / compression / **decay** / completion as graph rewrites | | ||
| | Locality is a feature | Hierarchical, bounded context window (not full-graph dumps) | | ||
| | Cover unknown unknowns | **Intent crystallization** from topology → proactive surfacing | | ||
|
|
||
| A memory that refused these biases could not crystallize an intent, could not forget a | ||
| stale one, and could not decide what to surface unprompted. It would be inert. | ||
|
|
||
| --- | ||
|
|
||
| ## What this means for evaluation | ||
|
|
||
| If imperfection is the design, then **the highest score on a recall-style benchmark is not | ||
| the goal**, and chasing it can actively harm the system. | ||
|
|
||
| - We report the **proactive-substrate stack** — the configuration that keeps intent | ||
| generation working end-to-end — **not a per-benchmark tuned ceiling.** | ||
| - Several older benchmarks (ToMi in particular) are **trivially inflatable** with a | ||
| task-specialized reader. But that path rewards **auto-loop hallucination**: the reader | ||
| confabulates an answer that satisfies the metric instead of reading from memory. That is | ||
| precisely the *metacognitive blind spot* failure above — the model not knowing that it | ||
| doesn't know, and filling the gap with a fabrication. | ||
| - Optimizing for those points would trade the system's purpose for a leaderboard number. | ||
| So we don't. We'd rather publish an honest number from the substrate we actually ship. | ||
|
|
||
| This is also why **CogEval-Bench** exists: it isolates *proactive emergence* (Purity, | ||
| Proactivity, Compression) from retrieval accuracy, measuring the thing the philosophy | ||
| actually commits to. See [BENCHMARK.md](BENCHMARK.md) for the full results and protocol. | ||
|
|
||
| --- | ||
|
|
||
| ## What we explicitly reject | ||
|
|
||
| - **"Perfect recall is the goal."** No — perfect recall is a reactive database. Proactivity | ||
| requires deciding, and deciding is biasing. | ||
| - **"Bias is a defect to minimize to zero."** No — bias is the selection pressure that makes | ||
| structure (and intent) emerge. | ||
| - **"A bigger context window solves locality."** No — locality is a feature; relevance beats | ||
| volume. | ||
| - **"Higher benchmark number = better memory."** No — not when the number comes from a | ||
| configuration we don't ship and that encourages confabulation. | ||
|
|
||
| --- | ||
|
|
||
| ## Closing | ||
|
|
||
| CogniFold is a bet that the path to genuinely helpful, *proactive* memory runs through | ||
| modeling cognition honestly — biases included — rather than approximating an omniscient | ||
| oracle. We don't pursue a perfect ground truth. We pursue a substrate that is situated, | ||
| forgets on purpose, sees locally, and occasionally tells you something you didn't know to | ||
| ask. **The flaw is the point.** |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.