Harness Engineering
The AI can edit code, but it keeps opening the wrong files and never runs tests. How do I make its working environment reliable?
The AI can edit code, but it keeps opening the wrong files and never runs tests. How do I make its working environment reliable?
$ read AGENTS.md Goal: add a loading state Writable: src/auth/ Check: npm test -- login
The repository map gives the agent a real entry point, protected scope, and acceptance command.
Harness Engineering designs everything around the model that makes work executable, bounded, recoverable, and verifiable.
Provide entry points and boundaries: Project instructions, repository maps, and permission rules tell the agent where to start, what it may edit, and which actions need approval.
Make actions executable: Files, terminals, browsers, sandboxes, and persistent state turn model proposals into controlled actions and allow interrupted work to resume.
Close the loop with feedback: Tests, CI, logs, and evaluations return real results to the next turn. Evidence—not the agent's own claim—decides whether the task is complete.
Read the project instructions first and list the files related to login. Make changes only inside the auth sandbox. After every change, run the login test and use failures as input to the next turn. When it passes, report the changed files, command, and result instead of only saying “done.”