DEV Community

Cogweald
Cogweald

Posted on

Summaries drift. Facts should not.

Summaries are useful for helping a model understand a long history quickly. But a summary is a compressed interpretation, not the original fact.

After an event is summarized seven times, details can slowly change. A character’s motivation shifts. The order of events changes. A possibility becomes a certainty. This is the long-term agent version of the telephone game.

Cogweald separates long-term memory into two layers:

  • Chapter summaries preserve narrative flow.
  • Story facts preserve important state that must remain consistent.

Facts carry importance, creation chapter, and invalidation metadata. When the world changes, an old fact is explicitly invalidated instead of being silently overwritten.

This pattern is useful far beyond stories:

  • A support agent can store approved customer terms as facts.
  • A coding agent can store the current migration strategy.
  • A game agent can store the abilities a player has unlocked.

A summary tells an agent what happened. A fact tells it what it must not casually change.

Top comments (0)