docs(runtime): reflect live reflex bodies + operator chat + self-improvement loop (#7)

Updates docs/runtime.md and README.md to match what's actually shipped:
  - reflex chain priorities and what each body now dispatches
  - operator chat command list (status, come, pause, resume, stop)
  - automatic + manual Pi escalation paths and the no-code-change rule
  - the full self-improvement loop end-to-end (detector → TUI approval
    → propose:apply → supervisor restart) with the rationale for the
    manual propose:apply step
  - new state files layout (proposals/, proposals/approved/, etc.)
  - supervisor.js + bot:bare script flags

No code changes.

Co-authored-by: Yuriy Mayatnikov <mayatnikov@me.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #7.
This commit is contained in:
Yuriy Mayatnikov
2026-05-25 16:22:38 +03:00
committed by GitHub
co-authored by mayatnikov Claude Opus 4.7
parent cd14bbf89a
commit 445524b34d
2 changed files with 130 additions and 37 deletions
+15
View File
@@ -96,8 +96,23 @@ The TUI auto-reconnects to the bot if you restart it. Press `q` to leave the TUI
| `r` | Force a fresh status snapshot. |
| `c` | Send a chat message into MC. |
| `a` | Ask Pi (one-shot subprocess). |
| `y` | Open the latest pending proposal (badge appears in status bar). In the panel: `y` approve, `n`/Esc close. |
| `q` | Quit the TUI — bot keeps running. |
### Self-improvement loop (short version)
The bot **proposes its own patches** when something repeatedly fails:
1. Reflex action fails 3× with the same label → markdown proposal lands under `state/<host>/proposals/`.
2. Status bar shows `[proposals N, press y]`.
3. Press `y` to read, `y` to approve. The proposal moves to `proposals/approved/`.
4. Run `npm run propose:apply <filename>` — spawns Pi headless on a fresh feature branch with the proposal + repo conventions. Pi writes a patch and commits.
5. Review the diff, smoke-test locally (`npm run bot`), push + open a PR by hand.
Supervisor (`npm run bot`) watches `runtime/*.js` and hot-restarts the child on file change, so during step 4 you can iterate quickly.
See [`docs/runtime.md`](./docs/runtime.md) for the full lifecycle and the operator-chat command list (`pepa_bot status`, `come`, `pause`, etc.).
## Authentication
Two dimensions: