Skip to content

docs: Claude - add review agents and CVE triage context#3254

Draft
medmes wants to merge 2 commits into
kyma-project:mainfrom
medmes:feat/claude-code-agents
Draft

docs: Claude - add review agents and CVE triage context#3254
medmes wants to merge 2 commits into
kyma-project:mainfrom
medmes:feat/claude-code-agents

Conversation

@medmes

@medmes medmes commented May 11, 2026

Copy link
Copy Markdown
Member

Description

Depends on #3253 — review that one first.

  • Adds operator-reviewer agent (Sonnet, read-only): 9-section compliance checklist for reconciler changes, CRD types, finalizers, SKR context lifecycle

  • Adds principal-engineer agent (Opus, read-only): design-level judgment — abstraction fitness, architectural fit, observability, error philosophy, maintainability

  • Adds .claude/cve-triage/context.md covering three CVE surfaces: container image (BDBA), Go module SCA (Mend), and Go SAST (Checkmarx), with FIPS constraint on crypto fixes

  • Invoke operator-reviewer on a sample reconciler change and verify structured output

  • Invoke principal-engineer on a design decision and verify Opus model is used

  • CVE triage context covers all three scanner types from sec-scanners-config.yaml

Related issue:
#3241

medmes added 2 commits May 11, 2026 12:01
Introduces CLAUDE.md with module layout, make targets, single-test
commands, KCP/SKR architecture, module installation flow, architectural
guardrails, security guardrails, and links to agent_docs/ depth files.

Adds .claude/rules/go-conventions.md (loads on *.go): points to
.golangci.yaml as source of truth, documents nolint policy and FIPS
constraint that are not machine-enforceable.

Adds agent_docs/ depth files (architecture, reconcilers, CRD conventions,
testing, codegen) for on-demand context beyond CLAUDE.md budget.

Adds docs/CLAUDE.md with documentation writing style and templates.

Adds CI gate (.github/workflows/check-generated-code.yml) that blocks PRs
where generated files (CRD YAML, deepcopy) are out of sync with api/ types.
Adds two complementary review agents:
- operator-reviewer (Sonnet): checklist-based compliance review for
  reconciler changes, CRD types, finalizers, SKR context lifecycle.
- principal-engineer (Opus): design-level judgment — abstraction fitness,
  architectural fit, observability, error philosophy, maintainability.

Adds .claude/cve-triage/context.md covering three CVE surfaces:
container image (BDBA), Go module SCA (Mend), and Go SAST (Checkmarx).
Includes FIPS constraint on crypto fixes and Checkmarx false-positive
patterns specific to Kubernetes operators.
@medmes medmes requested review from a team as code owners May 11, 2026 10:04
@medmes medmes changed the title docs(claude): add review agents and CVE triage context docs: Claude - add review agents and CVE triage context May 11, 2026
@medmes medmes linked an issue May 11, 2026 that may be closed by this pull request
3 tasks

@c-pius c-pius 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.

Overall I think this is too broad already. I would like to rather add specific configs step by step as we see need for them.

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.

We will cover this in #3271

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.

We could do this, but I see this independent of Claude configs

Comment thread agent_docs/codegen.md

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.

This I would rather see as hook preventing changes on config/crd/bases. Maybe also a rule on api/* instructing to regenerate after changes.

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.

Not entirely sure if super relevant, but this should be either a rule on api/*, or a dedicated CLAUE.md at api/

Comment thread agent_docs/reconcilers.md

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.

Also not sure if too extensive already, but should be a rule on internal/controller/* or a seperate CLAUDE.md there

Comment thread agent_docs/testing.md

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.

Maybe also too extensive already. If provided, should be separate into different rules applying to **/*_test.go and tests.

Comment thread docs/CLAUDE.md

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.

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.

Maybe a skill? Not entirely sure about it. I think something like this should be aligned with our sec team. Ideally, they should provide a skill supporting triaging that we can re-use. Same as with documentation.

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.

Not sure about this one. I think parts of it are not entirely correct. Also some things are general topics and high level covered in the existing CLAUDE.md, not specific to the reconcilers. Also some things I see not as entirely relevant for the reconcilers. I would not continue with this one.

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.

May be reasonable. We could try it out.

@c-pius c-pius removed a link to an issue May 19, 2026
3 tasks
@medmes medmes marked this pull request as draft May 26, 2026 08:30
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.

2 participants