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.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- control-plane/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- control-plane/CLAUDE.mdCLAUDE.md
- agentic-os-reference-syncSkill
- branch-cleanupSkill
- capture-triageSkill
- darwin-path-modeSkill
- decision-log-entrySkill
- eodSkill
- expert-interview-guideSkill
- feedback-intakeSkill
- harness-onboardingSkill
- ingest-contentSkill
- meeting-to-work-itemsSkill
- memory-consolidateSkill
- morning-briefSkill
- os-bootstrap-extendSkill
- os-bootstrapSkill
- pr-reviewSkill
- scheduleSkill
- spec-cross-checkSkill
- ux-critiqueSkill
- weekly-retroSkill
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
- Distinctive: line 45
When Darwin is invoked in this mode, follow this checklist in order:
- Distinctive: line 77
Anti-anchor rule: when re-checking, Darwin must read the canon (not the prior audit) and re-derive status from scratch.
- Very specific: line 97
Silence rule: if all checks PASS (zero flags), Darwin updates state.md and produces no output.
- Very specific: line 99
Escalation rule: if ≥ 3 flags or 1 ALERT → Darwin notes it in state.md as an item for the next deep mode.
- Distinctive: line 116
Do not produce a full health report — that is deep mode.
- Distinctive: line 117
Do not pass through the senior advisor — housekeeping is operational, not strategic.
- Distinctive: line 118
Do not commit changes — that is a different job.
- Very specific: line 119
Do not open structural proposals — note them in state.md for the next deep mode.
- Distinctive: line 120
Do not escalate to the principal if all checks pass.
≈ “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.
Files
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
| Mode | Frequency | Cost | Output | Senior advisor? |
| Light (Stop hook) | Every session | ~0.5 min | Append jsonl | No |
| Housekeeping | Daily / on-demand | ~3 min | Triage table | No |
| Deep (weekly pass) | Weekly | ~15 min | Health Report + proposals | Yes |
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.shOutput: count of scratchpads removed + state files reset.
2. State drift check
bash control-plane/scripts/state-drift-check.shOutput: agents with stale state.md mtime but recent activity in commits / agent-calls.
3. Git status
git status --short
git log --oneline -5Flag 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.shLists 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: NSilence 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.mdfor the next deep mode. - Do not escalate to the principal if all checks pass.
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.

