Write, run, review, and test scripts and code. Uses Bun as the execution runtime. Applies to automation scripts, data transformation, API integration, and technical validation tasks.
Provides code writing, execution, and review capabilities using Bun as the runtime.
Write a TypeScript or JavaScript script to accomplish a task.
Runtime: Bun (prefer Bun built-ins over npm packages) Style: TypeScript with strict types at module boundaries
// Always start with clear intent comment
// Script: <what this does>
// Input: <what it expects>
// Output: <what it produces>
const result = await fetch(url).then(r => r.json());
console.log(JSON.stringify(result, null, 2));
Execute a script or shell command via Bash.
RUN: bun run .system/scripts/<name>.ts
RUN: bun test .system/tests/*.test.ts
Capture output: Always capture stdout/stderr for analysis.
Analyze existing code for issues:
Modify existing code based on review findings or new requirements. Always:
Write or run tests to validate behavior.
Framework: Bun's built-in test runner
Location: .system/tests/*.test.ts
Command: bun test .system/tests/*.test.ts
import { test, expect } from "bun:test";
test("description of behavior", () => {
expect(actual).toBe(expected);
});
const over let; no varasync/await over Promise chains?.) and nullish coalescing (??)throw new Error("X failed: " + detail).data/ and .system/package.json// TODO comments in production code — finish the task or raise it explicitly