C31-compound-refresh
Skill1 starsChanged 3 months agoMITView on GitHub
compound refresh, 清理知识库 | 双周维护:扫描memory/和skills/,去重、标记残留、输出健康报告
In this repository56 other files it gives its agents.
- C31-1stSkill
- C31-adopt-projectSkill
- C31-brainstormSkill
- C31-coding-disciplineSkill
- C31-compoundSkill
- C31-context-engineeringSkill
- C31-curatorSkill
- c31-daily-intelSkill
- C31-debugSkill
- c31-devSkill
- C31-grillSkill
- C31-lfgSkill
- C31-planSkill
- C31-researchSkill
- C31-specSkill
- C31-stormSkill
- C31-strategySkill
- C31-workflow-bug-reproductionSkill
- C31-workSkill
- rl-workflowSkill
- C31-cvideoSkill
- c31-loopSkill
- c31-sxsSkill
- teachSkill
- video-content-analysisSkill
- agent-reachSkill
- kimiimSkill
- skillhub-preferenceSkill
- c31-communitySkill
- c31-growSkill
- c31-gutcheckSkill
- c31-marketSkill
- c31-mvpSkill
- c31-priceSkill
- c31-processSkill
- c31-sellSkill
- c31-validateSkill
- c31-valuesSkill
- growth-hackerSkill
- c31-improve-codebase-architectureSkill
- C31-multi-reviewSkill
- C31-review-adversarialSkill
- C31-review-architectureSkill
- C31-review-securitySkill
- C31-reviewSkill
- c31-wizardSkill
- external-privacy-guardSkill
- find-skillsSkill
- gsd-map-codebaseSkill
- gsd-new-projectSkill
- gsd-progressSkill
- gsd-quickSkill
- gsd-shipSkill
- humanize-aiSkill
- time-awarenessSkill
- worker-safetySkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 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.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Never delete — only redirect
- Distinctive: line 55
Do not auto-fix — user decides whether skill is obsolete or path changed
- Very specific: line 74
If residual exists → status becomes PENDING regardless of mark.
- Very specific: line 89
Keep the one with higher compound_score
- Very specific: line 98
Read memory/.planning/evolution/signals/*.jsonl from the last 14 days
- Distinctive: line 106
If confidence ≥ 0.7 and needs_evolution = true:
- Very specific: line 109
Write assessment report to report.md
- Distinctive: line 112
Test Gate: is Markdown format valid and frontmatter complete?
- Distinctive: line 117
If no skill reaches confidence ≥ 0.7 → zone is silent.
- Distinctive: line 118
If one does → candidates/ directory + report
- Very specific: line 127
Read .planning/STATE.md — cross-check against memory/.planning/todos/residual-*.md
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Multilingual Triggers
| Language | Trigger phrases |
| EN | compound refresh, 清理知识库, 双周维护 |
| ZH | 更新知识库, 刷新文档 |
| JA | ドキュメント更新, 知識更新 |
Output language: Respond automatically in the user's conversation language.
C31-compound-refresh — Bi-weekly Knowledge Base Maintenance + Evolution Assessment
Headless health check for the C31 knowledge base. Runs automatically or on-demand to keep memory/ and skills/ fresh, and evaluates whether any skill needs evolution.
Trigger
- Headless: Cron — every 2 weeks, day 9 and 23, 02:00 Asia/Tokyo
- Manual: User says "compound refresh" / "清理知识库" / "双周维护"
What It Does
Scans five zones and emits a single report. No user interaction unless threshold breached.
Zone A: memory/solutions/
Stale signals:
- Confidence decay — compound_score ≥ 5 but last referenced > 90 days ago
- Obsolescence — solution references code paths, APIs, or files that no longer exist
Action: Mark status: review in frontmatter. If confirmed obsolete, redirect to newer solution or archive.
Zone B: memory/YYYY-MM-DD.md
Stale signal: File age > 90 days.
Action:
- Extract long-term value (decisions, solutions, patterns)
- Migrate worthy fragments to
memory/solutions/ormemory/moc/ - Mark file
status: archivedin a one-line header - Never delete — only redirect
Zone C: skills/*/SKILL.md
Stale signal: References files or paths that no longer exist (broken links).
Action:
- List broken references with skill name and missing path
- Do not auto-fix — user decides whether skill is obsolete or path changed
Zone D: .planning/STATE.md
Stale signals:
- Phantom DONE — task marked DONE but residual file exists in
memory/.planning/todos/residual-*.md - Ghost task — task exists but no parent plan file found
Action:
- Phantom DONE → downgrade status to
PENDING, link to residual file - Ghost task → flag for user review
DONE Criteria (Hard Rule)
A task is genuinely DONE only if ALL true:
- Status explicitly marked DONE
- Has commit hash, file path, or merge proof
- No open residual in
memory/.planning/todos/residual-*.md
If residual exists → status becomes PENDING regardless of mark.
Residual Handling
- Discovery → Write to
memory/.planning/todos/residual-YYYYMMDD.mdwith source link - Aging → If residual untouched for > 30 days:
- Upgrade to user-visible alert
- Include in report under
⚠️ CRITICAL: Unresolved residuals
- Resolution → When residual addressed, append
(resolved: YYYY-MM-DD)to file
Duplicate Knowledge Merge
Detection: Two solutions describe the same problem/symptom pair.
Resolution:
- Keep the one with higher
compound_score - Mark the other
status: deprecatedwith redirect link - Preserve both titles for searchability
Zone E: memory/.planning/evolution/signals/ — Evolution Signal Aggregation and Assessment
Goal: Aggregate the evolution signals captured daily by C31 Dream into a bi-weekly evolution assessment report.
Steps:
- Read
memory/.planning/evolution/signals/*.jsonlfrom the last 14 days - Group and count by skill:
- How many ≥P1 signals each skill received
- Signal type distribution (user_correction / repetition / tool_failure)
- Top 3 skills by signal frequency
- LLM-as-judge evaluation: For the skills with the most signals, read the current SKILL.md and assess improvement potential
- Input: skill content + accumulated signal summary
- Output:
{ "needs_evolution": true/false, "confidence": 0-1, "reasoning": "why it should/shouldn't change" }
- If confidence ≥ 0.7 and needs_evolution = true:
- Generate 1 improvement candidate (diff format, not a full rewrite)
- Write to
memory/.planning/evolution/candidates/YYYY-MM-DD-{skill-name}/diff.md - Write assessment report to
report.md
- Constraint gate pre-check (three gates):
- Size Gate: does the candidate diff increase file size by < 20%?
- Test Gate: is Markdown format valid and frontmatter complete?
- Cache Gate: does it avoid touching core sections of AGENTS.md?
- Any gate failure → do not generate candidate; record reason only
Output:
- If no skill reaches confidence ≥ 0.7 → zone is silent; no files written
- If one does → candidates/ directory + report
Execution Flow
Phase 1: Scan (Silent)
- List all
memory/solutions/*.md— checkcompound_scoreandlast_referenced - List
memory/20*.mdfiles — check age grepallskills/*/SKILL.mdfor repo-relative path references — verify existence- Read
.planning/STATE.md— cross-check againstmemory/.planning/todos/residual-*.md - Read
memory/.planning/evolution/signals/*.jsonl— aggregate signals from last 14 days
Phase 2: Classify
Build three buckets:
| Bucket | Action Required |
clean | Nothing |
review | Flagged for attention, not urgent |
critical | ≥3 issues OR any phantom DONE with >30d residual |
Phase 3: Write Report
Path: memory/.planning/reports/compound-refresh-YYYY-MM-DD.md
Template:
---
report: compound-refresh
date: YYYY-MM-DD
status: clean | review | critical
issues_found: N
evolution_candidates: N
candidates_path: memory/.planning/evolution/candidates/YYYY-MM-DD-{skill}/
---
## Summary
One-line health score + evolution status.
## Zone A: Solutions (N flagged)
| File | Score | Signal | Action |
## Zone B: Daily Notes (N aged)
| File | Age | Long-term value | Action |
## Zone C: Skills (N broken links)
| Skill | Broken ref | Suggested fix |
## Zone D: Planning (N phantom DONE)
| Task | Status | Residual file | Action |
## Zone E: Evolution Signals (N signals, N candidates)
| Skill | Signal count | Confidence | Candidate | Action |
|-------|-------------|------------|-----------|--------|
| skill-name | 5 | 0.85 | ✅ diff.md | Awaiting user confirmation |
## Residuals (N open, N aged >30d)
| File | Age | Urgency |
## Duplicate Detection (N pairs)
| Kept | Merged into | Deprecated |Phase 4: Notify (Conditional)
| Status | Action |
clean | Silent. Log only. |
review | Silent. User discovers report on demand. |
critical | Announce to user: "Bi-weekly knowledge base scan found N items requiring attention: path/to/report" |
| evolution candidate | Outer Loop push: "🌙 Bi-weekly evolution suggestion: skill {name} detected 5 correction signals, confidence 0.85. Candidate diff generated — awaiting confirm." |
Critical threshold: ≥3 total issues, OR any phantom DONE with residual aged >30 days.
Evolution threshold: ≥1 candidate with confidence ≥ 0.7.
Headless Cron Config
{
"schedule": "0 2 9,23 * *",
"timezone": "Asia/Tokyo",
"delivery": {
"mode": "announce",
"to": "user",
"condition": "status == 'critical' OR evolution_candidates > 0"
}
}Rules
- Never delete — only mark, redirect, or archive
- Never auto-fix skills — broken links are user decisions
- Residuals are debt — 30-day aging makes them visible
- Report is the artifact — everything else is side effect
- Under threshold = silent — do not nag user for minor drift
- Evolution candidates = waiting — do not auto-merge; auto-discard if not confirmed within 48h
- Size Gate first — candidate diff exceeding 20% size increase is rejected immediately
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.

