Skip to content

Add Explain View run reports and RPG visualizer#84

Open
QingtaoLi1 wants to merge 18 commits into
mainfrom
dev/rpg_visualization
Open

Add Explain View run reports and RPG visualizer#84
QingtaoLi1 wants to merge 18 commits into
mainfrom
dev/rpg_visualization

Conversation

@QingtaoLi1

Copy link
Copy Markdown
Contributor

Summary

Adds a shared Explain View run-report system for CoderMind commands, a new
RPG visualizer, and a batch of rpg_edit / git-workspace correctness fixes.

What's included

Explain View run reports (new)

  • scripts/common/run_events.py — structured event contract for command runs
  • scripts/common/run_report.py — shared sanitized HTML report renderer
    (write_command_report())
  • Wired into plan.py, update_graphs.py, and rpg_edit/review.py
  • Tests: test_run_report.py, test_rpg_edit_run_report.py

RPG visualization (new)

  • scripts/rpg_visualize.py — interactive D3 visualizer rendering three views
    (Feat Graph tree, collapsible Dep Graph, and Feat↔Dep Mapping)

rpg_edit improvements

  • Structured event contract emitted from the run
  • New RPG_EDIT_APPLY_RESULT_FILE output alongside RPG_EDIT_PLAN_FILE
  • Extended review report publishing
  • Clears stale/recovered sub-agent errors so successful runs no longer surface
    earlier timeouts

git / workspace correctness

  • git_utils: subdirectory-workspace-aware diffs and diff-range helpers
  • update_rpg: worktree comparisons aligned to the cmind workspace root
    (fixes duplicated RPG nodes from subdirectory workspaces)
  • update_rpg report now uses actual output fields + raw git delta counts

Bug fixes

  • dep_graph: missing property
  • graph search: handle list-valued RPG meta.path entries (no longer crashes on
    feature/all scope)
  • GitRunner: fix main_branch init parameter; merge to base branch, not main
  • smoke test: package-aware imports + explicit no-op backend methods to stop
    false stub detection

Test plan

  • uv run pytest CoderMind/tests/test_run_report.py
  • uv run pytest CoderMind/tests/test_rpg_edit_run_report.py
  • uv run pytest CoderMind/tests/test_encode_commands.py CoderMind/tests/test_encoder_workspace_layout.py
  • uv run pytest CoderMind/tests/test_sync_from_commit_diff.py CoderMind/tests/test_rpg_evolution.py
  • Generate a visualization: uv run python CoderMind/scripts/rpg_visualize.py rpg.json -o out.html

QingtaoLi1 and others added 18 commits June 30, 2026 05:52
Align update-rpg worktree comparisons and git diff outputs to the cmind workspace root so subdirectory workspaces do not duplicate RPG nodes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Report update_rpg results using the actual output fields, include raw git delta counts, and propagate semantic diff summaries so Explain View no longer shows zero/empty values for changed files and graph node counts.
Use package-aware imports for llm_usage_count_coarse and make intentional no-op/unsupported backend methods explicit so smoke stub detection no longer flags valid code.
Normalize list-valued feature paths before searching so search_rpg with feature/all scope no longer crashes when RPG nodes map to multiple paths. Add regression coverage for list-valued meta.path entries.
Clear stale sub-agent errors once a later iteration completes so successful rpg_edit reports do not surface recovered timeouts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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