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

mechanical-refactor-verify

Verify file splits, function moves, module extractions, and renames by reproducing changes from a base commit and comparing files byte for byte. Generate repeatable proof scripts and reports that expose changes beyond relocation.

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

원문원문 설명 보기

Make mechanical refactoring (file splits, function moves, module extractions, renames) machine-checkable instead of eyeballed. Reproduce a relocation commit byte-for-byte from faithful primitives, and split an extraction into a verifiable prepare + move + postpare. Use when doing or reviewing such changes.

설치 방법 보기

이럴 때 유용합니다

  • Splitting a refactor into preparation, movement, and follow-up commits
  • Generating repeatable proof scripts for code moves
  • Verifying every provable commit in a branch
  • Finding extra changes bundled with file or function moves

포함된 파일(41)

  • SKILL.md5.6 KB
  • guide-construct-proof.md8.6 KB
  • guide-modify-skill.md6.3 KB
  • guide-split.md19.3 KB
  • guide-verify-proof.md8.3 KB
  • scripts/mechanical_refactor_proof_generator.py62.8 KB
  • scripts/mechanical_refactor_reproduction_cli.py18.0 KB
  • scripts/mechanical_refactor_reproduction_utils.py64.1 KB
  • scripts/tests/proof_generator/conftest.py559 B
  • scripts/tests/proof_generator/generator_testlib.py3.1 KB
  • scripts/tests/proof_generator/test_infer_extract_functions.py10.4 KB
  • scripts/tests/proof_generator/test_infer_extracts.py6.6 KB
  • scripts/tests/proof_generator/test_infer_imports.py5.1 KB
  • scripts/tests/proof_generator/test_infer_moves.py16.8 KB
  • scripts/tests/proof_generator/test_main_single_commit.py2.1 KB
  • scripts/tests/proof_generator/test_script_and_diff.py6.7 KB
  • scripts/tests/reproduction_cli/cli_testlib.py1.8 KB
  • scripts/tests/reproduction_cli/conftest.py514 B
  • scripts/tests/reproduction_cli/test_classification.py4.0 KB
  • scripts/tests/reproduction_cli/test_proof_discovery.py3.3 KB
  • scripts/tests/reproduction_cli/test_report.py3.3 KB
  • scripts/tests/reproduction_cli/test_skip_passed.py6.0 KB
  • scripts/tests/reproduction_cli/test_verify_chain.py7.4 KB
  • scripts/tests/reproduction_utils/conftest.py841 B
  • scripts/tests/reproduction_utils/reproduction_testlib.py1.2 KB
  • scripts/tests/reproduction_utils/test_add_imports.py9.4 KB
  • scripts/tests/reproduction_utils/test_call_sites.py8.0 KB
  • scripts/tests/reproduction_utils/test_delete_file.py2.3 KB
  • scripts/tests/reproduction_utils/test_extract_function.py6.3 KB
  • scripts/tests/reproduction_utils/test_extract_symbols_to_new_module.py8.7 KB
  • scripts/tests/reproduction_utils/test_extract_to_new_module.py3.7 KB
  • scripts/tests/reproduction_utils/test_infra_helpers.py5.3 KB
  • scripts/tests/reproduction_utils/test_move_assign.py2.5 KB
  • scripts/tests/reproduction_utils/test_move_symbol_delegate.py10.1 KB
  • scripts/tests/reproduction_utils/test_move_symbol.py15.7 KB
  • scripts/tests/reproduction_utils/test_remove_import.py5.2 KB
  • scripts/tests/reproduction_utils/test_remove_imported_name.py6.2 KB
  • scripts/tests/reproduction_utils/test_repath_import.py2.8 KB
  • scripts/tests/reproduction_utils/test_verify_and_run.py6.4 KB
  • spec-reproduction-cli.md8.3 KB
  • spec-reproduction-utils.md12.6 KB

SKILL.md(원문)

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

Mechanical Refactor — Machine-Checkable Verification

1. Overview

  • The correctness of a mechanical change (file split, function move, module extraction, rename) must be machine-checkable, not eyeballed — the proof is something anyone can re-run, whoever made the change and whenever.
  • One property: a commit is a pure relocation. One proof: reproduce — regenerate the move from the base commit with faithful primitives, run the formatter, byte-diff against the target.
  • Empty diff = the proof. Any residual = a bundled non-move change, surfaced for review.
  • A reshape must not ride along: split into optional prepare + certified move + optional postpare (guide-split.md).

2. Commands — what do you want to do?

