Community编程与开发github.com

范围审查

验证代码变更符合预期范围和需求,不超出边界。

范围审查 是什么?

该技能专为AI助手设计,用于审查代码变更是否严格限定在指定的范围内。它作为一个二进制准入/拒绝门,确保修改只解决明确的需求(REQ-*),遵守既定的约束(CC-*),并且只触及允许的文件。它会输出结构化的结果:要么是“ACCEPT”,要么是详细的“VIOLATIONS”,并包含位置和解释。此外,它包含一个“最小变更偏见”检查,以标记实现者可能为了最小改动而回避的潜在重构机会(REFACTORING)。此技能适用于验证驱动的开发阶段、拉取请求范围合规性审查,以及任何需要进行范围验证的代码审查流程。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/review-scope

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

范围审查技能

目的

验证代码变更是否严格按照要求执行——不多,也不少。 这是一个通过/失败的门,而不是反馈环节。

何时使用

  • TDD 验证阶段
  • PR 审查中的范围合规性
  • 任何需要范围验证的代码审查

所需输入

context_files

  • 实施计划或需求文档
  • 设计文档(如果有)
  • 待审查的变更文件

context_data

  • commit_details: 本次变更应完成的内容
  • requirements: 正在处理的 REQ-* 列表
  • constraints: 必须满足的 CC-* 约束列表
  • allowed_files: 允许修改的文件(范围边界)

流程

1. 建立范围边界

根据输入确定:

  • 必须完成的内容(需求)
  • 绝对不能做的事情(约束)
  • 可以修改的文件
  • 期望的行为

2. 审查变更

对于每个变更文件:

  1. 该文件是否在允许集合中?
  2. 变更是否满足陈述的需求?
  3. 是否存在与需求无关的变更?
  4. 变更是否违反任何约束?

3. 报告结果

如果所有检查通过:

ACCEPT

如果任何检查失败,列出违规:

VIOLATIONS:
- <文件>:<行> - <用你自己的话描述>
- <文件> - <描述>

[可选] THEMES: <值得指出的模式>

违规格式

自然地描述违规,包含位置和清晰解释:

- src/parser.rs:45 - 添加了不属于提交范围的日志记录基础设施
- src/config.rs - 修改了允许集合之外的文件

如果在违规中发现模式,请指出:

THEMES: 多项变更超出了陈述的需求范围,涉及错误处理重构

最小变更偏见检查

实施者倾向于做出尽可能小的变更来实现目标。 在识别违规后,考虑:

这些违规是否指出了任何潜在的重构,可以使代码更具可维护性? 实施者是否为了快速修复而回避了更好的结构解决方案?

如果是,请在 REFACTORING 部分中注明:

REFACTORING: <实施者回避的结构改进描述>

这不是违规——而是供编排器考虑的标记。

此技能不做的事情

  • 提出与违规无关的改进建议
  • 提供通用的建设性反馈
  • 审查代码风格(使用 review-style 技能)

这是一个二进制门:ACCEPT 或 VIOLATIONS。重构说明是可选的标记,不是阻塞项。

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

ad-hoc-implementation-plan

Transform a rough plan into implement-commit ready artifacts. Allows rigorous review while implementing.

build-kit-locally

Build a kit and publish it to a locally hosted registry for development testing

build-variant-from-local-kits

Build a variant using locally published kits for development validation

deep-research

Create educational documents that build understanding progressively with citations

edit-spec-file

Edit Bottlerocket RPM spec files following project style conventions

fact-find

Quick lookup of specific facts about Bottlerocket with citations

idea-honing

Clarify feature ideas through iterative Q&A, recording insights to guide concept development

implement-commit

Implement commits from an implementation plan using a TDD pipeline

local-registry

Start and manage a local OCI registry for Bottlerocket kit development

prepare-core-kit-release

Prepare bottlerocket-core-kit for release by bumping version and updating changelog

propose-feature-concept

Create a new feature concept document to pitch the idea and explain the problem/solution

propose-feature-design

Create or update feature technical design document with architecture and implementation guidance

propose-feature-requirements

Create or update feature requirements specification using EARS notation with examples and appendices

propose-feature-test-plan

Create a test plan mapping EARS requirements and Critical Constraints to specific tests

propose-implementation-plan

Create an implementation plan with atomic commits that build toward a complete feature

review-code

Deep code review generating PR comments via principled question-driven analysis

review-style

Verify code follows project style guides without providing improvement suggestions

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

相关技能