Skip to content
Skills Library
Management & product · Automation

f-archive

/f-archive

Rotate the Logbook when it exceeds 250 cards, archiving the rest and keeping 50 index cards for continuity. Use for /f-archive, "the logbook is too big", "rotate the logbook", "archive old cards", or when the card count has grown past the threshold. Also fires automatically from /f-card, /f-signoff, /f-shift and /f-context when the live count is over 250, and then runs through itself. Rotates by count and judges nothing: to reconcile duplicates and contradictions, use f-dream. Not archived-card search (f-archive-search).

Repository
toppingout ↗
Licence
MIT
Last repository change
13.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Rotate the Logbook when it exceeds 250 cards, archiving the rest and keeping 50 index cards for continuity. Use for /f-archive, "the logbook is too big", "rotate the logbook", "archive old cards", or when the card count has grown past the threshold. Also fires automatically from /f-card, /f-signoff, /f-shift and /f-context when the live count is over 250, and then runs through itself. Rotates by count and judges nothing: to reconcile duplicates and contradictions, use f-dream. Not archived-card search (f-archive-search).

Triggers from the description

the logbook is too bigrotate the logbookarchive old cards
Original author description

Rotate the Logbook when it exceeds 250 cards, archiving the rest and keeping 50 index cards for continuity. Use for /f-archive, "the logbook is too big", "rotate the logbook", "archive old cards", or when the card count has grown past the threshold. Also fires automatically from /f-card, /f-signoff, /f-shift and /f-context when the live count is over 250, and then runs through itself. Rotates by count and judges nothing: to reconcile duplicates and contradictions, use f-dream. Not archived-card search (f-archive-search).

How it works

  1. Halt
  2. Job
  3. Preview / report
Original SKILL.md headings · 40 lines, 791 words
SKILL.md preview
---
name: f-archive
description: >
  Rotate the Logbook when it exceeds 250 cards, archiving the rest and keeping
  50 index cards for continuity. Use for /f-archive, "the logbook is too big",
  "rotate the logbook", "archive old cards", or when the card count has grown
  past the threshold. Also fires automatically from /f-card, /f-signoff, /f-shift
  and /f-context when the live count is over 250, and then runs through itself. Rotates by count and judges
  nothing: to reconcile duplicates and contradictions, use f-dream. Not
  archived-card search (f-archive-search).
---

# Topping Out: Logbook archive

Rotate by count. Protocol: `foreman/logbook/ARCHIVE-SYSTEM.md`. All copying, hashing, deleting and restoring goes through the helper `foreman/logbook/archive_cards.py` (Python 3, stdlib only, run from the repo root). Never hand-roll shell copy/hash/delete recipes.

## Halt

- Typed by hand, the default is **dry-run**: `--execute` writes only on the owner's word, and without it you get a preview only (`archive_cards.py plan`), no copies, no deletes.
- **Started automatically** (below) over 250 live cards, it **executes by itself**, with no owner input: the plan, then `archive`, under every guard here (manifest, copy, hash every copy, only then delete; the 50 index cards and every `ruled-out` card kept). It reports the archive number and counts for the close or shift report. Any guard that fails stops it with nothing deleted, and the job carries on.
- **Manifest → copy → hash every destination → then delete.** Never `mv`. The helper exits 1 and deletes nothing on any mismatch or missing copy; then stop, report its `VERIFY FAILED` lines, leave the active Logbook untouched.
- Count live cards from the files at run time (`[A-Z]*_20*.md` under `foreman/logbook/entries/`, excluding `*TEMPLATE*`); the index's total is a cache, and if it disagrees, the files win. Do not assume any number from the protocol file.
- **250 or fewer live cards (including an empty Logbook): archive nothing and say so.**
- Never delete an `archived/NNN/` folder, not even as a rollback. Any hash failure after cards were deleted: **stop archiving and tell the owner**. Typed by hand: stop and say so. In automatic mode: write nothing more to the Logbook, report `ARCHIVE CHECK FAILED` with the helper's lines to the caller (it goes into the dev report and the close report as owed to the owner), and return; the job carries on.
- Do not judge, merge, or supersede cards. That is `f-dream`.
- Never stage, commit, or push. Report **every path** created or deleted (the cards removed from `entries/`, the new `archived/NNN/`, the rebuilt index and links), so the caller's records commit stages them all.

