feat: add keyword maintenance skill
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
# Cleanup Policy
|
||||
|
||||
## Purpose
|
||||
|
||||
This reference defines how `reader-keyword-maintenance` should treat keyword governance artifacts.
|
||||
|
||||
The goal is to keep long-term assets small and stable while allowing review-time working files to exist when needed.
|
||||
|
||||
This policy is for low-frequency maintenance only.
|
||||
It does not replace the formal keyword review generation flow in reader.
|
||||
|
||||
## Artifact classes
|
||||
|
||||
### Long-term assets
|
||||
|
||||
Keep these by default:
|
||||
|
||||
- `data/term_index/daily/*.json`
|
||||
- `data/term_index/term_stats.json`
|
||||
- `configs/filter_context.personal.json`
|
||||
- `configs/term_watchlist.json`
|
||||
- `configs/term_aliases.json`
|
||||
- `configs/term_stopwords.json`
|
||||
- `configs/term_change_log.json`
|
||||
|
||||
These are facts or active state.
|
||||
|
||||
### Short-term decision artifacts
|
||||
|
||||
Keep selectively:
|
||||
|
||||
- `outputs/term_index/review/term-cleanup-suggestions-YYYY-MM-DD.json`
|
||||
|
||||
Recommended policy:
|
||||
|
||||
- keep only recent few files, or
|
||||
- keep only files that were actually used for apply decisions
|
||||
|
||||
### Temporary working/display files
|
||||
|
||||
Treat as disposable unless the user explicitly asks to archive them:
|
||||
|
||||
- `outputs/term_index/review/keyword-cleanup-bundle.json`
|
||||
- `outputs/term_index/review/term-cleanup-suggestions-YYYY-MM-DD.md`
|
||||
|
||||
Recommended policy:
|
||||
|
||||
- bundle: keep only latest current file
|
||||
- markdown: generate on demand, do not archive by default
|
||||
|
||||
## Default maintenance actions
|
||||
|
||||
### Safe checks
|
||||
|
||||
Before deleting anything:
|
||||
|
||||
1. confirm the target is not the current bundle under active review
|
||||
2. confirm the target suggestions JSON is not the one about to be applied
|
||||
3. never delete configs or facts during review cleanup
|
||||
|
||||
### Safe cleanup order
|
||||
|
||||
1. remove or overwrite old markdown display drafts
|
||||
2. keep only latest bundle file
|
||||
3. prune old suggestions JSON files conservatively
|
||||
|
||||
## Decision rules
|
||||
|
||||
### When user says "clean review artifacts"
|
||||
|
||||
Default action:
|
||||
|
||||
- keep facts/state untouched
|
||||
- keep current suggestions JSON
|
||||
- remove markdown drafts if they are old and clearly derived display files
|
||||
- keep bundle only as current working file
|
||||
|
||||
### When user says "prepare manual review"
|
||||
|
||||
Default action:
|
||||
|
||||
- ensure latest bundle exists
|
||||
- ensure latest suggestions JSON exists
|
||||
- do not generate formal suggestions or markdown here by default
|
||||
- if the user wants formal review material, route to reader-side `keyword-cleanup-review`
|
||||
|
||||
### When user says "review alias candidates" or "review stopword candidates"
|
||||
|
||||
Default action:
|
||||
|
||||
- explain that formal keyword review generation belongs to reader-side `keyword-cleanup-review`
|
||||
- keep this skill focused on maintenance, cleanup, display generation, and dry-run validation
|
||||
- only proceed here if the user explicitly wants a low-frequency maintenance view rather than the formal review flow
|
||||
|
||||
### When user says "what can be deleted"
|
||||
|
||||
Explain in three buckets:
|
||||
|
||||
- must keep
|
||||
- can keep temporarily
|
||||
- safe to regenerate/delete
|
||||
|
||||
## Non-goals
|
||||
|
||||
This policy does not change reader production logic.
|
||||
It only governs low-frequency maintenance and cleanup decisions in OpenClaw.
|
||||
Reference in New Issue
Block a user