ReMe/reme-plugin/plugins/reme-expert/commands/reme-clean.md
huangsen ad6368fdf0
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
```
feat: add Claude Code marketplace plugin with service and expert tiers

Add comprehensive Claude Code marketplace plugin supporting two paradigms
for managing markdown vaults:

- reme-service: Service-tier plugin with high-level MCP tools
  (retrieve/remember/maintain) where reme2 internals handle R-M-W loop
- reme-expert: Expert-tier plugin where Claude Code agent runs R-M-W loop
  directly using raw memory_* primitives guided by reme protocol skill

Both plugins implement identical 4-phase work paradigm:
- Recall: Retrieve relevant context with ranking by relevance/proximity
- Log: Record event facts and raw materials via idempotent event-folder upsert
- Distill: Promote events to topic graph via R-M-W loop
- Maintain: Vault hygiene sweep with lint and decay operations

Include marketplace configuration, documentation, MCP server setup,
subagents (reme-distiller, reme-curator), hooks (PreCompact, SessionEnd,
Stop), and slash commands (/reme-distill, /reme-recall, /reme-clean).

Remove outdated plugin entries from gitignore.
```
2026-05-11 10:58:40 +08:00

1.4 KiB


description: Vault hygiene sweep — finds broken wikilinks, schema violations, stem collisions, stale events; proposes / applies fixes via the reme-curator subagent. argument-hint: [target_prefix] [dry_run=true|false]

Spawn the reme-curator subagent for a vault hygiene sweep. The subagent runs in its own context window and returns a short audit; the main session stays focused.

Default behavior is dry_run=true — report the proposed plan first. Only re-run with dry_run=false after the user confirms the plan looks right.

Use the Agent tool with subagent_type: reme-curator and the following prompt:

Vault hygiene sweep.

Args: $ARGUMENTS

Defaults if not specified in args:
  - target_prefix: "" (whole vault)
  - dry_run: true
  - ops: ["lint", "decay"]

Steps:
1. memory_lint to enumerate broken wikilinks, schema violations, stem collisions.
2. memory_list filtered by status=active + old `created` for decay candidates.
3. Propose a fix plan grouped by op (rename / archive / property fix / dangling).
4. If dry_run=false, apply the plan via memory_rename / memory_archive / memory_property_update.
5. Return: scanned N files, found K issues across [categories], applied L fixes (or "dry_run — no changes").

After the subagent returns, surface its audit to the user verbatim. If the plan looks right, suggest re-invoking with dry_run=false.