Infer the architecture from scattered code
The agent copies nearby patterns, adds another fetch path, and cannot reliably discover which fields must survive offline or win a conflict.
A CLI and runtime built for coding agents
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-cliThe missing infrastructure layer
README instructions decay. Component patterns drift. VibeLayer turns the critical state rules into a contract an agent can query before it changes your application.
The agent copies nearby patterns, adds another fetch path, and cannot reliably discover which fields must survive offline or win a conflict.
The agent sees entities, mutations, effects, conflict policies, and required reliability scenarios before generating a change.
The Agent interface
vibelayer list entitiesGive an agent a deterministic inventory of synchronized entities and named mutations.
vibelayer explain todoExpose field descriptions, conflict rules, and durable draft intent on demand.
client.mutate(name, input)Guide generated code through a small runtime API with named business intent and one local source of truth.
vibelayer inspect --module ...Emit stable JSON that agents and CI can inspect without scraping prose or reverse-engineering components.
One contract, two consumers
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.
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.tsThe runtime underneath
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.
The only source of truth the UI needs to read.
Business intent survives reloads and network failure.
Push, retry, acknowledge, and merge in a deterministic order.
Authentication and API mapping stay in your transport.
Build on an Agent-native foundation