Skip to content

Add CONTRIBUTING.md, AGENTS.md#299

Open
Jakob-Naucke wants to merge 1 commit into
trusted-execution-clusters:mainfrom
Jakob-Naucke:agents
Open

Add CONTRIBUTING.md, AGENTS.md#299
Jakob-Naucke wants to merge 1 commit into
trusted-execution-clusters:mainfrom
Jakob-Naucke:agents

Conversation

@Jakob-Naucke

@Jakob-Naucke Jakob-Naucke commented Jun 26, 2026

Copy link
Copy Markdown
Member

and links to those from some tools we use, and some README updates with it

Summary by Sourcery

Document contribution guidelines and agent usage conventions and link them from the main project documentation.

Documentation:

  • Add CONTRIBUTING guidelines covering commit practices, testing expectations, and coding style.
  • Introduce AGENTS guidance defining project goals, architecture entry points, and expectations for human and AI agent collaboration.
  • Update README repository structure to better describe Rust-based operator components and auxiliary crates, and add references to new docs.

Chores:

  • Add CLAUDE stub pointing to AGENTS documentation and editor rules configuration under .cursor.

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Jakob-Naucke

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai

sourcery-ai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds project contribution and agent-usage guidelines, wires them into the repo, and refines the README repository structure section to better describe Rust-based operator components and supporting crates.

File-Level Changes

Change Details Files
Restructure README repository overview to highlight the Rust-based operator, group components/crates, and clarify directory purposes.
  • Introduce a short note that the operator relies on Rust crates.
  • Add an "Operator components" subsection listing operator-related binaries and services.
  • Add an "Other crates" subsection documenting shared library, tests, and test utilities.
  • Move the API description under a new "Other components" subsection to distinguish Go-based API from Rust crates.
README.md
Add project-level documentation for agents (AI assistants) and humans using them, including architecture pointers and conventions.
  • Create AGENTS.md describing project objective, architecture entry points/integrations, and behavioral conventions for agents and their human users.
  • Specify requirements such as using Assisted-by/Generated-by in commits, never committing real credentials, and preferring MCP-based tools where available.
  • Document project-specific assumptions about crate naming and expected agent behaviors around reuse, generalization, and code style.
AGENTS.md
Introduce contribution guidelines for commit hygiene, testing, and Rust tooling.
  • Create CONTRIBUTING.md with rules for signed/signed-off commits and commit message formatting.
  • Define expectations around keeping git bisects valid, co-locating code and test changes, and structuring small changes in larger PRs.
  • Document Rust workflow requirements (cargo fmt, make lint clippy, make test, integration tests) and commit subject focus-area prefixes.
CONTRIBUTING.md
Add tool-specific and agent routing metadata files for editor/agent integrations.
  • Create CLAUDE.md pointing to AGENTS.md for AI assistant configuration.
  • Add a .cursor rules file stub (project.mdc) for Cursor editor/agent behavior configuration.
CLAUDE.md
.cursor/rules/project.mdc

Possibly linked issues

  • #(not specified): The PR creates CONTRIBUTING.md with commit and AI-assistance conventions, directly implementing the documented contribution guidelines request.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Comment thread CONTRIBUTING.md
.await?;
```
- When functionality is changed, perform `make test` and [integration test](./tests/README.md) at least with basic attestation.
- Prepend your commit subject with a short focus area. Omit this when making general operator changes. Examples are `tests`, `tests/azure`, `rvs` (reference values)

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.

Open to fix, feat also being a prefix, but IMO it should still mention the focus area (when it isn't all-operator), e.g. fix:tests: …

@sourcery-ai sourcery-ai Bot left a comment

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 - I've found 3 issues, and left some high level feedback:

  • The README anchor link in AGENTS.md (./README.md##trusted-execution-cluster-operator-trusted-cluster-operator) looks malformed (double #); consider correcting it to the actual section ID so navigation works.
  • In AGENTS.md, the line and agents should suggest when they detect is a sentence fragment; consider rephrasing or completing it to make the guidance clearer.
  • The new .cursor/rules/project.mdc file is added but empty in the diff; consider either removing it from the repo or populating it with the intended rules to avoid committing an unused config stub.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The README anchor link in AGENTS.md (`./README.md##trusted-execution-cluster-operator-trusted-cluster-operator`) looks malformed (double `#`); consider correcting it to the actual section ID so navigation works.
