orch-refine-code
/orch-refine-code
Orchestrate a behavior-preserving refactor — confirm tests are green, restructure without changing behavior, keep tests green, review, and gated commit. Use when the structure should improve but behavior must not change.
- Author
- ginaservice ↗
- Repository
- ginaservice-skills ↗
- Licence
- MIT
- Last repository change
- 28.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Orchestrate a behavior-preserving refactor — confirm tests are green, restructure without changing behavior, keep tests green, review, and gated commit. Use when the structure should improve but behavior must not change.
Original author description
Orchestrate a behavior-preserving refactor — confirm tests are green, restructure without changing behavior, keep tests green, review, and gated commit. Use when the structure should improve but behavior must not change.
How it works
- When to Use
- Operation settings
- How It Works
- Example
SKILL.md preview
--- name: orch-refine-code description: "Orchestrate a behavior-preserving refactor — confirm tests are green, restructure without changing behavior, keep tests green, review, and gated commit. Use when the structure should improve but behavior must not change." category: architecture allowed-tools: "Read, Grep, Glob, Bash, Edit, Write" file_names: ["SKILL.md"] metadata: origin: ECC architecture: GINA-Sovereign-Multi-Agent security_charter: GINA-SEC-7L-2026 memory_topology: 3-tier-L1-L2-L3 sandbox_policy: "--cap-drop=ALL" dlp_leakage_score: "0.00" --- # orch-refine-code Actor · action · target: **orch · refine · code**. Thin wrapper over the shared engine in [`orch-pipeline`](../../architecture/orch-pipeline/SKILL.md). ## When to Use - Same behavior, **better structure**: extract modules, remove duplication, kill dead code, reduce nesting, rename for clarity. - Distinguish from siblings: if behavior is meant to change at all, this is the wrong skill (`orch-change-feature` / `orch-fix-defect`). ## Operation settings - **Default size floor:** standard — restructures touch multiple files. - **Phase mask:** 0 → 2 (plan the restructure) → 4 (keep green) → 5 → 6. No new behavior tests are written — the existing suite is the safety net. - **First move (phase 4):** confirm the relevant tests exist and are **green before** touching code; if coverage is thin, add characterization tests first. Then restructure in small steps, re-running tests after each. ## How It Works 1. Run the `orch-pipeline` engine with the settings above. 2. For dead-code / duplication sweeps, delegate to the `refactor-cleaner` agent (it runs knip / depcheck / ts-prune and removes safely). 3. Stop at **Gate 1** (restructure plan) and **Gate 2** (pre-commit). 4. Commit as `refactor:` — the diff must be behavior-neutral. ## Example ``` orch-refine-code: extract the NWS HTTP client out of poller.py → confirm tests green → plan extraction [GATE 1: approve] → move in small steps, tests green throughout → code-review → commit refactor: [GATE 2: confirm] ```
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · ginaservice/ginaservice-skills | 100 | MIT |
| affaan-m/ECC | 100 | MIT |
Database snapshot: 13.11.2026 · package version 4df25fcd3435 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100orch-change-feature
Orchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and gated commit. Use when behavior is not broken but should be different. - 100orch-change-feature
Orchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and gated commit. Use when behavior is not broken but should be different. - 100orch-fix-defect
Orchestrate fixing a bug — reproduce it as a failing regression test, fix to green, review, and gated commit — by delegating each phase to the matching ECC agent. Use when existing behavior is broken or wrong. - 100orch-change-feature
Orchestrate altering an existing, working feature to new desired behavior — update its tests to the new spec, change the implementation to match, review, and gated commit. Use when behavior is not broken but should be different. - 100orch-add-feature
Orchestrate building a brand-new feature end to end — research, plan, TDD implementation, review, and gated commit — by delegating each phase to the matching ECC agent. Use when adding a capability that does not exist yet. - 100test-preserving-refactor
Use when code needs restructuring and observable behavior must stay unchanged, with existing tests kept green at every step.