Skip to content

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

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

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

Conversation

@Tharsanan1
Copy link
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 repository documentation outlining the policy integration model, configuration approach via policy-definition.yaml, coding conventions, module structure, inter-component communication patterns, and contribution/release processes.

Product context file covering the policy hub architecture, all 37
policy modules, policy SDK interface patterns, per-policy testing,
dev-policies integration testing workflow (with cross-reference to
api-platform repo), coding conventions, and release process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

Walkthrough

A new documentation file agents.md was added describing the WSO2 Gateway Controllers (Policy Hub) library repository, including its purpose as a modular monorepo, policy integration model, module structure, inter-component communication patterns, configuration mechanism, coding conventions, and contribution/release processes.

Changes

Cohort / File(s) Summary
Documentation
agents.md
New comprehensive documentation file defining the repository's architecture, policy integration model, build/run/test approach, configuration via policy-definition.yaml, coding conventions, and contribution/release workflows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A fresh document hops into view,
Describing policies and modules too!
From gateway controllers to Redis flows,
The Gateway Hub's grand architecture glows. ✨
Documentation complete, the project now shines,
With conventions, configs, and all the designs!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete relative to the template. It lacks critical sections like Purpose/Goals, Approach, User stories, Release notes, Documentation links, Security checks, Test environment, and others. Complete the PR description by filling in missing required template sections, particularly Purpose/Goals, Approach, Documentation, Security checks, and Test environment details.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add agents.md for AI-assisted bug fix skills' is fully related to the main change—adding a new agents.md documentation file intended for AI-assisted bug-fix capabilities.
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
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 on lines +15 to +32
```
gateway-controllers/
├── policies/ # 37 independent Go policy modules
│ ├── api-key-auth/ # Each contains:
│ │ ├── apikey.go # - Implementation (Go)
│ │ ├── apikey_test.go # - Unit tests
│ │ ├── go.mod # - Go module definition
│ │ ├── go.sum # - Dependency lock
│ │ └── policy-definition.yaml # - Parameter schema & version
│ ├── jwt-auth/
│ ├── cors/
│ └── ... (37 total)
└── docs/ # Versioned policy documentation
├── api-key-auth/v0.8/
│ ├── metadata.json # - Policy metadata
│ └── docs/apikey-authentication.md # - User-facing docs
└── ...
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a language identifier to the fenced code block.

Line 15 triggers markdownlint MD040 because the fence has no language. Use text for the directory tree block.

✏️ Suggested fix
-```
+```text
 gateway-controllers/
 ├── policies/                    # 37 independent Go policy modules
 ...
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 15-15: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

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

In `@agents.md` around lines 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/").

|-----------|----------|---------|
| 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
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.

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