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

refactor-safely

Load for behavior-preserving rename, move, decomposition, dead-code removal, dependency cleanup, record/class conversion, or immutable contract migration that needs caller, flow, test, and impact analysis; not for feature work or one-line cleanup.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.5 KB

SKILL.md(원문)

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

<!-- ABOUTME: Knowledge-graph workflow for behavior-preserving structural refactoring. --> <!-- ABOUTME: Requires preview, impact, affected-flow, and post-change verification. -->

Resources

  • Record contracts — load for record/class conversion, immutable collections/results, semantic values, generated contracts, and focused ratchets.
  • Architecture — load when the refactor crosses projects or layers.

Rules

  • Preserve observable behavior before changing structure. Lock the exact consumer seam with a failing regression test; do not weaken tests or retain compatibility shims to make the migration easier.
  • Start with the knowledge graph: minimal context, impact radius, affected flows, callers, and tests. Escalate detail only when the bounded result cannot resolve ownership.
  • Use LSP rename for symbols when available. Preview every rename/move and keep generated artifacts under their owning generator.
  • A record/class conversion must classify identity, construction, equality, collection ownership, serialization, PATCH presence, HAL behavior, framework mutation, and diagnostic privacy.
  • Change the innermost owning contract first and migrate every caller outward. Do not create duplicate DTOs, transitional aliases, public setters, or legacy generated clients.
  • Generated C# contracts change through eng/tools/Explore.GeneratedContracts and MSBuild, never by editing EventApiClient.g.cs.
  • Stop and re-baseline when impact evidence reveals feature behavior rather than a structural transformation.
  • The Expand–Contract Protocol for Wide Refactors: When a mechanical refactor (e.g. renaming a database column, converting an aggregate identity to UUIDv7, modifying a shared CQS request/result shape) has a blast radius too wide for a single atomic PR:
    1. Phase 1 (Expand): Introduce the new model, property, or handler method alongside the existing one without breaking or modifying old call sites. Ensure build and tests stay green.
    2. Phase 2 (Migrate in Batches): Migrate callers and tests in bounded slices (per feature directory or layer), keeping CI green at every batch because the old form remains functional.
    3. Phase 3 (Contract): Delete the obsolete form, remove deprecated fields, and clean up transitional shims once zero callers remain.

Workflow

  1. Use get_minimal_context, get_impact_radius_tool, and get_affected_flows_tool; query callers and tests for each changed symbol.
  2. Add a focused failing test for the behavior the old structure currently supplies.
  3. Preview the rename/move or write the exact record eligibility classification before editing.
  4. Apply the smallest structural change and migrate all callers without unrelated cleanup.
  5. Run detect_changes_tool, affected tests, architecture ratchets, and one real consumer surface.

Verification

  • For record migrations, run the focused commands in RECORD_CONTRACTS.md.
  • Run LSP diagnostics on every changed source file.
  • Run the changed domain's tests and project build once, then inspect detect_changes_tool for unexpected flows.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Load for Blazor/MudBlazor UI changes involving forms, dialogs, focus, keyboard navigation, landmarks, ARIA, color contrast, RTL-safe styling, or WCAG 2.2 AA tests; not for backend-only changes.

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

islamu-ngo/Event82026년 10월 19일 업데이트

Load when a task asks to research, verify, compare, or look up framework/package behavior, release notes, standards, RFCs, CVEs, or unfamiliar APIs; use repository evidence first, then official docs, and not for codebase navigation alone.

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

islamu-ngo/Event82026년 10월 19일 업데이트

aspire

무료

Load for Aspire AppHost work: start/stop/wait resources, inspect dashboard/logs/traces, add integrations/resources, rebuild a service, run isolated worktrees, or diagnose Aspire orchestration; not for plain dotnet apps, container-only deployments, or cloud deployment.

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

islamu-ngo/Event82026년 10월 19일 업데이트

Load for authentication or authorization changes involving BFF cookies/tokens, JWT validation, claims/user ID extraction, policies, handler access checks, impersonation, or 401/403 bugs; not for UI affordance gating alone.

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

islamu-ngo/Event82026년 10월 19일 업데이트

Load for Blazor BFF server work involving YARP proxy routes, cookie sessions, access-token forwarding/refresh, downstream API calls, BFF handlers, or browser-to-API auth failures; not for client component rendering or API JWT validation alone.

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

islamu-ngo/Event82026년 10월 19일 업데이트

Load when editing Blazor `.razor.css`, scoped selectors, `::deep`, BEM class names, RTL/logical CSS properties, or styling nested MudBlazor components; not for global design tokens or non-Blazor CSS.

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

islamu-ngo/Event82026년 10월 19일 업데이트

islamu-ngo의 스킬 모두 보기

이 스킬의 문제 신고