Nw Progressive RefactoringSAFE
AI agents that guide you from idea to working code, with you in control at every step.
Overview
AI agents that guide you from idea to working code, with you in control at every step.
1a864ec81cdeOBSERVED · 2026-10-14What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: nw-progressive-refactoring description: Progressive L1-L6 refactoring hierarchy, 22 code smell taxonomy, atomic transformations, test code smells, and Fowler refactoring catalog user-invocable: false disable-model-invocation: true --- # Progressive Refactoring (Refactoring Priority Premise) Based on the Refactoring Priority Premise (RPP) from the Alcor Academy curriculum. ## RPP Levels (L1-L6) Execute levels in mandatory sequence. Lower levels before higher. ### Level 1: Foundation (Readability) Focus: eliminate clutter, improve naming, remove dead code. Smells: Dead Code | Comments (how-comments) | Speculative Generality | Lazy Class. Transformations: Rename | Extract (variables/constants) | Safe Delete. Impact: 80% of readability improvement value. Test smells: Obscure Test | Hard-Coded Test Data | Assertion Roulette. ### Level 2: Complexity Reduction (Simplification) Focus: method extraction, duplication elimination. Smells: Long Method | Duplicate Code | Complex Conditionals. Transformations: Extract (methods) | Move (common code). Impact: 20% additional readability improvement. Test smells: Eager Test | Test Code Duplication | Conditional Test Logic. ### Level 3: Responsibility Organization Focus: class responsibilities, coupling reduction. Smells: Large Class | Feature Envy | Inappropriate Intimacy | Data Class | Divergent Change | Shotgun Surgery. Transformations: Move | Extract (classes). Test smells: Test Class Bloat | Mystery Guest | General Fixture. ### Level 4: Abstraction Refinement Focus: parameter objects, value objects, abstractions. Smells: Long Parameter List | Data Clumps | Primitive Obsession | Middle Man. Transformations: Extract (objects) | Inline | Move. ### Level 5: Design Pattern Application Focus: Strategy | State | Command patterns. Smells: Switch Statements | complex state-dependent behavior. Transformations: Extract (interfaces) | Move (to polymorphic structure). ### Level 6: SOLID++ Principles Focus: SOLID principles, architectural patterns. Smells: Refused Bequest | Parallel Inheritance Hierarchies. Transformations: Extract (interfaces) | Move (responsibilities) | Safe Delete (violations). ### RPP Cascade Rule MANDATORY: complete each level fully before moving to the next. Do not skip levels. 80% of refactoring value comes from readability improvements (L1-L2). Focus effort on L1-L2 for maximum impact. Move to higher levels only when needed. ### Fast-Path for Small Changes When GREEN phase produced < 30 LOC of new production code: - Quick scan for obvious naming/duplication issues (2-3 min max) - Mark COMPLETED with note "fast-path: <30 LOC" ### L4-L6 Timing L4-L6 architecture refactoring runs at orchestrator Phase 2.25 (once after all steps complete), not during each TDD inner loop. --- ## 22 Code Smell Taxonomy ### Bloaters | Smell | Detection | Treatment | Level | |-------|-----------|-----------|-------| | Long Method | >20 lines, multiple responsibilities | Extract Method, Compose Method | L2 | | Large Class | >300 lines, too many fields | Extract Class, Extract Subclass | L3 | | Primitive Obsession | Raw strings for domain concepts, magic numbers | Replace Data Value with Object | L4 | | Long Parameter List | >=4 parameters | Introduce Parameter Object | L4 | | Data Clumps | Same parameter groups repeated | Extract Class, Introduce Parameter Object | L4 | ### Object-Orientation Abusers | Smell | Detection | Treatment | Level | |-------|-----------|-----------|-------| | Switch Statements | Switch on type, complex if-else chains | Replace with Polymorphism, Strategy | L5 | | Temporary Field | Fields empty most of the time | Extract Class, Null Object | L3 | | Refused Bequest | Subclass doesn't support parent interface | Push Down, Replace Inheritance with Delegation | L6 | | Alternative Classes, Different Interfaces | Same function, different names | Rename Method, Extract Superclass | L3 | ### Change Preventers | Smell | Detection | Treatment | Level | |-------|-----------|-----------|-------| | Divergent Change | One class changed for different reasons | Extract Class | L3 | | Shotgun Surgery | Change requires many small changes to many classes | Move Method, Move Field, Inline Class | L3 | | Parallel Inheritance Hierarchies | Creating subclass requires another subclass | Move Method, Move Field | L6 | ### Dispensables | Smell | Detection | Treatment | Level | |-------|-----------|-----------|-------| | Comments (how-comments) | Comments explaining complex code | Extract Method, Rename Method | L1 | | Duplicate Code | Same code structure in multiple places | Extract Method, Pull Up Method | L2 | | Lazy Class | Class with few methods, little functionality | Inline Class, Collapse Hierarchy | L1 | | Data Class | Only fields and getters/setters | Move Method, Encapsulate Field | L3 | | Dead Code | Unused variables, methods, classes | Delete unused code | L1 | | Speculative Generality | Abstractions for future features | Collapse Hierarchy, Inline Class | L1 | ### Couplers | Smell | Detection | Treatment | Level | |-------|-----------|-----------|-------| | Feature Envy | Method uses another object's data more than its own | Move Method, Extract Method | L3 | | Inappropriate Intimacy | Classes know too much about each other | Move Method, Extract Class, Hide Delegate | L3 | | Message Chains | a.getB().getC().getD() | Hide Delegate, Extract Method | L3 | | Middle Man | Class only delegates to another | Remove Middle Man, Inline Method | L4 | --- ## 5 Atomic Transformations ### Rename Change name without changing behavior. Applies to: variables | methods | classes | fields | parameters. Safety: use IDE refactoring tools, verify all references updated, run tests, commit. ### Extract Take portion of code, create new element. Applies to: methods | classes | variables | constants | interfaces. Safety: identify code, create element with intention-revealing name, move code, replace original with call, test, commit. ### Inline R
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
1a864ec81cdefull audit observations/trust-audit/skill/nwave-ai__nw-progressive-refactoring.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-14 | 1a864ec81cde | SAFE | B | 89 | first audit |
Questions
What does the Nw Progressive Refactoring skill do?
AI agents that guide you from idea to working code, with you in control at every step.
Is Nw Progressive Refactoring safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Nw Progressive Refactoring access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (1a864ec81cde), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.