Skip to content

inbox: the note for every agent whose docs verify a global rules file - #3599

Draft
backnotprop wants to merge 5 commits into
feat/inbox-note-rulesfrom
feat/inbox-note-more-agents
Draft

backnotprop wants to merge 5 commits into
feat/inbox-note-rulesfrom
feat/inbox-note-more-agents

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #3598 (rules in the note). The base is feat/inbox-note-rules; switch the base to main once #3598 merges (merge main in, no rebase).

What a person notices

The Inbox note (and with it the person's rules) now reaches every agent whose docs verify a global rules file. As the owner decided ("Just add it, with the quiet line"), the note is written by itself, like Codex's today, and the connect line says "Added the Inbox note to X's instructions." for each agent.

Agent Where Format
Qwen Code ~/.qwen/rules/plannotator-inbox.md ($QWEN_HOME/rules/), its own file no front matter (a baseline rule)
Cursor (editor found) ~/.cursor/plugins/local/plannotator-inbox/ local plugin .cursor-plugin/plugin.json { "name": "plannotator-inbox" }, rules/plannotator-inbox.mdc with alwaysApply: true
Kiro ~/.kiro/steering/plannotator-inbox.md, its own file inclusion: always front matter, first in the file
Windsurf / Devin ~/.devin/rules/plannotator-inbox.md, its own file trigger: always_on front matter
Amp $XDG_CONFIG_HOME/amp/AGENTS.md (default ~/.config, as for Amp's settings.json), a marked section created only when no AGENT.md / CLAUDE.md sits there
Antigravity ~/.gemini/GEMINI.md, the same block as Gemini CLI's one block, a record for each agent
DeepSeek Harness $DSH_HOME/AGENTS.md, a marked section plain
OpenCode 2 ~/.config/opencode/AGENTS.md now created when it is missing, but only with OpenCode 2 here, OpenCode 1 known not to be (no plugin key; opencode beside opencode2 is unsure) and no ~/.claude/CLAUDE.md; otherwise unchanged (only an AGENTS.md that exists)
Cline $CLINE_DIR/rules/plannotator-inbox.md, its own file no front matter; offered only (the docs do not say whether a new rule starts switched on)

Cursor without its editor (the CLI alone) keeps today's copy by hand.

The plugin route applies to the editor after a reload. It does not apply when an Enterprise admin has turned local plugins off, or in cursor-agent acp. In those cases the note's text in Settings → Agents is still there to copy.

Not included: OpenClaw (a persona folder), Hermes, Muse Code (no documented path) and the Claude app.

Guarantees, per new target

  • The note is written only for a found agent that is connected to the Inbox.
  • The automatic add never writes a file it would leave alone: read-only, hard-linked, or holding a note pasted by hand.
  • Writes are atomic and use the v9 markers. Removal is byte for byte.
  • Files Plannotator owns (Qwen, Kiro, Devin, Cline, Cursor's plugin) are created and deleted whole, front matter included. The folder each sits in stays. For Cursor, the rule file is written before the manifest, and a failed write leaves neither; the manifest is removed only while it is byte for byte Plannotator's, then the plugin's empty folders.
  • An own file with front matter that is there but blank, and that Plannotator did not create, gets no note.
  • A note pasted by hand into Qwen's QWEN.md without markers counts: no second copy.
  • Cursor's switch still turns the note off once the editor is no longer found.
  • Uninstall finds the notes even when the records are gone.
  • Each agent has its own switch in Settings → Agents.
  • "Asked" is recorded, so a removed note never comes back.
  • When the person said no to Gemini CLI's note, Antigravity's is not written by itself into the same file.
  • A note an older Inbox wrote into Qwen's QWEN.md stays there.

What changed

  • packages/server/inbox-agent-notes.ts:
    • noteTarget cases for the new agents.
    • ownFiles: each file Plannotator owns, with its front matter, extras and folders to prune.
    • noteCopiedByHand, and cursorEditorFound.
    • The automatic add skips the declined shared file.
    • Corrected the header comment, CURSOR_NOTE_REASON and the Gemini memory-section comment.
  • packages/core/inbox-types.ts: the new note agent ids, and the auto list.
  • packages/inbox/agents.ts: Cursor copied by hand is still asked in the dialog.
  • Cursor callers now ask noteCopiedByHand instead of id === "cursor":
    • inbox.ts: the note switch, the dialog answer and the preview.
    • --notes cursor.
    • The --help note lists.
  • inbox-foundation.md: Where, Written by itself, Cursor, and the dialog's rows are corrected (Kiro "has no file", Copilot "not verified", Cursor "no file to write", "every other agent").

Text that is new or changed (for the owner)

The note body is unchanged. Strings that are not agent-facing instructions:

  • Front matter:
    • ---\ninclusion: always\n---\n (Kiro)
    • ---\ntrigger: always_on\n---\n (Devin)
    • ---\nalwaysApply: true\n---\n (Cursor .mdc)
  • Cursor plugin manifest: { "name": "plannotator-inbox" }
  • Person-facing (Settings, --help):
    • New CURSOR_NOTE_REASON: "Cursor's editor was not found here, and only it loads Plannotator's note by itself: copy the note into Customize → Rules yourself. Plannotator can't see, update or remove that copy."
    • Amp's reason: "Creating this file could stop Amp from reading your AGENT.md or CLAUDE.md beside it, so Plannotator adds the note only to an AGENTS.md you already have."

In --help (agent-facing), only the generated agent lists change: who is written by itself and who is asked. The fixed sentence "Cursor's note is copied by hand instead…" now shows only when Cursor's note is copied by hand. The fixed Cursor line is unchanged and shows in the same case.

Proven by documentation only

The guide's rule is "PROVEN to load", and none of these agents has been checked live. Each agent's one check (where the file lands, and how to see the agent obey it) is below, and briefly in the guide:

  • Qwen: qwen in a scratch project, ask it to quote the first line under "Plannotator Inbox".
  • Cursor:
    1. Reload Window, then open a project outside home.
    2. Confirm the plugin appears.
    3. Use the canary in Agent chat.
    4. Also try cursor-agent -p. acp is expected to fail.
  • Kiro: the canary in the IDE and in kiro-cli. A custom agent is expected to miss it unless resources list the steering files.
  • Devin: devin and the canary.
  • Amp: amp and the canary.
  • Antigravity: agy or the IDE and the canary, and confirm the note shows once.
  • DeepSeek Harness: a dsh profile with the plugin, and the canary.
  • OpenCode 2: with no AGENTS.md, start the Inbox, confirm the file appears, then the canary in opencode2.
  • Cline: write the note via Settings, check the rule's toggle, then the canary.

How it was tested

Each test file was run alone, after a grep that it starts no Inbox.

New packages/server/inbox-agent-notes-more.test.ts (22 tests) covers:

  • every new target written by itself, with exact bytes;
  • only for connected agents;
  • the skip rules: read-only, pasted, hard-linked;
  • Cline's own file;
  • Cursor's plugin vs the copy by hand, refresh with rules, a changed manifest and the person's files kept;
  • Kiro and Devin front matter, including CRLF;
  • the shared Gemini/Antigravity block, including kept-shared, Gemini's AGENTS.md, Gemini moved, and the declined Gemini;
  • Amp beside AGENT.md / CLAUDE.md;
  • OpenCode: V2 only (config key, or opencode2), V1 only, both versions (one config with both keys, or both binaries), and V2 with a CLAUDE.md (home or CLAUDE_CONFIG_DIR);
  • Amp under XDG_CONFIG_HOME;
  • Qwen's note pasted into QWEN.md;
  • Cursor's write order and a failed write, and Off with the editor gone;
  • a blank own file not ours vs one Plannotator created;
  • uninstall with the records gone.

New apps/hook/server/inbox-help-notes.test.ts: which agents --help says are written by themselves vs asked, with and without Cursor's editor.

Updated existing tests whose behaviour changed:

  • notes: Qwen's file, and Amp/DSH in the byte-for-byte matrix;
  • notes-auto: Qwen is now written;
  • the window's agents.test.ts;
  • the CI-only inbox-agents-settings.test.ts, which starts an Inbox.

These pass locally:

Suite Passed
notes 42
notes-auto 15
note-rules 42
refresh (all but the one that starts an Inbox) 32
agents 13
inbox-agents 70
Qwen connect 39
Qwen trust 26
uninstall 127
install script 329
shape tests passed
docs size 3

Typecheck is clean for core, shared, server, Pi, mod, hook server, inbox and the inbox app.

No real agent folder was touched, and no agent CLI was run.

Review fixes (e3978ae)

  • H1, OpenCode: openCodeVersionsSeen reads every sign of each version, not just the first. AGENTS.md is created only with V2 seen, no V1 sign and no ~/.claude/CLAUDE.md (or $CLAUDE_CONFIG_DIR/CLAUDE.md). V2's package also ships opencode, and nothing read without running it tells that copy from a real V1, so opencode beside opencode2 (no plugin key) is unsure: not created, and Settings shows only "~/.config/opencode/AGENTS.md does not exist" (an existing reason), never the OpenCode 1 sentence (b4bf33f). The OpenCode 1 reason stays where V1 shows: a plugin key, or opencode alone.
  • M2, public docs: reference/inbox.md (the auto list, every agent's file, Cursor's plugin) and the Cursor entry in lib/inbox-agents.ts (setup step, trouble entry). Facts only.
  • Qwen pasted: pastedBeside checks QWEN.md for an unmarked note; the automatic add skips with the existing reason, naming QWEN.md.
  • Cursor write order: rule file first, then the manifest; if the manifest fails, the new rule file (and its empty folders) go again, or the old text is put back.
  • Blank own file: refused unless the record says Plannotator created it. New reason (person-facing): "<file> is empty and Plannotator did not create it, so it is left as it is". Settings offers no Fix for it.
  • Folders: I corrected the claim instead of pruning more: only Cursor's plugin folders (named for Plannotator) are pruned; ~/.kiro/steering, ~/.devin/rules and the like stay.
  • Amp: follows XDG_CONFIG_HOME, like its settings.json.
  • Cursor Off with the editor gone: the plugin's rule file on disk keeps Cursor's target, so the switch turns off.
  • Handoff reference: removed from the code and the guide; the guide carries the per-agent check briefly.
  • Left for the owner, unchanged: M1 (Cursor twice after a copy by hand), the Gemini / Antigravity shared-switch semantics, CURSOR_NOTE_REASON.

Written by itself, with the quiet line, for Qwen Code (its own rules
file), Cursor (a local plugin, where its editor is found), Kiro,
Windsurf / Devin, Amp, Antigravity (Gemini CLI's block) and DeepSeek
Harness; OpenCode 2's AGENTS.md is created when missing. Cline is
offered. Files Plannotator owns carry the front matter each tool's docs
give and are deleted whole. Stale statements about Kiro, Cursor and
Copilot corrected.
- OpenCode: create ~/.config/opencode/AGENTS.md only with OpenCode 2 here,
  no sign of OpenCode 1 (a `plugin` key or `opencode` on PATH) and no
  ~/.claude/CLAUDE.md, so OpenCode 1 never stops reading the person's file.
- Qwen Code: a note pasted by hand into QWEN.md without markers counts,
  so the automatic add makes no second copy.
- Cursor: the rule file is written before the manifest, and a failed write
  leaves neither; the switch still turns the note off once the editor is gone.
- Own files with front matter: one that is there but blank and that
  Plannotator did not create gets no note (a block without its front matter
  may never load).
- Amp: the note follows XDG_CONFIG_HOME, as Amp's settings.json does.
- The guide: removal keeps the folder an own file sits in; the live check
  per agent is in the guide; no handoff reference left.
- The public docs: the agents that get the note, their files, and Cursor's
  plugin.
OpenCode 2's package ships `opencode` too, and nothing Plannotator reads
without running it tells that copy from a real OpenCode 1. `opencode` beside
`opencode2` with no V1 `plugin` key is now unsure: AGENTS.md is still not
created there, and Settings no longer says it would stop OpenCode 1 reading
CLAUDE.md; it says only that the file does not exist. The OpenCode 1 reason
stays where OpenCode 1 shows (a `plugin` key, or `opencode` alone).

The guide no longer says Qwen never gets the note twice: the automatic add
skips a pasted note, the person's own add still writes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant