agentleFS
criptoguscriptogus/brainstack/skills/consolidate/SKILL.md

consolidate

Skill4 starsChanged 4 months agoMITView on GitHub

Use at session end or nightly (the dream cycle) to consolidate a vault - dedupe, repair Iron Law backlinks, refresh the Tree Index, clean NOW.md, detect contradictions, apply memory decay, set next-day priorities.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a heavy capture session (many new notes)

    line 22
  2. Very specific:

    Don't use for: capturing new material (see capture), answering questions (see retrieval).

    line 25
  3. Distinctive:

    Tree Index refresh: - add new entities, retitle stale ones, remove dead ones.

    line 35
  4. Very specific:

    Next-day priorities: - write the 3 priorities for tomorrow into now/essentials.md.

    line 44
  5. Very specific:

    Archive, never delete: Every removal is a move to Archive/ with a log entry.

    line 51

“Common” is measured: kept by at least 6 in 10 of the 4 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Consolidate

The dream cycle: nightly consolidation that turns a week of messy capture into a clean, connected brain. Modeled on how biological memory consolidates during sleep - the vault does its best work while nobody is watching.

When to Use

  • End of day / end of session ("good night" trigger)
  • Nightly cron run
  • After a heavy capture session (many new notes)
  • Weekly deep maintenance

Don't use for: capturing new material (see capture), answering questions (see retrieval).

The dream cycle (7 steps, idempotent)

  1. Dedupe - people, companies, concepts with duplicate pages. Merge, and archive the loser (never delete - provenance survives).
  2. Backlink repair - scan for mentions that violate the Iron Law (a note mentions an entity with its own page but no backlink was added). Add the missing backlinks. This is the nightly synapse repair.
  3. Tree Index refresh - add new entities, retitle stale ones, remove dead ones.
  4. NOW.md cleanup - prune now/essentials.md (today-only urgency), close resolved threads in now/threads.md, append now/recent.md.
  5. Contradiction detection - compare active memory entries on the same topic. Resolve by recency + confidence; archive the loser with a superseded_by note.
  6. Memory decay - apply TTL decay to the memory store (see the memory skill). Stale facts lose confidence; expired facts are flagged.
  7. Next-day priorities - write the 3 priorities for tomorrow into now/essentials.md.

Rules

  • Idempotent: running the cycle twice is safe. Never destructive without --dry-run first.
  • Archive, never delete. Every removal is a move to Archive/ with a log entry.
  • Never touch notes the owner edits manually - detect manual edits (git blame / mtime) and skip them.
  • Under 10 minutes for a healthy vault. If it takes longer, the capture layer is leaking (extraction too heavy, too many unlinked notes) - fix the cause, not the symptom.

Workflow

1. Run the dream cycle: python3 bin/dream-cycle.py [--quick|--full] [--dry-run]
2. Review the report: what was merged, repaired, archived
3. Handle contradictions the policy could not resolve (flag for the human)
4. Write next-day priorities
5. Report status (concise)

--quick = steps 2, 3, 4 only (daily default). --full = everything, including dedupe and decay (weekly).

Common Pitfalls

  1. Deleting instead of archiving. History is evidence. Move to Archive/.
  2. Skipping the dry-run. The cycle is idempotent, but humans make it destructive by editing during the run. Dry-run first, always.
  3. Overwriting manual edits. The owner's own notes are sacred. Detect and skip.
  4. Silently resolving contradictions. Auto-resolve by policy is fine, but the report must surface what was resolved and why - the human reviews it.
  5. Running capture during consolidation. New notes arriving mid-cycle cause missed links. Capture first, consolidate after.
  6. Skipping the report. An invisible consolidation is a consolidation nobody trusts. Always output a compact report.

Verification Checklist

  • Dream cycle ran with --dry-run first (destructive ops reviewed)
  • Backlinks repaired (Iron Law violations closed)
  • Dedupe merged + archived, nothing deleted
  • NOW.md cleaned, next-day priorities written
  • Contradictions resolved by policy, flagged in the report
  • Memory decay applied, store clean
  • Report delivered to the owner

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.