From 6fb80cbb1e9c23e01788365d4a48ca7a9b0eeab1 Mon Sep 17 00:00:00 2001 From: Jesus God Date: Mon, 19 Oct 2026 15:47:54 +0000 Subject: [PATCH 01/18] Delphi 1.3.0: add portable Codex harness and default Argos workspace --- .delphi/codex.sh | 6 + .delphi/exec.sh | 7 + .delphi/manifest.yml | 4 +- .delphi/versions | 1 + CLAUDE.md | 11 +- README.md | 31 +++- ci/check.sh | 58 +++++-- ci/harnesses.sh | 34 ++++ ci/inherit.sh | 27 ++++ ci/sync.sh | 57 ++++--- docs/design.md | 92 +++++++---- .../application-software/argos/AUTHORING.md | 37 +++-- software/application-software/argos/README.md | 8 +- .../.claude => }/skills/implement/SKILL.md | 0 .../skills/pr-conventions/SKILL.md | 3 +- .../skills/pr-conventions/scripts/lint.sh | 0 .../.claude => }/skills/run-local/SKILL.md | 0 .../skills/run-local/scripts/run-local.sh | 0 .../skills/run-local/scripts/serve.sh | 0 .../skills/ticket-conventions/SKILL.md | 1 - .../.claude => }/skills/verify-graph/SKILL.md | 1 - .../skills/verify-graph/scripts/check.js | 0 .../skills/verify-graph/scripts/check.sh | 0 .../skills/verify-graph/scripts/open.sh | 0 .../skills/verify-graph/scripts/perf.js | 0 .../skills/verify-graph/scripts/perf.sh | 0 .../skills/verify-graph/scripts/seed.sh | 0 .../skills/verify-graph/scripts/select-run.sh | 0 .../skills/verify-telemetry/SKILL.md | 0 .../verify-telemetry/scripts/check-topic.sh | 0 .../argos/workspace-defaults/AGENTS.md | 59 +++++++ .../workspaces/default-codex/.gitattributes | 2 + .../.github/workflows/delphi.yml | 41 +++++ .../argos/workspaces/default-codex/AGENTS.md | 72 +++++++++ .../workspaces/default-codex/docs/CONTEXT.md | 102 ++++++++++++ .../workspaces/default-codex/workspace.yml | 17 ++ .../skills/pr-conventions/SKILL.md | 5 +- .../skills/ticket-conventions/SKILL.md | 1 - .../skills/address-pr-comments/SKILL.md | 4 +- .../scripts/fetch-feedback.sh | 0 .../address-pr-comments/scripts/github.sh | 10 +- .../.claude => }/skills/commit/SKILL.md | 2 +- .../skills/consolidate-spikes/SKILL.md | 3 +- .../skills/create-ticket/SKILL.md | 2 +- .../.claude => }/skills/open-pr/SKILL.md | 2 +- .../skills/open-pr/scripts/pr-checks.sh | 0 .../.claude => }/skills/report-spike/SKILL.md | 0 .../.claude => }/skills/update-pr/SKILL.md | 0 .../.claude => }/skills/journal/SKILL.md | 0 .../skills/journal/scripts/capture.sh | 0 .../.claude => }/skills/new-worktree/SKILL.md | 0 .../skills/setup-workspace/SKILL.md | 0 .../skills/switch-workspace/SKILL.md | 3 +- templates/harnesses/codex/AGENTS.md | 12 ++ tests/e2e.sh | 145 +++++++++++++++++- tools/new-workspace.sh | 37 +++-- 56 files changed, 767 insertions(+), 130 deletions(-) create mode 100644 .delphi/codex.sh create mode 100644 .delphi/exec.sh create mode 100644 ci/harnesses.sh create mode 100644 ci/inherit.sh rename software/application-software/argos/{workspace-inherit/.claude => }/skills/implement/SKILL.md (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/pr-conventions/SKILL.md (96%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/pr-conventions/scripts/lint.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/run-local/SKILL.md (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/run-local/scripts/run-local.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/run-local/scripts/serve.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/ticket-conventions/SKILL.md (97%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/SKILL.md (99%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/check.js (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/check.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/open.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/perf.js (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/perf.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/seed.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-graph/scripts/select-run.sh (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-telemetry/SKILL.md (100%) rename software/application-software/argos/{workspace-inherit/.claude => }/skills/verify-telemetry/scripts/check-topic.sh (100%) create mode 100644 software/application-software/argos/workspace-defaults/AGENTS.md create mode 100644 software/application-software/argos/workspaces/default-codex/.gitattributes create mode 100644 software/application-software/argos/workspaces/default-codex/.github/workflows/delphi.yml create mode 100644 software/application-software/argos/workspaces/default-codex/AGENTS.md create mode 100644 software/application-software/argos/workspaces/default-codex/docs/CONTEXT.md create mode 100644 software/application-software/argos/workspaces/default-codex/workspace.yml rename software/application-software/nero/{workspace-inherit/.claude => }/skills/pr-conventions/SKILL.md (86%) rename software/application-software/nero/{workspace-inherit/.claude => }/skills/ticket-conventions/SKILL.md (96%) rename software/application-software/{workspace-inherit/.claude => }/skills/address-pr-comments/SKILL.md (86%) rename software/application-software/{workspace-inherit/.claude => }/skills/address-pr-comments/scripts/fetch-feedback.sh (100%) rename software/application-software/{workspace-inherit/.claude => }/skills/address-pr-comments/scripts/github.sh (66%) rename software/application-software/{workspace-inherit/.claude => }/skills/commit/SKILL.md (75%) rename software/application-software/{workspace-inherit/.claude => }/skills/consolidate-spikes/SKILL.md (84%) rename software/application-software/{workspace-inherit/.claude => }/skills/create-ticket/SKILL.md (97%) rename software/application-software/{workspace-inherit/.claude => }/skills/open-pr/SKILL.md (96%) rename software/application-software/{workspace-inherit/.claude => }/skills/open-pr/scripts/pr-checks.sh (100%) rename software/application-software/{workspace-inherit/.claude => }/skills/report-spike/SKILL.md (100%) rename software/application-software/{workspace-inherit/.claude => }/skills/update-pr/SKILL.md (100%) rename software/{workspace-inherit/.claude => }/skills/journal/SKILL.md (100%) rename software/{workspace-inherit/.claude => }/skills/journal/scripts/capture.sh (100%) rename software/{workspace-inherit/.claude => }/skills/new-worktree/SKILL.md (100%) rename software/{workspace-inherit/.claude => }/skills/setup-workspace/SKILL.md (100%) rename software/{workspace-inherit/.claude => }/skills/switch-workspace/SKILL.md (71%) create mode 100644 templates/harnesses/codex/AGENTS.md diff --git a/.delphi/codex.sh b/.delphi/codex.sh new file mode 100644 index 0000000..15f447f --- /dev/null +++ b/.delphi/codex.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Start Codex CLI at this workspace with the layout inherited by commands and child processes. +set -euo pipefail +# shellcheck source=.delphi/paths.sh +source "$(dirname "$0")/paths.sh" +exec codex -C "$DELPHI_ROOT" "$@" diff --git a/.delphi/exec.sh b/.delphi/exec.sh new file mode 100644 index 0000000..1cf3281 --- /dev/null +++ b/.delphi/exec.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Run a command with this clone's layout, even in hosts whose fresh shells discard session exports. +set -euo pipefail +# shellcheck source=.delphi/paths.sh +source "$(dirname "$0")/paths.sh" +[ "$#" -gt 0 ] || { echo "usage: bash .delphi/exec.sh [...]" >&2; exit 2; } +exec "$@" diff --git a/.delphi/manifest.yml b/.delphi/manifest.yml index 8546a04..8cb1b9c 100644 --- a/.delphi/manifest.yml +++ b/.delphi/manifest.yml @@ -6,7 +6,7 @@ # MINOR something new that existing clones need nothing for # MAJOR clones need cleanup (MINOR while 0.x): add .delphi/migrations/-.sh, which # setup.sh runs once per workspace in each clone (rules in Delphi's CLAUDE.md) -version: 1.2.0 +version: 1.3.0 files: # repo-relative paths; a trailing / means everything under it - .delphi/manifest.yml - .delphi/.gitattributes @@ -14,6 +14,8 @@ files: # repo-relative paths; a trailing / means everythi - .delphi/version.sh - .delphi/setup.sh - .delphi/new-worktree.sh + - .delphi/exec.sh + - .delphi/codex.sh - .delphi/paths.sh - .delphi/plugins.sh - .delphi/switch.sh diff --git a/.delphi/versions b/.delphi/versions index 2fa678d..49053ea 100644 --- a/.delphi/versions +++ b/.delphi/versions @@ -17,3 +17,4 @@ 1.0.0 44693a895995 1.0: workspaces: clones live at workspaces/ (was linked/; DELPHI_WORKSPACES, was DELPHI_LINKED); setup.sh also runs each one's own setup.sh, and a workspace inside another's workspaces/ skips its own workspaces: (migration) 1.1.0 a3446f7f763c setup.sh clones each repos: entry at repos/ (a normal clone on its default branch, was a bare store) and adds no worktree; new-worktree.sh makes worktrees from that clone; older bare stores are left as they are 1.2.0 d139aaf9f4a5 worktrees come from their own bare store, worktrees//.bare, separate from the plain clone at repos/; setup.sh makes the store and the default-branch worktree again; an older bare store at repos/ is left as it is +1.3.0 39487f8f28ec portable Codex harness and native shared skill inheritance diff --git a/CLAUDE.md b/CLAUDE.md index 4b5131d..75f7fbe 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ source of truth; `docs/goals.md` lists what any change must keep. labelled `by: ai` (new-workspace: `--by ai-assisted|human` when the user says so). - `ci/plugins.sh`: writes `.claude-plugin/marketplace.json` from the plugin sets (`software/**/plugins///`, named `[.]`; a folder's scope is its - `plugins/scope`, else its `short-name`, else its name), each workspace's `workspace.yml` `plugins:` defaults (the + `plugins/scope`, else its `short-name`, else its name), each Claude Code workspace's `workspace.yml` `plugins:` defaults (the `default` set of every folder above), and its `.claude/settings.json` (enabled sets, and the SessionStart hook that sets `$DELPHI_ROOT`; never edit it by hand). Run it after changing a set or a `workspace.yml`'s `plugins:`. - `.delphi/{setup,new-worktree,switch,park,plugins}.sh`: the scripts every workspace runs (setup.sh @@ -31,8 +31,8 @@ source of truth; `docs/goals.md` lists what any change must keep. version, with its hash from `.delphi/version.sh`), `.delphi/migrations/-.sh` (clone cleanup, run by `setup.sh`). - `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/`. + `.github/workflows/delphi.yml` every workspace carries unchanged. The general skills are in `software/skills/`; Codex instructions use the native template under + `templates/harnesses/`. - `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`). @@ -43,6 +43,9 @@ source of truth; `docs/goals.md` lists what any change must keep. `workspace.yml` skips a path). - `.github/workflows/delphi.yml` (identical to the template's copy), `.github/CODEOWNERS`; issue templates (idea, spike, epic, dev work) and the PR template in `.github/`, filed with the `create-ticket` skill (`.claude/skills/`). - `tests/e2e.sh`: end-to-end test in a throwaway sandbox (bare origin, stub `gh` logging to `gh.log`). +- `ci/harnesses.sh` declares supported adapters and native paths; `ci/inherit.sh` resolves neutral + `skills/` and legacy `workspace-inherit/` skill paths for sync and validation. Codex uses + `.delphi/codex.sh` for CLI startup and `.delphi/exec.sh` for hosts with independent shells. ## Rules @@ -56,7 +59,7 @@ source of truth; `docs/goals.md` lists what any change must keep. their path in the skill's folder, `bash scripts/