LazyBoy2/docs/PRODUCT.md

39 lines
4.1 KiB
Markdown
Raw Normal View History

2026-09-13 16:38:32 +00:00
# GrokBoy product
2026-09-13 16:38:32 +00:00
GrokBoy is a general-purpose local CLI agent: **observe → decide → act → verify → respond**. The model chooses the next action from the current environment and user objective. Scenario playbooks are optional guidance, never a fixed task router.
2026-09-13 16:38:32 +00:00
The interaction rules below describe legacy single-session mode. Named-agent mode keeps new chat separate from background work and uses task-specific controls.
2026-09-13 16:38:32 +00:00
## 人類與 agent 接手原則
2026-09-13 16:38:32 +00:00
這是通用任務規則不限登入或特定網站agent 先使用可行工具;某個步驟需要人類處理時,說明阻礙並交接最小必要操作,保留 task、計畫與資源 session。人類完成後重新觀察再繼續工作。仍有阻礙時提供具體替代路線與停止選項不把單一步驟卡住直接當成整份任務不能做也不重複無效嘗試。
2026-09-13 16:38:32 +00:00
主 agent 會收到背景 worker 的實際工具清單,因此知道它可以交辦瀏覽器/檔案/指令工作。舊對話中的「沒有瀏覽器能力」不會被當成目前能力的依據。登入憑證在工具瀏覽器由人類輸入,不在聊天收集。
2026-09-13 16:38:32 +00:00
## Interaction
2026-09-13 16:38:32 +00:00
- For action tasks, a concise opening explains what the agent will do and is followed by actual tool execution.
- Multi-stage work uses a short `update_plan` checklist. Progress updates report findings and next actions. The agent can revise the plan with an explanation; plan approval is not required.
- Plain text ends a turn only when no known plan steps or command remain active. Standalone progress uses `report_progress`, which continues the loop.
- One stdin broker handles idle tasks, live steering, questions, confirmation and handoff. Input received during work is applied at the next safe tool/model boundary; started effects are not rolled back.
- `request_user_input` handles missing information, `request_user_confirm` handles explicit approval, and `browser_handoff` handles auth walls. Questions and terminal tools must be called alone, so their answers/results can inform subsequent actions.
- Ctrl-C or `/stop` cancels a running turn and preserves resumable state. The REPL remains open; a one-shot run exits 130.
2026-09-13 16:38:32 +00:00
## Runtime
2026-09-13 16:38:32 +00:00
Model requests are bounded by `GROKBOY_MAX_ROUNDS_TOTAL`. `GROKBOY_MAX_ROUNDS` only controls local progress frequency. There are no additional model calls to manufacture progress summaries. A 20-second heartbeat identifies the operation actually being awaited.
2026-09-13 16:38:32 +00:00
Three identical action/result rounds stop as blocked. Three rounds consisting only of commentary/plan updates or invalid control calls also stop. Successful controlled waits use their own deadlines and the total request ceiling rather than the identical-output guard.
2026-09-13 16:38:32 +00:00
The core publishes typed events through `Runtime::set_event_handler`; CLI formatting lives in the binary. Tool output, not narrative promises, drives the next request. Process output is streamed to local files and returned incrementally, with one foreground process group per session.
2026-09-13 16:38:32 +00:00
Checkpoint before and after tools, retain plan/pending questions/command metadata/browser URL, and pair every call with a result. On recovery, missing outcomes become explicit unknown results; never replay automatically. Persistent browser profiles include session cookies. Context trimming operates on request copies, preserving stored history, system instructions and user constraints.
2026-09-13 16:38:32 +00:00
## Boundaries
2026-09-13 16:38:32 +00:00
Current target: macOS CLI, existing xAI/OpenAI-compatible API, optional Playwright DOM browser. Persistent named agents use a local daemon, private memory and a background task scheduler; see [TEAM](TEAM.md). No separate search key, UI, MCP, PTY, desktop pixel control, cross-machine protocol, or OS sandbox in this version. Browser-only canvas apps and arbitrary natural-language task correctness remain outside what this MVP can guarantee.
2026-09-13 16:38:32 +00:00
Legacy `chat` stays a no-tools streaming chat. `shell` stays available with a 30-second deadline. Synchronous human-wait library helpers are retained for AUTO/offline compatibility; interactive callers must supply the runtime input broker.
2026-09-13 16:38:32 +00:00
See [CLI-FLOW](CLI-FLOW.md) for the implementation contract and [ACCEPTANCE](ACCEPTANCE.md) for tests.