ワンクリックで
pdd-pr-batch
批量合并多个 Change 为一个 PR。适用于多个小改动打包发布的场景。支持中文触发:批量合并PR、批量PR、打包发布、合并多个Change。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
批量合并多个 Change 为一个 PR。适用于多个小改动打包发布的场景。支持中文触发:批量合并PR、批量PR、打包发布、合并多个Change。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Architecture constraint enforcement skill that monitors code for violations of preset invariants and architectural boundaries. Automatically triggered when users need architecture checks, dependency checks, or module boundary checks. Core responsibility: Ensure architectural coherence and prevent architectural drift. Trigger scenarios: - User requests "check architecture constraints", "check dependency direction", "check module boundaries" - Called by pdd-entropy-reduction coordinator - Automatically triggered after code commits 支持中文触发:架构约束检查、依赖检查、模块边界检查、架构强制、架构漂移、PDD架构约束。
Automated refactoring expert skill that transforms collected quality improvement tasks into concrete code operations. Automatically triggers when users need code refactoring, duplicate elimination, or complexity simplification. Core responsibility: Initiate targeted refactoring PRs regularly in a "small debt repayment" manner to prevent technical debt accumulation. Trigger scenarios: - User requests "refactor code", "eliminate duplicates", "simplify code" - Called by pdd-entropy-reduction coordinator - Refactoring suggestions passed from expert-entropy-auditor 支持中文触发:自动重构、代码重构、消除重复、简化代码、重构专家、PDD重构。
Entropy audit skill that discovers the gap between "design intent" and "code implementation". Automatically triggered when users need technical debt audit, PRD and code consistency check, or AI residue detection. Core responsibility: Identify "AI residue" scattered in the codebase and suggest consolidating them into shared utility packages. Trigger scenarios: - User requests "audit technical debt", "check PRD consistency", "detect AI residue" - pdd-entropy-reduction coordinator calls - Scheduled trigger (recommended weekly) 支持中文触发:熵增审计、技术债务审计、PRD一致性检查、AI残渣检测、PDD熵审计。
PDD Entropy Reduction Agent, continuously monitors and repays technical debt to prevent system decay. Automatically triggered when users need code cleanup, documentation updates, technical debt management, architecture alignment, entropy reduction, or garbage collection. Core Objective: Combat system "entropy increase" and "decay" by periodically running agents to discover documentation inconsistencies or architecture constraint violations. Trigger Scenarios: - User requests "entropy reduction", "clean up technical debt", "code cleanup", "garbage collection" - User requests checking documentation and code consistency - User requests architecture constraint checking - User requests technical debt audit - Scheduled trigger (recommended weekly) - Automatic trigger after code commit (optional) - Automatic trigger after PR merge (optional) 支持中文触发:熵减、清理技术债务、代码清理、文档更新、技术债务管理、架构对齐、垃圾回收、PDD熵减。
Activiti workflow engine expert, proficient in Activiti 7 Core/Cloud architecture, BPMN 2.0 specification, process design and development. Automatically triggered when users involve workflow design, process engine development, BPMN modeling, process deployment management and other issues. Provides BPMN modeling, best practices and solutions. 支持中文触发:工作流设计、流程引擎开发、BPMN建模、流程部署管理、Activiti、工作流、流程设计。
Code quality expert integrating Martin Fowler's refactoring techniques and GoF design patterns to help developers systematically improve code quality. Triggers when users ask about code review, refactoring, design patterns, code smells, SOLID principles, or software architecture improvements. 支持中文触发:代码审查、重构、设计模式、代码异味、SOLID原则、软件架构改进、代码质量。
| name | pdd-pr-batch |
| description | 批量合并多个 Change 为一个 PR。适用于多个小改动打包发布的场景。支持中文触发:批量合并PR、批量PR、打包发布、合并多个Change。 |
| author | neuqik@hotmail.com |
| license | MIT |
Description: 批量合并多个 Change 为一个 PR。适用于多个小改动打包发布的场景。
Details: 批量合并多个 Change 为一个 PR
Input: 多个 OpenSpec Change ID
适用场景:
├── 多个小修复打包发布
├── 相关功能点一起上线
├── 配置文件批量更新
└── 文档批量更新
不适用场景:
├── Change 之间有依赖冲突
├── 需要独立回滚的 Change
└── 不同优先级的 Change
for each change_id in change_ids:
├── 检查 Change 目录存在
├── 读取 tasks.md 确认完成
├── 检查代码已提交
└── 记录 Change 信息
分支命名: batch/{date}
示例: batch/2026-03-21
操作:
├── git checkout main
├── git pull origin main
└── git checkout -b batch/2026-03-21
for each change_id in change_ids:
├── 找到 Change 对应的 Feature Branch
├── cherry-pick 或 merge 该分支的提交
├── 解决可能的冲突
└── 记录合并结果
运行所有 Change 的测试:
├── 汇总所有测试用例
├── 批量运行测试
├── 汇总测试覆盖率
└── 生成批量审查报告
审查报告: openspec/batch/{date}/review-report.md
GitHub 模式:
├── 推送批量分支到远程
├── 创建 GitHub PR
│ ├── 标题: batch: {title} ({n} changes)
│ ├── 描述: 列出所有 Change
│ └── 标签: batch
└── 记录 PR 编号
本地模式:
├── 创建批量 PR 记录
│ └── openspec/batch/{date}/pr-record.md
└── 记录所有 Change ID
输出:
├── PR 编号 / 本地记录路径
├── 包含的 Change 列表
├── 批量审查结果
└── 等待确认
## 批量 PR 创建完成
**PR 编号**: #125
**分支**: batch/2026-03-21 → main
**包含变更**: 3 个
### 变更列表
| Change ID | 标题 | 状态 | 审查结果 |
|-----------|------|------|---------|
| c-001-xxx | 权限控制 | ✅ 完成 | ✅ 通过 |
| c-002-yyy | 日志记录 | ✅ 完成 | ⚠️ 1 Warning |
| c-003-zzz | 参数校验 | ✅ 完成 | ✅ 通过 |
### 批量审查结果
| 检查项 | 状态 | 详情 |
|--------|------|------|
| 单元测试 | ✅ 通过 | 45/45 用例通过 |
| 测试覆盖率 | ✅ 82% | 阈值: 70% |
| 代码质量 | ⚠️ 3 Warning | 详情见报告 |
| 冲突检查 | ✅ 无冲突 | - |
### 审查报告
详细报告: `openspec/batch/2026-03-21/review-report.md`
### 下一步操作
- 确认合并: `/pdd-pr-merge --pr-number 125`
- 查看详情: `/pdd-pr-review --pr-number 125`
- 单独处理某个 Change: `/pdd-pr-review c-001-xxx`
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|---|---|---|---|
change_ids | array | 是 | - | OpenSpec Change ID 列表 |
title | string | 否 | - | PR 标题 |
draft | boolean | 否 | true | 是否创建为 Draft PR |
⚠️ 检测到代码冲突
**冲突文件**:
- src/main/java/WorkflowController.java
**冲突 Change**:
- c-001-xxx: 修改了第 45 行
- c-002-yyy: 修改了第 45 行
### 解决方案
1. 手动解决冲突:
- 编辑冲突文件
- git add .
- git commit
2. 跳过冲突 Change:
- `/pdd-pr-batch c-001-xxx,c-003-zzz` (排除 c-002-yyy)
3. 分开处理:
- 先合并 c-001-xxx
- 再合并 c-002-yyy
合并批量 PR 后,会逐个归档所有 Change:
pdd-pr-merge (批量 PR)
│
└── for each change_id:
│
├── openspec-archive-change {change-id}
│
└── 更新 Change 状态
## 批量 PR 合并完成
**PR 编号**: #125
**合并时间**: 2026-03-21 16:00:00
### 归档状态
| Change ID | 归档状态 | 归档路径 |
|-----------|---------|---------|
| c-001-xxx | ✅ 已归档 | archive/2026-03-21-c-001-xxx/ |
| c-002-yyy | ✅ 已归档 | archive/2026-03-21-c-002-yyy/ |
| c-003-zzz | ✅ 已归档 | archive/2026-03-21-c-003-zzz/ |
### 后续操作
- 查看批量归档: `openspec/batch/2026-03-21/`
openspec/
├── changes/
│ ├── c-001-xxx/
│ ├── c-002-yyy/
│ └── c-003-zzz/
├── batch/
│ └── 2026-03-21/
│ ├── pr-record.md
│ ├── review-report.md
│ └── merge-report.md
└── archive/
├── 2026-03-21-c-001-xxx/
├── 2026-03-21-c-002-yyy/
└── 2026-03-21-c-003-zzz/
❌ 部分 Change 未完成
**未完成列表**:
- c-002-yyy: 2/10 任务未完成
请先完成所有 Change 后再执行批量操作。
❌ Change 不存在
**无效 ID**: c-004-xxx
请确认 Change ID 正确:
- c-001-xxx ✅
- c-002-yyy ✅
- c-003-zzz ✅
- c-004-xxx ❌ 不存在
pdd-pr-batch
│
├── 被调用方
│ └── 用户直接调用
│
└── 调用方
├── pdd-pr-review (查看批量审查)
└── pdd-pr-merge (批量合并)
本Skill遵循PDD框架实施规范,详见 pdd-framework-design.md 第9章。