docs(backlog): add Weft-inspired items #103 and #104#945
Conversation
|
Claude finished @carlos-alm's task —— View job PR Review Complete ✅Todo List
Root Cause AnalysisProblem Being Solved: Adding two new feature requests (#103 and #104) to the product backlog inspired by WeaveMindAI/weft design principles. Why This Approach: This is pure documentation — adding planned features to the backlog for future prioritization. No code changes or workarounds. Risk Assessment: Zero risk. Documentation-only change with no impact on functionality. Phase 2-4 AnalysisConfiguration Changes: ❌ None — this is documentation-only The PR adds exactly 2 lines to docs/roadmap/BACKLOG.md: Line 161 (ID #103): Line 204 (ID #104): Backlog Compliance
Critical ConcernsNone. This is a straightforward documentation update that:
The entries are well-researched and properly scoped — both build on existing capabilities rather than requiring new dependencies. Final Recommendation
Minor note: The test plan mentions verifying no ID collisions — confirmed that 103/104 are the next sequential IDs after 102 in Tier 1e.1. |
Greptile SummaryThis PR adds two Weft-inspired planning entries to Confidence Score: 5/5Documentation-only change; safe to merge with one minor tier-provenance clarification worth addressing All findings are P2 (style/documentation accuracy). No code changes, no logic errors, no security concerns. The prior P1 comment about stale .js references was resolved in this commit. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph id103["#103 — Foldable Graph Viewer (Tier 1g)"]
A["graph-enrichment.ts\ncompute directory-level aggregate edges"] --> C["viewer.ts\nexpand/collapse toggling on cluster nodes"]
B["vis-network clustering API"] --> C
C --> D["codegraph plot --collapsed / --expand-depth N"]
end
subgraph id104["#104 — Architecture-as-Code Gate (Tier 1j)"]
E["boundaries\nlayer rules"] --> H["architecture block in .codegraphrc.json"]
F["manifesto\ncohesion thresholds"] --> H
G["check\nCI predicates"] --> H
H --> I["codegraph check --architecture\nexit 1 on violation"]
end
Reviews (2): Last reviewed commit: "fix(backlog): correct stale .js file ref..." | Re-trigger Greptile |
| | 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 | — | | ||
| | 103 | Recursively foldable graph viewer | Add directory-level collapsing to the interactive HTML viewer (`codegraph plot`). Any directory group collapses into a single node showing only its external edges (imports in/out); click to expand into constituent symbols. Recursive: collapsed groups contain collapsed sub-groups. Inspired by Weft's "recursively foldable" design — a 100-node system still looks like 5 blocks at the top level. Implementation: extend `graph-enrichment.js` to compute directory-level aggregate edges, extend `viewer.js` to support expand/collapse toggling on `subgraph` cluster nodes (vis-network supports compound nodes via `clustering`). Add `--collapsed` flag to start fully collapsed, `--expand-depth N` to control initial expansion level. | Visualization | Large codebase graphs are currently unusable — hundreds of nodes render as spaghetti. Directory-level collapsing makes `codegraph plot` viable for real projects by letting users zoom from architecture overview to file-level detail interactively. Directly improves the "orientation" problem — agents and humans see module boundaries at a glance | ✓ | ✓ | 4 | No | — | |
There was a problem hiding this comment.
Stale
.js file references in implementation notes
The implementation notes for item 103 reference graph-enrichment.js and viewer.js, but the codebase has already migrated these to TypeScript — the actual files are src/features/graph-enrichment.ts and src/presentation/viewer.ts. Using the wrong extensions will confuse the implementer who follows this ticket.
| | 103 | Recursively foldable graph viewer | Add directory-level collapsing to the interactive HTML viewer (`codegraph plot`). Any directory group collapses into a single node showing only its external edges (imports in/out); click to expand into constituent symbols. Recursive: collapsed groups contain collapsed sub-groups. Inspired by Weft's "recursively foldable" design — a 100-node system still looks like 5 blocks at the top level. Implementation: extend `graph-enrichment.js` to compute directory-level aggregate edges, extend `viewer.js` to support expand/collapse toggling on `subgraph` cluster nodes (vis-network supports compound nodes via `clustering`). Add `--collapsed` flag to start fully collapsed, `--expand-depth N` to control initial expansion level. | Visualization | Large codebase graphs are currently unusable — hundreds of nodes render as spaghetti. Directory-level collapsing makes `codegraph plot` viable for real projects by letting users zoom from architecture overview to file-level detail interactively. Directly improves the "orientation" problem — agents and humans see module boundaries at a glance | ✓ | ✓ | 4 | No | — | | |
| | 103 | Recursively foldable graph viewer | Add directory-level collapsing to the interactive HTML viewer (`codegraph plot`). Any directory group collapses into a single node showing only its external edges (imports in/out); click to expand into constituent symbols. Recursive: collapsed groups contain collapsed sub-groups. Inspired by Weft's "recursively foldable" design — a 100-node system still looks like 5 blocks at the top level. Implementation: extend `graph-enrichment.ts` to compute directory-level aggregate edges, extend `viewer.ts` to support expand/collapse toggling on `subgraph` cluster nodes (vis-network supports compound nodes via `clustering`). Add `--collapsed` flag to start fully collapsed, `--expand-depth N` to control initial expansion level. | Visualization | Large codebase graphs are currently unusable — hundreds of nodes render as spaghetti. Directory-level collapsing makes `codegraph plot` viable for real projects by letting users zoom from architecture overview to file-level detail interactively. Directly improves the "orientation" problem — agents and humans see module boundaries at a glance | ✓ | ✓ | 4 | No | — | |
Summary
codegraph plotso large graphs are navigable instead of spaghetti.--collapsedand--expand-depth Nflags.boundaries+manifesto+checkinto a singlearchitecture{}config block withcheck --architectureas a one-command CI gate.Both ideas inspired by WeaveMindAI/weft design principles (recursive composability and compile-time architecture validation). Scored as zero-dep, foundation-aligned, problem-fit 4, non-breaking.
Test plan