agentleFS
DScardini91DScardini91/agentic-os/.claude/skills/darwin-housekeeping/SKILL.md

darwin-housekeeping

Skill2 starsChanged 5 months agoMITView on GitHub

Lightweight housekeeping pass over the OS repo. Distinct from Darwin's deep mode — no full health report, no senior-advisor pass. Covers TTL compaction, state drift, agent coverage, git status, and pending-changes scan. Invokable manually or via daily scheduled run.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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:

    When Darwin is invoked in this mode, follow this checklist in order:

    line 45
  2. Distinctive:

    Anti-anchor rule: when re-checking, Darwin must read the canon (not the prior audit) and re-derive status from scratch.

    line 77
  3. Very specific:

    Silence rule: if all checks PASS (zero flags), Darwin updates state.md and produces no output.

    line 97
  4. Very specific:

    Escalation rule: if ≥ 3 flags or 1 ALERT → Darwin notes it in state.md as an item for the next deep mode.

    line 99
  5. Distinctive:

    Do not produce a full health report — that is deep mode.

    line 116
  6. Distinctive:

    Do not pass through the senior advisor — housekeeping is operational, not strategic.

    line 117
  7. Distinctive:

    Do not commit changes — that is a different job.

    line 118
  8. Very specific:

    Do not open structural proposals — note them in state.md for the next deep mode.

    line 119
  9. Distinctive:

    Do not escalate to the principal if all checks pass.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Skill: darwin-housekeeping

When to use

  • A light "tidy-up" of the repo is wanted without a full governance pass.
  • Accumulated work in the repo may be stale (state files, scratchpads).
  • Preparation before an intense work session.
  • Triggered automatically via a daily scheduled run.

Difference from other Darwin modes

ModeFrequencyCostOutputSenior advisor?
Light (Stop hook)Every session~0.5 minAppend jsonlNo
HousekeepingDaily / on-demand~3 minTriage tableNo
Deep (weekly pass)Weekly~15 minHealth Report + proposalsYes

Architecture

/darwin-housekeeping
  ↓
Agent(darwin) — housekeeping mode
  ├── bash: memory-ttl-compaction.sh
  ├── bash: state-drift-check.sh
  ├── git status (Read-only audit)
  ├── agent coverage scan (.claude/agents/ × control-plane/memory/)
  ├── canon-recheck-due sweep
  └── triage report
  ↓
Interface agent → summary to principal (only if there are FLAGS — silent if all PASS)

Protocol

When Darwin is invoked in this mode, follow this checklist in order:

1. TTL Compaction

bash control-plane/scripts/memory-ttl-compaction.sh

Output: count of scratchpads removed + state files reset.

2. State drift check

bash control-plane/scripts/state-drift-check.sh

Output: agents with stale state.md mtime but recent activity in commits / agent-calls.

3. Git status

git status --short
git log --oneline -5

Flag uncommitted changes. Do not commit — that is the responsibility of a separate daily-commit job, not housekeeping.

4. Agent coverage audit

List .claude/agents/*.md and cross-check with control-plane/memory/*/state.md or control-plane/agent-state/*.md:

  • Agent present in .claude/agents/ but no state.md → FLAG.
  • Exception: read-only agents (typically the senior advisor and entity guardians) do not need their own state.md — the interface agent maintains theirs.

5. Canon re-check sweep

bash control-plane/scripts/canon-recheck-due.sh

Lists items in learning/canon/*-self-audit.md with Re-check: YYYY-MM-DD ≤ today + 7d. Each due item is a FLAG.

Anti-anchor rule: when re-checking, Darwin must read the canon (not the prior audit) and re-derive status from scratch.

Output format

Darwin produces a short triage table:

## Darwin Housekeeping — YYYY-MM-DD

| Check | Status | Detail |
|---|---|---|
| TTL compaction  | ✅ / ⚠️ N items | [scratchpads removed / state files reset] |
| State drift     | ✅ / ⚠️ N drifted | [agents] |
| Git status      | ✅ clean / ⚠️ | [uncommitted files] |
| Agent coverage  | ✅ / ⚠️ N missing state | [agents lacking state.md] |
| Canon re-check  | ✅ / ⚠️ N due | [items] |

Flags to address: N

Silence rule: if all checks PASS (zero flags), Darwin updates state.md and produces no output. The interface agent does not forward anything.

Escalation rule: if ≥ 3 flags or 1 ALERT → Darwin notes it in state.md as an item for the next deep mode. Does not trigger deep mode automatically.

Update darwin/state.md

At the end, Darwin replaces the "Handoff — last execution" block with:

**Date:** YYYY-MM-DD
**Mode:** housekeeping
**Flags found:** N
**Items compacted:** N scratchpads, N state resets
**Note:** [only if anything notable]

Cost estimate

~3 min · ~2.5k tokens (script execution + triage without analytical synthesis)

Do NOT do in this mode

  • Do not produce a full health report — that is deep mode.
  • Do not pass through the senior advisor — housekeeping is operational, not strategic.
  • Do not commit changes — that is a different job.
  • Do not open structural proposals — note them in state.md for the next deep mode.
  • Do not escalate to the principal if all checks pass.

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.