<?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: Aaryan Parveen</title>
    <description>The latest articles on DEV Community by Aaryan Parveen (@aaryanparveen).</description>
    <link>https://dev.to/aaryanparveen</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%2F4283574%2Fe0382b81-6be9-40d1-a7ab-64cdcf111106.jpg</url>
      <title>DEV Community: Aaryan Parveen</title>
      <link>https://dev.to/aaryanparveen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aaryanparveen"/>
    <language>en</language>
    <item>
      <title>My agent kept forgetting my instructions, so I built it a haunted city</title>
      <dc:creator>Aaryan Parveen</dc:creator>
      <pubDate>Fri, 04 Dec 2026 21:27:24 +0000</pubDate>
      <link>https://dev.to/aaryanparveen/my-agent-kept-forgetting-my-instructions-so-i-built-it-a-haunted-city-4068</link>
      <guid>https://dev.to/aaryanparveen/my-agent-kept-forgetting-my-instructions-so-i-built-it-a-haunted-city-4068</guid>
      <description>&lt;p&gt;&lt;em&gt;I wrote this as part of the Kiroween 2026 hackathon.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqu6v2sn0q3nl8s44fga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyqu6v2sn0q3nl8s44fga.png" alt="How many times has your agent compacted on you?" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How many times has your coding agent compacted on you?&lt;/p&gt;

&lt;p&gt;You're an hour into a session. The agent knows the codebase, knows what you asked for, and knows the handful of rules you set along the way: no new dependencies, don't touch the public API, that sort of thing. Then the chat gets too long, it gets squashed into a summary, and something quietly changes. A while later it installs the one package you said not to.&lt;/p&gt;

&lt;p&gt;Nobody tells you the rule was gone. The summary just didn't have room for it.&lt;/p&gt;

&lt;p&gt;That's what I built &lt;strong&gt;Blackout&lt;/strong&gt; for, in Kiro.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4es9kolivj1rxupvxle7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4es9kolivj1rxupvxle7.png" alt="Midnight: the clock strikes and the chat is compacted" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Blackout is an MCP server and a Kiro power. It keeps what the agent knows outside the chat, where a compaction can't reach it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It maps your repo into a graph:&lt;/strong&gt; every folder, its files, every import between them. A read-only audit writes down what each folder does, so after a compaction the agent can ask instead of re-reading everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It files your rules&lt;/strong&gt; on the folder they govern, in your exact words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It checks every compaction.&lt;/strong&gt; When Kiro writes its summary, Blackout holds it up against the ledger and calls each rule kept, weak or lost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It puts back only what was lost,&lt;/strong&gt; word for word, labelled by who set it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then it draws all of it as a haunted toon city: folders are buildings, rules are lit rooms, imports are wires, and a compaction is midnight, when the lights go out street by street.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fymf21u1urpvc2v2h30ja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fymf21u1urpvc2v2h30ja.png" alt="Explore: open a building like a dollhouse and read its rooms" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every rule is a paper notice pinned to a wall in the folder it governs, word for word:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8mvi2jpmdw30cnqdwnnf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8mvi2jpmdw30cnqdwnnf.png" alt="A rule pinned to the wall, word for word" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the same codebase as a graph, or as a map:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Farrort6qx628bzsa2zus.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Farrort6qx628bzsa2zus.png" alt="The graph view: folders, files and rules" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvqixl5ryd8p6ms5r3pim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvqixl5ryd8p6ms5r3pim.png" alt="The map view" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A real session
&lt;/h2&gt;

&lt;p&gt;I installed Blackout from npm into a fresh Kiro, opened the Blackout repo itself, gave it three rules, and kept working until Kiro hit 79% of its context and compacted on its own.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffghfcwvxhyhx67znw2dm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffghfcwvxhyhx67znw2dm.png" alt="Kiro compacts the chat, and Blackout's hook puts back what the summary lost" width="799" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Blackout's PostCompact hook checked the real summary. All three of my rules came through, but ten facts about the code had been blurred or dropped, things like which function guards the folder paths. It put all ten back.&lt;/p&gt;

&lt;p&gt;Then I tried to break it and asked Kiro to add chalk. That's a new dependency.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fke1w9l8f7wwf0bladszs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fke1w9l8f7wwf0bladszs.png" alt="Kiro refuses, and quotes the rule back" width="799" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kiro said no and quoted my rule back at me.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it in Kiro
&lt;/h2&gt;

&lt;p&gt;Everything except the 3D city assets was built in the Kiro IDE.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spec first.&lt;/strong&gt; I started with a Kiro spec: requirements, then design, then a task list I worked through. It forced me to decide what "kept" and "lost" actually mean before writing any code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Steering&lt;/strong&gt; kept the agent on my conventions across a long build: how the backend is laid out, how the viewer works, the camera rules for the film.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hooks&lt;/strong&gt; are the heart of it. Six of them: UserPromptSubmit files rules from what you type, PostToolUse tracks which files are in context, PreCompact and PostCompact wrap Kiro's compaction, PostFileSave flags stale audits, and Stop checks the turn against your rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP&lt;/strong&gt; gives Kiro 22 tools to map, audit, file, check and restore.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A power&lt;/strong&gt; packages all of it, so setting it up is one npm install and a copy into &lt;code&gt;.kiro&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The meta part I liked most: I was building a tool about agents losing context while my own agent was losing context. Blackout ended up guarding its own build.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8g5rgs3laf2eyzn1gt4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8g5rgs3laf2eyzn1gt4p.png" alt="The import graph drawn as a constellation over the city" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How well it works
&lt;/h2&gt;

&lt;p&gt;Blackout catches 96% of the rules a compaction summary drops or blurs, on a benchmark of 143 compaction cases across 20 areas: APIs, security, data, UI and more. On the third of the cases held out from tuning, it caught 31 of 34 and never re-sent a rule that came through intact. And in the real Kiro session above, it caught all ten facts the summary lost and put them back.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Live city: &lt;a href="https://blackout.aaryanparveen.com" rel="noopener noreferrer"&gt;blackout.aaryanparveen.com&lt;/a&gt; (the Runs tab has the real session)&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/aaryanparveen/blackout" rel="noopener noreferrer"&gt;github.com/aaryanparveen/blackout&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install: &lt;code&gt;npx -y blackout-ledger mcp&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your codebase is next.&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>ai</category>
      <category>mcp</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
