agentleFS
ARCASSystemsARCASSystems/FounderOS/skills/log-archive/SKILL.md

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.

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
  1. Very specific:

    If core/identity.md does not exist, stop with: Founder OS not set up here.

    line 23
  2. Distinctive:

    If the script exits non-zero, report stderr verbatim and stop.

    line 32
  3. Distinctive:

    Never splits an entry. An entry moves whole or stays whole.

    line 36
  4. Very specific:

    Never archives an entry it cannot date.

    line 37
  5. Distinctive:

    When the log is already under the cap, report the "Nothing to archive." line instead.

    line 52
  6. Distinctive:

    No commentary outside the output block.

    line 56

≈ “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.

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

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

  1. To preview without writing, run python scripts/log-archive.py --dry-run and report the result.
  2. To archive, run python scripts/log-archive.py. Use --cap N only if the operator asks for a different line cap.
  3. Report the script's stdout verbatim.
  4. 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 -->

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.