Skip to content

Delphi v5: workspaces as branch roots, synced by refresh/propose - #8

Merged
bracyw merged 22 commits into
mainfrom
claude/delphi-branch-root
Sep 27, 2026
Merged

bracyw merged 22 commits into
mainfrom
claude/delphi-branch-root

Conversation

@bracyw

@bracyw bracyw commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the simplest version of Delphi so far: plain git and two shell scripts in CI, with no CLI to install. Details are in docs/design.md, docs/goals.md and the README.

   ┌───────────────────────────────┐
   │ main                          │
   │ software/…/workspaces/<name>/ │
   └───────────────────────────────┘
        │                  ▲
        │ refresh          │ merge PR
        │ (CI)             │ (after check.sh)
        ▼                  │
   ┌──────────────────┐  ┌──────────────────┐
   │ ws/<name>        │  │ propose/<name>   │
   │ root = workspace │─►│ PR to main       │
   └──────────────────┘  └──────────────────┘
        │         ▲    propose (CI)
        │ branch  │ merge PR
        ▼         │
   ┌──────────────────┐
   │ your branch      │
   │ edit · commit    │
   └──────────────────┘
  • Layout:
    • The org structure exists only under software/, e.g. software/application-software/argos/.
    • Workspaces live at software/<org>/…/workspaces/<name>/. Each has a small workspace.yml (harness, repos), plus CLAUDE.md, .claude/, docs/ and .delphi/setup.sh.
  • Branches: each workspace has a branch ws/<name> whose repo root is its folder. Anyone, person or agent, checks it out and works at the root.
  • ci/sync.sh [refresh|propose] [<name>] runs with no direction (both) on every push to main or ws/**:
    • Refresh: merges main into ws/<name> with -Xsubtree=<folder>. The first run creates the branch with main as its parent, so there's no unrelated-history conflict.
    • Propose: if ws/<name> has changes main doesn't, builds propose/<name> and opens or updates a PR to main. An unchanged proposal isn't re-pushed.
    • Conflicts are reported per workspace; the other workspaces still sync.
  • ci/check.sh runs on PRs to main and validates workspace.yml, unique names, no nesting, no symlinks, and that the per-workspace managed files are identical.
  • tools/new-workspace.sh <org-path> <name> creates a workspace from templates/workspace/ and opens a PR.
  • .delphi/setup.sh, run inside a checkout, clones repos: into repos/ and git-ignores it.
  • Each workspace also carries:
    • .github/workflows/delphi.yml, because GitHub runs a push's workflow from the pushed branch, so the ws/* roots need it;
    • .gitattributes, so line endings stay LF under Git for Windows.
  • Removed: the Rust CLI, the context/ scopes and scope.yml, and the delphi-* skills.
  • argos-dev: moved to the new location with its skills unchanged, and its CLAUDE.md intro describes this workflow.

Testing

  • bash tests/e2e.sh: 30 checks pass, against a sandbox with a bare origin and a stubbed gh. They cover:
    • creating ws/* branches and the workflow at their root;
    • the full propose → merge → refresh round trip;
    • refresh and propose each on their own;
    • conflicts and recovery;
    • unchanged proposals not being re-pushed;
    • check failures, including drifted copies of managed files;
    • setup.sh, including a Windows line-ending (autocrlf) clone;
    • new-workspace.sh;
    • shellcheck.
  • ci/check.sh passes on the real repo.

Notes for reviewers

  • Repo settings:
    • Enable "Allow GitHub Actions to create pull requests".
    • Merge PRs into main with a merge commit or squash, not rebase.
  • Required checks: PRs opened by CI don't trigger check, so it can't be a required status check without a PAT or GitHub App token. sync.sh runs check itself before proposing.
  • Not yet run on real GitHub: triggering the workflow from ws/* pushes.
  • Untested platforms: setup.sh has only been tried here with Git for Windows' line-ending setting simulated, not on real macOS or Git Bash.
  • CODEOWNERS has a placeholder owner (TODO).
  • Stale PRs: if a proposal is later undone on ws/<name>, its open PR isn't closed automatically.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Cargo crate at the repo root (binary: delphi, dep: anyhow). Same commands,
files, refs and outputs; still shells out to git and gh. Repo root comes from
DELPHI_ROOT, the current directory, or the path saved by 'delphi setup'.
Integration tests run bash and Rust on the same sandbox and compare outputs.
The bash CLI stays in place until the port is adopted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Every compiled file is a 1:1 copy of one source; layouts choose per entry
between sync (linked: refresh updates, propose sends back) and copy (yours
after the first copy), plus an optional assembled instruction file and the
layout's own files/. Adds 'workspace diff [--upstream]' and shared-source
tags. Removes line-level routing, .skill specs, MCP assembly, the
interactive layout picker, and the bash CLI. Migrates argos-dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Copies follow block moves; layout new and files/ dests go through path
checks; check validates moves.tsv paths; diff warns about uncommitted
edits. A file entry may now sit inside a directory entry's dest when the
directory's source has nothing there; argos-dev syncs whole skill folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Shared git/capture/worktree helpers, typed lock rows and routing results,
smaller route/workspace functions, dead v1 leftovers removed. No behavior
changes covered by tests or the spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Workspace folders under context/<scope>/workspaces/<name>/ with
workspace.yml (instructions, links, repos), fully materialized on main.
'delphi sync' reconciles links per file against main; checkouts are
non-cone sparse clones of one folder on ws/<user>/<name>; flattened
commands (create, list, checkout, open, refresh, diff, propose, status,
mv, sync, check, setup); CI runs check + sync --check on PRs and syncs
main after merges. Removes compile, lock, generated refs, routing, copy
entries, moves.tsv, and layouts. Migrates argos-dev. Replaces the flow
diagram with the v3 version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Propose uses one merged base so reverts of shared edits propagate;
status 'ahead' counts only unpushed own commits; sync reads the owner
exec bit like git; workspace.yml can't be a link dest; link sources
can't contain workspace folders; CI splits a read-only check job from
the main-sync job and tolerates a moved main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Single fetch/commit/worktree helpers, typed provenance fields, one
dispatch table, named steps in checkout/propose/sync; mv no longer shells
out to date. CLAUDE.md module list and Cargo description match v3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Moves commit, to-tickets, and the base/workspace instruction parts under
software/application-software/argos; argos-dev links nothing outside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
blocks/docs/skills/settings entries are linked (<source> [-> <dest>]) with
per-key default dests; mcp fragments generate .mcp.json like instructions
generate CLAUDE.md. Replaces links:. check enforces each entry sits under
its key's directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
A skill folder may hold skill.yml (name, description, body: blocks);
delphi sync generates its SKILL.md, and a hand edit is a conflict.
argos-dev's open-pr/update-pr include their own block plus the shared
pr-body.md instead of linking the block into each skill folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
ws/<name> branches are projections of each workspace folder (in-CLI
equivalent of git subtree split; ids match git subtree). Checkouts clone
at ws/<name>; propose re-roots a branch's diff under the folder with a
3-way apply onto main and opens a PR (also --branch for plain-git
agents; CI mirrors PRs into ws/* to main). Removes links, sync,
skill.yml, generation, sparse checkouts, and mv. argos-dev is now
self-contained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Workspaces live at software/<org>/…/workspaces/<name>/ with a small
workspace.yml (harness, repos). ci/sync.sh merges main into each
ws/<name> (-Xsubtree; created joined to main) and opens a PR to main
when a ws branch has new changes; ci/check.sh validates PRs to main.
Removes the Rust CLI, context/ scopes, and the delphi skills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
@bracyw bracyw changed the title Delphi v5: workspace as branch root Delphi v5: workspaces as branch roots, synced by subtree merges Sep 27, 2026
'ci/sync.sh refresh' only merges main into ws/<name>; 'ci/sync.sh
propose' only opens the PR to main; no argument does both (CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
Each workspace carries .github/workflows/delphi.yml so pushes to ws/**
run sync (check.sh keeps copies identical); .gitattributes keeps
setup.sh LF under Git for Windows; unchanged proposals aren't re-pushed;
new-workspace.sh no longer needs a local branch; clearer check failures.
README and design include the flow diagram.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FaADA545v1Fw4im5hHFoTq
@bracyw bracyw changed the title Delphi v5: workspaces as branch roots, synced by subtree merges Delphi v5: workspaces as branch roots, synced by refresh/propose Sep 27, 2026
@bracyw
bracyw marked this pull request as ready for review September 27, 2026 07:00
@bracyw
bracyw merged commit 74e7703 into main Sep 27, 2026
2 checks passed
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.

2 participants