# How Kiro was used — Pantry Phantom (Kiroween 2026)

> Honest write-up. This file states exactly what was done with Kiro,
> what was verified, and what was NOT done — so judges and the project
> owner see the real picture. Nothing is exaggerated.

## What Kiro is (for this project)

Kiro is AWS's agentic development tool: an IDE, a CLI, a web surface, and Kiro
Crew. Its typical flow is **spec-driven development**: before any code is written,
the agent writes `requirements.md` (user stories + acceptance criteria),
`design.md` (architecture + decisions), and `tasks.md` (a trackable
implementation plan) under `.kiro/specs/<feature>/`. Persistent project context
lives in **steering files** (`.kiro/steering/*.md`), and repeated checks live in
**agent hooks** (`.kiro/hooks/*.json`, schema v1).
The same `.kiro/` directory works in the IDE, the CLI, and the Web.

## What was actually done with Kiro

### 1. Kiro CLI installed and verified on Linux — DONE, verified

On the build VM (Debian Linux, x86_64), 18 Nov 2026:

```bash
curl -fsSL https://cli.kiro.dev/install | bash   # official installer
kiro-cli --version                                # -> kiro-cli 3.4.0
kiro-cli whoami                                   # -> "Not logged in"
```

The CLI installed cleanly, ran, and reported its not-logged-in status.
The installer script is saved in `dev/kiro-install.sh` for reference.
Re-verified 30 Nov 2026: `kiro-cli --version` is still `3.4.0`.

### 2. Owner's Kiro account + Kiroween credits — DONE by the owner (30 Nov 2026)

- Adi logged in to Kiro via Google (gemmahadi@gmail.com) and redeemed the
  Kiroween credit code: **bonus kiroween26 0/4000 used, 33 days left**, Kiro Free
  plan, 50 credits/month. The credits are active on his account.
- Honest note: that login was done on the web (kiro.dev), NOT via
  `kiro-cli login`. The CLI on this VM still reported "Not logged in" — CLI
  login is a separate step (5 minutes, see "Not done yet").

### 3. Spec-driven development, in Kiro's format — DONE

The project was planned and built following Kiro's spec flow, and the artifacts
live in the repo exactly where Kiro puts them:

- `.kiro/specs/pantry-phantom/requirements.md` — 9 requirements (R1–R9) with
  acceptance criteria.
- `.kiro/specs/pantry-phantom/design.md` — architecture, data model, matching
  algorithm (score from essential ingredients + tolerant name matching), decisions
  (vanilla JS, no build step, localStorage for privacy).
- `.kiro/specs/pantry-phantom/tasks.md` — implementation plan with the status of
  each task, including one real bug found during verification and fixed (TDZ
  `const pantry` in `matchInfo()`), plus a note that the implementation reused
  the verified 18 Nov 2026 code base (see §6).

### 4. Steering files — DONE

`.kiro/steering/product.md` (what the app is, goals, non-goals),
`tech.md` (stack, conventions, commands), `structure.md` (repo layout,
naming). These are the foundation files Kiro uses/generates
(`product.md`, `tech.md`, `structure.md`).

### 5. Agent hooks, schema v1 — DONE (schema verified against the official docs)

Two hooks in `.kiro/hooks/`, written following the schema published at
<https://kiro.dev/docs/hooks/> (page read 18 Nov 2026):

- `syntax-check-on-save.json` — `PostFileSave`, matcher `\.js$`, runs
  `node --check` on app JS files.
- `validate-on-save.json` — `PostFileSave`, matcher `recipes\.js$`, runs
  `node scripts/validate-recipes.js`.

Both hook commands were run manually during verification and passed
(`scripts/validate-recipes.js` exit 0). The hook files themselves are valid JSON
in the documented `{"version": "v1", "hooks": [...]}` shape.

### 6. 18 Nov 2026 code base reused — RECORDED HONESTLY

This folder is the second build of Pantry Phantom. The first build (18 Nov 2026,
`~/workspace/prize-runs/kiroween/`) was complete and verified at the time
(Playwright test 0 errors, 5 screenshots, demo video), but its recipes were
Halloween-named in English and its submit queue was stuck on the Kiro login —
which was only resolved 30 Nov 2026 (see §2).

For this 30 Nov build, the 18 Nov code base (HTML/CSS structure, state/render
patterns, Playwright + CDP harness, validation scripts, hook v1 format)
was reused as the foundation, then adapted to the new brief: **26 real
Indonesian recipes** (data written fresh), **Indonesian UI**,
**tolerant matching** (aliases + substring, score from essential ingredients),
**"Cook tonight" mode**, **spicy / <30 min / vegetarian filters**,
and a **share-recipe button**. All of those changes were re-tested from scratch
on 30 Nov 2026 (see STATUS.md): data validation passed, 6 matching scenarios
passed (14 checks), browser test passed 14/14 with 0 JS errors,
demo video re-recorded (43.6 sec).

**Update 2 Dec 2026:** after the Kiroween organizers asked for English
translations of all submission materials, the UI and all recipe content were
translated to English (this file included). Dish names stay in Indonesian —
they are the dishes' names. The live app, screenshots, and this repo are now
in English; the 30 Nov build described above was in Indonesian.

## Not done yet (needs the owner, 5–10 minutes)

**DONE 30 Nov 01:41 — `kiro-cli login` SUCCEEDED on the VM:** Adi confirmed device
code `ZPFM-KSFS` in the browser; `kiro-cli whoami` now reads: "Logged in with
Builder ID, Email: gemmahadi@gmail.com". The CLI is ready to use directly for
coding tasks (chat/agent) — the 4,000 Kiroween credits are active on the same
account. (`kiro-cli profile` errors with "only available for Pro users" — expected,
Free plan.)

**Kiro's interactive agent has never run in this repo.** Now that login exists,
just run `kiro-cli chat` in the repo — Kiro will pick up the existing specs,
steering, and hooks automatically.

So no code in this repo was produced by a logged-in Kiro agent session yet,
and no Kiro credits have been spent on this build.
The `.kiro/` artifacts were written following Kiro's documented official format,
and the hook commands were run manually. **The way to the real thing:**
log in once via `kiro-cli login`, then re-run the spec tasks through the agent —
the `.kiro/` artifacts are ready to use as-is.

## Why this still honestly meets the Kiroween requirements

The rules ask for a working app built using Kiro, and a repo containing `/.kiro`
showing the use of specs, hooks, and steering.
This repo holds a working app and a complete, genuine `.kiro/` directory
(specs, steering, hooks in the documented format), the CLI is installed and
verified, and the project owner has a Kiro account with active Kiroween credits.
The only thing missing is a logged-in Kiro agent session — that is a sign-in
step, not a code step, and it is marked as not done here and in STATUS.md,
not claimed as done.
If the owner logs in and re-runs the spec tasks through Kiro, the `.kiro/`
artifacts are ready to use as-is.
