Inspiration

Small suppliers in India get paid late all the time. About ₹8.1 lakh crore (about $87 billion; I use ₹93 = $1 throughout) of MSME payments are stuck (Economic Survey figure, via Recordent's 2026 receivables report). The strange part is that the law is already on their side:

  • A buyer has to pay a Udyam-registered manufacturer or service provider within 45 days of accepting the goods (MSMED Act s.15).
  • After that the buyer owes compound interest at three times the RBI bank rate, with monthly rests (s.16). That's 17.25% a year right now.
  • If the buyer still hasn't paid by 31 March, they lose that year's tax deduction for the purchase (Income-tax s.43B(h), carried into the 2025 Act as s.37(2)(g)).

That last rule is a real lever. A ₹4 lakh (about $4,300) invoice the buyer ignores turns into ₹4 lakh ($4,300) of extra taxable profit for him. But the supplier almost never brings it up. The buyer is usually her biggest customer, she has no lawyer, and she doesn't want to burn the relationship by sending a legal notice.

I wanted an agent that uses those rules for her, politely, one step at a time, and that never does anything she hasn't approved. A banshee wails to warn of death. This one wails about dead money.

What it does

Every unpaid invoice is a tombstone in a graveyard. Taller stone means more money, moss means days overdue, cracks mean more than 60 days late, an ember means more than 45, and a wisp means the buyer has promised to pay. The top bar shows the money buried, interest owed and the buyers' deductions at risk. Time-travel buttons jump to tax-bomb week (10 Mar 2027) or 1 April, so you can watch the deductions explode.

Each morning a 5-step ladder picks the next step for every buyer: WhatsApp nudge, WhatsApp pay link, voice call, legal notice, MSME ODR pack.

  • Drafts: an LLM writes each message in Hinglish or English (Claude Haiku 5.5, Sonnet 5.5 for legal wording, GPT-6 Luna as fallback). It never writes a number. Amounts, dates and interest come from a pure rules engine. Every draft must cite real rule IDs like MSMED-15 or IT-43BH, or it is blocked. A deterministic guard also blocks threats, begging, a missing "ji", and Hinglish tense slips like "17 Oct ko due hai" for an invoice that is already overdue.
  • Approval: drafts land in an approvals queue. The owner approves, edits, rejects or redrafts. Nothing goes out without her.
  • WhatsApp + payment: an approved nudge opens WhatsApp with the message and a Razorpay pay link already filled in. The owner taps Send on her own phone. When the buyer pays, a signed webhook marks the invoice paid and the tombstone resurrects.
  • Voice call: the owner starts a call and sends the buyer a link. An AI agent talks to him in Hinglish over WebRTC. It says it's an AI and that the call is recorded, looks up the invoice facts mid-call, reads the amount and date back, and records a promise to pay only after a clear "haan". The promise shows on the buyer's timeline and pauses the ladder. If the owner then tries to send a WhatsApp reminder, the app refuses: "Not sent: Promise to pay active".
  • Kiro Crew app: a separate Crew app runs the ladder every morning at 9 IST and shows a "Graveyard of Dues" page inside Kiro Crew.
  • Landing page: https://duesbanshee.in has a live three.js banshee hero, the tax-bomb example computed by the engine, and planned INR pricing.

How I built it (how I used Kiro)

I built the app in Kiro in under two weeks (first commit 12 Nov, 295 commits in the main repo by 23 Nov), then added one more spec after submitting (27 Nov). That's 12 specs in the main repo and 1 in the Crew repo: 118 tasks and 390 subtasks in the main repo, all ticked, plus 8 tasks and 22 subtasks for the Crew app. I used about 2,900 of my 4,000 credits.

Kiro features I used:

Kiro feature What I used it for
Specs 12 in the main repo (118 tasks, 390 subtasks) and 1 in the Crew repo (8 tasks, 22 subtasks), all ticked
Steering 8 files, including roadmap.md (scope of every spec) and legal-rules.md (the rule IDs drafts may cite)
Hooks 3 agent hooks that re-run engine, ledger, guardrail-eval and voice-persona tests when Kiro edits those files
MCP dues-legal, my own stdio MCP server with 3 read-only tools: invoice_facts, list_rules, check_draft
Custom agent legal-reviewer, which can only read files and call dues-legal, and checks a draft's rule IDs and ₹ amounts
Kiro Crew A separate Crew app: 9:00 IST cron runs the ladder, "Graveyard of Dues" page, tax-bomb skill

Spec-driven vs vibe coding. Every feature went through requirements, then design, then tasks. I wrote the specs on Opus 5.5 and ran the tasks on Sonnet 5.5. For anything that touches money or the law, the spec was the whole point: the legal engine's requirements pin exact values (Sharma Traders, 26 days late, ₹5,127.94 of interest to the paisa, about $55), so "done" meant a test matched a number, not "looks right". Riskier specs ran in Supervised mode with a checkpoint after each task; the UI specs ran on Autopilot. The one place I got close to vibe coding was the 3D hero, where the acceptance test was a screenshot, so I added two screenshot checkpoints and approved the look before Kiro moved on. And the voice call needed 16 small fix commits after the first live test (speak numbers in words, cut far-field noise, end the call cleanly). That loop was fast in Default mode, but it only worked because the spec had already fixed what the agent must never do.

Steering. 8 steering files. The one that helped most was roadmap.md: it holds the scope of every remaining spec, so each new spec prompt was two lines ("Create spec X per roadmap.md section X. Stop after requirements.md."). legal-rules.md is the list of rule IDs the drafts are allowed to cite, and the citation validator checks against it. voice-persona.md is the call agent's script and limits. git-workflow.md keeps every commit small and labelled with its spec and task. I also put "Notes:" lines straight into tasks.md under a task before starting it, which kept Kiro from overwriting test files that already existed.

Hooks. Three agent hooks: engine tests and ledger tests re-run whenever Kiro edits those packages, and the guardrail evals (19 recorded model outputs, labelled accept or block) plus the voice persona tests re-run whenever a prompt file changes. No live LLM calls, so they're fast and free. One thing I learned: file-save hooks fire on the agent's edits, not on my manual saves.

Property-based testing. 183 test files in all (180 Vitest, 3 Playwright), with 166 fast-check properties across 55 of them. Most guard the money: interest to the exact paisa, rupee formatting checked against an independent rounding oracle, Indian digit grouping (₹4,12,000, not ₹412,000), and "only the Crew secret opens the Crew API". The most useful moment was a surprise in the other direction. I asked Kiro to run a mutation check on the rupee rounding: break >= into > and see what fails. The random property still passed. Only the hand-written exact-half cases (like 250 paise) failed, because random paise values almost never land exactly on a half. So a property can look strong and miss the one edge that matters. After that I kept explicit edge cases next to every money property and biased generators toward boundaries (the Udyam registration date check now generates dates right around the supply date). The worst real bugs (a slow regex that could hang on crafted amounts in the ledger import, and a database race that could lose a promise to pay on hang-up) were found by code reviews, not properties. What the properties gave me was the confidence to refactor the engine late without re-checking every number by hand.

Where Kiro surprised me. Two moments. The first was the mutation check above: Kiro showed me that my own property test was weaker than it looked. The second was Kiro pushing back. On the crew-api spec I asked for one small fix to requirements.md, and Kiro also added cases I hadn't thought of: a 500 when the database can't be reached, the connection closed exactly once, and an impossible date (30 Feb 2027) as a test example. I kept all three.

Kiro Crew. I built the Crew app in its own repo from one spec: a manifest, a stdlib Python backend, a daily script cron, a React page and a tax-bomb skill. The difference from the IDE: in the IDE Kiro builds the app, while in Crew the app keeps running after I close the laptop. The cron's sandbox couldn't read the masked secrets file, so the spec grew a small fallback file holding only the ladder secret, which can only create drafts.

Reviews. For each risky spec I had Claude Code review the finished code read-only, then gave the fixes to Kiro as separate commits.

MCP server and custom agent. After submitting, I added a 12th spec (4 tasks, 17 subtasks) for checking a draft's legal claims inside Kiro. dues-legal is a small stdio MCP server in the repo (packages/legal-mcp) with three read-only tools: invoice_facts (the engine's figures for an invoice), list_rules, and check_draft (splits cited rule IDs into valid and invalid, and pulls out ₹ amounts). It has no database, network or LLM. A custom agent, legal-reviewer, can only read files and call those tools. Given a Hinglish draft for Sharma Traders that cited a made-up rule (MSMED-99) and ₹5,200 (about $56) of interest, it flagged both and gave the correct ₹5,127.94 (about $55), in 19 seconds for 0.61 credits. It's in the demo video at 2:33. I didn't use Kiro powers or the Kiro CLI/Web.

