aaif-goose / aaif-goose/goose

Support Top Of Mind files discovered like .goosehints

未关闭
#10,262 1 条评论 0 个 reaction 已指派 1 人 已被 @lifeizhou-ap 认领 在 GitHub 查看
主要语言
Rust
星标
54.2k
派生
6.2k
平均合并
3 天 2 小时
30 天内合并 PR
262

描述

**Please explain the motivation behind the feature request.**

Goose currently supports per-turn persistent instructions through the Top Of Mind extension via `GOOSE_MOIM_MESSAGE_TEXT` and `GOOSE_MOIM_MESSAGE_FILE`. This is useful because the content is injected into working memory every turn, so it stays reliable for critical reminders, guardrails, and durable operating notes.

The current setup path is awkward for normal use, though. To make Top Of Mind persistent across sessions, users need to set environment variables or launch Goose through a wrapper script, for example:

```sh
GOOSE_MOIM_MESSAGE_FILE="$HOME/.config/goose/mimo.md" goose
```

That creates a few pain points:

- It adds extra installation steps after Goose itself is installed.
- Desktop launchers and GUI sessions often do not inherit shell environment variables consistently.
- Users need different setup paths for CLI, Desktop, system services, and package managers.
- Project-level always-on reminders are harder to share or version with the project.
- The feature is less discoverable than `.goosehints`, even though it solves a different problem: per-turn attention rather than startup context.

This also makes onboarding harder for teams. A project can already carry `.goosehints` or `AGENTS.md` style files, but there is no equivalent file-based convention for Top Of Mind content that must remain visible every turn.

**Describe the solution you'd like**

Add file discovery for Top Of Mind, following the same general ergonomics as `.goosehints`:

- If a global Top Of Mind file exists in the Goose config directory, load it for all sessions.
- If a project Top Of Mind file exists in the current workspace, load it only for sessions in that project.
- Continue supporting `GOOSE_MOIM_MESSAGE_TEXT` and `GOOSE_MOIM_MESSAGE_FILE` for temporary overrides and scripting.

One possible convention:

- Global: `~/.config/goose/MIMO.md` or `~/.config/goose/mimo.md`
- Project: `/MIMO.md` or `/.goose/mimo.md`

The exact filename is a bikeshed; the important part is that Top Of Mind gets a first-class file convention similar to Goose Hints, with global and project scopes.

Suggested merge order:

1. Global Top Of Mind file
2. Project Top Of Mind file
3. `GOOSE_MOIM_MESSAGE_FILE`
4. `GOOSE_MOIM_MESSAGE_TEXT`

This keeps existing environment-variable behavior intact while making the common persistent case zero-wrapper and file-based.

**Describe alternatives you've considered**

- Keep using wrapper scripts that set `GOOSE_MOIM_MESSAGE_FILE`. This works, but every user and machine has to recreate the wrapper, and GUI/Desktop launch paths remain fragile.
- Put the content in `.goosehints`. This is not equivalent: `.goosehints` is project context, while Top Of Mind is specifically useful because it is injected every turn and does not fade as the conversation grows.
- Ask users to edit shell startup files. This is harder to explain, less portable, and still unreliable for launchers that do not inherit that environment.

**Additional context**

There is already a broader open proposal for a local memory knowledge base (#10252). This request is intentionally smaller: no session recorder, indexer, or search database. It is just a file-discovery path for the existing Top Of Mind extension.

I also found prior work around global/project instruction files and `.goosehints` ergonomics, such as #9418. This proposal is adjacent but not the same, because it targets per-turn Top Of Mind injection rather than startup instructions.

If maintainers agree with the direction and preferred filename/location, I can submit a PR.

- [x] I have verified this does not duplicate an existing feature request

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。