CodeAFWatches

Watches

A watch waits for the world to change, and acts only when it does.

Stop polling. Say what you are waiting for, and hear about it only when it happens.
  • keep main green: when a test fails, fix the code
  • tell me when a file in docs/ changes
  • once the machine is quiet, review kv.go

A watch is a standing order that wakes on a condition instead of a clock. You say what you are waiting for, and CodeAF turns it into a look it takes on every pass; a small, cheap model reads what came back against your own words. It speaks only when the answer is yes. On a yes it tells you in one line, or runs a brief in the project.

Try it in CodeAF

Where

In a conversation in your repo.

Type
Keep main green here: every few minutes run go test ./... and when a test fails, fix the code, not the test, and tell me in one line what you fixed

Then press Enter.

You see

The card reads wants to watch for something. Press 1, Watch for it, to arm it.

Three things it can wait for

Say what to wait for, 1 arms the watch, and an edit under docs/ gets one line on the next pass. Keys: Whenever any file under docs/ changes, tell me which file changed and summarise the change in one line.Enter1

The output of a command or a tool. Any shell command in the project, or any tool CodeAF has, including one a connected account brought. "Tell me when the docs site stops returning 200." "Whenever a new pull request opens, review it and leave me a summary." One look is bounded at 60 seconds, and the judgment reads the last 8 KB of what it printed.

Files. "Whenever any file under docs/ changes, tell me which one and summarise the change." Edit docs/README.md and the next pass answers with the file and one line on what changed, such as "added an Install section".

A quiet machine. "Once this machine has been quiet for 10 minutes, read kv.go and write any edge cases to IDLE-NOTES.md." It waits until nothing is running and nobody has typed for that long: heavy work that stays out of your way.

Good to know

3 on the card (Check once now) takes the look once without keeping it. A watch runs work in the project; it does not wake a team, so ask a team's manager for team work. A probe on a flaky test fires on the flake too, so point watches at checks you trust.

Things to build

  • A red-main pager: a watch on go test ./... that fixes the code, not the test, when main breaks and tells you in the chat in one line. Keep main green
  • A docs digest: "Whenever any file under docs/ changes, tell me which one and summarise the change in one line."
  • A dependency watch: "Whenever go.mod changes, list the modules that were added and what each one is for."
  • A site-down alert: "Every few minutes run curl on the docs site, and tell me when it stops returning 200." It speaks only when the answer is yes.

Go further

Keep main green: A watch runs the tests on a schedule, and when they go red, a worker fixes the code and tells you in one line.

Coming soon: describe the org you want and CodeAF builds it: teams, managers, budgets, standing orders.