Stack. Next.js + TypeScript monorepo (pnpm), Postgres on Neon with Drizzle, Auth.js, Vercel AI SDK, OpenAI Realtime (gpt-realtime-2.1) over WebRTC, Razorpay test mode, three.js, Vitest + fast-check + Playwright, deployed on Vercel.

Challenges I ran into

  • WhatsApp sending. Meta locked the Cloud API account (unverified business, error 131031), and the Twilio trial only allows template messages. I had a tested Twilio sender and couldn't use it. I switched the demo to a wa.me link with everything prefilled, so the owner taps Send herself. It fits the "owner approves every step" rule anyway.
  • A promise that could disappear. A review found that if the owner hung up at the same moment the agent recorded a promise, a Postgres read under READ COMMITTED could miss it and log the call as "no promise". The fix was a row lock so ending a call waits for an in-flight promise.
  • Hinglish is hard to check. The model wrote "17 Oct 2026 ko due hai" for an invoice that was already overdue. That's grammatical, but it tells the buyer he isn't late yet. I added a tense check and an eval fixture for it.
  • Numbers on a voice call. The first live call read paise and long digit strings badly. Now the server builds the opening line and every figure is spoken in words from tool output, never generated by the model.

Accomplishments that I'm proud of

  • The full loop works live: approve a Hinglish draft, send the pay link, take a voice call that ends in a promise, pay, and watch the tombstone come back.
  • No part of the app except the engine does legal or money maths, and tests enforce it (a lint test fails if a ₹ amount is typed anywhere else).
  • A small supplier could actually use this. The legal points are real and cited, and the copy is polite.

What I learned

Spec-first is slower for the first hour and much faster by the second week. Being strict about what the model is not allowed to do (write numbers, cite rules that don't exist, send without approval) mattered more than how good the drafts were. Also: a hackathon budget of credits makes you write lean specs.

What's next for Dues Banshee

Phone (PSTN) calls, Tally sync, automatic WhatsApp sending once Meta verifies the business, and a CA-firm dashboard that runs collections for all of a CA's MSME clients. Planned pricing is on the landing page.

Built With

Share this project:

Updates

Submission history