Skip to content

Added AGENTS.md with instructions for coding agents#609

Open
muskiteer wants to merge 2 commits into
Kuadrant:mainfrom
muskiteer:docs/added-agents-md-564
Open

Added AGENTS.md with instructions for coding agents#609
muskiteer wants to merge 2 commits into
Kuadrant:mainfrom
muskiteer:docs/added-agents-md-564

Conversation

@muskiteer
Copy link
Copy Markdown

@muskiteer muskiteer commented May 7, 2026

Add AGENTS.md — Universal AI Agent Guidance

What this PR does

Adds an AGENTS.md file to the repository root, providing guidance for AI coding agents (GitHub Copilot, Cursor, Gemini Code Assist, Claude Code, etc.) working with the Authorino codebase.

Why

The existing CLAUDE.md is great but is scoped specifically to Claude Code. AGENTS.md serves as a tool-agnostic equivalent that any AI assistant can pick up automatically, following the emerging convention of agent-readable context files at the repo root.

What's included

  • Project purpose — a concise description of what Authorino is and isn't (not an IdP, not an auth server)
  • Repository map — quick orientation to key packages and directories
  • Essential commands — build, test, codegen, local cluster setup
  • Code generation callout — explicit warning that make generate && make manifests must be run after any changes to api/
  • Auth pipeline mental model — the 5-phase flow and Authorization JSON structure that agents need before touching evaluator code
  • Step-by-step guide for adding a new evaluator
  • API version awareness — v1beta2 vs v1beta3 coexistence and conversion requirements
  • Agent anti-patterns — common mistakes agents make in kubebuilder-based projects (editing generated files, skipping codegen, logging sensitive data at info level, etc.)
  • Commit signing requirement

No functional changes

This PR adds documentation only. No source code, tests, or manifests are modified.
Closes #564

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive contributor guide detailing repository layout, the five‑phase concurrent authorisation pipeline model, per‑request working‑memory shape, build/test/benchmark/lint commands, code‑generation and testing workflows, API version guidance, logging/redaction and caching notes, server flags/default ports, commit requirements and anti‑patterns.
    • Updated assistant/agent guidance to align with repository conventions and remove implementation‑level instructions.

Review Change Stack

Copilot AI review requested due to automatic review settings May 7, 2026 18:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64e98c00-e1e1-461b-a41a-65fe3c9ab820

📥 Commits

Reviewing files that changed from the base of the PR and between 66db3b0 and 5a4be8f.

