Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1d777c6
docs(brainstorm): genie MCP server design (SHIP-reviewed) — Warp + Cl…
namastex888 Jul 3, 2026
ad7044e
docs(wishes): genie-mcp wish (SHIP-reviewed) — Warp + Claude Code con…
namastex888 Jul 3, 2026
9e97600
chore(version): bump to 5.260703.2 [auto-version]
github-actions[bot] Jul 3, 2026
c350dea
chore(genie-mcp): spike verdict hand-rolled, mcp contract pinned
namastex888 Jul 3, 2026
37e457f
feat(mcp): auto-register genie mcp into Warp + Claude Code configs
namastex888 Jul 3, 2026
d5d2327
feat(mcp): genie mcp stdio server — Warp + Claude Code read genie state
namastex888 Jul 3, 2026
8055a5b
Merge pull request #2508 from automagik-dev/wish/genie-mcp
namastex888 Jul 3, 2026
37ed79e
chore(version): bump to 5.260703.3 [auto-version]
github-actions[bot] Jul 3, 2026
96cf5c3
docs(omni-approval-ux): reviewed wish + G1 spike (SHIP) on current dev
namastex888 Jul 3, 2026
24df536
docs(omni-approval-ux): tick G1 spike done
namastex888 Jul 3, 2026
72e87fe
feat(omni): correlate approvals by real stanza id + reaction resolve
namastex888 Jul 3, 2026
483df2a
feat(omni): two-state ⏳→✅ approval acks + reconciliation
namastex888 Jul 3, 2026
301d5b2
docs(omni-approval-ux): record the LOW upgrade-instant residual
namastex888 Jul 3, 2026
0b039da
Merge pull request #2509 from automagik-dev/wish/omni-approval-ux
namastex888 Jul 3, 2026
bb7cd7c
chore(version): bump to 5.260703.4 [auto-version]
github-actions[bot] Jul 3, 2026
6592980
fix(mcp): drop non-object JSON-RPC lines so a bare 'null' can't crash…
namastex888 Jul 3, 2026
c15f803
Merge pull request #2511 from automagik-dev/fix/mcp-null-request-crash
namastex888 Jul 3, 2026
c60e1e3
fix(mcp): db-backed branch resolution + reopen db created mid-session
namastex888 Jul 3, 2026
9dedcd7
fix(mcp): address #2512 review — db-handle leak, verified branch reso…
namastex888 Jul 3, 2026
3fe6f1c
Merge pull request #2512 from automagik-dev/fix/mcp-branch-resolve-an…
namastex888 Jul 3, 2026
3fc8b90
chore(version): bump to 5.260703.5 [auto-version]
github-actions[bot] Jul 3, 2026
633bfa7
fix(doctor): enforce strictly-below hook-timeout contract at the boun…
namastex888 Jul 3, 2026
fafcb7d
Merge pull request #2513 from automagik-dev/fix/doctor-hook-timeout-s…
namastex888 Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugins": [
{
"name": "genie",
"version": "5.260703.1",
"version": "5.260703.5",
"source": "./plugins/genie",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
}
Expand Down
2 changes: 2 additions & 0 deletions .genie/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@

- [WISH: v5-completion](wishes/v5-completion/WISH.md) — CLAUDE.md-for-v5 rewrite ∥ Codex launch target + Hermes decision ∥ distribution 5.x (drafted 2026-07-02)
- [WISH: dispatch-inproc-default](wishes/dispatch-inproc-default/WISH.md) — HIGH discovered defect: v5 hooks fall open by default (daemon deleted in demolition); re-arm branch-guard + unblock omni approvals (drafted 2026-07-02)
- [WISH: omni-approval-ux](wishes/omni-approval-ux/WISH.md) — correlated approval identity, reaction approve/deny, anti-spam feedback; grounded in the 2026-07-03 live WhatsApp QA (drafted 2026-07-03)
- [WISH: omni-runner-port](wishes/omni-runner-port/WISH.md) — umbrella Group 5: approval-capture spike, global genie.db queue, genie omni serve, inbound one-shot (drafted 2026-07-02)
- [WISH: warp-integration](wishes/warp-integration/WISH.md) — umbrella Group 3: genie init, Warp launch-config emitter, genie launch, /work multi-session opt-in (drafted 2026-07-02)

