{"slug": "show-hn-stackmaestro-local-management-of-agent-generated-stacks", "title": "Show HN: StackMaestro – Local management of agent-generated stacks", "summary": "Developer Mark Lyons released StackMaestro 0.1.0, an open-source tool that infers a stack-first view of branches and pull requests from git ancestry, requiring no hand-maintained plan, backend or database. StackMaestro stores coordination state — claims, agent identity and layer titles — in a single file, `.git/stackmaestro/state.json`, shared across every worktree of a clone, and ships as a Cursor/VS Code sidebar, an MCP server exposing 9 tools (`list_stack`, `plan_feature`, `register_agent`, `claim_layer`, `release_layer`, `create_layer`, `ensure_worktree`, `publish_layer`, `sync_github_stack`), and a macOS-only desktop app. The tool requires the authenticated GitHub CLI (`gh`) plus Node 20+ and pnpm, and publishes layers as draft PRs registered through GitHub's native Stacked-PRs API; claims carry a 90-minute TTL and are local-machine-only by design.", "body_md": "A stack-first view of your branches and PRs, inferred from git ancestry —\nno hand-maintained plan, no backend, no database. Coordination state\n(claims, agent identity, layer titles) lives in one file,\n`.git/stackmaestro/state.json`, shared across every worktree of a clone.\n\nRead more: [StackMaestro: trying to make agent-written code understandable by humans](https://mklyons.com/blog/stackmaestro).\n\nThree ways to use it: a Cursor/VS Code sidebar, an MCP server for any agent's chat, and a standalone desktop app.\n\n- **[GitHub CLI (`gh`)](https://cli.github.com), installed *and* authenticated** (`gh auth login` ) — required. StackMaestro shells out to it for every\nPR/stack operation (`gh pr create` ,`gh pr list` ,`gh api .../stacks` );\nwithout it, publishing and PR status just fail.\n- Node 20+, [pnpm](https://pnpm.io) (`corepack enable` picks up the\nversion this repo pins automatically)\n- A regular git repo with a GitHub remote\n\n```\ngit clone https://github.com/marklyons/stackmaestro && cd stackmaestro\npnpm install\npnpm -r build\npnpm --filter stackmaestro package              # → apps/extension/stackmaestro-0.1.0.vsix\ncursor --install-extension apps/extension/stackmaestro-0.1.0.vsix\n```\n\nNo `cursor` on your PATH? Cmd+Shift+P → \"Shell Command: Install 'cursor'\ncommand in PATH\", or substitute `code`. Open any git repo afterward — the\nExplorer sidebar gets a \"StackMaestro\" section under your file tree.\n\nClaude Code:\n\n```\nclaude mcp add --scope user stackmaestro -- node /absolute/path/to/stackmaestro/apps/mcp-server/dist/index.js\n```\n\nCursor — add to `~/.cursor/mcp.json`:\n\n```\n{\n  \"mcpServers\": {\n    \"stackmaestro\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/stackmaestro/apps/mcp-server/dist/index.js\"]\n    }\n  }\n}\n```\n\nExposes 9 tools: `list_stack`, `plan_feature`, `register_agent`,\n`claim_layer`, `release_layer`, `create_layer`, `ensure_worktree`,\n`publish_layer`, `sync_github_stack`.\n\n```\npnpm --filter @stackmaestro/desktop package:app   # macOS only → apps/desktop/release/StackMaestro.app\nopen apps/desktop/release/StackMaestro.app\n```\n\nQuick iteration without a real app bundle: `pnpm --filter @stackmaestro/desktop start`.\n\n- **Stack = git ancestry.** A branch's parent is its closest real ancestor\nby commit graph — no naming convention, no separate plan file.`plan_feature` /`create_layer` also record the declared parent at\ncreation time, so a freshly-planned stack shows up correctly nested\nbefore anyone's committed a line.\n- **Claims** mark \"someone's working on this layer\" — name, reason, 90\n-minute TTL. A conflicting claim is rejected with who already holds it.\n- **Agent identity.** Call`register_agent` once (prompt, optional`lab` for branding, optional`parentAgentId` if spawned by another agent)\nbefore claiming anything. You get an`agentId` and a Greek-mythology\nname, shown as a floating badge with a lab-colored icon, and a\n\"subagent of X\" lineage tag when applicable.\n- **Publishing** pushes the branch, opens a draft PR against its stack\nparent, and registers/extends it as a real GitHub stack (native\nStacked-PRs API) — linked on github.com, not just base-branch-chained.\n\n- Marketplace publishing / a signed desktop installer\n- UI for picking a sibling on a genuine fork (two children on one layer)\n- Agent registrations aren't pruned (claims expire; registrations don't)\n- Remote/team visibility — claims are local-machine-only by design", "url": "https://wpnews.pro/news/show-hn-stackmaestro-local-management-of-agent-generated-stacks", "canonical_source": "https://github.com/marklyons/stackmaestro", "published_at": "2026-11-26 02:25:09+00:00", "updated_at": "2026-11-26 02:42:46.607293+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "agent-protocols", "ai-tools"], "entities": ["StackMaestro", "Mark Lyons", "GitHub", "Cursor", "Visual Studio Code", "Claude Code", "GitHub CLI", "pnpm"], "also_reported_by": [], "takeaway": "StackMaestro derives stack structure from git ancestry instead of a plan file, keeps claims and agent identity in `.git/stackmaestro/state.json` with a 90-minute claim TTL, and exposes 9 MCP tools including `claim_layer` and `publish_layer` for coordinating multiple agents on stacked PRs.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-stackmaestro-local-management-of-agent-generated-stacks", "markdown": "https://wpnews.pro/news/show-hn-stackmaestro-local-management-of-agent-generated-stacks.md", "text": "https://wpnews.pro/news/show-hn-stackmaestro-local-management-of-agent-generated-stacks.txt", "jsonld": "https://wpnews.pro/news/show-hn-stackmaestro-local-management-of-agent-generated-stacks.jsonld"}}