name: packages description: Retend package development rules for starter projects. Use for app code, routing, async state, retend-web features, and code review.
Packages
Use this skill for any Retend application work in this project.
Prefer retrieval-led reasoning. Read the smallest relevant file instead of relying on memory.
Start Here
Read these first:
react-migration-patterns.mdjsx-reactivity-patterns.mdcommon-anti-patterns.md
Then load only the topic you need:
derived-cells-complete-guide.mdcontrol-flow-patterns.mdcomponent-structure-patterns.mdrouting-patterns.md_quick-reference.md
Non-Negotiable Rules
- Do not import from
reactorreact-dom. - Do not use React hooks or dependency arrays.
- Do not call
.get()in JSX. Pass Cells directly. - Do not use ternaries,
&&,||, or.map()in JSX. UseIf,For,Switch, andAwait. - Keep
Cell.derived()andCell.derivedAsync()pure. - Use array or object syntax for dynamic
classvalues. - Merge component classes with array syntax.
- Use
Linkandrouter.navigate()for internal navigation. - Handle pending and error states for async work.
Review Checklist
Use this when auditing or refactoring code:
- Reactivity: no
.get()in JSX, no manual snapshot rendering. - Async: use
derivedAsync,task, andAwaitinstead of manual.then()plus.set(). - Control flow: use
If,For, andSwitchinstead of inline operators. - Structure: PascalCase components, destructure props in the body, hoist handlers.
- Web rules: camelCase events, correct
classsyntax, safe class merging. - Side effects: no side effects in derived cells.
References
references/cells-api.mdreferences/control-flow.mdreferences/scopes.mdreferences/element-references.mdreferences/retend-utils.mdreferences/web-setup.mdreferences/attributes-and-events.mdreferences/event-modifiers.mdreferences/web-components.mdreferences/hydration.mdreferences/advanced-components.md
Rules
rules/_index.mdis the central rule index.- Use the individual files in
rules/only when you need a specific rule or fix.