Skip to content

Add agents.md for AI-assisted bug fix skills#112

Open
Tharsanan1 wants to merge 1 commit into
wso2:mainfrom
Tharsanan1:add-agents-md-policy-hub
Open

Add agents.md for AI-assisted bug fix skills#112
Tharsanan1 wants to merge 1 commit into
wso2:mainfrom
Tharsanan1:add-agents-md-policy-hub

Conversation

@Tharsanan1
Copy link
Copy Markdown
Contributor

@Tharsanan1 Tharsanan1 commented Mar 25, 2026

Summary

  • Adds agents.md at repo root — product context file for AI-assisted bug fix skills
  • Covers: policy hub architecture, all 37 policy modules mapped, policy SDK interface & patterns, per-policy testing (go test -v -race ./...), dev-policies integration testing workflow with cross-reference to api-platform repo, coding conventions, and release process
  • Points agents to the api-platform repo's agents.md > Testing > Testing Dev Policies Locally for full integration test instructions

Test plan

  • Verify skills can parse required sections
  • Run /plan-fix against a policy bug and confirm it picks up correct testing conventions and integration test workflow

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for the Gateway Controllers policy hub covering architecture, policy-module organization, build & test commands, integration notes, configuration schema, coding standards, testing conventions, versioning, and contributor guidelines.
    • Added a small index/reference file that points to the new documentation for easier discovery.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 25, 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: 37f77947-a97f-4de1-84b0-933cb946f2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 07f4a26 and 56fa8ae.

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

Walkthrough

Added two documentation files: CLAUDE.md — a detailed guide on repository structure, policy modules, build/test commands, policy interface, coding/testing conventions, and gotchas for WSO2 Gateway Controllers Policy Hub; and AGENTS.md — a single-line file referencing CLAUDE.md.

Changes

Cohort / File(s) Summary
Documentation Files
CLAUDE.md, AGENTS.md
CLAUDE.md added comprehensive repository and workflow documentation: describes policies/ module layout (each policy as independent Go module), build/test commands, dependency on wso2/api-platform for integration tests, common policy interface (Mode(), OnRequest, OnResponse), coding and testing conventions, parameter handling in policy-definition.yaml, per-policy versioning, and code-owner notes. AGENTS.md added containing a single-line reference to CLAUDE.md.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped through files and found the light,

CLAUDE lays maps for policies bright.
One tiny agent points the way,
Now builders know how to test and play.
🥕📜 Hop on — the docs are here today!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description deviates significantly from the template. It uses a custom 'Summary' and 'Test plan' format instead of the required template sections (Purpose, Goals, Approach, User stories, Release note, Documentation, Security checks, etc.), making it largely non-compliant with repository standards. Restructure the description to follow the provided template, including Purpose (with issue links), Goals, Approach, User stories, Release note, Documentation, and other required sections. Replace the custom summary format with the standard template structure.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding an agents.md file for AI-assisted bug fix skills, which aligns with the actual file additions (agents.md and supporting CLAUDE.md).
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
Contributor

@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: 2

🧹 Nitpick comments (1)
agents.md (1)

203-203: Clarify platform naming in prose while keeping path literals unchanged.

Consider wording like “GitHub workflow/file” before .github/... paths (e.g., “GitHub workflow .github/workflows/...”) to avoid branding ambiguity while preserving correct path casing.

Also applies to: 283-284, 302-302

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@agents.md` at line 203, Update the prose to prefix the repository/workflow
path literals with clarifying wording such as "GitHub workflow" or "GitHub file"
while leaving the exact path literals unchanged; for example, change the
sentence referencing `wso2/api-platform` and
`.github/workflows/gateway-integration-test.yml` to read like "Full gateway
integration tests live in wso2/api-platform at gateway/it/; this repo's GitHub
workflow `.github/workflows/gateway-integration-test.yml` triggers those tests,"
and apply the same pattern to the other occurrences around lines mentioning
`.github/workflows/...` and the repository/path literals so the casing and paths
remain exact but the platform is unambiguous.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agents.md`:
- Line 114: Update the table entry string that currently reads "Rate limiting
policies (advanced-ratelimit, token-based-ratelimit) use Redis for distributed
state" to use the hyphenated compound modifier "Rate-limiting policies
(advanced-ratelimit, token-based-ratelimit) use Redis for distributed state" so
the table row ("Policy → Redis | TCP | Rate limiting policies ...") reads with
the corrected hyphenation.
- Around line 15-32: The fenced code block that shows the directory tree
starting with "gateway-controllers/" is missing a language identifier (causing
markdownlint MD040); update that code fence to include the language tag "text"
so the block reads like ```text at the opening fence for the block that contains
the policies/docs tree (the directory tree snippet including
"gateway-controllers/", "policies/", "api-key-auth/", and "docs/").

---

Nitpick comments:
In `@agents.md`:
- Line 203: Update the prose to prefix the repository/workflow path literals
with clarifying wording such as "GitHub workflow" or "GitHub file" while leaving
the exact path literals unchanged; for example, change the sentence referencing
`wso2/api-platform` and `.github/workflows/gateway-integration-test.yml` to read
like "Full gateway integration tests live in wso2/api-platform at gateway/it/;
this repo's GitHub workflow `.github/workflows/gateway-integration-test.yml`
triggers those tests," and apply the same pattern to the other occurrences
around lines mentioning `.github/workflows/...` and the repository/path literals
so the casing and paths remain exact but the platform is unambiguous.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9393812f-f63b-459f-bd36-4b1618b32235

📥 Commits

Reviewing files that changed from the base of the PR and between f6b5943 and a119064.

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

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
|-----------|----------|---------|
| Policy Engine → Policy | Go function call | Policies are compiled into the Policy Engine binary and invoked directly |
| Policy → External services | HTTP/HTTPS | Some policies call external APIs (JWKS endpoints, Azure Content Safety, AWS Bedrock, embedding providers) |
| Policy → Redis | TCP | Rate limiting policies (advanced-ratelimit, token-based-ratelimit) use Redis for distributed state |
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.

⚠️ Potential issue | 🟡 Minor

Hyphenate the compound modifier for readability.

At Line 114, prefer “Rate-limiting policies” instead of “Rate limiting policies.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~114-~114: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...g providers) | | Policy → Redis | TCP | Rate limiting policies (advanced-ratelimit, token-bas...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@agents.md` at line 114, Update the table entry string that currently reads
"Rate limiting policies (advanced-ratelimit, token-based-ratelimit) use Redis
for distributed state" to use the hyphenated compound modifier "Rate-limiting
policies (advanced-ratelimit, token-based-ratelimit) use Redis for distributed
state" so the table row ("Policy → Redis | TCP | Rate limiting policies ...")
reads with the corrected hyphenation.

CLAUDE.md contains the full agent guide for WSO2 Gateway Controllers.
AGENTS.md is a symlink to CLAUDE.md to support multiple AI tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Tharsanan1 Tharsanan1 force-pushed the add-agents-md-policy-hub branch from 0dac9ae to 56fa8ae Compare March 29, 2026 14:17
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