oh-my-opencode 4.14.1 → 4.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/cli/index.js +88 -35
  2. package/dist/cli-node/index.js +88 -35
  3. package/dist/index.js +13 -13
  4. package/dist/skills/frontend/ATTRIBUTION.md +14 -1
  5. package/dist/skills/frontend/SKILL.md +11 -6
  6. package/dist/skills/frontend/references/design/README.md +15 -37
  7. package/dist/skills/frontend/references/design/_INDEX.md +5 -3
  8. package/dist/skills/frontend/references/design/aside.md +209 -0
  9. package/dist/skills/frontend/references/design/clone-from-url.md +65 -0
  10. package/dist/skills/programming/SKILL.md +5 -3
  11. package/dist/skills/remove-ai-slops/SKILL.md +34 -15
  12. package/dist/skills/visual-qa/SKILL.md +11 -0
  13. package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +42 -0
  14. package/package.json +13 -13
  15. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  16. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  17. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  18. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  19. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  21. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  23. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  25. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  28. package/packages/omo-codex/plugin/package-lock.json +13 -13
  29. package/packages/omo-codex/plugin/package.json +1 -1
  30. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +14 -1
  31. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +11 -6
  32. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +15 -37
  33. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +5 -3
  34. package/packages/omo-codex/plugin/skills/frontend/references/design/aside.md +209 -0
  35. package/packages/omo-codex/plugin/skills/frontend/references/design/clone-from-url.md +65 -0
  36. package/packages/omo-codex/plugin/skills/programming/SKILL.md +5 -3
  37. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +34 -15
  38. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +11 -0
  39. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +23 -0
  40. package/packages/omo-codex/scripts/install-dist/install-local.mjs +67 -14
  41. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +14 -1
  42. package/packages/shared-skills/skills/frontend/SKILL.md +11 -6
  43. package/packages/shared-skills/skills/frontend/references/design/README.md +15 -37
  44. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +5 -3
  45. package/packages/shared-skills/skills/frontend/references/design/aside.md +209 -0
  46. package/packages/shared-skills/skills/frontend/references/design/clone-from-url.md +65 -0
  47. package/packages/shared-skills/skills/programming/SKILL.md +5 -3
  48. package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +34 -15
  49. package/packages/shared-skills/skills/visual-qa/SKILL.md +11 -0
  50. package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +42 -0
@@ -24,8 +24,11 @@ This file is a router, not a rulebook. The rules live in four rulesets under `re
24
24
 
25
25
  Every implementation must choose one of these branches before UI code changes:
26
26
 
27
- 1. **Concrete visual reference:** if the user supplies a screenshot, generated mockup, Stitch/Imagen output, Figma export, overview, or annotated reference packet, treat it as the visual contract. Load `references/design/image-to-code-skill.md` plus the relevant design/perfection files, extract the reference's exact tokens, layout geometry, copy, spacing, states, and responsive intent into `DESIGN.md`, then implement reusable primitives against that contract. Final QA must run `/visual-qa` in reference-fidelity mode: compare the actual UI against the reference packet pixel-by-pixel and verify the code is an extensible design-system implementation, not a screenshot-matched one-off.
28
- 2. **Greenfield or fresh setup:** if the user gave no concrete visual reference, use `references/design/_INDEX.md` to shortlist 2-3 plausible Layer B references, then deeply load exactly one Layer A style skill and one Layer B brand/design-system reference; use `open-design` only when the curated set has no fit. Treat those references as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions into `DESIGN.md`, then recombine them into project-specific primitives. Customize for the user's product and content, but do not freestyle past the selected references; never copy logos, trademarked assets, or brand-specific copy. Define Section 5 primitives with variants, default/hover/active/focus/disabled/loading/empty/error states, accessibility, and motion before code. Build them first in a component showcase or state harness; each primitive and required state must pass mobile/tablet/desktop visual QA before product screens.
27
+ 1. **Concrete visual reference:** the user supplied a reference treat it as the visual contract, then handle it by kind:
28
+ - **Static visual reference** (screenshot, generated mockup, Stitch/Imagen output, Figma export, overview, or annotated packet): load `references/design/image-to-code-skill.md` plus the relevant design/perfection files, extract the reference's exact tokens, layout geometry, copy, spacing, states, and responsive intent into `DESIGN.md`, then implement reusable primitives against that contract.
29
+ - **Live site or URL reference** (the user names a site to clone or gives a URL): load `references/design/clone-from-url.md`. Drive a real browser and extract the runtime truth via `getComputedStyle` — tokens, layout geometry, default/hover/focus/active states, transitions and keyframes, and downloaded assets — into `DESIGN.md`, then clone-code reusable primitives against that contract.
30
+ Final QA for both runs `/visual-qa` in reference-fidelity mode: compare the actual UI against the reference pixel-by-pixel and verify the code is an extensible design-system implementation, not a screenshot-matched one-off.
31
+ 2. **Greenfield or fresh setup:** if the user gave no concrete visual reference, use `references/design/_INDEX.md` to shortlist 2-3 plausible Layer B references, then deeply load exactly one Layer A style skill and one Layer B brand/design-system reference; use `open-design` only when the curated set has no fit. Treat those references as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions into `DESIGN.md`, then recombine them into project-specific primitives — never freestyle past the selected references, never copy logos or brand-specific copy. For an expressive brief (glossy, premium, wow, brand-grade), default to generating 2-3 imagen concept drafts, each seeded with the loaded Layer A + Layer B tokens (palette, type, material); pick the strongest and treat the chosen draft as the reference-fidelity contract. Define Section 5 primitives and their default/hover/active/focus/disabled/loading/empty/error states before code, and pass each through mobile/tablet/desktop visual QA before product screens.
29
32
  3. **Existing project with `DESIGN.md` or a component system:** read it, follow it, and update it before implementation only when the requested work needs a new token, primitive, state, motion rule, accessibility constraint, accepted debt, or reference-fidelity requirement.
30
33
  4. **Existing project with UI but no `DESIGN.md` and no reusable component layer:** STOP and ask the user one focused question: should you preserve the current look with copy-nearby styling, or extract a real `DESIGN.md` plus reusable components before continuing? Do not silently choose.
31
34
 
@@ -33,7 +36,7 @@ When `references/designpowers/README.md` is loaded for implementation, redesign,
33
36
 
34
37
  ## Ruleset 1 — design (`references/design/`)
35
38
 
36
- The reference library has one architecture file, 12 taste skills (Layer A — *how to execute*), and 69 brand design systems (Layer B — *what it should look like*). Most non-trivial tasks load **one Layer A + one Layer B**. `README.md` carries the full routing flow, stacking rules, anti-patterns, and the mandatory browser-based Design QA phase; `_INDEX.md` catalogs all 81 files with mood-to-brand mappings — read it whenever routing is not obvious from the tables below.
39
+ The reference library has one architecture file, 12 taste skills (Layer A — *how to execute*), and 70 brand design systems (Layer B — *what it should look like*). Most non-trivial tasks load **one Layer A + one Layer B**. `README.md` carries the full routing flow, stacking rules, anti-patterns, and the mandatory browser-based Design QA phase; `_INDEX.md` catalogs all 83 files with mood-to-brand mappings — read it whenever routing is not obvious from the tables below.
37
40
 
38
41
  ### Layer 0 — architecture
39
42
 
@@ -58,7 +61,7 @@ The reference library has one architecture file, 12 taste skills (Layer A — *h
58
61
 
59
62
  ### Layer B — brand design systems (orthogonal to Layer A; stack freely)
60
63
 
61
- When the user names a brand or site — "Linear-style", "like Stripe's landing" — load `references/design/<brand>.md` as the token source of truth (palette, type scale, components, do/don'ts). Coverage includes `apple` `stripe` `linear.app` `notion` `vercel` `claude` `figma` `airbnb` `nike` `tesla` `spotify` `raycast` `revolut` and ~56 more; the full list with mood shortcuts is in `_INDEX.md`. Extract the tokens and apply them to the project's own content — never copy logos or trademarked imagery. If the named brand is missing, fall back to a Layer A mood match or the `open-design` skill.
64
+ When the user names a brand or site — "Linear-style", "like Stripe's landing", "Aside-style browser agent" — load `references/design/<brand>.md` as the token source of truth (palette, type scale, components, do/don'ts). Coverage includes `aside` `apple` `stripe` `linear.app` `notion` `vercel` `claude` `figma` `airbnb` `nike` `tesla` `spotify` `raycast` `revolut` and ~56 more; the full list with mood shortcuts is in `_INDEX.md`. Extract the tokens and apply them to the project's own content — never copy logos or trademarked imagery. If the named brand is missing, fall back to a Layer A mood match or the `open-design` skill.
62
65
 
63
66
  ### React dev tooling
64
67
 
@@ -102,6 +105,7 @@ Domains: `product` `style` `typography` `color` `landing` `chart` `ux` `react` `
102
105
  | Request | Load |
