docs: add check-readme hook to guides by carlos-alm · Pull Request #272 · optave/ops-codegraph-tool · GitHub
Skip to content

docs: add check-readme hook to guides#272

Merged
carlos-alm merged 6 commits into
mainfrom
docs/add-check-readme-hook
Mar 3, 2026
Merged

docs: add check-readme hook to guides#272
carlos-alm merged 6 commits into
mainfrom
docs/add-check-readme-hook

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • Documents the new check-readme.sh hook in recommended-practices.md, ai-agent-guide.md, and docs/examples/claude-code-hooks/README.md
  • Adds the hook to settings.json examples, hook description sections, overview tables, and customization pick-lists
  • The hook blocks git commit when source files are staged but README.md/CLAUDE.md/ROADMAP.md aren't, prompting the agent to review whether docs need updating

Test plan

  • Verify all three doc files render correctly on GitHub
  • Confirm settings.json examples are valid JSON (modulo comments)
  • Check that the hook description matches actual check-readme.sh behavior

…e HTML viewer

Add three new export formats for graph database interoperability:
- GraphML (XML standard) with file-level and function-level modes
- GraphSON (TinkerPop v3) for Gremlin/JanusGraph compatibility
- Neo4j CSV (bulk import) with separate nodes/relationships files

Add interactive HTML viewer (`codegraph plot`) powered by vis-network:
- Hierarchical, force, and radial layouts with physics toggle
- Node coloring by kind or role, search/filter, legend panel
- Configurable via .plotDotCfg JSON file

Update CLI export command, MCP export_graph tool, and programmatic API
to support all six formats.

Impact: 12 functions changed, 6 affected
…il panel

Evolve the plot command from a static viewer into an interactive
exploration tool with rich data overlays and navigation.

Data preparation:
- Extract prepareGraphData() with complexity, fan-in/fan-out, Louvain
  community detection, directory derivation, and risk flag computation
- Seed strategies: all (default), top-fanin, entry

Interactive features:
- Detail sidebar: metrics, callers/callees lists, risk badges
- Drill-down: click-to-expand / double-click-to-collapse neighbors
- Clustering: community and directory grouping via vis-network API
- Color by: kind, role, community, complexity (MI-based borders)
- Size by: uniform, fan-in, fan-out, complexity
- Risk overlay: dead-code (dashed), high-blast-radius (shadow), low-MI

CLI options:
- --cluster, --overlay, --seed, --seed-count, --size-by, --color-by

Tests expanded from 7 to 21 covering all new data enrichment, seed
strategies, risk flags, UI elements, and config backward compatibility.

Impact: 5 functions changed, 3 affected
The previous commit added graphml, graphson, and neo4j export formats
to the MCP tool definition but did not update the test assertion.
Use JSON.stringify() for cfg.layout.direction, effectiveColorBy, and
cfg.clusterBy when interpolated into inline JavaScript. Replace shell
exec() with execFile() for browser-open to avoid path injection.

Impact: 1 functions changed, 1 affected
Document the new check-readme.sh hook across all three doc locations:
recommended-practices.md, ai-agent-guide.md, and the hooks example
README. Adds settings.json examples, hook behavior descriptions, and
customization entries.
@claude

claude Bot commented Mar 3, 2026

Copy link
Copy Markdown

@greptile-apps

greptile-apps Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Documents the new check-readme.sh hook across three guide files, adding it to overview tables, settings.json examples, and customization pick-lists. The hook blocks git commits when source files are staged but documentation files (README.md, CLAUDE.md, ROADMAP.md) aren't, prompting agents to review whether docs need updating.

  • Added "Doc hygiene hooks" section to hooks README with table entry
  • Added hook to ai-agent-guide overview table and detailed section explaining behavior
  • Added hook to recommended-practices settings.json example with description
  • Documentation accurately reflects actual check-readme.sh behavior (verified against hook script)
  • JSON examples are valid and consistent with each file's existing style

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Documentation-only change that accurately describes existing functionality, with valid JSON examples and consistent formatting across all three files
  • No files require special attention

Important Files Changed

Filename Overview
docs/examples/claude-code-hooks/README.md Added check-readme.sh to doc hygiene hooks table and customization pick-list
docs/guides/ai-agent-guide.md Added check-readme.sh to hooks overview, detailed section, and settings.json example
docs/guides/recommended-practices.md Added check-readme.sh to settings.json, description section, and hooks bullet list

Last reviewed commit: f39aaf4

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@carlos-alm carlos-alm merged commit fcd83bb into main Mar 3, 2026
18 checks passed
@carlos-alm carlos-alm deleted the docs/add-check-readme-hook branch March 3, 2026 03:16
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant