Skip to content

StackWise v1: a Mac app, a library of plans on disk, layers, test plans and docs - #6

Open
Mikey-Ku wants to merge 23 commits into
mainfrom
claude/v1-final
Open

Mikey-Ku wants to merge 23 commits into
mainfrom
claude/v1-final

Conversation

@Mikey-Ku

@Mikey-Ku Mikey-Ku commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

StackWise v1: a local platform with a Mac app, a library of plans on disk, a canvas in layers, test plans for every build task, and docs that read like a project page.

What changed

  • A home for plans in ~/.stackwise: profile.json (name, theme, the defaults a new plan starts with, who answers in Ask, folders), library.json, and one file per plan in plans/. The browser's store is a cache; the files are the record, and the newer side wins per plan. Routes: /api/profile, /api/library, /api/projects (projects found under your folders), /api/agents (installed coding agents, and whether Claude Code points at StackWise).
  • A sidebar shell: /projects (welcome, your plans, projects on this computer, examples) and /settings (profile, folders, coding agent cards with one Connect button, AI keys, the MCP server's status). The canvas stays full screen.
  • A Mac app (electron/): Electron starts the standalone Next server on 127.0.0.1:4310, lives in the menu bar, and opens the same pages with a Mac title bar. pnpm app:build makes the dmg (Apple Silicon; ad-hoc signed, so first launch needs right-click, Open). Inside the app, exported projects point agents at the running MCP server over HTTP and keys are saved in ~/.stackwise.
  • Layers on the canvas: parts sit in four labeled zones around the app (where it runs, people, data, outside services); tidy up places by layer, so a plan reads as a system design.
  • Test plans over MCP: get_test_plan (what to check, how to keep the real service out, what not to test, the limits StackWise knows). The task brief from get_build_plan, the build-<part> agents and TASKS.md carry the same plan.
  • Cuts: the Project panel's live tools (run, probes, SQL, git worktrees), the extra AI presets, and the write-to-folder export.
  • Docs: README (install, five minutes in, how it works, questions), docs/MCP.md (every tool with an example call and a real trimmed response), CLAUDE.md's map.

Added after the first round of feedback

  • The chat pane: Ask is a fixed side panel on the left of the canvas (New chat, starters, the thread, a composer that picks the answerer, the model and the part), open by default on a wide window. The canvas, the bar, the planning sheet and the dock make room for it.
  • Settings in sections: Account, General, Appearance, Models, Agents, picked from a list on the left and kept in the URL hash. Models holds a key and a model picker per built-in AI (saved as the provider's model variable, read on every call; Claude stays on claude-opus-5 until someone picks another).
  • No AI gate: the planner starts at Describe; the AI lives in the top-right pill and Settings. Projects and Settings buttons sit beside the plan's name on the canvas.
  • The Projects page renders on the server from the library on disk (whole on first paint, skeletons for projects still being found), and a plan made there is on disk before the canvas opens it.
  • Mac app fixes: the window loads its page only once the server answers (a load sent earlier was refused and left the window blank for good), a loading page while it starts, the bar clear of the traffic lights, and the app opens on Projects. A new window no longer adds an empty "Untitled app" to the library.

Verified

  • pnpm test (330), pnpm typecheck, pnpm lint, pnpm build, pnpm app:build end to end.
  • The packaged server runs from a copy of the .app outside the repo (every page 200, profile in that copy's home, MCP tools answer), so no dependency is resolved from the repo's node_modules.
  • In the browser: the Projects and Settings pages, the layered canvas, dragging a card (lines follow), Details on click, every MCP tool against the shared plan with curl.

After merging

  • Build the dmg with pnpm app:build and attach release/StackWise-0.1.0-arm64.dmg to a GitHub release, which the README's install section links to.

🤖 Generated with Claude Code

…d the write-to-folder export

StackWise is about seeing and understanding the system, not running it. Gone: running and
stopping the app, the SQL console, live service checks and extra-agent git worktrees (with the
pg dependency); DeepSeek, OpenRouter, Groq, Mistral and the custom endpoint; and the
"write it into a folder" form in Export. Kept: linking a folder, setting env values into its
.env.local, the app icon, Claude, OpenAI, Gemini and Ollama, the zip export and the MCP export.
…y and your projects

Every plan now lives on disk (~/.stackwise/plans, or STACKWISE_HOME), beside the profile that
holds your name, the defaults for a new plan and the folders StackWise looks in. The app, the
stackwise command and the MCP server read the same library; the browser keeps a copy so it
opens at once, and the newer copy of each plan wins when they differ. Plans shared from the old
.stackwise folder in the repo move over once. A plan linked to a project is written there as
stackwise.plan.json. New routes: /api/profile, /api/library, /api/projects (what's under your
folders) and /api/agents (which coding agents are installed, and connecting Claude Code).
Projects greets you by name, lists every plan in your library, the projects StackWise found
under your folders (plan one in a click), and the examples. Settings holds your profile and the
defaults for a new plan, the folders to look in, the coding agents on this computer (Claude Code
connects to StackWise with one button), the AI keys and the MCP server's address. Review facts
moves into the same shell; /apps redirects to /projects.
StackWise is a downloadable Mac app now: Electron starts the standalone Next
server on 127.0.0.1:4310, keeps it in the menu bar, and opens the same pages in
a window with a Mac title bar. `pnpm app:build` makes the dmg (standalone
output copied without pnpm's symlinks, Apple Silicon). Inside the app, exported
projects point agents at the running MCP server over HTTP instead of a pnpm
command, and keys are saved in ~/.stackwise.

The canvas groups parts into four layers around the app: where it runs, people,
data, and outside services. Each layer is a labeled zone, tidy up places parts
by layer, and a plan reads as a system design.
get_test_plan says how to test one task of the build plan: what to check (one
test each), how to keep the real service out of the tests, what not to test,
and the limits StackWise knows for that service so the first test covers the
edge the plan will hit. The task brief from get_build_plan, the agent files
(## Test it) and TASKS.md carry the same plan, so an agent writes the tests
before building and never spends credit or charges a card from a test.
…rs and test plans

The README reads like a project page: install (the dmg, or from source), five
minutes in, how it works, where things live on disk, working with a coding
agent, questions, safety. docs/MCP.md is a tool reference: every tool with its
arguments, an example call and a trimmed real response, plus how to connect any
agent, share a plan, pair, and what an exported project holds. CLAUDE.md's map
covers src/local, the sidebar pages, electron/, layers and test plans.
"Make this the default" in Ask saved only this browser's choice, while
Settings wrote the profile; now both write both, and a browser that hasn't
chosen starts with the profile's answerer.
…ntact

Three things made the first dmg wrong: electron-builder packed the repo's 300 MB
node_modules into app.asar, left node_modules out of the standalone it copied,
and the standalone flattened by cp -L lost @swc/helpers, because Node resolves
a package's dependencies from where pnpm's symlink points. Now electron/ is
the builder project (its package.json has no dependencies, so app.asar holds
four files), electron/build.cjs runs electron-builder there with pnpm's npm_*
variables stripped so it doesn't ask pnpm for the repo's tree, pack.cjs keeps
the symlinks and makes them relative, and after-pack.cjs copies the standalone
into the bundle before signing. Verified by running the packaged server from a
copy of the .app outside the repo. The dmg is 142 MB.
pnpm 12 refuses to install when a dependency's build script is neither allowed
nor denied, and had left a placeholder line in pnpm-workspace.yaml.
electron-builder pulls in electron-winstaller, whose script only downloads
Windows installer tools; the app is built for Mac.
…an empty plan

The Mac app opened on the canvas of a fresh "Untitled app" instead of the
library. And every new browser context (a new window, a test run) pushed its
untouched starting plan into ~/.stackwise, so the library filled with empty
drafts. A fresh browser's blank plan is dropped when the library already has
plans, and the library's open plan opens instead; on the very first run it
stays, since there's nothing else.
On a fresh launch the window asked for the page before the server was
listening, the load failed with ECONNREFUSED, and Electron showed nothing for
it: a blank gray window that never recovered. Now the window comes up at once
(gray, visible from creation rather than shown on ready-to-show), loads the
page when /api/status answers, and retries a load that fails.
Ask is a chat pane docked on the left of the canvas: New chat, starters when
nothing's been said, the thread, and a composer whose bottom row picks who
answers, which model (for a built-in AI) and which part it's about. It shares
the left side with the panels, so opening one closes the other.

Settings is one section at a time, picked from a list on the left and kept in
the URL hash: Account, General, Appearance, Models and Agents. Models is where
a built-in AI gets its key and its model; the model is saved as the provider's
model variable through /api/keys and read on every call, so a pick applies at
once (Claude stays on claude-opus-5 until someone picks another).

In the Mac app the bar sits clear of the traffic lights, on their centerline.
…anvas, a loading page

The chat pane is part of the layout now: full height on the left, flat, with
the traffic lights in its corner in the Mac app; the canvas, the bar, the
planning sheet and the dock make room for it. It opens by default on a window
1100px or wider and remembers its state.

Nothing asks for an AI before you can plan: the planner starts at Describe,
and the AI lives in the top-right pill and Settings, Models. The bar has
Projects and Settings buttons beside the plan's name.

The Projects page renders on the server from the library on disk, so it comes
up whole (skeletons for the projects still being found, a soft fade), and a
plan made there is on disk before the canvas opens it. The Mac app shows its
own loading page while the server starts.
A fresh browser starts with a blank plan and saves it a moment after it
mounts. Pushed before the pull came back, that blank plan joined the library
as one more "Untitled app" (the canvas mounts, saves, then pulls). Pushes are
gated until the page has taken the library once; after that, what's pushed is
the merge. A plan made on the Projects page is flushed explicitly.
The pane starts at 340px and its edge drags like the other panels (double-click
resets, arrow keys work), kept per browser. Learn is a shell page like
Projects and Settings: the sidebar on the left, its table of contents where
Settings has its section list, no top bar of its own. The page fade-ins are
gone: a page is solid the moment it arrives.
A change on the canvas, an answer, a starting point, or a change an agent made
becomes two turns in the chat: what changed, as if the person had typed it,
then what it did: the parts that changed and why each was picked (the pick
reason and the close call), the checks that appeared or went away, the plan's
verdict and the cost before and after, and a note written for the old pick.
src/engine/narrate.ts is pure and uses the same plan diff as the MCP server;
no AI is involved, so it's instant and works with nothing connected.
…d the narrator

A doc edit truncated the file (a write opened before its read) and the empty
file went into 80fd4c7. Restored from the commit before, with the three lines
that round was meant to add.
…n on every launch

The bar on top is one flat toolbar the canvas starts under and the chat pane
sits beside, with the plan, the summary and the AI, Ask and Export controls in
it; the floating pills sat oddly next to a fixed side panel. The pane's header
is the same height and shares its edge. In the Mac app the traffic lights sit
in that row (the pane's or the bar's), and both rows drag the window. The pane
opens on every launch on a wide window; closing it lasts for the session.
…llapses

The composer's two bubbles are the provider (Claude, ChatGPT, Gemini, or
StackWise's facts with no AI) and the model under it, where the provider's
terminal agent sits next to the API's models; picking a model saves it.
The part selector is gone from the composer (it read as a project switcher):
the header shows which part the chat is about, and right-clicking a part or
naming one in a message still focuses it. The pane's X is a collapse control,
the line under its header is gone, and its type scales with the window.
…e, from the providers' pages

The provider menu is names alone (Claude, ChatGPT, Gemini, StackWise). The
model menu names each model the way its provider does (Opus 5.5, Fable 5.1,
GPT-6 Luna, Gemini 3.8 Flash) with its context window and its price per
million tokens beside it; MODEL_INFO in providers.ts holds the figures with
the page they came from and the date, like any fact here. Settings' model
picker shows the same. A menu's name always shows whole now; it's the hint
that trims.
The model menu's second section is the model; the first says how the provider
is reached (its agent in your terminal, or its API). Through the API the pick
is StackWise's own setting, as before. Through Claude Code it's the model
Claude Code's new sessions start with: StackWise writes the model key of
~/.claude/settings.json and touches nothing else there, the same way Connect
writes its MCP entry. The Claude Code card in Settings has the same picker.
An alias Claude Code already has (opus[1m]) shows as it is.
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