- In AGENTS.md, the line `and agents should suggest when they detect` is a sentence fragment; consider rephrasing or completing it to make the guidance clearer.
- The new `.cursor/rules/project.mdc` file is added but empty in the diff; consider either removing it from the repo or populating it with the intended rules to avoid committing an unused config stub.

## Individual Comments

### Comment 1
<location path="README.md" line_range="22-24" />
<code_context>
+### Other crates
+
 -   `/lib`: Shared Rust definitions, including translated CRDs
+-   `/tests`: Non-unit tests, most rely on a cluster being available. Many of those also rely on a virtualization backend.
+-   `/test_utils`: Operator setup helpers and virtualization backends
+
</code_context>
<issue_to_address>
**suggestion (typo):** Consider fixing the comma splice in the `/tests` description for grammatical correctness.

The sentence "Non-unit tests, most rely on a cluster being available." is a comma splice. Consider revising to "Non-unit tests; most rely on a cluster being available." or "Non-unit tests. Most rely on a cluster being available."

```suggestion
### Other crates

-   `/lib`: Shared Rust definitions, including translated CRDs
-   `/tests`: Non-unit tests; most rely on a cluster being available. Many of those also rely on a virtualization backend.
-   `/test_utils`: Operator setup helpers and virtualization backends
```
</issue_to_address>

### Comment 2
<location path="AGENTS.md" line_range="3" />
<code_context>
+# Project objective
+
+See [README](./README.md##trusted-execution-cluster-operator-trusted-cluster-operator).
+
+- **Success looks like**: With the operator deployed, all nodes in the cluster are attested from hardware to software.
</code_context>
<issue_to_address>
**issue (bug_risk):** The README link fragment appears to have an extra `#`, which may break the anchor.

The link path uses `README.md##...`, but section anchors should use a single `#` (e.g. `README.md#section-name`). Please adjust the fragment so it matches the actual heading and the link resolves correctly.
</issue_to_address>

### Comment 3
<location path="CONTRIBUTING.md" line_range="25" />
<code_context>
+)
+.await?;
+```
+- When functionality is changed, perform `make test` and [integration test](./tests/README.md) at least with basic attestation.
+- Prepend your commit subject with a short focus area. Omit this when making general operator changes. Examples are `tests`, `tests/azure`, `rvs` (reference values)
</code_context>
<issue_to_address>
**suggestion (typo):** The phrase "and [integration test]" is missing an article and reads slightly ungrammatically.

You could rephrase to "perform `make test` and an [integration test]" or "perform `make test` and the [integration tests]" so the sentence is grammatically complete.

```suggestion
- When functionality is changed, perform `make test` and an [integration test](./tests/README.md) at least with basic attestation.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread README.md
Comment thread AGENTS.md Outdated
Comment thread CONTRIBUTING.md Outdated
)
.await?;
```
- When functionality is changed, perform `make test` and [integration test](./tests/README.md) at least with basic attestation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (typo): The phrase "and [integration test]" is missing an article and reads slightly ungrammatically.

You could rephrase to "perform make test and an [integration test]" or "perform make test and the [integration tests]" so the sentence is grammatically complete.

Suggested change
- When functionality is changed, perform `make test` and [integration test](./tests/README.md) at least with basic attestation.
- When functionality is changed, perform `make test` and an [integration test](./tests/README.md) at least with basic attestation.

and links to those from some tools we use, and some README updates
with it

Signed-off-by: Jakob Naucke <jnaucke@redhat.com>
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