Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "delphi",
"source": "./software/plugins/claude/default",
"description": "Delphi's mod for every workspace: /ws opens a pane of workspace cards grouped by project; select one, then Switch workspace (.delphi/switch.sh)."
"description": "Delphi's mod for every workspace: /ws-delphi opens a pane of workspace cards grouped by project; select one, then Switch workspace (.delphi/switch.sh). /ws-delphi --web opens the same cards in a browser tab."
}
]
}
2 changes: 1 addition & 1 deletion .delphi/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# MINOR something new that existing clones need nothing for
# MAJOR clones need cleanup (MINOR while 0.x): add .delphi/migrations/<version>-<slug>.sh, which
# setup.sh runs once per workspace in each clone (rules in Delphi's CLAUDE.md)
version: 0.5.0
version: 0.5.1
files: # repo-relative paths; a trailing / means everything under it
- .delphi/manifest.yml
- .delphi/.gitattributes
Expand Down
2 changes: 1 addition & 1 deletion .delphi/switch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# workspace's .delphi/setup.sh (none for main). The post-checkout hook (.delphi/park.sh) parks this workspace's
# repos/, worktrees/, references/ and linked/ and restores the new one's. Runs on bash 3.2 and Git Bash.
# .delphi/switch.sh --list: fetch the ws/* branches, then print main and each workspace's name, one a
# line, `* ` before this clone's and two spaces before the others (the delphi mod's /ws pane reads it).
# line, `* ` before this clone's and two spaces before the others (the delphi mod's /ws-delphi pane reads it).
set -euo pipefail
{ # one block, so bash has read all of it before the switch replaces this file
cd "$(dirname "$0")/.."
Expand Down
1 change: 1 addition & 0 deletions .delphi/versions
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
0.4.0 ba662e754219 setup.sh warns (.delphi/plugins.sh) about enabled plugins not installed here; CLAUDE.md says how to install them
0.4.1 c5e413632e1c setup.sh also excludes what tools leave at the root: /.playwright-mcp/, /pictures/ and .DS_Store
0.5.0 6088d535fdd9 switch.sh --list prints main and the workspaces, marking this clone's; the delphi mod's /ws pane reads it
0.5.1 3fd96f222b77 the delphi mod's command is /ws-delphi (was /ws); switch.sh's comment says so
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ source of truth; `docs/goals.md` lists what any change must keep.
- `templates/workspace/`: `workspace.yml`, `CLAUDE.md` (`{{name}}`, `{{folder}}`), the managed
`.github/workflows/delphi.yml` every workspace carries unchanged. The general `new-worktree`,
`switch-workspace`, `setup-workspace`, and `journal` skills are in `software/workspace-inherit/`.
- `software/plugins/claude/default/`: the `delphi` plugin set, a mod whose `/ws` pane switches
workspaces (`hooks/register.tsx`, tests in `tests/ws.test.ts`, run by `claude plugin test`).
- `software/plugins/claude/default/`: the `delphi` plugin set, a mod whose `/ws-delphi` pane switches
workspaces (`hooks/register.tsx`, tests in `tests/ws.test.ts`, run by `claude plugin test`);
`/ws-delphi --web` serves the same cards in a browser tab (`web/server.py`, `web/index.html`).
- `software/…/workspaces/<name>/`: the workspaces. Org structure is plain directories. A project
folder (the one holding `workspaces/`) may add `README.md`, `AUTHORING.md`, and `workspace-defaults/`
(copied once into a new workspace there). Any folder may add `workspace-inherit/` (written onto the
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ histories stay joined and edits on either side meet in normal three-way merges.
git clone -b ws/software/application-software/argos/argos-dev https://github.com/Northeastern-Electric-Racing/Delphi.git delphi
cd delphi && .delphi/setup.sh # repos/ stores + default-branch worktrees in worktrees/ (git-ignored)
.delphi/switch.sh nero-experimental # switch freely (or to main; the full name works too): the hook parks them in .delphi/parked/
claude plugin install delphi@delphi --scope user # then /ws in Claude Code: a pane to keep open that switches workspaces
claude plugin install delphi@delphi --scope user # then /ws-delphi in Claude Code: a pane to keep open that switches workspaces (/ws-delphi --web: in a browser)
git switch -c my-change # edit, commit, push, open a PR into ws/software/application-software/argos/argos-dev
git fetch origin && git merge origin/ws/software/application-software/argos/argos-dev # update your branch any time
```
Expand Down
18 changes: 13 additions & 5 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ A plugin set is for what `workspace-inherit/` can't do: context only some worksp
harness features beyond files (hooks, MCP servers). It lives in `plugins/<harness>/<set>/` of a
folder (`plugins/claude/` for Claude Code; a sister folder per other harness), one copy for the
workspaces below. The one so far is `delphi`, `software/`'s `default` set (scope `delphi`): a mod
(section 5) whose `/ws` pane switches workspaces. Every workspace gets the
(section 5) whose `/ws-delphi` pane switches workspaces. Every workspace gets the
`default` set of each folder above it, which `ci/plugins.sh` lists first under `plugins:` in its
`workspace.yml` (`- argos # default, from software/application-software/argos/`; a removed line
comes back); other sets are listed there by hand (`- <scope>.<set>`). `ci/plugins.sh` generates the
Expand All @@ -127,7 +127,7 @@ rest, and `ci/check.sh` fails if the list or either file is out of date:
are silently missing. `setup.sh` warns, through `.delphi/plugins.sh`, about enabled sets not
installed for this workspace (`claude plugin list --json`: user scope, or project or local scope
for this root); install with `claude plugin install <plugin> --scope local`, which leaves the
generated file alone (`delphi` at `--scope user` also has `/ws` on `main` and in every clone).
generated file alone (`delphi` at `--scope user` also has `/ws-delphi` on `main` and in every clone).

Claude Code installs a plugin from `main` by copying only its folder, so it can't use files outside
it; at run time its skills read the workspace as usual. With no `version`, each commit to `main`
Expand Down Expand Up @@ -228,12 +228,20 @@ variable, so another harness needs only its own settings to set `DELPHI_ROOT`.
`.delphi/switch.sh <workspace>|main` moves the clone to `ws/<workspace>` (or `main`): it refuses while
tracked files have changes, fetches the branch, switches (the hook parks and restores), fast-forwards
to origin, and runs the new workspace's `setup.sh`. `switch.sh --list` prints `main` and the workspaces, `*` before this clone's. The `delphi` mod
(`software/plugins/claude/default/`) puts that in a pane to keep open: `/ws` shows them as cards grouped by project, this clone's
(`software/plugins/claude/default/`) puts that in a pane to keep open: `/ws-delphi` shows them as cards grouped by project, this clone's
marked current, with a warning when tracked files have changed; pressing a card selects it, and
**Switch workspace** runs `switch.sh` (`/ws <name>` skips the pane); since a session keeps the `CLAUDE.md` and skills it loaded, it then asks for a restart. All
**Switch workspace** runs `switch.sh` (`/ws-delphi <name>` skips the pane). No restart: Claude Code
reloads skills from `.claude/skills/` itself, and the mod sends the root's new `CLAUDE.md` with the
next prompt (once, after any change: a switch, a pull, `switch.sh` by hand), saying it replaces the
one the session started with (a user mod can't rewrite the session's own `CLAUDE.md` block). All
the git work stays in `switch.sh`, which `tests/e2e.sh` covers; the mod's own tests
(`tests/ws.test.ts`, `claude plugin test`) stub its processes, and `tests/e2e.sh` runs them when a
real `claude` is installed. The inherited `switch-workspace` skill makes it
real `claude` is installed. Optionally the same cards open in a browser tab: `/ws-delphi --web`, or the pane's
**Open in browser**, starts `web/server.py` (Python 3 stdlib) for the session on `127.0.0.1` at a
random port; it answers only requests carrying the token in its URL with a local `Host`, switches
only on a JSON `POST` (so no other page the browser has open can switch the clone), runs the same
`switch.sh`, and prints each switch, which the mod reads to update its pane. `tests/e2e.sh` runs the
real server against a sandbox clone. The inherited `switch-workspace` skill makes it
the way to work in another workspace; its `setup-workspace` skill covers `workspace.yml` (repos,
references, links) and re-running setup.

Expand Down
2 changes: 1 addition & 1 deletion software/plugins/claude/default/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delphi",
"description": "Delphi's mod for every workspace: /ws opens a pane of workspace cards grouped by project; select one, then Switch workspace (.delphi/switch.sh).",
"description": "Delphi's mod for every workspace: /ws-delphi opens a pane of workspace cards grouped by project; select one, then Switch workspace (.delphi/switch.sh). /ws-delphi --web opens the same cards in a browser tab.",
"author": {
"name": "Northeastern Electric Racing"
}
Expand Down
Loading
Loading