NO-JIRA: claude: Improve AGENTS.md and add agents for storing project knowledge#2251
Conversation
Store what my Claude learned from the past sessions. The most beneficial are the details regarding tests, that is something that can get repetitive to tell the LLM.
|
@tchap: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
WalkthroughThis PR adds two new Claude agent configuration files for session and history learning, updates AGENTS.md with build/test timing and testing guidance, and adds a "Claude Code" section to README.md listing available agents. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
b62b929 to
07a639a
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
AGENTS.md (1)
136-136: Update fake client guidance to reflect actual repository patterns.Line 136 is overly specific and misleading. Codebase tests predominantly use
NewSimpleClientset()from various fake client packages (image, build, template, etc.), not onlyNewClientset(). Generalize the documentation to guide contributors toward the appropriate constructor for their client package while maintaining theActions()assertion guidance.Proposed update
-- **Fake clients:** use `fake.NewClientset()` with action recording to verify API call options +- **Fake clients:** use the fake client constructor provided by that client package (for example, `fake.NewSimpleClientset()` or `fake.NewClientset()`), and validate recorded `Actions()` to verify API call options🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` at line 136, Update the guidance about fake clients to avoid naming a single constructor: replace the specific reference to fake.NewClientset() with a general recommendation that contributors use the appropriate fake client constructor for the API group they’re testing (e.g., NewSimpleClientset() from the fake package for image, build, template clients) and keep the existing advice to use Actions() to assert recorded actions; ensure mentions include the concrete symbol examples NewSimpleClientset, fake.NewClientset, and Actions() so readers can locate relevant constructors in their client package.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/agents/learn-history.md:
- Line 4: The frontmatter tools list currently includes mutation tools ("Edit"
and "Write") which must be removed for an analysis-first, approval-gated flow;
update the frontmatter line containing "tools: Read, Grep, Glob, Bash, Edit,
Write" to remove "Edit" and "Write" so it reads only the read-only tools (e.g.,
"Read, Grep, Glob, Bash"), preserving the rest of the metadata and formatting
and ensuring any consumers expecting a tools list still parse it correctly.
- Line 23: The logic currently reads every project's MEMORY.md via a wildcard,
causing cross-project data bleed; change it to load only the current project's
memory file by replacing the wildcard read with a lookup that uses the current
project identifier (e.g., projectId or CURRENT_PROJECT) to construct the
MEMORY.md path for this project, validate that file exists before reading, and
skip or log a safe message if absent so no other projects' MEMORY.md are ever
read (search for the line referencing MEMORY.md and the wildcard and update that
behavior).
In @.claude/agents/learn-session.md:
- Line 4: The agent frontmatter currently includes mutation tools ("Edit",
"Write") in the tools list (tools: Read, Grep, Glob, Bash, Edit, Write) which
conflicts with the agent's proposal-only policy; remove "Edit" and "Write" from
that tools list so only read-only tools remain (e.g., leave Read, Grep, Glob,
Bash) to enforce least-privilege and prevent accidental writes.
- Line 27: The memory read currently targets
"~/.claude/projects/*/memory/MEMORY.md" which can pull in other projects'
memory; change the glob to read only the current project's memory (e.g., use the
current project path variable like projectPath, projectRoot or PROJECT_DIR) and
build the path as path.join(projectPath, 'memory', 'MEMORY.md') or equivalent;
update the logic that calls the glob/read so functions like readMemoryIndex or
loadProjectMemory reference the single-project path rather than the wildcard
pattern.
---
Nitpick comments:
In `@AGENTS.md`:
- Line 136: Update the guidance about fake clients to avoid naming a single
constructor: replace the specific reference to fake.NewClientset() with a
general recommendation that contributors use the appropriate fake client
constructor for the API group they’re testing (e.g., NewSimpleClientset() from
the fake package for image, build, template clients) and keep the existing
advice to use Actions() to assert recorded actions; ensure mentions include the
concrete symbol examples NewSimpleClientset, fake.NewClientset, and Actions() so
readers can locate relevant constructors in their client package.
🪄 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: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 914e1094-9017-4c85-810a-f2dacc850e2c
📒 Files selected for processing (4)
.claude/agents/learn-history.md.claude/agents/learn-session.mdAGENTS.mdREADME.md
These agents can be used to store knowledge learned during the last session or across all sessions in the repository files to gradulaly evolve and improve Claude.
07a639a to
d59339a
Compare
|
/retitle NO-JIRA: claude: Improve AGENTS.md and add agents for storing project knowledge |
|
Thank you |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ardaguclu, tchap The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified bypass |
|
@tchap: The DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
|
WTH is happening with tests... /retest |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
@tchap: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Store what my Claude learned from the past sessions.
The most beneficial are the details regarding tests,
that is something that can get repetitive to tell the LLM.