mcpField
S
sherpy-cli-planner

sherpy-cli-planner

github.com/validkeysAgent 工作流142 次安装19 周前更新
代码仓库

关于 sherpy-cli-planner

sherpy-cli-planner 是通过 sherpy 命令行按需加载各步骤指引、运行 Sherpy 项目规划流程的 Skill,面向命令行用户。它整理规划产物,支持通过 CLI 验证 YAML,并要求在步骤间确认。

主要功能

  1. 01通过 sherpy CLI 按需加载步骤指引
  2. 02十三步项目规划流程
  3. 03检测现有产物并续接流程
  4. 04通过 CLI 验证 YAML
  5. 05整理需求与交付产物

适用场景

  1. 01生成结构化项目规划文档
  2. 02根据已有文件续接规划流程
  3. 03验证 YAML 规划产物

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/validkeys/sherpy --skill sherpy-cli-planner

安装后在 Claude Code 中输入/sherpy-cli-planner确认已加载。

详细介绍

Sherpy CLI Planner

使用 Sherpy CLI 的 prompt 命令按需加载特定步骤的说明,运行完整的 Sherpy 规划流程。与安装 14 个独立技能文件相比,这种方式更节省令牌——所有说明都内置在 sherpy 二进制文件中。

先决条件

必须安装 sherpy CLI。 使用以下命令验证:

sherpy --help

如果尚未安装:

go install github.com/validkeys/sherpy@latest

用法

/sherpy-cli-planner [output-directory]

如果未提供目录,请询问用户:“我应该在哪里创建规划文档?”

等待用户提供路径后再继续。

流程

与 sherpy-flow 的 12 个步骤相同,但说明通过 sherpy prompt 加载,而非使用独立技能:

