-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add the results of running /init #7399
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
+66
−24
Closed
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
962ced6
Add the results of running /init
mrubens 2581fcc
Remove existing .roo/rules/rules.md
mrubens 8db9d2f
refactor: clean up AGENTS.md files to only include non-obvious patterns
hannesrudolph 053e159
another attempt, but from scratch.
hannesrudolph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Architect Mode Rules | ||
|
|
||
| ## Non-Obvious Architecture Constraints | ||
|
|
||
| - Providers MUST be stateless - hidden caching layer assumes this | ||
| - Webview and extension communicate through specific IPC channel patterns only | ||
| - React hooks required because external state libraries break webview isolation | ||
| - Large JSON operations must use `safeWriteJson()` for streaming (prevents memory issues) | ||
| - TypeScript `noUncheckedIndexedAccess: true` - array/object access may return undefined | ||
| - Import paths in packages/ require `.js` extensions despite TypeScript source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Ask Mode Rules | ||
|
|
||
| ## Non-Obvious Documentation Context | ||
|
|
||
| - `src/` contains VSCode extension code, NOT generic source (counterintuitive naming) | ||
| - Two separate i18n systems: root `locales/` for extension, `webview-ui/src/i18n/` for UI | ||
| - Provider examples in `src/api/providers/` are canonical reference (docs may be outdated) | ||
| - Webview runs in VSCode context with restrictions (no localStorage, limited browser APIs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Code Mode Rules | ||
|
|
||
| ## Critical Non-Obvious Patterns | ||
|
|
||
| - **MANDATORY**: Use `safeWriteJson()` from `src/utils/safeWriteJson.ts` for ALL JSON writes (prevents corruption via atomic writes with locking) | ||
| - Tests MUST run from workspace directory: `cd src && npx vitest run` (NOT from root) | ||
| - VSCode CSS variables must be added to `webview-ui/src/index.css` before use | ||
| - State management via React hooks only (external state libraries break webview isolation) | ||
| - Providers MUST be stateless (hidden caching layer assumes this) | ||
| - Import paths in packages/ require `.js` extensions despite TypeScript source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Debug Mode Rules | ||
|
|
||
| ## Non-Obvious Debug Access | ||
|
|
||
| - Webview DevTools: Command Palette → "Developer: Open Webview Developer Tools" (NOT F12) | ||
| - Extension logs: VSCode Output panel → "Roo Code" channel | ||
| - Extension Host output channel shows different logs than Debug Console | ||
|
|
||
| ## Critical Debug Patterns | ||
|
|
||
| - IPC messages fail silently without try/catch in `packages/ipc/src/` | ||
| - Tests MUST run from workspace directory: `cd src && npx vitest run` | ||
| - Webview runs in restricted context (no localStorage, limited browser APIs) | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to agents when working with code in this repository. | ||
|
|
||
| ## Critical Non-Obvious Patterns | ||
|
|
||
| - **JSON Writes**: MUST use `safeWriteJson()` from `src/utils/safeWriteJson.ts` for ALL JSON writes (atomic writes with locking, handles streaming) | ||
| - **Test Execution**: Tests MUST run from workspace directory: `cd src && npx vitest run` or `cd webview-ui && npx vitest run` (NOT from root) | ||
| - **Import Extensions**: Use `.js` extensions in packages/ imports despite TypeScript source files | ||
| - **Bootstrap**: `pnpm install` auto-bootstraps via `scripts/bootstrap.mjs` if pnpm not found | ||
| - **Webview DevTools**: Access via Command Palette → "Developer: Open Webview Developer Tools" (not F12) | ||
|
||
| - **VSCode CSS Variables**: Must be added to `webview-ui/src/index.css` before use in components | ||
| - **React Hooks Required**: External state libraries break webview isolation - use React hooks only | ||
| - **noUncheckedIndexedAccess**: TypeScript strict mode with this enabled - array/object access may return undefined | ||
|
|
||
| ## Architecture Gotchas | ||
|
|
||
| - `src/` contains VSCode extension backend (not generic source) | ||
| - `webview-ui/` is React frontend in VSCode webview (restricted APIs, no localStorage) | ||
| - IPC messages between extension/webview must use typed interfaces from `packages/types` | ||
| - Provider implementations must be stateless (hidden caching layer assumes this) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure how relevant this is for the AI agent