051-design-two-steps-methods

Featured

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

AI & Automation 423 stars 89 forks Updated 3 days ago Apache-2.0

Install

View on GitHub

Quality Score: 93/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 -...

Details

Author
jabrena
Repository
jabrena/plinth
Created
1 years ago
Last Updated
3 days ago
Language
Java
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Featured

054-design-tdd

Use when Java implementation work should be guided by Test-Driven Development, including maintaining a test list, choosing the next behavior, writing a failing test first, implementing only enough production code to pass, and refactoring while keeping tests green. This should trigger for requests such as Apply TDD; Use test-driven development; Drive this Java change with tests; Write the failing test first; Red-green-refactor this feature. Part of Plinth Toolkit

423 Updated 3 days ago
jabrena
Code & Development Featured

053-design-simple-rules

Use when Java design, refactoring, or implementation tradeoffs should be evaluated with Kent Beck's simple design rules, including passes the tests, reveals intention, has no duplication, and has the fewest elements. This should trigger for requests such as Apply simple design rules; Review this design with Beck's rules; Choose between these refactoring options; Keep this Java design simple. Part of Plinth Toolkit

423 Updated 3 days ago
jabrena
Code & Development Solid

refactor

Restructure existing code without changing its behavior, through a test-gated refactoring loop: a named target, a green suite over that target before any edit, a planned sequence of small named refactorings, and the full suite re-run after every step. Use when the user wants to refactor, restructure, clean up, simplify, or improve the design of existing code, or to apply refactoring recommendations from a code-review or architectural-analysis report. This skill changes code; it does not review code (use code-review), assess architecture (use architectural-analysis), or build new behavior test-first (use tdd). Do not use it on code inside an active tdd loop; the refactor step of tdd owns that cleanup.

126 Updated 2 days ago
testdouble