**Auto-invoke.** `/f-card` (after a write, except during a close), `/f-signoff` (once, at the end of its Step 3.2a) and `/f-shift` (at the start of a shift) count live cards and run this skill when the count is **greater than 250**, through to the end (`--execute`): nothing is lost, every card stays readable through `/f-archive-search`, and `restore` puts an archive back. `/f-context` is a read-only orientation: it runs only the dry run and reports that an archive is due.

## Job

When active cards (excluding templates) exceed 250:

1. Score each card: `(relationship_count × 3) + recency_bonus` (≤30d = 20, ≤60d = 10, else 0). Recency from the `YYYYMMDD` in the filename; relationship count = occurrences of the frontmatter `id:` in `logbook_links.md`.
2. Keep **50** index cards. Clusters come from the corpus (each card's first `cluster:` slug, as under `## Clusters` in `logbook_index.md`); a missing or unknown slug goes to **other**, never dropped. Capped pass: score descending, at most 10 per cluster. **Fallback:** if the capped pass keeps fewer than 50 (e.g. fewer than five clusters), fill the remaining slots by score from the rest, ignoring the cap.
2a. **Every `ruled-out` card is also kept**, on top of the 50: `/f-survey` looks for them through `/f-search`, which never reads `archived/`, so an archived one would silently stop flagging the option it ruled out.
3. Archive number `NNN` = highest existing `foreman/logbook/archived/NNN/` + 1 (`001` if none). Write the kept ids (the 50, plus every `ruled-out` card), one per line, to a keep file outside `archived/NNN/`.
4. Dry run: `python foreman/logbook/archive_cards.py plan --archive NNN --keep <file>`. Stop here without `--execute`.
5. Execute: `python foreman/logbook/archive_cards.py archive --archive NNN --keep <file>`. Continue only on exit 0 (it writes `MANIFEST.json`, copies every card plus index and links, verifies each destination hash, then deletes only the non-kept cards; templates, kept cards, index and links stay).
6. Write `archived/NNN/MANIFEST.md` (human summary, format in the protocol).
7. Rebuild `logbook_index.md` and `logbook_links.md` for the index only (keep a relationship only if **both** ends are in the index; recount from the files).
8. `python foreman/logbook/archive_cards.py verify --archive NNN` must exit 0.

Recovery: `archive_cards.py restore --archive NNN` verifies the archive first, copies back only missing cards, never overwrites a differing live card, never deletes the archive. Exit codes: 0 ok, 1 verification/data problem, 2 usage.

## Preview / report

Dry-run: current count, archive number, the 50 ids with scores and clusters (say if the fallback filled slots past the cap), a few low-scorers that would leave, the helper's `plan` summary. Then stop. If 250 or fewer cards: say nothing will be archived and why.

Execute: archive path, counts archived vs kept, timestamp, the helper's exit and verify result. Search leftovers with `/f-archive-search`.

Versions

The database has no other skills named f-archive.

Database snapshot: 13.11.2026 · package version 52e38146facf (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100f-search
    Find cards in the file-based Logbook (foreman/logbook/). Use when the user runs /f-search, or when looking for past learnings, gotchas, or methods. Live cards only: archived cards are f-archive-search.
  • 90f-archive-search
    Search across all ARCHIVED Logbook cards. Use when the user runs /f-archive-search, says "look in the archive", "we knew this before", "search the old cards", or when /f-search came back empty and the knowledge may predate the last rotation. Archived cards only: for live cards use f-search.
  • 90card
    When the user wants to design, optimize, or audit card layouts for content display. Also use when the user mentions "card layout," "card component," "card grid," "product cards," "template cards," "tool cards," "feature cards," "gallery cards," "integration cards," or "card…
  • 90logbook:messages
    Analyze messages exchanged per project across all Claude Code sessions. Generates monthly and yearly markdown reports with per-project/branch breakdowns. Use when the user asks about "message count", "messages per project", "how many messages", "message report", "logbook…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.