Step 1   Gap Analysis Worksheet         → gap-analysis-worksheet.md
Step 2   Business Requirements          → business-requirements.yaml
Step 3   Technical Requirements         → technical-requirements.yaml
Step 4   Style Anchors Collection       → style-anchors/index.yaml + *.md
Step 5   Implementation Planner         → milestones.yaml + milestone-m*.tasks.yaml
Step 6   UX/Wireframe Planning          → wireframe-spec.yaml + wireframes/*.pen (conditional)
Step 7   Implementation Plan Review     → implementation-plan-review.yaml
Step 8   Definition of Done             → milestones.yaml (enhanced with acceptance_criteria)
Step 9   Architecture Decision Records  → adrs/INDEX.md + adrs/ADR-*.md
Step 10  Delivery Timeline              → timeline.yaml
Step 11  QA Test Plan                   → qa-test-plan.yaml
Step 12  Developer Summary              → developer-summary.md
Step 13  Executive Summary              → executive-summary.md

所有产出物都会自动整理到:

<output-directory>/
├── requirements/       (requirements, gap analysis)
├── implementation/
│   ├── milestones.yaml (with optional acceptance_criteria)
│   └── tasks/          (milestone task files)
├── ux/                 (wireframe spec + Pencil wireframes)
│   ├── wireframe-spec.yaml
│   ├── wireframes.pen
│   └── PAGE-001.png
├── delivery/           (timeline, QA test plan)
├── architecture/
│   └── adrs/           (ADRs)
├── artifacts/          (reviews, interview transcripts, style anchors, etc.)
└── summaries/          (developer & executive summaries)

流程步骤

步骤 0:验证 CLI 并列出提示词

开始前,验证 CLI 已安装并显示可用提示词:

sherpy prompt --list

如果失败,请指导用户安装 CLI,然后退出。

步骤 1:确定输出目录

如果未在参数中提供目录,请询问用户:

“我应该在哪里创建规划文档?”

等待用户回复。将提供的路径保存为 base_directory。

此阶段不要创建任何文件夹。 生成文件时会按需创建文件夹。

步骤 2:扫描现有产出物

检查 base_directory 中是否存在已整理的结构和文件:

产出物预期位置表示已完成的步骤
gap-analysis-worksheet.mdrequirements/步骤 1
business-requirements.yamlrequirements/步骤 2
technical-requirements.yamlrequirements/步骤 3
style-anchors/index.yamlartifacts/style-anchors/步骤 4
milestones.yamlimplementation/步骤 5
milestone-m*.tasks.yamlimplementation/tasks/步骤 5
wireframe-spec.yamlux/步骤 6
implementation-plan-review.yamlartifacts/步骤 7
含有 acceptance_criteria 的 milestones.yamlimplementation/步骤 8
adrs/INDEX.mdarchitecture/adrs/步骤 9
timeline.yamldelivery/步骤 10
qa-test-plan.yamldelivery/步骤 11
developer-summary.mdsummaries/步骤 12
executive-summary.mdsummaries/步骤 13

产出物检测逻辑:

  • 检查 base_directory 中的预期位置
  • 如果文件存在,则视为相应步骤已完成
步骤 3:显示流程状态

开始任何工作前,显示流程的可视化状态:

## Sherpy CLI Planner — [Project Directory]

 ✓  Step 1   Gap Analysis Worksheet
 ✓  Step 2   Business Requirements
 →  Step 3   Technical Requirements        ← resuming here
 ○  Step 4   Style Anchors Collection
 ○  Step 5   Implementation Planner
 ○  Step 6   UX/Wireframe Planning
 ○  Step 7   Implementation Plan Review
 ○  Step 8   Definition of Done
 ○  Step 9   Architecture Decision Records
 ○  Step 10  Delivery Timeline
 ○  Step 11  QA Test Plan
 ○  Step 12  Developer Summary
 ○  Step 13  Executive Summary

Resuming from Step 3. Type "start over" to restart from Step 1,
or specify a step number to jump to a specific point.

图例: ✓ 已完成 · → 当前 · ○ 待处理

然后询问:

“准备从步骤 [n]:[步骤名称] 继续吗?(yes / start over / jump to step N)”

等待用户确认后再继续。

步骤 4:执行各步骤

对于每个待处理步骤,通过 sherpy prompt 加载说明并按其执行:

步骤执行模式

对于每个步骤:

  1. 加载说明:

    sherpy prompt -t <prompt-type>
    
  2. 按照打印出的说明完成此步骤

  3. 完成后验证输出(如果是 YAML):

    sherpy validate -t <type> -f <output-file> --strict
    
  4. 询问用户确认后再继续下一步:

    “步骤 [n] 已完成。继续到步骤 [n+1] 吗?(yes / no / jump to N)”

关键执行规则:

  1. 未经用户明确确认,绝不要进入下一步——每完成一步都要等待确认
  2. 不得自动跳过步骤 4(收集风格锚点)——如果用户想跳过,务必先征求意见并说明风险
  3. 如果某个步骤所需的输入不存在(例如,步骤 5 需要风格锚点),请先停止并警告用户,再继续
分步骤命令

步骤 1:差距分析工作表

# Load instructions
sherpy prompt -t gap-analysis-worksheet

# Follow the instructions, then continue...

步骤 2:业务需求

# Load instructions
sherpy prompt -t business-requirements-interview

# After generating business-requirements.yaml, validate:
sherpy validate -t business-requirements -f {base_directory}/requirements/business-requirements.yaml --strict

步骤 3:技术需求

# Load instructions
sherpy prompt -t technical-requirements-interview

# After generating technical-requirements.yaml, validate:
sherpy validate -t technical-requirements -f {base_directory}/requirements/technical-requirements.yaml --strict

步骤 4:风格锚点收集

# Load instructions
sherpy prompt -t style-anchors-collection

# Follow the instructions...
# No validation needed (produces markdown files)

步骤 5:实施规划器

# Load instructions
sherpy prompt -t implementation-planner

# After generating milestones.yaml, validate:
sherpy validate -t milestones -f {base_directory}/implementation/milestones.yaml --strict

# After generating milestone task files, validate each:
sherpy validate -t milestone-tasks -f {base_directory}/implementation/tasks/milestone-m0.tasks.yaml --strict
sherpy validate -t milestone-tasks -f {base_directory}/implementation/tasks/milestone-m1.tasks.yaml --strict
# ... for each milestone

步骤 6:UX/线框图规划(视情况而定 — 如果没有 UI 更改,则自动跳过)

# Load instructions
sherpy prompt -t ux-wireframe-planning

# After generating wireframe-spec.yaml, validate:
sherpy validate -t wireframe-spec -f {base_directory}/ux/wireframe-spec.yaml --strict

步骤 7:实施计划审查

# Load instructions
sherpy prompt -t implementation-plan-review

# Follow the instructions...
# No validation needed (produces review document)

步骤 8:完成定义

# Load instructions
sherpy prompt -t definition-of-done

# After enhancing milestones.yaml, validate:
sherpy validate -t milestones -f {base_directory}/implementation/milestones.yaml --strict

步骤 9:架构决策记录

# Load instructions
sherpy prompt -t architecture-decision-record

# Follow the instructions...
# No validation needed (produces markdown files)

步骤 10:交付时间线

# Load instructions
sherpy prompt -t delivery-timeline

# After generating timeline.yaml, validate:
sherpy validate -t timeline -f {base_directory}/delivery/timeline.yaml --strict

步骤 11:QA 测试计划

# Load instructions
sherpy prompt -t qa-test-plan

# After generating qa-test-plan.yaml, validate:
sherpy validate -t qa-test-plan -f {base_directory}/delivery/qa-test-plan.yaml --strict

步骤 12:开发者摘要

# Load instructions
sherpy prompt -t developer-summary

# Follow the instructions...
# No validation needed (produces markdown file)

步骤 13:执行摘要

# Load instructions
sherpy prompt -t executive-summary

# Follow the instructions...
# No validation needed (produces markdown file)
步骤 5:最终摘要

完成所有步骤后,显示摘要:

## Planning Complete! 🎉

All artifacts have been generated and validated:

✓ Requirements documented
✓ Implementation planned with TDD tasks
✓ Delivery timeline established
✓ QA test plan created
✓ Summaries generated

Files are organized in: {base_directory}/

Next steps:
1. Review the developer summary: {base_directory}/summaries/developer-summary.md
2. Share the executive summary with stakeholders
3. Begin implementation using the task files in implementation/tasks/

Run validation at any time:
  sherpy validate -t <type> -f <file> --strict

转换规则

与 sherpy-flow 相同:

步骤之间:

  • 前进到下一步前,始终等待用户确认
  • 用户可以输入 "start over" 以重置到步骤 1
  • 用户可以输入 "jump to N" 以跳转到特定步骤
  • 如果用户要求跳过某一步,请警告其依赖关系

跳过步骤:

  • 如果文件已存在,可跳过步骤 1-3(需求)
  • 不应跳过步骤 4(风格锚点),除非发出警告 — 显示实施偏差风险
  • 步骤 5-12 依赖需求 — 如果缺少需求,则停止

错误处理:

  • 如果验证失败,则停止并显示错误
  • 用户必须修正 YAML 并重新运行验证
  • 验证通过前不得继续
  • 如果 CLI 命令失败,则显示错误并停止

CLI 参考

列出可用提示词:

sherpy prompt --list

加载特定提示词:

sherpy prompt -t <prompt-type>

验证 YAML:

sherpy validate -t <type> -f <file> --strict

列出文档类型:

sherpy types

与 sherpy-flow 的比较

功能sherpy-flowsherpy-cli-planner
需要技能文件是(14 个文件)否(使用 CLI)
Token 开销高(约 720K)低(约 80K)
加载指令一次性全部加载按需逐步加载
验证手动通过 CLI 自动完成
离线运行是是(内容已嵌入)
适用对象非 CLI 用户CLI 用户

注释

  • sherpy CLI 在构建时嵌入所有提示词内容 — 无需网络
  • 每次调用 sherpy prompt 都会输出该步骤的完整指令
  • 每个生成 YAML 的步骤后都集成了验证
  • 与 sherpy-flow 的 12 个步骤相同,只是加载方式不同
  • 风格锚点(步骤 4)至关重要 — 绝不要在不发出警告的情况下跳过

评论

支持 Markdown