Skip to content

docs(skills): add backward-compatibility-policy skill and update coding rules - #939

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-tzmnkokwospt
Sep 2, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-tzmnkokwospt

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

When developing or refactoring code in KHI, AI agents frequently over-engineer backward compatibility (preserving deprecated shims, adding variadic arguments solely to avoid updating 0-arg callers, adding defensive nil fallbacks for non-nil fields, etc.).

This PR adds a dedicated skill and updates coding rules:

  1. New Skill: .agents/skills/backward_compatibility_policy/SKILL.md
    • Explains that KHI is an integrated monorepo where internal code requires zero backward compatibility.
    • Clarifies that .khi file serialization is the sole exception where compatibility is relevant, and requires explicit planning/discussion.
    • Documents 9 concrete anti-patterns with Bad vs Good examples.
  2. Global Rules: Updated GEMINI.md to state the monorepo backward compatibility policy and clarify that updating test call sites and constructors to match new signatures is required.
  3. Language Rules: Updated go-coding-rule.md and ts-coding-rule.md to explicitly prohibit backward-compatibility wrappers and unnecessary parameter fallbacks in Go and TypeScript.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request establishes a comprehensive backward compatibility policy for the KHI project, updating Go and TypeScript coding rules, general guidelines in GEMINI.md, and adding a detailed SKILL.md guide. The policy clarifies that internal code requires no backward compatibility, and outlines anti-patterns and the workflow for .khi file changes. The review feedback suggests documenting an existing exception for Google Cloud API tasks using coretask.GetTaskResultOptional to support lightweight unit test fixtures.

@kyasbal
kyasbal merged commit c14b45a into GoogleCloudPlatform:main Sep 2, 2026
16 checks passed
@kyasbal
kyasbal deleted the push-tzmnkokwospt branch September 2, 2026 03:37
@kyasbal kyasbal added area:devenv Development environment, Makefile, and build tooling type:test Testing infrastructure, unit tests, and test harnesses labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:devenv Development environment, Makefile, and build tooling type:test Testing infrastructure, unit tests, and test harnesses

1 participant