Skip to content

chore: add AGENTS.md/CLAUDE.md and tune CodeRabbit review config#2065

Merged
asyncapi-bot merged 15 commits into
asyncapi:masterfrom
Adi-204:feat/introduce-code-guidelines
May 15, 2026
Merged

chore: add AGENTS.md/CLAUDE.md and tune CodeRabbit review config#2065
asyncapi-bot merged 15 commits into
asyncapi:masterfrom
Adi-204:feat/introduce-code-guidelines

Conversation

@Adi-204
Copy link
Copy Markdown
Member

@Adi-204 Adi-204 commented Apr 18, 2026

Description
Introduces AGENT.md as the source of truth for code review standards across the asyncapi/generator monorepo, consumed by both human reviewers and AI agents (CodeRabbit). Also tightens CodeRabbit review configuration and refreshes the WebSocket integration-test README to reflect the per-client isolation model landed in #2042.

Related issue(s)
Fixes #2064

Summary by CodeRabbit

  • Documentation

    • Added a consolidated monorepo code review and contribution guidelines document.
    • Updated integration-testing docs with per-client isolation, explicit test/snapshot commands, and a streamlined workflow for adding clients.
  • Chores

    • Enabled additional automated review tooling, stricter lint/format checks, and slop-detection across the repo.
    • Expanded knowledge-base patterns to include the new guidelines document.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 18, 2026

⚠️ No Changeset found

Latest commit: 789be6c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@asyncapi-bot
Copy link
Copy Markdown
Contributor

What reviewer looks at during PR review

