# Build a Nano app with a coding agent: implementation spec

Follow these steps in order. Each step ends with a check. Stop and ask the site owner when a step says "ask".

- Guide: https://nano133.com/guides/build-with-a-coding-agent · as Markdown: https://nano133.com/guides/build-with-a-coding-agent.md
- Stage: **Alpha**. We ran its code and its checks pass. It read a real node (read only), or, if it needs no node, it ran on real signatures or real files. Where it copies code that nano133.com runs, a test shows both act the same. Last checked 2026-10-25. No node needed. Test script on real files: passed.
- Use at your own risk, for education.
- Code files: https://nano133.com/guides/build-with-a-coding-agent/code/agent-guard.mjs

## Rules that must hold

1. Follow the guide's spec in order and run each step's check. Keep every rule of the brief. When a rule and a step seem to disagree, stop and ask the owner.
2. Never read, write, move or print a secret, a seed or a key. Never change a cloud account, an access setting, a secret, a deploy or CI file, or the node's settings: tell the owner what to change. Never run code with a wallet that holds real Nano.
3. Test with the guide's mock node and with secrets that the test makes. Never give a test a real wallet, a real seed or a node that you do not own.
4. Run the guard before you say that you are done, and fix every finding. Never change the guard, its list or `.agent-never` to make a finding go away: tell the owner. Never add the guard to CI or a hook yourself.

## Steps

The guide has the how for each step. This list has what must be true at its end.

1. **Give the agent the guide's pack, not the page.** Check: open `https://nano133.com/guides/index.json`: it lists every guide with its stage, the day it was last checked, and the addresses of its Markdown copy, spec, prompt, test script and code files. A guide that needs no node says so.
2. **Tell the agent the rules.** Check: ask your agent: “What must you never touch, and what do you ask me first?” It lists the two lists of the brief, in its own words.
3. **Say what it must never touch.** Check: give the guard a list of changed paths that holds `.env`, `infra/main.tf` and `.github/workflows/deploy.yml`: it refuses each one (step 5).
4. **Give it a mock node and throwaway secrets.** Check: `node test.mjs` in a guide's folder prints `Mock mode: a fake node on this computer. Nothing is sent.` and ends with `0 failed`.
5. **Run the guard on every change.** Check: in a project with a seed written in a file, the guard prints `src/config.mjs:1  seed-in-file …`, `1 finding`, and ends with exit code 1. In a project without one it prints `no findings` and ends with exit code 0. Run `node test.mjs` in this guide's folder: all its checks pass, and the guard wrote no file.
6. **Read the money code yourself.** Check: for each of the seven, you can name the file and the line. If you cannot, the agent has not finished.
7. **Start small.** Check: your agent's last message names the stage of the guide and of the track, says what it checked and what it did not, and shows the output of `node test.mjs` and `node agent-guard.mjs .`.

## Done when

- [ ] Step 1 check passes.
- [ ] Step 2 check passes.
- [ ] Step 3 check passes.
- [ ] Step 4 check passes.
- [ ] Step 5 check passes.
- [ ] Step 6 check passes.
- [ ] Step 7 check passes.
- [ ] `node test.mjs` passes (put the code files next to it). It needs no node and sends nothing.
- [ ] You told the owner the stage of this guide and of the track you used.

## What breaks, and what it costs

| Failure | Loss in Nano | Check |
| --- | --- | --- |
| A seed or a key is in a file, a log or a message | Everything the wallet holds, and every wallet made from the seed | Steps 2, 3 and 5: the brief, `seed-in-file`, `secret-file` and `log-secret` |
| A test sends real Nano | The amount that the test sent | Steps 4 and 5: the mock node, throwaway secrets, `real-money-test` |
| An amount goes through floating point | A payment is credited at the wrong value, or never matched | Step 5 (`float-money`) and step 6, item 2 |
| A destination comes from a request or a row | The money goes where someone else chose | Step 6, item 1: a person reads it. No script finds this one |
| The agent changes an account, a secret or a deploy file | Access to a secret, or the site's money flow, if it is exposed or cut | Steps 3 and 5: the permission settings of your agent and `changed-path` |
| The agent weakens the guard | Every check that the guard gave | Step 5: the guard and its list refuse their own change |
| The guard says “no findings” and the code is wrong | Whatever the mistake costs | Step 6: a person reads the money code |
| A Pre-alpha guide is built as if it were proven | Whatever its untested part costs | Step 7: ask for the stage, and start with a tiny amount |

## Notes for agents

You are reading this guide as the agent that builds the owner's app. Ask the owner for these four things before you start. Never guess them:

1. The file or setting where you keep your instructions, so that you can put the brief there, and the permission settings of your tool: ask the owner to deny you writes to the paths of the "never touch" list and the commands that deploy or change an account.
2. The paths and patterns that are the owner's and not yours, for `.agent-never` (a deploy file, a payout list, a settings file). The owner writes that file.
3. Who adds the guard to the project's checks (a pre-commit hook or CI). The owner does it. You do not.
4. The guide the owner wants built, and the platform (a track), so that you follow its spec and tell the owner its stage.

Keep every rule of the brief. Never read, print, log, store or send a seed, a key or a secret. Never run code with a wallet that holds real Nano. Never change a cloud account, an access setting, a secret, a deploy or CI file, the guard or its list. Test with the guide's mock node and with secrets that the test makes. Before you say that you are done, run `node test.mjs` and `node agent-guard.mjs .`, fix every finding, and show the owner the output, the stage of the guide and the track, and what you did not check.
