Odylith code hygiene guard

From odylith/odylith · View interactive version

Odylith code hygiene guard is an AI agent skill from the GitHub repository odylith/odylith. Use this skill when a slice shows duplicate helper churn, fake modularization,

How to use this skill

Skill file

Odylith Code Hygiene Guard

Use this skill when a slice shows duplicate helper churn, fake modularization,

oversized-file pressure, mirrored host drift, or comment slop. Treat AI slop

as a regression.

This skill is shared across consumer and maintainer lanes, and it applies on

both Codex and Claude. Codex and Claude must enforce the same anti-slop

contract across consumer and maintainer lanes. Consumer repos may be Python,

TypeScript, JavaScript, Go, Rust, Java, shell, SQL, or mixed-language; the

language changes, the anti-slop bar does not.

Apply that bar to any codebase or project surface: services, libraries, apps,

CLIs, infra glue, scripts, docs, prompts, hooks, templates, config, and

generated assets all count.

Structural cleanup is not permission to drift behavior, UX, or UI. Preserve

semantics deliberately and prove the touched contract on the real toolchain or

surface that owns it.

No transitional states. Do not replace one slop class with another. Move

ownership, not just file boundaries.

Default Flow

odylith/agents-guidelines/ANTI_SLOP_AND_DECOMPOSITION.md before editing.

file sizes before changing structure.

remaining def _host() shims, bind(host) / _HOST_BIND_NAMES globals

injection, duplicate _mapping or _normalize_* helpers, near-identical

host mirrors, local alias walls that hide the real owner, phase-mixed giant

functions, and touched files already above the repo size thresholds.

duplicated parser or normalizer helpers, near-identical adapters or hook

scripts, phase-mixed controllers or components, mirrored prompt or config

assets, and extracted modules that still tunnel back into parent internals.

install-generated guidance, Codex assets, Claude assets, shared skills, and

shipped mirrors that must stay aligned if the rule changes.

simulations need Casebook truth, planned rearchitecture needs Radar or

technical-plan truth, component-contract changes need Registry truth,

changed flows or topology need Atlas truth, and proof checkpoints need

Compass truth before closeout. Search prior Casebook/governance learning and

prior failed mechanisms, do not repeat a fix path that already failed, and

capture new mechanism-level learning.

prompts, templates, config, docs, generators, and installed assets that may

be carrying the same slop class under different file extensions.

cards, diagrams, component specs, workstream descriptions, prompts, hooks,

CLI messages, and docs must be simple, easy to understand, legible,

grammatically coherent, and clear before any voice or live narration is

added.

owner instead of adding one more local wrapper.

adopt it in the touched slice or leave a bounded follow-up tied to the same

slop class.

facade accessors, or mirror-only indirection after a nominal extraction.

kernel lands, the touched callers must adopt it or the pass is incomplete.

choose decomposition or carry an explicit active decomposition plan before

adding more growth.

phase owner or data-model seam in the same pass unless the change is purely

a safety-critical repair.

halfway state where the shared owner exists but the touched duplicates still

remain.

the replacement smell still exists in the touched slice, the pass is

incomplete.

assumptions, or non-obvious state transitions.

Hard Bans

banned when they still hide the real dependency owner behind globals

injection.

ownership boundary is banned.

_json_dict, _normalize_*, _delta, or _parts across files when one

shared owner is appropriate.

duplicated parser helpers, cloned adapters, giant mixed-phase handlers,

mirrored hook scripts, or boilerplate config and template assets are the

same regression under a different file extension.

command shims, statuslines, or generated guidance assets.

the touched slice can be split into data prep, view model, and

template/render stages, or gather, score, and decide stages.

renderer, or shared formatter would remove the duplication.

module docstring.

Required Proof

land characterization or contract-focused tests before or alongside the

refactor instead of relying on post hoc confidence.

guidance, skills, install-generated guidance, host contracts, mirrors, and

enforcement tests together; prose-only hardening is incomplete.

type checks, and build validation for the touched stack after Odylith

narrows the slice.

contracts, install-generated guidance, skills, and shipped mirrors in the

same pass.

source and bundle copies in the same change.

rule or generator and its regression tests. Do not hand-polish one rendered

sample while leaving the unclear-copy class alive.

repo-wide structural scan or equivalent inventory before closeout.

behavior proof for the touched slice and a fresh structural inventory for

the claimed scope. One does not substitute for the other.

checks is incomplete.

matrix.

contract: normal, empty/fallback, and degraded or error states when they

exist.

mirror surfaces, run the install suite and the mirror-content checks.

Fail-Closed Exit Criteria

the cleanup.

_delta, or _parts clone once the shared owner exists.

touched callers stay on local forks without a bounded follow-up.

prompt, config, or hook pattern once the shared owner exists.

on entry when the pass is explicitly about structural debt.

hides the owner behind rebinding.

the touched install, runtime, and browser surfaces is green.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.