Analysis Date: November 1, 2025 Purpose: Map all file dependencies to identify unused files and cleanup opportunities Status: ✅ COMPLETE
Update (v2.1.0): Analyzer now supports CLI options, default excludes, and a "full" mode for large Mermaid/DOT outputs. See enhancements and usage below.
The comprehensive dependency analysis has been completed successfully!
- Latest run (with default excludes and full output):
- root: 1,503 files
- docs: 163 files
- scripts: 62 files
- workflows: 59 files
- tools: 2 files
- templates: 4 files
- examples: 16 files
- tests: 13 files
- Potentially Unused Files (current): 320
- Note: Category totals are listed individually; the root category overlaps with subfolders.
All analysis outputs are located in the dependency-analysis/ directory:
- dependencies.txt - ASCII art dependency graph
- dependencies.dot - Graphviz DOT format (can generate PNG with:
dot -Tpng dependencies.dot -o dependencies.png) - dependencies.mermaid.md - Mermaid.js graph for GitHub rendering
- dependencies.html - Interactive HTML report (open in browser)
- dependencies.json - Raw JSON data for programmatic analysis
- analysis.log - Complete progress log
- Added CLI with options:
--rootto select the analysis root--excludeto skip noisy directories (default:.git,node_modules,.venv)--fullto remove Mermaid node/edge limits (enables very large graphs)--mermaid-max-files,--mermaid-max-edgesto tune Mermaid output size--log-levelto adjust verbosity- Fixed HTML generation robustness and improved logging.
- Explanation of size differences:
- Mermaid intentionally defaults to conservative limits for readability and
performance; JSON/DOT/ASCII are exhaustive. Use
--fullto lift limits.
From the repository root (uses the repo’s virtualenv):
- Full graph with default excludes:
/Users/jdfalk/repos/github.com/falkcorp/github-common/.venv/bin/python analyze-dependencies.py --root . --exclude .git,node_modules,.venv --full- Tuned Mermaid limits (example):
/Users/jdfalk/repos/github.com/falkcorp/github-common/.venv/bin/python analyze-dependencies.py --root . --mermaid-max-files 500 --mermaid-max-edges 5000
- ✅ Scanned root directory
- ✅ Found 1,495 files (including .venv)
- ✅ Tracked references
- ✅ Scanned docs/ directory
- ✅ Found 163 documentation files
- ✅ Mapped cross-references
- ✅ Scanned scripts/ directory
- ✅ Found 61 script files
- ✅ Mapped script dependencies
- ✅ Scanned .github/workflows/
- ✅ Found 53 workflow files
- ✅ Mapped reusable workflow calls
- ✅ tools/ - 2 files
- ✅ templates/ - 4 files
- ✅ examples/ - 16 files
- ✅ tests/ - 13 files
Based on the orphan analysis, the following categories likely contain unused files:
-
Virtual Environment (.venv/) - Majority of orphans
- Action: Exclude .venv/ from repository (add to .gitignore)
- Impact: Removes ~1,200 files
-
Old Documentation Artifacts
- Cross-registry-todos with many parts
- Refactor documents that may be outdated
- Action: Review and archive or remove
-
Duplicate/Legacy Scripts
- Multiple versions of similar scripts
- Action: Consolidate and remove duplicates
-
Workflow Templates
- Some example files may not be actively used
- Action: Audit which are referenced in documentation
-
Test Files
- Verify all test files are run by CI
- Action: Review test coverage
-
Configuration Files
- Multiple linter configs at root
- Action: Consolidate where possible
- Core Workflows (.github/workflows/)
- Active Scripts (scripts/ with dependencies)
- Main Documentation (README.md, CONTRIBUTING.md, etc.)
- Templates (templates/workflows/)
Total: 1,495 files (mostly from .venv/)
Key Active Files:
- README.md - Main documentation
- package.json - Node dependencies
- requirements.txt - Python dependencies
- Various config files (.golangci.yml, .pylintrc, etc.)