Community코딩 & 개발github.com

리뷰-스타일

코드가 프로젝트 스타일 가이드를 따르는지 확인하고 개선 제안은 제공하지 않습니다.

리뷰-스타일란 무엇인가요?

이 스킬은 코드가 프로젝트 스타일 가이드를 준수하는지 검증하는 데 사용됩니다. 합격/불합격 게이트 역할을 하며, 피드백 세션이 아닙니다. TDD 검증 단계, PR 스타일 리뷰, 스타일 검증이 필요한 모든 코드 리뷰에서 유용합니다. 리뷰 단계(designer/tester/implementor)에 따라 적용되는 스타일 가이드가 달라지며, 변경된 파일 목록을 입력으로 받아 각 파일을 검사합니다. Ledger 파일이 제공되면 이전 사이클의 위반 사항을 추적하고, 해결된 항목은 확인하며, 논쟁 중인 항목은 재차 제기하지 않습니다. 검증 결과는 `accept` 또는 `violations` 상태와 위반 사항 목록을 포함한 구조화된 응답을 반환합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cbgbt/bottlerocket-forest/tree/main/skills/review-style

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

스타일 리뷰 스킬

목적

코드가 모든 프로젝트 스타일 가이드를 따르는지 확인합니다. 이는 합격/불합격 게이트(gate)이며, 피드백 세션이 아닙니다.

사용 시기

  • TDD 검증 단계
  • 스타일 준수를 위한 PR 리뷰
  • 스타일 검증이 필요한 모든 코드 리뷰

필요한 입력

context_files

  • 리뷰 중인 단계의 스타일 가이드 (예: docs/style/rust-design.md)
  • 리뷰할 변경된 파일
  • Ledger 파일 (선택 사항, 다중 사이클 리뷰용)

context_data

  • phase: 어떤 단계인지 (designer/tester/implementor) - 어떤 스타일 가이드 규칙이 적용될지 결정합니다.
  • changed_files: 리뷰할 파일 목록

응답 형식

다음 스키마에 맞는 구조화된 응답을 반환합니다:

class StyleResult(BaseModel):
    status: Literal["accept", "violations"]
    violations: list[str] = []  # 각 항목: "파일:줄 - 설명"
    themes: str | None = None   # 위반 사항 전체의 패턴 (선택 사항)

모든 검사를 통과한 경우:

StyleResult(status="accept")

검사에 실패한 경우:

StyleResult(
    status="violations",
    violations=[
        "src/config.rs:23 - snafu 셀렉터가 모듈 수준에서 임포트됨; 함수 내부에 있어야 함",
        "src/parser.rs:45 - 테스트에 Given/When/Then 주석 누락",
    ],
    themes="여러 위반 사항이 일관되지 않은 오류 처리 방식에서 비롯됨"
)

Ledger 인식

context_files에 ledger 파일이 제공되면:

  1. 이전 사이클 확인 - 어떤 위반 사항이 제기되었고 구현자가 어떻게 응답했는지 확인합니다.
  2. 해결된 항목 확인 - 수정 사항이 실제로 적용되었는지 확인합니다.
  3. 논쟁 중인 항목 존중 - 구현자의 이유가 타당하면 다시 제기하지 않습니다.
  4. 새로운 위반 사항만 제기 - 이전에 논의되지 않은 문제만 제기합니다.

스타일 가이드 (권위 있는 출처)

docs/style/ 디렉토리의 스타일 가이드가 유일한 진실 공급원입니다:

  • docs/style/rust-design.md - 설계 단계 규칙 (타입, 시그니처, bon, nutype, snafu)
  • docs/style/rust-impl.md - 구현 단계 규칙 (오류 처리, 임포트, 패닉 금지)
  • docs/style/rust-test.md - 테스트 단계 규칙 (Given/When/Then, test_case, 단언문)

해당 가이드를 읽고 판단을 적용하십시오. 요약에 의존하지 마십시오.

절차

1. 적용 가능한 규칙 식별

단계에 따라:

  • designer: rust-design.md 규칙 (특히 Project Crate Choices 표)
  • tester: rust-test.md 규칙
  • implementor: rust-impl.md 규칙
  • 테스트 파일 (#[cfg(test)] 모듈)은 단계에 관계없이 항상 rust-test.md 규칙을 적용받습니다.

2. 각 파일 검토

적용 가능한 스타일 가이드 규칙에 대해 검사합니다. 명확한 위반 사항만 표시하고 스타일 선호도는 표시하지 않습니다.

designer 단계의 주요 검사 사항:

  • 복합 구조체 (필드 2개 이상)는 #[derive(Builder)]와 #[non_exhaustive] 사용
  • 검증된 뉴타입은 nutype 사용
  • 오류는 #[snafu(module)]과 함께 snafu 사용
  • 함수 본문은 todo!()이며 구현체가 아님

implementor 단계의 주요 검사 사항:

  • 프로덕션 코드에 unwrap()/expect() 없음
  • Snafu 컨텍스트 셀렉터는 함수 내부에서 임포트
  • 임포트 사이에 빈 줄 없음

tester 단계의 주요 검사 사항:

  • 모든 테스트에 Given/When/Then 주석
  • 매개변수화된 테스트에 test_case 사용

3. 구조화된 결과 반환

StyleResult 스키마를 사용합니다. 오케스트레이터가 이를 파싱하여 다음 단계를 결정합니다.

이 스킬이 하지 않는 일

  • 위반 사항과 관련 없는 개선 제안
  • 일반적인 건설적 피드백 제공
  • 범위/정확성 검토 (review-scope 스킬 사용)
  • 가이드에 없는 스타일 선호도 지적

이것은 이진 게이트(binary gate)입니다: 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-scope

Verify code changes match intended scope and requirements without exceeding boundaries

test-local-twoliter

Build and test local changes to twoliter before releasing

update-twoliter

Update all Bottlerocket repositories to a new Twoliter version

관련 스킬