cd /news/ai-tools/how-i-used-kiro-specs-steering-and-h… · home › topics › ai-tools › article
[ARTICLE · art-182090] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

How I Used Kiro Specs, Steering, and Hooks to Stitch Excel to the Z3 Theorem Prover (ProofSheet — Kiroween 2026)

A developer built ProofSheet, a Dockerized FastAPI and React/TypeScript app that compiles Microsoft Excel pricing workbooks into Z3 SMT constraints so discount and margin policies are formally proven rather than spot-checked. The build used Kiro's spec, file-scoped steering, and PostTaskExec hook primitives to enforce compiler invariants, and was revised so a valid counterexample is still returned and labeled "Counterexample (minimality not proven)" when the follow-up minimality query times out. The tool covers a 20,000-deal pricing domain and ships with regression tests across original, cap-only, and repaired policy revisions.

recommendation

When a formal verifier finds a counterexample but times out proving minimality, return the counterexample with an explicit "minimality not proven" label instead of discarding it as unverified.

more in playbook: Verifying model output
by read3 min views6 publishedDec 4, 2026

This post is being written as part of the Kiroween 2026 hackathon (Kiroween Hackathon 2026).

Every quarter, RevOps and deal-desk teams ship updated Excel pricing workbooks after spot-checking five or ten sample deals. Everything looks fine — until a real customer hits an edge-case combination of seat tier, annual billing, and referral stacking that quietly blows past a discount cap or sells below gross-margin floor.

Most modern tools try to audit spreadsheets by pasting formulas into an LLM and hoping it does the math right. For the Frankenstein category at Kiroween 2026, I built ProofSheet by Aletric using the opposite philosophy: stitch the world's most ubiquitous business tool (Microsoft Excel .xlsx) directly to a formal theorem prover (** Microsoft Z3 SMT solver**), so pricing policies are mathematically proven rather than guessed.

.kiro/): Building a compiler from Excel formulas to Z3 SMT constraints is unforgiving. One floating-point rounding shortcut, one missed division-by-zero branch, or one dropped timeout check can turn a formal verifier into a silent false pass — which is worse than having no verifier at all.

Using **Kiro** changed how I approached building this from day one. Instead of vibe-coding features and hoping tests would catch architectural drift later, I used four Kiro primitives together:

`.kiro/specs/excel-z3-compiler/`)

Before writing the compiler, I locked down requirements.md, design.md, and checkbox tasks.md in Kiro. The spec fixed the exact pricing domain (1 to 5,000 seats, annual billing, referral — 20,000 discrete deals), exact rational representation (cents and basis points), and strict verdict semantics:

*_witness.xlsx workbook and a minimality proof when Z3 proves no smaller seat count breaks the rule)UNSAT across the entire declared domain).kiro/steering/z3-safety.md) My favorite Kiro feature on this build was file-scoped steering. Alongside product.md (always included) and tech.md, I created .kiro/steering/z3-safety.md scoped specifically to backend/compiler/**/*.py. Every time an agent touched compiler code, Kiro automatically enforced four non-negotiable invariants:

40.0% or 20.0%). Unable to verify.=100/(B4-250) failing at 250 seats in cell B24)..kiro/hooks/proofsheet-verdict-smoke.json) To make sure no refactor quietly broke an existing verdict, I wired a PostTaskExec Kiro hook that automatically runs test_verdict_matrix.py and test_unable.py after task execution. If a change alters any verdict across the three revisions (original, cap-only, repaired) or breaks an Unable to verify case, it fails immediately.

Once the spec and contracts were locked, I split independent modules across parallel agents — separating the workbook from the formula parser, and later splitting the FastAPI backend (backend/web/), React/Vite UI ( frontend/), deployment setup ( Dockerfile), and regression test suites with clean file ownership.

Midway through the build, we hit a subtle formal-methods edge case: what if Z3 finds a valid violating deal (SAT) quickly, but times out on the follow-up query trying to prove minimality? A naive wrapper would discard the counterexample and return Unable to verify.

We revised the spec and compiler so a valid counterexample is never lost — ProofSheet still returns the violating deal, explicitly labeling it "Counterexample (minimality not proven)" instead of "Proven minimal deal", backed by dedicated regression tests in backend/tests/test_verify_minimization.py.

By submission time, ProofSheet shipped as a single Dockerized FastAPI + React/TypeScript web app live at proofsheet.aletric.com with:

101 seats, annual billing, referral -> $55.00 quote, 45.0% discount, 11.2% margin on original; 18.6% margin still failing on cap-only; both policies proven on repaired)..xlsx workbooks Next for ProofSheet at Aletric: CEGIS Auto-Heal (where an LLM proposes formula repairs while Z3 proves the fix satisfies every policy and preserves existing compliant deal prices), natural-language rule translation with human confirmation, and a Z3 MCP server.

Try it live at https://proofsheet.aletric.com — and check out the full .kiro/ folder and build log in the GitHub repo.

── more in #ai-tools 4 stories · sorted by recency
── more on @proofsheet 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-used-kiro-spec…] indexed:0 read:3min 2026-12-04 · —