session-reflection
Skill4 starsChanged 4 months agoMITView on GitHub
Use when the user asks to reflect on a session or to compact it -- "reflexionemos sobre la sesión", "cerremos esto", "guardemos lo que aprendimos", "compactemos", "compacta", "let's reflect on this session", "wrap up this session", "compact the session" -- or when closing substantial work: the orchestrator reconciles the session against memory and the coordination substrate (briefs/plans/tasks/approvals), curates and closes what it can decide on its own, and reports what changed. Compacting needs no reflection: asked to compact, it requests the compaction and may leave an optional hand note.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- linxule/carreltheir own version, first seen Nov 8, 2026
- jwilger/agent-skillstheir own version, first seen Oct 11, 2026
- michellepellon/superpowerstheir own version, first seen Mar 23, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- jwilger/agent-skills★ 4same name
- linxule/carrel★ 2same name
- michellepellon/superpowers★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- agent-contract-handoffSkill
- agent-creationSkill
- agent-protocolSkill
- agent-responseSkill
- blog-writingSkill
- brief-specSkill
- cli-loginSkill
- code-reviewSkill
- code-standardsSkill
- command-executionSkill
- deck-builderSkill
- dispatchSkill
- executionSkill
- fast-queriesSkill
- gaia-auditSkill
- gaia-checkSkill
- gaia-patternsSkill
- gaia-plannerSkill
- gaia-releaseSkill
- gaia-researchSkill
- gaia-verifySkill
- ghostwritingSkill
- git-conventionsSkill
- gmail-policySkill
- gmail-triageSkill
- gws-setupSkill
- human-registerSkill
- investigationSkill
- memorySkill
- orchestrator-present-approvalSkill
- pending-approvalsSkill
- remindersSkill
- security-tiersSkill
- session-channelsSkill
- skill-creationSkill
- subagent-request-approvalSkill
- technical-explanationSkill
- technical-writingSkill
- ticket-writingSkill
- verification-oracleSkill
- verification-rubricSkill
- visual-verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 121
Request the compaction: Call the host's compaction tool once: mcp__gaia__compact_when_idle in Claude Code, gaia_compact_when_idle in …
- Very specific: line 125
Optionally leave a hand note: Only what comes next and no row holds -- the exact next action, the active files: gaia session resume-point …
- Very specific: line 133
If the next turn carries a note that the compaction did not start, tell the user so, name the host's reason, and ask them to type /compact.
- Distinctive: line 146
Never report a compaction you did not start.
- Very specific: line 148
When the user types /compact without asking to compact first, nothing above runs: the PreCompact hook still writes the ledger, and the hand …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Reflection
Session reflection is everything the session lived, contrasted against what belongs to each project, until no loop is left dangling. It recovers the whole arc, reconciles it against the durable corpus in both directions, and leaves every item — settled or open — with an owner a later session can find.
Upstream are the transcript, the specialist contracts, and the injected digest. Downstream is memory curation: reflection ends when the corpus is correct. Compaction is a separate act: it is safe at any time and needs no reflection first, because the PreCompact hook rebuilds the session's in-flight state from the database (see "Compacting").
Process
- Recover the whole arc. Scan from the session opening for accepted and
rejected proposals, deferrals, closures, user corrections, and specialist
reactions — recency is not weight, an early settled choice still stands.
Include
cross_layer_impacts,open_gaps, andfailure_reportfindings even where the user never reacted: they are observations about Gaia, not conversational agreements.reference.mdholds the full recovery pass. - Reconcile in both directions. For each initiative the session touched,
read its live corpus —
gaia memory get-relevant --initiative=<key>returns that whole pending set uncapped, with bodies — and ask: what did this session produce with no home yet, and what already-open pending did it close, advance, or invalidate? A topic search only answers whether your own phrasing has a row; the closure you owe is usually phrased in terms that predate the session that solved it. Read briefs, plans, tasks, and approvals the same way — a conversation cannot close an object the substrate still shows open. A session that produced any Gaia improvement touchedgaia_systemby definition, whatever project it was nominally working on — sweep it too.reference.mdholds the reverse-sweep mechanics and the objective-state checks that verify aSKIP. - Classify disjointly. Separate settled decisions and learnings,
genuinely open work, and Gaia improvements. A user correction any user
would want is a Gaia improvement, not a settled preference of his: only his
difference becomes his row. When closure is uncertain, classify as open; a
lost pending costs more than an extra review. For
anything about Gaia itself,
memory/SKILL.md's ownership test decides the initiative —gaia_systemfor an observed failure or friction, project-scopedgaiafor a decision to build or change something. - Give every item a home, and know what the home does. The pending
worklist that returns to the user each session selects
class=threadwith statuscarry_forwardoropenonly — ananchorstill reaches a dispatched agent as held knowledge, but never comes back as work. Filing live work as an anchor hides it; filing settled knowledge as a thread turns the worklist into noise.SKIPis a home only when you name the canonical object that owns the item — already-canonical work is referenced, never copied. - Adjudicate against the exception boundary. The boundary table lives in
memory/SKILL.md("Process" step 5) — this is a pointer to it, not a copy. Most operations are decided and executed directly; only the rows the boundary marks "ask first" or "veto" wait on the user. - Run the curation, closures included. Materialize the step 2 closures
alongside the new rows;
reclassifyandappendare non-mutative, so nothing but omission keeps a resolved thread open. A closing arc that passes the milestone test inreference.mdusescheckpoint, one atomic write; an ordinary close does not. - State the resume point. One line naming what the next session picks up — a pointer, not a container: everything it names already has a row.
Working tables
These internal tables force one owner per item before curation; omit empty
sections. SAVE, APPEND, TRANSITION, LINK, and SKIP are adjudicated by
memory; a closure or graduation is a TRANSITION materialized as
reclassify. memory/reference.md owns the exact forms.
What we settled
Accepted decisions, closures, and reusable learnings. Prefer SKIP naming the
canonical object; SAVE only knowledge that must constrain a later choice.
| Item | Home | Operation |
| the decision, in the user's words | slug, commit, or brief/plan/task id | SAVE, APPEND, LINK, or SKIP |
Open work
One row per unresolved concern and per pending the sweep found resolved; the
latter is a TRANSITION, never a silent omission.
| Item | Home | Operation |
| the concern, in the user's words | slug, brief/plan/task id, or initiative | SAVE, APPEND, TRANSITION, LINK, or SKIP |
What Gaia should improve
Symptom observable behavior, not diagnosis
Component one precise owner
Evidence observed proof
Reproduction exact repeatable route, or unknown
→ feedback_<component>_<symptom> · type feedback · SAVE or APPENDWork the evidence through before saving; reference.md owns field definitions
and the gaia_system retrieval query.
Output
The user sees a post-curation report, one line per durable effect, not the
working tables or raw verbs. Flag a type=user row first for its governed veto.
Resume point
Name what the next session picks up: a pointer, never a copied container.
Compacting
Compaction no longer waits for this reflection. Before every compaction, manual
or automatic, the PreCompact hook writes this session's ledger from the
database -- its open contracts, its pending signatures, the memory it wrote,
the worktrees its agents opened -- and the birth that follows renders it as
## Resume point. Reflection stays a deliberate curation pass the user asks
for; it is not a precondition. When the user asks to compact, the session id
is the session= line of the ## Environment block:
- Request the compaction. Call the host's compaction tool once:
mcp__gaia__compact_when_idlein Claude Code,gaia_compact_when_idlein OpenCode. It schedules the compaction for when the current turn ends, never mid-turn. The host can still refuse it. - Optionally leave a hand note. Only what comes next and no row holds --
the exact next action, the active files:
gaia session resume-point set --session-id <id> --text "<text>", at most 2000 characters. It appears asnote:only in this session's Resume point; the ledger already carries the contracts, signatures, memory and branches, so do not restate them. - End the turn with a line saying the compaction was requested -- not that it will happen.
If the next turn carries a note that the compaction did not start, tell the
user so, name the host's reason, and ask them to type /compact.
Compact when the user asks, reflection finished or not: do not offer a reflection first and do not hold the compaction for one. The ledger already carries the durable state, and the hand note is where anything else the next turn needs goes.
Without the tool -- a headless Claude Code session (the desktop app, -p,
the SDK), where the host cannot compact from a mod, Claude Code with mods
disabled or older than 2.1.287, or any host that does not list it -- nothing
the orchestrator runs can start the compaction. Skip step 1, optionally leave
the hand note (step 2), and end the turn asking the user to type /compact.
Never report a compaction you did not start.
When the user types /compact without asking to compact first, nothing above
runs: the PreCompact hook still writes the ledger, and the hand note appears
only if one was written for this session.
Ownership and consent
Consent mechanics belong to memory: the orchestrator recovers, reconciles,
and adjudicates, while gaia-operator materializes exact instructions. Any
operation requiring consent is delegated through its approval flow and never
autoexecuted. Independent operations are best-effort; a checkpoint stays
atomic, so partial state is never reported as closure. Reflection itself is not
a new durable object.
Handoffs
- Load
memoryfor curation andreference.mdfor detailed recovery mechanics. - Load
examples.mdfor the integrated flow, compaction included.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

