docs: correct plugin hook count to three (add SessionStart) - #274
Conversation
The plugin README said "two hooks" and listed only Stop and PreCompact, but hooks.json registers three — SessionStart was missing entirely. SessionStart surfaces recent palace context for the current project when a session begins. Add it and fix the count.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request corrects a discrepancy in the project documentation regarding the number of hooks registered by the MemPalace plugin. By updating the README to include the previously omitted SessionStart hook, the documentation now accurately reflects the current implementation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the .claude-plugin/README.md file to document the newly added SessionStart hook. The reviewer suggests correcting the description of the SessionStart hook to accurately reflect its actual behavior (initializing session tracking and replaying pending writes) rather than stating that it surfaces palace context in local mode.
| MemPalace registers two hooks that run automatically: | ||
| MemPalace registers three hooks that run automatically: | ||
|
|
||
| - **SessionStart** -- Surfaces recent palace context for the current project when a session begins. |
There was a problem hiding this comment.
The description for SessionStart states that it "Surfaces recent palace context for the current project when a session begins." However, looking at the local Python implementation in mempalace/hooks_cli.py (hook_session_start), the hook only initializes session tracking state, runs a best-effort pending-queue replay, and optionally warns if the daemon is degraded. It does not actually query or surface any palace context to the AI session in the default local mode (that behavior seems specific to the external palace-daemon). To avoid misleading users who run the plugin in the default local mode, consider clarifying this description to reflect its actual behavior.
| - **SessionStart** -- Surfaces recent palace context for the current project when a session begins. | |
| - **SessionStart** -- Initializes session tracking state and replays pending writes when a session begins. |
Summary
.claude-plugin/README.mdclaimed the plugin "registers two hooks" and listed only Stop and PreCompact — but.claude-plugin/hooks/hooks.jsonregisters three. SessionStart was missing from both the count and the list.Change
hook_session_startin palace-daemon'shook.py— it reads the project wing's recent drawers + diary and seeds save-timing state).Scope note
A repo-wide sweep for hook-count claims found only this one. The
FORK_CHANGELOG.md"4 hook tests" mention is historical test commentary, andwebsite/reference/python-api/kg_writethrough.md"two hook factories" is an accurate generated docstring about a code module — both correctly left untouched.Follow-up to the doc-accuracy pass in #273.