Skip to content

CLAUDE.MD Updated - fix-links Integrated ✅

Changes Made

Updated the update docs command in CLAUDE.MD to automatically run the fix-links tool.

Old Workflow:

update docs:
- run: yarn docs:build
- read vitepress.build.txt
- manually repair each broken link
- manually update .vitepress/config.mts

New Workflow:

update docs:
- run: yarn docs:build
- compile and run fix-links tool:
  - cd notes/tools && npx tsc && cd ../..
  - node notes/tools/dist/fix-links.js
  - if exit code is not 0, report error and stop
- report summary of fixes (fixed, deleted, unfixable)

What This Means

When you type update docs, Claude will now:

  1. Build the docs - yarn docs:build (creates vitepress.build.txt)
  2. Compile TypeScript - Compiles the fix-links tool to JavaScript
  3. Fix broken links automatically - Runs the tool to:
    • Find moved files
    • Update all references (markdown + config)
    • Delete links to non-existent files
  4. Report results - Shows summary: fixed, deleted, unfixable

Benefits

  • Fully automated - No manual link fixing needed
  • Comprehensive - Handles markdown files AND VitePress config
  • Safe - Uses TypeScript with proper error handling
  • Informative - Clear summary of what was done
  • Tested - All tests passing

Phase 1 Status: COMPLETE 🎉

All tasks in Phase 1 are now complete:

  • [x] Tool implementation
  • [x] Testing
  • [x] CLAUDE.MD integration

Next Steps

Ready for:

  1. Real-world testing - Try update docs on actual documentation
  2. Phase 2 - Begin implementing merge-files.ts
  3. Phase 3 - Final integration & documentation

The fix-links tool is now part of your workflow!