Engineering

Real code. Plain English.

I design, build and test software end to end: Android and Windows apps, web front ends, back-end services and AI automations. Below are short excerpts from my own projects, each with what it means for a non-programmer.

1 · The AI asks before it acts

My AI Employee framework runs every tool through one gate. Anything that changes something (an email, a payment, a database write) stops and waits for a person. If a tool is not clearly labelled read-only, it is treated as risky. This is the heart of the Python code, trimmed for reading.

def execute(self, tool, name, args):
    risk = tool.risk_for(args)
    needs_approval = risk is not Risk.READ_ONLY      # unclassified counts as state-changing
    if needs_approval:
        if len(json.dumps(args, default=str)) > MAX_REVIEWABLE_CHARS:
            return Outcome(False, error="arguments too large for a human to review; NOT executed")
        if self.store.action_done(goal_id, name, _digest(args)):
            return Outcome(False, error="already carried out for this goal; skipped")
        approved = self.approver.approve(name, args) is True   # only a real True counts
        self._audit("approval", {"tool": name, "args": redact(args), "approved": approved})
        if not approved:
            return Outcome(False, error="denied by human; action was NOT executed")
    return Outcome(True, result=tool.handler(args))

Excerpt from ai-employee/guardrails.py, trimmed. In plain English: no approval, no action, and the same action is never done twice.

2 · Requests that cannot be replayed

My relay (a Cloudflare Worker written in TypeScript) only accepts requests signed by a known device. Each request carries a random one-time code, a timestamp and its own route, all signed with an Ed25519 key, so a copied request is useless. The relay's automated tests cover this, and the suite has hundreds of cases.

The same pattern shows up on the Android side, in Kotlin. The phone builds the signed payload and refuses to send values the server would reject:

fun controlsPatchPayload(nowS: Long, nonce: String, voiceEnabled: Boolean? = null,
                         callDailyCap: Int? = null): Map<String, Any?> =
    linkedMapOf("path" to CONTROLS_PATH, "ts" to nowS, "nonce" to nonce).apply {
        if (voiceEnabled != null) put("voice_enabled", voiceEnabled)
        // values the server would refuse are dropped on the phone, so a typo cannot send a bad request
        if (callDailyCap != null && validCallCap(callDailyCap)) put("call_daily_cap", callDailyCap)
    }

Excerpt from the Fort Knox Android app, trimmed.

3 · How I work

  • Test first, then claim. If a check could not run, I say so. I never call a skipped test "passed".
  • Accessible by default. Every control has a label; an automated sweep fails the build if one is missing.
  • No secrets in code. Keys come from the environment or a vault, never from the repository.
  • Small, reviewable changes with a plain write-up of what changed and what is still open.

Hire me for a project

Contract work, a prototype, a code review or a full build: request a quote, or email [email protected].