Skip to content

Commit e44afda

Browse files
committed
docs(agents): Prefer reusing existing utils before adding new ones
1 parent fa0e44f commit e44afda

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Uses **Git Flow** (see `docs/gitflow.md`).
130130
## Coding Standards
131131

132132
- Follow existing conventions — check neighboring files
133+
- Reach for existing utils before writing a new one. Most shared helpers live in `@sentry/core` (`packages/core/src/utils/`), with browser helpers in `packages/browser-utils/`. Search first (LSP `workspaceSymbol` or grep) for common needs (type guards in `is.ts`, object/array helpers, `normalize`, `dsn`, `merge`, string/url helpers). Reuse or extend the existing util rather than adding a near-duplicate; only introduce a new util when nothing fits.
133134
- Only use libraries already in the codebase
134135
- Never expose secrets or keys
135136
- When modifying files, cover all occurrences (including `src/` and `test/`)

0 commit comments

Comments
 (0)