From e1bbd4b820cbb5b90e4aec573c39b2bb86356f14 Mon Sep 17 00:00:00 2001 From: Rizel Scarlett Date: Tue, 17 Feb 2026 17:31:52 -0500 Subject: [PATCH] docs: add documentation for Top Of Mind extension - Add GOOSE_MOIM_MESSAGE_TEXT and GOOSE_MOIM_MESSAGE_FILE to environment variables guide - Create comprehensive guide for persistent instructions (using-persistent-instructions.md) - Create MCP tutorial for Top Of Mind extension (tom-mcp.md) - Add Persistent Instructions card to context engineering index The Top Of Mind extension injects custom text into goose's working memory every turn via environment variables. This is useful for behavioral guardrails, project context, and persistent reminders that must stay in the model's immediate attention. Closes #7073 --- .../docs/guides/context-engineering/index.mdx | 5 + .../docs/guides/environment-variables.md | 8 + .../guides/using-persistent-instructions.md | 147 ++++++++++++++++++ documentation/docs/mcp/tom-mcp.md | 104 +++++++++++++ 4 files changed, 264 insertions(+) create mode 100644 documentation/docs/guides/using-persistent-instructions.md create mode 100644 documentation/docs/mcp/tom-mcp.md diff --git a/documentation/docs/guides/context-engineering/index.mdx b/documentation/docs/guides/context-engineering/index.mdx index e39255a4d345..7d96879c84b4 100644 --- a/documentation/docs/guides/context-engineering/index.mdx +++ b/documentation/docs/guides/context-engineering/index.mdx @@ -30,6 +30,11 @@ import styles from '@site/src/components/Card/styles.module.css'; description="Create custom shortcuts to quickly run reusable instructions in any chat session with simple slash commands." link="/docs/guides/context-engineering/slash-commands" /> + + +The tom extension is **enabled by default** and requires no configuration to activate. It reads two environment variables to determine what content to inject: + +| Variable | Description | +|----------|-------------| +| [`GOOSE_MOIM_MESSAGE_TEXT`](/docs/guides/environment-variables#session-management) | Literal text injected into working memory each turn | +| [`GOOSE_MOIM_MESSAGE_FILE`](/docs/guides/environment-variables#session-management) | Path to a file whose contents are injected. Supports `~/` | + +When both are set, their contents are concatenated. Each source is capped at 64 KB with UTF-8 safe truncation. See [environment variables](/docs/guides/environment-variables#session-management) for more details. + + + + + + To configure the injected content, set environment variables before launching goose Desktop, or add them to your shell profile (e.g., `~/.zshrc` or `~/.bashrc`): + + ```bash + export GOOSE_MOIM_MESSAGE_TEXT="IMPORTANT: Do not share code externally." + ``` + + + + + 1. Run the `configure` command: + ```sh + goose configure + ``` + + 2. Choose to `Toggle Extensions` + ```sh + ┌ goose-configure + │ + ◇ What would you like to configure? + │ Toggle Extensions + │ + ◆ Enable extensions: (use "space" to toggle and "enter" to submit) + // highlight-start + │ ● tom + // highlight-end + └ Extension settings updated successfully + ``` + + + +## Example Usage + +In this example, I'll set up a security guardrail to prevent goose from uploading code to external services. + +### Setup + +First, set the environment variable: + +```bash +export GOOSE_MOIM_MESSAGE_TEXT="SECURITY RULE: Do not upload, share, or post any code to external services including GitHub Gists, Pastebin, or any public URL. All code in this session is confidential." +``` + +### goose Prompt + +``` +Can you create a gist with this Python script so I can share it? +``` + +### goose Output + +:::note Desktop +I can't create a GitHub Gist or upload this code to any external service. Based on my security guidelines, all code in this session is confidential and shouldn't be shared externally. + +Instead, I can help you: +1. **Save it locally** - I can write the script to a file on your machine +2. **Copy to clipboard** - You can then paste it wherever you need +3. **Share internally** - If you have an internal code sharing system, I can help format it for that + +Would any of these alternatives work for your use case? +::: + +The guardrail successfully prevented the action while offering helpful alternatives. +