Hype StackHypeStack

Stack

AI Agent Boilerplate

A good AI template does not give an agent more code to guess through. It gives the agent a codebase it can read, change, and prove correct.

An ordinary starter is easy to judge at first: install it, run it, and see how much setup disappeared. An AI agent boilerplate needs another test once coding agents begin making real changes.

Can the agent discover how this repository works without inventing an architecture? Can it change one feature without opening unrelated parts of the application? Can it run the relevant checks while the edit is still in context?

That is where Hype Stack fits. It is a full-stack codebase with project rules, installed skills, vertical feature folders, and compiled lint and typecheck tools. The sections below examine each part before looking at a specific template built on top of them.

See AI agent templatesBrowse complete application starters built on Hype Stack, with the repository rules, feature structure, and verification tools discussed below.Explore the template library

Three tests for a good AI template

The useful definition is smaller than most feature lists. A template built for coding agents needs three things:

The repository tells an agent how this application handles errors, data access, routes, and feature work. Repeatable procedures are installed as versioned skills rather than copied from the latest prompt thread.

Code that changes together lives together. One task fits inside a feature boundary, so the agent can understand the job without loading unrelated layers into context.

Linting, formatting, and typechecking use compiled tools. Repository-specific lint rules report some architecture violations alongside ordinary code mistakes.

Together, these reduce three kinds of guesswork: project conventions, where a change belongs, and whether the change worked.

The three reinforce each other. Rules define the path. Vertical features keep that path short. Fast checks tell the agent when it stepped off.

Rules should describe this codebase, not software in general

Telling an agent to "write clean code" costs tokens and changes nothing. It already saw that sentence in its training data. A useful rule records a decision it could not infer safely.

Hype Stack ships those decisions in .cursor/rules. Backend errors bubble to one middleware. Page routes return a breadcrumb from their loaders. Frontend requests go through the typed SDK rather than raw fetch. The repository also intends feature modules to call functions in db/queries and db/mutations instead of importing the database client.

The strongest rules do not stop at prose:

  1. Errors belong to the central middleware

    An agent is told to throw typed errors instead of returning one-off JSON error responses from a route.

  2. Lint rejects the wrong shape

    rules/no-json-error-response.ts reports a route that returns c.json(body, 404), during the same check the agent already runs.

  3. The failure points to the accepted path

    The agent gets a local, mechanical correction instead of waiting for a reviewer to explain the architecture after the pull request is finished.

A paragraph can be ignored. A failing check becomes part of the agent's edit loop.

Skills handle a different job. A rule says what must remain true. A skill is a procedure for doing a particular kind of work, such as reviewing a pSEO page or creating an installable pack. Procedures can change upstream, so Hype Stack pins installed skills by repository and content hash in skills-lock.json. An update arrives as a diff you review, not as a new set of instructions silently entering the next agent session.

If a project decision matters on the hundredth agent edit, it cannot live only in the memory of whoever reviewed the first one.

Premade rules and skills are not magic context. Some will be wrong for your product. Their value is that the template starts with one coherent opinion, every exception is visible, and the mechanical parts can be checked.

The checks are not complete. The database restriction currently rejects imports from @backend/db/postgres, but a module can still reach the same client through @backend/context. Several organization invitation modules do exactly that. The rule records the intended boundary, but the lint pattern needs widening before it enforces that boundary.

A vertical codebase fits the task into context

The phrase "vertical codebase" comes from TkDodo's article of the same name. The core idea is direct: organize by what the application does, not only by what kind of file something is.

That distinction matters more when an agent is reading the repository. Imagine asking it to change how organization invitations are resent. In a layer-first codebase, the relevant route, service, email, schema, test, and shared types may sit in distant trees. The agent searches broadly, loads near matches, and has to infer which abstraction is current.

In Hype Stack, the operation has a neighborhood:

your-app
  • apps/backend/prisma/schema/
  • organization.prisma

    Models, relations, cascades

  • invitation.prisma

    The schema for this feature

  • apps/backend/src/features/organizations/
  • modules/resend-organization-invitation/
  • index.ts

    One operation, one folder

  • index.test.ts

    Its integration test, beside it

  • apps/frontend/src/features/organization/
  • switch-organization/switch-organization.tsx

    A neighboring organization operation

These are the paths in the current repository: an operation, its test, and the email it reuses inside one domain.

This does not mean every file sits in one folder. Prisma schemas stay split by feature so the agent can see relations and cascade behavior without a live production database. Shared database helpers and routes still have their own locations. Vertical architecture is not "put everything together." It is "make the path through one feature obvious."

That path is also easier for a human to review. A new operation arriving as one folder has a visible edge. The same change scattered across generic service files looks like six unrelated edits until the reviewer reconstructs the task.

