docs: Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate#3248
Closed
medmes wants to merge 12 commits into
Closed
docs: Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate#3248medmes wants to merge 12 commits into
medmes wants to merge 12 commits into
Conversation
- CLAUDE.md: module layout, make targets, single-test commands, KCP/SKR architecture, module installation flow, 6 architectural guardrails, and links to deeper docs - agent_docs/: five topic files covering architecture, reconciler patterns, CRD conventions, envtest testing, and codegen workflow - .claude/agents/operator-reviewer.md: read-only subagent with a 9-section checklist (spec mutation, conditions, markers, interface injection, error wrapping, finalizers, SKR context, errgroup fan-out, test wiring) - .github/workflows/check-generated-code.yml: CI gate that blocks PRs where generated deepcopy or CRD manifests are out of sync with type definitions
- CLAUDE.md: GOFIPS140=v1.0.0 requirement for direct go commands, import alias table (apimetav1, apierrors, machineryruntime, ctrl, ctrlruntime, etc.), import ordering (standard→third-party→project), lint limits (120-char lines, 80-line funlen, cyclop 20, nolint requires explanation) - docs/CLAUDE.md: SAP/Kyma documentation writing style, templates, and formatting guidelines (sourced from PR kyma-project#3139 by @lindnerby)
3 tasks
…le-manager into feat/claude-code-baseline
… feat/claude-code-baseline
Documents TLS 1.3, FIPS, container security context, NetworkPolicy, RBAC, and secret-handling constraints so AI assistants don't accidentally weaken existing CVE mitigations. Adds .claude/cve-triage/context.md (inspired by kyma-project/telemetry-manager) for scanner triage workflow.
Adds dedicated triage logic for Mend SCA (Go module deps) and Checkmarx SAST findings, not just BDBA container image CVEs. Key additions: FIPS constraint on crypto fixes, go mod why workflow for transitive deps, Checkmarx false-positive patterns specific to Kubernetes operators.
Adds model: claude-sonnet-4-6 (explicit, no accidental Opus usage), color: blue (visual ID in UI), maxTurns: 20 (caps read-only review loop).
Complements operator-reviewer (rule compliance, Sonnet) with a design judgment agent (architectural fit, abstractions, maintainability, Opus). Documents the two-agent workflow in CLAUDE.md.
Splits import aliases, ordering, and lint limits out of CLAUDE.md into .claude/rules/go-conventions.md with paths: ["**/*.go"]. Rules load only when editing Go files, saving ~28 lines from the always-loaded context. CLAUDE.md: 190 → 162 lines.
The table was incomplete (10/75 aliases) and would drift from .golangci.yaml. Rule now points to .golangci.yaml as the authoritative source and retains only what's not machine-enforceable: the nolint policy and FIPS constraint.
Member
Author
3 tasks
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.
Description
Kyma.spec.modules → ModuleReleaseMeta → ModuleTemplate → Manifest), and 6 architectural guardrails with links to deeper docsagent_docs/— five on-demand topic files:architecture.md,reconcilers.md,crd-conventions.md,testing.md,codegen.md.claude/agents/operator-reviewer.md— read-only subagent (Read, Grep, Glob) with a 9-section checklist covering spec mutation, condition usage, controller-gen markers, interface injection, error wrapping, finalizer hygiene, SKR context lifecycle, errgroup fan-out, and test wiringcheck-generated-code.yml— CI gate that runsmake generate && make manifests && git diff --exit-codeon every PR touchingapi/orconfig/crd|rbac/Related isssue:
#3241