@coralai/sps-cli 0.35.17 → 0.35.18
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 +1 -1
- package/skills/sps-pipeline/SKILL.md +26 -8
package/package.json
CHANGED
|
@@ -35,27 +35,45 @@ Ask the user:
|
|
|
35
35
|
3. **需要什么 skill profile?** — 如 `frontend`、`backend`、`phaser`(可选,留空用默认)
|
|
36
36
|
4. **最大并发 Worker 数?** — 默认 `1`
|
|
37
37
|
|
|
38
|
+
### CRITICAL: State Chain Rules
|
|
39
|
+
|
|
40
|
+
When generating multi-stage YAML, follow these rules strictly:
|
|
41
|
+
|
|
42
|
+
1. **Each stage's `on_complete` MUST point to the NEXT stage's `trigger` state** — never skip stages, never loop back to the same state
|
|
43
|
+
2. **Each stage MUST have a unique `card_state`** — no two stages share the same active state
|
|
44
|
+
3. **The last stage's `on_complete` MUST be `"move_card Done"`**
|
|
45
|
+
4. **The last stage SHOULD have `queue: fifo`** and `completion: fast-forward-merge` for safe merging
|
|
46
|
+
5. **States flow in one direction**: Ready → Stage1Active → Stage2Active → ... → Done
|
|
47
|
+
|
|
48
|
+
Example state chain for 3 stages:
|
|
49
|
+
```
|
|
50
|
+
Ready → [develop] Inprogress → [code-review] CodeReview → [integrate] QA → Done
|
|
51
|
+
trigger card_state trigger card_state trigger card_state
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
WRONG patterns to avoid:
|
|
55
|
+
- `on_complete: "move_card Done"` on a non-last stage (skips remaining stages)
|
|
56
|
+
- `trigger: "card_enters 'Done'"` (Done is the terminal state, never trigger from it)
|
|
57
|
+
- Two stages with same `card_state: QA` (ambiguous, both stages compete)
|
|
58
|
+
|
|
38
59
|
### Step 3: Generate and deploy
|
|
39
60
|
|
|
40
61
|
Based on the answers:
|
|
41
62
|
1. Run `sps project init <name>` if project doesn't exist
|
|
42
|
-
2. Generate the pipeline YAML file at
|
|
63
|
+
2. Generate the pipeline YAML file at `~/.coral/projects/<name>/pipelines/project.yaml`
|
|
43
64
|
3. Update project conf at `~/.coral/projects/<name>/conf`
|
|
44
65
|
4. Run `sps doctor <name> --fix` to validate
|
|
45
66
|
5. Show the user the generated YAML and explain each section
|
|
46
67
|
|
|
47
68
|
### Pipeline YAML location
|
|
48
69
|
|
|
49
|
-
The YAML file
|
|
70
|
+
The YAML file lives in `~/.coral/projects/<name>/pipelines/`:
|
|
50
71
|
```
|
|
51
|
-
|
|
52
|
-
└──
|
|
53
|
-
└──
|
|
54
|
-
└── project.yaml ← pipeline definition
|
|
72
|
+
~/.coral/projects/<name>/
|
|
73
|
+
└── pipelines/
|
|
74
|
+
└── project.yaml ← pipeline definition
|
|
55
75
|
```
|
|
56
76
|
|
|
57
|
-
`.sps/` should be in `.gitignore` (sps doctor --fix handles this automatically).
|
|
58
|
-
|
|
59
77
|
### Example conversation
|
|
60
78
|
|
|
61
79
|
User: "帮我创建一个新项目的 pipeline"
|