chore: track AGENTS.md and CLAUDE.md in git - #19
Conversation
Stop ignoring the harness adapters so the i-have-adhd teaching rule and session-start map travel with the repo. Co-authored-by: Cursor <cursoragent@cursor.com>
Reviewer's GuideStops ignoring AGENTS.md/CLAUDE.md and adds project-level agentic-stack instructions so harness behavior is tracked in git without affecting runtime code. Sequence diagram for recall and memory logging flow from AGENTS.mdsequenceDiagram
actor Developer
participant agentic_stack
participant recall_py as recall_py
participant memory_reflect_py as memory_reflect_py
Developer->>recall_py: python3 .agent/tools/recall.py "<task description>"
recall_py-->>Developer: Consulted lessons before acting
Developer->>agentic_stack: [perform non-trivial action]
opt significant_event
Developer->>memory_reflect_py: python3 .agent/tools/memory_reflect.py "topic" "event" "outcome" --importance N --note "rich note"
memory_reflect_py-->>Developer: memory entry logged
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughThe change adds project instructions for agent operation, response formatting, recall, memory maintenance, and safety. It also removes ignore rules so ChangesAgent instruction files
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- CLAUDE.md partially duplicates instruction content from AGENTS.md; consider consolidating this into a single source of truth (e.g., via explicit include or reference) to avoid future drift between the two files.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- CLAUDE.md partially duplicates instruction content from AGENTS.md; consider consolidating this into a single source of truth (e.g., via explicit include or reference) to avoid future drift between the two files.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Around line 106-107: Add blank lines immediately before and after the
importance table under the “Importance guide” section in AGENTS.md, then rerun
the check job to verify the MD058 markdownlint error is resolved.
- Around line 18-23: Resolve the ordering conflict in the session-start
instructions by making .agent/protocols/permissions.md the first file read, then
place the remaining files in the documented order. Update the mirrored
session-start rule to use the same ordering, preserving the requirement that
permissions.md is read before any tool call.
- Around line 3-10: Update the i-have-adhd guidance in AGENTS.md to define one
canonical skill source under .agent/, or explicitly document precedence and
fallback paths that always resolve to the intended version. Align the “load and
follow” instruction with the existing .agent/skills/_index.md reference so
agents cannot skip the skill or load an unintended installed copy.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d2b47159-39ae-4f40-8650-8cacfb73e0c5
📒 Files selected for processing (3)
.gitignoreAGENTS.mdCLAUDE.md
💤 Files with no reviewable changes (1)
- .gitignore
| This project uses the **agentic-stack** portable brain. All memory, skills, | ||
| and protocols live in `.agent/`. | ||
|
|
||
| ## Teaching / explaining — always use `i-have-adhd` | ||
|
|
||
| **Whenever you explain anything to the user, teach them how to do something, | ||
| walk through a plan, or tell them what to do next:** load and follow the | ||
| `i-have-adhd` skill first (`SKILL.md` from the installed plugin / skill dirs). |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
fd -H '(^_index\.md$|^SKILL\.md$)' .agent
rg -n 'i-have-adhd|installed plugin|\.agent/skills' AGENTS.md CLAUDE.mdRepository: OctavianTocan/agentree
Length of output: 254
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'Root tracked files (top-level candidates):\n'
git ls-files | sed -n '1,120p'
printf '\nAgent/config matching files:\n'
git ls-files | rg '(^|/)(AGENTS\.md|CLAUDE\.md|PREFERENCES\.md|REVIEW_QUEUE\.md|LESSONS\.md)|(^|\.)agent/|skills/' || true
printf '\nSearch skill-related text in tracked files:\n'
rg -n 'i-have-adhd|installed plugin|\.agent/skills|SKILL\.md|\.agent/' . || trueRepository: OctavianTocan/agentree
Length of output: 4513
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'AGENTS.md relevant sections:\n'
sed -n '1,80p' AGENTS.md | nl -ba
printf '\nCLAUDE.md relevant sections:\n'
sed -n '1,30p' CLAUDE.md | nl -ba
printf '\nFull AGENTS.md line count:\n'
wc -l AGENTS.mdRepository: OctavianTocan/agentree
Length of output: 229
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf 'AGENTS.md relevant sections:\n'
awk 'NR<=80{printf "%4d %s\n", NR, $0}' AGENTS.md
printf '\nCLAUDE.md relevant sections:\n'
awk 'NR<=35{printf "%4d %s\n", NR, $0}' CLAUDE.md
printf '\nskills-lock.json:\n'
cat skills-lock.json | sed -n '1,120p'Repository: OctavianTocan/agentree
Length of output: 4598
Define one canonical i-have-adhd source.
AGENTS.md says all skills live in .agent/, but line 10 tells the agent to load SKILL.md from installed plugin/skill directories, and lines 42-43 point to .agent/skills/_index.md. Standardize one source or document explicit precedence and path fallbacks so i-have-adhd cannot be skipped or loaded from an unintended version.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 3 - 10, Update the i-have-adhd guidance in AGENTS.md
to define one canonical skill source under .agent/, or explicitly document
precedence and fallback paths that always resolve to the intended version. Align
the “load and follow” instruction with the existing .agent/skills/_index.md
reference so agents cannot skip the skill or load an unintended installed copy.
| ## Session start — read in this order | ||
| 1. `.agent/AGENTS.md` — the map of the whole brain | ||
| 2. `.agent/memory/personal/PREFERENCES.md` — how the user works | ||
| 3. `.agent/memory/working/REVIEW_QUEUE.md` — pending lessons awaiting review | ||
| 4. `.agent/memory/semantic/LESSONS.md` — what we've already learned | ||
| 5. `.agent/protocols/permissions.md` — hard constraints, read before any tool call |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Fix the session-start ordering conflict.
Line 23 requires permissions.md before any tool call. Lines 19-22 require four other files first, and reading them is already a tool call. The agent cannot satisfy both rules. Make permissions.md the first file, or remove the “before any tool call” requirement, then update the mirrored session-start rule to match.
As per coding guidelines, the session-start file order is an explicit repository instruction, but permissions.md is also declared mandatory before any tool call.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 18 - 23, Resolve the ordering conflict in the
session-start instructions by making .agent/protocols/permissions.md the first
file read, then place the remaining files in the documented order. Update the
mirrored session-start rule to use the same ordering, preserving the requirement
that permissions.md is read before any tool call.
Source: Coding guidelines
| ### Importance guide | ||
| | Value | When | |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add blank lines around the importance table.
markdownlint-cli2 reports MD058 at Line 107. Add a blank line before and after the table. Rerun the check job after the edit.
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)
[warning] 107-107: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` around lines 106 - 107, Add blank lines immediately before and
after the importance table under the “Importance guide” section in AGENTS.md,
then rerun the check job to verify the MD058 markdownlint error is resolved.
Source: Linters/SAST tools
Summary
AGENTS.md/CLAUDE.mdso harness instructions stay in version controlTest plan
checkpasses on this PRMade with Cursor
Summary by Sourcery
Track agent instruction files in version control and add project-level guidance for using the agentic-stack memory and skills.
Documentation:
i-have-adhdteaching skill.Chores:
Summary by CodeRabbit