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

pharo-rename-method

Rename Pharo methods safely through Genie's `rename_method` MCP refactoring tool. Use when a selector should be renamed while preserving behavior, updating senders and symbol references across the live image, including as one step in larger refactorings such as clarify API names, split responsibilities, or move behavior behind better messages.

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

설치 방법 보기

포함된 파일(2)

  • SKILL.md2.6 KB
  • agents/openai.yaml209 B

SKILL.md(원문)

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

Pharo Rename Method

Use this skill only for behavior-preserving selector renames in a live Genie image. Work through the genie MCP tools; do not edit Tonel files.

Workflow

  1. Establish a green baseline with run_test for the narrow class or package you will touch.

  2. Map the impact before renaming:

    • search_implementors for the old selector.
    • search_references for the old selector.
    • get_method_source for representative implementors and callers.
  3. Use rename_method, not define_method plus remove_method, when the intent is a real rename:

    • class_name: owning class name, without class.
    • method_name: old selector string.
    • new_method_name: new selector string.
    • is_class_method: true for class-side methods, omit or false for instance-side methods.
    • permutation: optional argument-position array, for example [2, 1]. Omit it for ordinary same-order renames.
  4. Read back the changed methods. Confirm:

    • The old selector is gone from the intended class.
    • The new selector exists.
    • Senders now use the new selector.
    • Any symbol-literal references that should change have changed.
  5. Rerun the same tests. If the rename is part of a larger refactoring, stop at the first green rename before making the next structural move.

  6. Save the image only through save_image gated on the relevant test class or package.

Sequencing

Use rename-method early when an unclear selector is hiding the next move. For example:

  • Rename a misleading public message before extracting a helper that will call it.
  • Rename a collaborator-facing selector before moving behavior to that collaborator.
  • Rename a protocol family one selector at a time, testing between each rename.
  • Rename test fixture selectors with care: refactoring updates symbol literals. In tests that assert the old selector disappeared, write 'oldSelector' asSymbol, not #oldSelector, or the refactoring may rewrite the assertion itself.

Do not use rename_method to change arity and behavior together. First make behavior-preserving same-arity renames green. Then do signature or behavior changes under a test-first workflow.

Example

{
  "class_name": "Invoice",
  "method_name": "total",
  "new_method_name": "totalAmount"
}

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Use when modifying a Genie-backed Pharo project through the live MCP server on localhost:8087; includes project ownership, image read/change/test/save workflow, and first steps for new user projects.

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

KentBeck/SmalltalkGenie202026년 7월 20일 업데이트

Refactor messy Pharo code safely through the genie MCP tools, working from the live image (no files). Use for renames, method extraction, moving behavior, or general cleanup of existing code.

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

KentBeck/SmalltalkGenie202026년 7월 20일 업데이트

pharo-tdd

무료

Drive a Genie change test-first through the genie MCP tools, working entirely from the live image (no files). Use when adding behavior or fixing a bug in the image — anything where a test should lead.

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

KentBeck/SmalltalkGenie202026년 7월 20일 업데이트

Use when reviewing or refactoring code that pulls apart another object's private representation, such as raw limb/byte/slot access, slice constructors, or helper methods that expose internal storage. Guides agents to find representation envy and suggest moving behavior onto the object that owns the representation, using live-image Genie tools when working in Pharo.

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

KentBeck/SmalltalkGenie202026년 7월 20일 업데이트

KentBeck의 스킬 모두 보기

이 스킬의 문제 신고