Vreko

workspace.json β€” How Vreko Structures Codebase Intelligence

workspace.json is an open standard for machine-readable codebase intelligence. It defines a structured format for the metadata that AI agents need to understand a codebase before writing code β€” fragility scores, framework manifests, co-change patterns, and AI contribution history.

Vreko implements this standard as the delivery format for everything it learns about your project.

What Vreko Populates

The daemon writes agents.workspace.json to your project root after each session. The fields Vreko populates:

FieldTypeWhat It Captures
fragilityRecord<string, number>Per-file risk score (0–100). High scores predict breakage under AI edits.
fileIndexFileIndex[]Annotated file list with AI modification counts and last-touched timestamps.
frameworkManifestFrameworkManifestDetected frameworks, runtimes, and package managers in the workspace.
aiModificationCountnumberTotal AI-attributed changes across the project lifetime.
coChangePatternsCoChangePattern[]File pairs that historically change together β€” agents use this to avoid partial edits.

Local-first: The daemon writes agents.workspace.json entirely on your machine. No field values leave your device.

How the Daemon Writes the File

On every Vreko session, the local daemon (vrekod) recalculates intelligence state and writes a fresh agents.workspace.json. The cycle:

  1. Observe β€” daemon watches file saves and detects AI tool activity
  2. Score β€” updates fragility scores and co-change patterns based on the session
  3. Write β€” atomically writes agents.workspace.json with the current state

The write completes in under 200ms. Your agent sees the updated file on the next tool call.

How AI Agents Consume It

AI agents that support the workspace.json standard read agents.workspace.json at session start, before writing any code. This gives them:

  • Which files to treat as fragile (high fragility score β†’ be conservative)
  • Which files tend to break together (co-change patterns β†’ edit all of them or none)
  • What frameworks are present (frameworkManifest β†’ use correct APIs)
  • How much of the codebase has AI-touched code (aiModificationCount β†’ calibrate review depth)

Vreko also delivers this intelligence through rules files (.cursor/rules, CLAUDE.md) and MCP tools for agents that don’t yet read agents.workspace.json directly.

Full Specification

The complete field definitions, JSON schema, and versioning policy are maintained at workspacejson.dev/spec.

To validate your agents.workspace.json against the spec or compare it against other projects, use the agents-audit reference CLI.

Next Steps

  • How It Works β€” how Vreko builds this intelligence over time
  • CLI Reference β€” vr commands for generating and inspecting agents.workspace.json
  • Integrations β€” MCP tools that expose workspace.json fields to your AI agent