Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-9616: fix(prompt): align chat wakeup, docs and inbox agent-facing text (#10941)

Multica Eve10d23898adbc
diff --git a/server/internal/daemon/execenv/runtime_config_sections.go b/server/internal/daemon/execenv/runtime_config_sections.go
index 34f5fdc556..87ebb570b4 100644
--- a/server/internal/daemon/execenv/runtime_config_sections.go
+++ b/server/internal/daemon/execenv/runtime_config_sections.go
@@ -67,7 +67,7 @@ func multicaCLICommand() string {
// readiness verification, durable logs, and a cleanup handle.
func writeBackgroundTaskSafetySlim(b *strings.Builder) {
b.WriteString("## Background Task Safety\n\n")
- b.WriteString("Multica marks the task terminal the moment your top-level turn exits — any run-owned work still active is orphaned, its result lost, and the final comment you meant to post never sends. There is no background-completion wakeup, whatever a tool response promises; an issue wakeup (`multica issue wakeup create`) is different — the platform stores it and starts a new run later. Never background-and-yield: collect required results inside foreground tool calls that block to completion, run unobservable work synchronously, and never end a turn \"standing by\" for something to finish — that message becomes your final output.\n\n")
+ b.WriteString("Multica marks the task terminal the moment your top-level turn exits — any run-owned work still active is orphaned, its result lost, and the final comment you meant to post never sends. There is no background-completion wakeup, whatever a tool response promises; an issue or chat wakeup (`multica issue wakeup create` / `multica chat wakeup create`) is different — the platform stores it and starts a new run later. Never background-and-yield: collect required results inside foreground tool calls that block to completion, run unobservable work synchronously, and never end a turn \"standing by\" for something to finish — that message becomes your final output.\n\n")
b.WriteString("External systems triggered by your completed actions — CI, GitHub Actions after a successful push — are not run-owned: do not wait for them, and do not run `gh pr checks --watch`, `gh run watch`, or sleep/retry polls. A repo's merge gate (\"CI must be green before merge\") is NOT your delivery acceptance criteria. Deliver what you have — \"Local tests pass; CI running: <PR link>\" is a complete hand-off. The one exception: when the trigger comment or the issue's acceptance criteria explicitly ask for the CI result, collect it as ONE foreground blocking call (`gh pr checks <pr> --watch`) inside this same turn.\n\n")
b.WriteString("A user explicitly asking for a local service to stay available after the turn is a persistent service handoff, not background-and-yield — allowed only when the running service itself is the requested deliverable. Detach its lifecycle from this run first (durable logs, a recorded cleanup handle such as PID/profile), verify readiness, and reply with the URL, logs, and stop instructions. Without a supervisor, describe survival as best-effort, not guaranteed. When the repository declares the service in `.multica/environments.toml`, start it with `multica env start <name>` instead: the daemon supervises it, keeps its log, stops it at its TTL, and shows it in the issue sidebar.\n\n")
b.WriteString("Never terminate `multica` or `multica.exe` by executable name: a long-lived matching process may be the workspace daemon. Cancel only the exact child PID you started, and before terminating it compare that PID with `multica daemon status --output json`; never kill it if it is the reported daemon PID.\n\n")
@@ -267,7 +267,6 @@ func writeAvailableCommands(b *strings.Builder, ctx TaskContextForEnv) {
b.WriteString("## Available Commands\n\n")
b.WriteString("Prefer `--output json` for structured data. The default brief lists only the core agent loop and common issue create/update tasks; for everything else run `multica --help` or `multica <command> --help`.\n\n")
b.WriteString("`--output json` writes JSON to stdout; confirmations and warnings go to stderr. Do not merge them (`2>&1`) into anything that parses the output — that makes a write that SUCCEEDED look like it failed and invites a duplicate retry.\n\n")
- b.WriteString("Workspace docs are available via `multica doc list|get|create|update`; updates require --base-revision from doc get.\n\n")
b.WriteString("### Core\n")
b.WriteString("- `multica issue get <id> --output json` — full issue.\n")
b.WriteString("- `multica issue comment list <issue-id> [--roots-only] [--summary] [--thread <comment-id> [--tail N] | --recent N] [--since <RFC3339>] [--compact] --output json` — thread-aware comment reads. Read in two bounded steps: scan with `--roots-only --summary`, then expand one thread with `--thread <id> --tail N`. Careful with `--recent N`: it caps THREADS, not comments, and can return the whole history on a small issue. Resolved-thread folding, paging cursors, and full flag semantics: `--help`.\n")
@@ -278,6 +277,7 @@ func writeAvailableCommands(b *strings.Builder, ctx TaskContextForEnv) {
b.WriteString(duplicateOfCommandLine)
b.WriteString("- `multica issue wakeup <create|list|get|update|disable|trigger|delete|runs|events>` — persist an event, condition or time wakeup on this issue, then finish the current run. When the platform can check the fact itself, use one `--until-*` condition so no run starts before it holds; check the rule's `last_error` for missing PR links or snapshots, which are retried automatically. Conditions, PR rules and actor filters: `multica issue wakeup create --help` and the multica-platform issues reference.\n")
b.WriteString("- `multica issue children <id> [--output json]` — list a parent's sub-issues grouped by stage.\n")
+ b.WriteString("- `multica doc list|get|create|update` — workspace docs; `doc update` needs `--base-revision` from `multica doc get` (details: `multica doc --help`).\n")
b.WriteString("- `multica issue comment add <issue-id> [--content \"...\" | --content-file <path> | --content-stdin] [--parent <comment-id>] [--attachment <path>]` — post a comment. Agent-authored bodies MUST use `--content-file` with a file inside your working directory; full flags: `multica issue comment add --help`.\n")
b.WriteString("- `multica repo checkout <url> [--ref <branch-or-sha>] [--fresh]` — repository checkout on a dedicated branch; re-running it keeps a checkout that has uncommitted or unpushed work, or is already on this task's branch, and only fetches; a clean, fully pushed checkout on another branch starts over on a new branch. `--fresh` discards uncommitted and untracked files for a new branch; commits stay on the old branch, so push any you still need first.\n\n")
b.WriteString("Commits use the user's configured Git identity; keep it unless asked. For a requested override in a managed checkout use `git config --worktree user.name` / `user.email` — plain or `--local` config can leak into a shared cache; never change the global identity.\n\n")
@@ -611,7 +611,7 @@ func writeWorkflowChat(b *strings.Builder) {
b.WriteString("- If asked about the workspace, use `multica workspace get --output json`\n")
b.WriteString("- If asked to perform actions (create issues, update status, etc.), use the appropriate CLI commands\n")
b.WriteString("- If the task requires code changes, use `multica repo checkout <url>` to get the code first. Use `--ref <branch-or-sha>` when you need an exact revision\n")
- b.WriteString("- When you act toward someone else for the user (ask a person or agent something, hand off work, request a review, send an email or message), decide from the user's request whether they want the outcome back. If they asked for a decision, an answer, a review or work to be done, create a chat wakeup before you reply (`multica chat wakeup create --help`) so they never have to ask you to report back, and say what you are waiting for and until when. If they only wanted someone told, don't; when unsure, ask in your reply. Also create one whenever you promise to report back later (at a time they named, or while you watch something). For recurring work (every morning, every Friday), suggest an Autopilot instead\n")
+ b.WriteString("- When you act toward someone else for the user (ask a person or agent something, hand off work, request a review, send an email or message) and they want the outcome back (a decision, an answer, a review, work done), or whenever you promise to report back later, create a chat wakeup before you reply — read `multica chat wakeup create --help` first. If they only wanted someone told, don't; when unsure, ask in your reply\n")
b.WriteString("- Keep responses concise and direct\n\n")
}
diff --git a/server/internal/service/builtin_skills/multica-platform/references/inbox.md b/server/internal/service/builtin_skills/multica-platform/references/inbox.md
index 4747e56abb..d678e33066 100644
--- a/server/internal/service/builtin_skills/multica-platform/references/inbox.md
+++ b/server/internal/service/builtin_skills/multica-platform/references/inbox.md
@@ -45,7 +45,7 @@ still found by `--issue`.
```bash
multica inbox read <id>... # and the rest of each issue
-multica inbox read --issue MUL-123 # every notification on one issue
+multica inbox read --issue MUL-123 # every notification on one issue, unless it is snoozed
multica inbox unread <id>... # only that notification
multica inbox archive <id>... # and the rest of each issue
multica inbox unarchive <id>...
diff --git a/server/internal/service/builtin_skills/multica-platform/references/mentions.md b/server/internal/service/builtin_skills/multica-platform/references/mentions.md
index 2f80211b9b..f121ead607 100644
--- a/server/internal/service/builtin_skills/multica-platform/references/mentions.md
+++ b/server/internal/service/builtin_skills/multica-platform/references/mentions.md
@@ -44,14 +44,20 @@ blockquotes, or `<details>`. A fenced `diff` of agent instructions cannot invoke
its mention targets. Copy the mention syntax out of code and paste it into
ordinary prose to trigger it. Prose mentions in blockquotes still count.
-One `mention://` form deliberately sits OUTSIDE this parser:
+Two `mention://` forms deliberately sit OUTSIDE this parser. The first is
`[Label](mention://project/<uuid>)`. `project` is absent from the type group
above, so the backend never parses it and it can enqueue nothing — it is a
render-only link every client makes navigable (a chip on web and desktop, an
ordinary link that opens the project on tap on mobile). That is the whole point:
a project reference should never be able to start a run. Use it freely to point
-at a project; everything else in this document is about the four types (plus
-`all`) the parser does recognize.
+at a project.
+
+The second is `[Doc Title](mention://doc/<doc-id>)`:
+`doc` is not in the type group either, so a doc link is render-only and
+enqueues nothing. Read the doc it points at with `multica doc get <doc-id>`.
+
+Everything else in this document is about the four types (plus `all`) the
+parser does recognize.
## Step 1 — look up the UUID