<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AhnRyu</title>
    <description>The latest articles on DEV Community by AhnRyu (@ianlyoo).</description>
    <link>https://dev.to/ianlyoo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4271256%2F38e973ad-9aea-401b-a0d5-a9068f9dcca8.png</url>
      <title>DEV Community: AhnRyu</title>
      <link>https://dev.to/ianlyoo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ianlyoo"/>
    <language>en</language>
    <item>
      <title>Replay the run before you trust the rule: building SpecterTrace with Kiro</title>
      <dc:creator>AhnRyu</dc:creator>
      <pubDate>Sun, 29 Nov 2026 04:00:09 +0000</pubDate>
      <link>https://dev.to/ianlyoo/replay-the-run-before-you-trust-the-rule-building-spectertrace-with-kiro-4bda</link>
      <guid>https://dev.to/ianlyoo/replay-the-run-before-you-trust-the-rule-building-spectertrace-with-kiro-4bda</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is written as part of the Kiroween 2026 hackathon.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Kiro lets you write permission rules in &lt;code&gt;~/.kiro/settings/permissions.yaml&lt;/code&gt;: allow this, ask about that, deny the rest. That is a good design. The problem is the moment after you write a rule. Would it have stopped the thing that worried you yesterday? Would it have interrupted ten harmless reads on the way? You can't tell, because the run that worried you is over.&lt;/p&gt;

&lt;p&gt;So we built SpecterTrace: one small skeleton that reads Kiro's own logs and replays them deterministically, and two different apps on top of it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autopsy&lt;/strong&gt; opens a Kiro IDE session file or a &lt;code&gt;kiro-cli&lt;/code&gt; stream and puts every tool call, permission request and hook run on one timeline. Behind each event is the exact source line and who decided.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wards&lt;/strong&gt; takes two rule sets and the same recorded requests, and shows, request by request, what each set would have decided, where they first differ, and what changes when the run is headless.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The demo case is a trusted headless run that appends &lt;code&gt;/.kiro/&lt;/code&gt; to &lt;code&gt;.gitignore&lt;/code&gt;, which quietly hides every new spec from Git. (It's a synthetic sample, but you can see how it happens.)&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/XwW8_c_qY5A" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Kiro wrote it; we steered
&lt;/h2&gt;

&lt;p&gt;Every line of product code, every spec, steering file, hook and test in the repository was written by Kiro. The exceptions, stated plainly: branch merges and their conflict resolutions were done at the keyboard, and the real sample was sanitized with Kiro's own tool and read by a person before Kiro added it. Our part was the developer's chair: deciding what to build, writing prompts, reading diffs, accepting or sending work back. When a reviewer found a problem, it went back to Kiro as a prompt, never as a patch. The table of who did what is in the README: &lt;a href="https://github.com/ianlyoo/spectertrace#who-did-what" rel="noopener noreferrer"&gt;https://github.com/ianlyoo/spectertrace#who-did-what&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We used both surfaces. The core and Wards were built through &lt;code&gt;kiro-cli&lt;/code&gt; in headless mode, one fresh session per batch of tasks. Autopsy was built in the IDE with spec mode and "Start task".&lt;/p&gt;

&lt;h3&gt;
  
  
  Specs as the memory
&lt;/h3&gt;

&lt;p&gt;Four specs (&lt;code&gt;replay-core&lt;/code&gt;, &lt;code&gt;autopsy&lt;/code&gt;, &lt;code&gt;wards&lt;/code&gt;, and a small one for the &lt;code&gt;site&lt;/code&gt;), each requirements, then design, then tasks, committed before the code. Every code commit names its task. This turned out to matter for money as much as for discipline: early on we resumed one long CLI session, and every request re-sent the whole history. One session ate most of a month's credits. After that, every run started fresh, with the specs as Kiro's only memory, and a task cost a few credits instead of tens. If you take one tip from this post: keep sessions short and let the spec carry the context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steering that kept two apps apart
&lt;/h3&gt;

