Skip to content

docs: Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate#3248

Closed
medmes wants to merge 12 commits into
kyma-project:mainfrom
medmes:feat/claude-code-baseline
Closed

docs: Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate#3248
medmes wants to merge 12 commits into
kyma-project:mainfrom
medmes:feat/claude-code-baseline

Conversation

@medmes

@medmes medmes commented May 6, 2026

Copy link
Copy Markdown
Member

Description

  • CLAUDE.md — session-start context for Claude Code: module layout, make targets, single-test commands, KCP/SKR architecture, module installation flow (Kyma.spec.modules → ModuleReleaseMeta → ModuleTemplate → Manifest), and 6 architectural guardrails with links to deeper docs
  • agent_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 wiring
  • check-generated-code.yml — CI gate that runs make generate && make manifests && git diff --exit-code on every PR touching api/ or config/crd|rbac/

Related isssue:
#3241

- 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
@medmes medmes requested review from a team as code owners May 6, 2026 14:52
@medmes medmes changed the title Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate docs: Add Claude Code baseline: CLAUDE.md, agent_docs, reviewer agent, CI gate May 6, 2026
medmes added 2 commits May 6, 2026 17:21
- 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)
@medmes medmes linked an issue May 7, 2026 that may be closed by this pull request
3 tasks
medmes added 9 commits May 8, 2026 11:53
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.
@medmes medmes closed this May 11, 2026
@medmes

medmes commented May 11, 2026

Copy link
Copy Markdown
Member Author

Closed on favour of #3253 & #3254 as a seperate PRs.

@medmes medmes removed a link to an issue May 11, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant