Working with agents

A coding agent writes code against an API it has to remember. Most frameworks make that memory hard, so the agent guesses prop names, invents config keys and reaches for a plugin. Velz removes the guessing.

1. The manifest is the contract

Every component, prop, token and convention ships as JSON. The agent reads it instead of recalling it.

terminal
velz info | jq '.components[] | { name, props }'

The same manifest is available over MCP, so Claude Code and OpenCode can fetch the exact API of the version they have installed.

2. The MCP server is a tool, not a prompt

mcp.json
{
  "mcpServers": {
    "velz": {
      "command": "npx",
      "args": ["@veyra-labs/velz", "mcp"]
    }
  }
}

Five tools are exposed:

  • velz_manifest returns conventions, components, tokens and the design rules.
  • velz_component returns one component with its props and a working example.
  • velz_check runs the linter and returns findings with file, line and fix.
  • velz_tokens returns the token list or one token with override instructions.
  • velz_scaffold writes a page, API route, island or component that already follows the conventions.

3. The linter closes the loop

The agent can check its own work. velz check reports problems that are easy to miss and hard to argue about.

terminal
$ velz check --json
{
  "findings": [
    {
      "rule": "layout/spacing-multiple-of-8",
      "severity": "warning",
      "file": "src/pages/index.tsx",
      "line": 42,
      "message": "padding is 12px, which is not a multiple of 8.",
      "fix": "Use var(--velz-space-2) or the nearest 8px step."
    }
  ]
}

The rules it enforces:

  • Spacing is a multiple of 8, and margins never sit between siblings.
  • No linear easing, one curve only.
  • At most one or two glass surfaces per viewport.
  • Images have alt text, controls have accessible names.
  • Motion respects prefers-reduced-motion.
  • No em dashes in copy, no emoji as icons, no cool gradients.

4. The project tells the agent what to do

Every scaffolded project ships an AGENTS.md that names the file conventions, the imports and the rules. The agent reads it first, so it starts from the framework instead of from a blank file.