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.

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

development

Lint warning baseline and budget: Turn an existing warning backlog into a measured, non-growing budget. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagelintwarningsbaseline

Dead code and unused symbol removal

development

Dead code and unused symbol removal: Remove unreachable code and unused symbols without deleting runtime-discovered behavior.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagedead-codeunusedreachability

Duplicated logic consolidation

development

Duplicated logic consolidation: Consolidate behaviorally equivalent logic while preserving each caller's contract.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageduplicationrefactorcontracts

Complexity and long-function reduction

development

Complexity and long-function reduction: Reduce hard-to-review control flow without changing behavior. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagecomplexitycontrol-flowrefactor

Deterministic test and flake remediation

development

Deterministic test and flake remediation: Remove nondeterminism from a reproducibly flaky test. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagetestsflakydeterminism

Test isolation and fixture hygiene

development

Test isolation and fixture hygiene: Eliminate order-dependent fixtures and leaked test state. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagetestsfixturesisolation

Deprecated API migration

development

Deprecated API migration: Replace deprecated APIs using the repository's supported runtime versions. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagedeprecationcompatibilitymigration

Configuration validation and default hygiene

development

Configuration validation and default hygiene: Make invalid configuration fail clearly and defaults behave consistently.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageconfigurationvalidationdefaults

Structured logging and cardinality hygiene

development

Structured logging and cardinality hygiene: Make logs structured, actionable, and bounded without exposing sensitive data.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageloggingobservabilitycardinality

Feature flag and experiment cleanup

development

Feature flag and experiment cleanup: Remove stale feature-flag branches after rollout state is proven. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagefeature-flagsexperimentsdead-code

TODO, FIXME, and suppression debt

development

TODO, FIXME, and suppression debt: Turn stale annotations and diagnostic suppressions into owned, reviewable work.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagetodofixmesuppressions

Time, date, timezone, and clock hygiene

development

Time, date, timezone, and clock hygiene: Make temporal logic explicit, testable, and timezone-safe. Includes scoped detection, verification, and stop conditions.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagetimetimezoneclock

Serialization schema and versioning hygiene

development

Serialization schema and versioning hygiene: Make serialized contracts explicit and backward-compatible.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageserializationschemaversioning

Regular-expression correctness and complexity hygiene

development

Regular-expression correctness and complexity hygiene: Make complex regular expressions bounded, readable, and behaviorally tested.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageregexcomplexityparsing

Unicode, locale, and normalization hygiene

development

Unicode, locale, and normalization hygiene: Make text comparison and normalization semantics intentional.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languageunicodelocalenormalization

Dependency manifest and lockfile hygiene

development

Dependency manifest and lockfile hygiene: Align declared, resolved, direct, optional, and unused dependencies without upgrading them.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienecross-languagedependencieslockfilesmanifests