본문으로 건너뛰기
cccskills
무료GitHub에 공개

gz-obpi-simplify

Use after an OBPI's implementation, before reconcile, to review its code for reuse, quality and efficiency.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

gz-obpi-simplify

OBPI-scoped code review: resolve scope from the brief, review across three dimensions (reuse, quality, efficiency), fix issues found.

Position in workflow: After implementation (pipeline Stage 2-3), before reconcile. This is the implementation quality gate — the pipeline verifies correctness; simplify verifies craft.

Common Rationalizations

These thoughts mean STOP — you are about to skip the craft gate:

ThoughtReality
"The code is working fine, no simplification needed"Working code that is hard to read will be hard to fix when it breaks. Simplification is about future maintainability.
"Changing this code is too risky"Every fix is behavior-preserving and validated by tests. Risk is an excuse to leave technical debt.
"This is just formatting, ruff handles it"Ruff handles syntax formatting. Semantic simplification (dead code, poor naming, unnecessary complexity) is this skill's domain.
"The OBPI is done, simplification is optional"Simplification is the craft gate between pipeline completion and reconciliation. Skipping it ships unreviewed complexity.
"I don't understand this code well enough to simplify it"Step 1 is "understand before touching." If you cannot understand it, that is a red flag for the code, not a reason to skip.

Red Flags

  • Agent reports "no issues found" without reading the scoped files
  • Review covers only one dimension (e.g., quality) while skipping reuse and efficiency
  • Files outside the OBPI's Allowed Paths are modified
  • Tests fail after simplification and agent proceeds anyway
  • Agent adds new functionality under the guise of "simplification"

When to Use

  • After completing OBPI implementation (post-pipeline or standalone)
  • When the user says "simplify OBPI-X.Y.Z-NN"
  • Before closeout when you want a quality pass on the implementation
  • As a periodic review on recently completed OBPIs

When NOT to Use

  • During implementation (let the pipeline finish first)
  • On files outside the OBPI's Allowed Paths
  • For adding features or changing behavior

Invocation

/gz-obpi-simplify OBPI-0.5.0-01
/gz-obpi-simplify 0.5.0-01
/gz-obpi-simplify OBPI-0.5.0-01 focus on error handling

The first token is the OBPI ID. Remaining tokens are an optional focus directive.


Step 1: Resolve OBPI Scope

  1. Find the brief file using the Glob tool:

    Glob(pattern="docs/design/adr/**/obpis/OBPI-{id}*.md")
    

    Glob is the cross-platform native answer; find is Bash-only and fails on Windows-native shells.

  2. Read the brief and extract the ## Allowed Paths section.

  3. Expand those patterns against the working tree to produce the concrete file list.

  4. If the brief has an ### Implementation Summary section with explicit file paths, include those too — they capture files actually touched.

  5. Filter to source/test code (.py, .md in docs/, config files). Exclude binaries.

If no brief is found, abort with an error message.

The file list is the review scope. Do not review files outside it.

Protected Regions

Before reviewing, scan scoped files for simplify-ignore annotations. Code within these annotations is excluded from all three review dimensions.

# simplify-ignore-start: governance-critical
# ... code that must not be simplified ...
# simplify-ignore-end

Supported reasons:

ReasonWhen to use
governance-criticalCode that enforces governance invariants (ledger writes, gate checks)
performance-sensitiveCode where clarity was intentionally traded for performance
external-contractCode that implements an external API or protocol exactly
intentional-complexityCode where the complexity is inherent to the problem domain

Rules:

  • Do not modify code within annotated regions
  • Do not remove or relocate the annotations themselves
  • If a protected region looks like it no longer needs protection, flag it for human review instead of changing it
  • Report protected regions in the Step 3 summary so the human knows what was excluded

Step 2: Review Across Three Dimensions

Review the scoped files from three independent lenses. Agents that support parallel dispatch should run all three concurrently. Sequential execution is acceptable when parallel dispatch is not available.

Dimension 1: Reuse

Look for:

  • Duplicate logic across files that should be extracted to a shared function
  • Copy-pasted patterns with minor variations
  • Opportunities to use existing project utilities instead of inline implementations
  • DRY violations within the OBPI scope

Dimension 2: Quality

Look for:

  • Unused imports, dead code, unreachable branches
  • Poor naming (unclear abbreviations, misleading names)
  • Overly complex conditionals that should be simplified
  • Missing or incorrect type hints
  • Functions exceeding 50 lines or modules exceeding 600 lines
  • Mutable default arguments
  • Bare except clauses

Dimension 3: Efficiency

Look for:

  • Unnecessary repeated computation (e.g., re-parsing the same file in a loop)
  • Inefficient data structures (list where set/dict would be better)
  • Unnecessary string concatenation in loops
  • File I/O that could be batched
  • Redundant validation or transformation passes

For each finding: fix it directly. Skip false positives silently. Apply the optional focus directive (if provided) to weight review attention.


Step 3: Validate and Report

After all reviews complete:

  1. Run quality checks on changed files:
    uv run ruff check . --fix && uv run ruff format .
    uv run gz test
    
  2. Report a concise summary:
    • Number of issues found per dimension
    • What was fixed
    • Any findings flagged but not auto-fixed (ambiguous cases)
  3. If no issues found, confirm: "Code is clean across all three review dimensions."

Constraints

  • Scope is sacred. Only review and edit files within the OBPI's Allowed Paths.
  • No new features. This is review, not enhancement. Do not add functionality.
  • No style-only changes. Ruff handles formatting. Focus on semantic issues.
  • Preserve behavior. Every fix must be behavior-preserving. If uncertain, flag instead of fixing.
  • Tests must still pass. If a fix breaks tests, revert it.
  • Respect simplify-ignore annotations. Do not modify code within annotated protected regions.

Related Skills

SkillRelationship
gz-obpi-pipelinePipeline verifies correctness; simplify verifies craft
gz-obpi-syncRun after simplify to catch any status drift
gz-checkSimplify runs quality checks as part of Step 3

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use to mine ../airlineops for governance habits gzkit lacks; produces a parity scan report (gzkit leads, AirlineOps adopts).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

Use to file a GitHub issue when a finding needs its own work order or the operator asks; OBPI corrections stay in its change log.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

ghi-close

무료

Use to do the work a GHI describes, verify it and close the issue with evidence in one sweep.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

Use to triage the open GHI queue before planning or choosing what to pull; produces a ranked deliverable.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

git-sync

무료

Run the guarded repository sync ritual; the hooks your pre-commit config declares enforce the quality gates.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

git-sync

무료

Run the guarded repository sync ritual; commit-time hooks enforce the cheap gates and the pre-push hook runs gz check.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tvproductions/gzkit92026년 10월 22일 업데이트

tvproductions의 스킬 모두 보기

이 스킬의 문제 신고