← All work

BUILDZN / WORK

Support resolution agent

Resolve synthetic store tickets with guarded refund, address-change and reschedule tools.

TypeScriptNode.jsPostgreSQLDocker ComposeGitHub Actions
Conceptual illustration of guarded support tools, a parcel and conversation bubbles
Project illustration. All project data is synthetic.

Synthetic data. This is a portfolio implementation with recorded command line runs. No customer data, paid model calls or hosting deployment were used.

Tests and demos use a deterministic mock provider. A Claude adapter sits behind the same interface; its live quality remains unmeasured.

Problem

A helpful reply does not resolve a ticket when the store record still needs an action. Tool execution must check ownership, policy and limits, and recover safely when a response is lost.

Architecture

  1. 1. Propose an intent

    A mock or Claude provider proposes a typed action from untrusted ticket text. It cannot choose the authenticated principal or grant permission.

  2. 2. Enforce store guards

    The PostgreSQL-backed mock store checks the ticket owner, order state, return window, refund cap and exact action shape.

  3. 3. Commit once

    The store mutation, idempotency ledger and success audit share one transaction. A lost response can be retried without repeating the action.

  4. 4. Escalate and replay

    Ambiguity and denied or failed actions are audited and escalated. A replay harness compares ticket outcomes and store state with independent fixture labels.

Tradeoffs

  • Only one automatic refund is allowed per order. A follow-up partial refund goes to a person.
  • The store API is an in-process boundary with persistent idempotency, rather than a real retailer integration.

Test results

35 distinct test cases passed in at least one appropriate environment. Zero failures in the linked CI run.

Actual results from the linked GitHub Actions run
EnvironmentPassedSkipped
Native PostgreSQL350
Embedded PostgreSQL350

No test cases were skipped in either environment.

Synthetic replay: 160 tickets, 50 resolved (31.25%), 110 escalated (68.75%), and zero wrong-action, state or label mismatches.

Docker Compose built and ran the seeded demo from a fresh Actions checkout. These fixture measurements do not establish production accuracy, security certification or business outcomes.

Verified code: 2abd2161c5795c56bc7717fe126fa65054c8b47b

Recorded demo output

Real stdout from the Docker demo in the linked CI run. All records, identities and messages are synthetic.

All data synthetic. No real store or money.
Guarded tool result: {
  status: 'resolved',
  action: { orderId: 'synthetic-demo-order', kind: 'refund', amount: 1000 }
}
Idempotent replay: {
  action: { kind: 'refund', amount: 1000, orderId: 'synthetic-demo-order' },
  status: 'resolved'
}
Order state: [ { id: 'synthetic-demo-order', refunded: 1000 } ]
Audit: [
  {
    ticket: 'synthetic-demo-ticket',
    event: 'action',
    detail: '{"orderId":"synthetic-demo-order","kind":"refund","amount":1000}'
  }
]
Read the recorded output in the repository ↗

Known limits

  • The replay contains 16 policy templates with 10 synthetic identities each. It is a regression fixture set.
  • Replay results use the deterministic mock provider, not Claude. They do not establish production resolution rates.
  • Caller identity is trusted local context; no public identity server is included.
Read policy and implementation assumptions ↗
Back to portfolio