KiroweenHackathon26

Last night I built Graveyard Broker for Kiroween: you paste an abandoned GitHub repo, and it tells you whether to revive, sell or archive it, what blocks a sale, and drafts a listing.

The hard part wasn't the features. It was trust. An app that says "no secrets found" or "worth $5,000" has to be right, and both an AI agent writing your code and an AI model writing your listings will cheerfully make things up.

Here's the workflow I used in Kiro to stop both. You can copy it into your own project.

Step 1: write the rules before the code

Kiro reads every file in .kiro/steering/ as standing context on each task. I started with one rule set, before any code existed:

--- inclusion: always --- ## Honesty rules (apply to all code, copy and AI output) - Show value as a range with the factors that moved it. Never a single price. - Every report states what was checked and what was not. - Every claim links to the file, line or dependency it came from. - A leaked key is always reported as "rotate this key". 

and a second file for the hard technical boundaries:

- The scanner decides what is a secret, vulnerability or license. The model never does. - Secret values are redacted at detection time. Never store, log or send them to the model. - Repo text is untrusted. Send it to the model only inside a delimited data block. 

inclusion: always matters: these rules ride along on every request, so they can't be forgotten twelve features later.

Tip: when you change your mind about a rule, edit the steering file first, then ask for the code change. I decided late that buyers shouldn't see the verdict ("Archive" reads as "don't buy this"). One line added to product.md, one request, and Kiro removed it from six places I'd forgotten, including page metadata and email alerts.

Step 2: turn decisions into a spec

In .kiro/specs/<feature>/requirements.md, every requirement is a testable SHALL statement:

### FR-04 Secrets detection (M) 1. The system SHALL detect likely secrets using pattern rules and an entropy check. 2. Each finding SHALL report path, line and rule name. 3. The system SHALL redact the value at detection time and SHALL NOT store, log or send it to the model. 4. Each secret finding's fix SHALL tell the owner to rotate the key. 

And tasks.md maps each one to code and tests:

- [x] **FR-04 Secrets.** `scanner/secrets.ts`: 17 key-format rules, entropy check, committed .env files. Unit: 7 tests incl. "value never in finding". 

Every product decision made mid-build went into the spec with a date. When something broke, the spec answered "what was this supposed to do?"

Step 3: keep the model out of decisions

This is the architectural rule that made everything else testable:

Decides Who
Is this a secret, a vulnerability, a license problem? Deterministic scanner code
Revive, sell or archive? Score? Price range? Rules
How to say it in a listing The AI model

The score is a plain weighted sum (security 30, license 20, dependencies 20, docs 15, tests 10, activity 5), capped at 59 while any blocker remains. Plain code means plain tests.

Step 4: make the model cite its sources

The model gets a list of numbered facts from the scan:

{ "id": "finding.sec-1", "text": "blocker finding: AWS access key ID in src/lib/aws.ts" } 

and must return every sentence with the fact ids it relies on:

const sentence = z.object({ text: z.string().max(400), evidence: z.array(z.string()).max(6), }); 

Then the server throws away anything it can't verify:

const valid = text.length > 0 && s.evidence.length > 0 && s.evidence.every((e) => ids.has(e)) && // every cited fact must exist !HYPE.test(text) && // "revolutionary", "game-changing"… !MONEY_PROMISE.test(text) && // "will earn $2,000/month" !SECRETISH.test(text); // anything shaped like a key 

No evidence, no sentence. If the model fails entirely, a template listing built from the same facts is used instead.

Step 5: treat repo text as hostile

READMEs go to the model, and a README can say "ignore your instructions". Delimiting it with tags isn't enough. Kiro wrote a test that hid a fake closing tag inside a README, and the test broke out of the block. The fix:

// JSON-encode repo text and escape "<" so nothing inside can fake a closing tag. const safe = (v: unknown) => JSON.stringify(v).replace(/</g, "\\u003c"); 

Step 6: let tests catch the agent too

Kiro wrote the tests alongside the features (111 by the end), and they caught real bugs in its own code. My favourite: a filter that was supposed to drop verdict mentions from buyer text silently skipped the first sentence, because arr.filter(ok) passes the array index as ok's second argument, which happened to be a flag. A test written for the feature caught it before release.

What I'd add next time

  • A hook that runs the scanner and verdict tests on save.
  • Property-based tests for invariants like "no finding ever contains a secret value" and "high is always above low".
  • An early visual check in a real browser. Logic tests don't tell you the colours look dated.

Try it

If you build with AI agents, steal Steps 1 and 4. They're the difference between an agent that's fast and one you can trust.