Add package API surface rule and skill guidance#4578
Merged
Conversation
Add Go style rule for package API surface: prefer interfaces, constructors, and result types over public intermediate config types. Start without extra types and introduce them when a concrete need arises. Update implement-story skill with three improvements: - Present high-level PR split first, then enter plan mode for each PR's details (plan subsequent PRs after previous PR's CI is green) - Core domain logic can be introduced standalone, but integration concerns should ship alongside their consumers - Don't add config fields or CRD attributes for out-of-scope functionality, even to prepare for sibling stories Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4578 +/- ##
==========================================
- Coverage 68.87% 68.87% -0.01%
==========================================
Files 505 505
Lines 52380 52380
==========================================
- Hits 36076 36075 -1
+ Misses 13516 13515 -1
- Partials 2788 2790 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Plans presented by agents must be checked against all applicable .claude/rules/ files to catch convention violations early, before code is written. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CRD types should use metav1.Duration for duration fields instead of string or integer seconds. This is the standard Kubernetes convention and has built-in OpenAPI schema support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JAORMX
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lessons from implementing #4551 (rate limiting) surfaced gaps in our
Go style rules, operator rules, and implement-story skill that led to
avoidable review friction.
interfaces, result types, and constructors. Start without intermediate
config types; introduce them when a concrete need arises. Public
functions are a smell when they just convert external types to
internal state.
metav1.Duration(standard Kubernetes convention with built-in OpenAPI support), not
stringor integer seconds.alignment before detailing each PR. Plan subsequent PRs after the
previous PR's CI is green, not all upfront.
integration concerns (protocol adapters, middleware glue) should
ship alongside their consumers. Don't add config fields or CRD
attributes for explicitly out-of-scope functionality.
Type of change
Test plan
Verified rules and skill files parse correctly. No code changes.
Generated with Claude Code