Repository navigation
chore: promote dev → main (genie-mcp + omni approval UX) #2510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 ad7044e
docs(wishes): genie-mcp wish (SHIP-reviewed) — Warp + Claude Code con…
namastex888 9e97600
chore(version): bump to 5.260703.2 [auto-version]
github-actions[bot] c350dea
chore(genie-mcp): spike verdict hand-rolled, mcp contract pinned
namastex888 37e457f
feat(mcp): auto-register genie mcp into Warp + Claude Code configs
namastex888 d5d2327
feat(mcp): genie mcp stdio server — Warp + Claude Code read genie state
namastex888 8055a5b
Merge pull request #2508 from automagik-dev/wish/genie-mcp
namastex888 37ed79e
chore(version): bump to 5.260703.3 [auto-version]
github-actions[bot] 96cf5c3
docs(omni-approval-ux): reviewed wish + G1 spike (SHIP) on current dev
namastex888 24df536
docs(omni-approval-ux): tick G1 spike done
namastex888 72e87fe
feat(omni): correlate approvals by real stanza id + reaction resolve
namastex888 483df2a
feat(omni): two-state ⏳→✅ approval acks + reconciliation
namastex888 301d5b2
docs(omni-approval-ux): record the LOW upgrade-instant residual
namastex888 0b039da
Merge pull request #2509 from automagik-dev/wish/omni-approval-ux
namastex888 bb7cd7c
chore(version): bump to 5.260703.4 [auto-version]
github-actions[bot] 6592980
fix(mcp): drop non-object JSON-RPC lines so a bare 'null' can't crash…
namastex888 c15f803
Merge pull request #2511 from automagik-dev/fix/mcp-null-request-crash
namastex888 c60e1e3
fix(mcp): db-backed branch resolution + reopen db created mid-session
namastex888 9dedcd7
fix(mcp): address #2512 review — db-handle leak, verified branch reso…
namastex888 3fe6f1c
Merge pull request #2512 from automagik-dev/fix/mcp-branch-resolve-an…
namastex888 3fc8b90
chore(version): bump to 5.260703.5 [auto-version]
github-actions[bot] 633bfa7
fix(doctor): enforce strictly-below hook-timeout contract at the boun…
namastex888 fafcb7d
Merge pull request #2513 from automagik-dev/fix/doctor-hook-timeout-s…
namastex888 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 ░ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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