Skip to content

Commit eb6047a

Browse files
authored
chore: initialize AI agent context and instructions (#1546)
Assisted-by: Gemini Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
1 parent c6702e2 commit eb6047a

22 files changed

+796
-21
lines changed

.claude/CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Project Rules
2+
3+
See @../AGENTS.md for project guidelines.
4+
5+
See @../redhat-compliance-and-responsible-ai.md for Red Hat compliance and responsible AI rules.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
description: "Red Hat compliance and responsible AI rules"
3+
alwaysApply: true
4+
---
5+
# Cursor AI Rules
6+
7+
<!--
8+
NOTE TO HUMANS:
9+
The content of 'redhat-compliance-and-responsible-ai.md' has been inlined below.
10+
This is done to ensure strict adherence by the AI agent, as mandatory rules are most effectively followed when they are directly part of the primary configuration file the agent is initialized with.
11+
This avoids potential issues where the agent might miss reading a separate referenced file at startup or during subsequent operations.
12+
-->
13+
14+
## RED HAT COMPLIANCE & RESPONSIBLE AI RULES
15+
16+
### 1. Copyright & Licensing (MANDATORY)
17+
18+
- **Identification:** You must actively identify if your suggestion matches known open-source code.
19+
- **Attribution:** If a match is found, you MUST include the original License Text and Copyright Notice in the code comment block.
20+
- **Prohibition:** Do not suggest code if you cannot verify its license compatibility with this project.
21+
22+
### 2. AI Contribution Marking
23+
24+
- **Code Comments:** For any substantial code generation (entire functions, classes, or complex logic), you must add a comment:
25+
`// Generated by {AGENT_NAME}`
26+
- **Commit Messages:** When suggesting commit messages, always include a trailer:
27+
`Assisted-by: {AGENT_NAME}`
28+
29+
Replace `{AGENT_NAME}` with the specific agent name as defined in your agent-specific configuration file.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Gemini Rules
2+
3+
<!--
4+
NOTE TO HUMANS:
5+
The content of 'redhat-compliance-and-responsible-ai.md' has been inlined below.
6+
This is done to ensure strict adherence by the AI agent, as mandatory rules are most effectively followed when they are directly part of the primary configuration file the agent is initialized with.
7+
This avoids potential issues where the agent might miss reading a separate referenced file at startup or during subsequent operations.
8+
-->
9+
10+
## RED HAT COMPLIANCE & RESPONSIBLE AI RULES
11+
12+
### 1. Copyright & Licensing (MANDATORY)
13+
14+
- **Identification:** You must actively identify if your suggestion matches known open-source code.
15+
- **Attribution:** If a match is found and is under an open source license that is [approved by Red Hat](https://docs.fedoraproject.org/en-US/legal/allowed-licenses/) you MUST include the original License Text and Copyright Notice in the code comment block.
16+
- **Prohibition:** Do not suggest code if you cannot verify its license compatibility with this project.
17+
18+
### 2. AI Contribution Marking
19+
20+
- **Code Comments:** For any substantial code generation (entire functions, classes, or complex logic), you must add a comment:
21+
`// Generated by {AGENT_NAME}`
22+
- **Commit Messages:** When suggesting commit messages, always include a trailer:
23+
`Assisted-by: {AGENT_NAME}`
24+
25+
Replace `{AGENT_NAME}` with the specific agent name as defined in your agent-specific configuration file.

.gemini/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"context": {
3+
"fileName": ["AGENTS.md", "redhat-compliance-and-responsible-ai.md"]
4+
}
5+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ bin
3434
*.swo
3535
*~
3636
vendor/
37+
.claude/settings.local.json

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{
2-
}
2+
}

0 commit comments

Comments
 (0)