## Poured
- [genie-mcp](brainstorms/genie-mcp/DESIGN.md) · [WISH](wishes/genie-mcp/WISH.md) — genie MCP server: Warp/Claude Code/Codex consume genie.db state read-only; stdio, auto-registered; spike-first (2026-07-03)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the scope to Warp + Claude Code here.

This spike is the evidence for the release, so saying it “auto-serves Claude Code + Codex” overstates what was actually validated and conflicts with the rest of the genie-mcp docs and PR scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.genie/INDEX.md at line 17, The genie-mcp index entry overstates the
validated scope by mentioning Codex and auto-serving behavior that was not part
of the spike. Update the entry in INDEX.md so it only reflects the confirmed
Warp + Claude Code scope, and keep the wording aligned with the genie-mcp DESIGN
and WISH docs by removing any Codex or broader auto-registration claims.


- [Genie v5 — lightweight body](brainstorms/genie-v5-lightweight-body/DESIGN.md) — skills+files+stock Warp replace the v4 harness; CC/Codex/Hermes targets; omni keeps one runner; crystallized 2026-07-01, umbrella-scale (8 seed groups)
- [WISH: v5-foundation](wishes/v5-foundation/WISH.md) — umbrella Groups 1+2: genie.db engine + CLI + core skills — DONE 2026-07-02, all groups SHIP
Expand Down
64 changes: 64 additions & 0 deletions .genie/brainstorms/genie-mcp/DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Design: genie MCP server — Warp + Claude Code consume genie state

| Field | Value |
|-------|-------|
| **Slug** | `genie-mcp` |
| **Date** | 2026-07-03 |
| **WRS** | 100/100 |

## Problem
Genie's live state (wishes, tasks, board, what each worktree/pane is working on) is invisible to Warp and to the agents running inside it — there is no interface for Warp or a Claude Code session to read genie's state; the only Warp touchpoint today is a one-shot launch-config emitter.

## Scope
### IN
- A `genie mcp` **stdio MCP server** exposing genie.db state READ-ONLY as MCP tools + resources: `genie_board` (counts + tasks, optional wish filter), `genie_wish_status` (a wish's group/DAG progress), `genie_worktree_context` (resolve the caller's git BRANCH — `wish/<slug>-<group>` — → its wish, group, and tasks; the per-pane "what am I here for"), `genie_task` (detail by id), `genie_active` (all in-progress + who claimed what). Read layer already exists (`task-state.ts`: getBoardByName, listTasks{wish,status}, getTask, getWishGroups, claimed_by).
- The server opens genie.db **read-only via a net-new `new Database(path,{readonly:true})`** (NOT the existing `openSqlite()`, which force-creates + runs write pragmas) and DEGRADES to an empty board when the db file is absent.
- **Auto-registration for Warp + Claude Code**: `genie init` (and `genie launch` per worktree) writes/merges the PROJECT-scoped `<repo>/.warp/.mcp.json` (Warp) AND `<repo>/.mcp.json` (Claude Code), registering the `genie mcp` command under `mcpServers` — JSON parse → merge only the genie entry → preserve all other keys/servers → byte-identical rerun.
- A minimal automated MCP-protocol test driving the stdio server (initialize → tools/list → tools/call) + a non-MCP-path init probe (the MCP transport/dep must not load on `genie board`/`task`/etc.).
- Docs: how Warp/Claude Code pick up the genie MCP server; the honest tab-info limitation.