The skill takes an argument naming one of three commands; invoked without one, pick the row matching your task.

  • split <base>..<tip> — author a compliant refactor branch: split it into commits, satisfy the contract (extract, move, file split) → guide-split.md: §1 splits the PR into classified pieces (the chain contract: classification format, correct labeling, proofs PASS, non-mechanical commits correctness-reviewed); §2 splits one piece into prepare + move + postpare (the case recipes and the anti-patterns). The argument is the chain to author (or a single commit / a description of the change to split).
  • construct <base>..<tip> [--match REGEX] [--out DIR] — construct the proof, for the chain or one commit → guide-construct-proof.md: §1 generates + publishes the whole chain's proof folder (the flags are the generator's: scripts/mechanical_refactor_proof_generator.py <base>..<tip> --match REGEX --out DIR); §2 proves a single commit — pass just <commit> (the generator, or a hand-written Repro when it reports UNSUPPORTED).
  • verify --base <base> --branch <branch> --proof <folder> [--jobs N] [--skip-passed] — verify someone's proof: a whole chain / PR branch → guide-verify-proof.md: run the chain verifier with exactly these flags (scripts/mechanical_refactor_reproduction_cli.py) — it checks every commit declares mechanical_provable or non_mechanical_provable, runs every provable commit's proof (never a sample), and writes one full report; then audit the authored surfaces and the HUMAN_REVIEW rows. Re-running one commit's script is for diagnosis only.
  • Decide whether a change counts as a clean move → spec-reproduction-utils.md: the property, the whole whitelist / not-allowed list, and each primitive's contract. The source of truth for the reproduction module; if any other file disagrees, it wins.
  • Change this skill itself (edit the engine, the generator, or the spec) → guide-modify-skill.md: the spec-leads rule, the faithfulness invariant, and the testing bar a change must clear before it is trusted.

3. Files

  • guide-split.md — split the PR into classified pieces (§1, the chain contract) and each piece into prepare + move + postpare (§2: case recipes, what stays mechanical, anti-patterns).
  • guide-construct-proof.md — produce the proof: the whole chain's proof folder + publishing (§1), and a single commit's proof — generator or hand-written Repro (§2).
  • guide-verify-proof.md — consume the proof: the whole-chain verifier, single-commit re-runs, verdicts, and the audit checklist for authored surfaces.
  • spec-reproduction-utils.md — the normative spec of the clean-move property and the reproduction primitives.
  • spec-reproduction-cli.md — the normative spec of the verified-chain property: the classification word rule, the proof obligation, the report, and the exit codes.
  • guide-modify-skill.md — change the engine, the generator, or the spec: the spec-leads rule, the byte-faithfulness invariant, and the testing bar.
  • scripts/mechanical_refactor_proof_generator.py — the generator: infers a reproduce recipe from a commit's diff and emits/runs a standalone, auditable script per commit, with a PASS / RESIDUAL / UNSUPPORTED verdict.
  • scripts/mechanical_refactor_reproduction_utils.py — the proof engine: the Repro builder's faithful relocation primitives plus the worktree + pre-commit + byte-diff scaffold. Self-contained — only git and the standard library.
  • scripts/mechanical_refactor_reproduction_cli.py — the chain verifier: classifies every commit in base..branch, runs every provable commit's proof from the proof folder, and emits the full chain report.
  • scripts/tests/ — pytest suites, one folder per module: reproduction_utils/ for the proof engine, proof_generator/ for the generator, reproduction_cli/ for the chain verifier.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Develop lightweight CUDA operations for SGLang using JIT, which compiles code on first use. A tensor-scaling example explains implementation conventions, input validation, memory access helpers, and when to choose this approach.

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

  • Add a lightweight CUDA operation to SGLang
  • Choose between JIT and ahead-of-time compilation
  • Validate tensor inputs in a kernel launcher
sgl-project/sglang3.7만2026년 10월 19일 업데이트

Add a CUDA/C++ GPU operation to sgl-kernel using AOT, meaning compilation before use. Follow the implementation through PyTorch registration, Python API exposure, SGLang integration, correctness tests, and benchmarks that account for cache reuse.

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

  • Adding a CUDA/C++ operation to sgl-kernel
  • Registering an operation with PyTorch and exposing a Python API
  • Testing numerical results and invalid inputs
sgl-project/sglang3.7만2026년 10월 19일 업데이트

Monitor selected GitHub Actions checks on an SGLang pull request until they pass on its latest commit. Diagnose failures, push small validated fixes, and retry only failed jobs within defined limits.

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

  • Monitor selected PR checks until they pass
  • Separate code failures from infrastructure problems
  • Apply small fixes and track the resulting checks
sgl-project/sglang3.7만2026년 10월 19일 업데이트

Review existing tests and CI, the automated checks run during development, for redundant coverage, misplaced tests, and opportunities to reduce runtime or cost. Receive file-specific recommendations based on documented improvement patterns, with uncertain findings separated.

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

  • Investigating a slow test suite
  • Finding redundant or misplaced tests
  • Reviewing CI runtime and cost
sgl-project/sglang3.7만2026년 10월 19일 업데이트

Understand and modify SGLang's CI pipelines, including test stage order, start conditions, early stopping after failures, and workload splitting. Use the guide to add jobs and investigate failed, skipped, or cancelled checks.

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

  • Add a test job to an SGLang CI stage
  • Investigate failed or skipped CI checks
  • Update test partitions and waiting job counts
sgl-project/sglang3.7만2026년 10월 19일 업데이트

Collect and review SGLang startup logs to identify unnecessary output and trace its source. Get saved logs and specific cleanup proposals while preserving useful diagnostics, with runtime changes left for user approval.

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

  • Investigating repeated messages in startup logs
  • Checking which startup warnings need attention
  • Comparing startup logs across models and GPU counts
sgl-project/sglang3.7만2026년 10월 19일 업데이트

sgl-project의 스킬 모두 보기

이 스킬의 문제 신고