My-Brain-Is-Full-Crew defrag
git clone https://github.com/gnekt/My-Brain-Is-Full-Crew
T=$(mktemp -d) && git clone --depth=1 https://github.com/gnekt/My-Brain-Is-Full-Crew "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/defrag" ~/.claude/skills/gnekt-my-brain-is-full-crew-defrag && rm -rf "$T"
skills/defrag/SKILL.mdWeekly Vault Defragmentation
You are executing the Architect's weekly vault defragmentation workflow. This is a structural operation — not a quality audit (that is the Librarian's job). You scan the vault's organizational skeleton, fix structural gaps, evolve the layout, and produce a comprehensive report.
Golden Rule: Language
Always respond to the user in their language. Match the language the user writes in. This skill file is written in English for universality, but your output adapts to the user.
Post-it Protocol
At the START of execution
Read
Meta/states/architect.md (if it exists). If it contains an active defrag flow, resume from the recorded phase — do NOT restart from Phase 1.
At the END of execution
Write (or overwrite)
Meta/states/architect.md with:
--- agent: architect last-run: "{{ISO timestamp}}" --- ## Post-it ### Last operation: defrag ### Summary: {{brief summary of what was done}} ### Issues detected: {{any issues that need follow-up, with suggested agents}}
Max 30 lines in the Post-it body. If you need more, summarize.
The 5-Phase Defragmentation Workflow
When the user triggers a defrag, execute all 5 phases in order.
Phase 1: Structural Audit
-
Scan all files in
— anything older than 48 hours that is still in Inbox is a failure. Signal the Sorter via00-Inbox/
to triage it, or file it yourself if the destination is obvious.### Suggested next agent -
Scan
— for each area:02-Areas/- Does it have an
? If not, create it._index.md - Does it have a corresponding MOC in
? If not, create it.MOC/ - Are the sub-folders still relevant? Are there new clusters of notes that warrant a new sub-folder?
- Are there notes that clearly belong to a different area? Move them.
- Does it have an
-
Scan
— are there completed projects that should be archived to01-Projects/
?04-Archive/ -
Scan
— are there resources that now belong to a specific area? Move them.03-Resources/ -
Scan
— is the Master Index up to date? Are all area MOCs linked? Are there MOCs with no corresponding area (orphan MOCs)?MOC/ -
Scan
— are there templates that are never used? Are there note types that lack a template?Templates/
Phase 2: Tag Hygiene
- Scan all notes for tags not listed in
— either add them to the taxonomy or fix them.Meta/tag-taxonomy.md - Look for tag synonyms (e.g.,
and#ml
) — consolidate.#machine-learning - Ensure hierarchical tags are consistent (all area tags use
prefix).#area/
Phase 3: MOC Refresh
- For each MOC, verify that it actually links to the notes it should.
- Add links to new notes that were created since the last defrag.
- Remove links to notes that were archived or deleted.
- Verify that the Master Index (
) links to every area MOC.MOC/Index.md
Phase 4: Structure Evolution
- Check
— has the user's situation changed? New jobs, new interests, new goals mentioned in recent notes?Meta/user-profile.md - If you notice a cluster of 3+ notes on a topic that has no dedicated area or sub-folder, create the structure proactively using the Area Scaffolding Procedure (see below).
- Update
with all changes.Meta/vault-structure.md
Phase 5: Report
Create a defragmentation report at
Meta/health-reports/YYYY-MM-DD — Defrag Report.md:
--- type: report date: "{{today}}" tags: [report, defrag, maintenance] --- # Vault Defragmentation Report — {{date}} ## Summary - Files moved: {{count}} - Structures created: {{list}} - Tags fixed: {{count}} - MOCs updated: {{list}} - Inbox items triaged: {{count}} - Projects archived: {{list}} ## Structural Changes {{Detailed list of what was created, moved, renamed, or archived}} ## Recommendations {{Suggestions for the user — new areas to consider, templates to create, etc.}} ## Next Defrag {{Anything to watch for next week}}
Log the defrag in
Meta/agent-log.md.
Area Scaffolding Procedure (Summary)
When Phase 4 detects a new area or sub-area is needed, follow these 7 steps:
- Create the folder structure — create the area folder under
with appropriate sub-folders.02-Areas/ - Create the area index note — every area folder gets an
with purpose, active projects, sub-areas, key resources, and a link to its MOC._index.md - Create the area MOC — create
with overview, structure, key notes, active projects, and a link back to the Master Index.MOC/{{Area Name}}.md - Update the Master MOC — add a link to the new area MOC in
.MOC/Index.md - Create area-specific templates — if the area needs specialized templates (e.g., Finance needs Budget Entry), create them in
.Templates/ - Update
— document the new area, its sub-folders, and its purpose.Meta/vault-structure.md - Update
— add area-specific tags (e.g.,Meta/tag-taxonomy.md
,#area/finance
).#budget
For the full detailed procedure with templates and examples, see the Architect agent (
agents/architect.md, Section 4).
Inter-Agent Coordination
After completing the defrag, analyze your findings and suggest follow-up agents when appropriate. Include a
### Suggested next agent section at the end of your output for each applicable case:
- Sorter — when Inbox has items older than 48 hours, or when notes in
should be moved to a newly created area.03-Resources/ - Connector — when new MOCs were created that need linking, or when orphan notes (no links) were found.
- Librarian — when structural inconsistencies were found that need a full quality audit (broken links, duplicates).
Output format for suggestions
### Suggested next agent - **Agent**: sorter - **Reason**: {{why this agent should run next}} - **Context**: {{specific details about what needs attention}}
When to suggest a new agent
If during defrag you detect a recurring need that no existing agent covers, include:
### Suggested new agent - **Need**: {{what capability is missing}} - **Reason**: {{why no existing agent can handle this}} - **Suggested role**: {{brief description of what the new agent would do}}
Output Format
Always structure your response as follows:
- Announce the defrag is starting (in the user's language)
- Execute each phase, reporting findings as you go
- Generate the report file at
Meta/health-reports/ - Update your post-it at
Meta/states/architect.md - Log the operation in
Meta/agent-log.md - Summarize results to the user with key metrics (files moved, structures created, tags fixed, MOCs updated)
- Suggest next agents if applicable