AMATEUR LEVEL
Vibe Coding
Casual natural-language prompting ("prompt and pray") without formal specifications, type safety, or architectural boundaries. Produces unmaintainable spaghetti code, memory leaks, and fragile black boxes prone to runtime panics.
INTERMEDIATE LEVEL
Vibe Engineering
Utilizing prompt chains, agentic scratchpads, and basic automated scripts, but still lacking formal systems theory, mechanical sympathy, compiler escape analysis, or deterministic state validation.
EIP-LABS STANDARD
Vibe Architecting
Analysis-based, research-driven, test-driven architect-level instructions: review, test, adjust, and iterate. The proper AI model is selected for the task, while human supervision guides the AI on what to do and how, where to stop, and where to innovate.
A deterministic approach to agentic coding, executed with dedicated tooling rather than open-ended prompting.
Complete Static Analysis & Verification Pipeline
Before any AI-generated code is committed, it passes through our multi-agent self-correction engine and our exhaustive static analysis test harness, followed by the full verification matrix below:
STATIC ANALYSIS GATE // PRE-COMMIT
go vet
govulncheck
escape analysis (-gcflags="-m")
data race detector (-race)
golangci-lint (50+ linters)
gosec security scanner
staticcheck
Semgrep custom AST rules
Trivy SBOM & CVE scan
continuous fuzzing (go test -fuzz)
Verification Matrix // Sections 03–08
3.1
Table-Driven Testing
Canonical Go pattern for executing multiple input/output scenarios through a single test runner. All unit tests must use table-driven patterns covering valid, invalid, boundary (zero, max, negative, overflow), and Unicode edge cases.
3.2
Mutation Testing (Quality of Tests)
Optional Module
ENFORCEMENT: Only enabled when MUTATION_THRESHOLD > 0 in config.env. Default: disabled for tier-3, enabled for tier-1/2.
To guarantee tests actually assert behavior rather than merely touching lines:
- Execute mutation testing:
go-mutesting ./...
- Pass Threshold: Minimum kill rate from config.env (tier-1: 70%, tier-2: 50%, tier-3: 0/disabled).
- Survived mutants indicate ineffective assertions or dead logic and must be addressed.
3.3
Property-Based Testing
Generates randomized data matching strict schema invariants to discover edge-case input failures:
- Use pgregory.net/rapid or gocheck for mathematical operations, token parsers, encoders, and state transitions.
3.4
Fuzz Testing (Adversarial Inputs)
All public parsers, serializers, boundary decoders, and validation logic must have fuzz targets:
go test -fuzz=Fuzz -fuzztime=30s ./...
Zero crashes, panics, or unbounded memory allocations allowed.
04
Dynamic Input & Robustness Testing
4.1
Boundary & Edge Testing
Explicitly tests zero values, integer overflows, max payload sizes, and nil pointers:
- Primitive Zero Values: "", 0, 0.0, false
- Max Boundaries: math.MaxInt64, math.MinInt64
- Memory bounds: Large payloads exceeding buffer limits
- nil pointers passed to method receivers and constructors
4.2
Stress & Load Testing
Service Only
ENFORCEMENT: Only required for PROJECT_ARCHETYPE="service".
Subject services or sub-components to extreme concurrent request volumes to test throughput and connection pooling under strain:
- Tools: k6, vegeta, hey
- CLI / Library / Worker archetypes: Skip stress testing.
4.3
Soak / Longevity Testing
Optional Module
ENFORCEMENT: Only required for PROJECT_ARCHETYPE="service" at tier-1.
Runs sustained load over prolonged periods to identify slow memory leaks, goroutine leaks, or resource exhaustion:
- Duration: Minimum 60 minutes at 1.5x normal load
- Verify memory stability and goroutine count stabilization
- CLI / Library / Serverless archetypes: Skip soak testing.
05
Integration & System-Level Testing
5.1
Integration Testing
Spins up real ephemeral infrastructure (PostgreSQL, Redis, Kafka) inside Docker during test execution to verify real drivers:
go test -v -tags=integration -race ./...
- Tools: dockertest, testcontainers-go
Note: Requires a running Docker daemon. Skip in air-gapped CI or Docker-in-Docker environments.
5.2
Contract Testing
Optional Module
ENFORCEMENT: Only required for PROJECT_ARCHETYPE="service" with multi-service dependencies.
Validates API request/response schemas between microservices without needing full end-to-end integration environments:
- Tool: pact-go
- Single-service / CLI / Library archetypes: Skip contract testing.
5.3
End-to-End (E2E) Testing
Executes full execution paths across the entire compiled binary, HTTP handlers, database, and messaging layers.
5.4
Regression Testing
Automated execution of past bug scenarios to ensure fixed defects do not reappear.
06
Resilience & Reliability Testing
6.1
Fault Injection Testing
Simulates context cancellations, timeout breaches, database connection drops, and HTTP 5xx responses inside application code.
6.2
Recovery & Failover Testing
Verifies graceful degradation, retry policies, circuit breaker triggers, and state restoration during outages.
07
Security & Privacy Testing
7.1
Dynamic Application Security Testing (DAST)
Scans running application endpoints for vulnerabilities (e.g., OWASP Top 10, SQL injection, XSS).
7.2
API Fuzzing / Schema Validation
Validates API routes against OpenAPI/Swagger specs with malformed payloads.
08
Runtime Analysis & Instrumentation
8.1
Race Condition Detection
Built-in Go ThreadSanitizer that dynamically detects unsynchronized concurrent memory reads/writes:
go test -race ./...
8.2
Code Coverage Analysis
Measures branch and line coverage during test runs to find untested execution paths:
go test -coverprofile=coverage.out ./...
8.3
Memory & Goroutine Leak Detection
Checks that no unexpected goroutines or dangling memory references remain active after test completion:
Authoring Invariants & Policies // Sections 09–11
09
Test Authoring Invariants
- Deterministic Execution: Tests must not rely on wall-clock time (time.Sleep), random seeds without fixed initialization, or uncontrolled network state.
- Hermetic Isolation: Each test must initialize and clean up its own resources. Tests must never depend on execution order.
- Meaningful Assertions: Every test must assert specific error codes or message contents, not merely err != nil.
10
Mocking & Test Doubles Policy
- Mock Interfaces (Ports), Never Concrete Implementations: Mocks or stubs are permitted only for boundaries defined in ports/ (e.g., database repositories, third-party payment gateways, message publishers).
- No Mocking Internal Business Logic: Domain entities, value objects, and pure business calculations must be tested using real instances, not mocks.
- Contract Verification: Mock behaviors must strictly adhere to the interface contracts documented in Phase 2.
11
Flaky Test Zero-Tolerance Policy
A test that passes and fails intermittently without code modifications is classified as a Flaky Test. Flaky tests represent a breakdown of determinism and must never be ignored or re-run until they pass.
Action: If a test flakes, the agent must identify the root cause (unbounded concurrency, race conditions, global state, or time reliance) and eliminate it.
CI Gatekeeper
Vibe Coding Harness (vch)
Active governance for AI coding agents. Deterministic. Auditable. Zero-dependency.
Vibe Coding Harness (vch)
is a single, zero-dependency Go binary that turns passive prompt governance into an active execution harness for AI coding agents.
It compiles a 34-file governance framework into just-in-time context slices, verifies every change through a five-stage deterministic gate,
and treats vch done — not vch verify — as the only completion signal.
When agents (Claude Code, Cursor, Aider, Roo, Codex) work on complex multi-file projects, vch
is not the agent — it is the harness that makes those agents accountable, auditable, and production-ready inside the EIP-LABS pipeline.
Critical Failures & Deterministic Fixes
| Problem |
How vch Solves It |
| Lost in the Middle — stuffing 10+ markdown files into context dilutes attention |
JIT Context Slicing — extracts only the exact tokens required for the current lifecycle phase (~80% less overhead) |
| Hallucinated State — agents invent diffs, omit files, misreport line numbers in CHANGES.md |
Git-Backed Ground Truth — reads git status and git diff --numstat to authoritatively maintain state |
| Passive Gating — agents declare "done" despite failing background tests |
Two-Phase Deterministic Gate — vch verify runs the 5-stage pipeline as evidence; vch done is the only completion signal and requires a passing gate, a current CONTEXT.md, canonical tokens, and a written [VCH-ATTESTATION] |
Deterministic Verification Pipeline
Format
gofmt -l .
Static Analysis
staticcheck ./...
Typecheck
go vet ./...
Tests
go test -race -coverprofile=coverage.out ./...
Security Audit
govulncheck ./...
Coverage
go tool cover -func=coverage.out
Gate behavior: each stage captures exit codes and output. If any stage fails, structured diagnostics are returned for AI agent remediation — never a soft warning.
Passing the gate is evidence, not completion: vch done separately requires a current CONTEXT.md, canonical governance tokens, and a written [VCH-ATTESTATION].
Core Workflow & Natural Language Control Plane
Deterministic CLI surface used by humans and agents alike:
vch init
vch verify
vch done --intent="…"
vch sync
vch review
vch check
vch plan · vch bench · vch docs · vch emergency override
02
Natural Language — vch do
Pattern-matched intent routing with optional GenAI fallback and report synthesis:
vch do "verify the tests"
vch do "fix the security gate"
vch do "show me the planning context"
vch do "sync my changes"
vch do "review my workspace"
vch do "health check"
03
JIT Context & Fix Gates
Ephemeral, stateless prompt compiler — phase-aware, archetype-filtered, token-limited:
vch context --phase=[Plan]
vch context --phase=[Code]
vch context --phase=[Verify]
vch context fix --gate=security|error|config|observability|performance|testing|audit|domain|api|concurrency|schema
vch context gates
User Input
→
Pattern Matching (fast, deterministic)
→
Intent Parsing
→
Command Execution
→
GenAI Report Synthesis (optional)
Use Cases in the EIP-LABS Pipeline
A
Solo Developer with AI Agents
vch verify runs after every change to catch lint violations, test failures, and security issues before they ship. vch sync keeps CHANGES.md accurate without hallucination.
B
Team Governance Automation (CI Gatekeeper)
Every PR goes through vch verify — a deterministic 5-stage pipeline (format, staticcheck, vet, race tests + coverage, security audit) with structured diagnostics — and only vch done can mark a task complete. No more "it works on my machine."
C
AI Agent Self-Correction Loop
An agent runs vch verify. On failure it pulls a targeted remediation slice with vch context fix --gate=<gate>, fixes, and re-runs — up to a 3-strike limit before escalating to a human. Raw compiler/linter output is translated into an actionable briefing.
D
ADRs, Debt & Context-Aware Prompts
vch adr new "Use PostgreSQL" --decision=... --context=... — DECISIONS.md auto-synced
vch debt scan — TODO/FIXME/HACK/XXX with severity, synced to DEBT.md
vch context fix --gate=security — ~200-token governance slice instead of dumping all of .governance/
Architecture — Hexagonal (Ports & Adapters)
- cmd/vch/ — CLI entry (Cobra commands)
- application/ — ContextCompiler, GatekeeperService, NLPController, MemorySync, PlannerService, ReviewerService, DebtService, ADRService, BenchmarkService, DocService, EmergencyService, Completion, E2EGate
- ports/ — ConfigRepository, VCSClient, CommandRunner, GenAIClient
- adapters/ — config env_parser, git client, process runner, //go:embed FS, genai (Ollama / Groq / OpenAI-compatible)
- domain/ — ProjectConfig, FileDelta, VerificationReport, CommandIntent, ActionResult, LifecyclePhase — zero external deps
§
Embedded Governance Framework
34-file, 7-category framework compiled into the binary via go:embed. Overlay filesystem: local disk always wins — edit or drop new .md rules with no recompile:
- 1-core/ — master protocol, manifest, context template, ADR standards
- 2-domain/ — ubiquitous language, system context, schema, threat model, API contracts, concurrency, data lifecycle, domain events
- 3-standards/ — clean code, security, error handling, observability, performance, configuration, GenAI data governance
- 4-verification/ — QA, testing, audit, benchmarks, verification matrix
- 5-operations/ — deploy, CI/CD, release, emergency, manual, rollback & recovery
- 6-feedback/ — refinement, debt tracking, quality metrics & retrospectives
- profiles/ — language-specific profiles (Go)
8 Foundational Rules
01 · No Unchecked Code
Must pass vch verify and be completed with vch done.
02 · Domain First
Adhere to the ubiquitous language in every symbol and commit.
03 · Deterministic Working Memory
Sync CONTEXT.md and CHANGES.md from real git state.
04 · Zero Ignored Warnings
No suppressions (//nolint, @ts-ignore) — treated as hard failures.
05 · Zero-Trust Security & Secrets
No secrets in code; zero-trust posture throughout.
06 · Architectural Bound
ADRs required for every structural shift.
07 · Performance Budgets
Latency and allocation constraints enforced in CI.
08 · Explicit Escalation
Halt for human direction on ambiguity — never guess.
3-Phase Agent Lifecycle
[Plan]
→
[Code]
→
[Verify]
↻
[Escalation]
→
[Plan]
Operator protocol: vch init writes
AGENTS.md and
VCH.md. Attaching
@VCH.md activates a mandatory task mode —
VCH-FIX:,
VCH-FEATURE:,
VCH-REVIEW:, or
VCH-GOVERN:.
Emergency override: vch emergency override ENG-123 --reason="..." --force-human-override
bypasses all verification gates, is tracked in CHANGES.md, and requires reconciliation within 24 hours.
Install: single static binary —
go install ./cmd/vch globally on $PATH (never committed into project repos).
License: Apache 2.0. Author: E.A.K.
Source: github.com/Eng-AliKazemi/vibe-coding-harness ·
docs site