Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ JS source is plain JavaScript (ES modules) in `src/`. No transpilation step. The
| `mcp.js` | MCP server exposing graph queries to AI agents; single-repo by default, `--multi-repo` to enable cross-repo access |
| `graph/` | Unified graph model: `CodeGraph` class (`model.js`), algorithms (Tarjan SCC, Louvain, BFS, shortest path, centrality), classifiers (role, risk), builders (dependency, structure, temporal) |
| `cycles.js` | Circular dependency detection (delegates to `graph/` subsystem) |
| `export.js` | DOT/Mermaid/JSON graph export |
| `export.js` | Graph export orchestration: loads data from DB, delegates to `presentation/export.js` serializers |
| `presentation/` | Pure output formatting: `viewer.js` (HTML renderer), `export.js` (DOT/Mermaid/GraphML/Neo4j serializers), `sequence-renderer.js` (Mermaid sequence diagrams), `table.js` (CLI table formatting), `result-formatter.js` (JSON/NDJSON output) |
| `watcher.js` | Watch mode for incremental rebuilds |
| `config.js` | `.codegraphrc.json` loading, env overrides, `apiKeyCommand` secret resolution |
| `constants.js` | `EXTENSIONS` (derived from parser registry) and `IGNORE_DIRS` constants |
Expand All @@ -68,7 +69,7 @@ JS source is plain JavaScript (ES modules) in `src/`. No transpilation step. The
| `boundaries.js` | Architecture boundary rules with onion architecture preset |
| `owners.js` | CODEOWNERS integration for ownership queries |
| `snapshot.js` | SQLite DB backup and restore |
| `sequence.js` | Mermaid sequence diagram generation from call graph edges |
| `sequence.js` | Sequence diagram data generation (BFS traversal); Mermaid rendering delegated to `presentation/sequence-renderer.js` |
| `paginate.js` | Pagination helpers for bounded query results |
| `logger.js` | Structured logging (`warn`, `debug`, `info`, `error`) |

Expand Down
10 changes: 5 additions & 5 deletions docs/roadmap/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,11 @@ src/
result-formatter.js # Structured result formatting (moved from infrastructure/)
```

- 🔲 Extract rendering logic from `viewer.js` — keep graph data loading in domain, move formatting to presentation
- 🔲 Extract serialization from `export.js` — DOT/Mermaid/JSON writers become pure data → string transforms
- 🔲 Extract table formatting helpers used across `queries-cli.js`, `complexity`, `stats`
- 🔲 Move `result-formatter.js` from `infrastructure/` to `presentation/` (it's output formatting, not infrastructure)
- 🔲 Extract Mermaid rendering from `sequence.js` into `sequence-renderer.js`
- Extract rendering logic from `viewer.js` — keep graph data loading in domain, move formatting to presentation
- Extract serialization from `export.js` — DOT/Mermaid/JSON writers become pure data → string transforms
- Extract table formatting helpers used across `queries-cli.js`, `complexity`, `stats`
- Move `result-formatter.js` from `infrastructure/` to `presentation/` (it's output formatting, not infrastructure)
- Extract Mermaid rendering from `sequence.js` into `sequence-renderer.js`

**Principle:** Domain functions return plain data objects. Presentation functions are pure transforms: `data → formatted string`. Commands wire the two together.

Expand Down
Loading
Loading