Repository navigation
Work Pane
The simpleapps-work-pane plugin: a mod for SimpleApps staff that keeps a simpleapps-work project's work/ folder current and shows what they track beside the chat. Claude Code only. The plugin's README is the user guide; this page is how it works.
The pane runs in a session opened in a person's simpleapps-work project and uses that project's work/ folder where it is ($.session.root() + /work), with the same processes that built it. Nothing moves into the plugin's own data folder. Fetched Basecamp records go in the project's tmp/ (client data, never in a repo).
The pane SHOULD run only in that project. A user-scope install loads it in every project, so the mod checks for <root>/work/README.md first: without it, a session start registers /work and nothing else (no pane, no gh, no timer), and /work only says where the pane runs; /work help explains the command there too, and changes nothing. The proved startsPane and commandStep decide it (models/WorkPane.dfy, GH #33). To keep it from loading elsewhere at all, the project enables it in its checked-in .claude/settings.json (enabledPlugins), and each person installs it at user scope and disables it there; project settings override the user setting. --scope local and --scope project fail when the project's .claude is a symlink, as in simpleapps-work (SymlinkWriteRefusedError). Steps: the README's Install (GH #33).
| Part | Path | Does |
|---|---|---|
| Pane | hooks/register.tsx |
Checks for changes on a timer, draws the pane, fetches changed Basecamp todos through the SimpleApps Basecamp connector (from simpleapps-work), runs the scripts |
| Scripts |
scripts/work.ts, scripts/lib/
|
work <command> --root <project>/work: everything that reads or writes work/. Node 22.18+ type stripping, no build |
| Rules |
scripts/pane-rules.ts, scripts/work-rules.ts
|
Every decision about a value, every list the pane builds, and each step of the check and sync cycle, proved (Proofs); models/WorkPane.dfy names what stays in the shell (I/O, parsing, words built from numbers) and the test pinning each |
The pane has two views, chosen at its top: Summary (the counts, Sync, and the check's state) and List (GH #47). List draws work/list.json as the check last read it: Basecamp with a heading per site, then a heading per repo, one line per item (the id as a button that opens the item's page, a ⧉ button that copies the id with $.ui.copy, the title in Text wrap="truncate", cut at the pane's current width). The Basecamp and repo headings are the filter (buttons): proved nextFilter (clicking the same heading again clears it) and showsGroup (a filter no group has any more, after a sync, shows everything). The id is not a Link: in a terminal without hyperlinks a Link prints its URL and does nothing, and mods have no API to open a URL. So the button runs the OS's opener on it (proved openerOf: open, explorer, else xdg-open, argv with no shell), only for an https:// URL (proved isWebUrl). It reads no rows of its own: what LIST.md lists, List lists. With no watch_repos the pane watches no repo: Summary's GitHub count is 0, as the list is Basecamp only, and no GitHub change starts a sync (there was a hubs'-repos default until GH #47). sync-gh still syncs every hub's repos on each Sync.
It replaces the project's own work mod, which MUST be turned off when this plugin is installed: both register /work and a pane named work. The connector is reached as plugin:simpleapps-work:SimpleApps Basecamp ($.mcp.connect, then $.mcp.call with the name it returns). A mod's own connector calls ask no permission. The pane reports what the machine lacks: node on the PATH ($.session.machine()), a signed-in gh (gh auth status), the connector.
A project server on the connector's URL (https://basecamp.augur-mcp.com, such as a basecamp2 entry in the project's .mcp.json) MUST be removed: Claude Code drops a plugin's server when a configured one has the same URL, so the connector never loads (GH #19). When the connector is not connected, the pane reads <project>/.mcp.json and names each such server on a needs: line (remove "basecamp2" from .mcp.json: it has SimpleApps Basecamp's URL, ...), beside the machine's gaps; which URL counts is the proved isBasecampUrl. The check does not retry it, since it never clears on its own. The pane never connects to or calls a server it did not ship (owner decision, 2026-11-22). A server with that URL in the user's own config (~/.claude.json) is not read, so it shows only the plain "connect SimpleApps Basecamp" message.
| Path | What it is |
|---|---|
README.md |
The index: settings in its frontmatter (me, aliases, org, watch_repos, auto_sync, sync_minutes), the digest below it |
hubs/<hub>/README.md |
A client or project: its repos, followed_repos, basecamp_projects, sites
|
hubs/<hub>/items/<id>.md |
One open GitHub issue or PR (gh-<repo>-<n>, gh-<owner>.<repo>-<n> outside the org) or Basecamp todo (bc-todo-<n>) |
briefs/brief-<hub>.md |
A living site brief: a summary /site-brief writes, then facts work refresh rewrites |
LIST.md |
Generated, the pick list as two tables (GH #41): Basecamp todos assigned to you (Site, BC, Title; Site is the hub's first sites entry, else the hub id; by site, then newest first) and open issues in watched repos (Repo, Issue, Title; by repo, then number). Proved siteOf, todoOrder, issueOrder. With no watch_repos, Basecamp only |
list.json |
Generated with LIST.md, from the same list (GH #47): { basecamp, github }, each a list of groups (key: the site or the repo; rows: ref, url, title). A group starts where the key changes (proved startsGroup). The pane's List view reads it; not .md, so never loaded or validated as a work file |
chart.md, chart.html, graph.json, sync.log
|
Generated: the Mermaid chart, the reference graph, one line per run |
check.log |
One line per check the pane ran (work log-check, GH #34); appended atomically, trimmed to the last 200 past 400 |
Every Markdown table cell the scripts write (the briefs, the digest, the list) goes through the proved tableCell: | escaped, each run of whitespace one space. TableCellIsOneCell (models/WorkData.dfy) proves a cell has no line end and no unescaped |, so no value can split its row.
org names the GitHub org a bare repo name is in; simpleapps-com when not set. Frontmatter is a strict YAML subset (key: value, key: [a, b], key: then - item); a value written by the scripts reads back unchanged (Proofs).
An item's text (its description and each ### <author> · <when> comment) links items by: GitHub issue and PR URLs, <owner>/<repo>#<n>, <repo>#<n>, bare #<n> (an issue the text already named with that number, else the item's own repo), Basecamp todo and message URLs, and BC<n>. A number of 9+ digits after # is a Basecamp todo. A reference right after "close(s/d)", "fix(es/ed)" or "resolve(s/d)" (any case, an optional colon) closes its target. Each target is listed once, and closes is never downgraded by a later mention.
A check (every sync_minutes, once per interval across sessions) counts your open Basecamp todos (count_my_todos, whose fingerprint changes on any edit), the open issues per watched repo, and what changed since the last Sync (list_my_todo_index diffed against work/, one GitHub search for everything updated since). With auto_sync, a change starts a Sync. While the connector is still connecting, the check retries every 15 seconds, at most 8 times.
Each check that runs is logged by the scripts, not the pane (work log-check): its time, trigger, ok or failed with the parts it could not read, and whether it started a sync (proved startsAutoSync, the sync claimed in the same step, so the line is true).
- The line is made single-line (proved
oneLine) and appended in one atomic write. Past 400 lines (logOverflows) the file is trimmed to its last 200 through a temp file and a rename. Only a line written during that rare trim can be lost;sync.logis written the same way. - A tick that is not due logs nothing, so a gap means no session was checking. A failing retry with retries to come logs nothing either (
logsCheck).work statusreportslast_checkandstale: no ok line incheck.logorsync.logwithin 3 ×sync_minutes(provedisOkLogLine,isWorkStale,models/WorkData.dfy). An ok check keeps work/ current even when it found nothing to sync. The pane shows stale only after a failed check (showsStale), so a pane reopened after a gap does not flash it. Withwork statusunreadable it shows the staleness of its own$.storerecord of the last ok check or full sync (staleShown). A headless/workwaits for the opening check and any running sync, and reuses that reading unless the connector was not yet loaded (commandChecks). Per the mods docs a reload stops timers and firessession.startagain (which re-arms), and/clear,/resumeand/branchreset$.statewithoutsession.start; nothing documents a timer stopping there, so the log, not a re-arm, is how a silent gap shows (GH #34).
Without an open session (GH #35). Checks happen only where a session has the pane loaded, so auto_sync alone does not keep work/ current overnight. The README's "Sync without an open session" schedules a headless claude -p "/work check" --no-session-persistence --permission-prompts none from the project folder (launchd, cron, a systemd timer, or Task Scheduler). It schedules check, not sync: a check syncs only on a change and logs to check.log like any other. A fresh claude -p starts with the connector still connecting, so /work check and /work sync wait for it: up to three 2 s waits (proved waitsForConnector). /work check also looks again up to three times when the connector connected but its tools were not callable yet. A sync that still cannot read Basecamp refreshes GitHub with work refresh --partial:
- its
sync.logline sayspartial, whichisOkLogLinedoes not count; - the linked pass does not run (
runsLinkedPass), so no line of that sync readsok(model:UnreadBasecampWritesNoOkLine); - it records no last-sync time (proved
recordsFullSync).
So a Basecamp that stays unread turns work status STALE instead of looking synced. Not yet measured: whether a headless mod command uses model tokens.
A Sync fetches the changed todos (get_todo, five at a time) and the briefs' project todos (list_todos, all or nothing), then runs work refresh:
import-bc → sync-gh → follow (two layers out from Basecamp items and fully synced repos) → tidy (empty, unedited auto-created hubs) → brief → summary (the digest and LIST.md) → chart → validate
It stops at the first failing step, holds work/.lock (taken over after 15 minutes), and logs one line. Linked todos follow found are fetched in a second pass; one seen completed is skipped for 7 days.
The scripts were ported from the private simpleapps-work repo (GH #14) with the same behaviour, pinned by tests against the source's own code, except:
- The org comes from
org, not a constant. - Display sorting uses code-unit order where the source used
localeCompare; they differ only where_meets a digit in a repo name. - Hub slugs lower ASCII only: a project name with the Kelvin sign or a dotted capital I slugs differently.
- The digest's footer no longer names the old repo layout.