docs: add feature backlog and track file moves in hooks#71
Conversation
Move ROADMAP.md and llm-integration.md into roadmap/ folder. Add BACKLOG.md with 20 prioritized feature items derived from competitive analysis, including assessment columns for dependency impact, foundation alignment, problem-fit scoring, and breaking change tracking.
Add track-moves.sh PostToolUse hook for Bash that detects mv, git mv, and cp commands, extracts all source and destination paths, and logs them to .claude/session-edits.log. This prevents guard-git.sh from blocking commits that include moved or copied files.
|
Claude finished @carlos-alm's task —— View job PR Review Completed ✅Root Cause AnalysisProblem Being Solved: This PR addresses two distinct issues:
Why This Approach: The file move tracking uses a PostToolUse hook on Bash commands to detect Risk Assessment: Low risk - this is primarily documentation organization with a defensive shell script addition. Critical Concerns (if any)None identified. All changes are additive and defensive in nature. Code Quality Assessment✅ Excellent Documentation Structure
✅ Robust Hook Implementation
✅ Configuration Integration
✅ Security Considerations
|
Greptile SummaryThis PR adds infrastructure to track file moves in hooks and consolidates planning documentation. The
All changes are purely additive and non-breaking. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: cfe633b |
…in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java
* docs: move 3.16 items to new Phase 5 (Runtime & Extensibility) Expand the deferred Phase 3 items into a dedicated phase after TypeScript Migration with detailed descriptions for each sub-item: event-driven pipeline, unified engine strategy, subgraph export filtering, transitive confidence, query caching, config profiles, pagination standardization, and plugin system. Renumber subsequent phases 5-9 → 6-10 with all cross-references updated. * refactor: migrate integration tests to InMemoryRepository Add openRepo() utility that accepts an injected Repository instance or falls back to SQLite, enabling tests to bypass the filesystem entirely. - Add openRepo(dbPath, opts) to src/db/connection.js - Make findMatchingNodes and buildDependencyGraph polymorphic (accept db or Repository via instanceof check) - Refactor triageData, sequenceData, communitiesData to use openRepo - Convert triage, sequence, communities test fixtures to createTestRepo() fluent builder (sequence dataflow tests stay on SQLite) - Mark ROADMAP 3.13 InMemoryRepository migration item complete Impact: 10 functions changed, 11 affected * fix: use instanceof SqliteRepository guard and validate openRepo opts Impact: 2 functions changed, 18 affected * docs: add Phase 4 (Native Analysis Acceleration) to roadmap Add new Phase 4 covering the port of JS-only build phases to Rust: - 4.1-4.3: AST nodes, CFG, dataflow visitor ports (~587ms savings) - 4.4: Batch SQLite inserts (~143ms) - 4.5: Role classification & structure (~42ms) - 4.6: Complete complexity pre-computation - 4.7: Fix incremental rebuild data loss on native engine - 4.8: Incremental rebuild performance (target sub-100ms) Bump old Phases 4-10 to 5-11 with all cross-references updated. Benchmark evidence shows ~50% of native build time is spent in JS visitors that run identically on both engines.
* docs: promote #83 (brief command) and #71 (type inference) to Tier 0 in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java * docs: add Phase 4 (Native Analysis Acceleration) to roadmap Add new Phase 4 covering the port of JS-only build phases to Rust: - 4.1-4.3: AST nodes, CFG, dataflow visitor ports (~587ms savings) - 4.4: Batch SQLite inserts (~143ms) - 4.5: Role classification & structure (~42ms) - 4.6: Complete complexity pre-computation - 4.7: Fix incremental rebuild data loss on native engine - 4.8: Incremental rebuild performance (target sub-100ms) Bump old Phases 4-10 to 5-11 with all cross-references updated. Benchmark evidence shows ~50% of native build time is spent in JS visitors that run identically on both engines. * docs: fix sub-section numbering to match parent phase headings
* docs: promote #83 (brief command) and #71 (type inference) to Tier 0 in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java * fix: include constant nodes in edge building and downstream queries (#487) The edge-building stage excluded 'constant'-kind nodes from the node lookup maps, so no import/dependency edges were ever created for exported constants. This made them invisible to where, fn-impact, query, roles, and all other graph queries. Also adds missing 'record' kind to build-edges.js to match CORE_SYMBOL_KINDS. Impact: 6 functions changed, 33 affected * fix: include constant kind in whereSymbol and findMatchingNodes queries (#487) whereSymbolImpl used ALL_SYMBOL_KINDS (core 10, no constant) so codegraph where could not find constants. findMatchingNodes defaulted to FUNCTION_KINDS which also excluded constant. Switch whereSymbolImpl to EVERY_SYMBOL_KIND and add constant to FUNCTION_KINDS default. Impact: 1 functions changed, 6 affected
* docs: promote #83 (brief command) and #71 (type inference) to Tier 0 in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java * docs: add Phase 4 (Native Analysis Acceleration) to roadmap Add new Phase 4 covering the port of JS-only build phases to Rust: - 4.1-4.3: AST nodes, CFG, dataflow visitor ports (~587ms savings) - 4.4: Batch SQLite inserts (~143ms) - 4.5: Role classification & structure (~42ms) - 4.6: Complete complexity pre-computation - 4.7: Fix incremental rebuild data loss on native engine - 4.8: Incremental rebuild performance (target sub-100ms) Bump old Phases 4-10 to 5-11 with all cross-references updated. Benchmark evidence shows ~50% of native build time is spent in JS visitors that run identically on both engines. * docs: fix sub-section numbering to match parent phase headings * fix: align version computation between publish.yml and bench-version.js - Add COMMITS=0 guard in publish.yml to return clean version when HEAD is exactly at a tag (mirrors bench-version.js early return) - Change bench-version.js to use PATCH+1-dev.COMMITS format instead of PATCH+COMMITS-dev.SHA (mirrors publish.yml's new scheme) - Fix fallback in bench-version.js to use dev.1 matching publish.yml's no-tags COMMITS=1 default Impact: 1 functions changed, 0 affected * feat: auto-detect semver bump in /release skill when no version provided The release skill now scans commit history using conventional commit rules to determine major/minor/patch automatically. Explicit version argument still works as before. * fix: restore SHA-based uniqueness in bench-version fallback and add -dev.0 suffix The no-tags fallback hardcoded dev.1, causing repeated benchmark runs to silently overwrite each other. Restore short SHA for uniqueness. Also add -dev.0 suffix when COMMITS=0 so dev builds at an exact tag are never confused with stable releases. Impact: 1 functions changed, 0 affected * fix: add -dev.0 suffix for COMMITS=0 dev builds in publish.yml When HEAD is exactly at a release tag, the dev build emitted a clean semver string identical to the stable release. Add -dev.0 suffix to prevent confusion between dev pre-releases and stable releases.
* docs: promote #83 (brief command) and #71 (type inference) to Tier 0 in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java * fix: include constant nodes in edge building and downstream queries (#487) The edge-building stage excluded 'constant'-kind nodes from the node lookup maps, so no import/dependency edges were ever created for exported constants. This made them invisible to where, fn-impact, query, roles, and all other graph queries. Also adds missing 'record' kind to build-edges.js to match CORE_SYMBOL_KINDS. Impact: 6 functions changed, 33 affected * fix: include constant kind in whereSymbol and findMatchingNodes queries (#487) whereSymbolImpl used ALL_SYMBOL_KINDS (core 10, no constant) so codegraph where could not find constants. findMatchingNodes defaulted to FUNCTION_KINDS which also excluded constant. Switch whereSymbolImpl to EVERY_SYMBOL_KIND and add constant to FUNCTION_KINDS default. Impact: 1 functions changed, 6 affected
* docs: promote #83 (brief command) and #71 (type inference) to Tier 0 in backlog These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration. They should be implemented before any Phase 4+ roadmap work. - #83: hook-optimized `codegraph brief` enriches passively-injected context - #71: basic type inference closes the biggest resolution gap for TS/Java * docs: add Phase 4 (Native Analysis Acceleration) to roadmap Add new Phase 4 covering the port of JS-only build phases to Rust: - 4.1-4.3: AST nodes, CFG, dataflow visitor ports (~587ms savings) - 4.4: Batch SQLite inserts (~143ms) - 4.5: Role classification & structure (~42ms) - 4.6: Complete complexity pre-computation - 4.7: Fix incremental rebuild data loss on native engine - 4.8: Incremental rebuild performance (target sub-100ms) Bump old Phases 4-10 to 5-11 with all cross-references updated. Benchmark evidence shows ~50% of native build time is spent in JS visitors that run identically on both engines. * docs: fix sub-section numbering to match parent phase headings * fix: align version computation between publish.yml and bench-version.js - Add COMMITS=0 guard in publish.yml to return clean version when HEAD is exactly at a tag (mirrors bench-version.js early return) - Change bench-version.js to use PATCH+1-dev.COMMITS format instead of PATCH+COMMITS-dev.SHA (mirrors publish.yml's new scheme) - Fix fallback in bench-version.js to use dev.1 matching publish.yml's no-tags COMMITS=1 default Impact: 1 functions changed, 0 affected * feat: auto-detect semver bump in /release skill when no version provided The release skill now scans commit history using conventional commit rules to determine major/minor/patch automatically. Explicit version argument still works as before. * fix: restore SHA-based uniqueness in bench-version fallback and add -dev.0 suffix The no-tags fallback hardcoded dev.1, causing repeated benchmark runs to silently overwrite each other. Restore short SHA for uniqueness. Also add -dev.0 suffix when COMMITS=0 so dev builds at an exact tag are never confused with stable releases. Impact: 1 functions changed, 0 affected * fix: add -dev.0 suffix for COMMITS=0 dev builds in publish.yml When HEAD is exactly at a release tag, the dev build emitted a clean semver string identical to the stable release. Add -dev.0 suffix to prevent confusion between dev pre-releases and stable releases.
…on table - Python: .pyi (type stubs), PHP: .phtml, Ruby: .rake/.gemspec - Updated WASM registry, native Rust registry, and import resolution - Condensed README comparison table from 28×8 to 12×5, verified claims against actual repos, added security scanning row, grouped features - Marked backlog #71 (type inference) as done (#501) - Ruby/HCL type inference column: N/A (dynamic/declarative) Impact: 3 functions changed, 3 affected
…table (#502) * chore: remove dead exports and un-export internal constant - Remove dead `truncate` function from ast-analysis/shared.js (0 consumers) - Remove dead `truncStart` function from presentation/table.js (0 consumers) - Un-export `BATCH_CHUNK` in builder/helpers.js (only used internally) Skipped sync.json targets that were false positives: - BUILTIN_RECEIVERS: used by incremental.js + build-edges.js - TRANSIENT_CODES/RETRY_DELAY_MS: internal to readFileSafe - MAX_COL_WIDTH: internal to printAutoTable - findFunctionNode: re-exported from index.js, used in tests Impact: 1 functions changed, 32 affected * refactor: extract shared findNodes utility from cfg and dataflow features Impact: 5 functions changed, 7 affected * fix: replace empty catch blocks in db connection and migrations connection.js: add debug() logging to all 8 catch-with-fallback blocks so failures are observable without changing behavior. migrations.js: replace 14 try/catch blocks in initSchema with hasColumn() and hasTable() guards. CREATE INDEX calls use IF NOT EXISTS directly. getBuildMeta uses hasTable() check instead of try/catch. Impact: 10 functions changed, 19 affected * fix: replace empty catch blocks in domain analysis layer Add debug() logging to 10 empty catch blocks across context.js, symbol-lookup.js, exports.js, impact.js, and module-map.js. All catches retain their fallback behavior but failures are now observable via debug logging. Impact: 6 functions changed, 18 affected * fix: replace empty catch blocks in parser.js Add debug() logging to 6 empty catch blocks: 3 in disposeParsers() for WASM resource cleanup, 2 in ensureWasmTrees() for file read and parse failures, and 1 in getActiveEngine() for version lookup. Impact: 3 functions changed, 0 affected * fix: replace empty catch blocks in features layer Add debug() logging to 9 empty catch blocks across complexity.js (5), cfg.js (2), and dataflow.js (2). All catches for file read and parse failures now log the error message before continuing. Impact: 4 functions changed, 2 affected * refactor: decompose extractSymbolsWalk into per-category handlers Split the monolithic walkJavaScriptNode switch (13 cases, cognitive 228) into 11 focused handler functions. The dispatcher is now a thin switch that delegates to handleFunctionDecl, handleClassDecl, handleMethodDef, handleInterfaceDecl, handleTypeAliasDecl, handleVariableDecl, handleEnumDecl, handleCallExpr, handleImportStmt, handleExportStmt, and handleExpressionStmt. The expression_statement case now reuses the existing handleCommonJSAssignment helper, eliminating ~50 lines of duplication. Worst handler complexity: handleVariableDecl (cognitive 20), down from the original monolithic function (cognitive 279). Impact: 13 functions changed, 3 affected * refactor: decompose extractPythonSymbols into per-category handlers Split walkPythonNode switch into 7 focused handlers: handlePyFunctionDef, handlePyClassDef, handlePyCall, handlePyImport, handlePyExpressionStmt, handlePyImportFrom, plus the decorated_definition inline dispatch. Moved extractPythonParameters, extractPythonClassProperties, walkInitBody, and findPythonParentClass from closures to module-scope functions. Impact: 12 functions changed, 5 affected * refactor: decompose extractJavaSymbols into per-category handlers Split walkJavaNode switch into 8 focused handlers plus an extractJavaInterfaces helper. Moved findJavaParentClass to module scope. The class_declaration case (deepest nesting in the file) is now split between handleJavaClassDecl and extractJavaInterfaces. Impact: 12 functions changed, 5 affected * refactor: decompose remaining language extractors Apply the same per-category handler decomposition to all remaining language extractors: Go (6 handlers), Ruby (8 handlers), PHP (11 handlers), C# (11 handlers), Rust (9 handlers), HCL (4 handlers). Each extractor now follows the template established by the JS extractor: - Thin entry function creates ctx, delegates to walkXNode - walkXNode is a thin dispatcher switch - Each case is a named handler function at module scope - Helper functions (findParentClass, etc.) moved to module scope Impact: 66 functions changed, 23 affected * refactor: decompose AST analysis visitors and engine into focused helpers Move nested handler functions to module level in cfg-visitor.js, dataflow-visitor.js, and complexity-visitor.js — reducing cognitive complexity of each factory function from 100-337 down to thin coordinators. Extract WASM pre-parse, visitor setup, result storage, and build delegation from runAnalyses into focused helper functions. Impact: 66 functions changed, 43 affected * refactor: decompose domain builder stages into focused helpers Extract edge-building by type (import, call-native, call-JS, class hierarchy) from buildEdges. Extract per-phase insertion logic from insertNodes. Extract scoped/incremental/full-build paths and reverse-dep cascade from detectChanges. Extract setup, engine init, alias loading from pipeline.js. Extract node/edge-building helpers from incremental.js rebuildFile. Impact: 44 functions changed, 19 affected * refactor: decompose domain analysis functions into focused helpers Impact: 37 functions changed, 29 affected * refactor: decompose buildComplexityMetrics Impact: 5 functions changed, 3 affected * refactor: decompose buildStructure into traversal, cohesion, and classification Impact: 8 functions changed, 3 affected * refactor: decompose buildCFGData and buildDataflowEdges Impact: 10 functions changed, 5 affected * refactor: decompose sequenceData into BFS and message construction Impact: 5 functions changed, 2 affected * refactor: decompose explain() into section renderers Impact: 5 functions changed, 2 affected * refactor: decompose stats() into section printers Impact: 12 functions changed, 6 affected * fix: address quality issues in features (boundaries, communities, triage) Extract per-section validators from validateBoundaryConfig (cog 101→2). Extract buildCommunityObjects and analyzeDrift from communitiesData (cog 32→4). Extract buildTriageItems and computeTriageSummary from triageData (bugs 1.4→0.48). Impact: 13 functions changed, 11 affected * fix: split data fetching from formatting in presentation queries Extract printDiffFunctions/Coupled/Ownership/Boundaries/Summary from diffImpact (cog 28→6, cyc 21→7). Extract printExportHeader/Symbols from fileExports. Extract printNotFound/PathSteps from symbolPath. Impact: 12 functions changed, 7 affected * fix: extract subcommand dispatch in check, triage CLI and MCP server Extract runManifesto/validateKind from check execute (cyc 14→10). Extract runHotspots/validateFilters/parseWeights from triage execute (cyc 13→4). Extract loadMCPSdk/createLazyLoaders/resolveDbPath/validateMultiRepoAccess from startMCPServer (cog 34→13, cyc 19→7). Impact: 14 functions changed, 4 affected * fix: move startMCPServer JSDoc to correct function location * fix: reorder imports in MCP server for lint compliance Move createRequire assignment after all import declarations to satisfy Biome's import sorting rule. Impact: 3 functions changed, 1 affected * chore: release v3.2.0 * fix: add missing changelog entries for #498 and #493, restore libc fields in lockfile * feat: add type inference for all typed languages (WASM + native) Extract per-file typeMap (varName → typeName) from type annotations, new expressions, and typed parameters for JS/TS, Java, Go, Rust, C#, PHP, and Python. The edge resolver uses typeMap to connect variable receiver calls (x.method()) to their declared types (Type.method()) with 0.9 confidence. Implemented in both WASM (JS extractors) and native (Rust extractors + edge builder) engines for full parity. Updated README language table with symbols-extracted, type-inference, and engine-parity columns. Impact: 73 functions changed, 54 affected * fix: check parameter name not type name for self/cls filter in Python extractor (#501) Impact: 1 functions changed, 2 affected * refactor: remove redundant variable typeMap extraction in walk path (#501) Impact: 2 functions changed, 3 affected * feat: add .pyi, .phtml, .rake, .gemspec extensions; condense comparison table - Python: .pyi (type stubs), PHP: .phtml, Ruby: .rake/.gemspec - Updated WASM registry, native Rust registry, and import resolution - Condensed README comparison table from 28×8 to 12×5, verified claims against actual repos, added security scanning row, grouped features - Marked backlog #71 (type inference) as done (#501) - Ruby/HCL type inference column: N/A (dynamic/declarative) Impact: 3 functions changed, 3 affected * feat: add GitNexus to comparison table, fix license and roadmap - Add GitNexus column to feature comparison table (verified against repo) - Fix codegraph license: MIT → Apache-2.0 - Remove "Other tools evaluated" footnote (GitNexus now in table) - Update Limitations: reflect that type inference exists, clarify tsc gap - Sync Roadmap section with actual ROADMAP.md (11 phases, correct versions) * fix: supplement receiver edges for older native binaries Native binaries < 3.2.0 don't emit typeMap from parsing or handle receiver-based method calls in buildCallEdges. This adds two fallbacks: 1. extractTypeMapRegex: when native parse results lack typeMap, extract `const x = new Foo()` patterns via regex so the edge builder can resolve variable receivers to their declared types. 2. supplementReceiverEdges: after native buildCallEdges runs, if no receiver edges were produced, create them JS-side using the same buildReceiverEdge + type-resolved method-call logic as the WASM path. Both fallbacks are gated on the absence of the feature and will be no-ops once native binaries >= 3.2.0 are published. Fixes build-parity test failure on CI (native 31 edges vs WASM 33). Impact: 6 functions changed, 15 affected Impact: 2 functions changed, 5 affected * fix: correct misleading WASM engine test comment (#502) The comment incorrectly stated native type-map resolution was deferred, but native Rust support is fully implemented in this PR. The actual reason is that the native binary may not be present in CI. * fix: add recursion depth guard to extractTypeMapWalk (#502) Every other type-map extractor guards at depth 200, but the JS/TS walker recursed unconditionally. This could cause stack overflow on pathologically large or deeply nested auto-generated files. Impact: 2 functions changed, 3 affected * fix: remove dead methodCandidates guard in resolveByMethodOrGlobal (#502) nodesByName is keyed by fully-qualified name (e.g. Router.get), so get(call.name) with a simple name like 'get' never returns class methods — the filter was always empty. Removed the unreachable block so the type-aware resolution path is the clear entry point. * fix: handle Go multi-name var declarations in type map (#502) var x, y MyService now registers all names in the type map, not just the first. Fixed in both JS (extractGoTypeMapDepth) and Rust (extract_go_type_map_depth) extractors by iterating identifier children instead of using child_by_field_name('name'). Impact: 2 functions changed, 4 affected * fix: replace regex typeMap backfill with WASM-based AST extraction (#502) The regex pattern matched inside comments and string literals, producing spurious type map entries that could create phantom call edges. Replace with WASM tree-sitter extraction which uses the AST and is immune to false positives from non-code contexts. Also eliminates redundant disk reads in parseFileAuto where source was already in memory. Impact: 4 functions changed, 2 affected
Summary
roadmap/folder and addBACKLOG.mdwith 20 prioritized feature items derived from competitive analysis, including assessment columns for dependency impact, foundation alignment, problem-fit scoring, and breaking change trackingROADMAP.mdandllm-integration.mdintoroadmap/to consolidate planning docstrack-moves.shPostToolUse hook that detectsmv/git mv/cpin Bash commands and logs affected paths tosession-edits.log, fixing false blocks fromguard-git.shwhen files are movedTest plan
roadmap/BACKLOG.mdrenders correctly with all 20 items and scoring guideroadmap/ROADMAP.mdandroadmap/llm-integration.mdare intact after movetrack-moves.shby runningmvin a session and confirming paths appear in.claude/session-edits.logguard-git.shallows committing moved files aftertrack-moves.shlogs them