greenfield-clean-breaks

Plan greenfield redesigns by working backward from an ideal architecture to deletion waves.

4.8k|376|Updated Mar 16, 2023
One-click install
npx skills add https://github.com/EpicenterHQ/epicenter --skill greenfield-clean-breaks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: greenfield-clean-breaks
Source: https://github.com/EpicenterHQ/epicenter/tree/main/.agents/skills/greenfield-clean-breaks
Command: npx skills add https://github.com/EpicenterHQ/epicenter --skill greenfield-clean-breaks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Legacy codebases accumulate compatibility layers, fallback paths, and duplicated ownership that make systems hard to explain, test, and evolve. This Skill provides a disciplined operating mode for redesigning a system from a clean-slate vision and deleting old paths safely instead of patching around them.

Core Features & Use Cases

  • Greenfield Vision First: Anchors every redesign in an uncompromised product sentence and recognition test before touching existing code.
  • Clean-Break Execution Loop: Traces callers and owners, names asymmetric refusals, builds the new path, stops importing the old path, verifies, then deletes.
  • Wave-Ordered Deletion: Uses a reference guide for multi-wave replacements so rollback stays cheap until verification passes.
  • Use Case: When consolidating two storage layers in a TypeScript monorepo, use this Skill to define the single-owner target shape, identify fallback readers and aliases to delete, and sequence the migration so the old path is removed only after tests pass.

Quick Start

Ask the AI to run a greenfield clean-break pass on a specific module, stating the compatibility stance and whether it should propose only or implement.

Frequently Asked Questions about greenfield-clean-breaks

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

FAQPage Schema
How do I plan a clean break refactoring without keeping compatibility layers?

Start by writing the uncompromised vision sentence describing the final system with no inherited constraints, then work backward to deletion waves and owner changes. Build the new path, stop importing the old path, verify with tests and typecheck, and only then delete the old code.

What is the safest order for deleting an old code path during a migration?

Build the new path first, then stop importing the old path while leaving it on disk, verify with typecheck and tests, and delete the old path last. This keeps rollback to a single import flip if verification fails.

When should I stop and ask instead of deleting legacy code?

Pause before changing durable strings, published package APIs, auth or session schemas, migration readers for on-disk user data, encryption or sync wire formats, or amending ADRs. Greenfield pressure does not authorize silent data loss or breaking published surfaces when scope is ambiguous.

How do I find code that only exists to preserve an old design?

Trace definitions upward through callers, exports, routes, and docs, and look for smells like fallback readers, compatibility aliases, dual writers, optional fields preserving old shapes, and helpers that hide product decisions. Count callers with ripgrep and cite files as evidence.

What is an asymmetric refusal in software redesign?

An asymmetric refusal is dropping a small slice of promised behavior that creates a disproportionate share of code, branching, and testing complexity. Examples include refusing rare modes, provider-specific branches, or dual readers when the user loss is small but the implementation collapse is large.