mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(grok): deliver the role blueprint as grok's system prompt via ~/.grok/AGENTS.md
The blueprint was mounted at /app/system-prompt.md but never reached grok — a real
parity gap vs the Claude path (which passes --system-prompt-file). grok agents ran
only on the per-task prompt, missing their RoboCo role/org context.
Verified live on grok 0.2.56 that the obvious flags do NOT work headless:
`--system-prompt-override` and `--rules` are silently ignored under `grok -p`
(identical output with and without). What IS honoured is grok's instruction-file
discovery — and `$HOME/.grok/AGENTS.md` is loaded GLOBALLY regardless of --cwd
(a project AGENTS.md only loads from the cwd/project root, which would pollute the
agent's git workspace). Proven end to end: a blueprint written there makes grok
adopt the role ("I am the RoboCo intake interviewer ... -- intake-1").
write_agents_md() copies /app/system-prompt.md -> ~/.grok/AGENTS.md; the one-shot
render (grok_cli_config.main) and both interactive mains call it. No git pollution
(it lives in ~/.grok, not the workspace), and it covers repo-cwd and /app-cwd
roles alike. Reverted the non-working --system-prompt-override wiring.
This commit is contained in:
@@ -36,6 +36,10 @@ fi
|
||||
RUN_LOG="/tmp/grok-run.json"
|
||||
ERR_LOG="/tmp/grok-run.err"
|
||||
WORKSPACE="${ROBOCO_WORKSPACE:-$PWD}"
|
||||
# The role blueprint reaches grok as its system prompt via ~/.grok/AGENTS.md (a
|
||||
# global instruction file grok loads regardless of --cwd, verified live — the
|
||||
# `--system-prompt-override`/`--rules` flags are ignored in headless mode). The
|
||||
# render step above (grok_cli_config) wrote it from the mounted system prompt.
|
||||
# NOTE: grok generates its own session id and ignores a requested one (`-s` does
|
||||
# not pin it), so we do NOT pass a session id in; usage capture below reads the
|
||||
# real id back out of the JSON run log instead.
|
||||
|
||||
Reference in New Issue
Block a user