Our AI agent is like a dumb monkey with all the knowledge of Humanity, so a few guardrails are needed.
In case it helps anyone, this is how I did describe my desired harness, from scratch. I didn't know nor wanted to write all the ".vscode/skills" files, or the AGENTS.md file or any of that, so I asked Opus to "write a Harness and all related skills as needed, to follow this procedure on absolutely every change"... It (at least on VSCode) already comes with a harness/agent creation skill by default, so it has the ability to write a very good standarized process for you.
I've been playing with AI seriously for the first time, with a Python app that reads a spreadsheet with investment bookkeeping records and generates a pre-filled tax form. The harness prompt was somewhat like this:
----
1. A "Technical Spec Writer" subagent notes down every requested change to a SPEC.md file. This spec includes functional and behavioral descriptions, together with detailed technical documentation, includes software architecture, data models, API boundary definitions, etc. It then reviews everything for inconsistencies, mistakes, and text consolidation opportunities.
2. A "Tax Law Expert" subagent makes a due diligence review of the spec corpus, and raises any concerns it has wrt. what the actual Law mandates vs. what the spec docs say. Any concern is a blocker which gets documented and must be resolved by the owner (me) before proceeding. Ask me for clarifications, rulings, reference documentation, etc. as needed.
3. A "Software Engineer" subagent takes the spec and implements it. Reviews for obvious mistakes, variable misuses, unhandled errors. Finally, reviews the code to find DRY or refactoring opportunities.
4. A "Quality Assurance" subagent makes a final pass on the code, ensuring full compliance of the codebase with the specification. Also, tests are passed and verified.
----
I would have never imagined how deep the "Tax Expert" would make me go until "it" was satisfied with the results. The resulting spec is by no means a replacement of a human expert reviewing the tax declaration, but I am 98% confident that much more than the "happy path" of what I particularly want to cover is actually right. It asked me for clarifications or references (actual URLs so it could read them) to jurispridence on corner cases that I had not even anticipated for my own declarations.
In comparison, the actual "software engineering" must have been like 15% of the time/tokens.
It definitely helped me do a much deeper dive on the legalese than I would have done otherwise when writing something like this. (Still no replacement for an actual expert)