diff --git a/AGENTS.md b/AGENTS.md index b0f869a593e3..7a4df74b8533 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -60,9 +60,13 @@ Skills own workflows; root owns hard policy and routing. - Fix shape: default to clean bounded refactor, not smallest patch. Move ownership to right boundary; delete stale abstractions, duplicate policy, dead branches, wrappers, fallback stacks. - Fix observed local failures with generic product rules; do not hardcode names, ids, log phrases, or user examples in prod code unless they are an explicit contract. - Tests may use observed examples, but prod literals need a short contract reason. +- Compatibility is opt-in. "Shipped" means reachable from a release Git tag; main/GitHub/PR/unreleased code is not shipped. +- Refactor default: one canonical path. Delete the old path unless user explicitly wants compat or the shipped public contract is obvious and cited. +- Keep old behavior only for an explicit public API/config/plugin SDK/data contract, tagged upgrade path, security/migration boundary, dependency contract, or observed prod state. +- If unsure, ask before preserving compat. Do not keep aliases, shims, fallback stacks, stale names, or obsolete tests just in case. +- Tests alone do not make internals contracts. If compat stays, name the contract and migration/removal plan in code, test, or PR. - Lean code is a goal. No internal shims, aliases, legacy names, broad fallbacks, or defensive branches just to reduce diff or handle unrealistic edge cases. -- Handle real production states, shipped upgrade paths, security boundaries, and dependency contracts. Public/hostile/observed malformed input gets care; hypothetical malformed input does not. -- Unshipped code: clean rewrite/delete. No compat, aliases, shims, deprecations, or fallback scaffolding. +- Handle real production states, tagged upgrade paths, security boundaries, and dependency contracts. Public/hostile/observed malformed input gets care; hypothetical malformed input does not. - Deprecate shipped public contracts only. - Plugin SDK exception: shipped external API gets new API first plus named compat/deprecation, small tests/docs if useful, removal plan. - Migrate internal/bundled callers to modern API in the same change. Do not let internal compat become permanent architecture.