📒 Files selected for processing (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

📝 Walkthrough

Walkthrough

AGENTS.md is added as a comprehensive contributor guide for AI coding agents; CLAUDE.md is updated to point agents to AGENTS.md and to forbid implementation details. The docs cover repo layout, workflows (build/test/codegen/Kind), the five-phase authorisation pipeline, working-memory shape, evaluator wiring, testing, logging, flags and API-version notes.

Changes

AI Agent Documentation

Layer / File(s) Summary
Agent contributor guide and agent instructions
AGENTS.md, CLAUDE.md
AGENTS.md added/expanded with repository map, essential commands (build/test/benchmarks/lint), required code-generation and CRD/RBAC regeneration workflows, local Kind workflow, five-phase authorization pipeline model, per-request working-memory JSON shape, guidance for adding evaluator implementations (interfaces, API/controller wiring, tests), host lookup and reconciliation notes, caching and logging/redaction policy, server flag defaults, API version (v1beta2 vs v1beta3) awareness, testing/envtest and mock generation tips, GPG commit-signing requirement, explicit anti-patterns, default ports, and links to further docs/community. CLAUDE.md updated to direct code-assistant agents to AGENTS.md and to state it must not contain implementation details.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Poem

🐰 I hopped through docs by lantern light,
Guiding agents to do what's right.
Pipelines hum in phases five,
Codegen keeps the repo alive.
Sign your commits — and bounce with delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarises the main change—adding AGENTS.md with instructions for coding agents, which is the primary objective.
Linked Issues check ✅ Passed The pull request successfully fulfils issue #564 by adding AGENTS.md with tool-agnostic guidance covering project purpose, structure, essential commands, codegen requirements, and contribution guidance.
Out of Scope Changes check ✅ Passed CLAUDE.md was modified to reference AGENTS.md and remove redundant content, which aligns with the discussion about consolidating the files; all changes remain within the scope of the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 13-36: Update the fenced repository tree block that currently
starts with ``` followed by the "authorino/" directory listing to include a
language identifier (e.g., change the opening fence from ``` to ```text) so the
code fence is annotated and markdownlint MD040 is satisfied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac77aecf-731e-4c36-8370-db96e573ebb0

📥 Commits

Reviewing files that changed from the base of the PR and between 18adbf1 and 1023214.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new root-level AGENTS.md intended to provide tool-agnostic guidance for AI coding agents working in the Authorino repository, complementing the existing agent-specific guidance files (e.g., CLAUDE.md).

Changes:

  • Introduces AGENTS.md describing project purpose, repo layout, and key development commands.
  • Documents core mental models (auth pipeline phases, “authorization JSON”) to orient changes to evaluators/controllers.
  • Adds agent-focused guardrails (codegen warnings, logging/sensitive data guidance, common anti-patterns).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 7 comments.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@muskiteer muskiteer mentioned this pull request May 8, 2026
@guicassolato
Copy link
Copy Markdown
Collaborator

Thanks @muskiteer!

I think in general having AGENTS.md (more generic) and CLAUDE.md (Claude-specific) as part of the repo is a good thing. However, I believe those two files don't have to differ in content.

Here's my proposal: we should synthesise these two files into one and turn the other into a symlink. This way, it will be easier to maintain, and what's equality important these days: less tokens to process 🙂

If you would like to take a shot at this, I'll be happy to review your PR.

@muskiteer
Copy link
Copy Markdown
Author

Sorry for the late reply @guicassolato.Happy to take this on
just quick question the claude.md should be symlink right with agent.md being the actual file as it is more flexible?

@guicassolato
Copy link
Copy Markdown
Collaborator

Sorry for the late reply @guicassolato.Happy to take this on just quick question the claude.md should be symlink right with agent.md being the actual file as it is more flexible?

That's right, @muskiteer. Thanks for taking this on!

@muskiteer
Copy link
Copy Markdown
Author

I studied the requirements for agents.md and the current claude.md. The major gaps I noticed in claude.md are the lack of a proper project structure section and a contributing guide.
These are important for the agents.md.
Any other suggestion @guicassolato

Signed-off-by: muskiteer <agarwal.vansh3110@gmail.com>
@muskiteer muskiteer force-pushed the docs/added-agents-md-564 branch from e757c33 to 66db3b0 Compare May 23, 2026 17:52
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 3: Update the opening statement in AGENTS.md to be tool-agnostic: replace
the Claude-specific sentence ("This file provides guidance to Claude Code
(claude.ai/code) when working with code in this repository.") with a generic
phrasing such as "This file provides guidance to AI assistants when working with
code in this repository, including architecture, developer workflow, tests, and
contribution instructions." Ensure the new sentence appears at the top of
AGENTS.md and preserves the intent referenced in the comment.
- Line 192: Typo in the documentation: replace the incorrect field path
`spec..cache` with the correct `spec.cache` everywhere it appears (e.g., in the
guidance sentence "Each evaluator can use `spec..cache` for instance-level
caching"); update any surrounding examples or references that use `spec..cache`
to `spec.cache` to avoid confusion for implementers.
- Line 241: Replace the non-standard reference "`@docs/contributing.md`" with a
valid Markdown file link (for example "docs/contributing.md" or
"./docs/contributing.md" or the correct repo path like "CONTRIBUTING.md") in the
sentence "See the full Developer's Guide in `@docs/contributing.md` for" so the
link resolves when the docs are rendered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4cefcbc0-e92f-430d-ad1d-2d42f6043696

📥 Commits

Reviewing files that changed from the base of the PR and between e757c33 and 66db3b0.

📒 Files selected for processing (2)
  • AGENTS.md
  • CLAUDE.md
✅ Files skipped from review due to trivial changes (1)
  • CLAUDE.md

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Signed-off-by: muskiteer <agarwal.vansh3110@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread CLAUDE.md
Comment thread AGENTS.md
Comment thread AGENTS.md
@muskiteer
Copy link
Copy Markdown
Author

Added repository map and contribution guide to AGENTS.md; remaining content mirrors CLAUDE.md.
CLAUDE.md now uses @ references instead of duplicating content, following the DRY / Single Source of Truth principle.
This approach is preferred over symlinks especially for agents.
Open to any other suggestions.
Thanks
@guicassolato

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.

Add AGENTS.md

3 participants