-
Notifications
You must be signed in to change notification settings - Fork 10
Add CONTRIBUTING.md, AGENTS.md #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Jakob-Naucke
wants to merge
1
commit into
trusted-execution-clusters:main
Choose a base branch
from
Jakob-Naucke:agents
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+91
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| description: Core project conventions -- read AGENTS.md in the project root | ||
| alwaysApply: true | ||
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # 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. | ||
| - **Non-goals**: Rely on OpenShift, see the [confidential-clusters](https://github.com/confidential-clusters/operator) downstream. | ||
|
|
||
| # Architecture | ||
|
|
||
| - Entry points: see [README](./README.md#repository-structure). | ||
| - Integrations: [Trustee](https://github.com/confidential-containers/trustee), [compute-pcrs](https://github.com/trusted-execution-clusters/compute-pcrs), [clevis-pin-trustee](https://github.com/latchset/clevis-pin-trustee) | ||
|
|
||
| # Conventions | ||
|
|
||
| - See [CONTRIBUTING](./CONTRIBUTING.md). | ||
| - Use `Assisted-by:` or `Generated-by`: in commit messages for AI-supported contributions. | ||
| - Never commit real credentials; use env vars and local `.env` (gitignored) with synthetic values in docs. | ||
|
|
||
| # Things that human users of agents should do | ||
|
|
||
| and agents should suggest when they detect | ||
|
|
||
| - Have a coherent goal per session | ||
| - Read architecture, security-sensitive paths, performance-critical design, ambiguous product trade-offs | ||
|
|
||
| # Things agents should do, but can get wrong | ||
|
|
||
| - The operator's crate name is `operator`. | ||
| - Use MCPs when available | ||
| - Prefer the MCP LSP over `grep` | ||
| - Prefer the k8s LSP over `kubectl`. | ||
| - Reuse, and check for other uses of a similar pattern. When functionality can be moved out of a function for reuse, commit the generalization before the new use. | ||
| - Include lint-compatible code style when writing, not as an afterthought. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| - Use `cargo fmt`. Always perform `make lint clippy` before publishing when code is changed. | ||
| - Use an extra binding if this saves more than one (formatted) LOC, e.g. | ||
| ```rust | ||
| let svc = ATTESTATION_KEY_REGISTER_SERVICE; | ||
| self.create_certificate(svc, ATT_REG_CERT, ATT_REG_SECRET, issuer_name) | ||
| .await?; | ||
| ``` | ||
| over | ||
| ```rust | ||
| self.create_certificate( | ||
| ATTESTATION_KEY_REGISTER_SERVICE, | ||
| ATT_REG_CERT, | ||
| ATT_REG_SECRET, | ||
| issuer_name, | ||
| ) | ||
| .await?; | ||
| ``` | ||
| - When functionality is changed, perform `make test`, and [integration test](./tests/README.md) at least with basic attestation. | ||
| - Use [REUSE](https://reuse.software) comments for new files, or exclude in [REUSE.toml](./REUSE.toml) when not possible. | ||
| - For members | ||
| - Set membership to public so GHA runs integration tests without requiring the ok-to-test label | ||
| - Merge when you have approval, passing tests, and are happy with your PR. | ||
|
|
||
| # Committing | ||
|
|
||
| - [Sign off commits](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) | ||
| - [Sign commits cryptographically](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---gpg-signkey-id) | ||
| - Limit commit subjects to 50 and messages to 72 characters. Leave an empty line between subject and message. | ||
| - Add small changes to larger PRs in separate commits to ease review burden, but do not add them to already open PRs. | ||
| - Commit subjects | ||
| - Prepend your commit subject with a short focus area. Omit this when making general operator changes. Examples are `tests`, `tests/azure`, `rvs` (reference values) | ||
| - Most subjects should start with a verb in infinitive form, e.g. `Add reference value removal test` | ||
| - Put separate changes in separate commits, but bisects should stay intact | ||
| - Linting should pass, so a new definition must be used in the same commit. | ||
| - When a change requires a change to a test, the changes should be in the same commit. On the contrary, a larger new test can be in a separate commit for easier review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.