# Eyes on the target and the bug-to-check ledger (free sample)

A free sample from Revive Old Tech with Coding Agents, by PaperChaseWebb. Written for Claude Code and Codex, and plain Markdown, so it works with any coding agent that can run a terminal.

When people use coding agents to make old hardware and software work again, two habits separate the projects that finish from the ones that go in circles. The agent can see the target, and every lesson becomes a check that runs on every build. This sample gives you both.

## What is inside

| Section | What it is for |
|---|---|
| 1. Eyes on the target | Seven ways to let the agent see what the device is doing |
| 2. The bug-to-check ledger | A CHECKS.md template and the kinds of checks that work |
| 3. Two prompts | Build the eyes, and turn a fixed bug into a check |

## 1. Eyes on the target

Rule: if the agent cannot see it, the agent may not claim it works.

| Method | Best for | How |
|---|---|---|
| Status block in memory | Drivers, plugins, firmware | Your code writes a small struct (state, counters, last error) at a fixed place. The agent reads it over a debug link after every run. |
| Log ring | Same | A fixed-size ring of log lines the agent reads remotely. |
| Serial console | Microcontrollers, watches, routers | A script reads the serial port and saves logs per run. |
| Bus trace | USB and network devices | Capture the working and broken side with the same settings and diff them. |
| Simulator screenshot | Anything with a screen | Compile the same UI code for desktop and capture images headlessly. |
| Emulator state | Consoles and old PCs | Headless emulator with memory reads or screenshots on command. |
| Your description | Anything | Describe the screen in a fixed format: DO, LOOK FOR, REPLY WITH. |

## 2. The bug-to-check ledger

```
# CHECKS.md
| Date | What broke | Rule learned | Check added | Where |
|---|---|---|---|---|
| [date] | [symptom] | [one-line rule] | [what fails the build now] | [script path] |
```

Checks that work well: grep or objdump checks on build output, host tests against a real reference, a recorded good trace the new build must reproduce, and hash checks on any file you patch.

## 3. Two prompts

**Build the eyes**
```
Add a status block and a log ring to our code: [fields]. Write a script that reads both from the target over [link] and prints a ten-line summary. Run it once and show me the output.
```

**Bug to check**
```
We just fixed [bug]. Write the rule we learned in one line, add a check that fails the build if it is broken again, add a row to CHECKS.md, and prove it: show the check failing on the old code and passing on the new.
```

## The full pack

Revive Old Tech with Coding Agents adds the line we hold on legal and safety questions, a REVIVAL.md brief, six revival lanes (dropped devices, missing drivers, crashing old software, new firmware, console homebrew, old media), the closed loop script, working from a reference, ordered goals with three-part proof, do-no-damage rules, a rules block for CLAUDE.md and AGENTS.md, and 14 prompts.

Sources for the habits above: the Xbox 360 Series controller driver by Jacckii (https://github.com/Jacckii/Xbox360-Series-Controllers-Native), the smartwatch firmware report by u/cyberdinn (https://www.reddit.com/r/ClaudeAI/comments/1xe7pzk/claude_code_wrote_a_fromscratch_firmware_for_my/) and the scanner driver write-up by Christian F.K. Schaller (https://blogs.gnome.org/uraeus/2026/10/15/aiandreverseengineerhardware/).

License: personal and commercial use.
