Skip to content
Development
Skill

/051-design-two-steps-methods

Use when a complex or risky code change should be split into Kent Beck's two-step method by first making the change easy through behavior-preserving preparatory refactoring, then making the intended behavior change once the design supports it. This should trigger for requests

From plugin
plinth
457124 skills

Claude Code

$ npx -y skills add jabrena/plinth --skill 051-design-two-steps-methods --agent claude-code

SKILL.md

051-design-two-steps-methods.SKILL.md
name: 051-design-two-steps-methods
description: Use when a complex or risky code change should be split into Kent Beck's two-step method by first making the change easy through behavior-preserving preparatory refactoring, then making the intended behavior change once the design supports it. This should trigger for requests such as Apply two-step change; Make this risky change safer; Refactor before changing behavior; Separate preparation from behavior change. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0

Two-Step Change Method

Guide Java developers through complex or risky changes by keeping design preparation separate from behavior modification. **This is an interactive SKILL**.

**What is covered in this Skill?**

  • Clarifying the intended behavior change before editing
  • Identifying design obstacles that make the change difficult or risky
  • Step 1: behavior-preserving preparatory refactoring that makes the change easy
  • Validation that Step 1 preserves existing behavior
  • Step 2: the smallest intended behavior change after the design supports it
  • Verification that Step 2 delivers the intended behavior
  • Handoff to focused Java, framework, persistence, messaging, API, or testing skills while preserving the two-step sequence

Constraints

Separate behavior-preserving preparation from behavior-changing work, and validate after each step.

  • **MUST**: State the intended behavior change before proposing preparatory refactoring
  • **MUST**: Keep Step 1 behavior-preserving; do not mix broad refactoring with the intended behavior change
  • **MUST**: Verify existing behavior after Step 1 using the project-appropriate tests, build, characterization tests, or manual checks
  • **MUST**: Make Step 2 only after the design has been prepared and validated
  • **MUST**: Verify the intended behavior after Step 2 with focused tests and relevant build checks
  • **MUST**: Record assumptions and risks when preparation cannot be fully separated from behavior change

When to use this skill

  • Apply two-step change
  • Make this risky change safer
  • Refactor before changing behavior
  • Separate preparation from behavior change
  • Make the change easy, then make the easy change

Workflow

1. **Define the intended change**

Read `references/051-design-two-steps-methods.md`, inspect the relevant code and tests, and state the exact behavior or capability that must change. Identify why the current design makes the change complex, risky, or hard to verify.

2. **Plan preparatory refactoring**

Choose the smallest behavior-preserving refactoring that reduces the obstacle: extract method or class, clarify names, isolate dependencies, add seams for testing, move responsibilities, improve types, or add characterization tests before touching behavior.

3. **Make the change easy**

Apply Step 1 as focused preparatory refactoring only. Keep commits, notes, or task boundaries clear enough that reviewers can see no intended behavior change is included.

4. **Validate preserved behavior**

Run the relevant existing tests, build checks, characterization tests, or manual verification. If behavior changes unexpectedly, fix or revert the preparation before proceeding.

5. **Make the easy behavior change**

Apply the smallest intended behavior change now that the design supports it. Use focused Java, framework, persistence, messaging, API, or testing skills when detailed implementation guidance is needed.

6. **Verify and report the outcome**

Verify the intended behavior with targeted tests and relevant project validation. Report what was preparation, what changed behavior, what was verified after each step, and any remaining risks.

Reference

For detailed guidance, examples, and constraints, see [references/051-design-two-steps-methods.md](references/051-design-two-steps-methods.md).

Read more
@jabrena
Ships withplinth

Languages: Español · 中文 Help this project grow: Become a sponsor

Stars on GitHub

Momentum

stars in total
457
Star history of jabrena/plinth on GitHub, a chart by star-history.com

Other skills on plinth.

001-commands-inventory

001-commands-inventory

Use when you need to generate a checklist document with embedded commands inventory, following the embedded template exactly and…

@jabrena@jabrenaInstall Skill
002-agents-inventory

002-agents-inventory

Use when you need to generate a checklist document with embedded agents inventory, following the embedded template exactly and…

@jabrena@jabrenaInstall Skill
003-skills-inventory

003-skills-inventory

Use when you need to generate a checklist document with Java system prompts from skills.xml, following the embedded section…

@jabrena@jabrenaInstall Skill
004-commands-installation

004-commands-installat…

Use when you need to install the embedded project commands into command directories (.github/commands, .claude/commands,…

@jabrena@jabrenaInstall Skill
005-agents-installation

005-agents-installatio…

Use when you need to install the embedded robot agents into .github/agents, .claude/agents, .cursor/agents, or .codex/agents,…

@jabrena@jabrenaInstall Skill
012-agile-epic

012-agile-epic

Guides the creation of agile epics with comprehensive definition including business value, success criteria, and breakdown into…

@jabrena@jabrenaInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about 051-design-two-steps-methods.

Which coding agents can use 051-design-two-steps-methods?
051-design-two-steps-methods installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.