agentsclimarketplace

Pdlc implement

Skill kanfu-panda/pdlc-skills/skills/pdlc-implement

36 slash commands that turn Claude Code into a real PDLC workflow — PRD → TDD → implement → review → ship. Hard contracts force AI to persist artifacts, write failing tests first, and run self-checks. No more "looks done" in chat.

Install
npx -y skills add kanfu-panda/pdlc-skills --skill pdlc-implement

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

按设计文档和已有测试用例实现代码(带前置守卫、自检、handoff)

SKILL.md

4.9 KB, as published. Nobody here has run it

按设计文档实现代码

严格按照设计文档和已有的测试用例实现功能代码。

<!-- @include templates/prompts/iron-law.md --> <!-- @include templates/prompts/noninteractive.md -->

PDLC 前置守卫(不可跳过)

  1. 从用户输入提取功能名称关键词
  2. 按下面的规则搜索与该功能相关的测试代码
<!-- @include templates/prompts/test-location.md -->
  1. 按上述四步走完仍未找到测试代码 → 输出以下后立即中止:
    ⛔ PDLC 守卫:未找到与「<功能名>」相关的测试代码。
    实现代码前必须先编写测试(TDD)。请先运行:
    👉 /pdlc-tdd <功能描述>
    
  2. 找到测试 → 运行测试,确认红灯(失败)。若已全绿:
    • 交互模式:提示"测试已全部通过,可能代码已实现,请确认是否需要继续。"
    • --autonomous 模式:视为流程性确认,默认跳过实现直接收尾(写 auto_decisions[] 留痕),current_stage 推进为 implnext_step=pdlc-reviewlast_phase_result.advanced_to=review(下一阶段短名,非命令名)
  3. 提取功能ID(从设计文档或 PRD),继续
  4. 任务状态关联(如 docs/06_tasks/ 存在任务文件):
    • 匹配含功能ID的任务文件
    • ⬜ 未开始 / 🔄 进行中的任务,标为 🔄,追加 <!-- 开始时间: <今日日期> -->

段一:实现代码

  1. 阅读设计文档docs/02_design/ 对应子目录下的文档,逐字理解
  2. 阅读测试用例:对应服务/应用下的测试代码,理解每条意图
  3. 阅读编码规范docs/00_standards/coding/(未命中 → 提示 consider /pdlc-standard add coding/<topic>
  4. 最少量实现:使所有测试通过的最小代码
  5. 运行测试:确认绿灯
  6. 重构优化:测试通过前提下优化代码结构
  7. 更新服务 CHANGELOG
  8. 任务完结:匹配任务由 🔄 改 ✅,追加 <!-- 完成时间: <今日日期> -->

段二:自检(强制)

<!-- @include templates/prompts/self-audit.md -->

实现自检清单(必须全部检查)

  1. 设计偏离检查:重读设计文档,确认没有遗漏接口或功能点
    • 遗漏 → 补充实现并确认测试通过
    • 偏离 → 修正代码或补充设计说明
  2. 编码规范快检:运行项目 lint 工具
    • 可自动修复 → 直接修复
    • 修复后重跑测试确认不破坏功能
    • lint fix 导致失败 → 回滚并记录人工处理
  3. 覆盖率验证:覆盖率达标线以项目配置为准:优先取 docs/00_standards/test-commands.yml 的 coverage 命令阈值参数(那才是强制点,退出码即判定),其次 quality-targets.yml;两者都没有时按 >= 80% 兜底。
    • 不达标 → 补测试用例并确认通过

段三:修复(单次,不递归)

<!-- @include templates/prompts/loop-prevention.md -->

段四:更新状态机 + 交接

<!-- @include templates/prompts/state-update.md -->

本阶段状态机更新

  • current_stage: implnext_step: pdlc-review —— 仅当本阶段成功时才这样写 (所有 checks 通过且未命中 blocked_reason)。
  • 失败/受阻时不得推进ok=false(含 blocked)→ 按 state-update.md 规则 5, current_stage 保持原值不变advanced_to=nullblocked_reason 写明原因。

    ⚠️ 失败也照写 current_stage: impl 是常见错误:那会让 current_stage 不再表示 「最后一个真正完成的阶段」,外层循环的 stuck-stop 因此失效。

  • last_phase_resultchecks.tests_pass / coverage_pass / lint_clean 取自真跑 unit / coverage / lint 的退出码,不得用自检结果冒充。退出码语义与"跑不了"的处理见下(该文件不存在则回退项目既有约定,并提示 consider 建立 docs/00_standards/test-commands.yml)。
<!-- @include templates/prompts/check-commands.md --> <!-- @include templates/prompts/handoff.md -->

本命令的 handoff 输出:

✅ 实现完成,自检通过
  - 设计一致性:<✅/部分>
  - lint 检查:<✅/X 项已自动修复/X 项待人工>
  - 测试覆盖率:<XX>%
📦 状态快照:docs/.pdlc-state/<feature-id>.json
👉 下一步:/pdlc-review <feature-id>

实现目标: $ARGUMENTS

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.