-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: update /init command to focus only on non-obvious discoveries #7400
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
Conversation
- Emphasize that only non-obvious information discovered by reading files should be included - Update all mode-specific examples to show truly non-obvious rules - Add CRITICAL section explaining what qualifies as non-obvious - Exclude standard patterns and framework defaults - Focus on gotchas, hidden requirements, and counterintuitive patterns
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.
Pull Request Overview
Updates the built-in /init slash command to generate more focused and valuable AGENTS.md documentation by emphasizing only non-obvious, project-specific information discovered through file analysis.
- Adds explicit criteria for what constitutes "non-obvious" information worth documenting
- Updates output structure to exclude obvious framework defaults and standard practices
- Transforms all mode-specific examples to focus on hidden gotchas and counterintuitive patterns
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Thank you for this valuable improvement! The focus on non-obvious, project-specific information will significantly enhance the quality of generated AGENTS.md files. I've reviewed the changes and have some suggestions to further improve clarity and consistency.
| 5. Document critical patterns | ||
| - Project-specific utilities | ||
| - Non-standard approaches | ||
| - Project-specific utilities (that you discovered by reading code) |
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 addition of the CRITICAL section! The clarity on what constitutes non-obvious information is excellent. However, I noticed the terminology switches between "Discovered by reading files" (line 28) and "discovered by reading code" (line 59). Should we standardize on one phrase for consistency?
| - Database queries must use the query builder in packages/evals/src/db/queries/ | ||
| - Always use safeWriteJson() from src/utils/ instead of JSON.stringify for file writes | ||
| - Test coverage required for all new features in src/ and webview-ui/ | ||
| # Project Coding Rules (Non-Obvious Only) |
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.
These examples are very helpful! Quick question: Are these actual requirements in the Roo-Code codebase (like safeWriteJson() being mandatory), or are they hypothetical examples? If hypothetical, should we add a note clarifying they're illustrative?
| - Focus on gotchas, hidden requirements, and counterintuitive patterns | ||
| - Include specific file paths when referencing custom utilities | ||
| - Be extremely concise - if it's obvious, don't include it | ||
| - Every line should prevent a potential mistake or confusion |
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.
The quality criteria is excellent, especially the test question. Consider adding guidance for edge cases - what should AI assistants do when unsure if something is "non-obvious"? Perhaps: "When in doubt, err on the side of inclusion if it could prevent errors"?
…iles - Check for existing AGENTS.md in root directory - Check for existing AGENTS.md in all .roo/rules-*/ directories - Read and improve existing files rather than replacing them - Update discovery phase to explicitly look for these files
…d files - Consolidate all AGENTS.md path checking into step 1 with CRITICAL emphasis - Add explicit instructions for deep dive improvement of existing files - Remove redundant mentions throughout the workflow - Emphasize iterating and enhancing existing files, not just appending - Add clear guidance on cleaning up outdated info and reorganizing - Make discovery phase the single source of truth for file checking
- Add explicit instructions to DELETE obvious information first - Emphasize that files should get SHORTER, not longer - Use stronger language: CRITICALLY EVALUATE, AGGRESSIVELY DELETE - Make clear that standard practices must be removed even if previously included - Add success metric: files should be more concise and valuable - Goal is to fix the tendency to just append instead of clean up
CRITICAL FIX: Paths were being interpreted as absolute, causing .roo to be created at system root - Clarify all paths are relative to PROJECT/WORKSPACE root - Add explicit warnings that .roo must be in project root, not system root - Update example to show proper project structure - Add IMPORTANT notes throughout emphasizing relative paths - Fix prevents accidental creation of /.roo at system level
- Replace 'mode-specific rule directories' with 'non-obvious' - Replace 'analysis_workflow' with 'discovered by reading files' - Tests now align with the new focus on non-obvious discoveries
Description
This PR updates the built-in
/initslash command to emphasize that it should only include non-obvious information discovered by reading files, making the generated AGENTS.md documentation more valuable and concise.Changes Made
1. Added CRITICAL Section
2. Updated Main File Output Structure
3. Transformed All Mode-Specific Examples
Code Mode now emphasizes:
safeWriteJson()requirement (prevents corruption)Debug Mode now emphasizes:
Ask Mode now emphasizes:
Architect Mode now emphasizes:
4. Updated Quality Criteria
Testing
Impact
This change will help AI assistants generate more valuable AGENTS.md files by focusing only on the information that truly matters - the non-obvious, project-specific knowledge that can't be guessed from standard practices.
Important
Refines
/initcommand to focus on non-obvious, project-specific information for AGENTS.md, excluding standard practices./initcommand inbuilt-in-commands.tsto focus on non-obvious, project-specific information for AGENTS.md.built-in-commands.spec.tsto check for non-obvious content in theinitcommand.initcommand content includes "non-obvious" and "discovered by reading files".This description was created by
for 8bcae24. You can customize this summary. It will automatically update as commits are pushed.