-
Notifications
You must be signed in to change notification settings - Fork 0
YPE-1006: Update AGENTS.md & CLAUDE.md files so that AI agents can better work with this repo #90
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
base: main
Are you sure you want to change the base?
Conversation
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Greptile SummaryThis PR restructures AI agent documentation to improve how AI coding assistants interact with the repository.
The documentation accurately describes the monorepo structure, build tools, and development workflow. Minor count discrepancies exist in test file and component counts. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant AI as AI Agent
participant Root as AGENTS.md (root)
participant Pkg as Package AGENTS.md
participant Guide as review-guidelines.md
participant Greptile as greptile.json
Dev->>AI: Request code assistance
AI->>Root: Read monorepo overview
Root-->>AI: Structure, patterns, commands, anti-patterns
AI->>Pkg: Read package-specific docs
Pkg-->>AI: Package structure, API, conventions
Dev->>AI: Request code review
AI->>Greptile: Load review configuration
Greptile-->>AI: Comment types, rules, file references
AI->>Guide: Load review checklist
Guide-->>AI: Security, performance, accessibility checks
AI-->>Dev: Provide targeted review feedback
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 3 comments
Updated the wording to say "many" versus having very specific numbers that would have to be updated on every PR. This simplifies it so that AI gets the information it needs and we don't have to update this.
|
Hey @bmanquen , this PR is ready for review. I'll create a ticket in JIRA so that this does get tracked. This is very important for us as we create and if we use AI tools to create on this repo, this makes things easier. And I hope that it helps your development workflow as well |
|
@greptileai, I've made some changes. Let me know if this is good to you. Also, I want to hear what you think about the greptile.json file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at your changes, I think this is a significant improvement for AI agents working with this repo. Here's my assessment:
What Works Really Well
AGENTS.md transformation: The move from verbose documentation to concise, actionable reference is excellent. The new format with:
- Clear structure overview
- Key patterns and anti-patterns
- Critical gotchas section
- Command reference
This is much more useful for AI agents than the previous wall of text.
Separation of concerns: Moving the detailed review guidelines to docs/review-guidelines.md keeps the main AGENTS.md focused while preserving the comprehensive checklist.
Package-specific AGENTS.md files: These provide focused context for each package, which is perfect for when AI agents are working on specific parts of the monorepo.
The greptile.json File - This is Clever
I really like what you've done here. The greptile.json configuration is smart because it:
- Enforces architectural patterns - The dependency order rule (core → hooks → ui) is critical for this monorepo
- Captures React patterns - The forwardRef requirement is a good UI consistency rule
- Prevents common mistakes - The workspace protocol rule will save headaches
- References comprehensive guidelines - Pointing to
docs/review-guidelines.mdgives AI the full context when needed
The rules are specific and actionable, which is exactly what AI agents need.
Minor Suggestions
-
In the main
AGENTS.md, you might add a note about the minimum Node.js version requirement (20.0.0+) -
Consider adding a rule in
greptile.jsonabout the unified versioning pattern since that's such a critical aspect of this monorepo
Overall, this is a thoughtful approach that balances conciseness with completeness. AI agents should be much more effective with these changes. The greptile.json file in particular shows you're thinking strategically about how to guide AI behavior through tooling configuration.
| - `utility/` - Helper functions (useDebounce, extractTextFromHTML, extractVersesFromHTML) | ||
|
|
||
| ## PUBLIC API | ||
| - 20+ data fetching hooks for YouVersion API resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be good to give a few examples on this line? so they can be found or guessed based on the naming convention it would see
| @@ -0,0 +1,36 @@ | |||
| ## OVERVIEW | |||
| Foundation package providing pure TypeScript API clients for YouVersion services with zero React dependencies. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be helpful to mention here the other two packages and when they should be used instead of this? Cross-linking, basically, so agents which guessed about one of them would know if they should be using a different one.
| # @youversion/platform-react-hooks | ||
|
|
||
| ## OVERVIEW | ||
| React integration layer providing 20+ data fetching hooks and 3 core providers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto the cross-linking idea
| # AGENTS.md | ||
|
|
||
| ## OVERVIEW | ||
| Complete UI layer with many Bible components: BibleTextView, VerseOfTheDay, BibleReader, BibleChapterPicker, BibleVersionPicker, YouVersionAuthButton, BibleWidgetView, BibleAppLogoLockup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto the cross-linking idea
| - Radix UI primitives for accessibility | ||
| - Tailwind CSS via @tailwindcss/cli 4.1.15 | ||
| - tsup for bundling, tsc for type declarations | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be good to have very simple example code in this file? Same sample code as we have in the documentation, showing the basic usage patterns of the top components.
bmanquen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work just some comments that will hopefully help improve a couple areas.
| "rules": [ | ||
| { | ||
| "scope": ["src/**/*.ts", "src/**/*.tsx", "packages/**/*.ts", "packages/**/*.tsx"], | ||
| "rule": "All components must use React.forwardRef and accept standard HTML attributes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if all components need to use forwardRef, I think only the components that users might need to interact with child components need refs.
| - TypeScript declarations generated separately (no bundling) | ||
| - Build: tsc only | ||
|
|
||
| ## TESTING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention testing with mocks and ensuring that the tests are utilizing MSW?
| - Tailwind CSS via @tailwindcss/cli 4.1.15 | ||
| - tsup for bundling, tsc for type declarations | ||
|
|
||
| ## STYLING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention that styles must be prefixed with yv:, they must be within a parent that has data-yv-sdk, and that theme is set with data-yv-theme={currentTheme}?
| - Built Tailwind CSS: `dist/tailwind.css` → injected as JS string at build time | ||
| - Light/dark mode via CSS variables (`[data-yv-sdk]`) | ||
|
|
||
| ## TESTING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing should be done within Storybook if possible utilizing the play function.
All Storybook tests with a play function need to have a tags: ['integration'],.
To run all Storybook integration tests run pnpm test:integration
Do these things need to be added?
|
|
||
| ## TESTING | ||
| - Vitest + jsdom for unit tests (`*.test.tsx`) | ||
| - Playwright for Storybook integration tests (`vitest run --project storybook`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can just run pnpm test:integration as long as they have the tags: ['integration'] on the story.
Because people, including myself, will be using AI agents to interact with and to create and work with this repository, I wanted to make sure that AI has the right guidance that it needs so that when it produces code, it produces code in line with the desires and the standards that we have set forth.
This is the second attempt to make the agent's files better so that AI can be a better assistant and helper as we create and do what God's called us to do
Important
This does not include a changeset because it doesn't change any features that an end-user interacts with.
One important piece of information is that the AGENTS.md file is compatible with a ton of AI agents such as people who use OpenCode or if they use Aider or if they use Kilo code or Cursor. However, AGENTS.md is not. They are all incompatible with Claude, which is why I do a symlink and create a CLAUDE.md file for each of the agent files that just points directly to the AGENTS.md file.
https://agents.md sets the tone for overarching idea and simple application of how AGENTS.md works.
Jira ticket: https://lifechurch.atlassian.net/browse/YPE-1006