Skip to content

Add AGENTS.md and Cursor project rules#52

Open
bburt-rh wants to merge 2 commits intoredhat-documentation:mainfrom
bburt-rh:feature/cursor-repo-rules-and-agents
Open

Add AGENTS.md and Cursor project rules#52
bburt-rh wants to merge 2 commits intoredhat-documentation:mainfrom
bburt-rh:feature/cursor-repo-rules-and-agents

Conversation

@bburt-rh
Copy link
Collaborator

@bburt-rh bburt-rh commented Mar 20, 2026

Adds Cursor-oriented project instructions and rules for this repository.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive contribution guidelines and shared project conventions.
    • Introduced standardized naming and invocation conventions for skills and scripts to ensure consistency.
    • Consolidated agent-tool guidance into a single source of truth and simplified the Claude-specific document to reference those shared conventions.
    • Clarified development/site-build workflow and temporary-file handling guidance.

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

📝 Walkthrough

Walkthrough

Adds Cursor rule documents and a new AGENTS.md describing repository conventions for agent plugins (plugin layout, skill naming, script invocation, metadata sync, build targets). Updates CLAUDE.md to reference AGENTS.md and restrict its scope to Cursor-specific guidance.

Changes

Cohort / File(s) Summary
Cursor rule files
​.cursor/rules/project.mdc, ​.cursor/rules/skill-naming-and-scripts.mdc
New Cursor rules: repo context, plugin layout (plugins/<name>/ with .claude-plugin/plugin.json), make targets (make update/serve/build), kebab-case naming, required metadata/marketplace sync, version bump rules, gitignore for generated docs, Skill naming conventions and script invocation patterns (fully qualified plugin:skill, relative vs workspace-root paths), and .work/ for temp files.
Agent guide
AGENTS.md
New comprehensive guide formalizing conventions: repo structure, .claude-plugin/marketplace.json sync, plugin README/metadata layout, docs site commands, enforced plugin:skill identifiers, relative vs workspace-root vs ${CLAUDE_PLUGIN_ROOT} script paths, knowledge-only skill guidance, prohibition of legacy slash-only invocations, and contributing rules (naming, metadata, generated docs handling, Python usage).
Top-level doc update
CLAUDE.md
Trimmed and refocused: replaced broad repo guidance with pointer to AGENTS.md, retained and scoped ${CLAUDE_PLUGIN_ROOT} cross-skill call section, and added note directing Cursor users to workspace-relative paths and AGENTS.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 With a hop I mark the trail so clear,
Plugins named and paths made dear,
Skills call kindly, scripts in line,
Docs refreshed — the garden fine. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the primary changes: addition of AGENTS.md documentation and Cursor project rules files, directly reflecting the main content additions.
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
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feature/cursor-repo-rules-and-agents

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

Copy link

@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

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

Inline comments:
In @.cursor/rules/project.mdc:
- Line 21: The generated-files exclusion list is missing the root plugins.md
entry; update the list in the project generated-file rules (the block that
currently mentions docs/plugins.md, docs/plugins/, and docs/install/) to also
include plugins.md so the root plugins.md is ignored by the generated-file
policy.

In @.cursor/rules/skill-naming-and-scripts.mdc:
- Line 10: The rule "Always use fully qualified `plugin:skill` names" is too
broad and rewrites intentional short-form Skill IDs in auto-generated
index/reference displays; update the rule text and matching logic to apply only
to invocation/reference contexts (invocations, frontmatter, inline calls, and
cross-references) and exclude index/table display IDs (e.g.,
docs/cursor-skills-index.md style index entries). Specifically, narrow the rule
scope to check contexts for invocation syntax and frontmatter keys and skip or
whitelist rows/columns used as display IDs in generated index tables so
short-form Skill IDs remain unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea0d70fb-7111-4d7c-ba2a-a742e2999891

📥 Commits

Reviewing files that changed from the base of the PR and between abb3fe9 and 886c0f7.

📒 Files selected for processing (4)
  • .cursor/rules/project.mdc
  • .cursor/rules/skill-naming-and-scripts.mdc
  • AGENTS.md
  • CLAUDE.md

README.md # Plugin documentation
```

## Docs site development commands
Copy link
Member

Choose a reason for hiding this comment

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

Can we move all generic repo details into AGENTS.md, and keep CLAUDE.md specific only to Claude details?

AFAIK, Claude will read AGENTS.md, and the CLAUDE.md

Copy link
Collaborator Author

@bburt-rh bburt-rh Mar 24, 2026

Choose a reason for hiding this comment

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

Agreed — moved all shared conventions (repo structure, naming, contributing rules, script patterns) into AGENTS.md as the single source of truth. CLAUDE.md now just references AGENTS.md and documents the one Claude Code-specific detail (${CLAUDE_PLUGIN_ROOT} for cross-skill calls).

Note: Claude Code reads CLAUDE.md but AFAIK does not automatically read AGENTS.md, so CLAUDE.md now opens with an explicit directive to follow AGENTS.md for shared conventions. That way both tools get the full picture from their respective entry points.

Copy link
Member

@aireilly aireilly left a comment

Choose a reason for hiding this comment

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

/lgtm, pending one comment and whatever coderabbit says that makes sense.

Copy link

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

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

15-15: Consider clarifying the scope of this Cursor note.

While this cross-reference helps readers understand the difference between Claude Code and Cursor approaches, placing Cursor-specific guidance in a Claude Code-scoped document (line 3 states "apply only to Claude Code") might be slightly confusing.

Consider either:

  • Rewording for clarity: "Note: If you're using Cursor instead, see AGENTS.md for workspace-relative path guidance."
  • Moving this note to AGENTS.md where it would be more contextually appropriate
✍️ Proposed rewording for clarity
-Cursor users should use workspace-relative paths instead. See [AGENTS.md](AGENTS.md) for details.
+**Note for Cursor users:** If you're using Cursor instead of Claude Code, see [AGENTS.md](AGENTS.md) for workspace-relative path guidance.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 15, The note "Cursor users should use workspace-relative
paths instead." appears inside a Claude Code–scoped doc and may confuse readers;
update the sentence to clarify scope by either rewording it to "Note: If you're
using Cursor instead, see AGENTS.md for workspace-relative path guidance." or
moving that sentence out of the Claude Code section into AGENTS.md; look for the
paragraph containing "apply only to Claude Code" and the Cursor note and apply
the chosen change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CLAUDE.md`:
- Line 15: The note "Cursor users should use workspace-relative paths instead."
appears inside a Claude Code–scoped doc and may confuse readers; update the
sentence to clarify scope by either rewording it to "Note: If you're using
Cursor instead, see AGENTS.md for workspace-relative path guidance." or moving
that sentence out of the Claude Code section into AGENTS.md; look for the
paragraph containing "apply only to Claude Code" and the Cursor note and apply
the chosen change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b80d615d-e5bb-4bdb-9ac5-82d387fdc0cb

📥 Commits

Reviewing files that changed from the base of the PR and between 886c0f7 and 92cf052.

📒 Files selected for processing (3)
  • .cursor/rules/skill-naming-and-scripts.mdc
  • AGENTS.md
  • CLAUDE.md
✅ Files skipped from review due to trivial changes (2)
  • .cursor/rules/skill-naming-and-scripts.mdc
  • AGENTS.md

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.

2 participants