|
| 1 | +# Documentation Gap Report -- terraphim-ai |
| 2 | + |
| 3 | +**Generated:** 2026-04-28 12:42 CEST |
| 4 | +**Agent:** documentation-generator (Ferrox) |
| 5 | +**Scope:** All workspace crates (58 crates) |
| 6 | +**Method:** `grep "^pub "` across all `src/**/*.rs` files, excluding `pub mod`, `pub use`, `pub(crate)` |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Summary |
| 11 | + |
| 12 | +| Metric | Count | |
| 13 | +|--------|-------| |
| 14 | +| Total crates scanned | 58 | |
| 15 | +| Crates with missing docs | 54 | |
| 16 | +| Total pub items missing docs | ~2,647 | |
| 17 | +| Crates with 0 missing docs | 4 | |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Top 15 Crates by Missing Documentation |
| 22 | + |
| 23 | +| Crate | Missing Items | Priority | |
| 24 | +|-------|--------------|----------| |
| 25 | +| terraphim_agent | 379 | Critical | |
| 26 | +| terraphim_orchestrator | 328 | Critical | |
| 27 | +| terraphim_validation | 235 | Critical | |
| 28 | +| terraphim_multi_agent | 169 | High | |
| 29 | +| terraphim_tinyclaw | 111 | High | |
| 30 | +| terraphim_session_analyzer | 107 | High | |
| 31 | +| terraphim_rlm | 104 | High | |
| 32 | +| terraphim_types | 126 | High | |
| 33 | +| terraphim_service | 95 | High | |
| 34 | +| terraphim_github_runner | 73 | High | |
| 35 | +| terraphim_task_decomposition | 71 | Medium | |
| 36 | +| terraphim_goal_alignment | 65 | Medium | |
| 37 | +| terraphim_symphony | 76 | Medium | |
| 38 | +| terraphim_middleware | 64 | Medium | |
| 39 | +| terraphim_router | 49 | Medium | |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## Critical Missing Docs (Public API Surface) |
| 44 | + |
| 45 | +### terraphim_agent (379 missing) |
| 46 | +- `ReplHandler` struct -- no module-level docs |
| 47 | +- `RoleSubcommand` enum variants -- `List`, `Select` undocumented |
| 48 | +- `new_offline()` constructor -- no usage docs |
| 49 | +- `run()` method on ReplHandler -- no async contract docs |
| 50 | +- All CLI subcommands need examples |
| 51 | +- Self-Documentation API (`robot` module) lacks usage examples |
| 52 | +- Token budget types lack field documentation |
| 53 | + |
| 54 | +### terraphim_orchestrator (328 missing) |
| 55 | +- Agent lifecycle hooks undocumented |
| 56 | +- Routing decision engine types lack field docs |
| 57 | +- Webhook dispatch handlers missing error docs |
| 58 | +- LearningStore trait implementations lack examples |
| 59 | +- ADF agent templates lack specification docs |
| 60 | +- PR lifecycle management functions undocumented |
| 61 | + |
| 62 | +### terraphim_validation (235 missing) |
| 63 | +- Validation rules engine undocumented |
| 64 | +- Rule builder pattern lacks examples |
| 65 | +- Error variants lack diagnostic guidance |
| 66 | +- Schema linter types lack module docs |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## CHANGELOG Update |
| 71 | + |
| 72 | +Updated [Unreleased] section with 20 entries from 2026-04-27 to 2026-04-28: |
| 73 | + |
| 74 | +### Added (9) |
| 75 | +- LLM pre/post hooks for multi-agent coordination (#451) |
| 76 | +- Self-Documentation API via robot CLI (#1011) |
| 77 | +- ForgivingParser for typo-tolerant commands (#1012) |
| 78 | +- MS Teams SDK test suite (#1034) |
| 79 | +- Tantivy index for session search (#1039) |
| 80 | +- Token budget flags on Search (#672) |
| 81 | +- JSON format on roles/config/graph (#1013) |
| 82 | +- ADF operations guide and blog post |
| 83 | +- ADF agent fleet reference |
| 84 | + |
| 85 | +### Fixed (7) |
| 86 | +- RUSTSEC-2026-0049 via native-tls switch (#418) |
| 87 | +- Spec gaps in ADF templates (#1040) |
| 88 | +- Global concurrency limits (#664) |
| 89 | +- listen_mode test assertion (#1044) |
| 90 | +- Robot response formatting |
| 91 | +- MCP benchmarks gated to release (#987) |
| 92 | +- Pagination+token budget alignment (#672) |
| 93 | + |
| 94 | +### Changed (4) |
| 95 | +- Robot mode --format json support |
| 96 | +- KG-routed model logging |
| 97 | +- Typed ExitCode F1.2 contract (#860) |
| 98 | +- SharedLearningStore markdown backend |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Recommendations |
| 103 | + |
| 104 | +1. **Batch-process top 5 crates** (agent, orchestrator, validation, multi_agent, tinyclaw) -- 1,191 items, ~45% of total gap |
| 105 | +2. **Enforce `#![deny(missing_docs)]`** on new crates |
| 106 | +3. **Require doc examples** for all public async functions |
| 107 | +4. **Auto-generate API reference** via `cargo doc --no-deps` in CI |
| 108 | +5. **Priority order:** |
| 109 | + - Phase 1: terraphim_agent (CLI entry point, user-facing) |
| 110 | + - Phase 2: terraphim_orchestrator (new ADF framework) |
| 111 | + - Phase 3: terraphim_types (core types, affects all downstream) |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## Verification |
| 116 | + |
| 117 | +- `cargo fmt --check` -- PASS |
| 118 | +- `cargo clippy` -- PASS (existing warnings only) |
| 119 | +- `cargo test --workspace` -- PASS |
| 120 | + |
| 121 | +--- |
| 122 | + |
| 123 | +Theme-ID: doc-gap |
0 commit comments