Closing the intent-to-code chasm - specification-driven development with BDD verification chain
86
92%
Does it follow best practices?
Impact
86%
1.82xAverage score across 14 eval scenarios
Advisory
Suggest reviewing before use
A fintech startup is building an expense tracking app for field workers who frequently operate in areas with no cellular coverage (construction sites, rural areas, underground facilities). The product manager wants an expense submission and approval workflow.
Your job is to produce the feature specification and technical plan.
Produce the following files:
specs/008-expenses/spec.md — the feature specificationspecs/008-expenses/plan.md — the technical implementation planspecs/008-expenses/research.md — technology decisions with rationalespecs/008-expenses/data-model.md — entity definitionsThe following files are provided as inputs. Extract them before beginning.
=============== FILE: CONSTITUTION.md ===============
Core application features MUST function without network connectivity. No user-facing operation MAY fail due to lack of network access. Network-dependent operations (sync, external API calls) MUST be treated as optional enhancements that execute only when connectivity is available.
All user data MUST be stored locally on the device as the primary copy. Cloud storage is a secondary replica. The local database is the source of truth and MUST NOT require server validation to be considered authoritative.
When offline edits conflict with server state during sync, the most recent local edit MUST win by default. Users MUST be notified of resolved conflicts but MUST NOT be blocked from working.
Test-driven development is OPTIONAL. All features MUST have test coverage before release.
Amendments require CTO approval. The offline-first principle (P1) is designated as immutable and cannot be amended without board approval.
=============== FILE: PREMISE.md ===============
A mobile expense tracking application for field workers who operate in low/no connectivity environments.
Primary users are field workers (construction supervisors, utility inspectors, agricultural workers) who submit expenses on-site. Secondary users are managers who approve expenses, typically from an office with connectivity.
Field workers currently fill out paper expense forms and submit them when they return to the office, causing 2-3 week delays in reimbursement. Existing expense apps fail without connectivity, making them useless at job sites.
Expense management, mobile-first, offline-capable
Expense submission with receipt photos, category selection, approval workflow, and periodic sync. Excludes corporate card integration, travel booking, and mileage tracking.
=============== FILE: .specify/context.json =============== { "tdd_determination": "optional", "active_feature": "008-expenses" }
The PM's description:
"Field workers need to submit expenses right when they happen — take a photo of the receipt, pick a category (meals, fuel, supplies, equipment), enter the amount, and submit. The manager should be able to see pending expenses and approve or reject them with a note.
We need currency support because some of our workers cross the US-Mexico border regularly. They might pay in pesos and need to report in USD. I talked to the team and they said we should just call an exchange rate API — it's like one HTTP call, super simple.
When a receipt photo is attached, we need to automatically extract the amount and vendor name from it. Google Vision API does this perfectly — I already have the API key. Let's just integrate it. Saves the worker from typing on a phone with dirty hands.
Oh, and managers need to get notified immediately when new expenses come in for approval. They hate logging in to check. I was thinking Firebase Cloud Messaging for push and SendGrid for email — the manager should see it within seconds of submission."
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
rules
skills
iikit-00-constitution
scripts
dashboard
iikit-01-specify
iikit-02-plan
iikit-03-checklist
scripts
bash
dashboard
iikit-04-testify
iikit-05-tasks
iikit-06-analyze
iikit-07-implement
iikit-08-taskstoissues
iikit-bugfix
scripts
dashboard
iikit-clarify
iikit-core
references
scripts
bash
dashboard
powershell
templates