Tidy First

Separate structural and behavioral changes into ordered commits.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/kaneshin/incubator --skill tidy-first
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Tidy First
Source: https://github.com/kaneshin/incubator/tree/main/plugins/dev-methodology/skills/tidy-first
Command: npx skills add https://github.com/kaneshin/incubator --skill tidy-first

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a disciplined approach to software commits by ensuring a clear separation between structural changes (tidying/refactoring) and behavioral changes (new features or bug fixes). It prevents mixing concerns in a single commit and promotes a clean, auditable history.

Core Features & Use Cases

  • Pure structural commits: Move and rename code, refactor helpers, and reorganize modules without altering behavior.
  • Pure behavioral commits: Add features or fix bugs without changing structure.
  • Guided workflow: Provides rules and templates for committing in two decisive steps (structural then behavioral) and validation before merging.

Quick Start

Start by tidying a module impacted by a planned feature, commit all structural changes, then implement the feature and commit the behavioral changes separately.

Frequently Asked Questions about Tidy First

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate structural changes from behavioral changes in commits?

Separate structural changes from behavioral changes by committing tidying and refactoring first—moving, renaming, and reorganizing code without altering behavior—then committing feature additions or bug fixes in a second, purely behavioral commit. This approach keeps commits pure, focused, and auditable.

What's the best way to structure commits for refactoring and feature development?

Structure commits by tidying first, then implementing. Start by making all structural changes to a module—reorganizing helpers, moving code, refactoring—and commit those changes. Next, implement the feature or fix and commit the behavioral changes separately, ensuring each commit has a single, clear purpose.

Why should I separate refactoring from feature commits?

Separating refactoring from feature commits improves code review clarity, enables easier blame and bisect operations, and prevents mixing concerns that obscure intent. Pure structural commits document reorganization intent independently from behavioral logic, making history auditable and easier to understand.

Can I use this approach for bug fixes as well as feature development?

Yes, this approach applies to feature development, refactoring, and bug fixes. For any change, tidy the affected code structure first—rename, move, reorganize—commit those structural changes, then implement the fix or feature and commit the behavioral changes separately.

What validation should I perform before merging commits structured this way?

Validate that structural commits contain only reorganization with no behavior changes, and that behavioral commits are isolated to feature or fix logic. Use provided templates and rules to confirm each commit is pure, then validate the full sequence together before merging to ensure correctness.

How does commit ordering affect code review and version control workflows?

Ordering structural commits before behavioral commits in version control creates a clean audit trail where refactoring changes are isolated and reviewable separately. This ordering simplifies blame tracking, enables targeted git bisect operations, and clarifies why code was reorganized independent of what it now does.