sync: auto-sync from GURU-5070 at 2026-06-04 08:09:17

Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-04 08:09:17
This commit is contained in:
2026-06-04 08:09:22 -07:00
parent d2fd68bb0a
commit 263039e21c
3 changed files with 320 additions and 0 deletions

View File

@@ -108,3 +108,37 @@ Built the `/grok` capability-router skill: `.claude/skills/grok/SKILL.md` + `scr
- Grok binary `~/.grok/bin/grok.exe` (0.2.20); auth `~/.grok/auth.json` (OIDC); config `~/.grok/config.toml` (`permission_mode=always-approve`, model grok-build). Models: grok-build (default), grok-composer-2.5-fast; agent self-reports Grok 4.3.
- Native tools: image_gen, image_edit, image_to_video, reference_to_video, web_search, web_fetch, x_keyword_search, x_semantic_search, x_user_search, x_thread_fetch, run_terminal_command, file ops, scheduler_*, monitor, memory.
- Skill: `.claude/skills/grok/`. Fleet Grok host: GURU-5070 (only install).
## Update: 08:09 PDT — /coord skill + fleet grok-flag rollout
### Summary
Built a `/coord` skill to remove the recurring "how do I call the coordination API?" friction (re-derived the message schema, broadcast convention, and payload-escaping each time). `.claude/skills/coord/scripts/coord.py` + `SKILL.md` wrap the coord API for messages, todos, locks, and status. It auto-derives the API base (identity.json `coord_api`), this session id (`<MACHINE>/claude-main`), and user/machine attribution, and bakes in the conventions: broadcast = `to_session:"ALL_SESSIONS"`, machine-name -> session-id expansion, and `--body-file`/`--text-file` for long content. Tested: `status`, `msg inbox`, `todo add`, `todo list` all work.
Used it (and direct API) to roll the new grok capability flag to the fleet two ways: a broadcast coord message (id `4407c349`, to ALL_SESSIONS) instructing each machine's next Claude session to run `migrate-identity.sh`, and a durable backstop todo (id `a3f3bde3`). identity.json is per-machine/gitignored, so each machine must populate its own `grok` block locally; the message pushes at next session start, the todo persists until done.
### Key Decisions
- Broadcast target must be `to_session:"ALL_SESSIONS"` (matches existing fleet broadcasts); an omitted/`null` target does NOT reach sessions' unread queries. Baked into the skill.
- Long coord bodies via `--body-file` (same lesson as grok `--prompt-file`): build JSON with Python, never fight shell quoting.
- Pair message + todo for fleet rollouts: a message can be read-and-forgotten; a todo is durable/queryable.
- Wrote the coord helper in Python (urllib), consistent with the b2 skill's `scripts/*.py`, so JSON + HTTP + escaping are handled natively.
### Problems Encountered
- First broadcast POST returned no id (failed) — long body with escaped quotes via curl `-d` was malformed; resolved by building the JSON payload with Python and posting `--data @file`.
- Initial broadcast used an omitted `to_session` (stored null) which would not have reached sessions; corrected to `ALL_SESSIONS` after inspecting existing fleet broadcasts.
### Configuration Changes
- NEW `.claude/skills/coord/SKILL.md`, `.claude/skills/coord/scripts/coord.py`
### Commands & Outputs
- `py .claude/skills/coord/scripts/coord.py status|msg inbox|msg send <to> <subj> --body-file <f>|todo add ...|todo list|lock claim ...`
- Sent broadcast id `4407c349` (ALL_SESSIONS); filed todo id `a3f3bde3` (grok-flag rollout).
### Pending / Incomplete Tasks
- Fleet machines re-run `migrate-identity.sh` (driven by broadcast 4407c349 + todo a3f3bde3) to populate their `grok` flag — happens as each session next starts.
- Remote Grok routing still deferred.
- Carried over: human-flow promote beta->prod; MSP360/B2 follow-ups (todos 2e50f388 / dc3a6233 / 0fed5eb2); SBS portal removal (db03f8fe); rotate leaked MSP360 API key.
### Reference Information
- Coord skill: `.claude/skills/coord/`. Coord API base from identity.json `coord_api` (default http://172.16.3.30:8001) + `/api/coord`.
- Broadcast msg `4407c349-eb37-4cf7-9b2c-75e4246d04ee`; rollout todo `a3f3bde3-b4bb-4ce9-b102-a07ea83e3ffa`.
- Protocol: `.claude/COORDINATION_PROTOCOL.md`.