dot-ai-prd-close
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClose PRD
关闭PRD
Close a PRD that is already implemented (in previous work or external projects) or is no longer needed. This workflow updates the PRD status, archives it, updates the GitHub issue, and commits directly to main without triggering CI.
关闭已在过往工作或外部项目中实现,或是不再需要的PRD。此工作流会更新PRD状态、归档PRD、更新GitHub Issue,并直接提交至main分支且不触发CI。
When to Use This Command
何时使用此命令
Use when:
/prd-close- ✅ PRD functionality is already implemented in a separate project or previous work
- ✅ PRD is no longer relevant (superseded, requirements changed, out of scope)
- ✅ PRD requirements are satisfied by existing functionality
- ✅ No new code implementation is needed in this repository
DO NOT use when:
/prd-close- ❌ You just finished implementing the PRD (use instead)
/prd-done - ❌ PRD has active implementation work in progress
- ❌ There are uncommitted code changes that need to be part of a PR
在以下场景使用:
/prd-close- ✅ PRD功能已在其他项目或过往工作中实现
- ✅ PRD不再相关(已被替代、需求变更、超出范围)
- ✅ PRD需求已由现有功能满足
- ✅ 本代码库无需新增代码实现
请勿在以下场景使用:
/prd-close- ❌ 刚完成PRD的实现(请改用)
/prd-done - ❌ PRD仍有活跃的实现工作在进行中
- ❌ 存在未提交的代码变更需要纳入PR
Usage
使用方法
bash
undefinedbash
undefinedInteractive mode - will prompt for PRD number and closure reason
交互模式 - 会提示输入PRD编号和关闭原因
/prd-close
/prd-close
With PRD number
指定PRD编号
/prd-close 20
/prd-close 20
With PRD number and reason
指定PRD编号和原因
/prd-close 20 "Already implemented by dot-ai-controller"
**Note**: If any `gh` command fails with "command not found", inform the user that GitHub CLI is required and provide the installation link: https://cli.github.com//prd-close 20 "Already implemented by dot-ai-controller"
**注意**:如果任何`gh`命令执行失败并提示“command not found”,请告知用户需要安装GitHub CLI,并提供安装链接:https://cli.github.com/Workflow Steps
工作流步骤
Step 1: Identify PRD and Reason
步骤1:确定PRD与关闭原因
If PRD number not provided:
- Check conversation context for recent PRD discussion
- Check git branch for PRD indicators (e.g., )
feature/prd-X - If unclear, prompt user for PRD number
Closure Reason Categories:
- Already Implemented: Functionality exists in external project or previous work
- No Longer Needed: Requirements changed, out of scope, or superseded
- Duplicate: Another PRD covers the same functionality
- Deferred: Moved to future version or different project
Required Information:
- PRD number
- Closure reason (brief description)
- Implementation reference (if already implemented): link to repo, PR, or documentation
若未提供PRD编号:
- 检查对话上下文,查找近期PRD讨论内容
- 检查git分支中的PRD标识(例如)
feature/prd-X - 若信息不明确,提示用户输入PRD编号
关闭原因分类:
- 已实现:功能在外部项目或过往工作中已存在
- 不再需要:需求变更、超出范围或已被替代
- 重复:已有其他PRD覆盖相同功能
- 延期:移至未来版本或其他项目
必填信息:
- PRD编号
- 关闭原因(简要描述)
- 实现参考(若为已实现场景):代码库、PR或文档的链接
Step 2: Read and Validate PRD
步骤2:读取并验证PRD
Read the current PRD file from :
prds/[number]-*.mdValidation checks:
- PRD file exists and is readable
- Confirm with user that this PRD should be closed
- Verify closure reason makes sense given PRD content
- Ask user for implementation evidence (if "already implemented")
Present PRD summary to user:
markdown
undefined从读取当前PRD文件:
prds/[number]-*.md验证检查项:
- PRD文件存在且可读取
- 与用户确认是否应关闭此PRD
- 验证关闭原因是否符合PRD内容
- 若为“已实现”场景,向用户索要实现证据
向用户展示PRD摘要:
markdown
undefinedPRD #X: [Title]
PRD #X: [标题]
Status: [Current Status]
Created: [Date]
Summary: [Brief description of what PRD requested]
Proposed Action: Close as [reason]
Implementation Reference: [If applicable]
Proceed with closure? (yes/no)
undefined状态: [当前状态]
创建时间: [日期]
摘要: [PRD需求的简要描述]
拟执行操作: 因[原因]关闭
实现参考: (如适用)
是否继续关闭?(是/否)
undefinedStep 3: Update PRD File
步骤3:更新PRD文件
Update the PRD metadata:
Metadata Updates:
markdown
**Status**: Complete [or] No Longer Needed [or] Duplicate
**Last Updated**: [Current Date]
**Completed**: [Current Date] [or] **Closed**: [Current Date]更新PRD元数据:
元数据更新内容:
markdown
**状态**: 已完成 [或] 不再需要 [或] 重复
**最后更新时间**: [当前日期]
**完成时间**: [当前日期] [或] **关闭时间**: [当前日期]Step 4: Move PRD to Archive
步骤4:将PRD归档
Move the PRD file to the done directory and update roadmap:
bash
git mv prds/[number]-[name].md prds/done/Note: If the move fails because doesn't exist, create it with and retry.
prds/done/mkdir -p prds/doneUpdate ROADMAP.md (if it exists):
- Check if exists
docs/ROADMAP.md - Remove the closed PRD from the roadmap (search for "PRD #[number]")
- Remove the entire line that references this PRD
- Closed PRDs should not appear in future roadmap as they're no longer being worked on
将PRD文件移至done目录并更新路线图:
bash
git mv prds/[number]-[name].md prds/done/注意:若因目录不存在导致移动失败,使用创建目录后重试。
prds/done/mkdir -p prds/done更新ROADMAP.md(若存在):
- 检查是否存在
docs/ROADMAP.md - 从路线图中移除已关闭的PRD(搜索“PRD #[number]”)
- 删除引用此PRD的整行内容
- 已关闭的PRD不应再出现在未来的路线图中,因为相关工作已停止
Step 5: Update GitHub Issue
步骤5:更新GitHub Issue
Reopen issue temporarily to update:
bash
gh issue reopen [number]Update issue description with new PRD path and status:
bash
gh issue edit [number] --body "$(cat <<'EOF'临时重新打开Issue以进行更新:
bash
gh issue reopen [number]更新Issue描述,添加新的PRD路径和状态:
bash
gh issue edit [number] --body "$(cat <<'EOF'PRD: [Title]
PRD: [标题]
Problem: [Original problem statement]
Solution: [Original solution statement]
Detailed PRD: See prds/done/[number]-[name].md
Priority: [Original Priority]
Status: ✅ [COMPLETE/CLOSED] - [Brief reason]
EOF
)"
undefined问题: [原始问题描述]
解决方案: [原始解决方案描述]
详细PRD: 查看prds/done/[number]-[name].md
优先级: [原始优先级]
状态: ✅ [已完成/已关闭] - [简要原因]
EOF
)"
undefinedStep 6: Close GitHub Issue
步骤6:关闭GitHub Issue
Close the issue with comprehensive closure comment:
bash
gh issue close [number] --comment "$(cat <<'EOF'使用详细的关闭评论关闭Issue:
bash
gh issue close [number] --comment "$(cat <<'EOF'✅ PRD #[number] Closed - [Reason Category]
✅ PRD #[number] 已关闭 - [原因分类]
[Detailed explanation of why PRD is being closed]
[关闭PRD的详细说明]
[If "Already Implemented"]
(若为“已实现”场景)
Implementation Details
This PRD requested [functionality]. All core requirements are satisfied by [implementation reference].
| Requirement | Implementation | Status |
|---|---|---|
| [Requirement 1] | [Where implemented] | ✅ Complete |
| [Requirement 2] | [Where implemented] | ✅ Complete |
Implementation Reference: [Link to project/repo/PR]
[If there are gaps]
Not Implemented (deferred or out of scope):
- [Feature X] - [Why not needed or deferred]
实现详情
此PRD需求为[功能描述]。所有核心需求已满足,实现来自[实现参考]。
| 需求项 | 实现位置 | 状态 |
|---|---|---|
| [需求1] | [实现位置] | ✅ 已完成 |
| [需求2] | [实现位置] | ✅ 已完成 |
实现参考: [项目/代码库/PR链接]
(若存在未实现内容)
未实现内容(延期或超出范围):
- [功能X] - [无需实现或延期的原因]
[If "No Longer Needed"]
(若为“不再需要”场景)
Reason for Closure
[Explain why requirements changed, what superseded this, or why it's out of scope]
Alternative Approach: [If applicable]
[What replaced this PRD or how needs are met differently]
关闭原因
[说明需求变更的原因、替代方案或超出范围的理由]
替代方案: (如适用)
[替代此PRD的方案,或需求的其他满足方式]
Files
文件信息
PRD Location:
Status: [Complete/Closed]
Closed: [Date]
EOF
)"
prds/done/[number]-[name].mdundefinedPRD位置:
状态: [已完成/已关闭]
关闭时间: [日期]
EOF
)"
prds/done/[number]-[name].mdundefinedStep 7: Commit and Push
步骤7:提交并推送
Commit changes directly to main with skip CI:
bash
undefined直接提交变更至main分支并跳过CI:
bash
undefinedStage all changes
暂存所有变更
git add .
git add .
Verify what will be committed
验证即将提交的内容
git status
git status
Commit with skip CI flag
提交并添加跳过CI标识
git commit -m "docs(prd-[number]): close PRD #[number] - [brief reason] [skip ci]
- Moved PRD to prds/done/ directory
- Updated PRD status to [Complete/Closed]
- Updated GitHub issue description with new path
- [Implementation details or reason]
Closes #[number]"
git commit -m "docs(prd-[number]): close PRD #[number] - [简要原因] [skip ci]
- 将PRD移至prds/done/目录
- 将PRD状态更新为[已完成/已关闭]
- 更新GitHub Issue描述,添加新路径
- [实现详情或原因]
Closes #[number]"
Pull latest and push to remote
拉取最新代码并推送到远程仓库
git pull --rebase origin main && git push origin main
**Important**:
- Always use `[skip ci]` flag to avoid unnecessary CI runs for documentation changes
- Include issue reference (`Closes #[number]`) to link commit to issuegit pull --rebase origin main && git push origin main
**重要提示**:
- 务必使用`[skip ci]`标识,避免因文档变更触发不必要的CI运行
- 包含Issue引用(`Closes #[number]`),将提交与Issue关联Example Scenarios
示例场景
Example 1: Already Implemented in External Project
示例1:已在外部项目中实现
bash
/prd-close 20 "Implemented by dot-ai-controller"Closure Comment:
markdown
undefinedbash
/prd-close 20 "Implemented by dot-ai-controller"关闭评论:
markdown
undefined✅ PRD #20 Closed - Already Implemented
✅ PRD #20 已关闭 - 已实现
This PRD requested proactive Kubernetes cluster monitoring with AI-powered remediation.
Core functionality (60-80%) is already implemented by the separate
dot-ai-controller project.
| Requirement | Implementation | Status |
|---|---|---|
| Continuous health checks | Event-based monitoring via K8s events | ✅ Complete |
| Intelligent alerting | Slack notifications with AI analysis | ✅ Complete |
| Automated remediation | Automatic/manual modes with confidence thresholds | ✅ Complete |
| Anomaly detection | AI-powered event analysis | ✅ Complete |
Not Implemented (advanced features, may be future PRD):
- Continuous metrics monitoring (Prometheus-style)
- Predictive analytics with baseline learning
- Multi-channel alerting (email, PagerDuty)
undefined此PRD需求为基于AI的主动式Kubernetes集群监控与故障修复。
核心功能(60-80%)已由独立的dot-ai-controller项目实现。
| 需求项 | 实现位置 | 状态 |
|---|---|---|
| 持续健康检查 | 通过K8s事件实现的基于事件的监控 | ✅ 已完成 |
| 智能告警 | 带AI分析的Slack通知 | ✅ 已完成 |
| 自动故障修复 | 自动/手动模式,带置信度阈值 | ✅ 已完成 |
| 异常检测 | 基于AI的事件分析 | ✅ 已完成 |
未实现内容(高级功能,可能作为未来PRD):
- 持续指标监控(Prometheus风格)
- 基于基线学习的预测分析
- 多渠道告警(邮件、PagerDuty)
undefinedExample 2: Duplicate PRD
示例2:重复PRD
bash
/prd-close 45 "Duplicate of PRD #44"Closure Comment:
markdown
undefinedbash
/prd-close 45 "Duplicate of PRD #44"关闭评论:
markdown
undefined🔄 PRD #45 Closed - Duplicate
🔄 PRD #45 已关闭 - 重复
This PRD covers the same functionality as PRD #44. Consolidating all work
under PRD #44 to avoid fragmentation.
Action: Continue work on PRD #44 instead.
undefined此PRD与PRD #44覆盖的功能相同。为避免工作碎片化,所有相关工作将合并至PRD #44。
操作建议: 继续推进PRD #44的相关工作。
undefinedExample 3: No Longer Needed
示例3:不再需要
bash
/prd-close 12 "Requirements changed, out of scope"Closure Comment:
markdown
undefinedbash
/prd-close 12 "Requirements changed, out of scope"关闭评论:
markdown
undefined⏸️ PRD #12 Closed - No Longer Needed
⏸️ PRD #12 已关闭 - 不再需要
After discussion, this approach no longer aligns with project direction.
Requirements have evolved and this PRD is out of scope.
Alternative Approach: Using [different solution/approach] instead.
undefined经讨论,此方案已不符合项目方向。需求已发生变化,此PRD已超出范围。
替代方案: 改用[其他方案/方法]。
undefinedSuccess Criteria
成功标准
✅ PRD file updated with completion/closure metadata
✅ PRD archived to directory
✅ GitHub issue updated with new PRD path
✅ GitHub issue closed with comprehensive closure comment
✅ Changes committed to main with skip CI flag
✅ Changes pushed to remote repository
prds/done/✅ PRD文件已更新,包含完成/关闭元数据
✅ PRD已归档至目录
✅ GitHub Issue已更新,添加新的PRD路径
✅ GitHub Issue已关闭,附带详细的关闭评论
✅ 变更已提交至main分支,并带有跳过CI标识
✅ 变更已推送至远程代码库
prds/done/Notes
注意事项
- No PR required: This workflow commits directly to main for documentation-only changes
- Skip CI: Always include to avoid unnecessary CI runs
[skip ci] - Comprehensive documentation: Ensure issue comment clearly explains closure reason
- Implementation references: Link to external projects, repos, or PRs where functionality exists
- Gap acknowledgment: Be honest about what's implemented vs. what's missing
- 无需创建PR:此工作流针对仅涉及文档的变更,直接提交至main分支即可
- 跳过CI:务必包含,避免触发不必要的CI运行
[skip ci] - 文档需全面:确保Issue评论清晰说明关闭原因
- 实现参考:若功能在外部实现,需链接至对应项目、代码库或PR
- 明确差距:如实说明已实现内容与未实现内容