&lt;p&gt;The Skeleton Crew brief asks for two distinct apps on one foundation. The easy failure is one app in two skins. A steering line did the work: "The apps must stay different products. Shared behaviour goes in core; layout and interaction do not." Kiro held to it without being reminded. Autopsy has a cursor, a timeline and a drawer; Wards has no cursor at all, only two editors, a results table and a divergence strip, and neither imports the other.&lt;/p&gt;

&lt;h3&gt;
  
  
  Kiro tested Kiro
&lt;/h3&gt;

&lt;p&gt;An evaluator that disagrees with Kiro is worse than none. So Kiro wrote the experiments that check it: thirty probes, each one permission file and one request, which we ran against &lt;code&gt;kiro-cli 3.5.0&lt;/code&gt; and fed back as conformance rows. They showed that ask beats allow, deny beats ask, a user-level deny beats a workspace allow, globs are case-insensitive, a pattern without a slash matches at any depth, and one invalid rule makes Kiro refuse the whole file. Wards only lets you copy a rule whose shape is inside that checked set, labelled with the version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Kiro surprised us
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"Deny" wasn't what happened.&lt;/strong&gt; The docs say a headless &lt;code&gt;ask&lt;/code&gt; is treated as a deny. The recordings showed something more precise: the request is raised, nobody can answer, it is cancelled, the call doesn't run, and the log says the user did not reject it. Kiro proposed a separate verdict, &lt;code&gt;unanswered&lt;/code&gt;, and that word is now all over both apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The hook fired where we weren't looking.&lt;/strong&gt; We gave the repository a hook: when the agent creates a new adapter under &lt;code&gt;packages/core/src/adapters/&lt;/code&gt;, Kiro writes its contract test, a fixture and the wiring. The first version was in an old hook format and never fired. Kiro rewrote it from the current docs as a v1 &lt;code&gt;PostFileCreate&lt;/code&gt; hook. On the next run we watched for a hook card, saw none, and called it a failure. Kiro's own session log disagreed: 48 milliseconds after the adapter file was written, there is a &lt;code&gt;ContextualHookInvoked&lt;/code&gt; record, and Kiro's next words were "The hook fired. I'll follow its steps, starting with the existing patterns." Inside a spec task, the hook lands in the agent's own context. Autopsy then learned to read that record, and the session, sanitized, is now a bundled sample: open it and you see the write, then the hook, 48 ms later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It caught its own mistakes.&lt;/strong&gt; Kiro found a design violation while every test was green, and fixed it. It removed a rule change it had made without approval. For Permission Golf, the small game in Wards, it proved each hole's par is minimal with a property test: hundreds of random rule sets with fewer rules than par never solve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  From the terminal, or from Kiro
&lt;/h2&gt;

&lt;p&gt;The same comparison runs as &lt;code&gt;npm run compare&lt;/code&gt; (exit code 3 when two rule sets differ, so CI can catch it), and as a Kiro custom agent, &lt;code&gt;rule-reviewer&lt;/code&gt;, that runs it on a proposed rule change and explains what would change. The agent's own permissions allow reads and that one command, nothing else, and a test checks them with our own evaluator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Autopsy: &lt;a href="https://ianlyoo.github.io/spectertrace/autopsy/" rel="noopener noreferrer"&gt;https://ianlyoo.github.io/spectertrace/autopsy/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Wards: &lt;a href="https://ianlyoo.github.io/spectertrace/wards/" rel="noopener noreferrer"&gt;https://ianlyoo.github.io/spectertrace/wards/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source (MIT): &lt;a href="https://github.com/ianlyoo/spectertrace" rel="noopener noreferrer"&gt;https://github.com/ianlyoo/spectertrace&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Demo video: &lt;a href="https://youtu.be/XwW8_c_qY5A" rel="noopener noreferrer"&gt;https://youtu.be/XwW8_c_qY5A&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Load the Incident in either app. In Wards, flip to headless and watch every ask become unanswered. Then write the rule you would have wanted, and see where it would have stopped the run.&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>ai</category>
      <category>devtools</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
