Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/roadmap/BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Six commands already produce Mermaid/DOT output: `export`, `diff-impact -f merma
| 69 | Node annotations in `diff-impact` / `branch-compare` / `communities` | Use 61's annotation formatter to show top exports on file nodes in `diff-impact -f mermaid`, `branch-compare --format mermaid`, and `communities` output. | Visualization | All visual tools show file API surfaces inline, not just in `export` | ✓ | ✓ | 3 | No | 61 |
| 70 | Drift/risk subgraph labels in `communities` and `triage` | Use 62's semantic label system to annotate `communities` subgraphs with drift status (`**(drifted)**` / `**(cohesive)**`) and add a new `--format mermaid` to `triage` with risk-severity group labels. | Intelligence | Community and triage diagrams communicate structural health directly in the layout | ✓ | ✓ | 3 | No | 62 |
| 84 | Call-count annotations on `sequence` diagram arrows | `sequence` currently deduplicates caller→callee pairs with `SELECT DISTINCT`, silently hiding multi-site calls. Instead, count how many times each caller→callee pair appears in the edges table and annotate the Mermaid arrow with the count when > 1 (e.g., `CallerFile ->> CalleeFile: fnName (×3)`). Requires grouping by `(source_id, target_id)` and emitting the count alongside the edge. | Visualization | Sequence diagrams reveal call intensity — a file calling another 8 times is architecturally different from one that calls it once; agents and reviewers can immediately spot hot paths and coupling strength | ✓ | ✓ | 3 | No | — |
| 86 | Mermaid `classDiagram` export | New `codegraph export -f class-diagram` (and `exportClassDiagram` programmatic API) that emits a Mermaid `classDiagram` for classes, interfaces, structs, traits, and enums in the graph. **What we already have:** class/interface/struct/trait/enum nodes in the `nodes` table, method nodes with `parent_id` linking them to their class (migration v11), property/parameter/constant child nodes via `symbol_children`, `extends` and `implements` edges stored by `builder.js`. **What's needed:** **(a)** New rendering function in `export.js` that queries classes → groups their child methods and properties → emits Mermaid `classDiagram` syntax with `<<abstract>>`/`<<interface>>` stereotypes, inheritance (`<\|--`) and implementation (`..\|>`) arrows; **(b)** visibility markers (`+`/`-`/`#`) — infer from JS `#private` fields (already detected as `private_property_identifier` in `extractClassProperties`) and language-specific access modifiers; **(c)** optional `--scope <file-or-class>` to restrict diagram to a class and its hierarchy (uses `getClassHierarchy` BFS); **(d)** dependency arrows (`..>`) derived from cross-class call edges. **Nice-to-have (not blocking):** type annotations on methods/fields (requires extractor changes to persist TS/Java type info). Add corresponding `class_diagram` MCP tool. | Visualization | Agents and PR reviewers get UML-style class hierarchy diagrams generated directly from the graph — useful for understanding inheritance structures, spotting god classes, and reviewing OOP designs without manual diagramming. Particularly valuable for Java, C#, TypeScript, and Rust codebases with deep type hierarchies | ✓ | ✓ | 3 | No | — |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title still references old ID 85

The entry was correctly renumbered to ID 86 in this commit, but the PR title (docs: add Mermaid classDiagram export to backlog (ID 85)) was never updated to match. Anyone searching for "ID 85" from the PR title will land on a different entry (the "Hot-path expensive-initialization detection" item in Tier 1b). Consider updating the PR title to (ID 86) for consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — PR title updated to (ID 86).


### Tier 1h — Core accuracy improvements (resolve known analysis gaps)

Expand Down
Loading