Punch cards still weave: building JACQUARD with Kiro for Kiroween 2026
I wrote this post for the Kiroween 2026 hackathon (Resurrection category). The project is open source, and every Kiro session that built it is logged in the repo.
- ๐งต Live app: main.d28e9v65r7sow0.amplifyapp.com
- ๐ป Code: github.com/TusharTechs/jacquard
- ๐ฌ Demo video (2:49): youtu.be/kInqm4saNN0
The dead technology that isn't dead
In 1804, Joseph-Marie Jacquard's loom read its pattern from a chain of punched cards. One card for each pass of the weft; one hole for each hook that lifts a warp thread. Computers borrowed the idea, and then threw it away. Handlooms didn't.
Banarasi sarees are still woven on hand looms with a jacquard, and in 2023 a handwoven Banarasi piece for India's new Parliament building was put onto the loom with punch cards.
A card set still starts as a drawing on point paper: squared paper where each square is one thread crossing another. The designer has to watch for floats, where a thread skips over too many others without interlacing. Long floats snag and weaken the cloth. On paper they're easy to miss, and a float missed on paper gets punched into the cards.
For a "resurrect dead tech" theme, the first programmable medium felt like the right one to bring back, for the people who never stopped using it.
What JACQUARD does
A free browser studio, in four steps:
- Design. Describe a motif ("a lotus with four petals on a plain ground") or open a gallery example. A motif builder draws limited-colour shapes on point paper, and you can touch them up cell by cell.
- Check. The engine builds the lift plan and lists every float over the limit, highlighted on the grid. Auto-fix flips the fewest lift-plan cells it can, and never changes the drawing.
- Weave. A 3D Jacquard loom lifts exactly the hooks each card lifts while the cloth grows pick by pick, with sound and a Cloth view of the finished motif.
- Cards. The card set, numbered in lacing order, to print, plus a point-paper sheet and a WIF file for other weaving software.
Everything runs in the browser. No account, and nothing leaves your machine.
How Kiro built it
I'd used AI assistants before as fast autocomplete. Kiro asked me to work differently, and the parts that changed the project most were these.
Specs, then properties, then tests
The project has nine specs: the weave engine, the MCP server, motif input, simulation and export, the Studio, the deploy, the motif builder, the Kiro product pieces and even the demo video. Each one goes requirements, then design, then tasks.
The key move: anything in a requirement that could be stated as an invariant became a numbered correctness property in the design, then a property-based test with fast-check. 99 of them, out of 727 tests in total. For example:
- a card set decodes back to exactly the same lift plan;
- after auto-fix, no float is over the limit;
- one card per pick;
- the same input always gives the same bytes.
That changed what a failing test meant. It stopped being "fix the code" and became a question: is the spec wrong, or the code? More than once it was the spec.
The best example: an auto-fix example test failed. Instead of loosening the assertion, Kiro's sub-agent stopped and showed that no fix keeping every flip on the lattice exists for a 24-pick warp ring, because the design document assumed the pick count was a multiple of the lattice size. The design note was corrected, not the test.
Property tests also caught three real bugs that example tests had missed, including a paisley border that, mirrored top to bottom, lost all its figures. A one-character bug I planted on purpose in the float checker was shrunk to a counterexample of two picks and one thread within four test cases.
Steering files written from mistakes
Seven steering files, five always on, two matched to folders: weaving rules for the engine, a design language for the web app. The rules that mattered most came from things going wrong:
- The shell tool reported Exit Code: -1 for every command, so a steering rule now makes the agent print
EXIT_CODE=$?and read the test summary before it may say tests pass. - Every fact about real looms must carry a label:
[sourced],[convention],[decision]or[to verify]. Nothing about weaving gets invented, and the labels show up in the app and in every MCP tool result.
Our own MCP server
The engine is wrapped as an MCP server, jacquard-weave, with six tools: build a lift plan, check floats, auto-fix, build cards, decode cards, list loom profiles. That let a custom Kiro agent, weave-auditor, review each phase by running the real engine on designs instead of reading the code. It ran eight reviews.
The same server ships as a Kiro Power (loom), so anyone can add the weave tools to Kiro without building the repo. I also used two external MCP servers: Chrome DevTools, for phone-width checks, screenshots and Lighthouse on the live site, and AWS Documentation, to check Amplify Hosting's deploy steps and prices before deploying.
Hooks and a journal that wrote itself
Three hooks:
- one guards the engine's golden test fixtures, so no fixture gets quietly edited to make a test pass;
- one runs typecheck and tests on every engine save, and caught the planted bug one second after the edit;
- one asks for a journal entry whenever an agent stops.
That last one is why KIRO_JOURNEY.md has an entry for every session, failures included.
One lesson for anyone starting with hooks: they do nothing until you trust the workspace. My first live tests showed nothing at all. Kiro's log line hooks.v2.executionDisabledUntrustedWorkspace gave it away.
What Kiro missed, and what I missed
The most useful bug in the project wasn't caught by any test. Four waves of screenshots showed the loom and the first card, and everything looked fine. None of them showed that about 200 of 240 hooks were weaving plain ground: the woven cloth didn't show the design. I found it by actually using the app.
The fix was to repeat the design across by default and add a Cloth view that shows the finished motif. Specs and property tests prove the parts you thought to state. Looking at the product is still how you find out whether you stated the right things.
Honest limits
- The card format has not been tested on a working loom. Card layouts are configurable loom profiles, and only one layout is sourced.
- The live site's motif step is a rule-based builder, not AI. A Bedrock path is built and tested but switched off.
- The WIF export hasn't yet been opened in an independent weaving program.
Try it
- Live app: https://main.d28e9v65r7sow0.amplifyapp.com. Open the Peacock butta example, run the check, click Auto-fix, then weave it.
- Code, specs, steering, hooks and agents: https://github.com/TusharTechs/jacquard
- Demo video:
Built with Kiro for Kiroween 2026.
Comments
No comments yet. Start the discussion.