ada-engineering-refactoring

Plans and executes architecture-level whole-project refactoring with six engineering quality gates.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-engineering-refactoring-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-engineering-refactoring
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-engineering-refactoring
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-engineering-refactoring-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Mechanical refactoring (extract-method, extract-helper) often fails to meet engineering-grade standards, leaving codebases inconsistent and hard to extend. This Skill replaces ad-hoc cleanup with a disciplined, architecture-first workflow that enforces type-system constraints, intent-revealing APIs, interface-based dependencies, and whole-project consistency. ## Core Features & Use Cases - Six Quality Gates: Enforces type-system constraints over runtime validation, intent-revealing API names, interface-based dependencies, orchestration/implementation separation, whole-project consistency, and Razor-first parity. - Plan-Approve-Execute Workflow: Maps the full project scope, writes a phased refactoring plan in docs/refactoring/, gets explicit user approval, then executes with build/test verification after each phase. - Detailed Reference Procedures: Includes value-type migration cascades (string to strong ID, double to Ratio), Blazor component extraction patterns, a quality checklist, and a plan template. - Use Case: A user rejects mechanical dedup on a Blazor dock layout project and asks for Microsoft-level engineering quality; the agent reverts the rejected changes, writes a multi-phase plan covering value-type migration and orchestrator extraction, then executes with a final whole-project consistency pass. ## Quick Start Ask the agent to refactor the entire project to engineering-grade quality with a written plan for approval before any code changes.

Frequently Asked Questions about ada-engineering-refactoring

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

FAQPage Schema
How do I refactor a whole project to engineering-grade quality?

Follow a plan-approve-execute workflow: map all affected files, write a phased plan in docs/refactoring/ with verification criteria per phase, get explicit user approval, then execute each phase with build and test checks. Finish with a whole-project consistency pass against six quality gates.

When is mechanical refactoring not enough for code cleanup?

Mechanical dedup falls short when users reject extract-method style fixes and ask for engineering-level quality, whole-project consistency, or a codebase a new developer can extend naturally. That signal means switching to architecture-first refactoring with quality gates.

How do I migrate from string IDs and doubles to strongly-typed value types in C#?

Introduce readonly structs with IEquatable<T> (not record struct on .NET 6), then cascade fixes through services, commands, DTOs, Razor files, tests, and demo projects. Use constructor wrapping at call sites, .Value for primitive access, and explicit casts for double-to-Ratio assignments.

Should a constrained value type throw or clamp on out-of-range input?

Default to silent clamping when arithmetic can produce intermediate out-of-range values or tests construct values outside the range, since throwing breaks test setup and intermediate calculations. Reserve throwing for API boundary inputs where out-of-range indicates a genuine bug.

What Blazor pitfalls appear during Razor component refactoring?

Common issues include missing @key on re-registering components causing stale state, @ref parameter named 'ref' failing as a C# keyword, delegate calls with strong-typed IDs failing CS1503, and ternary type inference failing between value types and null. Extract repeated templates into child components and inline logic into computed properties.

When should I not use architecture-level refactoring?

Skip it for single-file cleanup, pre-commit verification, bug fixes, and small scoped changes, which suit simpler patch workflows. For C#/.NET/Blazor-specific refactors, route through the stack-specific dotnet engineering refactoring skill instead.