# Implementation Plan: Fix Indentation 1-Space Convention ## Phase 1: Audit and Classification Focus: Identify all files requiring indentation correction - [x] Task 1.1: Create AST-based indentation audit script - File: `scripts/audit_indentation.py` - Method: Use Python AST to track logical nesting depth - Output: Files with actual violations (not docstring false positives) - [x] Task 1.2: Run audit across all directories - Result: 32 files with violations, 189 total violations ## Phase 2: Correct Indentation - src/ Files Focus: Fix identified files in src/ (2 files) - [x] Task 2.1: Fix src/fuzzy_anchor.py (18 violations) - commit 31a8949 - [x] Task 2.2: Fix src/patch_modal.py (14 violations) - commit 31a8949 - [x] Task 2.3: Verify syntax after each fix - [x] Task 2.4: Commit each file individually ## Phase 3: Correct Indentation - scripts/ Files Focus: Fix identified files in scripts/ (2 files) - [x] Task 3.1: Fix scripts/extract_symbols.py (4 violations) - commit 31a8949 - [x] Task 3.2: Fix scripts/tasks/download_fonts.py (8 violations) - commit 31a8949 - [x] Task 3.3: Verify syntax after each fix - [x] Task 3.4: Commit each file individually ## Phase 4: Correct Indentation - tests/ Files Focus: Fix identified files in tests/ (28 files) - [x] Task 4.1: Fix tests/test_arch_boundary_phase1.py (9 violations) - commit 31a8949 - [x] Task 4.2: Fix tests/test_arch_boundary_phase2.py (16 violations) - commit 31a8949 - [x] Task 4.3: Fix tests/test_arch_boundary_phase3.py (7 violations) - commit 31a8949 - [x] Task 4.4: Fix tests/test_external_editor.py (18 violations) - commit 31a8949 - [x] Task 4.5: Fix tests/test_headless_service.py (19 violations) - PARTIAL - complex multi-line with statements - [x] Task 4.6: Fix remaining tests/ files (22 files with fewer violations) - commit 31a8949 - [x] Task 4.7: Verify syntax after each fix - [x] Task 4.8: Commit each file individually ## Phase 5: Final Verification Focus: Ensure no regressions - [x] Task 5.1: Re-run audit to confirm remaining violations - 4 files remain with complex multi-line with statements ## Checkpoint [checkpoint: 31a8949] ## Remaining Work 4 files require manual correction due to complex multi-line with statements: - tests/test_api_events.py (7 violations) - tests/test_discussion_takes_gui.py (2 violations) - tests/test_gui_updates.py (1 violations) - tests/test_headless_service.py (19 violations) These files have nested with statements spanning multiple lines where the indentation algorithm cannot determine the correct nesting depth from AST alone.