Commit Graph

21 Commits

Author SHA1 Message Date
d9457018fd feat: smart integration detection — auto-classify packages via built-in dictionary, PyPI lookup, and project module filtering
- New package_classifier.rs with 200+ known packages in 8 categories
- Python stdlib filter (~170 modules)
- PyPI API lookup with caching (--offline to skip)
- Project modules auto-filtered from Internal
- Zero config needed — works out of the box
2026-02-15 12:47:53 +03:00
b3eb591809 feat: smart integration detection with package classifier
- Add PackageClassifier with built-in dictionary (~200 popular packages)
- Hardcode Python 3.10+ stdlib list to filter out standard library imports
- Add PyPI API lookup for unknown packages (online mode, 3s timeout)
- Cache PyPI results in .wtismycode/cache/pypi.json
- Add --offline flag to skip PyPI lookups
- Classify packages into: HTTP, Database, Queue, Storage, AI/ML, Auth, Testing, Logging, Internal, Third-party
- User config integration_patterns override auto-detection
- Update renderer to show integrations grouped by category
- Update ARCHITECTURE.md template with new integration format
2026-02-15 12:45:56 +03:00
f4f8b8fa34 rename: archdoc → wtismycode (WTIsMyCode) 2026-02-15 12:12:33 +03:00
136697caf0 fix: prefer file docstring over __init__.py for module summary
For non-init files, use the file's own docstring first before
falling back to the parent __init__.py docstring.

Also skip dataclass-like classes (≤2 methods) from critical marking
to avoid false positives on simple data containers like ToolResult.
2026-02-15 11:36:49 +03:00
8e79e3950f feat: auto-detect project name from pyproject.toml or directory basename
On init, detect project name by:
1. Parsing pyproject.toml [project] name field
2. Falling back to directory basename
Replace <PROJECT_NAME> placeholder in ARCHITECTURE.md template.
2026-02-15 11:36:45 +03:00
a3ee003947 fix: all 4 archdoc issues — cycles, layout, integrations, usage examples
1. Module Cycles: properly format cycle paths as A → B → C → A
2. Repository layout: group by top-level directory with file counts
3. Integration detection: match patterns against import names (substring),
   add Storage and AI/ML categories to all templates and summary
4. Usage examples: extract __init__ required params for class constructors

Also fix golden test to use ends_with for module-prefixed symbol IDs.
2026-02-15 11:14:42 +03:00
c095560e13 feat: improve documentation quality with real data
- Extract file-level docstrings from Python files (module-level string expressions)
- Use __init__.py docstrings as module doc_summary
- Use file docstrings as file purpose in layout tables (instead of 'Source file')
- Populate module outbound_modules/inbound_modules from import edges (internal only)
- Make filename sanitization consistent (sanitize_for_link matches sanitize_filename)
- Clean up stale .md files from previous runs before generating
- Fill ARCHITECTURE.md template with real layout, modules index, and critical points
- Add file_docstring field to ParsedModule and file_purpose to FileDoc
2026-02-15 04:10:20 +03:00
25fdf400fa feat: use actual project data, real usage examples, dry-run/verbose flags, skip-unchanged optimization
- renderer: render_architecture_md accepts Config, uses project name and current date
- renderer: generate real Python usage examples from analyzed symbols
- writer: skip writing files when content unchanged (optimization)
- cli: add --dry-run flag to generate command (lists files without writing)
- cli: add verbose logging for file/module/symbol generation progress
2026-02-15 03:32:10 +03:00
df52f80999 docs: add CHANGELOG.md documenting all branch changes 2026-02-15 03:28:36 +03:00
73154e5865 docs: comprehensive README with badges, config reference, and command docs 2026-02-15 03:28:22 +03:00
d237650f47 test: add full pipeline integration tests
- Test config loading and validation on test-project
- Test scanning Python files from test-project
- Test cycle detection with known cyclic and acyclic graphs
- Test renderer output generation
- Test duration and file size parsing
2026-02-15 03:27:46 +03:00
40f87f4d61 feat: add config validation and dependency cycle detection
- Config::validate() checks project.root, language, scan.include,
  python.src_roots, caching.max_cache_age, and scan.max_file_size
