Most engineering teams adopt coding agents the same way. Someone drops a multi-hundred-line rules file into the root of a repository, pastes a feature request into a chat window, and hopes the model remembers every architectural boundary, testing standard, and deployment constraint while generating code. On a greenfield prototype or a single isolated utility function, that workflow feels fast. On a production codebase with real operational standards, it breaks down within days.
Without explicit engineering boundaries, coding agents fail in three predictable ways:
- They jump straight to implementation. Given an ambiguous prompt, an agent will invent silent assumptions, create files across the wrong layers, and build something plausible that misses the real requirement.
-
They drown in fat context. As teams append every past mistake to
AGENTS.mdor.cursorrules, always-on instructions consume tens of thousands of tokens before the agent reads a single line of application code, degrading attention and causing the model to ignore the exact rule it needed. - They suffer from session amnesia. Lessons learned during a painful debugging session disappear the moment you close the chat window. By Tuesday morning, a fresh session repeats the exact regression you fixed on Monday afternoon.
No high-performing engineering organisation ships production software by handing a new joiner a vague one-line ticket and disabling code review, automated tests, static analysis, and production monitoring. Yet most teams run coding agents that way today.
I built Waykit (waykit.dev) so coding agents ship under the same bar humans do: written specs, red-green TDD, cross-functional checks, and production signals that feed the next session.
From Shipping ArchLens to Extracting the Harness
Waykit did not start as an abstract framework. It grew out of building ArchLens, my local-first architecture intelligence platform.
When I began writing ArchLens, I wanted to test what it actually takes to build complex software alongside coding agents. ArchLens involves multi-language Tree-sitter AST parsing, bidirectional YAML-to-canvas state synchronisation, graph layout algorithms, and real-time multiplayer rooms. On a codebase like that, ad-hoc prompting collapses immediately. If an agent hallucinates a schema property or subtly alters coordinate transformations during a refactor, the canvas breaks.
Every time an agent tripped over an underspecified requirement, bloated a documentation page, or introduced a subtle regression, I turned that failure into a concrete guardrail inside the repository:
- Before writing code: A structured interrogation step to challenge edge cases and lock down a written specification before any source file was touched.
- During implementation: Strict red-green-refactor Test-Driven Development (TDD) cycles paired with automated static analysis, schema validation, and Vale prose linting in pre-commit hooks and CI.
- Across sessions: Modular skills and Standard Operating Procedures (SOPs) versioned in Git rather than buried in ephemeral chat history.
flowchart LR
subgraph AdHoc [Ad-Hoc Agent Workflow]
P1[Ambiguous Prompt] --> C1[Bloated Always-On Rules]
C1 --> G1[Immediate Code Generation]
G1 --> R1[Manual Cleanup & Regressions]
R1 -.->|Lessons lost when chat closes| P1
end
subgraph Gated [Waykit Lifecycle]
P2[Grill & Spec] --> C2[On-Demand Ontology Node]
C2 --> G2[TDD Guard, XFN & Audit Gates]
G2 --> R2[Verified Release & Telemetry]
R2 -->|Updated skills, evals & hygiene PRs| P2
end
Once those guardrails were in place, rework dropped enough that the pattern was worth extracting. None of those mechanisms were specific to architecture visualisation; they were a general operating model for software delivery with coding agents. I extracted them into a dedicated repository called agent-lifecycle-kit, which evolved into Waykit.
How Waykit Stays Lean
The Waykit repository (mzworthington/waykit) favours a local CLI, plain-text specs, and strict context hygiene over heavy orchestration frameworks. Everything runs locally on macOS and Linux with Git and Node 22+, requiring no proprietary cloud platform or wrapper API key.
1. One-Command Bootstrap and the Thin Handshake
Getting a repository onto Waykit takes two commands (getting started):
curl -fsSL https://raw.githubusercontent.com/mzworthington/waykit/main/install.sh | sh
wk init . --mcp default --hook
The installer links ~/.agents, puts the wk CLI on ~/.local/bin, and installs dynamic shell completion stubs (wk completion install) for zsh and bash that query wk __complete at tab-time so new subcommands appear automatically after upgrades.
Running wk init inside a target repository avoids dumping hundreds of lines of boilerplate into the project. Instead, it writes a thin handshake:
-
Minimal host pointers: Generates a concise
AGENTS.mdalongside native rule pointers for Cursor, Claude Code, GitHub Copilot, and Antigravity (defined declaratively inmodels/hosts/*.yaml) so every editor or CLI agent enters the exact same lifecycle. -
A lean default MCP profile: Configures a minimal Model Context Protocol baseline centred on
kit-knowledgerather than loading twenty third-party MCP servers into every chat session. -
POSIX Git hooks: Installs
pre-commitandcommit-msghooks (wk commit-msg) that reject non-conventional commit subjects, enforce linear ticket suffixes where applicable, and run local hygiene checks before code ever reaches a pull request.
2. A Live-Derived Knowledge Graph Instead of Fat Context
The central architectural decision in Waykit, documented in ADR 0005, is replacing static rule dumps with a live-derived ontology index.
Rather than maintaining a separate documentation catalogue that drifts from reality, Waykit parses its own tree of skills, subagent stubs, SOPs, Architecture Decision Records (ADRs), MCP server definitions, philosophy docs, and evaluation suites into a typed graph. Today, that graph spans 221 entities and 387 relations, rendered interactively on the Waykit map.
That same index backs the kit-knowledge MCP server. When an agent starts a task, it does not load the entire kit into its prompt. It queries kit-knowledge to fetch only the exact skill, SOP, or philosophy node required for the job in front of it.
To prevent repositories from drifting back into fat context files over time, Waykit enforces explicit context budgets through the CLI:
-
wk checkandwk doctorverify structural integrity, check for dangling links across skills and SOPs, and ensure owned repositories include required community and contribution templates. -
wk align .(and a reusable GitHub Actionsalign-consumerworkflow) validates that a consuming repository'sAGENTS.md, host pointers, MCP configuration, and role skill line counts stay within budget, failing pull requests if someone pastes an unvetted wall of rules back into the repo.
3. Modular Packs and Scoped MCP Profiles
Out of the box, wk init installs the core engineering profile: debugging, specification, TDD, cross-functional quality, security/architecture audit, and release. Stack-specific guidance stays off until a repository needs it. Install a language or framework pack when you need it (for example TypeScript, React, or Pulumi); the full catalogue lives on the kit map.
MCP servers follow the same principle of least privilege. Instead of leaving production deployment or analytics tools permanently wired into an agent's tool list, Waykit provides scoped profiles (cloudflare-ops, posthog, signoz, sonarqube, linear, playwright, semgrep). You activate a profile for the task at hand and restore the clean baseline immediately afterward:
wk mcp cloudflare-ops --project
# ... run Worker or Pages deployment tasks ...
wk mcp restore --project
Four Concentric Rings
Most agent harnesses focus exclusively on the inner loop of generating code and running unit tests. Writing code, however, is only one fraction of software delivery. If an agent builds an unvalidated feature cleanly, or ships code that degrades production latency without feeding that signal back into the backlog, the team still loses.
Waykit models software delivery as four concentric rings (see the feature lifecycle): outer rings govern standards, memory, and telemetry; inner rings drive discovery and execution.
- Waykit: Versioned skills, SOPs, architectural principles, and release bars shared across the fleet.
- Signals: CI, RUM, Lighthouse, SonarQube, and PostHog feed structured Linear tickets instead of rotting in dashboards.
- Plan: Unproven ideas become explicit bets; technical contracts become testable specifications before implementation starts.
- Build: Specs become verified code through TDD guards, cross-functional checks, and readonly security and architecture-drift audits.
Jobs for Today
One of the quickest ways to kill adoption of an engineering process is forcing a heavyweight ceremony onto a five-minute bug fix. Waykit solves this through a routing guide called Jobs for today, which matches the workflow to the actual job in front of you:
-
Typo, bug, or failed CI job: Skips discovery and specs entirely, routing straight to
agent-debug(Hypothesis-Driven Debugging) plus a lightweight cross-functional check if UI, auth, or an SLO was touched. - Prompt, skill, or tool schema change: Routes into Evaluation-Driven Development (EDD) to prove routing accuracy before merge.
- New product capability: Engages the full six-stage Feature Lifecycle, orchestrated from the parent chat while delegating isolated execution steps to specialist host subagents.
The Six-Stage Feature Lifecycle
The full path is documented in the feature lifecycle guide. Host support for isolated roles versus skills-only mode is covered under hosts and subagents.
flowchart LR
G[1. Grill] --> P{Contract or Bet?}
P -->|Product Bet| PRD[PRD & Hypothesis]
P -->|Clear Contract| S[2. Spec & Gherkin]
PRD --> S
S --> T[3. TDD: Gear 1 & Gear 2]
T --> X[4. XFN Matrix]
X --> A[5. Readonly Audit]
A --> R[6. Release & Telemetry]
T --> Gate{Skill, Prompt or Tool Changed?}
Gate -->|Yes| EDD[EDD Eval Suite]
EDD -->|Pass| X
EDD -->|Regression| T
R -.->|Timebox elapsed| BetCheck[Confirm or Kill Flagged Bet]
1. Grill (agent-grilling)
Left unchecked, coding agents are overly eager to please. Give them a fuzzy idea and they will start scaffolding files immediately. Grill reverses that behaviour: the agent interviews you until the decision frontier is clear, surfacing edge cases, failure modes, data migrations, and whether the work is a deterministic contract or an unproven product bet.
2. Spec (subagent:agent-spec)
For product bets, agent-prd captures the problem, belief, leading indicator, timebox, kill criteria, and feature-flag rollout plan (SOPs/hypothesis-driven-development.md). agent-spec then translates the work into INVEST user stories and Gherkin acceptance scenarios covering flag-off, flag-on, and kill states.
3. TDD (subagent:agent-tdd + TDD Guard Hooks)
Implementation runs in two distinct gears inside an isolated subagent:
- Gear 1 (Domain): Pure business logic, domain invariants, and state transitions tested in isolation.
- Gear 2 (Adapters): Thin HTTP handlers, CLI parsers, database repositories, and UI bindings wired to the hexagonal core.
To prevent agents from writing implementation code first and backfilling tests afterward, Waykit ships TDD Guard hooks (wk tdd-guard install). In supported hosts like Cursor and Claude Code, the hook inspects recent test execution state and mechanically blocks writes to production files until a failing test run has been recorded.
4. XFN (subagent:agent-xfn)
Before a feature is considered complete, agent-xfn walks a cross-functional behavior catalog (SOPs/behavior-catalog-and-xfn.md) covering accessibility, observability instrumentation, API contract compatibility, error states, and flag-on surfaces, requiring each applicable row to turn green or carry an explicit skip rationale.
5. Readonly Audit (subagent:agent-security & subagent:agent-arch-drift)
Audit roles run as readonly host subagents so the reviewer cannot quietly mutate code to hide a finding. agent-security checks input validation, secret handling, and dependency surfaces, while agent-arch-drift verifies that new imports respect hexagonal boundaries before agent-pre-commit runs type checks, linters, and SAST scans.
6. Release and Closing the Bet Loop (agent-release & agent-prune)
agent-release prepares a conventional commit subject (with the Linear ticket ID), updates release notes, and records feature-flag rollback instructions. Once a flagged bet's timebox expires, agent-telemetry and agent-posthog evaluate the leading indicator in PostHog, either promoting the feature to default-on or running agent-prune to strip the dead flag and code slice cleanly.
(For hosts or environments that do not support subagent isolation, setting WK_SUBAGENTS=0 switches wk agents status cleanly into mode: skills-only, executing every role sequentially inside the parent session.)
Treating Prompts and Skills Like Code with EDD
Editing a Markdown skill or an MCP tool description is a behavioural code change.
When you refactor TypeScript logic, unit tests tell you immediately if you broke an invariant. When you reword a skill trigger, tighten an SOP, or change a parameter schema on an MCP tool, traditional unit tests remain green, even if you just caused the agent to choose the wrong workflow half the time or invent invalid tool arguments.
Waykit solves this with Evaluation-Driven Development (EDD) (wk eval), putting prompt and skill changes behind the same merge bar as application code:
wk eval run --suite evals/edd/demo.yaml --model scripted
wk eval ci --suite evals/edd/demo.yaml --threshold-routing 95 --out out/reports
wk eval report --format md --out out/reports
The evaluation runner tests three concrete dimensions:
- Routing accuracy: Given a realistic user prompt, such as debugging a failing CI build versus scaffolding a new endpoint, does the agent select the right skill or subagent without manual steering?
- Tool and argument fidelity: Does the agent call the intended MCP tool with valid schema parameters rather than guessing architecture or hallucinating flags?
- Constraint adherence: Under adversarial or ambiguous inputs, does the agent respect line budgets, security rules, and handover formats?
Because wk eval supports an offline --model scripted driver alongside live provider keys, deterministic routing suites run in seconds inside standard GitHub Actions workflows without burning API credits on every commit.
Closed-Loop Maintenance: Signals, Hygiene, and the Work Picker
Software quality rarely collapses overnight; it erodes through small papercuts: a SonarQube maintainability smell, a minor Lighthouse regression, a recurring low-volume runtime warning, or a high-churn hotspot file (SOPs/complexity-hotspots.md).
Waykit automates that maintenance loop through its Signals and Hygiene pipeline (quality loops):
flowchart LR
subgraph Sources [Automated Signal Intake]
CI[CI Failures]
RUM[RUM Regressions]
LH[Lighthouse Audits]
SQ[SonarQube Findings]
PH[PostHog Signals]
end
CI & RUM & LH & SQ & PH --> Linear[Typed Linear Tickets]
Linear --> Hygiene[Scheduled Hygiene Pass: Deduplicate & Enrich]
Hygiene --> Picker[Work Picker & Allowlist]
Picker --> Agent[Scoped Debug / Refactor SOP]
Agent --> PR[Verified Draft PR]
- Typed signal intake: Automated connectors file structured Linear tickets from CI failures, RUM errors, Lighthouse drops, SonarQube findings, and PostHog anomalies, attaching stack traces, metrics, and affected file paths.
- Hygiene pass: A scheduled hygiene sweep deduplicates noisy alerts, filters out known kit disagreements, and enriches valid tickets with repository context.
- Work picker to draft PR: Engineers, or scheduled background runs, use the work picker to claim allowlisted hygiene tickets, execute the matching debugging or dead-code SOP, pass all local TDD and audit gates, and open a clean draft pull request ready for human review.
From Git History to Roadmap: How Waykit Evolved
Tracing the commit history from the early agent-lifecycle-kit commits in July 2026 through the Waykit releases in autumn 2026 shows how each capability emerged from real friction across live repositories:
timeline
title Waykit Repository Evolution & Roadmap (2026 - 2027)
July - Aug 2026 : Extracted agent-lifecycle-kit from ArchLens
: Codified Hexagonal + DDD philosophy & TDD loops
: Added multi-host rule pointers & conventional commit hooks
Early Sept 2026 : Renamed project to Waykit across CLI, skills & docs
: Shipped one-line install.sh & wk init --mcp default --hook
: Added dynamic shell completions & wk mcp restore
Late Sept - Oct 2026 : Built 221-entity live ontology graph & kit-knowledge MCP
: Added wk align, fleet --owned --scan & skill line budgets
: Automated CI failure classification & Linear ticket loops
Roadmap (Next) : Graduate EDD evals from alpha to universal CI merge gates
: Expand production telemetry -> eval case generation
: Standardise OTel agent cost & token observability (SigNoz)
July through early September covered extraction from ArchLens (ADR 0001, multi-host templates, conventional commits) and the zero-friction bootstrap (install.sh, wk init, completions, MCP restore). The interesting friction arrived once Waykit was running across my active repositories, including ArchLens, RoMini, SteerCo, GPIO Build Monitor, React Cloudflare Template, Edge DNS, and my personal site:
-
Live ontology and
kit-knowledge(ADR 0005): Replaced static rule files with the 221-entity graph index and interactive browser map so agents fetch single nodes on demand. -
Fleet alignment and line budgets: Added
wk alignand GitHub Actions PR checks so every first-party repository stays aligned to the thin handshake withoutAGENTS.mdbloating. -
Automated failure classification: Taught
agent-debugto recognise specific CI failure signatures automatically rather than burning tokens rediscovering environment issues.
What Comes Next
Development is focused on three areas:
-
Graduating EDD from alpha to a universal merge bar: Expanding deterministic evaluation suites (
evals/edd/) across every core skill and SOP, and automatically converting production agent misses (SOPs/edd-production-telemetry.md) into regression test cases. - Deeper closed-loop quality automations: Tightening the feedback cycle between PostHog product metrics, SonarQube findings, and Linear work pickers so teams spend less time triaging routine maintenance and more time reviewing verified draft PRs.
-
First-class agent observability and cost governance: Standardising OpenTelemetry instrumentation across local and cloud agent runs (
SOPs/coding-agent-observability.mdwith SigNoz) so engineering leaders can track token consumption, routing accuracy, and cost per merged PR with the same precision as production microservices.
Structure Over Longer Prompts
Coding agents do not fail because models lack raw capability. They fail because we drop them into complex engineering environments without the scaffolding that makes human software teams reliable.
By keeping skills and SOPs versioned in Git, serving context through a live-derived knowledge graph instead of bloated prompt files, gating changes with TDD Guard and EDD, and wiring production telemetry back into the backlog, Waykit gives agents the same delivery structure teams already expect from humans.
Start with getting started, browse the live kit map, pick a job from Jobs for today, or read the feature lifecycle, EDD guide, quality loops, and SOP library. The CLI, skills, and evaluation suites live on GitHub at github.com/mzworthington/waykit.
Top comments (0)