housekeeping

A SoloFlow cleanup command for finding and resolving obsolete or malformed state in the .soloflow/ directory. It can also perform a dry run that only reports what it finds.

In plain words
What is it for?
Use it to scan SoloFlow state for cruft, preview detected problems with --dry-run, or carry out the documented cleanup procedure.
Why use it?
It removes workflow-state leftovers that can confuse later commands, such as orphaned plans, stale files, empty epics, or malformed queue entries.

Command

Part of the soloflow plugin — 3 skills, 22 commands, 17 agents, 5 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kesteva/soloflow/housekeeping
Clone the repo
git clone --depth 1 https://github.com/kesteva/soloflow

Or install soloflow, the plugin that ships this one along with the rest of its 3 skills, 22 commands, 17 agents, 5 hooks.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.00602
Opus 5 $0.00018 $0.00301
Sonnet 5 $0.00007 $0.00120
Haiku 4.5 $0.00004 $0.00060

Measured 3d ago against content hash 9cf7aa895f8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

housekeeping scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/housekeeping.md · 60 lines

What it actually says

/soloflow:housekeeping

Focused cruft sweep for .soloflow/ state. For the full review-queue triage (cruft + actions + visual + refinement), use /soloflow:review-queue.

$ARGUMENTS optionally includes one flag:

  • --dry-run — detect and print buckets only; no prompts, no writes.

If $ARGUMENTS is non-empty and not --dry-run, print usage and stop:

/soloflow:housekeeping [--dry-run]

Step 0 — Init

  1. If .soloflow/ does not exist, report: "SoloFlow not initialized. Run /soloflow:init first." and stop.
  2. Initialize cruft_resolved = 0.

Step 1 — Dry-run short-circuit

If $ARGUMENTS contains --dry-run:

  1. Run node "${CLAUDE_PLUGIN_ROOT}/scripts/state/cruft-detect.js".
  2. If total == 0, print "No cruft detected." and stop.
  3. Otherwise, for each non-empty bucket, print the scenario name, the count, and a one-line summary per item (e.g., TASK-NNN — <short reason>). No prompts, no commits, no writes.
  4. Stop.

Step 2 — Cleanup

Read docs/CRUFT-CLEANUP.md via the Read tool and follow its procedure to completion. Use housekeeping as the commit-message <command> label. The procedure updates the cruft_resolved counter initialized in Step 0.

Step 3 — Report

Print:

## Housekeeping — complete

Cruft resolved: {cruft_resolved}

If cruft_resolved == 0 and no cruft was detected, the one-line "No cruft detected." from Step 2 already stands; the final report can be a single line: Housekeeping — complete. Nothing to clean up.


Context Limit Self-Monitoring

This command runs in the main session. The context-monitor hook injects warnings when context usage is high.

When you receive a SOLOFLOW CONTEXT WARNING: finish the current per-item decision, then write a checkpoint.

When you receive a SOLOFLOW CONTEXT CRITICAL: finish the current decision, write a checkpoint, then use AskUserQuestion with options: Compact and continue / Save and exit.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 60 lines · 37 tokens per session scan A 9cf7aa895f8e

Subscribe to this mod's changes

housekeeping is a command published in the GitHub repository kesteva/soloflow (40 stars, last pushed 3mo ago), licensed MIT. It adds 37 tokens to every session and 602 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.