pdlc-loop-next
Solid打印循环下一步应执行的命令(机器可读,供 loop 驱动)
AI & Automation 16 stars
2 forks Updated yesterday MIT
Install
Quality Score: 85/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 循环下一步(loop-next)
读取指定功能的状态机,**只打印一个 token**,告诉外层循环下一步该跑哪条命令。它是 `/pdlc-loop-run` 与用户自写 bash 循环的低层 helper——自身**只读、不改任何状态**、不含 `--autonomous` 语义。
## 输出契约(安全关键)
输出**必须**是下列固定白名单中的**单个 token**,独占一行,**不含任何散文、标点或解释,尤其不要用代码块(三反引号)或反引号包裹**:
```
pdlc-tdd | pdlc-implement | pdlc-review | done | blocked
```
- ✅ 正确:整个回复就是一行 `pdlc-implement`
- ❌ 错误:用 ``` 包成代码块、用反引号包住、加 `下一步:` 前缀或任何解释——**任何包裹/前缀都会让下游 `case` 匹配失败**。
- 本命令只覆盖**机械收敛段** `tdd → implement → review`。到达 `review_done` 或更后(发布属人工闸门)→ 输出 `done`,**绝不**输出 `pdlc-ship` / `pdlc-deploy`(发布永远留人)。
- 下游 helper **必须**先**净化**(去反引号/空白)再校验 token 属于白名单,非法即中止(见下方参考脚本)——这是防御模型偶发包裹的兜底。
## 执行流程
1. 从本命令的参数取功能ID;读取 `docs/.pdlc-state/<功能ID>.json`。
2. 文件不存在 / 无法解析 → 输出 `blocked`。
3. `last_phase_result.blocked_reason` 非空 → 输出 `blocked`。
4. `current_stage` 属终态(以 `_done` 结尾——即已发布:`ship_done` / `deploy_done`,或旧版本留下的 `feature_done` / `fix_done` / `review_done`)→ 输出 `done`。(注:单阶段命令的 `current_stage` 用短名 `impl`/`review`,review 完成的判定靠下面第 5 步的 `next_step`,不靠此处。)
5. 否则**以 `next_step`(状态机里存的下一跳命令名)为主键**判定并输出。
> ⚠️ **必须用 `next_step` 判定,不要用 `current_stage` 字符串匹配**:现有状态机的 `current_stage` 用短名(`requirements` / `design` / `tdd` / `impl` / `review`,如 `pdlc-implement` 明写 `current_stage: impl`),格式不适合直接判阶段;而 `next_step` 是无歧义的命令名。
| `next_step` | 输出 | 说明 |
|---|---|---|
| `pdlc-tdd` | `pdlc-tdd` | |
| `pdlc-implement` | `pdlc-implement` | |
| `pdlc-review` | `pdlc-review` | |
| `pdlc-ship` / `pdlc-deploy` | `done` | 机械收敛已完成(review 通过),发布留人 |
| `...
Details
- Author
- kanfu-panda
- Repository
- kanfu-panda/pdlc-skills
- Created
- 4 months ago
- Last Updated
- yesterday
- Language
- Shell
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
pdlc-loop-run
收敛循环引擎(自动推进 tdd→implement→review 到 review_done 或 blocked)
16 Updated yesterday
kanfu-panda AI & Automation Solid
pdlc-implement
按设计文档和已有测试用例实现代码(带前置守卫、自检、handoff)
16 Updated yesterday
kanfu-panda AI & Automation Solid
pdlc-review
代码评审 + 文档评审
16 Updated yesterday
kanfu-panda