Zero Labs
Industry News / AI

Your Computer Is a Garrison. It Needs a Staff Officer

Source · Towards AI By MD Rafsun Sheikh

From the publisher’s feed, collected in the ZeroLabs newsroom.

I built a dashboard to run every project on my machine. Then I spent far longer making it run on anyone else’s.GSO-1 / V0.1.0 / APACHE-2.0There are thirty-odd folders in my projects directory. Four of them are running right now and I am not completely certain which four. Two are on a branch I abandoned in March. One is holding port 3000 hostage and I will find out which one by killing things until the error goes away.Starting any of them means remembering whether it was npm run dev, ./run.sh, uvicorn app:app --reload, or that one make serve I wrote in 2023 and have never typed since.This is not a hard problem. It is a staff problem. And armies solved it a century ago.FIG. 1 The GSO-1 siteThe name is the whole designIn a division headquarters there is an officer called the GSO-1: General Staff Officer Grade 1, a Lieutenant Colonel who heads the General Staff branch. He is the right hand of the GOC, the General Officer Commanding the division. He plans the operations, keeps the picture current, and drafts the orders the commander signs. Below him sit the GSO-2, a Major, and the GSO-3, a Captain. In peace and in war, the division runs through him.He works from the Ops Room, the nerve centre where the maps, the traces, the unit locations, the strengths and the intelligence are all displayed and kept up to date. It is where the commander is briefed, and where decisions actually get made, because it is the one place the whole situation can be seen at once.Here is the move: your computer is your garrison, and you are its GOC.You decide what gets built and what ships. You should not also be the person tracking which of thirty services is currently up. That is staff work. It always was. So I built the staff officer, and I called it GSO-1, and the screen it works from is the Ops Room.I want to be careful here, because software people love a metaphor and most of them are decoration. This one isn’t. It made specific decisions for me, and I can show you which.FIG 2: The Ops Room dashboardA 1960s staff manual is a surprisingly good product specWhile building this I went looking for what the old British Army manuals actually say a General Staff Officer is for. A 1964 document titled Hints to General Staff Officers turns out to read like a design review.Four principles from it, and what each one changed in the software:“Serve the commander wisely and well.” The tool’s job is to know things so you don’t have to. GSO-1 walks every project, works out how each one starts, and gives you a start button. It detects Node, Django, FastAPI, Flask, Streamlit, Rust, Go, static sites and plain Python. And it always defers to a project’s own run.sh or Makefile over its own guess. An explicit instruction from the unit beats staff inference. Always.“Stay largely invisible; the commander gets the credit.” GSO-1 has no opinions about how you build software. It does not want to be your framework, your runtime, or your workflow. It starts what you already built, in the way you already built it, and then it gets out of the way. There is no GSO-1 config format to learn. There is one environment variable most people ever touch.“Shield the commander from unnecessary detail, reserving him for the important decisions.” This is the whole home screen. Thirty repos, and the Ops Room leads with the four that actually need you: the dirty ones, the stale ones, the one that crashed, the one holding a port. Everything else is one click away and silent until it isn’t.“Never be a ‘yes man’.” A staff officer who only reports good news is worse than having no staff officer, because now you’re confidently wrong. So GSO-1 shows the crashed process, the failed run, and the port conflict plainly, in red, on the first screen, in the same band as everything that is fine. A dashboard that is always green is a dashboard nobody checks.What it actually doesFIG. 3 One question on first run, then it gets out of the way.Point it at a folder. It lists everything inside, works out how each project starts, and gives you a row per app with a start button, a live health light, and the git state.Start and stop anything, without remembering how. Each app runs in its own process group; logs stream to a file per app.Real health, not hope: process tracking plus a port probe, reporting healthy, starting, crashed or stopped.Port conflicts found before launch, rather than after the stack trace.Git at a glance across every repo, branch, dirty count, ahead/behind, last commit, with fast-forward updates from the dashboard.Multiple roots, so your personal projects and your work checkouts each get their own tab.Agents with a seatbelt. GSO-1 can drive a claude CLI session inside any project it manages. Read-only tools run themselves; anything that writes a file or runs a command stops for an explicit Allow or Deny.Your own hardware. A built-in Anthropic→llama proxy points an agent session at your local llama-server, so the whole session can run on your GPU.It binds to 127.0.0.1 by default and uploads nothing. It is a control plane for a machine you already own.FIG. 4 The companion at /m, behind a token you set on purpose.The part nobody warns you aboutEverything above took a while, but it was the fun kind of while. Then I decided to let other people install it, and discovered that I had not built an application. I had built a checkout.This is the part I actually want to tell you about, because I don’t think it’s specific to my project at all.Five ways a tool says “this only runs on my machine”I went looking for everything that assumed it was running on my laptop. I found five, and none of them would have thrown an error during development, because during development every one of those assumptions was true.1. A hardcoded home directory. The dashboard abbreviated long paths to ~/… by comparing against a string literal of my own home directory. On anyone else's machine, paths just silently rendered in full. The fix is dull, the server reports the real home directory and the UI uses that, but the interesting part is that this bug is invisible to its author by construction.2. An identity in the markup. The greeting, the sidebar card, and both avatars had my name typed into the HTML. It now comes from the OS account record. One detail worth stealing: I take the whole name rather than the first word, because splitting on the first token greets “MD Rafsun Sheikh” as “MD”, and every rule you write for detecting a name prefix is wrong for somebody.3. State written inside the application directory. The registry, logs and scheduler state all lived in /data. That is perfectly fine for a checkout and completely broken for a packaged app, where the bundle is read-only on macOS and lives in Program Files on Windows. State now resolves per platform (Application Support, %APPDATA%, XDG_DATA_HOME) and stays beside the code in a source checkout so existing installs don't lose anything.4. A default pointing at my own stuff. The site CMS module defaulted to a specific Jekyll checkout, my personal blog, and named it in the module docstring. There is no sensible default for “which of your repositories is your blog”, so there no longer is one: the feature stays switched off until an environment variable names a real checkout.5. A security-relevant default that was also a personal path. The agent sidecar’s sandbox root, the only directory the agent is allowed to write to, defaulted to a fixed path under my home directory. On any other machine that names a directory that does not exist. It now resolves from the sidecar’s own install location. This is the one that bothered me most, because it was a wrong default in a security boundary, and it was wrong in the quiet direction.If you take one thing from this section: grep your own source for your own username before you publish anything. I added it to CI, so the build now fails on any /Users/ or /home/ path in the codebase. The first thing that lint caught was a comment I had written in the commit that introduced the lint.Freezing a Python server into something people can double-clickThe backend is FastAPI and uvicorn. The desktop shell is Electron. The requirement was that a user needs no Python at all.PyInstaller does this, with one caveat worth knowing: uvicorn and FastAPI resolve a lot of their machinery by string at runtime, so static analysis misses it and you get a binary that builds cleanly and then dies on boot. Collecting the packages wholesale via collect_submodules is the reliable fix. The result is a self-contained server of about 34 MB that carries the dashboard's static files inside the bundle.Electron then ships that binary as an extra resource. When the app detects it is packaged, it spawns the bundled server directly and points its state at the per-user data directory. When it is running from a checkout, it takes the original development path unchanged, so npm start in the repo behaves exactly as it always did. Two modes, one shell, and the dev experience is not sacrificed to the packaging.The hard requirement I set was that quitting must leave no orphans. The server runs in its own process group and gets signalled on the way out, so closing the window can never leave a headless uvicorn holding the port. Windows gets its own shutdown path, because there are no process groups there to signal.The first-run questionA packaged application arrives on a machine knowing nothing about it. The one thing GSO-1 genuinely cannot guess is where you keep your code.So there is exactly one first-run screen: pick the folder. Browse it, or type a path, or add several roots. It is not dismissible, because there is no dashboard behind it until a folder is chosen.Two small decisions in there I’d defend:The screen is styled with inline styles rather than the app’s utility classes. The stylesheet is a purged Tailwind build that gets regenerated by hand, and the one screen a fresh install absolutely must render correctly cannot depend on a build artefact being current.And an unreadable folder offers you Home and / as a way back, rather than reporting failure and stranding you on the one screen you're not allowed to skip. My first version just printed an error. That is a dead end on the very first thing a new user sees.FIG. 5 Six projects, six stacks: node, script, static, python, go, rust. It worked out the kind on its own.Four CI failures, none of them my codeTagging the release and watching it fail on all platforms, four times, in four different ways:The PyInstaller spec used working-directory-relative paths. I built it from inside build/, CI builds from the repo root, so pathex=[".."] resolved to the parent of the checkout. PyInstaller cheerfully produced a binary with no application on its path, which then failed at startup rather than at build time. Everything is anchored to the spec's own location now.electron-builder was told to publish and told not to. The build step exported GH_TOKEN, which is enough for electron-builder to infer a GitHub publish provider and start assembling auto-update metadata, which then dereferences a publish config that --publish never never built:TypeError: Cannot read properties of null (reading 'channel') at computeChannelNames (updateInfoBuilder.ts)The token was never needed; the release is assembled from uploaded artifacts in a separate job. I reproduced this locally with the token set before changing anything. The fix then took two minutes. The reproduction is what made it a fix rather than a guess, and I’d recommend it as a general habit.The .deb target requires an author email. The manifest only had a name. Easy, but it fails the whole Linux job.The macOS Intel job never failed at all, it queued forever. GitHub has retired the macos-13 Intel runners, so a job pinned to them waits for a machine that is not coming. This one cost the most wall-clock time precisely because it wasn't an error. A single Apple Silicon runner cross-builds both architectures, which is what the local build had been doing all along.Then it went green, and it has been green since.A note on what this thing can doGSO-1 starts processes and runs commands as you. That is the entire feature set, and it is also the threat model. Anyone who can reach its port can run code as you.So: loopback only by default, unreachable from the network. Remote access refused outright unless you set a token. Agent writes and commands require explicit approval.While auditing before release I found a real one. The remote-auth allowlist matched public paths with startswith, so the prefix /m, the phone companion, would also have matched a future /models or /metrics, exposing them to the network without a token. Nothing exposed at the time actually collided, so nothing was reachable. But the gate was one route name away from opening, and the next person to add a top-level endpoint would never have known. Prefixes now match on a path boundary, verified across eighteen cases.I mention it because “no vulnerability was exploitable” and “the design was safe” are different statements, and only the first one was true.If you’re about to ship your own toolThe generalisable parts, as briefly as I can put them:Your dev environment is a set of assumptions, not a baseline. Every one of my five portability bugs was true-by-construction on my machine and therefore invisible.Lint for your own identity. Username, home directory, personal repos, employer paths. Make CI fail on it. It will catch you at least once.A packaged app cannot write where it lives. Decide where state goes before you package, not after.Reproduce build failures locally before fixing them. Every one of my CI fixes took minutes once reproduced and would have been guesswork otherwise.Ship the failure states in your screenshots. A dashboard that is always green teaches people not to look at it.Get itGSO-1 is Apache-2.0 and installs on macOS, Windows and Linux. On first run it asks which folder holds your projects. That is the entire setup: no Python, no terminal, no config file.Download: github.com/rafsunsheikh/gso-1/releasesSource: github.com/rafsunsheikh/gso-1Site: rafsunsheikh.github.io/gso-1Current builds are unsigned, so macOS and Windows will ask you to allow the app once. If GSO-1 guesses the wrong run command for your stack, that is the single easiest pull request in the repository, and I would genuinely like to have it.Your computer is your garrison. You shouldn’t have to do the staff work too.Sources and honest limitsThe military background is drawn from published descriptions of the British and Commonwealth staff system, the GSO-1’s role at division headquarters, the GSO-2/GSO-3 structure beneath it, and the function of an operations room as the place where the current picture is maintained and the commander is briefed. The four principles quoted are from Hints to General Staff Officers (1964), which is available online. I am describing a staff system as documented, not claiming personal military service.Figures in this article that you can check yourself: the repository is 45 commits and 105 tracked files; the backend is roughly 6,700 lines of Python and the agent sidecar about 1,500 lines of TypeScript; the published installers are 112 to 156 MB depending on platform. The frozen backend size of “about 34 MB” is a measurement from my own build machine and will vary with platform and Python version. The four CI failures are each traceable to the commit that fixed them.Disclaimer: While building the application, I took the opportunity to use Vibe coding. And yes, writing this article, I took help from Generative AI. Why riding horse, when cars are already on the road? Although, it matters who is behind the wheel, right?Your Computer Is a Garrison. It Needs a Staff Officer was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.