### OUT
- WRITE tools (claim/complete task, create/advance wish) — a later wish; designed-for but not built (no second mutation path now; avoids racing the CLI/skills + §19/branch-guard rules).
- **Codex coverage** — Codex reads `~/.codex/config.toml` (TOML, global), NOT `.mcp.json`; wiring genie into Codex's global TOML is a separate later item. (Warp *detecting* Codex's config ≠ Codex seeing genie.) This wish covers **Warp + Claude Code** only.
- HTTP/SSE transport / any resident daemon (stdio only — fits the zero-daemon body).
- Pushing tab titles/blocks into Warp from outside — Warp exposes no such API (passive integration only); pane titles come from the launch config, live status from Warp's native Claude-Code integration.
- Any omni work; the global ~/.genie/genie.db omni tables (this is per-repo task/wish state first).

## Approach
`genie mcp` is a stdio JSON-RPC MCP server that opens the per-repo `genie.db` read-only and answers `initialize`, `tools/list`, `tools/call`, `resources/list`, `resources/read`. MCP clients (Warp, Claude Code) launch it on demand as a CLI-command server per the project `.warp/.mcp.json` / `.mcp.json` that `genie init`/`launch` write. `genie_worktree_context` maps the caller's git branch (`wish/<slug>-<group>`, the stable key — the worktree base dir is configurable via `GENIE_WORKTREES_DIR`) + genie.db → the pane's job. Alternatives considered: HTTP/SSE server (rejected — daemon); pushing state into Warp's UI (impossible — no API); a bespoke non-MCP protocol (rejected — MCP is the standard Warp + Claude Code both speak).

## Decisions
| Decision | Rationale |
|----------|-----------|
| Read-only mirror now; write later | Delivers the "Warp consumes genie state" ask safely; no second mutation path racing the CLI/skills/§19 |
| stdio CLI-command server, not HTTP/SSE | Zero-daemon lightweight-body fit; MCP client launches it on demand, reads genie.db, exits |
| Auto-register Warp + Claude Code (.warp/.mcp.json + .mcp.json) | Both speak MCP and both are covered by these two project files; Codex uses a different (global TOML) format → deferred. Registering both is nearly free and bigger than Warp-only |
| Read-only open is NET-NEW code, owned by G2 | The existing `openSqlite()` always opens read-write with write pragmas; the server must open `{readonly:true}` itself + handle db-absent — not a reuse |
| G1 SPIKE decides hand-rolled MCP vs official SDK | genie is 4-deps-lean (hand-rolled JSON-RPC-over-stdio avoids a 5th dep, like Bun.YAML) BUT must actually satisfy real Warp + Claude Code MCP clients — verify against both before committing (dynamic-import the SDK like nats if needed) |
| `genie_worktree_context` resolves by BRANCH, not path | The worktree base dir is configurable; the branch `wish/<slug>-<group>` is the stable key |
| Merge-if-exists config writes (JSON parse/merge/preserve) | Never clobber a user's existing `.warp/.mcp.json` / `.mcp.json` servers; this is new merge logic, not the gitignore line-append |

## Risks & Assumptions
| Risk | Severity | Mitigation |
|------|----------|------------|
| Hand-rolled MCP subtly incompatible with Warp/CC clients | HIGH | G1 spike tests a minimal server against BOTH real clients before building; fall back to the official SDK (dynamic-imported like nats) if hand-roll fails |
| `.warp/.mcp.json` schema / location wrong | HIGH | G1 verifies the exact schema + pins the PROJECT path `<repo>/.warp/.mcp.json` (distinct from the GLOBAL `~/.warp/launch_configurations/` the emitter uses) against a real Warp |
| MCP dep bloats non-mcp startup | MEDIUM | If SDK is used, dynamic-import it inside `genie mcp` only (nats precedent, omni.ts:10); assert via a startup probe that `board`/`task` never load it |
| Read-only DB open is unbuilt capability | MEDIUM | G2 owns a net-new `new Database(path,{readonly:true})` + db-absent degrade-to-empty; do NOT rely on `openSqlite()` |
| Config write clobbers a user's MCP servers | MEDIUM | JSON parse → merge only the genie `mcpServers` entry → preserve other keys → byte-identical rerun; test empty + populated |
| Spawn `command` not on PATH for all installs | MEDIUM | G1/G3 confirm the launch command form (global `genie` vs the dist/bun install path) so the registered command actually runs |
| worktree→wish branch resolution outside a launch worktree | LOW | Fall back to repo-level board when the branch isn't `wish/<slug>-<group>`; document |

