@coralai/sps-cli 0.58.0 → 0.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-CN.md +23 -0
- package/README.md +23 -0
- package/dist/shared/runtimeSchemas.d.ts +0 -2
- package/dist/shared/runtimeSchemas.d.ts.map +1 -1
- package/dist/shared/runtimeSchemas.js +3 -1
- package/dist/shared/runtimeSchemas.js.map +1 -1
- package/package.json +3 -1
- package/skills/sps-memory/SKILL.md +51 -0
- package/skills/sps-pipeline/SKILL.md +476 -0
package/README-CN.md
CHANGED
|
@@ -60,6 +60,29 @@ sps setup # 交互式向导(首次必跑)
|
|
|
60
60
|
|
|
61
61
|
要把 sps-cli 作为长驻服务跑(Console 网页 + IM 网关 + 流水线),走**源码构建**部署。下面步骤 AI 或运维照着从头到尾即可完成。
|
|
62
62
|
|
|
63
|
+
### 装完 npm 包后必补(否则跑不起来)
|
|
64
|
+
|
|
65
|
+
`npm install -g @coralai/sps-cli` **只给你 `sps` 命令**。要真正跑起来,还得补:
|
|
66
|
+
|
|
67
|
+
1. **Node ≥ 22**(代码图谱用 `node:sqlite`;CLI 其余 ≥ 18 即可)。
|
|
68
|
+
2. **`claude` CLI 在 PATH** —— worker 后端连的就是它(`sps doctor` 检查 `which claude`):
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g @anthropic-ai/claude-code
|
|
71
|
+
```
|
|
72
|
+
3. **Claude 鉴权**(三选一):`claude` 登录订阅(Pro / Max → `~/.claude/.credentials.json`)、或设 `ANTHROPIC_API_KEY`、或让 worker 指向第三方 Anthropic 端点 / codex-proxy。
|
|
73
|
+
4. **跑一次 `sps setup`** —— 建 `~/.coral/`、全局装 ACP 传输层 `@agentclientprotocol/claude-agent-acp`、写 `~/.coral/env`。
|
|
74
|
+
5. **git** —— 流水线在目标 repo 里开 worktree/分支。
|
|
75
|
+
|
|
76
|
+
**模型/订阅配置在包外**(secret,本机自配):官方订阅(`claude` 登录)开箱即用;第三方端点写 `~/.coral/game-platform/providers.json`;worker 默认模型 `~/.coral/agents/smartarrange.json`(可省)。
|
|
77
|
+
|
|
78
|
+
**自检机器是否就绪**:
|
|
79
|
+
```bash
|
|
80
|
+
sps project init demo
|
|
81
|
+
sps doctor demo --fix # 查 Node、claude 在不在 PATH、目录、配置——缺啥直接报
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
按需补(用到才配):ChatGPT 订阅 worker → `sps codex-proxy install && sps codex-proxy auth`;IM 网关 → `~/.coral/im/config.json`;远程 Console → `SPS_CONSOLE_TOKEN`。
|
|
85
|
+
|
|
63
86
|
### 依赖
|
|
64
87
|
|
|
65
88
|
- **Node ≥ 22** + npm(代码图谱用 `node:sqlite` 的 `DatabaseSync`,需 Node ≥ 22;CLI 其余部分 ≥ 18 即可)。
|
package/README.md
CHANGED
|
@@ -60,6 +60,29 @@ Re-run safe with `sps setup --force` (keeps existing values as defaults). After
|
|
|
60
60
|
|
|
61
61
|
For running sps-cli as long-lived services (Console web UI + IM gateway + pipeline) on a server, deploy **from source**. An AI or operator can follow the steps below end to end.
|
|
62
62
|
|
|
63
|
+
### After installing the npm package — required extras
|
|
64
|
+
|
|
65
|
+
`npm install -g @coralai/sps-cli` gives you the `sps` CLI **only**. To actually run it, also provide:
|
|
66
|
+
|
|
67
|
+
1. **Node ≥ 22** (code-graph uses `node:sqlite`; the rest of the CLI runs on ≥ 18).
|
|
68
|
+
2. **Claude Code CLI in PATH** — the worker backend drives it (`sps doctor` checks `which claude`):
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g @anthropic-ai/claude-code
|
|
71
|
+
```
|
|
72
|
+
3. **Claude auth** (one of): log in with `claude` (Pro / Max → `~/.claude/.credentials.json`), or set `ANTHROPIC_API_KEY`, or point workers at a third-party Anthropic endpoint / codex-proxy.
|
|
73
|
+
4. **Run `sps setup` once** — scaffolds `~/.coral/`, installs the ACP transport `@agentclientprotocol/claude-agent-acp` globally, writes `~/.coral/env`.
|
|
74
|
+
5. **git** — pipelines run worktrees/branches inside the target repo.
|
|
75
|
+
|
|
76
|
+
**Model / subscription config lives outside the package** (secrets, per machine): the official subscription (`claude` login) works out of the box; third-party endpoints go in `~/.coral/game-platform/providers.json`; the worker's default model in `~/.coral/agents/smartarrange.json` (optional).
|
|
77
|
+
|
|
78
|
+
**Verify the box is ready**:
|
|
79
|
+
```bash
|
|
80
|
+
sps project init demo
|
|
81
|
+
sps doctor demo --fix # checks Node, claude-in-PATH, dirs, config — reports what's missing
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Per-feature extras (only if used): ChatGPT-subscription worker → `sps codex-proxy install && sps codex-proxy auth`; IM gateway → `~/.coral/im/config.json`; remote Console → `SPS_CONSOLE_TOKEN`.
|
|
85
|
+
|
|
63
86
|
### Dependencies
|
|
64
87
|
|
|
65
88
|
- **Node ≥ 22** and npm (the code-graph feature imports `node:sqlite` — `DatabaseSync` — which requires Node ≥ 22; the rest of the CLI runs on ≥ 18).
|
|
@@ -37,8 +37,6 @@ export declare const ProjectConfSchema: z.ZodObject<{
|
|
|
37
37
|
PROJECT_DIR: z.ZodString;
|
|
38
38
|
PM_TOOL: z.ZodDefault<z.ZodEnum<{
|
|
39
39
|
markdown: "markdown";
|
|
40
|
-
github: "github";
|
|
41
|
-
gitlab: "gitlab";
|
|
42
40
|
}>>;
|
|
43
41
|
AGENT_PROVIDER: z.ZodDefault<z.ZodString>;
|
|
44
42
|
MAX_WORKERS: z.ZodDefault<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeSchemas.d.ts","sourceRoot":"","sources":["../../src/shared/runtimeSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;iBAW7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAK9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAYhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"runtimeSchemas.d.ts","sourceRoot":"","sources":["../../src/shared/runtimeSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;iBAW7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAK9D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAYhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAgB5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAM5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG1B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAoB3E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;iBAY7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -46,7 +46,9 @@ export const CardFrontmatterSchema = z.object({
|
|
|
46
46
|
export const ProjectConfSchema = z.object({
|
|
47
47
|
PROJECT_NAME: z.string().min(1),
|
|
48
48
|
PROJECT_DIR: z.string().min(1),
|
|
49
|
-
|
|
49
|
+
// v0.42+:卡片/PM 只有 markdown 后端(Plane/Trello 已移除;GitLab 是 repo/MR 侧,非 PM)。
|
|
50
|
+
// 收窄枚举 → 非法值在配置校验期即报错,而非运行时 createTaskBackend 才抛。
|
|
51
|
+
PM_TOOL: z.enum(['markdown']).default('markdown'),
|
|
50
52
|
AGENT_PROVIDER: z.string().default('claude'),
|
|
51
53
|
MAX_WORKERS: z
|
|
52
54
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeSchemas.js","sourceRoot":"","sources":["../../src/shared/runtimeSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qEAAqE;AACrE,0EAA0E;AAC1E,yEAAyE;AAEzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,sCAAsC;IACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,0CAA0C;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,oBAAoB;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,iCAAiC;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,0BAA0B;IAC1B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAIH,qEAAqE;AACrE,wDAAwD;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,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,SAAS,CAAC;IAC9D,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,SAAS;CACV,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coralai/sps-cli",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.1",
|
|
4
4
|
"description": "SPS CLI — AI-driven development pipeline orchestrator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"project-template",
|
|
28
28
|
"monitor-skills",
|
|
29
29
|
"profiles",
|
|
30
|
+
"skills/sps-pipeline",
|
|
31
|
+
"skills/sps-memory",
|
|
30
32
|
"README.md",
|
|
31
33
|
"README-CN.md"
|
|
32
34
|
],
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sps-memory
|
|
3
|
+
description: 项目级记忆 —— 续作/动手前召回历史经验,完成时记录可复用精华。统一走 `sps memory` CLI,后端(本地文件 / agentmemory / 自定义)由系统全局配置,你无需关心是哪个。召回触发:任务涉及已有项目、用户说"继续/上次/之前"、涉及代码仓库/部署路径/架构决策、需保持用户偏好。记录触发:产生新架构决策、任务/状态变化、发现新约束、用户纠正了你、产生可复用解决方案。(🪸 Coral SPS)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 项目记忆(sps-memory)
|
|
7
|
+
|
|
8
|
+
统一 CLI 读写,**后端无关**(本地文件 / agentmemory / 自定义由系统全局配置)。
|
|
9
|
+
项目名在环境变量 `$SPS_PROJECT`。开工时系统已自动召回一批注入上文;工作中按下列规则**主动**使用。
|
|
10
|
+
|
|
11
|
+
## 召回(读)
|
|
12
|
+
|
|
13
|
+
**何时(满足任一,就先召回再动手):**
|
|
14
|
+
- 任务涉及已有项目
|
|
15
|
+
- 用户说"继续 / 上次 / 之前"
|
|
16
|
+
- 涉及代码仓库、部署路径、架构决策
|
|
17
|
+
- 需要保持用户偏好
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
sps memory search "$SPS_PROJECT" "<关键词,如 部署路径 / 某模块架构 / 某引擎的坑>"
|
|
21
|
+
```
|
|
22
|
+
返回相关记忆标题;需要细节再据此深入(读文件 / 再检索)。
|
|
23
|
+
|
|
24
|
+
## 记录(写)
|
|
25
|
+
|
|
26
|
+
**何时(满足任一,就记一条):**
|
|
27
|
+
- 产生了新的架构决策
|
|
28
|
+
- 任务 / 状态发生变化
|
|
29
|
+
- 发现了新约束
|
|
30
|
+
- 用户纠正了你
|
|
31
|
+
- 产生了可复用的解决方案
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
sps memory add "$SPS_PROJECT" --type <lesson|decision|convention|reference> \
|
|
35
|
+
--name "<一句话标题>" --body "<要点>"
|
|
36
|
+
```
|
|
37
|
+
- `decision` 架构/技术决策 · `lesson` 踩过的坑/教训 · `convention` 约定/规范 · `reference` 参考/路径
|
|
38
|
+
- 只记**非显然、可复用**的精华,别记流水账。
|
|
39
|
+
- 写入是**提议**——系统会事后去重和审计,轻微重复不必担心。
|
|
40
|
+
|
|
41
|
+
## 不要记
|
|
42
|
+
|
|
43
|
+
代码结构 / 文件路径(Read·Glob 可得)· git 历史 · 临时调试态 · CLAUDE.md/docs 已有的 · 卡/任务状态。
|
|
44
|
+
**不确定就不写** —— 空增长比不增长更糟。
|
|
45
|
+
|
|
46
|
+
## 诚实
|
|
47
|
+
|
|
48
|
+
- 不编造;只记用户说过的或你真发现的。
|
|
49
|
+
- 记错了就改 / 删,别在矛盾上再堆一条。
|
|
50
|
+
|
|
51
|
+
记忆服务不可用时跳过,不阻塞任务。
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sps-pipeline
|
|
3
|
+
description: |
|
|
4
|
+
SPS pipeline & project management — set up projects, configure YAML pipelines, manage
|
|
5
|
+
task cards, drive worker lifecycle, run web console, monitor health. Use when the user
|
|
6
|
+
asks to "create a pipeline", "set up a project", "add tasks", "start the pipeline",
|
|
7
|
+
"open console", "check status", or anything in the SPS workflow. (🪸 Coral SPS)
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# SPS Pipeline (v0.51.x — Single-Worker Card Pipeline + Web Console + Wiki)
|
|
11
|
+
|
|
12
|
+
SPS drives an AI worker through task cards. **One worker, one card at a time, serial
|
|
13
|
+
execution.** Each card walks one or more YAML-defined stages (e.g. `develop → review →
|
|
14
|
+
Done`); failure halts until the user resolves it. v0.50 added a 4-layer service
|
|
15
|
+
architecture; v0.51 added per-project Wiki knowledge base injection.
|
|
16
|
+
|
|
17
|
+
## Two ways to operate
|
|
18
|
+
|
|
19
|
+
| Mode | Command | Use when |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| **Web Console** (preferred) | `sps console` | Daily work — kanban, logs, worker dashboard, project create, conf editor, pipeline editor, chat with agent, all in one UI |
|
|
22
|
+
| **CLI** | `sps tick / card / worker / wiki / …` | Scripting, troubleshooting, headless servers |
|
|
23
|
+
|
|
24
|
+
Console listens on `127.0.0.1:4311` by default; opens browser auto. Single-instance
|
|
25
|
+
guard via `~/.coral/console.lock`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. First-time setup
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @coralai/sps-cli # latest (currently 0.51.x)
|
|
33
|
+
sps setup # ⭐ MUST RUN: interactive wizard
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`sps setup` does:
|
|
37
|
+
1. Creates `~/.coral/` directory tree (`projects/`, `memory/user/`, `memory/agents/`).
|
|
38
|
+
2. Copies bundled skills → `~/.coral/skills/`.
|
|
39
|
+
3. Interactively writes `~/.coral/env` (Git remote token, Matrix credentials, etc.).
|
|
40
|
+
4. Symlinks user skills → `~/.coral/.claude/skills/` and `~/.claude/skills/`.
|
|
41
|
+
5. Installs `@agentclientprotocol/claude-agent-acp` globally if missing.
|
|
42
|
+
|
|
43
|
+
Re-run safe: `sps setup --force` keeps existing values as defaults.
|
|
44
|
+
|
|
45
|
+
**No separate console config**. Console reads `~/.coral/env` + per-project conf.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 2. Create a project
|
|
50
|
+
|
|
51
|
+
### Option A — Console (recommended)
|
|
52
|
+
Open `sps console` → `/projects/new` → fill form → submit. Form provides:
|
|
53
|
+
- Project name + repo path
|
|
54
|
+
- Git toggle (worker commits + pushes? off for non-code projects)
|
|
55
|
+
- **Wiki toggle** (v0.51+): scaffolds `wiki/` + writes `WIKI_ENABLED=true` to conf
|
|
56
|
+
- Merge branch, max workers, ACK timeout, Matrix room
|
|
57
|
+
|
|
58
|
+
### Option B — Interactive CLI
|
|
59
|
+
```bash
|
|
60
|
+
sps project init <name> # asks the same questions on tty
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### What gets created
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
~/.coral/projects/<name>/
|
|
67
|
+
├── conf # your active settings (private, mode 600)
|
|
68
|
+
├── conf.example # full reference with comments (read-only docs)
|
|
69
|
+
├── pipelines/
|
|
70
|
+
│ ├── project.yaml # default 1-stage pipeline (develop → Done)
|
|
71
|
+
│ └── sample.yaml.example # heavily-commented YAML reference
|
|
72
|
+
├── pipeline_order.json # active pipeline pointer
|
|
73
|
+
├── runtime/
|
|
74
|
+
│ ├── state.json # worker slot + active card state (machine-managed)
|
|
75
|
+
│ └── tick.lock # lock file
|
|
76
|
+
├── logs/ # per-tick logs
|
|
77
|
+
├── pm_meta/ # markdown card backend metadata
|
|
78
|
+
└── cards/ # state subdirs created on first use
|
|
79
|
+
└── seq.txt
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Plus, in the **target repo** (PROJECT_DIR):
|
|
83
|
+
- `.claude/CLAUDE.md` — worker rules + (if wiki=on) wiki SOP block
|
|
84
|
+
- `.claude/skills/` — symlinked from `~/.coral/skills/`
|
|
85
|
+
- `.claude/settings.local.json` — Claude Code local config
|
|
86
|
+
- `wiki/` (if wiki=on) — knowledge base scaffold
|
|
87
|
+
- `ATTRIBUTION.md` (if wiki=on) — borrows declaration
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 3. Pipeline YAML
|
|
92
|
+
|
|
93
|
+
**Location**: `~/.coral/projects/<name>/pipelines/project.yaml`
|
|
94
|
+
|
|
95
|
+
**Single source of truth** for stages, profiles, transitions. Edit this file (or in
|
|
96
|
+
console at `/projects/<name>` pipeline editor) to customize.
|
|
97
|
+
|
|
98
|
+
### Critical YAML rules
|
|
99
|
+
|
|
100
|
+
1. **`mode: project`** — orchestrate cards through states. (`mode: steps` is for
|
|
101
|
+
one-shot custom pipelines via `sps pipeline run <name>`.)
|
|
102
|
+
2. **`on_complete` of each stage points to the next stage's target state.** No
|
|
103
|
+
skipping, no looping.
|
|
104
|
+
3. **Last stage's `on_complete: "move_card Done"`.**
|
|
105
|
+
4. **Don't write `agent:` field** — it's accepted for back-compat but ignored.
|
|
106
|
+
Claude (via ACP) is the only supported worker as of v0.38.0.
|
|
107
|
+
5. **Single worker, serial execution** — set `MAX_CONCURRENT_WORKERS` in conf if
|
|
108
|
+
you want >1 slot reserved, but cards still run one at a time.
|
|
109
|
+
6. **Failure halts pipeline** by default (`on_fail.halt: true`). Worker labels card
|
|
110
|
+
`NEEDS-FIX`; user must resolve before next card runs.
|
|
111
|
+
|
|
112
|
+
### Templates
|
|
113
|
+
|
|
114
|
+
**Simple (1 stage):**
|
|
115
|
+
```yaml
|
|
116
|
+
mode: project
|
|
117
|
+
git: true
|
|
118
|
+
stages:
|
|
119
|
+
- name: develop
|
|
120
|
+
on_complete: "move_card Done"
|
|
121
|
+
on_fail:
|
|
122
|
+
action: "label NEEDS-FIX"
|
|
123
|
+
halt: true
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**With review (2 stages):**
|
|
127
|
+
```yaml
|
|
128
|
+
mode: project
|
|
129
|
+
git: true
|
|
130
|
+
stages:
|
|
131
|
+
- name: develop
|
|
132
|
+
profile: fullstack
|
|
133
|
+
on_complete: "move_card Review"
|
|
134
|
+
on_fail: { action: "label NEEDS-FIX", halt: true }
|
|
135
|
+
- name: review
|
|
136
|
+
profile: reviewer
|
|
137
|
+
on_complete: "move_card Done"
|
|
138
|
+
on_fail: { action: "label REVIEW-FAILED", halt: true }
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Non-git (data / docs project):**
|
|
142
|
+
```yaml
|
|
143
|
+
mode: project
|
|
144
|
+
git: false
|
|
145
|
+
stages:
|
|
146
|
+
- name: process
|
|
147
|
+
profile: tax-worker
|
|
148
|
+
on_complete: "move_card Done"
|
|
149
|
+
on_fail: { action: "label PROCESS-FAILED", halt: true }
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### YAML field reference
|
|
153
|
+
|
|
154
|
+
| Field | Required | Notes |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `mode` | yes | `project` (state machine) or `steps` (one-shot, run via `sps pipeline run`) |
|
|
157
|
+
| `git` | no | `true` (default) — worker commits + pushes / `false` — no git ops |
|
|
158
|
+
| `stages` | yes | Array |
|
|
159
|
+
| `stages[].name` | yes | Unique within file |
|
|
160
|
+
| `stages[].profile` | no | Skill profile (e.g. `fullstack` / `reviewer` / `tax-worker`); falls back to `DEFAULT_WORKER_SKILLS` in conf |
|
|
161
|
+
| `stages[].on_complete` | yes | `"move_card <NextState>"` |
|
|
162
|
+
| `stages[].on_fail.action` | no | `"label NEEDS-FIX"` etc. |
|
|
163
|
+
| `stages[].on_fail.halt` | no | default `true` |
|
|
164
|
+
| `stages[].on_fail.comment` | no | Comment text |
|
|
165
|
+
| `stages[].timeout` | no | `30s` / `5m` / `2h` (rare) |
|
|
166
|
+
|
|
167
|
+
`trigger` and `card_state` are auto-derived per stage from the position. Don't set
|
|
168
|
+
manually.
|
|
169
|
+
|
|
170
|
+
### Custom pipelines (mode: steps)
|
|
171
|
+
|
|
172
|
+
For one-shot scripted runs (e.g. canary deploy, bulk ingest), use `mode: steps` and
|
|
173
|
+
invoke via `sps pipeline run <pipeline-name> "<prompt>"`. Out of scope for normal
|
|
174
|
+
card pipelines; see `sample.yaml.example` for syntax.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 4. Card state machine
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
v0.51.9 起:
|
|
182
|
+
|
|
183
|
+
Backlog → Todo → Inprogress → [QA / Review] → Done
|
|
184
|
+
↑↓
|
|
185
|
+
Planning(用户手动暂存;不自动派发)
|
|
186
|
+
↓ fail
|
|
187
|
+
NEEDS-FIX (halt)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Default states (configurable in YAML `pm.card_states`):
|
|
191
|
+
- **Planning** — v0.51.10+:人工暂存 / 草稿。**console "新卡片" 表单**默认入此状态;用户拖到 Backlog 才会跑。
|
|
192
|
+
- **Backlog** — **`sps card add`(CLI / agent)**默认入此状态;StageEngine 抢卡执行。
|
|
193
|
+
- **Todo** — StageEngine 已 prep(建分支 / worktree),下次 tick 派 worker
|
|
194
|
+
- **Inprogress** — worker active
|
|
195
|
+
- **QA** (or **Review**) — code complete, awaiting human/auto verification
|
|
196
|
+
- **Done** — finished
|
|
197
|
+
- **Canceled** — folded into Done view (rare state)
|
|
198
|
+
|
|
199
|
+
Engines walk this graph each tick. The **active stage** writes a per-slot marker
|
|
200
|
+
file at `~/.coral/projects/<p>/runtime/worker-<slot>-current.json` (v0.50.21+).
|
|
201
|
+
Stop hook reads this to detect which card the worker just finished.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## 5. Card management
|
|
206
|
+
|
|
207
|
+
### Where new cards land — depends on caller (v0.51.10+)
|
|
208
|
+
|
|
209
|
+
| 调用方 | 默认入场 state | 行为 |
|
|
210
|
+
|---|---|---|
|
|
211
|
+
| **`sps card add`** (CLI / Worker / agent) | **Backlog** | 下次 tick 立即被 StageEngine 抢卡跑 |
|
|
212
|
+
| **Console "新卡片" 表单** | **Planning** | 暂存;用户在看板拖到 Backlog 才会跑 |
|
|
213
|
+
| **`POST /api/projects/<p>/cards`** 直接调 API | **Planning** | 默认人工语义;body 传 `initialState: 'Backlog'` 立即跑 |
|
|
214
|
+
|
|
215
|
+
**Agent 调 `sps card add` → 卡进 Backlog → 自动跑。** 这是 SPS 的主路径。Worker 在某个卡里需要"派生子任务"时用 `sps card add`,子任务会被下一个 tick 自动 pickup。
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Agent / Worker 主路径 — 直接进 Backlog 自动跑
|
|
219
|
+
sps card add <project> "Title" "Description"
|
|
220
|
+
sps card add <project> "T" "D" --skill python,backend
|
|
221
|
+
|
|
222
|
+
# 想暂存(让用户审核 / 自己稍后拖派发)
|
|
223
|
+
sps card add <project> "Title" "Description" --draft
|
|
224
|
+
# → 卡进 Planning,等手动拖到 Backlog
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### View
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
sps card dashboard <project> # CLI table
|
|
231
|
+
# console: /board?project=<name>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Lifecycle (machine-managed, but you can intervene)
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
sps card mark-started <p> <seq> # called by Claude Code UserPromptSubmit hook
|
|
238
|
+
sps card mark-complete <p> <seq> # called by Claude Code Stop hook
|
|
239
|
+
sps reset <p> # reset all non-Done
|
|
240
|
+
sps reset <p> --card 5,6,7 # reset specific seq
|
|
241
|
+
sps reset <p> --all # full reset incl. Done
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
注:`sps reset` 把卡退回 **Planning**(不是 Backlog) — 重置 = 退回人工控制,需手动拖回 Backlog 才会再跑。这是 v0.51.9 起的语义。
|
|
245
|
+
|
|
246
|
+
### Card label vocabulary
|
|
247
|
+
|
|
248
|
+
| Label | Meaning | Who sets |
|
|
249
|
+
|---|---|---|
|
|
250
|
+
| `AI-PIPELINE` | "SPS pipeline 卡" 的标记(v0.51.9+ 不再触发任何自动行为,仅识别) | `sps card add` 自动加 |
|
|
251
|
+
| `STARTED-<stage>` | ACK signal — Claude received the prompt | UserPromptSubmit hook |
|
|
252
|
+
| `COMPLETED-<stage>` | Worker finished a stage | Stop hook |
|
|
253
|
+
| `CLAIMED` | StageEngine reserved a worker slot | Engine |
|
|
254
|
+
| `NEEDS-FIX` | Worker failed; pipeline halted | Engine |
|
|
255
|
+
| `BLOCKED` | External dep; pipeline skips | User |
|
|
256
|
+
| `WAITING-CONFIRMATION` | Worker waiting on user input | Engine |
|
|
257
|
+
| `STALE-RUNTIME` | Inprogress > timeout | MonitorEngine |
|
|
258
|
+
| `ACK-TIMEOUT` | Claude never ACK'd within `WORKER_ACK_TIMEOUT_S` | MonitorEngine |
|
|
259
|
+
| `skill:<name>` | Force-load specific skill | User on card |
|
|
260
|
+
| `conflict:<domain>` | Serial-with-others-in-same-domain | User |
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 6. Pipeline lifecycle commands
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
# Run continuously (one tick spawns next via cron-like loop)
|
|
268
|
+
sps tick <project> # foreground tick(s) — Ctrl+C to stop
|
|
269
|
+
sps pipeline start <project> # alias for tick
|
|
270
|
+
sps pipeline stop <project> # graceful stop
|
|
271
|
+
sps stop <project> # CLI alias for stop
|
|
272
|
+
sps stop --all # stop all running ticks
|
|
273
|
+
|
|
274
|
+
# Status
|
|
275
|
+
sps status # all projects
|
|
276
|
+
sps pipeline status # alias
|
|
277
|
+
sps doctor <project> # health check
|
|
278
|
+
sps doctor <project> --fix # auto-repair drift
|
|
279
|
+
|
|
280
|
+
# One-off ticks (each engine separately, useful for cron / debugging)
|
|
281
|
+
sps scheduler tick <p> # v0.51.9 起为 no-op(dormant,保留接口)
|
|
282
|
+
sps pipeline tick <p> # full StageEngine pass
|
|
283
|
+
sps qa tick <p> # QA → Done finalization
|
|
284
|
+
sps monitor tick <p> # health probe (ACK timeout, stale runtime)
|
|
285
|
+
sps pm scan <p> # rebuild card index from disk
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Worker control
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
sps worker ps <project> # list slots + PIDs
|
|
292
|
+
sps worker dashboard <project> # rich UI (also in console)
|
|
293
|
+
sps worker kill <project> <seq> # SIGKILL one slot
|
|
294
|
+
sps worker launch <project> <seq> # manual spawn (debugging)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Logs
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
sps logs <project> # follow mode (default)
|
|
301
|
+
sps logs <project> --err # stderr only
|
|
302
|
+
sps logs <project> --lines 50 --no-follow
|
|
303
|
+
# console: /logs?project=<name> (live SSE)
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## 7. Web Console (`sps console`)
|
|
309
|
+
|
|
310
|
+
Single binary launches the web UI:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
sps console # opens http://127.0.0.1:4311
|
|
314
|
+
sps console --port 5000
|
|
315
|
+
sps console --no-open
|
|
316
|
+
sps console --kill # stop running console
|
|
317
|
+
sps console --dev # vite dev server (development)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Pages:
|
|
321
|
+
- `/projects` — list, summary cards
|
|
322
|
+
- `/projects/new` — create project (with Wiki toggle, v0.51)
|
|
323
|
+
- `/projects/<n>` — pipeline editor + conf editor + delete
|
|
324
|
+
- `/board` — kanban (with **per-column scrolling**, v0.51.1+)
|
|
325
|
+
- `/workers` — aggregate worker dashboard (all projects)
|
|
326
|
+
- `/logs` — live SSE log viewer
|
|
327
|
+
- `/skills` — user-level skill management
|
|
328
|
+
- `/system` — global settings, daemon status
|
|
329
|
+
- `/chat` — agent chat (multi-session, persistent)
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## 8. Memory & Wiki (auto-injected into Worker prompts)
|
|
334
|
+
|
|
335
|
+
| | **Memory** (`sps-memory` skill) | **Wiki** (`wiki-update` skill) |
|
|
336
|
+
|---|---|---|
|
|
337
|
+
| Purpose | Ad-hoc facts, user prefs, decisions, gotchas | Structured project knowledge: modules, concepts, decisions, lessons |
|
|
338
|
+
| Path | `~/.coral/memory/{user,agents,projects/<p>}/` | `<repo>/wiki/` (per-project, in repo) |
|
|
339
|
+
| Schema | Markdown + YAML frontmatter (`type: convention/decision/lesson/reference`) | 5 page types with zod-validated frontmatter |
|
|
340
|
+
| Cross-link | None (flat index) | `[[type/Title]]` wikilinks |
|
|
341
|
+
| Auto-inject | `buildFullMemoryContext` → prompt's `knowledge` section | `wikiRead` 5-layer → prompt's `wikiContext` section (only when `WIKI_ENABLED=true`) |
|
|
342
|
+
| When to use | Personal style notes, "remember X" requests | Project knowledge that benefits future cards |
|
|
343
|
+
|
|
344
|
+
If you're configuring a project that needs structured knowledge accumulation,
|
|
345
|
+
**enable Wiki** at create time. For ad-hoc facts only, memory alone is enough.
|
|
346
|
+
|
|
347
|
+
CLI helpers:
|
|
348
|
+
```bash
|
|
349
|
+
sps memory list <p>
|
|
350
|
+
sps memory context <p> # preview what gets injected
|
|
351
|
+
sps memory add <p> --type convention --name "title" --body "content"
|
|
352
|
+
|
|
353
|
+
sps wiki init <p> # scaffold (auto when WIKI_ENABLED=true)
|
|
354
|
+
sps wiki update <p> # source diff
|
|
355
|
+
sps wiki update <p> --finalize # flush manifest after pages written
|
|
356
|
+
sps wiki check <p> # lint
|
|
357
|
+
sps wiki read <p> "<query>" # preview prompt injection
|
|
358
|
+
sps wiki list/get/add/status # browse / inspect
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## 9. Conf reference (essentials)
|
|
364
|
+
|
|
365
|
+
Live at `~/.coral/projects/<name>/conf` (shell `export VAR="value"` syntax).
|
|
366
|
+
|
|
367
|
+
| Field | Default | Notes |
|
|
368
|
+
|---|---|---|
|
|
369
|
+
| `PROJECT_NAME` | (required) | Internal id |
|
|
370
|
+
| `PROJECT_DIR` | (required) | Repo absolute path |
|
|
371
|
+
| `GITLAB_PROJECT` | — | `user/repo` (optional, for GitLab API) |
|
|
372
|
+
| `GITLAB_MERGE_BRANCH` | `main` | Worker pushes here |
|
|
373
|
+
| `PM_TOOL` | `markdown` | **Only `markdown` supported as of v0.42.0**. Plane/Trello removed. Cards live in `~/.coral/projects/<n>/cards/<state>/<seq>.md` |
|
|
374
|
+
| `PIPELINE_LABEL` | `AI-PIPELINE` | Marker label auto-added by `sps card add` — identifies SPS-managed cards. v0.51.9+ 不再触发自动状态提升(卡按入场 state 决定是否跑) |
|
|
375
|
+
| `MR_MODE` | `none` | `none` (push direct) / `create` (open MR; needs `GITLAB_PROJECT_ID`) |
|
|
376
|
+
| `WORKER_TRANSPORT` | `acp-sdk` | Fixed; do not change |
|
|
377
|
+
| `MAX_CONCURRENT_WORKERS` | `1` | Slot count; cards still serial within a project |
|
|
378
|
+
| `MAX_ACTIONS_PER_TICK` | `3` | New tasks claimable per tick |
|
|
379
|
+
| `INPROGRESS_TIMEOUT_HOURS` | `2` | After this, MonitorEngine flags STALE-RUNTIME |
|
|
380
|
+
| `WORKER_ACK_TIMEOUT_S` | `300` | Wait for STARTED-<stage> label after dispatch (5min, raised in v0.50.24) |
|
|
381
|
+
| `WORKER_ACK_MAX_RETRIES` | `1` | ACK timeout retry count |
|
|
382
|
+
| `MONITOR_AUTO_QA` | `true` | Auto-advance to QA on stale runtime |
|
|
383
|
+
| `CONFLICT_DEFAULT` | `serial` | Fallback for cards without `conflict:` label |
|
|
384
|
+
| `MATRIX_ROOM_ID` | — | Project-level Matrix override |
|
|
385
|
+
| `WORKTREE_DIR` | `~/.coral/worktrees/<p>` | Worker scratch space |
|
|
386
|
+
| `DEFAULT_WORKER_SKILLS` | — | Comma-separated skill list when no `profile:` and no `card.skills` |
|
|
387
|
+
| `ENABLE_MEMORY` | `true` | Set `false` to skip memory write instructions in prompt |
|
|
388
|
+
| **`WIKI_ENABLED`** | unset (off) | **v0.51+**: `true` enables wiki context injection + reminder block |
|
|
389
|
+
| `COMPLETION_SIGNAL` | `done` | Word the Stop hook listens for |
|
|
390
|
+
|
|
391
|
+
Full reference: `~/.coral/projects/<n>/conf.example` (auto-generated, comment-rich).
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## 10. Architecture (4-layer, v0.50+)
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
Delivery (commands/, console/routes/)
|
|
399
|
+
→ execute* / HTTP routes; thin
|
|
400
|
+
Service (services/)
|
|
401
|
+
→ ProjectService / ChatService / PipelineService / SkillService — Result<T> + DomainEvent
|
|
402
|
+
Domain (engines/)
|
|
403
|
+
→ SchedulerEngine / StageEngine / MonitorEngine / EventHandler
|
|
404
|
+
Infrastructure (manager/, providers/, daemon/)
|
|
405
|
+
→ WorkerManager (single worker), ACPWorkerRuntime, sessionDaemon
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Engines
|
|
409
|
+
|
|
410
|
+
- **SchedulerEngine** — v0.51.9 起 dormant(卡 add 直接进 Backlog,无需提升)
|
|
411
|
+
- **StageEngine** — drives card through stages; builds prompt (skill + projectRules
|
|
412
|
+
+ memory + **wikiContext** + task description + **wikiUpdateReminder**); kicks
|
|
413
|
+
Worker via ACP
|
|
414
|
+
- **MonitorEngine** — ACK timeout detection, stale runtime, auto-QA promotion
|
|
415
|
+
- **CloseoutEngine / EventHandler** — finalize completed cards
|
|
416
|
+
|
|
417
|
+
### Single worker is intentional
|
|
418
|
+
|
|
419
|
+
v0.37.2 deleted multi-worker concurrency code by design. Don't propose "add a
|
|
420
|
+
parallel mode" — the architecture relies on serial execution for state coherence.
|
|
421
|
+
For higher throughput, run multiple projects in parallel (each its own tick loop).
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## 11. Troubleshooting
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
sps doctor <project> --fix # ★ first thing to try
|
|
429
|
+
sps logs <project> --err # stderr / errors
|
|
430
|
+
sps reset <project> --card <seq> # nuke a stuck card
|
|
431
|
+
sps reset <project> --all # full project reset (worktrees, branches, state)
|
|
432
|
+
|
|
433
|
+
# Worker / daemon issues
|
|
434
|
+
sps worker ps <project>
|
|
435
|
+
sps agent daemon status # is the chat daemon up?
|
|
436
|
+
sps agent daemon stop && sps agent daemon start # restart daemon (clears stale cwd)
|
|
437
|
+
|
|
438
|
+
# Wiki issues (v0.51+)
|
|
439
|
+
sps wiki check <project> # lint
|
|
440
|
+
sps wiki status <project> # source / manifest / pages diff
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Common issues:
|
|
444
|
+
|
|
445
|
+
- **Pipeline halted with NEEDS-FIX** — open the failed card, fix the issue, remove
|
|
446
|
+
the label. Console makes this 2 clicks.
|
|
447
|
+
- **Worker not starting** — `sps worker ps`, then check `sps logs --err`. Often
|
|
448
|
+
Claude API key missing or `claude-agent-acp` adapter not installed (`sps setup`
|
|
449
|
+
reinstalls it).
|
|
450
|
+
- **Cards stuck in Planning (v0.51.9+)** — Planning 是人工暂存。**Console 表单建卡默认到这里**,需手动拖到 Backlog 派发。Agent / `sps card add` 默认进 Backlog 自动跑(不会卡在 Planning)。
|
|
451
|
+
- **ACK timeout on every card** — Claude cold-start is slow with many skills/memory
|
|
452
|
+
files. Raise `WORKER_ACK_TIMEOUT_S` in conf (default 300s as of v0.50.24).
|
|
453
|
+
- **Console shows stale data** — SSE may have dropped; reload page; if persistent,
|
|
454
|
+
`sps console --kill && sps console`.
|
|
455
|
+
- **Wiki context not injecting** — verify `WIKI_ENABLED=true` in conf and
|
|
456
|
+
`wiki/WIKI.md` exists. StageEngine logs a warning if conf says yes but scaffold
|
|
457
|
+
is missing.
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## 12. Skill ↔ project linkage
|
|
462
|
+
|
|
463
|
+
User-level skills live in `~/.coral/skills/`. To use one in a specific project:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
sps skill list # what's available + project status
|
|
467
|
+
sps skill add <name> --project <p> # symlink into <repo>/.claude/skills/
|
|
468
|
+
sps skill remove <name> --project <p>
|
|
469
|
+
sps skill freeze <name> --project <p> # symlink → real copy (allow project edits)
|
|
470
|
+
sps skill unfreeze <name> --project <p> # back to symlink
|
|
471
|
+
sps skill sync # ① bundled (npm pkg) → ~/.coral/skills/
|
|
472
|
+
# ② ~/.coral/skills/ → ~/.claude/skills/
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**After upgrading sps-cli**, run `sps skill sync` to pick up new bundled skills
|
|
476
|
+
(e.g. `wiki-update` added in v0.51.0).
|