Skip to content

docs(onboarding): refresh the graph from hooks instead of a watcher - #541

Merged
zaebee merged 2 commits into
mainfrom
claude/project-thread-j9zuea
Oct 2, 2026
Merged

zaebee merged 2 commits into
mainfrom
claude/project-thread-j9zuea

Conversation

@zaebee

@zaebee zaebee commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Requested by Andrei · project thread

Before: #175 still asked for a watch mode, and the docs didn't say how to keep the graph current outside the MCP server.

After: docs/how-to/AGENT_ONBOARDING.md explains why cgis has no watcher and gives two hook recipes that run cgis ingest -i once a burst of edits is over. One is a Claude Code Stop hook (once per finished turn, not once per edit). The other is a set of git post-checkout / post-merge / post-rewrite hooks.

This is the last step of #175: incremental ingest, the freshness signal (#443), the ingest race fix (#535) and opt-in lazy refresh (#538) have shipped. Watch mode is replaced by these recipes. The remaining ideas have their own issues: #539 (cache raw edges so a cross-file rebuild skips re-extraction) and #540 (decide on turning auto-refresh on by default).

How. Docs only. I checked that the hook JSON parses and that the command is extracted correctly.

Closes #175

🤖 Generated with Claude Code

https://claude.ai/code/session_01FuX9kDSsfALRNYaDsKN4K6


Generated by Claude Code

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds documentation on how to configure hooks (for Claude Code and git) to refresh the graph database outside of the MCP server, avoiding the need for a file watcher. The review feedback points out that the ingestion commands in both the Claude Code and git hook examples should target ./src instead of . to remain consistent with Step 1 and prevent unnecessary full rebuilds. Additionally, the Claude Code JSON configuration contains redundant nesting that should be simplified.

Comment thread docs/how-to/AGENT_ONBOARDING.md
Comment thread docs/how-to/AGENT_ONBOARDING.md Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuX9kDSsfALRNYaDsKN4K6
@zaebee

zaebee commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request adds documentation on how to configure external hooks (such as Claude Code and git hooks) to trigger incremental ingestion outside of the MCP server. Feedback was provided regarding the Claude Code hook configuration in .claude/settings.json, which contains an extra level of nesting that does not match the expected schema, along with a suggested correction.

Comment thread docs/how-to/AGENT_ONBOARDING.md
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

@zaebee
zaebee merged commit 809169d into main Oct 2, 2026
3 checks passed
@zaebee
zaebee deleted the claude/project-thread-j9zuea branch October 2, 2026 09:43
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.

Lazy ingest on first query + watch mode (incremental ingest and freshness already shipped)

2 participants