Davio Maryson

Sole Engineer (independent) · 2026 – Present

Collateral Lending Platform

A production gold-lending platform — gold pledged as collateral, re-pledged to a bank for financing, loans/payments/pledges/deposits tracked end-to-end — built and operated solo, including a self-built multi-agent AI development system that extends the codebase autonomously under human review.

Problem

A gold-lending business needed a working system of record for its core loop — customers pledge gold for a loan, the business re-pledges that gold to a bank for financing — with loans, payments, pledges, and deposits tracked accurately end-to-end, plus the infrastructure and operational discipline to run it in production as a single engineer.

Solution

Built and operate the full platform solo: product code, infrastructure, CI/CD, and — most recently — a self-built multi-agent AI development system layered on top that extends the codebase autonomously under human review, using Claude Code as an AI pair-programmer and autonomous engineering partner throughout.

Backend on NestJS/Prisma/PostgreSQL, frontend on React/MUI/Vite with i18next (English/Tamil), deployed to a single AWS EC2 instance via Terraform and Docker Compose — deliberately simple infrastructure matched to the current scale, not over-built. CI/CD runs on GitHub Actions with OIDC-federated AWS authentication (no stored long-lived credentials), split into automatic low-risk workflows (lint, test, build) and manual, human-triggered high-risk ones (deploy, migrate) — production deploys and database migrations are always a deliberate human action, by design.

The AI Engineering Platform

On top of the existing repo and CI/CD pipeline, designed and built a multi-agent autonomous development system: GitHub Issues as the single source of truth, GitHub Actions as the runtime, Claude Code as the execution engine.

Multi-agent architecture. A stateless Dispatcher orchestrates narrowly-scoped agents (Analyst, Developer, Documentation today; Reviewer and Review-Response designed for a later phase) — each invoked with only the minimal context it needs, never triggered directly by a raw GitHub event.

Two-layer coordination. Rich context (plans, code) flows through GitHub comments and commits, where a human can read it directly. Small structured signals (risk level, iteration counts) flow through a separate, lightweight state store — an orphan git branch used as a human-readable database, chosen deliberately over standing up new infrastructure for it.

Deterministic safety gates around LLM output. Agents never publish their own work. Claude Code implements and commits locally only; a separate, non-agent script inspects the actual diff (for example, against a list of sensitive paths) before deciding whether to push or open a pull request at all. A policy violation is blocked by code, not by asking the model nicely.

Least-privilege by construction. Every job's GitHub token permissions are scoped individually — down to zero permissions for jobs that authenticate via a separate token — rather than one broad grant reused everywhere.

Risk-gated autonomy. Issues classified as high-risk (touching infrastructure, auth, migrations, or financial calculations) pause for explicit human approval before any code is written at all.

Getting here took iteratively hardening against real failure modes surfaced only by live runs — OIDC token exchange requirements, GitHub App installation quirks, git-credential handling around third-party actions, and GraphQL type-strictness issues in the GitHub Projects (v2) API — each diagnosed from actual CI logs and fixed at the root cause rather than patched around.

Architecture

Architecture diagram — see GitHub repo

Business Impact

  • A complete, production-operated gold-lending system: pledge intake, bank re-pledge tracking, and the loan/payment/deposit lifecycle, run solo end-to-end including deployment and incident response
  • A CI/CD pipeline with zero long-lived AWS credentials (OIDC federation) and a hard split between automatic low-risk checks and human-triggered high-risk actions (deploys, migrations) by design
  • A self-built multi-agent AI development platform that extends the same codebase autonomously, with deterministic, code-enforced safety gates before any agent-authored change can reach a pull request

Technologies

NestJSPrismaPostgreSQLReactMUIViteAWSTerraformDockerGitHub ActionsClaude Code

Challenges

  • Diagnosing a real production incident (loan creation silently failing) with no existing logging in place, by adding CloudWatch instrumentation and tracing it to an unapplied Prisma migration
  • Catching a near-miss infrastructure incident before it happened: an unpinned "latest AMI" Terraform data source that would have silently destroyed and replaced the running instance and its data volume on the next plan
  • Preventing client-side tampering with business-critical identifiers (sequential loan numbers, payment dates) by making them server-authoritative rather than trusting client input
  • Designing safety boundaries for autonomous AI coding agents that hold even if the model itself misbehaves — enforced in code, not by prompting the model to behave

Lessons Learned

  • A recurring timezone bug in interest-date calculations was a good reminder that date/time handling is a financial-correctness problem, not a formatting detail
  • For autonomous coding agents, the safety boundary has to be a separate, non-agent piece of code checking the actual diff — an instruction inside the prompt is not a control, no matter how clearly it's worded
  • Splitting CI/CD into automatic low-risk workflows and manual high-risk ones (deploy, migrate) removed an entire category of "the pipeline did something scary by itself" risk, for very little added process overhead