Install any skill in seconds. Free to start, no credit card required.
Get Started Free →At the end of a meaningful work session, compress what happened into a structured continuity update using FLOW methodology — extract episodes (factual record), update state and top-of-mind salience, rewrite recent narrative, evaluate which developing patterns graduate to proven via citation-validated 3x rule, demote patterns that no longer hold under new evidence, archive temporally stale material, and commit. Use when the user says "wrap", "update continuity", "close out the session", or when a
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 191% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 226% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 94% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 160% | 0% |
End-of-session memory consolidation protocol from FLOW methodology. Produces a continuity file that gets SMARTER as work accumulates rather than just longer. The mechanism is graduation logic + immune system + structurally-enforced compression. Without these, memory accumulates and process degrades. With them, the system corrects itself and patterns that prove out become reusable primitives.
Trigger conditions:
Do NOT use for:
This skill assumes the agent has:
If any of these are missing, set them up before running the wrap. The protocol assumes their existence.
Before compressing anything into continuity, write the session's facts to the episodic store. Episodes are FACTUAL and SEARCHABLE; continuity patterns are OPINIONATED and COMPRESSED. The episode comes first.
For each meaningful event in the session, write a typed episode:
Each episode gets: content (what happened), source (session ID or conversation reference), tags (domain keywords), timestamp.
Target: 3-10 episodes per meaningful session. Zero episodes means this step got skipped — even "we decided X because Y" is an episode worth writing. Continuity downstream depends on this fact-base.
Review the session and identify:
No pattern graduates without episodic evidence. This is the immune system that prevents semantic inbreeding — graduating patterns based on conversation impression rather than recorded fact.
For every pattern being promoted:
Search the episodic store for supporting episodes. If insufficient:
When promoting, annotate inline so grounding survives future compression passes:
!! pattern_name: description ... | 2x (CATEGORY) [evidence: ep-id-1, ep-id-2]The [evidence: ...] annotation is load-bearing. Without it, future compression can't verify the graduation, and the pattern becomes ungrounded under audit.
Six section operations, each with its own update semantics:
seen: / next:). Remove items that resolved naturally.Before committing, ask: did anything in this session contradict a previously-graduated pattern?
If yes:
This is the asymmetric correction mechanism that flat-retrieval memory architectures structurally lack. Without it, bad patterns accumulate forever. With it, the continuity file is allowed to shrink — and a shrinking continuity at a wrap boundary is evidence the immune system is working.
Commit the continuity file changes to version control. Commit message should reference the session and the key change (e.g., "Session wrap May 13 — graduated pattern-X Proven, demoted pattern-Y back to Developing"). Push to remote if applicable.
Use these in Developing Knowledge, Action Items, and decision annotations. They make compressed content scannable and force precision on what's being tracked.
| Marker | Meaning | Required fields | |---|---|---| | ? | Question needing decision | — | | thought: | Insight worth preserving | — | | ✓ | Completed | — | | [blocked(reason, since)] | Waiting on dependency | reason, since | | [parking(why, until)] | Not ready to process yet | why, until (recommended) | | [decided(rationale, on)] | Commitment made | rationale, on | | [exploring] | Investigating, not committed | — | | -> | Leads to / causes | — | | <- | Derives from | — | | <-> | Bidirectional / mutual | — | | ><[axis] | Tension / tradeoff | axis label REQUIRED |
Modifiers (prefixes): ! urgent, * high confidence, ~ uncertain, ++ strong positive.
Required-field markers like [decided(rationale, on)] force precision — you cannot write a bare [decided] and skip the reasoning. The constraint produces better thinking.
Full FlowScript reference: see REFERENCE.md or github.com/phillipclapham/flowscript.
Compression has known failure modes:
Compression order when over budget:
Protected zones — never compress:
Skipping episodic extraction. Result: patterns graduate based on conversation impression. Semantic inbreeding. The immune system has no fact-base to verify against. The episode comes first. Always.
Graduating on same-session restatement. Two mentions of the same insight in one session is one observation, not two. Independence requires different sessions or different sources.
Appending instead of replacing. State and Top of Mind get REPLACED each session. Recent Context gets REWRITTEN (not appended). Appending without replacing causes drift toward bloat-instead-of-smart.
Compression-as-performance. Restating the same content with fewer words but same surface area is not compression. Real compression: pattern graduation (3 surface facts → 1 meta-pattern) + temporal cleanup (stale → archive) + format density.
Skipping active demotion. Patterns that no longer hold get to stay because demoting is uncomfortable. Result: continuity accumulates ghost patterns. The immune system requires you to demote when evidence demands it — and a wrap that produces a SHRINKING continuity is the system working correctly, not failing.
See REFERENCE.md for: complete FlowScript marker spec with examples, deeper compression guardrails (research-validated against ~30% persona drift risk per Li et al. 2024), file size budgets and pre-commit enforcement patterns, bilateral cross-substrate integration patterns (if running multi-agent setups), and the philosophical foundation — Complementary Learning Systems (CLS) model from cognitive science that this protocol operationalizes via the hippocampus (episodic store) → neocortex (continuity file) consolidation step.
Other measured skills in the registry, with their headline benchmark lift.