Session-specific system prompt plugin for bub.
- Bub plugin entry point:
session-prompt - A
system_prompthook implementation - Per-session prompt content loaded from
~/.bub/sessions/<session_id>/AGENTS.md - Automatic creation of the session prompt directory when a session is active
uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-session-prompt"You can also install it with Bub:
bub install bub-session-prompt@main- When
state["session_id"]is present, the plugin reads:~/.bub/sessions/<session_id>/AGENTS.md
- If the session directory does not exist yet, it is created automatically.
- If
AGENTS.mddoes not exist, the current session prompt content is treated as empty. - The plugin injects a
<session_instruct>block into the system prompt that:- tells the agent where the session prompt file lives
- includes the current
session_id - embeds the current contents of
AGENTS.md
- When
state["session_id"]is missing, the injected block still renders, but the current prompt content is empty.
- Edit
~/.bub/sessions/<session_id>/AGENTS.mdto change the system prompt for a specific session. - This package does not define additional environment variables or external service dependencies.