From b41e3276c366da70dee4274243b2e9e94633e34f Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 4 Jul 2026 13:27:28 +0200 Subject: [PATCH] docs(turn-loop): add dedicated section for hyperhive.docs.enable agent.nix option The option was only mentioned in passing in the system-prompt render section. Add a proper ### section (following the pattern of Agent icon, user.passwordlessSudo, etc.) with the nix snippet, default, effect on $HIVE_DOCS_DIR + system prompt, and a note on the narrow docs flake input that avoids full container rebuilds on doc edits. --- docs/turn-loop.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/turn-loop.md b/docs/turn-loop.md index 6a3114b1..09c0a1c1 100644 --- a/docs/turn-loop.md +++ b/docs/turn-loop.md @@ -322,6 +322,25 @@ write_settings, write_system_prompt, run_turn, drive_turn, emit_turn_end, wait_for_login, compact_session}` — the single code path every agent role runs through. +### Reference docs (`hyperhive.docs.enable`) + +```nix +hyperhive.docs.enable = true; # default: false (true for the manager agent) +``` + +Mounts the hyperhive `docs/` tree read-only inside the container at +`$HIVE_DOCS_DIR` (typically `/run/hyperhive-docs`) and injects a single +pointer sentence into the agent's system prompt so it knows the docs exist +and where to find them. The mounted tree is served by `claude --add-dir` so +the full markdown is readable during every turn. + +Enabled by default only for the root/manager agent (`manager.nix`). Any +agent can opt in by adding the line above to its `agent.nix`. + +The `docs/` source is a narrow flake input (`hyperhive-docs`) tracked +separately from the main `hyperhive` flake so editing docs re-locks only +that input — not every agent's container gets rebuilt on a doc-only change. + ### Agent icon ```nix