bk@bkunz.dev ~ $ whoami

~/bkunz.devzsh

$

$

$

$

Core competencies

  • AI systems architecture

    Agent orchestration with tool use over domain adapters, typed intent routing, grounding on native queries, hybrid retrieval (BM25 + embeddings), purpose-based routing with provider fallback, prompt caching, token metering and per-attempt cost.

  • Evaluation & guardrails

    Seeded paired baseline × candidate evals, McNemar test and 95% Wilson intervals, deterministic checks, rubric-based LLM-as-judge, infrastructure errors isolated from the pass rate; prompt-leak canary and shingle guard at the output edge.

  • Distributed systems

    Event-driven multi-tenant platforms with Outbox and at-least-once delivery, idempotency keys, optimistic locking, rate limiting, retries with jitter and concurrency control; p99 < 50 ms at 40k+ connections; correlated traces, metrics and logs.

  • Security

    Large-scale anti-cheat and anti-abuse (packet inspection, statistical anomaly detection), reverse engineering and low-level dynamic analysis (decompilers, firmware, DMA), sandboxing, web and API pentesting, LLM guardrail bypass analysis.

  • Technical leadership & DevX

    Architecture direction through ADRs, engineering standards and internal libraries, context engineering for coding agents (skills, subagents, hooks), parallel worker orchestration, CI/CD integrated with evals.

What I build

Most of what I build are engines: small, independent cores that each own one hard problem and run without the others. The first is durable execution. A workflow is a graph, and a deterministic interpreter walks it, so replaying the same history always produces the same decisions. State changes and outgoing messages are committed in one transaction through an inbox and an outbox, and every write is idempotent. The consequence is the property that matters: effects happen exactly once, even when the process dies halfway through a step and starts again.

Agent runtimes are built on the same idea. One conversation can be driven from many surfaces at once, so instead of keeping state per client I keep the conversation as an event log and derive every view from it as a projection. Anything an agent wants to do that needs a person goes through an approval state machine, spending is bounded by budgets, and every step lands in an audit ledger that can be verified offline, without trusting the service that wrote it.

An agent is only as safe as the tools it can reach, so tool access goes through a gateway: one MCP endpoint in front of MCP, REST and gRPC tool servers. Permissions are granted per agent and per function, risky calls wait for human approval, and credentials are envelope-encrypted. Tool definitions are pinned by hash, which closes a quieter hole: a tool server cannot change what a tool does, or what its description tells the model, after the agent was allowed to use it.

Sometimes the tool is a whole computer. For that, agents get persistent Linux desktops with home volumes and backups, so work survives between sessions the way it would for a person. Access is given through signed grants rather than shared passwords. Inside the guest, a gateway streams the screen and hands out control leases, so perception and input belong to one holder at a time and an agent and a human never fight over the same mouse.

Some work has to run where the data is, on customer hardware. There it is a single static binary that only dials out, enrols with a device key and runs tasks it has leased, so nothing on that network has to accept an inbound connection. What keeps all of these engines from collapsing into one monolith is a single plugin protocol: adapters run out of process over gRPC and must pass a conformance suite, so a provider plugs into every engine the same way and can be replaced without touching a core.

How it holds

The engines only stay independent if they follow the same rules, so the rules are where most of the design effort goes. Each core is written in Go or TypeScript as ports and adapters, and which adapter fills a port is chosen by configuration, not by code. Every operation is defined once and exposed over HTTP, gRPC, MCP and a CLI. A person, a service and an agent reach the same behaviour through the door that suits them, and none of them gets a private shortcut.

Because those doors are public, the contracts behind them are versioned and checked: operations and events carry JSON Schemas, and a change that breaks a consumer fails before it ships. Access is closed by default and opened on purpose. Tenancy is enforced in Postgres with row-level security, so isolation holds where the data lives; a query that forgets a filter in application code still cannot read another tenant's rows.

Failure is the normal case at a boundary, so every mutating one is built to be repeated. Messages leave through an outbox with at-least-once delivery, and receivers make that safe with idempotency keys. Concurrent writers are reconciled with optimistic locking, a version check inside the update itself, instead of locks held across a request. Retries back off with jitter so they do not arrive in waves, and rate limits and concurrency control keep one caller from starving the rest.

Testing follows the same logic: if behaviour depends on time, data and failure, the test has to control all three. Runs execute in controlled worlds with a fixed clock, a forked database and injected faults, so a race or a timeout is reproduced on demand rather than hoped for. Usage is metered on an append-only ledger with budgets, artifacts are versioned, and traces, metrics and logs are correlated through OpenTelemetry. Measure twice, optimize once.

AI, measured

I treat LLM features as systems with inputs, costs and failure modes, not as prompts. An agent orchestrates tool use over the same domain adapters the rest of the platform uses, so it acts through the operations a person would, under the same permissions. Requests are routed by purpose rather than by vendor: each purpose maps to a provider with a fallback, prompts are cached where the provider allows it, and every call is metered in tokens, with the cost recorded per attempt, retries included.

An answer is only useful when it is grounded. A request first goes through typed intent routing, so a question that has an exact answer is resolved with a native query against the system's own data instead of a guess from the model. What remains goes to hybrid retrieval, BM25 plus embeddings, because lexical matching catches identifiers and exact terms that vector similarity tends to blur, while embeddings cover the paraphrases that lexical matching misses.

None of this changes without an eval. A candidate prompt or model runs against the baseline on the same seeded cases, paired, and the difference is judged with a McNemar test, with a 95% Wilson interval on each pass rate. Deterministic checks run first; a rubric-based LLM-as-judge is used only where a fixed check cannot decide. Infrastructure errors are isolated from the pass rate, so a flaky provider is never counted as a worse model.

The output edge is guarded too, since a model can be talked into repeating what it was told to keep private. A canary planted in the prompt exposes a leak the moment it appears in a response, and a shingle guard catches long overlaps with the prompt even when the wording drifts. Both checks are deterministic and cheap, so they run on every response, not on a sample. The habit comes straight from security work: assume the input is adversarial and check at the boundary.

Security, low level

I came to security through anti-cheat and anti-abuse at large scale. The work lived inside the network pipeline: inspecting packets as they arrived and running statistical anomaly detection over millions of daily events. On that path a false positive punishes a legitimate user and a slow check adds latency for everyone, so every detector is a trade between precision and cost. That trade still decides where I place checks in any system I design.

Cheats are rarely visible from the network alone, and that pulled me down the stack into reverse engineering and low-level dynamic analysis: decompilers, firmware and DMA, where the code being read was often written to resist being read. Sandboxing is the other half of that work, running untrusted code where it can be observed without being trusted. It remains the most direct way I know to learn how a system actually behaves, as opposed to how its documentation says it behaves.

Today most of that goes into offensive testing of web applications and APIs, where broken authorization and injection are still the first things to look for. LLM features opened a new surface, so I also analyse guardrail bypasses: the inputs that make a model ignore its instructions or leak them. That analysis is why the prompt-leak canary and the shingle guard exist. Defences are easier to design once you have broken the thing they protect.

The certifications trace the same path: BSCP, MCP Security, API Penetration Testing, API Security for PCI Compliance, and API Security for Connected Cars and Fleets. I read them less as credentials than as a map of where I have spent time, from web exploitation to the protocol agents use to reach their tools. They also explain choices made elsewhere on this page: closed by default, credentials encrypted, tool definitions pinned, risky calls behind an approval.

Elsewhere

Code, history and short notes.