- Add parse_duration() and parse_file_size() helper functions
- Implement DFS-based cycle detection in cycle_detector.rs
- Wire cycle detection into renderer critical points section
- Add comprehensive unit tests for all new functionality
2026-02-15 03:26:43 +03:00
9f823d2a2a refactor: decompose CLI into commands, fix clippy, improve error handling
- Decompose main.rs into commands/ modules (generate, init, check, stats)
- Fix sanitize_filename to use safe replacements
- Compute Python module paths from src_roots instead of file paths
- Add stats command, colored output, progress bar, and generation summary
- Resolve all clippy warnings (redundant closures, collapsible ifs, etc.)
- Replace last unwrap() with proper error handling
- Add target/ to .gitignore, remove target/ artifacts from git tracking
2026-02-15 03:23:01 +03:00
736909ac3d Add stats command, colored output, progress bar, and generation summary
- New 'archdoc stats' command showing project statistics without generating docs
  - Symbol breakdown by kind (class/function/method/async)
  - Top-10 by fan-in and fan-out
  - Detected integrations (HTTP/DB/Queue)
  - Basic cycle detection on module imports
- Colored terminal output using 'colored' crate
- Progress bar for file parsing using 'indicatif' crate
- Generation summary showing files/modules/symbols/edges/integrations
2026-02-15 02:57:35 +03:00
da527e6960 Improve Python analyzer: full AST traversal, signatures, docstrings, method detection 2026-02-15 02:55:29 +03:00
7ccc484ea8 Add workspace Cargo.toml for unified builds 2026-02-15 02:52:57 +03:00
f7e08aad0e feat(parser): реализован парсинг новых файлов
- Добавлена поддержка формата *.xyz, что расширило возможности анализа проектов.
- Реализована функция `parse_xyz` в файле [`archdoc-core/src/parser.rs`](archdoc-core/src/parser.rs:42) для чтения и валидации содержимого.
- Обновлены тесты в [`archdoc-core/tests/parser_tests.rs`](archdoc-core/tests/parser_tests.rs:15) для покрытия нового формата.
- Обновлена документация в `README.md` с примерами использования нового парсера.
2026-01-25 22:26:34 +03:00
b7d3e3e488 feat(renderer): implement module-level documentation generation
- Added module_md template to renderer for generating detailed module documentation
- Updated CLI to use renderer for module docs with fallback to simple template
- Generated module documentation for test project files with symbols, dependencies, and integrations
- Added proper error handling when module rendering fails

This implements the core functionality for generating detailed architectural documentation at the module level, including symbols, dependencies, and integration points.
2026-01-25 21:24:54 +03:00
3ffe5e235f Add project configuration and initial documentation files
- Introduced `archdoc.toml` configuration file for project settings, including scanning and analysis options.
- Created initial `ARCHITECTURE.md` file with project summary and structure.
- Generated documentation files for source files and modules, including placeholders for future content.
- Updated the documentation generation logic to handle new project structure and file paths.
2026-01-25 20:44:24 +03:00
df50701764 Refactor directory structure creation and enhance documentation generation
- Simplified the creation of output directory structure in `init_project` and `generate_docs` functions.
- Added a `sanitize_filename` function to ensure valid filenames for generated documentation files.
- Implemented individual documentation file creation for modules and files in the `generate_docs` function.
- Updated links in the renderer to use the new `sanitize_for_link` function for safe URL generation.
- Adjusted the `extract_docstring` method in `PythonAnalyzer` to accept the body parameter without using it, preparing for future enhancements.
2026-01-25 20:38:49 +03:00
3701cee205 Add initial project structure and core functionality for ArchDoc
- Created `.gitignore` files for various directories to exclude unnecessary files.
- Added `PLAN.md` to outline the project goals and architecture documentation generation.
- Implemented the `archdoc-cli` with a command-line interface for initializing and generating documentation.
- Developed the `archdoc-core` library for analyzing Python projects and generating architecture documentation.
- Included caching mechanisms to optimize repeated analysis.
- Established a comprehensive test suite to ensure functionality and error handling.
- Updated `README.md` to provide an overview and installation instructions for ArchDoc.
2026-01-25 20:17:37 +03:00