← Back to Pull requests

docs: add AGENTS.md and CLAUDE.md for AI coding agents #3192

Closed
unknown closed this pull request without merging on Oct 13, 2026 01:15 UTC
View on GitHub
unknown unknown commented on Sep 23, 2026 15:53 UTC
Author

Purpose of this PR

Adds an AGENTS.md at the repository root and a thin CLAUDE.md that imports it, as requested in #3187.

Fixes #3187

Proposed changes:

  • AGENTS.md: agent behavior policy, repository map, tooling, the make commands CI runs, a table of generated files with the command that regenerates each one, and commit/PR hygiene. The structure follows kubeflow/trainer and kubeflow/sdk; the content is specific to this repo.

  • CLAUDE.md: a single line, @AGENTS.md, so there is one source of truth.
  • Change Category

  • Bugfix (non-breaking change which fixes an issue)

  • Feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that could affect existing functionality)

  • Documentation update
  • Rationale

    Every command and rule in AGENTS.md was checked against the Makefile and every workflow in .github/workflows/ that runs on pull requests, rather than copied from the sibling repos. Two things CI enforces that the contributor guide does not mention are called out explicitly:

  • go mod tidy is checked in both the root and test/e2e modules.

  • e2e tests run with both DEPLOY_METHOD=helm and DEPLOY_METHOD=kustomize.
  • It also collects every generated file and its regeneration command in one table (for example, CRDs live in both config/crd/bases and the Helm chart and are kept in sync with make update-crd), since these steps are spread across different sections of the guide today.

    One question for maintainers: kubeflow/trainer and kubeflow/sdk implement CLAUDE.md as a git symlink to AGENTS.md, while the issue suggests an @AGENTS.md import. I went with the import as written in the issue (it works on every OS, but only Claude Code resolves the @ syntax). Happy to switch to a symlink to match the sibling repos if you prefer.

    Checklist

  • I have conducted a self-review of my own code.

  • I have updated documentation accordingly.

  • I have added tests that prove my changes are effective or that my feature works. (Not applicable: documentation only.)

  • Existing unit tests pass locally with my changes. (Not run: no Go code changed.)
  • Additional Notes

    AI usage disclosure: I used Claude Code to help draft AGENTS.md. I reviewed every line and verified each command, path and rule against the Makefile, .github/workflows/integration.yaml, and the repository contents.

    Diff: 303 lines (+227 / -76) across 3 files Reviewer: tariq-hasan Review duration: 27921m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 303 lines diff across 3 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.342
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #3192"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.1% (MEDIUM) · Higher = larger blast radius
    45.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%