Refactor
Plan vault restructuring from config changes.
Install
npx skills add agenticnotetaking/arscontexta --skill refactor -g -a claude-code -y- Repository
- agenticnotetaking/arscontexta3.5k
- Category
- Engineering
- Updated
- 8mo ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Plan vault restructuring from config changes. Compares config.yaml against derivation.md, identifies dimension shifts, shows restructuring plan, executes on approval. Triggers on "/refactor", "restructure vault".
Runtime Configuration (Step 0, before any processing)
Read these files to configure domain-specific behavior:
-
ops/derivation-manifest.md, vocabulary mapping, dimension positions, platform hints- Use
vocabulary.notesfor the notes folder name - Use
vocabulary.note/vocabulary.note_pluralfor note type references - Use
vocabulary.topic_map/vocabulary.topic_map_pluralfor MOC references - Use
vocabulary.inboxfor the inbox folder name
- Use
-
ops/config.yaml, current live configuration (the "after" state) -
ops/derivation.md, original derivation record (the "before" state)
If these files don't exist, report error: "Cannot refactor without both ops/config.yaml and ops/derivation.md. These files establish the baseline and current configuration."
EXECUTE NOW
INVARIANT: /refactor never executes without approval. The plan is always shown first.
Target: $ARGUMENTS
Parse immediately:
- If target is empty: detect ALL config changes and plan restructuring
- If target names a specific dimension (e.g., "granularity", "organization"): focus on that dimension only
- If target is
--dry-run: show plan without asking for approval
Execute these phases:
- Detect changes between config.yaml and derivation.md
- Plan restructuring for each changed dimension
- Show the plan with affected artifacts and risk assessment
- Execute on approval (unless --dry-run)
- Validate post-restructuring
START NOW. Reference below defines the workflow.
Philosophy
Configuration changes cascade.
Changing a dimension is not just editing a value in config.yaml. Each dimension affects multiple artifacts, skills, templates, context file sections, hooks, MOC structure. Changing organization from "flat" to "hierarchical" means restructuring the notes directory, updating MOC templates, adjusting navigation references in the context file, and regenerating skills that reference folder structure.
