changes to streams code, check whether the change requires updates to
any of these documentation files:
- **`README.md`** — if the change alters stream classification (e.g. new stream type),
state machine behavior
bindings: see `src/rust/jsg/` and `src/rust/jsg-macros/`; full macro reference in `src/rust/AGENTS.md`; GC tracing (`Traced` + `GarbageCollected`) documented in `src/rust/jsg-macros/README.md`
## INVARIANTS
These rules MUST be followed when writing or modifying JSG code
forward-compatibility is genuinely required (e.g., the API frequently adds new fields across releases). Document the reason in a JSDoc comment. Do not add index signatures by default.
- **Add JSDoc
child doc.
**Two-phase tool loading** (mode-agnostic `getActors()` vs mode-dependent
`getToolsForServerMode()`) is documented once in
[`../DEVELOPMENT.md`](../DEVELOPMENT.md) — read it before touching tool loading.
After any change
what was tried and why nothing else works. Do not implement it first.
## Reference Documentation
- [Span Attributes](https://develop.sentry.dev/sdk/telemetry/attributes.md)
- [Scopes (global, isolation, current)](https://develop.sentry.dev/sdk/telemetry/scopes.md)
## Skills
Task-specific
Size
Bundle size is critical. Be mindful of imports and tree-shaking.
- [Bundle size documentation](https://develop.sentry.dev/sdk/platform-specifics/javascript-sdks/bundle-size.md)
- [Browser tracing documentation](https://develop.sentry.dev/sdk/platform-specifics/javascript-sdks/browser-tracing.md)
## CDN Bundles
Use `/add-cdn-bundle` skill
shared_ptr` to avoid deciding ownership. When independent
shared owners are necessary, document why and break cycles with `std::weak_ptr`.
- **MUST** treat raw pointers and references as non-owning