log-archive
Skill7 starsChanged 19 days agoMITView on GitHub
Age the running brain log so a long-lived install stays lean. Say "archive my log", "my log is getting long", "trim the brain log", or "the log is over the cap". Moves the oldest entries out of brain/log.md into monthly archives at brain/archive/log-YYYY-MM.md and leaves a one-line pointer behind, so the file every skill reads stays small while history is preserved. Deterministic script, no LLM call, free-tier safe. Run it when the SessionStart brief or a long session shows the log past its 300-line cap.
In this repository100 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- notion-package/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- add-handsSkill
- add-mouthSkill
- add-voiceSkill
- approval-gatesSkill
- auditSkill
- backupSkill
- blind-spot-reviewSkill
- bottleneck-diagnosticSkill
- brain-logSkill
- brain-passSkill
- brain-snapshotSkill
- brand-interviewSkill
- brand-voice-interviewSkill
- business-context-loaderSkill
- campaign-from-themeSkill
- capture-sweepSkill
- catch-upSkill
- client-updateSkill
- connectSkill
- content-repurposerSkill
- content-startSkill
- context-persistenceSkill
- cross-linkSkill
- data-securitySkill
- decision-frameworkSkill
- decisions-startSkill
- delivery-startSkill
- email-drafterSkill
- employee-reviewSkill
- finance-importSkill
- forcing-questionsSkill
- founder-coachingSkill
- founder-next-moveSkill
- founder-os-setupSkill
- founder-reviewSkill
- founder-scope-challengeSkill
- github-opsSkill
- handoff-protocolSkill
- hireSkill
- historySkill
- housekeepingSkill
- ingestSkill
- knowledge-captureSkill
- legal-complianceSkill
- linkedin-brand-directionSkill
- linkedin-network-scanSkill
- linkedin-postSkill
- linkedin-power-auditSkill
- linkedin-startSkill
- linkedin-warm-revivalSkill
- lintSkill
- list-prunerSkill
- log-replySkill
- meeting-prepSkill
- memory-passSkill
- menuSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
If core/identity.md does not exist, stop with: Founder OS not set up here.
- Distinctive: line 32
If the script exits non-zero, report stderr verbatim and stop.
- Distinctive: line 36
Never splits an entry. An entry moves whole or stays whole.
- Very specific: line 37
Never archives an entry it cannot date.
- Distinctive: line 52
When the log is already under the cap, report the "Nothing to archive." line instead.
- Distinctive: line 56
No commentary outside the output block.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Log Archive
Runs on: local-exec - runs a local script against your files. A local-runtime agent runs it (Claude Code is the reference). A cloud or read-only surface reads the produced archive and pointer instead and says so.
Keeps brain/log.md lean. When the log grows past its cap (default 300 lines), the oldest entries move to brain/archive/log-YYYY-MM.md, grouped by month, and the log keeps only the most recent entries plus a one-line pointer to the archive. The pointer is the cache summary: it says history exists and where, without carrying the detail.
This is the running-log half of the context discipline in the Session Protocol: a small desk, the rest of the history in the filing cabinet, retrieved only when needed.
Pre-flight
If core/identity.md does not exist, stop with: Founder OS not set up here. Run /founder-os:setup first.
If scripts/log-archive.py does not exist, stop with: Log-archive script not found. Run /founder-os:setup or /founder-os:update to install it.
Procedure
- To preview without writing, run
python scripts/log-archive.py --dry-runand report the result. - To archive, run
python scripts/log-archive.py. Use--cap Nonly if the operator asks for a different line cap. - Report the script's stdout verbatim.
- If the script exits non-zero, report stderr verbatim and stop. Do not hand-edit the log to "fix" it - the script is the safe path; hand-editing a long log is how entries get lost.
What it guarantees
- Never splits an entry. An entry moves whole or stays whole.
- Never archives an entry it cannot date. Undated entries stay in
brain/log.md. - Idempotent. Once the log is under the cap, a re-run writes nothing.
- Conserves entries. Every entry is either still in the log or in an archive file, never dropped.
Output format
Single fenced block, the script's own report:
LOG ARCHIVE - YYYY-MM-DD
Cap 300 lines. Log was N lines, M entries.
Archived K entries to: brain/archive/log-YYYY-MM.md (K)
Log now 300 lines, P entries. Pointer updated.When the log is already under the cap, report the "Nothing to archive." line instead.
Voice
- No commentary outside the output block.
<!-- private-tag: not applicable: moves dated log entries between files (structured records, not user-provided speech); no private data introduced -->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.