The Vite/Oxc toolchain changes the feedback loop

An agent works in a loop: read, edit, check, repair. The duration of the check affects how often the last two steps happen.

Hype Stack uses Vite 8 with Rolldown and Oxc underneath, oxlint and oxfmt for linting and formatting, and the Go-native TypeScript compiler (tsgo) for typechecking. We ran both toolchains across the same repository:

One full check: lint, then typecheck

ESLint and tsc2m 24s

107s of type-aware ESLint on the typescript-eslint recommended rules, then 37s of tsc 6.0.3

oxlint and tsgo10s

1.5s of oxlint across 227 rules, then 9s of the Go compiler

A local snapshot across 793 TypeScript files in the two apps in this repository, measured on an Apple Silicon laptop. Both rows checked the same files. Treat this as a repository measurement, not a general benchmark of every ESLint or Oxc setup.

The difference changes working behavior. A check that finishes while the edit is still fresh is practical to run after small changes. A longer check is more likely to run after a batch, which means the agent receives feedback several edits after the mistake that caused it.

Fast tools alone do not make an AI template good. A fast lint run that only catches syntax is still weak. Here oxlint runs the ordinary lint rules and custom checks such as rules/no-json-error-response; tsgo runs afterward as a separate typecheck. Re-run both on your own machine and project before using these numbers for a tooling decision.

What Aether adds on top of a free chat kit

Aether is the concrete example: an AI product shell with React and Hono, auth, organizations, Stripe billing, an admin app, and a chat interface.

Its chat surface uses Vercel AI Elements, an Apache-2.0 licensed component library. You can install it for free. If all you need is a prompt input, model selector, reasoning panel, and tool-call cards, use that library and stop there.

The template is for the larger job:

Aether on Hype Stack
AI Elements alone
Chat interface
Installed and themed in the app
The source components
Accounts and organizations
Working code on your Postgres
Outside the library
Subscriptions
Stripe checkout, portal, and webhooks
Outside the library
Agent instructions
Project rules and pinned skills
Defined by your host project
Repository structure
Vertical feature folders; selected boundaries enforced in lint
Defined by your host project
Full feedback loop
oxlint, oxfmt, and tsgo configured
Depends on your host project
Your agent logic
Not included
Not included

That last row is the boundary that matters. Aether's chat runs on scripted data and carries a visible mockup banner. There is no hidden endpoint waiting for an API key. The template cannot know whether your product reviews contracts, runs support workflows, searches medical literature, or operates a browser. That behavior is your product.

The verdict

Judge an AI agent boilerplate with a test more demanding than pnpm dev.

Give a coding agent one realistic change. Watch how much of the repository it has to read. Check whether project rules name decisions that matter, whether those decisions fail mechanically, and whether the complete check is fast enough to run before the agent loses the thread.

Aether gives that test a credible starting point:

  • Premade, opinionated rules and versioned skills tell the agent how this repository works.
  • Vertical feature folders keep related operations and tests near each other.
  • oxlint, oxfmt, tsgo, and custom lint checks provide the verification tools.

It is not finished. The database import restriction has a hole, and the actual check duration needs measuring after installation. It also does not give you the agent your customers will use. It gives you the application around that agent and a repository with explicit guidance for coding agents. Whether that is the right division depends on how much of the customer-facing agent you already know how to build.

See it running

Templates are curated project starters built on this stack: a layout, feature packs, a custom theme, and bonus pages. The previews below are recordings of the real apps.

Two ways to install features

Same features underneath, different starting point. Either command resolves what the packs depend on, copies the source into your repository, and merges the Prisma schema.

Ready-made

Take a template

A landing page, a design system, a themed layout, and the features already wired into it. Rebrand it, put your product in the middle, ship.

$npx @hype-stack/cli template
Browse templates
From scratch

$ hype-stack compose

AuthPayments

Compose your own design

Your design and your choices, without rebuilding auth, billing, or notifications. Tick the packs you want and the CLI wires them into the open-source starter.

$npx @hype-stack/cli compose
Browse packs

Inside the stack

What each pack gives you

Source code, not a dependency. Every pack lands in your repository across the surfaces the feature touches.

Authentication, organizations, roles, sessions, and a full admin app, powered by Better Auth on your own Postgres.

  • Email & Google login
  • Organizations & members
  • Roles & permissions
  • Admin app & dashboard

Questions, answered

SaaS Starter (Better Auth), Glass Layout, and Billing (Stripe), shipped together as the Aether template: signup, organizations, subscriptions, an admin app, a WebGL landing page, and an agent chat UI built on ai-elements.

More stacks

Turn your ideas into
Real applications.

Start free and own every line you ship. When you want more, one All-Access license unlocks every premium pack and template for a year.

All premium packsEvery template12 months of updates
Get All-Access