## Execution Groups (seed for /wish)
| Group | Deliverable | Depends on | Validation |
|-------|-------------|------------|------------|
| G1 Spike | Verify: (a) minimal hand-rolled MCP stdio server satisfies real Warp + Claude Code clients (or SDK needed); (b) exact PROJECT `.warp/.mcp.json` + `.mcp.json` schema + the spawn `command` form. SPIKE.md verdict + confirmed config shape | none | SPIKE.md exists; documents transport verdict + config schema + command form with evidence from real clients |
| G2 Server | `genie mcp` stdio server + the 5 read-only tools/resources; net-new readonly genie.db open with db-absent degrade; dynamic dep load if SDK | G1 | MCP-protocol test: initialize→tools/list→tools/call returns real genie.db state; readonly + absent-db test; non-mcp init probe (dep not loaded on board/task) |
| G3 Auto-register | `genie init`/`launch` JSON-merge-write `<repo>/.warp/.mcp.json` + `<repo>/.mcp.json` (preserve other servers); docs | G1 | idempotent merge test (empty + pre-populated with another server, byte-identical rerun preserving the other server); `genie init` in a fixture registers `genie mcp`; docs updated |

## Success Criteria
- [ ] `genie mcp` answers MCP `initialize` + `tools/list` + `tools/call` over stdio and returns real genie.db state (board / wish_status / worktree_context) — automated protocol test; opens the db read-only and degrades to empty board when absent.
- [ ] `genie init` JSON-merge-writes idempotent `<repo>/.warp/.mcp.json` + `<repo>/.mcp.json` registering `genie mcp` (byte-identical on rerun; a pre-existing MCP server is preserved).
- [ ] A real Warp AND a real Claude Code session connect to `genie mcp` and read genie state (manual QA recorded in qa.md).
- [ ] Non-mcp paths (`genie board`/`task`/`--help`) do not initialize the MCP transport/dep (startup probe).
- [ ] `bun run check` + build green.
21 changes: 21 additions & 0 deletions .genie/brainstorms/genie-mcp/DRAFT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Brainstorm: genie MCP server — Warp (and any agent) consumes genie state

## Seed / evidence (2026-07-03)
- genie has NO MCP server / `mcp` command today; it only emits one-shot Warp launch_configurations (warp-launch.ts).
- State lives in `genie.db` (per-repo: tasks/wishes/board; global ~/.genie/genie.db: omni approvals/inbox).
- Warp reality (docs.warp.dev, verified): MCP servers ARE Warp's plugin surface — defined in `.warp/.mcp.json` (project) / `~/.warp/.mcp.json` (global), as a CLI command (stdio) or HTTP/SSE endpoint. Warp reads MCP defs from Claude Code/Codex/other agents + AGENTS.md/WARP.md. Warp embeds Claude Code natively with per-tab status. NO external API to directly push tab titles/blocks — integration is passive (MCP listen / file detect), not active push.
- Implication: "Warp consumes genie state" = a genie MCP server Warp connects to. Same server auto-serves Claude Code + Codex (all MCP clients) → bigger than Warp alone.

## Problem
Genie's state (wishes, tasks, board, what-each-worktree-is-doing) is invisible to Warp and to the agents running inside it; there's no way for Warp/Claude Code to read genie's live state.

## Core idea
A `genie mcp` stdio server exposing genie.db state as MCP tools/resources, auto-registered via `.warp/.mcp.json` (+ `.mcp.json` for Claude Code) by `genie init`/`launch`.

## Open questions
- Read-only state mirror vs read+write (agents drive genie via MCP)?
- Transport: stdio CLI-command (lightweight, no daemon — fits body) vs HTTP/SSE (daemon)?
- Breadth: Warp-only vs universal auto-register (Claude Code + Codex + Warp)?
- Which state matters most (board, wish progress, current-worktree context, activity)?

## WRS: Problem ✅ | Scope ░ | Decisions ░ | Risks ░ | Criteria ░
Loading