Cross-language Code Hygiene
Repository-wide hygiene practices for polyglot or language-independent work.
Choose a focused Cross-language recipe
This collection contains 16 bounded Cross-language workflows. Choose the recipe whose objective matches the repository evidence instead of combining unrelated cleanup into one run.
- Lint warning baseline and budget: Use it to turn an existing warning backlog into a measured, non-growing budget.
- Dead code and unused symbol removal: Use it to remove unreachable code and unused symbols without deleting runtime-discovered behavior.
- Duplicated logic consolidation: Use it to consolidate behaviorally equivalent logic while preserving each caller’s contract.
- Complexity and long-function reduction: Use it to reduce hard-to-review control flow without changing behavior.
- Deterministic test and flake remediation: Use it to remove nondeterminism from a reproducibly flaky test.
- Test isolation and fixture hygiene: Use it to eliminate order-dependent fixtures and leaked test state.
- Deprecated API migration: Use it to replace deprecated APIs using the repository’s supported runtime versions.
- Configuration validation and default hygiene: Use it to make invalid configuration fail clearly and defaults behave consistently.
- Structured logging and cardinality hygiene: Use it to make logs structured, actionable, and bounded without exposing sensitive data.
- Feature flag and experiment cleanup: Use it to remove stale feature-flag branches after rollout state is proven.
- TODO, FIXME, and suppression debt: Use it to turn stale annotations and diagnostic suppressions into owned, reviewable work.
- Time, date, timezone, and clock hygiene: Use it to make temporal logic explicit, testable, and timezone-safe.
- Serialization schema and versioning hygiene: Use it to make serialized contracts explicit and backward-compatible.
- Regular-expression correctness and complexity hygiene: Use it to make complex regular expressions bounded, readable, and behaviorally tested.
- Unicode, locale, and normalization hygiene: Use it to make text comparison and normalization semantics intentional.
- Dependency manifest and lockfile hygiene: Use it to align declared, resolved, direct, optional, and unused dependencies without upgrading them.
How to use this collection
Read the repository’s configured runtime, compiler, framework, analyzer, and test commands before selecting a workflow. Start in audit mode, record file and symbol evidence, and authorize a fix only after the candidate scope is reviewable. Preserve supported versions, public behavior, and existing tool configuration.
If the evidence is a named CVE, scanner finding, exposed secret, authorization flaw, or injection path, use the focused vulnerability-remediation playbook instead of a code-hygiene recipe. Stop when the safe result requires an owner decision about architecture, compatibility, production data, or deployment state.
Full recipe list
Lint warning baseline and budget
developmentLint warning baseline and budget: Turn an existing warning backlog into a measured, non-growing budget. Includes scoped detection, verification, and stop conditions.
Dead code and unused symbol removal
developmentDead code and unused symbol removal: Remove unreachable code and unused symbols without deleting runtime-discovered behavior.
Duplicated logic consolidation
developmentDuplicated logic consolidation: Consolidate behaviorally equivalent logic while preserving each caller's contract.
Complexity and long-function reduction
developmentComplexity and long-function reduction: Reduce hard-to-review control flow without changing behavior. Includes scoped detection, verification, and stop conditions.
Deterministic test and flake remediation
developmentDeterministic test and flake remediation: Remove nondeterminism from a reproducibly flaky test. Includes scoped detection, verification, and stop conditions.
Test isolation and fixture hygiene
developmentTest isolation and fixture hygiene: Eliminate order-dependent fixtures and leaked test state. Includes scoped detection, verification, and stop conditions.
Deprecated API migration
developmentDeprecated API migration: Replace deprecated APIs using the repository's supported runtime versions. Includes scoped detection, verification, and stop conditions.
Configuration validation and default hygiene
developmentConfiguration validation and default hygiene: Make invalid configuration fail clearly and defaults behave consistently.
Structured logging and cardinality hygiene
developmentStructured logging and cardinality hygiene: Make logs structured, actionable, and bounded without exposing sensitive data.
Feature flag and experiment cleanup
developmentFeature flag and experiment cleanup: Remove stale feature-flag branches after rollout state is proven. Includes scoped detection, verification, and stop conditions.
TODO, FIXME, and suppression debt
developmentTODO, FIXME, and suppression debt: Turn stale annotations and diagnostic suppressions into owned, reviewable work.
Time, date, timezone, and clock hygiene
developmentTime, date, timezone, and clock hygiene: Make temporal logic explicit, testable, and timezone-safe. Includes scoped detection, verification, and stop conditions.
Serialization schema and versioning hygiene
developmentSerialization schema and versioning hygiene: Make serialized contracts explicit and backward-compatible.
Regular-expression correctness and complexity hygiene
developmentRegular-expression correctness and complexity hygiene: Make complex regular expressions bounded, readable, and behaviorally tested.
Unicode, locale, and normalization hygiene
developmentUnicode, locale, and normalization hygiene: Make text comparison and normalization semantics intentional.
Dependency manifest and lockfile hygiene
developmentDependency manifest and lockfile hygiene: Align declared, resolved, direct, optional, and unused dependencies without upgrading them.