Skip to content

About

Four TypeScript tasks built with AI coding agents: rate limiting, ESLint and Prettier, analytics API, pagination.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Coding Workflow Experiments: Four small TypeScript tasks built to test AI coding workflows

AI Coding Workflow Experiments

Four small TypeScript tasks built to test AI coding workflows

Four self-contained TypeScript projects, each the output of a coding task run with an AI coding agent: rate limiting, lint setup, an analytics endpoint and keyset pagination with ByteRover context rules.


Built by Studio1 Built with ByteRover

ByteRover docs  ·  ByteRover  ·  More examples  ·  studio1hq.com


Overview

This repo holds four small TypeScript projects, Execution1 to Execution4. Each is the result of a focused coding task run with an AI coding agent, kept side by side so you can compare how the work turns out. The repo does not include the prompts, so treat it as a record of outputs rather than a tutorial.

Execution4 is set up with ByteRover rules and an MCP config, so the agent can query and update a local context tree with the brv CLI while it works.

Features

  • Execution1, rate limiting: an in-memory rate limiter (src/lib/rateLimit.ts) and an orders API (src/api/orders.ts) that returns HTTP 429 and X-RateLimit-Remaining headers. Eight Jest tests cover normal flow, limit exceeded, window reset and per-IP tracking.
  • Execution2, lint and format setup: ESLint (@typescript-eslint) and Prettier configs around a small processOrder function, with Jest tests.
  • Execution3, analytics endpoint: an Express router that validates a batch of analytics events and reports per-event validation errors, plus a SQL schema and an initial migration for an analytics_events table.
  • Execution4, keyset pagination: a ReportsAPI with keyset pagination over 50 deterministic mock reports, filterable by status, with a verify_reports.ts script.
  • Agent context files: Execution4 includes AGENTS.md, Cursor and Augment rules, and a Cursor MCP config for the brv server.

Tech stack

Layer Tool
Language TypeScript
Testing Jest with ts-jest
API Express (Execution3)
Lint and format ESLint, Prettier (Execution2)
Agent context ByteRover CLI (brv) (Execution4)

Getting started

Prerequisites

  • Node.js 18 or later
  • npm
  • The ByteRover CLI (brv) only if you want to use the agent context in Execution4

Installation

Each folder is its own project with its own package.json.

git clone https://github.com/Studio1HQ/10X-your-coding-workflow.git
cd 10X-your-coding-workflow/Execution1
npm install

Run

Execution1 and the other Jest-based projects:

npm test

Execution1 also provides npm run test:watch, npm run test:coverage, npm run build and npm run dev.

Execution4 has no package.json scripts. Run the verification script with ts-node:

npx ts-node verify_reports.ts

How it works

Execution1/   Rate limiting for an orders API (rateLimit.ts, orders.ts, Jest tests)
Execution2/   ESLint and Prettier setup, processOrder function, Jest tests
Execution3/   Analytics events endpoint, SQL schema and migration, Jest tests
Execution4/   Keyset pagination for reports, ByteRover rules, AGENTS.md, todos.md

In Execution1, RateLimiter keeps a per-IP counter in a Map with a reset time, defaulting to 5 requests per 60 seconds, and cleans up expired entries on an interval. Execution4/todos.md records the agent's exploration steps: searching for TODO notes and looking for shared pagination utilities before writing pagination.ts and reports.ts.

Resources



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with ByteRover.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

About

Four TypeScript tasks built with AI coding agents: rate limiting, ESLint and Prettier, analytics API, pagination.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages