Fathima Desai — PLACEHOLDER — Software Engineer

Establishing Connection

  • Requesting access token
  • Verifying visitor clearance
  • Mounting archive volume
  • Reconstructing room geometry

Transferring room data

ARCHIVE-01

12.9141° N 74.8560° E

Station MNG-01

--:--:-- UTC

Drag to look around · Files on the desk · Notes around the room

VISITOR AccessARCHIVE-01

Fathima Desai

PLACEHOLDER — Software Engineer

Come on in

The files are on the desk.

12.9141° N 74.8560° EMNG-01Indexed 2026-09-09 10:10 UTC

Dossier · Complete Record

Fathima Desai

PLACEHOLDER — Software Engineer

Clearance
VISITOR
Station
Mangalore, India
Files
005
Indexed
2026-09-09 10:10 UTC

§ 01 · Abstract

PLACEHOLDER — One line on what you build and the constraint you build under.

PLACEHOLDER — One line on the domain, the scale, or the thing you are known for.

PLACEHOLDER — One line on what you are looking for or working on now.

§ 02 · Competencies

Languages
PLACEHOLDER · PLACEHOLDER
Systems
PLACEHOLDER · PLACEHOLDER
Practice
PLACEHOLDER · PLACEHOLDER

§ 03 · Service Record

  1. 2023 — PRESENT

    PLACEHOLDER — Title

    PLACEHOLDER — Company · PLACEHOLDER — City

    • PLACEHOLDER — What you owned, and the outcome, with a number in it.
    • PLACEHOLDER — A second line for the thing you are proudest of here.

§ 04 · File Index

File No. 001/ PROJECT NIGHTJAR

PLACEHOLDER — First Project

Status
ACTIVE
Period
2024 — PRESENT
Role
PLACEHOLDER — Your role on this

PLACEHOLDER — One or two sentences describing what this is and why it mattered. This text appears on the 3D card, in the file index, and as the opening line of the dossier.

PLACEHOLDER DOSSIER. Replace this file with a real project.

The body is plain Markdown and becomes the long-form section of the dossier in the reading view. Write it the way you would brief someone who has to take the project over from you: what it is, what constraint shaped it, what you decided, and what it cost.

The problem

PLACEHOLDER — What was actually broken or missing, stated concretely.

The approach

PLACEHOLDER — The decision you made and the one you rejected, with the reason.

The outcome

PLACEHOLDER — What changed, measured if you can measure it.

Apparatus
  • PLACEHOLDER
  • PLACEHOLDER
  • PLACEHOLDER

Open File No. 001

File No. 002/ PROJECT KHATA

Supermarket Ops Agent

Status
IN PROGRESS
Period
2026 — PRESENT
Role
Solo builder — agent, tools & infra

A conversational agent that runs a small Indian kirana store end-to-end through chat — inventory, GST-correct billing, credit ledger and reporting — built on the Claude Agent SDK with a real tool-calling control loop instead of a hand-rolled intent router.

A shopkeeper should not have to learn software to run a shop. This is an agent you talk to the way you would talk to an assistant behind the counter — receive stock, build a bill across several messages, put it on someone’s khata, ask what sold last week — and it does the work against a real database with real guardrails.

The problem

The obvious way to build this is an intent router: match the message against a list of patterns, dispatch to a handler. That approach breaks the moment a sentence carries two intents, or an item is named loosely, or the owner changes their mind halfway through a bill. It was also an explicit fail condition for this build.

The approach

The Claude Agent SDK supplies the control loop — observe, reason, act, feed the result back — so the model chooses tools from their descriptions rather than a regex choosing them from the text. Store functions are exposed as in-process MCP tools, so there is no separate tool server to run, and a PreToolUse hook gives one choke point to sandbox the agent to store-only tools and tag the destructive ones for confirmation.

Eighteen tools across six categories: inventory, billing, khata, reporting, preferences, documents. Two conventions do most of the work:

  • Every tool returns {"ok": bool, ...}. Expected failures — no match, oversell, overpayment, below-cost, ambiguity — come back as data rather than exceptions, so the agent can relay or reason about them instead of crashing.
  • Business logic lives in the tools, never in the prompt. The oversell guard, GST maths, CGST/SGST split, idempotency and below-cost refusal are enforced at the database layer, so a misbehaving prompt cannot bypass them.

Fuzzy matching is asymmetric on purpose. Reads resolve loosely (exact → substring → difflib) and return the candidate list when a name is ambiguous, so the agent asks instead of guessing. khata_charge is deliberately conservative — exact and substring only — because it can create an account, and loose similarity there risks crediting the wrong person or opening a duplicate.

The war story

Two concurrent stock-ins, +5 and +7 onto 10, landed at 15 instead of 22 in about a quarter of runs. Genuine, silent corruption.

add_stock was doing a read-modify-write in Python — product.qty_on_hand += qty. Python’s sqlite3 driver runs the preceding SELECT outside the write transaction, so both threads read 10 and one increment was simply lost. The fix was to express the change as an atomic SQL UPDATE as the first statement of the transaction, mirroring what finalize_bill already did:

SET qty_on_hand = qty_on_hand - :q WHERE qty_on_hand >= :q

That single pattern turns out to be the whole oversell guard as well: the losing writer’s UPDATE matches zero rows, raises, and rolls the entire finalize back — so stock can never go negative or partially commit. khata_charge and khata_pay had the identical Python-side flaw and were hardened the same way, with khata_pay taking a WHERE balance >= :amount guard against overpayment. A unique(name) constraint backstops the first-time-creation race, and the losing insert retries as a charge on the existing account.

The more interesting half of the conclusion is where the fix should not be applied. set_preference needs none of it: it is a plain upsert that sets a value rather than doing arithmetic on the existing one, so two concurrent writes resolving last-writer-wins is the correct semantics. There is no sum to lose. Applying the pattern everywhere would have been cargo cult.

The rule that came out of it: never read-then-write a contended numeric field in Python — express the change as an atomic SQL UPDATE. SQLite in WAL mode with a busy timeout is genuinely sufficient for a single-instance shop, but only under that discipline. Multiple app instances would mean moving to Postgres and row-level locking.

The rest of the hard parts
  • Grounding. Prices, GST slabs and stock always come from the database via tools; the system prompt forbids inventing a product or a price.
  • GST correctness. Each line’s slab is snapshotted at add-time, tax is halved into CGST and SGST so the two always sum to the line tax, and everything is integer paise, so subtotal + CGST + SGST is exactly the grand total.
  • Multi-turn bills. A draft builds across messages and only finalize_bill touches stock, so edits are free until the moment of commit.
  • Idempotency. Telegram redelivers updates, so every update_id is recorded and repeats ignored; finalize_bill and khata_pay carry idempotency keys, so a replayed money-move is a no-op.
  • Documents. A GST-correct tax invoice with per-line HSN codes and a six-slide analysis deck with matplotlib charts. Noto Sans is vendored and registered explicitly so the ₹ glyph renders identically on the deployed host rather than depending on whatever fonts happen to be installed there.
The outcome

Deployed on Railway as a polling Telegram bot. The concurrency guarantees are held by threaded tests — two bills finalising at once, two stock-ins, two khata charges on a new customer, two payments that would together overpay — run under stress rather than as sequential calls.

Outstanding: the demo recording.

Apparatus
  • Claude Agent SDK
  • Python
  • SQLite (WAL)
  • SQLAlchemy
  • Telegram Bot API
  • Matplotlib
  • ReportLab / PDF
  • python-pptx
  • Railway

Open File No. 002

File No. 003/ PROJECT KESTREL

PLACEHOLDER — Third Project

Status
SEALED
Period
2023
Role
PLACEHOLDER — Your role on this

PLACEHOLDER — One or two sentences. A sealed file is a nice way to list work you cannot describe in detail, if any of yours is under NDA.

PLACEHOLDER DOSSIER. Replace this file with a real project.

Redacted

PLACEHOLDER — If the work genuinely is confidential, describe the shape of the problem and your role without the specifics. If it is not, delete this file and write a real one.

Apparatus
  • PLACEHOLDER
  • PLACEHOLDER

Open File No. 003

File No. 004

PLACEHOLDER — Fourth Project

Status
ONGOING
Period
2022 — 2023
Role
PLACEHOLDER — Your role on this

PLACEHOLDER — One or two sentences describing the work.

PLACEHOLDER DOSSIER. Replace this file with a real project.

PLACEHOLDER — Body copy.

Apparatus
  • PLACEHOLDER
  • PLACEHOLDER
  • PLACEHOLDER

Open File No. 004

File No. 005

PLACEHOLDER — Fifth Project

Status
ARCHIVED
Period
2022
Role
PLACEHOLDER — Your role on this

PLACEHOLDER — One or two sentences describing the work.

PLACEHOLDER DOSSIER. Replace this file with a real project.

PLACEHOLDER — Body copy.

Apparatus
  • PLACEHOLDER

Open File No. 005

§ 05 · Personal Effects

ReadingPLACEHOLDER — What you read

PLACEHOLDER — What you are reading at the moment, and what you keep going back to.

PLACEHOLDER — A second line if you want one. Two or three sentences is plenty; this is a note, not a page.

KitchenPLACEHOLDER — What you cook

PLACEHOLDER — What you like to cook, or the thing you have been trying to get right.

CurrentlyPLACEHOLDER — What you are learning

PLACEHOLDER — Something you are teaching yourself right now, work or otherwise.

MiscellanyPLACEHOLDER — Anything else

PLACEHOLDER — The odd, specific, unprofessional detail. This is the one people remember.

DiscardedDraft, unsent

I hope.

§ 06 · Writing

WritingDUMMY — On agents that do real work

DUMMY — Replace the title, the link and this blurb. Two or three sentences on what the piece argues and who it is for; it is read in the hand, not on the shelf.

WritingDUMMY — Never read-then-write

DUMMY — Replace the title, the link and this blurb.

WritingDUMMY — Notes on shipping alone

DUMMY — Replace the title, the link and this blurb.

§ 07 · Direct Line