From 8cb3e0d94351bdc1996901416a5408f788c514b5 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Wed, 29 Apr 2026 15:20:16 +0800 Subject: [PATCH] docs(execenv): expose label/subscriber CLI + complete create/update flag list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The agent-facing CLAUDE.md/AGENTS.md injected by InjectRuntimeConfig was missing every doorway to non-core issue properties: - `multica issue label list/add/remove` — the only way to label a newly created issue from the agent. Without it, agents either give up ("no command for that, please add it manually") or hallucinate flag names like `multica issue create --label foo` and fail. - `multica issue subscriber list/add/remove` — same story for the subscribe-on-behalf flow. - `multica label list/create` — agents need to discover existing label ids before they can attach one (we don't auto-create labels here). - `issue create` flag list dropped `--project`, `--due-date`, `--attachment` even though the CLI has supported them for a while. - `issue update` flag list dropped `--status`, `--assignee`, `--project`, `--due-date`, `--parent`, leaving agents thinking they could only edit title/description/priority via update. Also splits `issue status` from `issue update` in the doc so the agent sees the shortcut, and notes the `issue create` body intentionally does NOT accept labels/subscribers (use the post-create commands). --- .../internal/daemon/execenv/runtime_config.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/server/internal/daemon/execenv/runtime_config.go b/server/internal/daemon/execenv/runtime_config.go index 9c41f529c..f1cfc506d 100644 --- a/server/internal/daemon/execenv/runtime_config.go +++ b/server/internal/daemon/execenv/runtime_config.go @@ -72,6 +72,9 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string { b.WriteString("- `multica issue get --output json` — Get full issue details (title, description, status, priority, assignee)\n") b.WriteString("- `multica issue list [--status X] [--priority X] [--assignee X] [--limit N] [--offset N] --output json` — List issues in workspace (default limit: 50; JSON output includes `total`, `has_more` — use offset to paginate when `has_more` is true)\n") b.WriteString("- `multica issue comment list [--limit N] [--offset N] [--since ] --output json` — List comments on an issue (supports pagination; includes id, parent_id for threading)\n") + b.WriteString("- `multica issue label list --output json` — List labels currently attached to an issue\n") + b.WriteString("- `multica issue subscriber list --output json` — List members/agents subscribed to an issue\n") + b.WriteString("- `multica label list --output json` — List all labels defined in the workspace (returns id + name + color)\n") b.WriteString("- `multica workspace get --output json` — Get workspace details and context\n") b.WriteString("- `multica workspace members [workspace-id] --output json` — List workspace members (user IDs, names, roles)\n") b.WriteString("- `multica agent list --output json` — List agents in workspace\n") @@ -84,9 +87,15 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string { b.WriteString("- `multica autopilot runs [--limit N] --output json` — List execution history for an autopilot\n\n") b.WriteString("### Write\n") - b.WriteString("- `multica issue create --title \"...\" [--description \"...\"] [--priority X] [--assignee X] [--parent ] [--status X]` — Create a new issue\n") - b.WriteString("- `multica issue assign --to ` — Assign an issue to a member or agent by name (use --unassign to remove assignee)\n") - b.WriteString("- `multica issue comment add --content \"...\" [--parent ]` — Post a comment (use --parent to reply to a specific comment)\n") + b.WriteString("- `multica issue create --title \"...\" [--description \"...\"] [--priority X] [--status X] [--assignee X] [--parent ] [--project ] [--due-date ] [--attachment ]` — Create a new issue. `--attachment` may be repeated to upload multiple files; labels and subscribers are not accepted here, attach them after create with the commands below.\n") + b.WriteString("- `multica issue update [--title X] [--description X] [--priority X] [--status X] [--assignee X] [--parent ] [--project ] [--due-date ]` — Update one or more issue fields in a single call. Use `--parent \"\"` to clear the parent.\n") + b.WriteString("- `multica issue status ` — Shortcut for `issue update --status` when you only need to flip status (todo, in_progress, in_review, done, blocked, backlog, cancelled)\n") + b.WriteString("- `multica issue assign --to ` — Assign an issue to a member or agent by name (use `--unassign` to remove assignee)\n") + b.WriteString("- `multica issue label add ` — Attach a label to an issue (look up the label id via `multica label list`)\n") + b.WriteString("- `multica issue label remove ` — Detach a label from an issue\n") + b.WriteString("- `multica issue subscriber add [--user ]` — Subscribe a member or agent to issue updates (defaults to the caller when `--user` is omitted)\n") + b.WriteString("- `multica issue subscriber remove [--user ]` — Unsubscribe a member or agent\n") + b.WriteString("- `multica issue comment add --content \"...\" [--parent ] [--attachment ]` — Post a comment (use `--parent` to reply to a specific comment; `--attachment` may be repeated)\n") b.WriteString(" - **For multi-line content (anything with line breaks, paragraphs, code blocks, backticks, or quotes), you MUST pipe via stdin** — bash does NOT expand `\\n` inside double quotes, so writing `--content \"para1\\n\\npara2\"` stores the literal 4-char sequence and the comment renders without line breaks. Use a HEREDOC instead:\n") b.WriteString("\n") b.WriteString(" ```\n") @@ -99,8 +108,7 @@ func buildMetaSkillContent(provider string, ctx TaskContextForEnv) string { b.WriteString("\n") b.WriteString(" - The same rule applies to `--description` on `multica issue create` and `multica issue update` — use `--description-stdin` and pipe a HEREDOC for any multi-line description; the inline `--description \"...\"` form is for short single-line text only.\n") b.WriteString("- `multica issue comment delete ` — Delete a comment\n") - b.WriteString("- `multica issue status ` — Update issue status (todo, in_progress, in_review, done, blocked)\n") - b.WriteString("- `multica issue update [--title X] [--description X] [--priority X]` — Update issue fields\n") + b.WriteString("- `multica label create --name \"...\" --color \"#hex\"` — Define a new workspace label (use this only when the label you need does not exist yet; reuse existing labels via `multica label list` first)\n") b.WriteString("- `multica autopilot create --title \"...\" --agent --mode create_issue [--description \"...\"]` — Create an autopilot\n") b.WriteString("- `multica autopilot update [--title X] [--description X] [--status active|paused]` — Update an autopilot\n") b.WriteString("- `multica autopilot trigger ` — Manually trigger an autopilot to run once\n")