The following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the change using imperative mood (it means spoken or written as if giving a command or instruction, like "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds repository-wide AGENT.md with consolidated code-review and contribution conventions, updates .coderabbit.yaml to enable additional automated review tooling and checks, and revises the websocket clients integration-test README to a per-client TEST_CLIENT isolation model and related workflows.

Changes

Cohort / File(s) Summary
Review configuration
./.coderabbit.yaml
Enabled reviews.auto_review.drafts: false, added reviews.slop_detection.enabled: true, enabled eslint, yamllint, and markdownlint under reviews.tools, and added "AGENT.md" to knowledge_base.code_guidelines.filePatterns.
Repository guidance
AGENT.md
Added new monorepo-wide code-review and contributor guidelines: monorepo topology (apps/*, packages/*), Turborepo script semantics, Node/npm minimums, ESLint-first formatting and strict lint requirements (--max-warnings 0), commit/PR conventions, release gating and changeset rules, JSDoc/API documentation expectations, // Why: comment convention, cross-cutting architecture principles, and per-package conventions (apps and packages specific rules, plus frozen-package note).
Test docs — websocket clients
packages/templates/clients/websocket/test/README.md
Refactored integration-test docs to a per-client isolation model driven by TEST_CLIENT: per-client npm scripts, runTestSuiteForClient wrapper to conditionally register suites, client-specific snapshot resolver and testResultPath, targeted cleanup of only the selected client's results, explicit run/update commands, and expanded workflow for adding a new client.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The PR implements all primary objectives from issue #2064: consolidating dispersed code review rules into AGENT.md, providing a unified source of truth, and reducing inconsistent review feedback.
Out of Scope Changes check ✅ Passed All changes are within scope: AGENT.md creation directly addresses #2064, CodeRabbit config tuning supports guidelines enforcement, and WebSocket README updates reflect related work landing in #2042.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title follows Conventional Commits format with 'chore:' prefix and uses imperative mood. It accurately summarizes the main changes: adding AGENT.md (consolidating code guidelines) and tuning CodeRabbit review config.

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

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENT.md`:
- Around line 13-24: Update the fenced code blocks in AGENT.md that show the
directory trees so they include a language identifier (e.g., change ``` to
```text); specifically modify the block containing the "apps/ ... packages/ ..."
tree and the block containing the "<client>/ ... template/ components/ test/
..." tree (also apply same change to the other instance around the "<client>/"
example mentioned in lines 180-189) so both opening fences read ```text to
satisfy markdownlint MD040.
- Around line 92-97: The taxonomy text uses "client" but the repo convention and
existing dirs use "clients"; update the sentence and the type set so they match
the established naming (e.g., change "type ∈ {client, sdk, docs, scripts}" to
"type ∈ {clients, sdk, docs, scripts}" or otherwise consistently refer to
"packages/templates/clients/..."), and update the explanatory bullets
(references to `client` and "client template") to the plural `clients` (or
choose the singular and rename directories across the repo with an accompanying
issue/discussion), ensuring consistency for the Template-type taxonomy block and
any mentions of `packages/templates/<type>/...`.

In `@packages/templates/clients/websocket/test/README.md`:
- Line 138: Replace the shell-specific example "TEST_CLIENT=python jest" with a
cross-platform instruction: either reference the npm script "npm run
test:python" (ensure package.json contains a "test:python" script that sets
TEST_CLIENT and runs jest) or recommend using cross-env (e.g., a "test:python"
script that uses cross-env to set TEST_CLIENT before invoking jest) so Windows
users can run the same command; update the README.md line to show the
cross-platform approach and mention adding "-u" for updating snapshots.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ffcecab0-5e30-4c79-91d0-b2dbc870968e

📥 Commits

Reviewing files that changed from the base of the PR and between f6c88c9 and dc35641.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • AGENT.md
  • packages/templates/clients/websocket/test/README.md

Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread packages/templates/clients/websocket/test/README.md Outdated
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 the current code and only fix it if needed.

Inline comments:
In `@AGENT.md`:
- Around line 53-55: Update the release-prefix guidance in AGENT.md so it
matches section 2.5: replace the current sentence that limits triggers to only
`feat:`/`fix:` with the full, unified set of release-triggering prefixes
(`feat:`, `feat!:`, `fix:`, `fix!:`, and `chore(release):`), and ensure the note
about requiring a `.changeset/*.md` for `feat:`/`fix:` diffs in publishable
packages remains intact; update any example or wording that conflicts (search
for the current line mentioning `feat:` / `fix:` and the later mention of
`feat!:/fix!:/chore(release):`) so both sections use identical wording.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bb7f5ef3-2a43-4ec7-9b9a-35c1e884ec55

📥 Commits

Reviewing files that changed from the base of the PR and between 885c8f9 and 4e8a8e8.

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

Comment thread AGENT.md Outdated
@asyncapi asyncapi deleted a comment from coderabbitai Bot Apr 18, 2026
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 the current code and only fix it if needed.

Inline comments:
In `@AGENT.md`:
- Line 54: Update the rule sentence that currently reads "Any `feat:` or `fix:`
in the diff of a publishable package..." to also require the breaking-change
variants by including backtick-marked tokens `feat!:`, `fix!:` (i.e., change the
phrase to "Any `feat:`, `fix:`, `feat!:`, or `fix!:` in the diff of a
publishable package ... must be accompanied by a `.changeset/*.md` file");
ensure the wording clearly ties `!`-marked commits to major-bump changesets so
it matches the release/major-bump rules elsewhere in the document.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4765b5a8-e81f-42c2-9e85-22513396b72d

📥 Commits

Reviewing files that changed from the base of the PR and between 4e8a8e8 and 4e777f6.

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

Comment thread AGENT.md Outdated
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 the current code and only fix it if needed.

Inline comments:
In `@AGENT.md`:
- Line 79: Update the sentence on Line 79 of AGENT.md to explicitly list all
five patterns the release workflow checks (startsWith(..., 'feat:'),
startsWith(..., 'feat!:'), startsWith(..., 'fix:'), startsWith(..., 'fix!:'),
and startsWith(..., 'chore(release):')) and note that the workflow uses separate
startsWith() calls for each, so scoped prefixes like 'feat(generator):' will not
trigger a release; keep the rest of the paragraph unchanged.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e5dc7f15-fd00-45a6-88a8-cbb78ecb1bb1

📥 Commits

Reviewing files that changed from the base of the PR and between 4e777f6 and 3de2b80.

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

Comment thread AGENT.md Outdated
@derberg derberg moved this to In Progress in Maintainers work Apr 22, 2026
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
Comment thread AGENT.md Outdated
@Adi-204 Adi-204 force-pushed the feat/introduce-code-guidelines branch from 0ac124c to e310bcf Compare April 23, 2026 16:57
@Adi-204 Adi-204 requested a review from derberg April 27, 2026 17:45
Comment thread AGENT.md Outdated
Copy link
Copy Markdown
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

one last thing, also please add CLAUDE.md file (we both use Claude) that references the AGENT.md file

@derberg
Copy link
Copy Markdown
Member

derberg commented May 8, 2026

claude.md could be a symlink like others do: https://github.com/apache/airflow/blob/main/CLAUDE.md

@derberg
Copy link
Copy Markdown
Member

derberg commented May 8, 2026

looks like better is to add @AGENTS.md to CLAUDE.md - you would have to test if that works

@Adi-204 Adi-204 added AI-Spam and removed AI-Spam labels May 8, 2026
@Adi-204
Copy link
Copy Markdown
Member Author

Adi-204 commented May 8, 2026

@derberg putting @something inside markdown doesn’t give you a second filename on disk, so it doesn’t help tools that only open CLAUDE.md at the repo root, so I create symlink and also I added a new label AI-Spam in generator in slop_detection section so that we can see directly, it is just an experiment if it start adding this label in every PR we will remove it.

@Adi-204 Adi-204 requested a review from derberg May 8, 2026 17:53
@Adi-204 Adi-204 changed the title chore: add AGENT.md and tune CodeRabbit review config chore: add AGENTS.md/CLAUDE.md and tune CodeRabbit review config May 8, 2026
Comment thread Development.md
Comment on lines +42 to +43
**`CLAUDE.md` vs `AGENTS.md`:** The repo may ship `CLAUDE.md` as a symlink to `AGENTS.md` (one canonical guidelines file). After a clone, Linux and macOS usually need no extra step. On **Windows**, turn on **Developer Mode** (or equivalent symlink permission), run `git config core.symlinks true`, then `git checkout -- CLAUDE.md` so Git creates a real link—not a one-line text stub. Edit **`AGENTS.md`** only for content; the symlink follows automatically.

Copy link
Copy Markdown
Member Author

@Adi-204 Adi-204 May 8, 2026

Choose a reason for hiding this comment

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

@derberg I'm currently on windows can you test for macOS according to web you should not require any additional git setup. So maybe we can merge this and if any problem occur we will update the guide for macOS. wdyt 🤔 ? or should I remove it?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

hey @Adi-204 , if u need any help in testing on macOS would love to help you out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hey @Varadraj75 thanks for the help sure you can checkout in this branch locally and let me know.

Copy link
Copy Markdown
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

Merge when you want, all good from my side
once merged, I will give it a try

@sonarqubecloud
Copy link
Copy Markdown

@Adi-204
Copy link
Copy Markdown
Member Author

Adi-204 commented May 15, 2026

/rtm

@asyncapi-bot asyncapi-bot merged commit 6e5f64f into asyncapi:master May 15, 2026
17 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Maintainers work May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Introduce AGENT.md as source of truth for code review guidelines

4 participants