You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Tip:** Use `--no-record-output` if you don't want stdout/stderr saved (e.g., for sensitive output). Metadata is always recorded.
327
355
328
-
> **Tip:** Create a shell alias for even less typing: `alias cc="ph wrap --auto-evolve claude"`
356
+
#### Zero-config auto-wrap: `ph shell-hook`
357
+
358
+
Don't want to type `ph wrap --auto-evolve` every time? Install a shell hook — it auto-intercepts agent commands:
359
+
360
+
```bash
361
+
ph shell-hook install # one-time setup, writes to ~/.zshrc
362
+
```
363
+
364
+
After that, just use your agent as usual:
365
+
366
+
```bash
367
+
claude -p "Refactor auth to JWT"# automatically becomes: ph wrap --auto-evolve claude -p ...
368
+
claw -p "Write payment tests"# same — auto-wrapped
369
+
codex "Add retry logic"# same
370
+
opencode -p "Fix flaky test"# same
371
+
```
372
+
373
+
How it works: a `preexec` hook in your shell detects `claude`/`claw`/`codex`/`opencode` commands and transparently redirects them through `ph wrap --auto-evolve`. Your output is unchanged.
374
+
375
+
```bash
376
+
ph shell-hook status # check if installed
377
+
ph shell-hook uninstall # remove cleanly (restores original rc file)
The key difference: **you never run `ph run` manually.** You use your agent as always; PolyHarness silently collects data and triggers evolution when it has enough signal.
329
416
330
417
### Try it now (no API key needed)
331
418
@@ -347,35 +434,7 @@ The score path above is the current measured result of the bundled `math-word-pr
347
434
348
435
## How It Works
349
436
350
-
PolyHarness runs a **Meta-Harness-style search loop** — an iterative process where an AI agent proposes, evaluates, and stores harness changes:
PolyHarness runs a **Meta-Harness-style search loop** — an iterative process where an AI agent proposes, evaluates, and stores harness changes. See the detailed flow diagrams above in [Step 4](#4-run-the-optimization-loop) and [Step 6](#6-auto-evolution).
0 commit comments