Skip to content

plan: tier2 incremental kuzu rebuild#263

Merged
HumanBean17 merged 1 commit into
masterfrom
worktree-tier2-incremental-rebuild
Jun 6, 2026
Merged

plan: tier2 incremental kuzu rebuild#263
HumanBean17 merged 1 commit into
masterfrom
worktree-tier2-incremental-rebuild

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

Summary

  • Add implementation plan for incremental Kuzu graph rebuild (plans/active/PLAN-TIER2-INCREMENTAL-REBUILD.md)
  • Four-PR sequence: foundation + deps index (T1), symmetric delete helpers (T2), incremental orchestrator (T3), CLI + decision engine (T4)
  • Derived from propose/active/TIER2-INCREMENTAL-REBUILD-PROPOSE.md; reviewed for codebase accuracy (file paths, function signatures, Kuzu cascade semantics, _write_meta correctness in incremental mode)
  • 52 named tests across all PRs; companion proposal INDEX-AUTO-MODE-PROPOSE.md for decision engine spec

Plan highlights

  • PR-T1: FileDeps dataclass, .deps.json sidecar read/write, determinism test, perf baseline
  • PR-T2: 12 symmetric delete_*_for_file helpers (Kuzu doesn't cascade — explicit DECLARES + member cleanup)
  • PR-T3: build_ast_graph_incremental orchestrator, closure expansion (8 rules), per-pass subset functions, 21 tests including fixture equivalence and transaction rollback
  • PR-T4: refresh_decision.py decision engine, CLI _cmd_increment integration, new refresh_code_index MCP tool

Key design decisions

  • _write_meta in incremental mode queries live Kuzu DB for global stats (partial accumulator would produce wrong counts)
  • Pass6 always reruns globally (fast, spans services)
  • pass5 subset has no asts parameter (parent does del asts)
  • refresh_code_index MCP tool does not exist yet — created in PR-T4
  • Brownfield changes force full rebuild (PR-T5 optional refinement deferred)

Test plan

  • Review plan for completeness against proposal §2-§7
  • Verify file paths and function signatures match codebase
  • Confirm test fixture strategy (Tier 3 per-test builds) is correct
  • Validate cross-PR risk mitigations are adequate

🤖 Generated with Claude Code

Four-PR plan (T1-T4) derived from propose/active/TIER2-INCREMENTAL-REBUILD-PROPOSE.md:
dependency index, symmetric delete helpers, incremental orchestrator,
CLI + decision engine integration. Reviewed for codebase accuracy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 83a900b into master Jun 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant