incremental-refactoring

Solid

Safely evolving existing production codebases through incremental refactoring. Focus on minimal-change corrections, backward compatibility, and avoiding unnecessary rewrites. Use when modifying existing systems, fixing correctness issues, improving architecture, adding features to production code, reviewing proposed changes for blast radius, or planning multi-step migrations. Also use when the user says "minimal change", "don't rewrite", "backward compatible", or "smallest diff possible".

Code & Development 3 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 82/100

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

Skill Content

# Incremental Refactoring ## Fail-Fast Rule If any mandatory invariant, validation, or precondition fails, **stop and return a structured failure**. Never guess, infer, smooth, approximate, or "fix" business-critical data. ## Cardinal Rule Every change must be the **smallest correct diff** that achieves the goal. If a change can be split into two independent changes, it should be. Production systems earn trust through small, reversible steps. ## Do Not Touch Hot Path **Never refactor, optimize, or restructure hot-path logic unless explicitly instructed by the user.** The hot path is any code that executes on every incoming request or event (request handlers, normalization, cache update, response serving, background processors on the critical read/write path). If the user asks for a general refactor, clarify scope first: - "Does this include hot-path code?" - If no explicit confirmation, exclude hot path from the change. Changes to hot-path code require: - Explicit user instruction - Shadow mode validation before cutover - Rollback plan documented before merge ## Shadow Mode for Critical Logic For any logic change that affects a **critical computation** (numeric math, ranking, pricing, eligibility, score calculation — anything where a silent regression would harm users), a shadow computation **must** exist before replacing production logic: ```typescript function computeMetric(input: Input): MetricResult { const oldResult = legacyComputeMetric(input); if (FLAGS...

Details

Author
Canhada-Labs
Repository
Canhada-Labs/ceo-orchestration
Created
4 weeks ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category