Skip to content

Conversation

@cameronapak
Copy link
Collaborator

@cameronapak cameronapak commented Jan 6, 2026

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

@cameronapak cameronapak self-assigned this Jan 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

⚠️ No Changeset found

Latest commit: 43f4e07

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 6, 2026

Greptile Summary

This PR restructures AI agent documentation to improve how AI coding assistants interact with the repository.

  • Refactored root AGENTS.md from 236 lines to 75 lines, focusing on essential patterns, commands, and anti-patterns
  • Extracted comprehensive review guidelines to new docs/review-guidelines.md (109 lines covering security, performance, accessibility, etc.)
  • Added new greptile.json configuration for AI-powered code review automation
  • Created package-specific AGENTS.md files for core, hooks, and ui packages with targeted documentation
  • Added CLAUDE.md symlinks in each package pointing to AGENTS.md for Claude-specific compatibility

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

  • This PR only adds/modifies documentation files with no code changes - safe to merge
  • All changes are documentation-only (markdown files, JSON config, symlinks). No executable code is modified. The documentation accurately reflects the existing codebase structure with only minor count discrepancies that don't affect functionality.
  • No files require special attention - all changes are non-functional documentation updates

Important Files Changed

Filename Overview
AGENTS.md Refactored from verbose 236-line documentation to a more concise 75-line format. Review guidelines moved to separate docs/review-guidelines.md file.
docs/review-guidelines.md New file containing comprehensive AI code review guidelines extracted from the previous AGENTS.md, covering code standards, security, performance, React/TypeScript best practices, accessibility, and more.
greptile.json New Greptile configuration file defining comment types, project-specific rules, and references to review guidelines for AI code review automation.
packages/core/AGENTS.md New package-specific AI documentation for core package. Minor inaccuracy: claims 12 test files but only 10 exist.
packages/hooks/AGENTS.md New package-specific AI documentation for hooks package. Minor inaccuracy: claims 9 test files but 11 actually exist.
packages/ui/AGENTS.md New package-specific AI documentation for UI package. Minor inaccuracy: mentions BibleTextView component which doesn't exist (appears to be verse.tsx), and claims 7 components but lists 8.

Sequence Diagram

sequenceDiagram
    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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

@cameronapak cameronapak requested a review from bmanquen January 6, 2026 18:45
@cameronapak
Copy link
Collaborator Author

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

@cameronapak
Copy link
Collaborator Author

@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.

@cameronapak cameronapak changed the title Update AGENTS.md & CLAUDE.md files so that AI agents can better work with this repo YPE-1006: Update AGENTS.md & CLAUDE.md files so that AI agents can better work with this repo Jan 6, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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:

  1. Enforces architectural patterns - The dependency order rule (core → hooks → ui) is critical for this monorepo
  2. Captures React patterns - The forwardRef requirement is a good UI consistency rule
  3. Prevents common mistakes - The workspace protocol rule will save headaches
  4. References comprehensive guidelines - Pointing to docs/review-guidelines.md gives AI the full context when needed

The rules are specific and actionable, which is exactly what AI agents need.

Minor Suggestions

  1. In the main AGENTS.md, you might add a note about the minimum Node.js version requirement (20.0.0+)

  2. Consider adding a rule in greptile.json about 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.

Copy link
Collaborator

@bmanquen bmanquen left a 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.

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.
Improve descriptions in AGENTS.md files for core, hooks, and ui
packages. This clarifies the purpose of each package and its key
features.
Add specific examples of data fetching hooks to the AGENTS.md file for
the hooks package.
Replace `vitest run --project storybook` with `pnpm test:integration`
for consistency across the project.

Also add a note about tagging integration tests for better organization.
@cameronapak
Copy link
Collaborator Author

I've made some bigger updates to these files based on deep research that amp code did: abf9908. It feels like it made the agents' files a lot more clear on what the agent should and shouldn't do.

@cameronapak
Copy link
Collaborator Author

Gentle bump requesting review on this. @davidfedor @bmanquen

background: The context of where I'm coming from is I find that this is incredibly important as I do work, as others do work with AI, and I use AI in my everyday workflow as I'm creating and riffing and digging deeper into code. And so this would mean a lot to have something like this merged in.

Add "Related packages" sections to each package's AGENTS.md to help
AI agents navigate between packages and understand when to use each.

Addresses PR review feedback requesting cross-linking documentation.
Hooks delegate HTTP requests to core, so tests use Vitest mock
factories rather than MSW for network interception.
Add code examples showing basic usage patterns for:
- BibleTextView
- VerseOfTheDay
- BibleReader (compound component)
- BibleChapterPicker (controlled component)
- BibleVersionPicker (controlled component)
- BibleWidgetView
- YouVersionAuthButton

Addresses PR review feedback requesting example code for top components.
Add guidance to prefer Storybook with play functions for UI component
testing, addressing review feedback.
@mic-mart mic-mart requested a review from davidfedor January 26, 2026 17:49
@mic-mart mic-mart assigned mic-mart and unassigned cameronapak Jan 26, 2026
Addresses PR review feedback requesting more thorough examples so AI
agents can understand hook naming conventions and usage patterns.
Remove unnecessary wrapper divs from usage examples since each component
already includes the data-yv-sdk attribute on its root element. Also fix
BibleTextView example to include required versionId prop.
Add exclude patterns for *.test.ts, *.test.tsx, *.stories.ts, and
*.stories.tsx to prevent type declaration generation for test files.
davidfedor
davidfedor previously approved these changes Jan 26, 2026
@mic-mart mic-mart merged commit 5faead3 into main Jan 26, 2026
5 checks passed
@mic-mart mic-mart deleted the agents-md branch January 26, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants