Back
45/65
Lesson 45
4 min
AADC: Diagram Corrector
Align ragged right borders in ASCII diagrams
Ready to level up?
Mark complete to track your learning progress.
Align ragged right borders in ASCII diagrams
Mark complete to track your learning progress.
Fix the ragged right borders that AI agents (and your own edits) leave in ASCII diagrams.
AADC (ASCII Art Diagram Corrector) automatically fixes misaligned right borders in ASCII diagrams by adding padding, never deleting content. It handles ASCII boxes (+ - |) and Unicode box-drawing characters alike.
When agents write boxed diagrams, or you edit the text inside a box, the closing borders drift out of line. AADC finds diagram blocks on its own (no markers needed) and pads each line so its right border lands in the same column. A line that opens with a border but lost its closing one gets the border back.
Pads right borders into line
Finds ASCII and Unicode boxes
See before/after diff
Pipe from and to the clipboard
Fix a diagram from a file or stdin.
# Fix a diagram file (result goes to stdout)aadc diagram.txt# Pipe from clipboardpbpaste | aadc# Fix and copy resultaadc diagram.txt | pbcopy# Show what changedaadc --diff diagram.txt
--diff to see exactly what AADC changed before accepting the output.AADC pads short lines until every right border lines up.
# Before (ragged right border):+------------------+| Short|| Much longer text || Medium|+------------------+# After (aadc diagram.txt):+------------------+| Short || Much longer text || Medium |+------------------+
Post-process agent diagram output
Clean diagrams before including in prompts
Fix diagrams in archived conversations
Clean architecture diagrams in memory files