Skip to content

Separate provider packages and add initial Codex support - #56

Merged
erickb336 merged 3 commits into
mainfrom
feat/provider-packages
Oct 6, 2026
Merged

erickb336 merged 3 commits into
mainfrom
feat/provider-packages

Conversation

@erickb336

@erickb336 erickb336 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Sage's Claude and Codex installs now come from separate source packages and self-contained plugin directories. Both bundle the same core implementation. Each plugin contains only its provider's adapter, manifest, launcher and role instructions.

The initial Codex package provides 29 skills, prompt/patch/commit advice and manual logbook/board commands. Full chief orchestration, agent limits, report/edit/Git gates, stop enforcement, compaction recovery and autopilot remain unavailable pending the native lifecycle evidence tracked in #55.

Where future changes go

Change Authored path
Claude hook packages/sage-claude/hooks/
Claude skills and roles packages/sage-claude/skills/ and packages/sage-claude/agents/
Shared state tool and board packages/sage-core/state.mjs and packages/sage-core/board.mjs
Codex hooks and skills packages/sage-codex/

Run the build after editing sources. CI runs npm run check before tests, without a build, so stale or unexpected files under plugins/ fail CI. Architecture, install steps and remaining gates are in docs/design/provider-packages.md.

Verification

On macOS, at 7d0bfc8:

  • npm run build: built 102 files.
  • npm run check: all checks pass.
  • npm test: tests 460; pass 460; fail 0; cancelled 0; skipped 0.
  • node --test scripts/providers.test.mjs scripts/sage-hook.test.mjs: tests 151; pass 151; fail 0.
  • npm run check:codex: Codex CLI 0.160.0 discovers 29 skills and 2 hooks; no model turn or install attempted.
  • The new generated-hook regression fails on a detached worktree of main at f4061a3: main's check returns 0 after the hook changes, where the test requires 1. It passes here.

Tests used fake ps, pgrep and kill first on PATH. The full macOS run used the direct Command Line Tools Git binary to avoid the xcrun cache in test temporary folders, and allowed the suite's loopback HTTPS server. No real GitHub merge or push runs in tests.

Installed package check

Codex CLI 0.160.0 installed and enabled Sage 0.1.0 from this pinned revision. The installed package created a separate Codex logbook, advanced a task through its states, and rendered the board. Read-only hooks/list reports both advice hooks enabled with trustStatus: untrusted; native advice delivery is not claimed until the user reviews and trusts their current definitions. An independent Codex code review found no actionable issue at 7d0bfc8; this does not replace Sage's required review cycles.

Limits

Installation and manual logbook commands are verified. Model-session hook delivery remains unverified. The earlier session probe stalled even with hooks disabled. Full Codex orchestration remains unavailable. A marketplace installer may still fetch the full source repository; separate distribution repositories or archives would isolate downloaded bytes.

@erickb336

Copy link
Copy Markdown
Owner Author

From the sage (Claude): main moved under this PR, and git does not show it as a conflict.

This branch's base is dec200c. Since then, PR #54 merged into main (f4061a3). It changed plugins/sage/hooks/sage-hook.mjs, scripts/sage-hook.test.mjs, README.md and plugins/sage/skills/sage-help/SKILL.md.

This PR makes packages/sage-claude/ the source and builds plugins/sage/ from it. Its packages/sage-claude/hooks/sage-hook.mjs is the pre-#54 hook (no MODE_WORD, the old SAGE_ON). git merge-tree reports no conflict, because this PR does not edit plugins/sage/hooks/sage-hook.mjs itself. After a merge, the next npm run build would copy the old package hook over main's hook and undo #54.

Before this leaves draft, please:

  1. Merge origin/main into this branch.
  2. Carry every change that main made to a file this PR now builds from packages/, into the packages/ copy. Today that is Hook: the on phrase may have words after it, and a missed phrase gets a note (T194) #54 (the hook, its tests, the help skill) and Hook: an agent never merges; the merge and push rules apply to every command tool; config refuses a second = (T56, cut to G75) #33 if any part is missing.
  3. Add a check that fails when a built file under plugins/sage/ differs from what the build makes from packages/, so the next PR that edits the old path fails CI instead of being undone.
  4. Say in this PR which path a hook change edits after it merges. The open codex issues (T199: Hook refuses brace and glob words in gh and git before the merge and push tests #57, T186: Hook treats rg --pre and file -C as a run and a write, not a read #58, T181 step 1: Lead build: the hook applies the spawn rules to nested agents #62, T196: Hook reads PowerShell by its own rules and every field of a command tool #69, T197: A sage agent never runs gh in any form: copy, link or alias #70) and the claude issues name plugins/sage/hooks/sage-hook.mjs; the sage updates them when this PR merges.

@erickb336

Copy link
Copy Markdown
Owner Author

The owner chose to merge this PR before the open hook tasks. The codex issues #57, #58, #62, #69 and #70 and the claude issues wait for it, so this PR is next. When it leaves draft with the four points above, the sage runs its review cycles and merges it, then updates every open issue to the new edit paths.

@erickb336
erickb336 marked this pull request as ready for review October 6, 2026 18:11
@erickb336
erickb336 merged commit e0cafd1 into main Oct 6, 2026
1 check passed
@erickb336
erickb336 deleted the feat/provider-packages branch October 6, 2026 18:39
This was referenced Oct 6, 2026
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.

1 participant