@@ -1,51 +1,13 @@
1-# Implementer / adversary loop
2-
3-Delegate a unit of work to an isolated implementer, then an isolated adversarial
4-review. This session stays the overseer: it writes the task, calls the loop, and
5-audits the result with the user.
6-
7-## When to use
8-
9-- The user asks to use this workflow, the implementer/adversary loop, or `hax-loop`.
10-- The user describes a goal, feature, or change and wants it implemented that way
11- rather than in this session.
12-
13-## How to run
14-
15-1. Stay the overseer. Do not implement the work yourself. Do not ask a subagent
16- in this session to do it either.
1+---
2+description: Use when the user explicitly asks to run the implementer/adversary loop.
3+---
174
18-2. Write the **task** in prose: intended behavior, scope, constraints, and any
19- paths that matter. Pass it **verbatim**. Do not have another model restate it
20- from the repository — that is how a wrong GOAL.md becomes the spec again.
21-
22-3. From the project directory:
23-
24- ```sh
25- hax-loop "$TASK"
26- ```
27-
28- or, for a long task, pipe it:
29-
30- ```sh
31- cat <<'EOF' | hax-loop
32- <task>
33- EOF
34- ```
5+# Implementer / adversary loop
356
36- `hax-loop` runs `hax -p --preset=implementer`, prints `git status` / `git diff`,
37- then `hax -p --preset=adversary --bare`. Presets live in `~/.config/hax/config.json`.
38- The implementer is launched without skills or subagent guidance so it cannot
39- see this workflow. Nested `hax-loop` is refused.
7+Coordinate the `implementer` and `adversary` skills to work through the user's request from opposing perspectives.
408
41-4. Report the diff and the review to the user. Audit with them. If the generation
42- is wrong, call `hax-loop` again with a corrected task. Do not auto-retry until
43- the review is empty.
9+Use the `implementer` skill to produce or update the solution. Then use the `adversary` skill to challenge its direction, assumptions, and result from an independent point of view. Do not frame the adversary as a code reviewer or limit it to finding defects.
4410
45-## Notes
11+Feed useful challenges, alternatives, and missed considerations back through the `implementer` skill while preserving the user's original intent and scope. Alternate between the two skills until another pass produces no meaningful change, or progress requires a decision from the user.
4612
47-- Never call `hax-loop` from an implementer or reviewer.
48-- The task is the requirement; repository docs constrain how, they do not replace
49- the task.
50-- A loop run may take a while: if the command detaches into a background task,
51- wait on it and collect the output before reporting.
13+Do not introduce scope or change the solution away from the user request during the loop.