Skip to content

feat(harnesses): add Grok Build TUI adapter - #122

Open
DevMasterDru wants to merge 3 commits into
e0ipso:mainfrom
DevMasterDru:feat/grok-harness
Open

feat(harnesses): add Grok Build TUI adapter#122
DevMasterDru wants to merge 3 commits into
e0ipso:mainfrom
DevMasterDru:feat/grok-harness

Conversation

@DevMasterDru

Copy link
Copy Markdown

Why

Grok Build TUI is a first-class coding harness (skills, SessionStart/Stop/SessionEnd/PreCompact hooks, grok -p headless) but is not in kenkeep's adapter registry. Reusing the Claude adapter does not work:

  • Grok ignores hook stdout on SessionStart and UserPromptSubmit (no additionalContext).
  • Claude capture requires UUID v4 + transcript_path. Grok session ids are UUIDv7 and transcripts live at ~/.grok/sessions/<encoded-cwd>/<id>/chat_history.jsonl.

This is the same class of adapter as Copilot/OpenCode.

What

  • New src/harnesses/grok/ adapter: GROK_AGENT=1 detect, .grok/hooks/kk.json, capture from Grok session files (realpath-confined), headless grok -p --output-format json --yolo.
  • No prompt-time injection (Grok has no verified channel).
  • Dual-harness: Claude kenkeep hooks no-op when GROK_AGENT=1. Skills stay in .claude/skills/ when that tree already exists.
  • npx kenkeep init --harnesses grok (or claude,grok).
  • listMemoryFiles returns [] (do not use Grok experimental memory).

Install (consumer)

npx kenkeep init --harnesses grok
npx kenkeep --harness grok doctor

Grok project hooks stay silent until /hooks-trust (or grok --trust).

Test plan

  • npm test / npm run typecheck (641 passed; 2 Linux-only notify-send tests skipped on macOS).
  • init --harnesses grok + doctor --harness grok.
  • Dual claude,grok: skills not duplicated under .grok/skills/.

Grok ignores SessionStart/UserPromptSubmit stdout, so reuse of the Claude
hooks cannot capture or inject. Add a first-class grok adapter (hooks under
.grok/hooks/kk.json, transcripts from ~/.grok/sessions, GROK_AGENT detect)
and no-op Claude kenkeep hooks when GROK_AGENT=1 so dual-harness installs
do not double-fire.
Agents run skills/kenkeep-init/scripts/init-repo.sh to git-init, wire
claude+grok, write the CLAUDE.md pointer, and doctor. install-cli.sh
symlinks the skill into ~/.agents/skills and ~/.claude/skills.
Every repo initialized by the skill now wires claude,codex,grok. Doctor
runs across all installed adapters. Surface Codex /hooks trust next to
Grok /hooks-trust.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant