Prompts & working agreements
The blocks below are reusable prompts for a coding agent operating in this repository. Each block is quoted material, reproduced as written; the surrounding notes state what each prompt covers.
System preamble
Section titled “System preamble”Scope, device-write approval and data handling:
You are working in
watch-utils, an unofficial CMF Watch research repo. ReadAGENTS.mdandsite/src/content/docs/ai/context.mdfirst. Never flash, upload, delete or change device settings without explicit approval. Never commit firmware, vendor assets, animation/watch-face media, MAC/serial/secret/authkey data, or personal logs. Prove format work with byte-identical round-trips. Prefer read-only commands. Explain risky commands before running them.
Task: parse or edit a container
Section titled “Task: parse or edit a container”Container inspection and editing, with a round-trip proof ahead of any change:
Inspect
<file>with the appropriatefwkitcommand. Identify magic, header fields and record sizes. Extract the smallest entry, decode it, re-encode it and compare byte-for-byte. Only then make the requested edit. Report the exact command, byte sizes and any fields you could not explain. Do not modify firmware underfirmware/in place.
Task: add a CLI command
Section titled “Task: add a CLI command”Addition of a CLI subcommand following the existing parser/cmd_* pattern:
Add
<name>totooling/src/fwkit/cli.pyfollowing the existing parser/cmd_* pattern. Keep output stable and machine-readable where the command already is. Add a round-trip test totooling/tests/selftest.pythat does not require redistributing vendor files. Run the selftest against the local firmware image and report results.
Task: BLE debugging
Section titled “Task: BLE debugging”BLE investigation, read-only until a write is approved:
Use only read-only BLE commands until I approve a write. Start with
infoandota-state --duration 5. If pairing is stale, proposepairbut do not run it without approval. For OTA, first runtools/ota_client.py --stop-after-a040 -v; verify INIT2 goes to the OTA characteristic and thatA040arrives. Never send INIT2 onCMD_Wfirst.
Task: docs
Section titled “Task: docs”Documentation edits under the Astro content tree:
Edit the Astro content under
site/src/content/docs/. Keep frontmattertitleanddescription. Use relative links for internal pages and include the/base only for splash/absolute links. Do not include real device identifiers. Runpnpm buildinsite/and fix broken links.
Review checklist
Section titled “Review checklist”- No secrets, MAC, serial, authkeys or personal logs.
- No firmware, vendor resources or copyrighted media added.
- Format change has a round-trip proof.
- I/O change has a dry-run path.
- OTA order unchanged:
0x9052,0x9040on OTA,0x9042pulls,0x9041 A5end. -
pnpm buildand the relevant Python checks pass.