@coralai/sps-cli 0.51.10 → 0.51.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralai/sps-cli",
3
- "version": "0.51.10",
3
+ "version": "0.51.11",
4
4
  "description": "SPS CLI — AI-driven development pipeline orchestrator",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -204,17 +204,36 @@ Stop hook reads this to detect which card the worker just finished.
204
204
 
205
205
  ## 5. Card management
206
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
+
207
217
  ```bash
208
- # Create
218
+ # Agent / Worker 主路径 — 直接进 Backlog 自动跑
209
219
  sps card add <project> "Title" "Description"
210
220
  sps card add <project> "T" "D" --skills python,backend --labels feature
211
- # (or use console UI's "新卡片" form)
212
221
 
213
- # View
222
+ # 想暂存(让用户审核 / 自己稍后拖派发)
223
+ sps card add <project> "Title" "Description" --draft
224
+ # → 卡进 Planning,等手动拖到 Backlog
225
+ ```
226
+
227
+ ### View
228
+
229
+ ```bash
214
230
  sps card dashboard <project> # CLI table
215
231
  # console: /board?project=<name>
232
+ ```
216
233
 
217
- # Lifecycle (machine-managed, but you can intervene)
234
+ ### Lifecycle (machine-managed, but you can intervene)
235
+
236
+ ```bash
218
237
  sps card mark-started <p> <seq> # called by Claude Code UserPromptSubmit hook
219
238
  sps card mark-complete <p> <seq> # called by Claude Code Stop hook
220
239
  sps reset <p> # reset all non-Done
@@ -222,11 +241,13 @@ sps reset <p> --card 5,6,7 # reset specific seq
222
241
  sps reset <p> --all # full reset incl. Done
223
242
  ```
224
243
 
244
+ 注:`sps reset` 把卡退回 **Planning**(不是 Backlog) — 重置 = 退回人工控制,需手动拖回 Backlog 才会再跑。这是 v0.51.9 起的语义。
245
+
225
246
  ### Card label vocabulary
226
247
 
227
248
  | Label | Meaning | Who sets |
228
249
  |---|---|---|
229
- | `AI-PIPELINE` | Required to enter pipeline | User on creation |
250
+ | `AI-PIPELINE` | "SPS pipeline 卡" 的标记(v0.51.9+ 不再触发任何自动行为,仅识别) | `sps card add` 自动加 |
230
251
  | `STARTED-<stage>` | ACK signal — Claude received the prompt | UserPromptSubmit hook |
231
252
  | `COMPLETED-<stage>` | Worker finished a stage | Stop hook |
232
253
  | `CLAIMED` | StageEngine reserved a worker slot | Engine |
@@ -350,7 +371,7 @@ Live at `~/.coral/projects/<name>/conf` (shell `export VAR="value"` syntax).
350
371
  | `GITLAB_PROJECT` | — | `user/repo` (optional, for GitLab API) |
351
372
  | `GITLAB_MERGE_BRANCH` | `main` | Worker pushes here |
352
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` |
353
- | `PIPELINE_LABEL` | `AI-PIPELINE` | Required label on cards to enter pipeline |
374
+ | `PIPELINE_LABEL` | `AI-PIPELINE` | Marker label auto-added by `sps card add` — identifies SPS-managed cards. v0.51.9+ 不再触发自动状态提升(卡按入场 state 决定是否跑) |
354
375
  | `MR_MODE` | `none` | `none` (push direct) / `create` (open MR; needs `GITLAB_PROJECT_ID`) |
355
376
  | `WORKER_TRANSPORT` | `acp-sdk` | Fixed; do not change |
356
377
  | `MAX_CONCURRENT_WORKERS` | `1` | Slot count; cards still serial within a project |
@@ -426,8 +447,7 @@ Common issues:
426
447
  - **Worker not starting** — `sps worker ps`, then check `sps logs --err`. Often
427
448
  Claude API key missing or `claude-agent-acp` adapter not installed (`sps setup`
428
449
  reinstalls it).
429
- - **Cards stuck in Planning (v0.51.9+)** — Planning 是人工暂存。手动拖到 Backlog 即派发。`sps card add`
430
- applies it automatically.
450
+ - **Cards stuck in Planning (v0.51.9+)** — Planning 是人工暂存。**Console 表单建卡默认到这里**,需手动拖到 Backlog 派发。Agent / `sps card add` 默认进 Backlog 自动跑(不会卡在 Planning)。
431
451
  - **ACK timeout on every card** — Claude cold-start is slow with many skills/memory
432
452
  files. Raise `WORKER_ACK_TIMEOUT_S` in conf (default 300s as of v0.50.24).
433
453
  - **Console shows stale data** — SSE may have dropped; reload page; if persistent,