Add agents.md for AI-assisted bug fix skills#112
Add agents.md for AI-assisted bug fix skills#112Tharsanan1 wants to merge 1 commit intowso2:mainfrom
Conversation
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>
WalkthroughA new documentation file Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
| ``` | ||
| 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 | ||
| └── ... | ||
| ``` |
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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.
Summary
agents.mdat repo root — product context file for AI-assisted bug fix skillsgo test -v -race ./...), dev-policies integration testing workflow with cross-reference to api-platform repo, coding conventions, and release processagents.md > Testing > Testing Dev Policies Locallyfor full integration test instructionsTest plan
/plan-fixagainst a policy bug and confirm it picks up correct testing conventions and integration test workflow🤖 Generated with Claude Code
Summary by CodeRabbit
policy-definition.yaml, coding conventions, module structure, inter-component communication patterns, and contribution/release processes.