UserPromptSubmit hook prepares and captures automatically, HTTP MCP performs explicit Memory and Handoff operations, and the bundled project-context Skill binds those paths. Setup does not start the Server and does not open WorkBuddy.
For the full install, use the Configure WorkBuddy how-to in the official docs. PowerContext 101 verifies the runnable boundary here.
Install and activate
The hook process needs Python 3.11 or newer onPATH. Start the Server in one terminal:
WORKBUDDY_HOME (~/.workbuddy when unset) and rolls back its snapshot on failure:
UserPromptSubmit hook, preserves unrelated settings and other MCP servers, and resolves command placeholders in the Skill. It does not start the Server and does not open WorkBuddy.
doctor workbuddy checks the hook files, that settings register the PowerContext hook, that mcp.json contains a powercontext server, and that the owned Skill has no unresolved placeholders. It does not launch WorkBuddy, contact the Server, or test recall. doctor integrations will not list it.
Restart WorkBuddy after setup. During each prompt, the hook status should show Syncing PowerContext.
Configuration defaults
The hook readsPOWERCONTEXT_WORKBUDDY_ environment variables. The MCP entry uses the same templates, which WorkBuddy expands from the environment:
Do not put the token in
mcp.json or the Server URL. The URL cannot contain credentials, a query string, or a fragment; plain HTTP is accepted only for loopback. Restart WorkBuddy after changing environment variables. Disable capture when the current work must not become Source evidence:
Minimal verification
Check the Server first:remember_memory and does not need a generation model. WorkBuddy should return an exact Citation.
Open a new session in the same project directory and ask:
UserPromptSubmit injects a bounded PreparedContext through hook-stdout additionalContext. The content includes a Citation and is labeled untrusted historical evidence. It serves the current prompt only and does not capture the assistant final response as Source.
Scope resolution
WorkBuddy uses the same order and the same binding file as Codex / Claude Code:- A nonempty
POWERCONTEXT_WORKBUDDY_SCOPE_ID. - A Git-private Workstream binding at
.git/powercontext/codex-workspace.json. - The normalized Git
remote.origin.url, written asgit:.... - A
local:<sha256>identifier for the project root.
scope_id on both sides.
Automatic path and explicit tools
交接, 交接当前工作, or handoff this work as explicit authorization for one durable Handoff. Discussing design, or asking for a preview, must not call handoff_current_work.
The bundled Skill is not a managed Skill export. WorkBuddy is not a current export target.
Negative checks
- Stop the Server, then ask a normal coding question. The hook should fail open; WorkBuddy continues.
- Stop the Server, then call explicit
remember_memory. MCP must report failure and must not pretend the write succeeded. - Remove
POWERCONTEXT_WORKBUDDY_AUTHORIZATIONwhile Server auth is enabled. The hook fails open and emitsauthentication_failed; MCP stays unavailable without blocking the session. - Do not put the token in
mcp.json. The file should keep the environment-variable template only.
Current limits
- A real WorkBuddy host-process E2E is Not validated.
test_workbuddy_service_chain.pyonly proves that the hook and MCP can share one service configuration. - WorkBuddy is outside the first-class bulk catalog.
setup selectanddoctor integrationswill not list it. - No formal minimum WorkBuddy version is declared.
- Managed Skill export is Unsupported.
- Doctor is an install check, not a recall or permission-UI proof.
Completion checklist
doctor workbuddysees hooks, settings, MCP, and the owned Skill.- Server health, readiness, and capabilities were checked separately.
- A new session can recall the OpenAPI decision you saved explicitly from
additionalContext, with a Citation. - Ordinary work continues when automatic recall fails.
- Explicit Memory or Handoff failure is visible in WorkBuddy.
- You did not treat the bundled Skill as a managed export.

