Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"name": "multica-ai"
},
"metadata": {
"description": "Teach a local coding agent to operate Multica through the authenticated multica CLI",
"description": "Operate Multica and orchestrate workspace-aware business workflows through the authenticated multica CLI",
"version": "1.1.0"
},
"plugins": [
{
"name": "multica-cli",
"source": "./",
"description": "Operate Multica from a local coding agent via the multica CLI: issues, comments, metadata, mentions, and status side effects.",
"description": "Operate Multica and turn business goals into workspace-aware execution plans through the authenticated multica CLI.",
"version": "1.1.0",
"author": {
"name": "multica-ai"
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multica-cli",
"description": "Teach a local coding agent to operate Multica through the authenticated multica CLI.",
"description": "Operate Multica and orchestrate workspace-aware business workflows through the authenticated multica CLI.",
"version": "1.1.0",
"author": {
"name": "multica-ai"
Expand Down
3 changes: 3 additions & 0 deletions .cursor/rules/multica-cli.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ around the missing flags.
- **Never store or expose tokens**, and never bypass workspace permissions via private HTTP APIs.
- **Say when the CLI can't do it.** Name the step and point at Multica Web rather than
letting a partial run read as a completed one.
- **Orchestrate open-ended business goals.** Search only relevant workspace resources,
synthesize existing context and capabilities, prefer reuse, then present one complete
execution plan for confirmation. Follow `references/orchestration.md` for the full flow.

## Full reference

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ jobs:
- name: Lint regression tests
run: scripts/test-lint.py

- name: Business orchestration contract
run: python3 scripts/test-orchestration-contract.py

- name: Lint documented commands
run: |
if [ "${{ matrix.cli }}" = "min" ]; then
Expand Down
25 changes: 25 additions & 0 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,31 @@ multica issue assign <issue-id> --to-id <user-id>
`issue create` refuses when an active duplicate already exists. Read that issue
before reaching for `--allow-duplicate`.

## Turn a business goal into an execution plan

> Find the team's existing data-labeling workflow and capabilities, then plan
> weekly rainy-day dataset labeling. Execute it after I confirm.

The agent should inspect relevant existing resources, including Issue
discussions where prior decisions may live, and synthesize what can be reused.
It then presents the complete resource choices, capability gaps, mutations,
dependencies, and acceptance criteria, and can execute it after one
confirmation:

```bash
multica issue search "rainy data labeling" --include-closed --output json
multica project list --output json
multica agent list --output json
multica skill list --output json
multica autopilot list --output json
```

This is targeted discovery, not a full workspace dump. The agent gets details
only for plausible matches, cites their identifiers in the proposal, prefers
reuse when behavior need not change, and treats unknown sharing as shared. A
material difference discovered during execution pauses the affected step for a
revised confirmation.

## Record progress without starting another run

> Mark MUL-123 in progress — I'm already working on it.
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ A portable skill that teaches any local coding agent — Claude Code, Codex, Cur
and others — how to operate [Multica](https://github.com/multica-ai/multica)
through the authenticated `multica` CLI: read and triage issues, reply to
comments safely, manage metadata, and handle mention/status side effects.
For open-ended goals, it can discover relevant workspace context and
capabilities so teams reuse existing work instead of rebuilding it.

English | [简体中文](./README.zh.md)

Expand All @@ -31,6 +33,14 @@ drive Multica safely; it never bypasses workspace permissions or stores secrets.
- Inspecting run history and token usage; cancelling a run when asked
- Linking pull requests back to Multica issues
- Saying so plainly when the CLI cannot do something, instead of faking it
- Turning open-ended goals into executable plans through targeted workspace
discovery
- Summarizing existing team context and matching available Agent and Skill
capabilities
- Reusing existing work instead of rebuilding it, with sharing-risk checks
- Presenting the complete business orchestration plan for one confirmation,
then executing it in dependency order (Agent and Skill mutations are
confirmed separately)

## Install

Expand Down Expand Up @@ -85,6 +95,13 @@ Ask your agent to work with Multica once the skill is installed, for example:
Read MUL-123 with the multica CLI and draft a reply for me to review.
```

Or give it an outcome and let it find the relevant workspace context first:

```text
Find the team's existing data-labeling workflow and capabilities, then propose
a plan for weekly rainy-day dataset labeling. Execute it after I confirm.
```

For write operations (comments, status changes, mentions, new issues), the agent
should ask before making state changes unless you have already clearly
authorized that exact action. See [EXAMPLES.md](./EXAMPLES.md) for more.
Expand All @@ -96,6 +113,7 @@ linted against a real `multica` binary:

```bash
scripts/lint-skill-commands.py # or --verbose to see every check
python3 scripts/test-orchestration-contract.py
```

It fails when a documented command or flag no longer exists, and when a CLI
Expand Down
12 changes: 12 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ profile、当前 workspace,以及对每条命令的显式授权。这个 skill
- 查看 run 历史与 token 用量;在被要求时取消 run
- 把 pull request 关联回 Multica issue
- CLI 做不到的事直说,并指向 Multica Web,而不是假装已完成
- 针对开放式业务目标,定向检索 workspace 内相关资源并形成可执行方案
- 归纳团队已有业务信息,匹配 Agent、Skill 等现有能力
- 优先复用已有成果、避免重复建设,并根据共享风险决定是否新建隔离资源
- 在聊天中展示完整业务编排方案,用户一次确认后按依赖顺序执行(Agent / Skill
变更仍需单独确认)

## 安装

Expand Down Expand Up @@ -80,6 +85,12 @@ cp -R skills/multica-cli/* ~/.cursor/skills/multica-cli/
用 multica CLI 读一下 MUL-123,帮我起草一条回复让我 review。
```

也可以直接描述业务目标,让 agent 先查找 workspace 内已有信息和能力:

```text
查找团队已有的数据送标流程和能力,设计每周雨天数据送标方案,等我确认后执行。
```

对于写操作(评论、状态变更、mention、新建 issue),除非用户已经明确授权这个具体动作,
否则 agent 应在改动状态前先确认。更多示例见 [EXAMPLES.md](./EXAMPLES.md)。

Expand All @@ -90,6 +101,7 @@ cp -R skills/multica-cli/* ~/.cursor/skills/multica-cli/

```bash
scripts/lint-skill-commands.py # 加 --verbose 可看到每一条检查
python3 scripts/test-orchestration-contract.py
```

当文档里写的命令或 flag 已经不存在、或者 CLI 里有 `SKILL.md` 从未提及的命令时,
Expand Down
1 change: 1 addition & 0 deletions scripts/lint-skill-commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
# docs that get copy-pasted just as often, so they rot the same way.
DOC_FILES = [
"skills/multica-cli/SKILL.md",
"skills/multica-cli/references/orchestration.md",
"EXAMPLES.md",
"README.md",
"README.zh.md",
Expand Down
96 changes: 96 additions & 0 deletions scripts/test-orchestration-contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env python3
"""Pin the portable Skill's business-orchestration behavior."""

from __future__ import annotations

import sys
from pathlib import Path


ROOT = Path(__file__).resolve().parent.parent


def require(path: str, anchors: list[str], failures: list[str]) -> None:
target = ROOT / path
if not target.is_file():
failures.append(f"{path}: file is missing")
return
content = " ".join(target.read_text(encoding="utf-8").split())
for anchor in anchors:
if anchor not in content:
failures.append(f"{path}: missing {anchor!r}")


def main() -> int:
failures: list[str] = []

require(
"skills/multica-cli/SKILL.md",
[
"open-ended business goal",
"references/orchestration.md",
"Route by intent, not resource count",
],
failures,
)
require(
"skills/multica-cli/references/orchestration.md",
[
"targeted read-only discovery",
"Issues, Projects, Agents, Squads, Skills, and Autopilots",
"search or list first",
"business context and available capabilities",
"dedicated",
"shared",
"unknown",
"Treat unknown as shared",
"Prefer reuse over creating a duplicate",
"The in-chat orchestration design is the execution plan",
"one user confirmation",
"execute the plan directly",
"separate confirmation immediately before changing an Agent or Skill",
"material deviation",
"Multica Web",
],
failures,
)
require(
"README.md",
[
"targeted workspace discovery",
"reuse existing work instead of rebuilding it",
"one confirmation",
],
failures,
)
require(
"README.zh.md",
[
"定向检索",
"避免重复建设",
"一次确认",
],
failures,
)
require(
"EXAMPLES.md",
[
"Turn a business goal into an execution plan",
"inspect relevant existing resources",
"execute it after one confirmation",
],
failures,
)

if failures:
print(f"{len(failures)} orchestration contract check(s) failed:", file=sys.stderr)
for failure in failures:
print(f" - {failure}", file=sys.stderr)
return 1

print("Business orchestration contract passed.")
return 0


if __name__ == "__main__":
sys.exit(main())
10 changes: 9 additions & 1 deletion skills/multica-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: multica-cli
description: "Use when a local coding agent (Codex, Claude Code, Cursor, or similar) needs to operate Multica through the authenticated `multica` CLI: reading or updating issues, comments, metadata, labels, custom properties, subscribers, projects, agents, squads, runtimes, repos, skills, autopilots, attachments, or workspace state; searching issues; inspecting or cancelling agent runs; replying to a Multica issue from an external agent; creating or triaging issues; checking linked pull requests; or safely handling Multica mention/status side effects without relying on the Multica hosted agent runtime."
description: "Use when a local coding agent (Codex, Claude Code, Cursor, or similar) needs to operate Multica through the authenticated `multica` CLI: reading or updating issues, comments, metadata, labels, custom properties, subscribers, projects, agents, squads, runtimes, repos, skills, autopilots, attachments, or workspace state; turning an open-ended business goal into a workflow; searching issues; inspecting or cancelling agent runs; replying to a Multica issue from an external agent; creating or triaging issues; checking linked pull requests; or safely handling Multica mention/status side effects without relying on the Multica hosted agent runtime."
---

# Multica CLI
Expand Down Expand Up @@ -173,6 +173,14 @@ with that number, and the prefix is not validated — pasting an identifier from
another tracker can put an unrelated local issue at the top. The `match_source`
field is a display hint, not a filter.

## Business Goal Orchestration

For an open-ended business goal, resource-selection question, automation, or
set of dependent writes, read `references/orchestration.md` before proposing a
solution or changing state. Route by intent, not resource count. A concrete
operation on a known target stays in the direct read/write workflow in this
file.

## Write Workflow

Treat writes as side-effecting. If the user did not clearly ask for the write,
Expand Down
4 changes: 2 additions & 2 deletions skills/multica-cli/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface:
display_name: "Multica CLI"
short_description: "Operate Multica through the local CLI"
default_prompt: "Use $multica-cli to work with a Multica issue through the authenticated local CLI."
short_description: "Operate and orchestrate Multica through the local CLI"
default_prompt: "Use $multica-cli to operate Multica or turn a business goal into a workspace-aware execution plan through the authenticated local CLI."
Loading
Loading