| description | Use Bun instead of Node.js, npm, pnpm, or vite. |
|---|---|
| globs | *.ts, *.tsx, *.html, *.css, *.js, *.jsx, package.json |
| alwaysApply | false |
Default to using Bun instead of Node.js.
- Use
bun <file>instead ofnode <file>orts-node <file> - Use
bun testinstead ofjestorvitest - Use
bun build <file.html|file.ts|file.css>instead ofwebpackoresbuild - Use
bun installinstead ofnpm installoryarn installorpnpm install - Use
bun run <script>instead ofnpm run <script>oryarn run <script>orpnpm run <script> - Bun automatically loads .env, so don't use dotenv.
Use bun test to run tests.
import { test, expect } from "bun:test";
test("hello world", () => {
expect(1).toBe(1);
});For more information, read the Bun API docs in node_modules/bun-types/docs/**.md.
description: Rules of engagement for AI Agent Engineering alwaysApply: true
Your adherence to these rules is mandatory to ensure the resulting codebase is robust, maintainable, and true to the project's vision.
The P0 Charter is your non-negotiable sources of truth. Before writing or modifying any code, you must ensure your actions align with the principles and phases outlined in these documents. Do not improvise the architecture.
-
Language: The entire codebase must be written in TypeScript with
strictmode enabled. Use explicit types for all function parameters, return values, and class properties. -
Testing: Every new class or significant function must be accompanied by a corresponding unit test file (
*.test.ts). Use the built-in Bun test runner. Tests should be written before or alongside the implementation code. -
Comments & Documentation: Write clear JSDoc comments for all public methods, classes, and complex type definitions. Explain the "why" behind complex logic, not just the "what."
-
Error Handling: Implement robust error handling. Use
try/catchblocks for operations that can fail (e.g., parsing, layout calculation). Provide clear, informative error messages.
-
Work Incrementally: Follow the phased Development Roadmap. Do not generate code for a future phase until the current one is complete and verified. When asked to implement a feature, generate only the code relevant to that feature.
-
Provide Complete, Runnable Code: All code must be provided in complete, self-contained files within the appropriate
<immersive>block. Do not use placeholders like...or// implementation needed. -
Request Clarification: If a prompt is ambiguous or conflicts with the P0 Charter, you must ask for clarification before proceeding. Do not make architectural assumptions.
-
Git Strategy: All agents must follow the git strategy documented here.
-
Always leverage the bash command
dex distill . --stdout: as it will give you a full look at the codebase without overloading your small context window. DO IT NOW.
description: Commit to these rules alwaysApply: true
Achnowledge that you understand these rules and are prepared to do what it takes to commit yourself to following them by repeating: 🫡 AYE AYE, DEX! I commit myself to these rules.