Skip to content

docs: correct plugin hook count to three (add SessionStart) - #274

Merged
jphein merged 1 commit into
mainfrom
docs/plugin-hook-count
May 27, 2026
Merged

docs: correct plugin hook count to three (add SessionStart)#274
jphein merged 1 commit into
mainfrom
docs/plugin-hook-count

Conversation

@jphein

@jphein jphein commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

.claude-plugin/README.md claimed the plugin "registers two hooks" and listed only Stop and PreCompact — but .claude-plugin/hooks/hooks.json registers three. SessionStart was missing from both the count and the list.

Change

  • "two hooks" → "three hooks"
  • Add the SessionStart bullet: surfaces recent palace context for the current project when a session begins (verified against hook_session_start in palace-daemon's hook.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, and website/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.

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.
Copilot AI review requested due to automatic review settings May 27, 2026 20:32
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Documentation Accuracy: Updated the MemPalace documentation to correctly state that the plugin registers three hooks instead of two.
  • Added SessionStart Hook: Included the SessionStart hook in the README, describing its functionality in surfacing recent palace context at the beginning of a session.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 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.

Comment thread .claude-plugin/README.md
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
- **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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jphein
jphein merged commit 92f894e into main May 27, 2026
3 of 4 checks 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.

2 participants