103
106
  |---|---|
104
107
  | "Build a landing page" (no direction given) | `design/README.md` + `design/_INDEX.md` shortlist → exactly one Layer B reference + `design/taste-skill.md` + `perfection/README.md` |
108
+ | "Aside-style AI browser / browser agent page" | `design/README.md` + `design/aside.md` + `design/taste-skill.md` + `perfection/README.md` |
105
109
  | "Linear-style landing page" | `design/README.md` + `design/linear.app.md` + `design/taste-skill.md` + `perfection/README.md` |
106
110
  | "Premium SaaS hero like Stripe" | `design/README.md` + `design/stripe.md` + `design/soft-skill.md` + `perfection/README.md` |
107
111
  | "Improve this existing dashboard" | `design/README.md` + `design/redesign-skill.md` + `perfection/README.md` |
@@ -119,13 +123,14 @@ Domains: `product` `style` `typography` `color` `landing` `chart` `ux` `react` `
119
123
  - **Never weaken UX OR flatten the surface to buy points.** No dropping animations, hiding content, simplifying interactions, or replacing rendered/lit material with flat fills and flat geometric primitives for a Lighthouse score or a deadline. Hit 100 AND keep the surface dimensional — both, or neither.
120
124
  - **No emojis as icons.** SVG icon sets only (Lucide, Heroicons, Radix, Phosphor).
121
125
  - **GPU-composited animation only** — `transform`, `opacity`, `filter`; never animate layout properties.
122
- - **Verify in a real browser before declaring done.** Screenshots at 375 / 768 / 1280px; hover, focus, loading, empty, and error states all exercised.
126
+ - **Slop animation is forbidden motion serves meaning.** Every animation or hover must map to a real interaction, state change, or affordance. A hover that changes nothing, motion on a non-interactive element, or a decorative micro-animation with no informational purpose is slop — do not add it.
127
+ - **Done is the `/visual-qa` dual-oracle gate, not your own glance.** A frontend design task is verified through `/visual-qa` (real browser at 375 / 768 / 1280px, every page, with interaction states and motion driven and inspected) until the dual-oracle completion gate passes on fresh evidence.
123
128
 
124
129
  ## When to load something else instead
125
130
 
126
131
  | Situation | Load |
127
132
  |---|---|
128
- | Brand/style not among the 69 in `references/design/`, or the user says "Open Design" | `open-design` skill — the local nexu-io/open-design library (137+ design skills, 150+ design systems) |
133
+ | Brand/style not among the 70 in `references/design/`, or the user says "Open Design" | `open-design` skill — the local nexu-io/open-design library (137+ design skills, 150+ design systems) |
129
134
  | Driving a browser for the Design QA phase | `agent-browser` skill |
130
135
  | Pure TypeScript/logic work with zero visual surface | `programming` skill alone — this skill adds nothing there |
131
136
 
@@ -16,9 +16,9 @@ Two things ship flat most often, and both read as "clean but generic": the **her
16
16
  The library lives flat in this directory (`references/design/`, max depth 1) and has two conceptual layers, and **most non-trivial tasks load one from each layer**:
17
17
 
18
18
  - **Layer A — taste skills (12 files):** how to execute. Discipline, motion physics, spacing rules, anti-slop guardrails, output completeness. Filenames end in `-skill.md` or start with `imagegen-`.
19
- - **Layer B — design systems (69 files):** what it should look like. Concrete color/type/component tokens for one specific brand aesthetic. Filenames are brand names (`claude.md`, `notion.md`, `stripe.md`, ).
19
+ - **Layer B — design systems (70 files):** what it should look like. Concrete color/type/component tokens for one specific brand aesthetic. Filenames are brand names (`aside.md`, `claude.md`, `notion.md`, `stripe.md`, ...).
20
20
 
21
- A combined directory of all 81 reference files is at `_INDEX.md`. **Read that index before loading anything** unless the routing is obvious — it has the full mood-mapping and stacking rules in one place.
21
+ A combined directory of all 83 reference files is at `_INDEX.md`. **Read that index before loading anything** unless the routing is obvious — it has the full mood-mapping and stacking rules in one place.
22
22
 
23
23
  ## Open Design Library
24
24
 
@@ -94,7 +94,7 @@ Run through this in order and stop at the first match. Do not skip — earlier r
94
94
 
95
95
  ### Step 1 — Did the user name a specific brand or site?
96
96
 
97
- Phrasings: "make it look like Linear", "Stripe-style buttons", "Notion-feel sidebar", "like {brand}'s landing page", or pasting a screenshot of a known brand site.
97
+ Phrasings: "make it look like Linear", "Stripe-style buttons", "Notion-feel sidebar", "Aside-style browser agent", "like {brand}'s landing page", or pasting a screenshot of a known brand site.
98
98
 
99
99
  **Action:** Open `_INDEX.md`, find the brand under "Layer B — Design Systems", then load `<brand>.md`. Use it as the project's design system source of truth (color hex values, type scale, component specs, do/don'ts).
100
100
 
@@ -131,12 +131,14 @@ Do NOT use this for greenfield work — the audit phase is wasted effort there.
131
131
 
132
132
  ### Step 4 — Is this an image-first workflow?
133
133
 
134
- Triggers: "generate the design first then code it", "make a mockup before we build", "show me what it could look like".
134
+ Triggers: "generate the design first then code it", "make a mockup before we build", "show me what it could look like" — AND, by default, any expressive greenfield brief (glossy / premium / wow / brand-grade) with no user-supplied reference.
135
135
 
136
136
  **Action:** Load both:
137
137
  - `image-to-code-skill.md` (the workflow: generate → analyze → implement)
138
138
  - `imagegen-frontend-web.md` for web, or `imagegen-frontend-mobile.md` for mobile screens
139
139
 
140
+ For an expressive greenfield brief, default to generating **2-3 imagen concept drafts**, each prompt **seeded with the loaded Layer A + Layer B tokens** (palette, type, signature material) so the drafts inherit the reference's taste instead of generic priors. Pick the strongest, then treat the chosen draft as the reference-fidelity contract for `/visual-qa`.
141
+
140
142
  If the user wants only the imagery (no code), load only the imagegen file.
141
143
 
142
144
  ### Step 5 — Image-only requests (no code)
@@ -201,6 +203,7 @@ Once references are loaded, before writing any UI code:
201
203
  | User asks for... | Load these |
202
204
  |---|---|
203
205
  | "Build me a landing page" (no other info) | `_INDEX.md` shortlist → exactly one Layer B reference + `taste-skill.md` |
206
+ | "Build me an Aside-style AI browser / agent page" | `aside.md` + `taste-skill.md` |
204
207
  | "Build me a Linear-style landing page" | `linear.app.md` + `taste-skill.md` |
205
208
  | "Make it Notion-like and minimal" | `notion.md` + `minimalist-skill.md` |
206
209
  | "Premium SaaS hero, like Stripe" | `stripe.md` + `soft-skill.md` |
@@ -214,39 +217,14 @@ Once references are loaded, before writing any UI code:
214
217
 
215
218
  ## Phase Final — Design QA (MANDATORY, runs after implementation)
216
219
 
217
- After implementation is complete, **before declaring the task done**, run a real browser-based Design QA.
218
-
219
- ### Why
220
-
221
- Code that "looks correct" in an editor is not verified. Colors render differently, spacing collapses, fonts fail to load, responsive breakpoints break, states are missing. The only way to know is to SEE it in a real browser.
222
-
223
- ### How
224
-
225
- 1. **Launch the app** in a real browser (use `agent-browser` skill or the project's dev server + screenshot tool).
226
- 2. **Take screenshots** at key breakpoints: mobile (375px), tablet (768px), desktop (1280px).
227
- 3. **Walk the design system checklist** visually:
228
- - [ ] Colors match `DESIGN.md` palette — no off-brand colors visible
229
- - [ ] Typography hierarchy is clear — headings, body, captions are visually distinct
230
- - [ ] Spacing rhythm feels consistent — no cramped or floating elements
231
- - [ ] Interactive states work — hover every button, focus every input, toggle every switch
232
- - [ ] Empty, loading, and error states exist and look intentional
233
- - [ ] Dark mode (if declared in `DESIGN.md`) works completely
234
- - [ ] No layout overflow, no horizontal scroll on mobile
235
- - [ ] Motion/animation feels smooth — no jank, no missing transitions
236
- - [ ] (Expressive brief) Surfaces AND the hero focal object read as real, dimensional material — not flat fills or flat geometric primitives. Use the brand's material: glass = tint+backdrop saturate+rim+sheen+glow; bright/playful = gradient fills+soft depth shadows+a lit focal object. The hero focal object is a generated bitmap, or carries real light/shadow/gradient/depth.
237
- - [ ] (Expressive brief) Brand color is a perceptual ramp (multiple stops / OKLCH), not one tint reused at different opacities
238
- - [ ] (Expressive brief) Every interactive element has a visible hover AND active/pressed micro-interaction, and the hero carries one signature moment
239
- 4. **Two kinds of failure count equally — fix both, then re-check.** Defects: clipping, wrong font, missing state, jank. Flatness: a surface that reads generic next to the loaded reference. When the render is bug-free but flat, you are NOT done — RAISE the design: deepen the material layering, give the color real depth and a ramp, add the signature interaction. Patching only bugs while the surface stays at the floor is the single most common way this skill ships clean-but-generic work. Do not report "done" with visual bugs OR a floor-level surface.
240
- 5. **If you cannot launch a browser** (e.g. no dev server, CI-only environment), state this explicitly and list what you would check. Never silently skip QA.
241
-
242
- ### QA Report
243
-
244
- After passing QA, write a short summary:
245
- - Breakpoints tested
246
- - States verified (hover, focus, disabled, loading, error, empty)
247
- - Design system compliance: all tokens traced back to `DESIGN.md`
248
- - Issues found and fixed during QA
249
- - Screenshot evidence (attach or describe)
220
+ Before declaring the task done, verify the rendered UI. **The verification authority is `/visual-qa`, not a hand-rolled checklist here.** Run `/visual-qa`: it captures every page and breakpoint (375 / 768 / 1280px) on fresh evidence, drives and inspects interaction states (hover/focus/active) and motion (transitions, scroll-triggered, load), runs the dual-oracle pass, and loops until an independent reviewer passes. For a concrete reference or clone, run it in reference-fidelity mode.
221
+
222
+ This skill adds only the design-taste judgments `/visual-qa` cannot make for you:
223
+
224
+ 1. **Two kinds of failure count equally fix both, then re-check.** Defects: clipping, wrong font, missing state, jank. Flatness: a surface that reads generic next to the loaded reference. When the render is bug-free but flat, you are NOT done — RAISE the design: deepen the material layering, give the color a real perceptual ramp (multiple stops / OKLCH, not one tint at varied opacity), render the hero focal object as real dimensional material (a generated bitmap, or real light/shadow/gradient/depth — never flat geometric primitives), and add the one signature moment. Patching only bugs while the surface stays at the floor is the single most common way this skill ships clean-but-generic work.
225
+ 2. **Motion serves meaning; slop animation is forbidden.** Every interactive element must communicate its affordance and state changes — but a hover that changes nothing, motion on a non-interactive element, or a decorative micro-animation with no informational purpose is slop. Do not add it, and treat any you find as a defect. The hero may carry one signature moment; the rest of the surface earns motion only where it signals interaction or state.
226
+
227
+ Report "done" only when `/visual-qa` has passed on fresh evidence AND neither a visual bug nor a floor-level or slop-laden surface remains.
250
228
 
251
229
 
252
230
  ## Final notes
@@ -3,7 +3,7 @@
3
3
  All reference files live flat in this directory. Three layers:
4
4
  - **Layer 0 — design system architecture** (1 file): the mandatory gate. Defines `DESIGN.md` structure, creation workflow, validation rules. Always loaded by Phase 0 when no design system exists.
5
5
  - **Layer A — taste skills** (12 files): how to execute. Discipline, motion, spacing, anti-slop, output completeness.
6
- - **Layer B — design systems** (69 files): what it should look like. Brand-specific color/type/component tokens.
6
+ - **Layer B — design systems** (70 files): what it should look like. Brand-specific color/type/component tokens.
7
7
 
8
8
  **Phase 0 runs first** (check/create `DESIGN.md`), then most non-trivial tasks load **one Layer A + one Layer B** together. See the routing flow in the sibling `README.md`.
9
9
 
@@ -52,9 +52,9 @@ From [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill).
52
52
 
53
53
  ---
54
54
 
55
- ## Layer B — Design Systems (71)
55
+ ## Layer B — Design Systems (70)
56
56
 
57
- From [VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md), based on [Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/overview/). Each file captures one website's complete visual language: color palette, typography, components, layout principles, depth, do/don't, responsive behavior, and an agent prompt guide.
57
+ Most Layer B files are materialized from [VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md), based on [Google Stitch DESIGN.md format](https://stitch.withgoogle.com/docs/design-md/overview/). Project-original entries such as `aside.md` are listed here only when `ATTRIBUTION.md` and `frontend-refs-manifest.mjs` mark them as original. Each file captures one website's complete visual language: color palette, typography, components, layout principles, depth, do/don't, responsive behavior, and an agent prompt guide.
58
58
 
59
59
  ### How to use
60
60
 
@@ -83,6 +83,7 @@ Each file ships with: visual theme, hex color palette + semantic roles, full typ
83
83
 
84
84
  | File | Aesthetic |
85
85
  |---|---|
86
+ | `aside.md` | AI browser agent. Bright product-app marketing, custom display type, soft squircle controls, browser-product framing. |
86
87
  | `cursor.md` | AI-first code editor. Sleek dark interface, gradient accents. |
87
88
  | `expo.md` | React Native platform. Dark theme, tight letter-spacing, code-centric. |
88
89
  | `lovable.md` | AI full-stack builder. Playful gradients, friendly dev aesthetic. |
@@ -183,6 +184,7 @@ Each file ships with: visual theme, hex color palette + semantic roles, full typ
183
184
  - **"Brutal / Swiss / industrial"** → `nike.md`, `bugatti.md`, `vodafone.md`
184
185
  - **"Dark cinematic"** → `runwayml.md`, `elevenlabs.md`, `superhuman.md`, `shopify.md`
185
186
  - **"Terminal / developer-native"** → `vercel.md`, `warp.md`, `voltagent.md`, `ollama.md`
187
+ - **"AI browser / agentic browser / product-app launch"** → `aside.md`, `raycast.md`, `superhuman.md`
186
188
  - **"Warm / approachable / soft"** → `airbnb.md`, `notion.md`, `intercom.md`, `mastercard.md`
187
189
  - **"Data-dense / dashboard"** → `sentry.md`, `kraken.md`, `posthog.md`, `clickhouse.md`
188
190
  - **"Bold / sporty / monochrome punch"** → `nike.md`, `uber.md`, `tesla.md`, `binance.md`
@@ -0,0 +1,209 @@
1
+ # Design System Inspired by Aside
2
+
3
+ > Category: Developer Tools & IDEs
4
+ > AI browser agent. Bright product-app marketing, custom display type, soft squircle controls, agent-browser product framing.
5
+
6
+ ## Provenance
7
+
8
+ This reference is derived from a live capture of `https://aside.com/` on 2026-06-30, plus a reconnaissance pass following `JCodesMore/ai-website-cloner-template` at commit `8dd9cb47dde0d49fec06ee1d69bedd04840f3c95`.
9
+
10
+ Reviewer-run evidence artifacts for the source capture were written under `.omo/evidence/20260630-aside-frontend-reference/`:
11
+
12
+ - `aside-live-extraction.json`
13
+ - `aside-home.png`
14
+ - `cloner-output-summary.md`
15
+ - `cloner-desktop-1440.png`
16
+ - `cloner-tablet-768.png`
17
+ - `cloner-mobile-390.png`
18
+
19
+ Those `.omo/evidence` files are local review artifacts, not shipped package assets. Downstream agents should recapture the live site when fidelity to the current Aside page matters. This file carries the stable, reviewer-visible digest from that capture.
20
+
21
+ ### Reviewer-Visible Capture Digest
22
+
23
+ - **Source page:** `https://aside.com/`
24
+ - **Source metadata:** title indicated a browser built to do real work; description framed it as a browser that completes complex work across sites, accounts, and history.
25
+ - **Template source:** `JCodesMore/ai-website-cloner-template` at commit `8dd9cb47dde0d49fec06ee1d69bedd04840f3c95`; the template was used as a local reconnaissance workflow, not copied into this repo.
26
+ - **Screenshots captured:** live page at 1440px wide; reconstructed reconnaissance screenshots at 1440px, 768px, and 390px widths.
27
+ - **Page topology:** compact nav, centered hero, sky/cloud hero wash, large browser-product frame, explanatory intro band, capability sections, benchmark tabs, password/security sections, blue closing CTA band, dense footer.
28
+ - **Extracted type signals:** `displayFont` for hero and section display; Geist for body/UI; Geist Mono available for technical specimens.
29
+ - **Extracted scale signals:** H1 around 48px / 52px with slight negative tracking; body 16px / 24px; UI labels around 14px / 20px.
30
+ - **Extracted surface signals:** white page canvas, ink text around `#090b0c`, soft gray controls around `#f5f5f5`, black-opacity dividers, pill trust badge, rounded/squircle CTA buttons, product-frame shadows.
31
+ - **Responsive observations:** desktop preserves full nav and large browser frame; tablet narrows the product frame; mobile crops/stacks the frame while keeping the hero and CTA visible.
32
+
33
+ Do not treat this file as a license to copy Aside's logo, product screenshots, copy, or proprietary assets. Use it as a token and layout reference for original AI-browser, agent-workflow, and product-app surfaces.
34
+
35
+ ## 1. Visual Theme & Atmosphere
36
+
37
+ Aside's current site reads as a bright, high-confidence product application rather than a dark developer landing page. The canvas is mostly white with hairline black dividers, dense product UI, large custom display headlines, and pale sky-blue atmospheric bands in the hero and final CTA. It feels closer to a native app launch page than a SaaS template: crisp, controlled, and built around the promise that the browser itself can do real work.
38
+
39
+ The signature move is the contrast between calm white space, a gentle cloud-like blue wash, and dense browser-product framing. The page opens with a centered hero, a small Y Combinator trust pill, and a large browser/app visual. Below that, sections use full-width bands, thin separators, and app-like capability cards instead of decorative feature-card grids. The tone is practical and confident: precise controls, product screenshots, benchmark pills, password/memory/security stories, and compact navigation.
40
+
41
+ Rounded elements should feel like soft squircles, not generic `rounded-2xl` blobs. Live capture shows very large pill radii for trust badges and hero CTAs, medium squircle radii around compact action buttons, and square rhythm for structural section boundaries. Depth is created by product frames, soft shadows, white/black opacity borders, and layered screenshot surfaces, not by colorful background decoration.
42
+
43
+ ## 2. Color Palette & Roles
44
+
45
+ ### Core Canvas
46
+
47
+ - **White** (`#ffffff`): primary page background. Use for the main canvas and broad content bands.
48
+ - **Ink Black** (`lab(2.93655 -0.435196 -0.608262)`, approximate `#090b0c`): primary text. Use this instead of pure black when possible.
49
+ - **Soft Gray Surface** (`lab(96.52 -0.0000298023 0.0000119209)`, approximate `#f5f5f5`): rounded control and panel surface.
50
+ - **Hairline Divider** (`rgba(0,0,0,0.06)`): section borders and subtle containment.
51
+ - **Muted Text** (`#737373` to `#a1a1a1` range): captions, footer links, secondary product explanations.
52
+
53
+ ### Action Surfaces
54
+
55
+ - **Primary Button Surface**: light gray or ink-inverted depending on context. Use compact contrast instead of saturated brand color.
56
+ - **Primary Button Text**: ink black on light controls; white on dark controls.
57
+ - **Hover Surface**: slightly darker neutral fill with 150ms color/background/border transition.
58
+ - **Focus Ring**: neutral gray ring. Keep it visible against white and soft gray.
59
+
60
+ ### Accent Use
61
+
62
+ Aside's live capture does not rely on one dominant neon accent. Accents come from product imagery, benchmark pills, subtle icon color, and carefully placed dark controls. If a project needs a brand color, keep it secondary to the black/white/gray product-app system and apply it only to small signals.
63
+
64
+ The current page does use pale cyan/sky-blue atmosphere in large image-backed bands. Treat that as an optional Aside signature for AI-browser launches: soft, airy, and product-framing, not a generic blue gradient background.
65
+
66
+ ## 3. Typography Rules
67
+
68
+ ### Font Family
69
+
70
+ - **Display**: Aside custom display font exposed in capture as `displayFont`, fallback display sans.
71
+ - **Body / UI**: Geist, fallback sans.
72
+ - **Mono**: Geist Mono for code, benchmark labels, and technical specimens.
73
+
74
+ ### Hierarchy
75
+
76
+ | Role | Font | Size | Weight | Line Height | Letter Spacing | Use |
77
+ |---|---|---:|---:|---:|---:|---|
78
+ | Hero Display | displayFont | 48px | 400 | 52px | -0.48px | Primary H1 |
79
+ | Section Display | displayFont | 36px-48px | 400-500 | 1.08-1.15 | tight | Major section claims |
80
+ | Card Title | displayFont or Geist | 24px-30px | 500 | 1.2 | normal/tight | Product capability cards |
81
+ | Body | Geist | 16px | 400 | 24px | normal | General explanation |
82
+ | UI Label | Geist | 14px | 500 | 20px | normal | Nav, buttons, menu labels |
83
+ | Pill/Caption | Geist | 12px-14px | 500-550 | 1.3 | slight | Badges, metadata, benchmarks |
84
+
85
+ ### Principles
86
+
87
+ - Use the display font for the claim, not for every word on the page.
88
+ - Keep body copy plain, readable, and product-focused.
89
+ - Favor medium weights over bold weights; the brand voice is confident but not shouty.
90
+ - Avoid negative letter-spacing outside display text. The router's global rule against viewport-scaled font sizing still applies.
91
+
92
+ ## 4. Component Stylings
93
+
94
+ ### Navigation
95
+
96
+ - Top navigation is compact and product-app-like.
97
+ - Logo at left, grouped menu buttons/links in the center, download CTA at right.
98
+ - Nav labels use Geist 14px/500 with short 150ms color/background transitions.
99
+ - Dropdown triggers can be text buttons with no visible border until hover.
100
+ - Mobile should collapse to icon/hamburger controls with the same neutral/squircle treatment.
101
+
102
+ ### Hero Trust Pill
103
+
104
+ - Pill radius: full pill, visually continuous.
105
+ - Border/fill: very subtle neutral contrast against white.
106
+ - Text: 12px-14px Geist, medium weight.
107
+ - Content: use as a trust or provenance signal, not a decorative chip pile.
108
+
109
+ ### Primary CTA
110
+
111
+ - Shape: pill for hero CTA, medium squircle for standard nav/action buttons.
112
+ - Height: 36px compact nav, 44px hero/mobile.
113
+ - Padding: generous horizontal padding for hero; compact in nav.
114
+ - Motion: 150ms background/color/border transition; pressed state can scale to 0.97.
115
+ - Icon: use SVG icon from the app's icon library; do not use emoji.
116
+
117
+ ### Product Browser Frame
118
+
119
+ This is the key Aside-inspired primitive.
120
+
121
+ - Large product/browser mockup below or near the hero claim.
122
+ - Use a real screenshot, generated bitmap, or carefully built UI surface. Do not substitute flat rectangles.
123
+ - Contain with soft border, rounded/squircle corners, and restrained shadow.
124
+ - Internal chrome should show real browser/app affordances: sidebar, tabs, compact controls, content panels.
125
+ - The frame can overflow and crop at mobile widths, but the focal content must remain legible.
126
+
127
+ ### Capability Sections
128
+
129
+ - Full-width horizontal bands separated by `border-b border-black/6` style dividers.
130
+ - Section structure: one major claim, one explanatory block, one app-like visual or metric module.
131
+ - Avoid three generic feature cards unless the product genuinely has three peer capabilities.
132
+ - Link rows and "Learn more" controls stay quiet and text-forward.
133
+
134
+ ### Benchmark Pills / Tabs
135
+
136
+ - Medium squircle radius around compact tabs.
137
+ - Neutral backgrounds with dark text.
138
+ - Hover/active states should be visible through fill, border, or text contrast.
139
+ - Useful for agent benchmarks, model comparisons, task modes, and product states.
140
+
141
+ ## 5. Layout Principles
142
+
143
+ ### Structure
144
+
145
+ - Full page uses stacked bands rather than isolated floating cards.
146
+ - Hero centers the brand claim and then gives the product visual real space.
147
+ - Sections often span full width with internal max-width constraints.
148
+ - Footer is link-dense and calm, with grouped columns.
149
+
150
+ ### Spacing
151
+
152
+ - Outer page padding: 8px mobile, 16px desktop.
153
+ - Hero vertical rhythm: generous, but not editorially sparse; the product visual arrives quickly.
154
+ - Section padding: 56px-96px depending on density.
155
+ - Dense UI inside product frames can use 8px-16px rhythm.
156
+
157
+ ### Responsive Behavior
158
+
159
+ - Desktop: full nav, large browser/product visual, multi-column footer.
160
+ - Tablet: preserve product framing but reduce visual width and section padding.
161
+ - Mobile: collapse nav, make hero text more compact, crop or stack the product frame deliberately.
162
+ - Avoid horizontal overflow; if a browser mockup is wider than the viewport, scale or crop from a stable container.
163
+
164
+ ## 6. Depth, Motion & Interaction
165
+
166
+ ### Depth
167
+
168
+ - Use hairline borders and product-frame shadows as the primary elevation language.
169
+ - Prefer subtle neutral shadow over colored glows.
170
+ - Layer product screenshots or UI panels to create depth.
171
+ - Keep broad backgrounds flat white unless a product visual, hero, or closing CTA needs the current Aside-like pale sky-blue atmospheric wash.
172
+
173
+ ### Motion
174
+
175
+ - Use short transitions for controls: color, background-color, border-color, opacity, transform.
176
+ - Keep motion in the 150ms-200ms range with standard cubic-bezier easing.
177
+ - Product demos may use scroll or time-based state changes, but document the interaction model in `DESIGN.md` before building.
178
+ - Animate transform/opacity/filter only.
179
+
180
+ ### Interaction States
181
+
182
+ Every primitive must define default, hover, active, focus-visible, disabled, loading, empty, and error states before implementation. Aside-like surfaces are quiet, so missing states are obvious.
183
+
184
+ ## 7. Do's and Don'ts
185
+
186
+ ### Do
187
+
188
+ - Do use a bright canvas with crisp ink typography for the current Aside-inspired look.
189
+ - Do use a custom display face or distinctive display substitute for hero and section claims.
190
+ - Do preserve the product-browser frame as the memorable focal object.
191
+ - Do use soft squircle or pill corners intentionally by component role.
192
+ - Do build dense, useful product UI inside the hero visual.
193
+ - Do use thin black-opacity dividers to make sections feel engineered.
194
+ - Do keep CTA colors neutral and high contrast.
195
+ - Do cite live screenshots or extracted design tokens when claiming Aside fidelity.
196
+
197
+ ### Don't
198
+
199
+ - Don't resurrect the older dark-only Aside reference without checking the live site.
200
+ - Don't copy Aside's logo, text, screenshots, or proprietary product assets.
201
+ - Don't replace the product-browser focal object with flat geometric decoration.
202
+ - Don't make the page a purple-blue gradient SaaS layout.
203
+ - Don't use saturated sky blue as a giant primary CTA color; if using Aside's current atmosphere, keep it pale, cloud-like, and subordinate to the product frame.
204
+ - Don't over-round every component equally; distinguish pills, squircles, and structural edges.
205
+ - Don't hide visual QA behind tests. Aside-like work needs screenshots at mobile, tablet, and desktop widths.
206
+
207
+ ## Agent Prompt
208
+
209
+ When building an Aside-inspired surface, first create or update `DESIGN.md` with: bright white product-app atmosphere, display/body/mono font roles, ink/neutral token ramp, squircle/pill component rules, a product-browser focal primitive, dense capability bands, and responsive crop/scale behavior for the product frame. Use original content and assets. Verify with screenshots at 375px, 768px, and 1280px or wider, and compare against the live-reference evidence before declaring visual fidelity.
@@ -0,0 +1,65 @@
1
+ # Clone From URL — Runtime Design-System Extraction
2
+
3
+ Use this when the user gives a **live site or a URL** to clone: "clone aside.com", "rebuild this page", "make it look exactly like `<url>`". A live URL affords what a screenshot cannot — the browser's **runtime truth**. Extract that truth with the real browser, make it the `DESIGN.md` contract, then build reusable primitives against it. Never eyeball a screenshot into a one-off.
4
+
5
+ ## Outcome and stop rule
6
+
7
+ A `DESIGN.md` whose every token, interaction state, and motion value was read from the running page with `getComputedStyle`, plus a component-level clone that an independent reviewer confirms is an extensible design system (live DOM, reused primitives) — not a screenshot-matched or pasted-image fake. Done is defined by `/visual-qa` reference-fidelity mode passing on fresh evidence, not by your own glance.
8
+
9
+ ## Phase 1 — Extract the runtime truth (never guess a value)
10
+
11
+ Drive a real browser: Codex `browser:control-in-app-browser` first, otherwise the project's `agent-browser` / playwright / dev-browser tooling. Do NOT parse CSS files — minification, CORS, CSS-in-JS, and Tailwind utilities make source unreliable. `getComputedStyle` returns what the browser ACTUALLY rendered, so it is the only source of truth.
12
+
13
+ Sweep the page and read, for every meaningful element and every repeated pattern:
14
+
15
+ - **Tokens** — color, background, border, font family/size/weight, line-height, letter-spacing, radius, shadow, and spacing (padding/margin/gap). Cluster the repeated values into the token scale.
16
+ - **Interaction states** — capture `default/hover/focus/active` (plus disabled/loading/empty/error where they exist) by DRIVING the state, then re-reading the computed style. A system with only the resting state is incomplete.
17
+ - **Motion** — `transition` (property, duration, timing function, delay), `@keyframes` (walk `document.styleSheets` for `CSSKeyframesRule`), and `transform`. Motion is part of the contract, not decoration.
18
+ - **Assets** — `<img>` and background-image URLs, inline SVG, `@font-face` files, video sources. Download the REAL assets; never substitute stock or placeholders.
19
+ - **Responsive** — re-run the sweep at 375 / 768 / 1280 and record what actually changes per breakpoint.
20
+
21
+ A compact sweep payload to inject through the browser's evaluate action (extend the recorded fields as needed):
22
+
23
+ ```js
24
+ () => {
25
+ const out = [];
26
+ for (const el of document.querySelectorAll("*")) {
27
+ const s = getComputedStyle(el);
28
+ out.push({
29
+ tag: el.tagName,
30
+ color: s.color, background: s.backgroundColor, border: s.borderColor,
31
+ font: s.fontFamily, size: s.fontSize, weight: s.fontWeight,
32
+ lineHeight: s.lineHeight, letterSpacing: s.letterSpacing,
33
+ radius: s.borderRadius, shadow: s.boxShadow,
34
+ padding: s.padding, margin: s.margin, gap: s.gap,
35
+ transition: s.transition, animation: s.animation, transform: s.transform,
36
+ });
37
+ }
38
+ return out;
39
+ }
40
+ ```
41
+
42
+ ## Phase 2 — Write the DESIGN.md contract
43
+
44
+ Turn the extraction into `DESIGN.md` per `design-system-architecture.md`: token scales, typography, spacing, the component anatomy with every captured state, the motion rules, and the responsive deltas. Name which source each value came from. If a value is not in `DESIGN.md`, it may not appear in code.
45
+
46
+ ## Phase 3 — Clone-code reusable primitives (one at a time)
47
+
48
+ Build primitives against the contract, not the screenshot. One component per cycle: implement, render, compare to the source region, fix, then move on. Use the downloaded assets. Never paste a raster or `background-image` where a live element belongs. Never approximate a token you already extracted.
49
+
50
+ ## Phase 4 — Reference-fidelity QA (mandatory, motion included)
51
+
52
+ Verify through `/visual-qa` in reference-fidelity mode against the source captures, for every page and every breakpoint. Interaction states and animations are IN SCOPE: drive hover/focus/click/scroll, then compare the settled states AND the motion itself against the source. You are not done until the dual-oracle gate passes on fresh evidence.
53
+
54
+ ## Anti-patterns
55
+
56
+ - Parsing CSS files instead of `getComputedStyle` — the rendered truth is the only source.
57
+ - "CORS blocked" as an excuse — computed styles bypass it.
58
+ - Resting state only — capture hover/focus/active and the rest.
59
+ - Screenshot-matched one-off — build reusable, token-driven primitives.
60
+ - Placeholder or stock assets — download and use the originals.
61
+ - Desktop only — re-extract at each breakpoint.
62
+
63
+ ## Provenance
64
+
65
+ This runtime-extraction workflow follows the MIT-licensed **[JCodesMore/ai-website-cloner-template](https://github.com/JCodesMore/ai-website-cloner-template)** clone-website approach: browser automation plus a `getComputedStyle` sweep, state/motion/asset capture, spec files, and visual QA. It is a project-original synthesis, not a copy of that template. Do not treat this file as a license to copy any target site's trademarks, brand assets, logos, or proprietary copy — extract the design *system* (tokens, layout grammar, component anatomy, interaction states, motion) and apply it to the user's own product and content.
@@ -5,7 +5,7 @@ description: "MUST USE for ANY work on .py .pyi .rs .ts .tsx .mts .cts .go files
5
5
 
6
6
  # Programming
7
7
 
8
- You are a senior engineer who writes Python, Rust, and TypeScript with one shared discipline. **Type-strict. Stack-first. Async-correct. Architecturally honest about file size.**
8
+ You are a lazy senior engineer lazy meaning efficient, never careless. **The best code is the code never written; the code you do write is type-strict, stack-first, async-correct, and architecturally honest about size.**
9
9
 
10
10
  This skill is an index. The hard per-language rules live under `references/`. Load the language-specific reference **before** writing a single line of code.
11
11
 
@@ -33,7 +33,9 @@ This skill is an index. The hard per-language rules live under `references/`. Lo
33
33
 
34
34
  ## Shared philosophy (all three languages)
35
35
 
36
- These are not style preferences. They are the six axioms every recipe in `references/` derives from.
36
+ These are not style preferences. They are the seven axioms every recipe in `references/` derives from.
37
+
38
+ 0. **The best code is the code never written.** Before writing, stop at the first rung that holds: (1) does this need to exist at all? (YAGNI) (2) does this codebase already have it? — reuse the helper or pattern, do not re-implement. (3) does the standard library do it? (4) does a native platform feature cover it? (5) does an installed dependency solve it? (6) can it be one line? (7) only then, write the minimum that works. Climb the ladder *after* you understand the problem and trace the real flow end to end — the smallest diff in the wrong place is a second bug, not laziness. The ladder is a fast decision, not a written essay: pick the rung and move. **Bug fix = root cause, not symptom.** A ticket names a symptom; grep every caller of the function you touch and fix the shared seam once — one guard at the source is a smaller, more correct diff than one guard per caller, and patching only the path the ticket names leaves a sibling caller broken.
37
39
 
38
40
  1. **The type system is your proof system.** Make illegal states unrepresentable. The compiler / type checker is the cheapest test you will ever run. If a bug can be expressed as a type error, it is *required* to be expressed as a type error.
39
41
 
@@ -254,7 +256,7 @@ After every code-writing session, answer these out loud (in your reply) before d
254
256
  3. **Variant discrimination?** Did I use `if`/`elif`/`else` (or `switch` without `assertNever`, or `match` without `assert_never`) anywhere to discriminate on a tagged type or enum? If yes, rewrite as exhaustive match.
255
257
  4. **Escape hatches?** Any `Any`, `# type: ignore`, `unwrap`, `expect` outside `main`/tests, `as` numeric cast, `!`, `@ts-ignore`, `@ts-expect-error`, `#[allow]` on a real warning? If yes, fix the type or document why with a comment.
256
258
  5. **Defensive layer?** Any null check, try/except, or `isinstance` guarding a value the type system already proves? If yes, delete.
257
- 6. **Helpers for one-off?** Any function, class, or trait introduced for a single caller that will never get a second caller? If yes, inline.
259
+ 6. **Helpers for one-off?** Any function, class, or trait introduced for a single caller that will never get a second caller? If yes, inline — axiom 0 should have caught it pre-write; this is the backstop.
258
260
  7. **Tests?** Is the behavior I just introduced locked by a test that would fail if I revert this commit?
259
261
  8. **Parameter bloat?** Any function I wrote or modified that takes more than 3 parameters — or smuggles them through a dict/kwargs/`...args`/throwaway options object? If yes, group related params into a typed value object. See [Smell 2](references/code-smells.md#smell-2--function-with-more-than-3-parameters).
260
262
  9. **Redundant verification?** Did I perform a destructive action (delete, remove, clear) and then immediately re-query to "confirm" it worked? Did I call a setter then a getter to "verify"? If yes, delete the verification — the operation's contract IS the proof. See [Smell 3](references/code-smells.md#smell-3--redundant-verification-after-a-destructive-action).
@@ -30,6 +30,7 @@ The agent looks for these nine categories. The first three are stylistic, the ne
30
30
  2. **Over-defensive code** — null checks for guaranteed values, try/except around code that cannot raise, isinstance checks for statically typed params, default values for required params, backward-compat shims, redundant validation duplicated at multiple layers, **broad exception catching** (`except Exception`/`except BaseException` in Python, empty `catch {}` or `catch (e) { console.error(e) }` without narrowing in TypeScript/JavaScript).
31
31
  - KEEP: validation at system boundaries (user input, external APIs), I/O error handling, nullable DB fields. Top-level boundary catch-all (CLI `main()`, HTTP handler) with explicit logging + re-raise is acceptable.
32
32
  - REFACTOR: `except Exception` → catch the specific exception you expect. Empty `catch {}` → add `instanceof` narrowing or re-throw. `catch (e) { log(e) }` → narrow with `instanceof`, handle known cases, re-throw unknown.
33
+ - PROOF REQUIRED: before deleting any validation or error handling at a trust boundary, Phase 2 must include an **adversarial** regression (malformed or hostile input) that fails if the guard is removed. No adversarial test → the guard stays. Redundant defense to remove is a duplicate of a check that already runs *inside* the boundary; a guard with no proof of redundancy is load-bearing.
33
34
 
34
35
  3. **Excessive complexity** — deep nesting (>3 levels), nested ternaries, complex boolean expressions (combine 4+ predicates), long parameter lists (>5 args without a struct/dataclass/object), god functions (>50 lines doing many things), overly clever one-liners that sacrifice readability, `if/elif/else` chains for type/enum/literal discrimination (must be `match/case` + `assert_never`), `object` used as a type annotation (must be `Protocol`, `TypeVar`, or explicit union).
35
36
  - KEEP: established complexity patterns in this codebase, performance-critical hot paths that intentionally use a complex idiom. `if/else` for boolean conditions and range checks (not variant discrimination).
@@ -126,22 +127,37 @@ For each in-scope source file:
126
127
 
127
128
  If you cannot establish a green baseline (e.g., test runner is broken), STOP and report. Do not proceed with cleanup on unverified ground.
128
129
 
129
- ### Phase 3: Cleanup plan
130
+ ### Phase 3: Cleanup plan — existence first, then smells
130
131
 
131
- Produce an explicit plan **before** spawning the removal agents:
132
+ The largest, safest deletion is code that should not have existed. **Before categorizing smells, run the deletion ladder on each changed unit:**
133
+
134
+ - **Delete entirely** — the behavior is not needed (YAGNI, speculative, dead on arrival).
135
+ - **Reuse** — an existing helper or pattern in this repo already does it; replace the reimplementation with a call to it.
136
+ - **Platform / stdlib / native / dependency** — the language stdlib, the runtime, or an already-installed dependency already does it (a hand-rolled date picker → `<input type="date">`, a custom query parser → `URLSearchParams`, a bespoke debounce → the util already imported).
137
+ - **Simplify in place** — it must exist; make it smaller.
138
+
139
+ Only code that lands on **Simplify in place** proceeds to the smell categories. This turns the pass from "find smells to trim" into "first decide whether the code should exist, then trim what survives." One function replaced by a platform call is a bigger, safer win than any in-place cleanup — and it needs no per-line smell analysis.
140
+
141
+ For a diff that **fixes a bug**, grep the callers of every shared function it touches. Prefer one root-cause fix at the shared seam over repeated guards at each caller — a per-caller patch that leaves a sibling caller broken is a partial fix, not a cleanup.
142
+
143
+ Then produce an explicit plan **before** spawning the removal agents:
132
144
 
133
145
  ```
134
146
  File: src/foo.py
147
+ Ladder: 2 units simplify-in-place; 1 unit delete (native <input> replaces custom picker)
135
148
  Categories: dead code, excessive complexity, performance
136
149
  Order: dead code → complexity → performance
137
150
  Risk: medium (touches caching layer)
138
151
 
139
152
  File: src/bar.py
153
+ Ladder: all simplify-in-place
140
154
  Categories: obvious comments, over-defensive
141
155
  Order: comments → defensive
142
156
  Risk: low
143
157
  ```
144
158
 
159
+ **Intentional shortcuts:** if the plan deliberately keeps a bounded simplification (a naive scan fine under N rows, a global lock, an O(n²) path), mark it in-code with a `debt:` comment naming the ceiling and the upgrade trigger (in omo, prefix with `// @allow` so the comment-checker treats it as intentional), and list it under "Remaining Risks / Deferred" in the report. That section is the debt ledger — a simplification with a known ceiling and no marker is indistinguishable from a bug.
160
+
145
161
  Order rule (safest → riskiest): comments → dead code → defensive → duplication → complexity → abstraction/boundary → performance → tests → oversized-modules. This minimizes blast radius of any one change.
146
162
 
147
163
  ### Phase 4: Parallel slop removal via `deep` agents in batches of 5
@@ -170,13 +186,9 @@ task(
170
186
  prompt="""
171
187
  Remove AI slops from: {file_path}
172
188
 
173
- In addition to your default categories (obvious comments, over-defensive code, spaghetti nesting), also evaluate these categories:
174
- - Excessive complexity: god functions, long parameter lists, complex booleans, nested ternaries
175
- - Needless abstraction: pass-through wrappers, single-use helpers, speculative indirection
176
- - Boundary violations: wrong-layer imports, leaky responsibilities, hidden coupling
177
- - Dead code: unused imports, unreachable branches, stale flags, debug leftovers
178
- - Duplication: copy-paste branches, redundant helpers
179
- - Performance equivalences: O(n²)→O(n) via set lookup, hoist computation out of loops, eager→lazy collections, batch redundant calls, cache repeated len()/length
189
+ First run the deletion ladder from Phase 3 on this file (delete entirely / reuse existing repo code / platform-stdlib-native / simplify in place); only code that must exist proceeds to smell removal.
190
+
191
+ Then evaluate EVERY category defined in this skill's "Categories (what counts as slop)" section, applying that section's KEEP and REFACTOR rules verbatim — the Categories section you have loaded is canonical, do not work from a restated subset.
180
192
 
181
193
  Apply changes in this order (safest → riskiest): comments → dead code → defensive → duplication → complexity → abstraction/boundary → performance → oversized-modules.
182
194
 
@@ -251,18 +263,19 @@ Behavior Lock:
251
263
  - Baseline status: GREEN
252
264
 
253
265
  Cleanup Plan:
254
- - path/to/file1.ts: [dead code → complexity → performance]
255
- - path/to/file2.py: [comments → defensive]
266
+ - path/to/file1.ts: [ladder: 1 delete (native) + simplify-in-place] → [dead code → complexity → performance]
267
+ - path/to/file2.py: [ladder: all simplify-in-place] → [comments → defensive]
256
268
 
257
- Per-File Results:
269
+ Per-File Results (each cut shows what replaces it):
258
270
  path/to/file1.ts
259
- - Dead code: 3 removed (lines X-Y, A-B, C)
271
+ - Ladder/delete: custom DatePicker (48 lines) <input type="date"> (native), flatpickr import removed
272
+ - Dead code: 3 removed (lines X-Y, A-B, C) → nothing (unreachable)
260
273
  - Excessive complexity: 1 simplified (nested ternary at L42 → if/else)
261
274
  - Performance: 1 (line N: list scan → set lookup, O(n²)→O(n), behavior identical)
262
275
  - Skipped (preserved): 2 (defensive null check at boundary; commented WHY at L88)
263
276
 
264
277
  path/to/file2.py
265
- - Obvious comments: 5 removed
278
+ - Obvious comments: 5 removed → nothing
266
279
  - Over-defensive: 1 simplified (redundant isinstance on typed param)
267
280
 
268
281
  Quality Gates:
@@ -280,8 +293,14 @@ Critical Review:
280
293
  Issues Found & Fixed:
281
294
  - [None] OR [Issue description → Fix applied]
282
295
 
283
- Remaining Risks / Deferred:
296
+ Net Impact:
297
+ - LOC: -74 (removed 91, added 17)
298
+ - Dependencies: -1 (flatpickr removed; native <input type="date"> used)
299
+ - Files deleted: 1 (src/date-picker-wrapper.ts — platform-native replacement)
300
+
301
+ Remaining Risks / Deferred (this section is the debt ledger):
284
302
  - [None] OR [e.g., "boundary violation in module X flagged but not refactored — needs human judgment"]
303
+ - `debt:` markers kept this pass: [None] OR [file:line — ceiling → upgrade trigger]
285
304
 
286
305
  Final Status: CLEAN | ISSUES FIXED | REQUIRES ATTENTION
287
306
  ```