VibeLayer

A CLI and runtime built for coding agents

Give your coding agent a state architecture.

VibeLayer is agent infrastructure for TypeScript apps: a CLI-readable contract, a local-first runtime, and explicit rules for how generated code reads, writes, syncs, and recovers.

$npm install vibelayer vibelayer-cli
CLI-nativeagent discovery
Machine-readableproject contract
Local-firstruntime + queue
Backend-agnostictransport boundary

The missing infrastructure layer

Coding agents can write code. They still need a system to reason about.

README instructions decay. Component patterns drift. VibeLayer turns the critical state rules into a contract an agent can query before it changes your application.

Agent without infrastructure

Infer the architecture from scattered code

SearchGuessPatchRegress

The agent copies nearby patterns, adds another fetch path, and cannot reliably discover which fields must survive offline or win a conflict.

Agent with VibeLayer

Query the contract, then use the narrow path

InspectExplainMutateVerify

The agent sees entities, mutations, effects, conflict policies, and required reliability scenarios before generating a change.

The Agent interface

Infrastructure that makes your application legible to machines.

01vibelayer list entities

Discover

Give an agent a deterministic inventory of synchronized entities and named mutations.

02vibelayer explain todo

Understand

Expose field descriptions, conflict rules, and durable draft intent on demand.

03client.mutate(name, input)

Build

Guide generated code through a small runtime API with named business intent and one local source of truth.

04vibelayer inspect --module ...

Verify

Emit stable JSON that agents and CI can inspect without scraping prose or reverse-engineering components.

One contract, two consumers

Your application runs it. Your agent reads it.

Define synchronized state and business mutations once. The runtime enforces them in the app while the CLI exposes the same architecture to coding agents and CI.

  1. 1Define schema, durable fields, and conflict policies.
  2. 2Declare named mutations with descriptions and effects.
  3. 3Export a machine-readable AgentContract.
  4. 4Let the CLI and runtime share one source of truth.
sync/contract.tsTypeScript
import { createAgentContract } from 'vibelayer';
import { mutations } from './mutations';
import { schema } from './schema';

export const contract = createAgentContract(
  schema,
  mutations,
);

// coding agent
// $ npx vibelayer inspect \
//     --module ./sync/contract.ts

The runtime underneath

Agent-friendly does not stop at code generation.

VibeLayer gives the generated application durable behavior after the agent leaves: instant local writes, ordered replay, explicit conflict resolution, and a clean boundary to any backend.

01Local store

The only source of truth the UI needs to read.

02Mutation queue

Business intent survives reloads and network failure.

03Sync engine

Push, retry, acknowledge, and merge in a deterministic order.

04Your backend

Authentication and API mapping stay in your transport.

Build on an Agent-native foundation

Give your coding agent more than a codebase.