File Naming Audit - Remove Temporary/Versioned File Name Patterns

Resolved ๐Ÿ’ฌ 3 comments Opened Nov 13, 2025 by mrveiss Closed Jan 13, 2026

๐ŸŽฏ Objective

Audit the entire codebase for files using temporary or versioned naming patterns (_fix, _v2, _optimized, etc.) and rename them to permanent, descriptive names following the new File Naming Standards.

๐Ÿ“Š Current Policy (CLAUDE.md)

Forbidden patterns:

  • _fix, _fixed, _fix2
  • _v2, _v3, _version2
  • _optimized, _improved, _better
  • _new, _old, _legacy
  • _temp, _tmp, _backup
  • _copy, _draft
  • _updated, _revised, _refactored
  • Date-based suffixes: _20250113, _jan2025

Exception: Test files may use _unit_test.py, _integration_test.py (indicates test type, not version)

๐Ÿ” Audit Scope

Search for files with forbidden patterns across:

  • Python files (*.py)
  • TypeScript files (*.ts)
  • Vue files (*.vue)
  • Configuration files
  • Script files
  • Documentation files

Exclude:

  • venv/
  • node_modules/
  • archives/
  • reports/

โœ… Success Criteria

  • [ ] Complete file audit performed across entire codebase
  • [ ] All violations identified and documented
  • [ ] Renaming plan created with proper permanent names
  • [ ] All imports/references updated for each renamed file
  • [ ] Files renamed atomically with import updates
  • [ ] Old files removed from repository
  • [ ] Tests pass after all renames
  • [ ] No regressions introduced

๐Ÿš€ Implementation Process

Step 1: Audit

# Search for forbidden patterns
find . -type f \
  \( -name "*_fix*.py" -o -name "*_v2*.py" -o -name "*_optimized*.py" \
  -o -name "*_new*.py" -o -name "*_temp*.py" -o -name "*_backup*.py" \
  -o -name "*_copy*.py" \) \
  -not -path "*/venv/*" \
  -not -path "*/node_modules/*" \
  -not -path "*/archives/*" \
  -not -path "*/reports/*"

Step 2: Analyze Each File

For each file found:

  1. Understand its purpose
  2. Check if it's the canonical version or duplicate
  3. Determine proper permanent name
  4. Identify all files that import/reference it

Step 3: Rename Systematically

For each file:

  1. Choose permanent name (descriptive, follows conventions)
  2. Update all imports/references
  3. Rename file
  4. Test
  5. Commit atomically (rename + all updates together)

Step 4: Verify

  • Run full test suite
  • Check all imports work
  • Verify no broken references
  • Remove old/duplicate files

๐Ÿ“‹ Tracking Template

For each violation found:

**File**: `path/to/file_v2.py`
**Issue**: Uses forbidden `_v2` pattern
**Purpose**: [What the file does]
**Canonical**: [Is this the canonical version? Yes/No]
**New Name**: `path/to/proper_name.py`
**References**: [List of files that import this]
**Status**: [ ] Renamed, [ ] References updated, [ ] Tested

๐Ÿ“š References

  • CLAUDE.md - File Naming Standards (Mandatory)
  • Memory MCP: "File Naming Standards Policy 2025-11"
  • Related: #11568 (Configuration Consolidation)

๐Ÿท๏ธ Labels

refactor, code-quality, technical-debt, cleanup

โฑ๏ธ Estimate

1-2 weeks (depending on violations found)

๐Ÿ“Š Success Metrics

  • Files renamed: [TBD after audit]
  • Imports updated: [TBD after audit]
  • Tests passing: 100%
  • Violations remaining: 0

View original on GitHub โ†—

This issue has 3 comments on GitHub. Read the full discussion on GitHub โ†—