Skip to content

Commit 0cfd314

Browse files
feat: update /init command to focus only on non-obvious discoveries (#7400)
* feat: update /init command to focus only on non-obvious discoveries - 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 * fix: ensure /init command checks for and updates existing AGENTS.md files - 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 * refactor: clean up /init command to properly handle existing AGENTS.md 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 * fix: strengthen /init command to aggressively remove obvious information - 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 * fix: ensure .roo directory is created in project root, not system root 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 * test: update built-in-commands test to match new init command content - 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
1 parent 91f3dd9 commit 0cfd314

File tree

2 files changed

+187
-122
lines changed

2 files changed

+187
-122
lines changed

src/services/command/__tests__/built-in-commands.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ describe("Built-in Commands", () => {
8989
expect(content).toContain("Please analyze this codebase")
9090
expect(content).toContain("Build/lint/test commands")
9191
expect(content).toContain("Code style guidelines")
92-
expect(content).toContain("mode-specific rule directories")
93-
expect(content).toContain("analysis_workflow")
92+
expect(content).toContain("non-obvious")
93+
expect(content).toContain("discovered by reading files")
9494

9595
// Should mention important concepts
9696
expect(content).toContain("AGENTS.md")

0 commit comments

Comments
 (0)