pdlc-relate
管理 feature 关系链(set/query/impact/orphans/rebuild/validate)
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
管理 feature 关系链(set/query/impact/orphans/rebuild/validate)
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
全自动 PDLC 新功能开发(串联 PRD→设计→TDD→实现→评审→发布)
全自动 Bug 修复(定位→复现→修复→测试→文档)
按设计文档和已有测试用例实现代码(带前置守卫、自检、handoff)
创建 PRD 文档(自动化生成 + 自检 + handoff)
质量闸门——跑真实 check、对照质量目标、出可核对报告,由人签字放行
代码评审 + 文档评审
| name | pdlc-relate |
| description | 管理 feature 关系链(set/query/impact/orphans/rebuild/validate) |
| argument-hint | <set|query|impact|orphans|rebuild|validate> [args] |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
| layer | 3 |
| stage | ops |
| produces | ["docs/.pdlc-state/_relations.json","docs/.pdlc-state/_graph.md"] |
| requires | [] |
| next_step | null |
| terminal_state | null |
管理 PDLC feature 之间的关系链。维护反向索引 docs/.pdlc-state/_relations.json 和全局图 docs/.pdlc-state/_graph.md。
从 $ARGUMENTS 解析子命令:
set <fid> <type> <target-fid> [target-fid...]为 feature <fid> 添加 <type> 关系,指向一或多个目标。
docs/.pdlc-state/<fid>.json;若无 relations 块(旧状态文件 / Phase 1 关系块可选),先初始化六类空块(extends/depends_on/supersedes/resolves/conflicts_with/relates_to),再在 relations.<type> 数组追加目标(去重)<type> 是对称类型(conflicts_with / relates_to)→ 同时在每个目标的 <fid>.json 镜像写入rebuild 流程刷新 _relations.json + _graph.mdquery <fid>显示 <fid> 的全部关系(出边 + 从 _relations.json 读入边)。
impact <fid> ⭐ 杀手锏分析改动 <fid> 的影响半径。读 _relations.json:
orphans列出 _relations.json 中 inbound + outbound 均为空的 feature(可能是孤立 / 死代码候选)。
rebuild扫描所有 docs/.pdlc-state/<id>.json 的 relations 块 + 文档追溯头的 关系: 行,重建:
_relations.json:nodes(id→name/stage/terminal)+ edges(flat 有向列表)+ index(每节点预计算 inbound/outbound)_graph.md:mermaid 图,边样式按类型区分(supersedes 虚线 / conflicts_with 粗线 / 其余实线),顶部加 <!-- AUTO-GENERATED by /pdlc-relate · do not edit by hand -->validate按 relations.md 的校验规则检查:悬空引用 / 自引用 / extends·depends_on 成环 / 矛盾对 / 对称一致性。报告问题清单。
_relations.json 是合法 JSON(jq . 通过)_graph.md 含 AUTO-GENERATED 头且 mermaid 语法成对闭合状态机豁免:本命令非 feature-scoped(不推进单个 feature 的阶段),不更新
<feature-id>.json的 history,只维护关系索引文件。同/pdlc-changelog。
本命令的 handoff 输出:
✅ 关系操作完成:<子命令> <参数>
📦 已更新:docs/.pdlc-state/_relations.json + _graph.md
👉 下一步:/pdlc-relate impact <fid> 查影响 | /pdlc-status 看全景
关系操作: $ARGUMENTS