关于 review-chamber
review-chamber 将重要的 PR 评审发现整理为可搜索的项目知识,分为决策、模式、标准和经验,适合希望保存评审见解并在后续工作中复用的团队。
主要功能
- 01记录重要的 PR 评审发现
- 02按知识类型分类条目
- 03搜索和列出已存条目
- 04关联项目中的相关知识
- 05呈现相关的过往评审
适用场景
- 01保存评审中的架构决策
- 02建立常见代码模式库
- 03开展相关工作时查找既有决策
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ athola/ claude-night-market --skill review-chamber安装后在 Claude Code 中输入/review-chamber确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
modules/capture-workflow.mdevaluation-criteria.mdsearch-patterns.md详细介绍
PR Review Chamber 技能
在项目记忆宫殿中捕获、整理和检索 PR Review 知识。
适用场景
- 捕获 PR Review 知识,以供日后参考
- 根据过往 Review 构建 Review 模式库
不适用场景
- 对简单改动进行快速自我 Review
- 自动化 CI 检查已覆盖 Review 范围
概述
Review Chamber 是每座项目宫殿中的专属房间,用于存储从 PR Review 中提取的宝贵知识。它将短暂的 PR 讨论转化为持久、可搜索的组织记忆。
房间结构
review-chamber/
├── decisions/ # Architectural choices from PR discussions
├── patterns/ # Recurring issues and their solutions
├── standards/ # Quality bar examples and coding conventions
└── lessons/ # Post-mortems and learnings
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
工作流阶段
阶段 1:知识识别
PR Review 完成后,评估是否应捕获其中的发现:
## Knowledge Detection Checklist
For each finding from sanctum:pr-review, evaluate:
- [ ] **Novelty**: Is this a new pattern or first occurrence?
- [ ] **Applicability**: Will this affect future PRs in this area?
- [ ] **Durability**: Is this architectural (capture) or tactical (skip)?
- [ ] **Connectivity**: Does it link to existing palace rooms?
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
阶段 2:分类
将发现归入适当的子房间:
| 发现类型 | 目标房间 | 标准 |
|---|---|---|
| 架构选择 | decisions/ | 阻塞性问题及架构背景 |
| 重复出现的问题 | patterns/ | 以前出现过或可能再次出现 |
| 质量范例 | standards/ | 体现编码标准 |
| 经验/见解 | lessons/ | 回顾或事后复盘 |
阶段 3:捕获
创建结构化条目,包含:
---
source_pr: "#42 - Add authentication"
date: 2025-01-15
participants: [author, reviewer1, reviewer2]
palace_location: review-chamber/decisions
related_rooms: [workshop/auth-patterns, library/security-adr]
tags: [authentication, jwt, security]
---
## Decision Title
### Decision
Chose JWT tokens over server-side sessions.
### Context (from PR discussion)
- Reviewer asked: "Why not use sessions?"
- Author explained: stateless scaling requirements
- Discussion refined: added refresh token rotation
### Captured Knowledge
- **Pattern**: JWT + refresh tokens for stateless auth
- **Tradeoff**: Complexity vs. horizontal scaling
- **Application**: Use for all API authentication
### Connected Concepts
- [[auth-patterns]] - Updated with JWT best practices
- [[security-adr-003]] - Referenced this decision
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
阶段 4:整合
捕获后,更新相关的宫殿房间:
- 为相关条目添加双向链接
- 更新项目宫殿索引中的标签
- 如果与现有条目相矛盾,则发出通知
使用示例
PR Review 后捕获
# Automatic: sanctum:pr-review triggers capture
/pr-review 42
# → Review posted to GitHub
# → Knowledge capture evaluates findings
# → Significant decisions stored in review-chamber
# Manual: Explicitly capture from PR
/review-room capture 42 --room decisions
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
搜索过往决策
# Find authentication decisions
/review-room search "authentication" --room decisions
# Find patterns in a specific area
/review-room search "error handling" --room patterns --tags api
# List recent entries
/review-room list --limit 10 --room standards
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
展示相关知识
开始处理某个代码区域时:
## Relevant Review Knowledge
Starting work in `auth/` directory...
**Past Decisions:**
- [#42] JWT token decision → decisions/jwt-over-sessions
- [#67] Rate limiting pattern → patterns/api-throttling
**Quality Standards:**
- [#55] Error response format → standards/api-errors
**Known Patterns:**
- [#38] Token refresh edge case → patterns/token-refresh-race
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
集成点
与 sanctum:pr-review 集成
review-chamber 在阶段 6(生成报告)之后集成:
**Verification:** Run the command with `--help` flag to verify availability.
Phase 6: Generate Report
↓
[HOOK] Evaluate findings for knowledge capture
↓
For each significant finding:
├── Classify into room type
├── Create ReviewEntry
├── Add to project palace
└── Update connections
↓
Phase 7: Post to GitHub
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
与 knowledge-intake 集成
使用相同的评估框架:
| 标准 | 权重 | PR Review 应用方式 |
|---|---|---|
| 新颖性 | 25% | 新模式或首次出现 |
| 适用性 | 30% | 会影响该区域后续的 PR |
| 持久性 | 20% | 架构性问题,而非战术性问题 |
| 关联性 | 15% | 与现有房间建立链接 |
| 权威性 | 10% | 资深 Review 者或领域专家 |
与 knowledge-locator 集成
扩展搜索范围,将 review-chamber 纳入其中:
python scripts/palace_manager.py search "authentication" \
--palace project-name \
--room review-chamber \
--type semantic
**验证:**运行 python --version,以确认 Python 环境。
评估标准
值得捕获(得分 ≥ 60)
- 有文档记录其理由的架构决策
- 在 2 个或更多 PR 中出现的重复模式
- 安全/性能方面的关键发现
- 能解释业务逻辑的领域知识
- 会影响未来代码的约定变更
跳过(得分 < 60)
- 一次性的战术性修复
- 没有理由说明的风格偏好
- 没有模式可循的明显 Bug
- 外部依赖问题
- 临时变通方案
CLI 参考
# Capture knowledge from PR
/review-room capture <pr_number> [--room <room_type>] [--tags <tags>]
# Search review chamber
/review-room search "<query>" [--room <room_type>] [--tags <tags>]
# List entries
/review-room list [--room <room_type>] [--limit N]
# View entry details
/review-room view <entry_id>
# Export for documentation
/review-room export [--format markdown|json] [--room <room_type>]
# Statistics
/review-room stats [--palace <palace_id>]
**验证:**运行带有 --help 标志的命令,以确认其是否可用。
最佳实践
- 立即捕获决策 - Review 刚结束时上下文最清晰
- 链接相关条目 - 构建知识图谱
- 使用一致的标签 - 便于跨项目发现
- 定期 Review - 清理过时条目
- 主动展示 - 开始相关工作时展示相关知识
模块参考
- 详细的捕获流程请参阅
modules/capture-workflow.md - 知识价值评估标准请参阅
modules/evaluation-criteria.md - 查询优化请参阅
modules/search-patterns.md
退出标准
- 对每项 PR 审查发现执行知识检测清单评估; 评分 ≥ 60 的发现予以记录,< 60 的跳过
- 将每条已记录的发现路由到正确的房间:
decisions/、patterns/、standards/或lessons/ - 每条记录都包含
source_pr、date、palace_location和至少一个tag - 记录后,在新条目与任何相关的现有宫殿房间之间添加 双向链接
- 存储后,使用标签或内容查询时,
palace_manager.py search "<topic>"会返回已记录的条目
评论
支持 Markdown