AI JOB 1: Cleanup & Internal Linking
Your Role
You are cleaning up a large Theophysics research vault so it can be published as a Quartz website. Your job: fix filenames, remove junk, ensure wikilinks work, add missing frontmatter.
Source Directory
O:\_Theophysics_v3\04_THEOPYHISCS\
Tasks (in order)
1. Rename “Untitled” Files
Scan recursively for any file named Untitled.md, Untitled 1.md, etc. Read each one, determine what it’s about, rename it to something descriptive using kebab-case. Log every rename.
Get-ChildItem -Path "O:\_Theophysics_v3\04_THEOPYHISCS" -Recurse -Filter "Untitled*.md" | Select-Object FullName2. Add Missing Frontmatter
Every .md file needs YAML frontmatter at minimum:
## Ring 2 — Canonical Grounding
- [[00_Canonical/MASTER_EQUATION_10_LAWS/Law_02_MassEnergy_Meaning/a magnetic field can never do work on a particle.md|a magnetic field can never do work on a particle]]
## Ring 3 — Framework Connections
- [[00_Canonical/MASTER_EQUATION_10_LAWS/TEN_LAWS_CANONICAL_EQUATIONS|Ten Laws — Canonical Equations]]
- [[00_Canonical/MASTER_EQUATION_10_LAWS/INDEX|Master Equation Index]]
---
title: "Descriptive Title"
tags: []
---Scan for files missing --- at line 1. Add frontmatter based on content. Assign tags from this controlled list:
Primary tags: axiom, theorem, hypothesis, law, proof, master-equation, consciousness, trinity, grace, entropy, decoherence, free-will, observer, logos, genesis-to-quantum, falsification, cross-domain
Layer tags: layer-1-logic, layer-2-method, layer-3-metrics, layer-4-applications
3. Fix Broken Wikilinks
Quartz resolves wikilinks by filename. Scan for wikilinks that point to files that don’t exist. Common issues:
- Spaces vs. hyphens vs. underscores (Quartz uses shortest-path match)
- Missing file extensions
- Links to files that were renamed
For each broken link, either fix the link text or note it in a log file.
4. Remove Clipboard/Junk Files
Delete:
Clipboard Text.txt- Any
.urlfiles (browser shortcuts) - Empty files (0 bytes)
- Duplicate files with
1suffix that are identical to the original
5. Standardize the Spirits Directory
O:\_Theophysics_v3\04_THEOPYHISCS\Spirits\ has files named S0.md, SA.md, SD.md, SP.md with numbered sub-files. Read _INDEX.md and _MOC.md to understand the naming scheme. Ensure each file has proper frontmatter with a human-readable title, not just “S0_3”.
6. Output a Change Log
Create O:\_Theophysics_v3\04_THEOPYHISCS\_CLEANUP_LOG.md with:
- Files renamed (old → new)
- Files deleted
- Frontmatter added (count)
- Broken links found (with status: fixed or unresolvable)
- Total file count before and after
Rules
- NEVER delete content files. Only delete junk/empty/duplicate files.
- NEVER modify the actual prose content of any file.
- Preserve all existing frontmatter — only ADD missing fields.
- If unsure whether a file is junk, leave it and log it.
- Work directory by directory, not all at once.
Canonical Hub: CANONICAL_INDEX