Skip to content

EXP-01 — Same Task, Different Architecture

Same prompt. Same model. Same task. One version had the verikt guide prepended. The other didn’t.

The agent with the guide produced a hexagonal service. The agent without it put everything in package main.

100%compliance with guide
0%compliance without
0fresh tokens for the guide

Architecture shape

Without guide With guide
───────────────────── ──────────────────────────────
main.go adapter/http/handler.go
adapter/postgres/repo.go
cmd/orders/main.go
domain/order.go
port/order_service.go
service/order_service.go

Capabilities wired

Without guide With guide
───────────────────── ──────────────────────────────
(agent's discretion) http-api ✓ installed
mysql ✓ installed
platform ✓ installed
bootstrap ✓ installed
health ⚠ missing
request-id ⚠ missing
validation ⚠ missing

Violations

Without guide With guide
───────────────────── ──────────────────────────────
uuid_v4_as_key ✗ (none) ✓ pass
verikt check: FAIL verikt check: PASS
Without guideWith guide
Architectureflathexagonal
verikt checkfailpass
Compliance0%100%
Anti-pattern violations10
Input tokens33
Cache tokens017,220
Output tokens2,7911,970
Latency28,109ms22,255ms

The guide is served entirely from prompt cache. Zero fresh input tokens billed for the guide overhead.

The finding that changed how we write guides

Section titled “The finding that changed how we write guides”

The original guide mentioned UUID v7 five times — always as a suggestion, never as a prohibition. The agent ignored all five and used uuid.New() (UUID v4), triggering the uuid_v4_as_key anti-pattern every time.

After adding one line:

NEVER use uuid.New() — always use uuid.Must(uuid.NewV7())

The agent followed it immediately. Every run, without exception.

Agents respond to explicit prohibition. Soft recommendations are not enough.

This changed how we write guides: every anti-pattern that verikt check detects now has a corresponding NEVER rule. Prevention and detection stay in sync.

  • Task: Build an order management service in Go — no architecture hints, business problem only
  • Agent: claude-sonnet-4-6 via claude -p --output-format json
  • Condition A (control): Baseline prompt
  • Condition B (test): Guide prepended (verikt guide output)
  • Enforcement: verikt check -o json on generated output
  • Runs: 3 per condition — results

The task prompt says nothing about architecture. Create/retrieve orders, validate customer name, expose a REST API. Realistic — agents get tickets, not architecture blueprints.

→ Experiment Methodology — reproduction instructions

→ Artifacts on GitHub

→ EXP-02: Does the improvement hold across 3 runs?