Parent
Chat Interface — Design Spec (docs/superpowers/specs/2026-06-19-chat-interface-design.md)
What to build
Let the user save content from chat into ShadowBrain, two ways:
- Explicit "Save to ShadowBrain" action on any user or assistant message →
opens a type picker, writes via the existing POST /api/items. Works for
both targets.
- Model-driven
save_to_shadowbrain tool (Vercel AI SDK) — active only
when the target is an OpenCode Go model and the thread has
allow_model_save enabled. The AI SDK executes it locally in our process;
it writes via the items helper (direct DB write, not an HTTP self-call) and
returns the new item id.
Surface inline confirmation ("Saved as note #123"). The tool is not active for
the Hermes target in v1 — Hermes-side grounding/insert is via the explicit
action (or future MCP; see spec §Open Questions).
Acceptance criteria
Blocked by
References
- docs/superpowers/specs/2026-06-19-chat-interface-design.md — §Components (Insert:
save_to_shadowbrain), §Non-Goals, §Open Questions
Parent
Chat Interface — Design Spec (docs/superpowers/specs/2026-06-19-chat-interface-design.md)
What to build
Let the user save content from chat into ShadowBrain, two ways:
opens a type picker, writes via the existing
POST /api/items. Works forboth targets.
save_to_shadowbraintool (Vercel AI SDK) — active onlywhen the target is an OpenCode Go model and the thread has
allow_model_saveenabled. The AI SDK executes it locally in our process;it writes via the items helper (direct DB write, not an HTTP self-call) and
returns the new item id.
Surface inline confirmation ("Saved as note #123"). The tool is not active for
the Hermes target in v1 — Hermes-side grounding/insert is via the explicit
action (or future MCP; see spec §Open Questions).
Acceptance criteria
content_itemsave_to_shadowbrain({ type, content, title?, tags? })tool executes locally for Go-model targets and returns the new item idtarget.provider === 'opencode-go'andallow_model_saveis trueallow_model_savetoggle persisted on the threadcontent_items+ FTS like any item)Blocked by
References
save_to_shadowbrain), §Non-Goals, §Open Questions