From 2322873c80612f61c8d33536a3bb3bf46c60c968 Mon Sep 17 00:00:00 2001 From: Nitsan Avni Date: Fri, 10 Oct 2025 23:38:44 +0200 Subject: [PATCH] Add Feedback Loop pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Describes setting up automated feedback signals so AI can iterate autonomously toward a goal. Human provides access to verification mechanism (tests, devtools, CI logs) and permission to iterate, then steps away while AI checks its own work. Elevates human from tactical executor to strategic director. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- documents/patterns/feedback-loop.md | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 documents/patterns/feedback-loop.md diff --git a/documents/patterns/feedback-loop.md b/documents/patterns/feedback-loop.md new file mode 100644 index 0000000..d464bd9 --- /dev/null +++ b/documents/patterns/feedback-loop.md @@ -0,0 +1,46 @@ +--- +authors: [nitsanavni] +related_patterns: + - playgrounds + - chain-of-small-steps +--- + +# Feedback Loop + +## Pattern +Set up automated feedback, give AI permission to iterate autonomously until goal is reached. + +1. Identify clear success signal (tests pass, UI matches design, coverage hits X%) +2. Give AI access to that signal (tests, devtools, linter, logs) +3. Grant explicit permission: "Keep iterating until tests pass" +4. Step away - AI checks its own work and keeps refining + +Human elevates from tactical executor to strategic director. + +## Example + +**Bug fix with DevTools MCP:** +- Goal: Fix layout bug in web app +- Signal: DevTools screenshots showing the visual issue +- Setup: Point AI to devtools +- Permission: "Keep trying until the layout matches the design" +- AI iterates: change code → check screenshot → adjust → repeat + +**Debugging with console logs:** +- Goal: Understand why feature behaves incorrectly +- Signal: Console output showing timing, state, assumptions +- Setup: "Add console.log to help yourself understand what's wrong" +- Permission: "Debug this until you find the root cause" +- AI iterates: add logs → run → validate assumptions → adjust → repeat + +**Getting tests to pass:** +- Goal: All tests green +- Signal: Test runner output +- Permission: "Fix the failing tests, keep running them until they all pass" +- AI iterates: read failure → fix code → run tests → repeat + +**CI monitoring:** +- Goal: Green CI build +- Signal: Direct access to CI state/logs (e.g., via `gh` CLI) +- Permission: "Monitor CI and fix issues until build passes" +- AI iterates: check status → read logs → fix → push → check again