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.
This commit is contained in:
2026-01-25 20:44:24 +03:00
parent df50701764
commit 3ffe5e235f
16 changed files with 305 additions and 4 deletions

View File

@@ -249,7 +249,7 @@ impl Renderer {
// Collect layout information from files
let mut layout_items = Vec::new();
for (file_id, file_doc) in &model.files {
for (_file_id, file_doc) in &model.files {
layout_items.push(serde_json::json!({
"path": file_doc.path,
"purpose": "Source file",

View File

@@ -0,0 +1,73 @@
# ARCHITECTURE — New Project
<!-- MANUAL:BEGIN -->
## Project summary
**Name:** New Project
**Description:** <FILL_MANUALLY: what this project does in 37 lines>
## Key decisions (manual)
- <FILL_MANUALLY>
## Non-goals (manual)
- <FILL_MANUALLY>
<!-- MANUAL:END -->
---
## Document metadata
- **Created:** 2026-01-25
- **Updated:** 2026-01-25
- **Generated by:** archdoc (cli) v0.1
---
## Rails / Tooling
<!-- ARCHDOC:BEGIN section=rails -->
No tooling information available.
<!-- ARCHDOC:END section=rails -->
---
## Repository layout (top-level)
<!-- ARCHDOC:BEGIN section=layout -->
| Path | Purpose | Link |
|------|---------|------|
| ./src/advanced_example.py | Source file | [details](docs/architecture/files/._src_advanced_example.py.md) |
| ./src/example.py | Source file | [details](docs/architecture/files/._src_example.py.md) |
<!-- ARCHDOC:END section=layout -->
---
## Modules index
<!-- ARCHDOC:BEGIN section=modules_index -->
| Module | Symbols | Inbound | Outbound | Link |
|--------|---------|---------|----------|------|
| ./src/advanced_example.py | 10 | 0 | 0 | [details](docs/architecture/modules/._src_advanced_example.py.md) |
| ./src/example.py | 5 | 0 | 0 | [details](docs/architecture/modules/._src_example.py.md) |
<!-- ARCHDOC:END section=modules_index -->
---
## Critical dependency points
<!-- ARCHDOC:BEGIN section=critical_points -->
### High Fan-in (Most Called)
| Symbol | Fan-in | Critical |
|--------|--------|----------|
### High Fan-out (Calls Many)
| Symbol | Fan-out | Critical |
|--------|---------|----------|
### Module Cycles
<!-- ARCHDOC:END section=critical_points -->
---
<!-- MANUAL:BEGIN -->
## Change notes (manual)
- <FILL_MANUALLY>
<!-- MANUAL:END -->

View File

@@ -0,0 +1,62 @@
[project]
root = "."
out_dir = "docs/architecture"
entry_file = "ARCHITECTURE.md"
language = "python"
[scan]
include = ["src", "app", "tests"]
exclude = [
".venv", "venv", "__pycache__", ".git", "dist", "build",
".mypy_cache", ".ruff_cache", ".pytest_cache", "*.egg-info"
]
follow_symlinks = false
max_file_size = "10MB"
[python]
src_roots = ["src", "."]
include_tests = true
parse_docstrings = true
max_parse_errors = 10
[analysis]
resolve_calls = true
resolve_inheritance = false
detect_integrations = true
integration_patterns = [
{ type = "http", patterns = ["requests", "httpx", "aiohttp"] },
{ type = "db", patterns = ["sqlalchemy", "psycopg", "mysql", "sqlite3"] },
{ type = "queue", patterns = ["celery", "kafka", "pika", "redis"] }
]
[output]
single_file = false
per_file_docs = true
create_directories = true
overwrite_manual_sections = false
[diff]
update_timestamp_on_change_only = true
hash_algorithm = "sha256"
preserve_manual_content = true
[thresholds]
critical_fan_in = 20
critical_fan_out = 20
high_complexity = 50
[rendering]
template_engine = "handlebars"
max_table_rows = 100
truncate_long_descriptions = true
description_max_length = 200
[logging]
level = "info"
file = "archdoc.log"
format = "compact"
[caching]
enabled = true
cache_dir = ".archdoc/cache"
max_cache_age = "24h"

View File

@@ -0,0 +1,3 @@
# File: ./src/advanced_example.py
TODO: Add file documentation

View File

@@ -0,0 +1,3 @@
# File: ./src/example.py
TODO: Add file documentation

View File

@@ -0,0 +1,3 @@
# Module: ./src/advanced_example.py
TODO: Add module documentation

View File

@@ -0,0 +1,3 @@
# Module: ./src/example.py
TODO: Add module documentation