--- name: refactor description: Refactor code for quality, maintainability, and adherence to project standards disable-model-invocation: true allowed-tools: Read, Edit, Write, Glob, Grep, Bash argument-hint: "[file-or-area]" --- Refactor the specified code ($ARGUMENTS) following Archipelago coding standards. ## Checklist ### Rust Backend - [ ] No `unwrap()` or `expect()` — use `?` operator with context - [ ] Replace `#[allow(dead_code)]` — either use it or remove it - [ ] Functions under 50 lines, single responsibility - [ ] Custom error types per module with `thiserror` - [ ] `tracing` for logging — no `println!` or secrets in logs - [ ] Split files over 500 lines into focused modules - [ ] Run `cargo clippy --all-targets --all-features` mentally and fix issues ### Vue Frontend - [ ] Extract ALL inline Tailwind to global classes in `neode-ui/src/style.css` - [ ] Use semantic class names: `.glass-card`, `.info-card`, `.glass-button`, `.path-option-card` - [ ] Replace ALL `.gradient-button` with `.glass-button` (gradient buttons are BANNED) - [ ] Replace ALL `.gradient-card` / `.gradient-card-dark` with `.glass-card` or `.path-option-card` - [ ] Settings.vue is the gold standard — all screens should match its patterns - [ ] Replace `any` types with proper interfaces or `unknown` - [ ] Ensure `