DEV Community

Ryota Kanamaru
Ryota Kanamaru

Posted on Edited on

I wrote "forbidden" in the prompt. Kiro asked for permission.

I wrote this post as part of the Kiroween 2026 hackathon (Skeleton Crew category).

For Kiroween 2026, I turned spec-driven development around. In Dr. Kiro's Lab Notebook, the spec is the output: an AI agent runs experiments on a system nobody has documented, and writes that system's Kiro spec from the results. The system was a stitched-together robot body in MuJoCo with five unlabeled wires and no manual. The same setup also runs an OpenFOAM wind tunnel.

A prompt only asks

In an early test, I kept the rules in the prompt. When I wrote "forbidden", Kiro did not stop. It asked me for permission. So I moved the rules into the instrument:

  • A custom agent with no shell. Dr. Kiro can touch only its lab files and four MCP tools.
  • An MCP lab bench that refuses to run a trial without a numeric prediction on record, and refuses validated without the evidence.
  • Hooks that log every call and refuse file access outside the lab.
  • Steering for the method only.

It mattered. Twice Dr. Kiro marked a rule validated with hits only inside the range it had already tried. Both times the bench refused to end the session until the word became observed.

That miss in the notebook: the prediction was more than 0.2 m forward, the robot went back and turned; the rule is struck through and rewritten, checked by the bench

Does the spec carry what was learned?

I took a tyre off the robot and told no one. Dr. Kiro started from a blank notebook and found a new way to crawl. Then a second Kiro agent (run with Kiro CLI) got only a spec and had to crawl 0.3 to 0.5 m on the changed robot:

Spec given to the second agent Runs that reached the target
Old spec 0 of 3
New spec 3 of 3
No spec 0 of 3

A stale spec was no better than none.

The reader's task and results: 0 of 3 with the old spec, 3 of 3 with the new one, 0 of 3 with no spec

What I learned building with specs

  • Chat first, then the spec. A spec written cold was hard to change later.
  • Write where the spec must stop for a human. Then you can press Run all and walk away.
  • Property-based tests can catch the spec, not just the code. One stopped a Run all because a requirement was mathematically wrong. Kiro did not weaken the test; it stopped with three options, and I rewrote the requirement.

Specs go stale when systems change. A spec whose lines were tested, with the failures still visible, is something the next engineer or agent can build on.

Repository: github.com/marcosanyo/dr-kiro-lab-notebook

Top comments (0)