Community程式設計與開發github.com

變更範圍審查

驗證程式碼變更符合預期範圍與需求,不超出界限。

變更範圍審查 是什麼?

此技能是一個嚴格的通過/失敗檢查機制,用於驗證程式碼變更是否精準地完成其應有的任務——不多也不少。它適合在 TDD 驗證階段、PR 審查或任何需要範圍驗證的程式碼審查中使用。技能會根據實作計劃、需求清單、約束條件以及允許修改的檔案清單來建立範圍邊界,然後逐一檢查每個變更檔案是否符合需求、未超出允許範圍,且未違反任何約束。若所有檢查通過則回傳 ACCEPT;若發現違規,則以統一的格式列出違規位置與說明。此外,該技能還提供「最小變更偏誤檢查」,辨識實作者是否為了最小化變更而避開了更好的結構性方案,並以 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:
- <file>:<line> - <用你自己的話描述>
- <file> - <描述>

[可選] 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

相關技能