Skip to content

Commit 92d7c29

Browse files
authored
feat: replace platforms/codex/ with real Codex plugin (#129)
1 parent 91fa514 commit 92d7c29

83 files changed

Lines changed: 3974 additions & 556 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/plugins/marketplace.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "smart-ralph",
3+
"interface": {
4+
"displayName": "Smart Ralph Plugins"
5+
},
6+
"plugins": [
7+
{
8+
"name": "ralph-specum-codex",
9+
"source": {
10+
"source": "local",
11+
"path": "./plugins/ralph-specum-codex"
12+
},
13+
"policy": {
14+
"installation": "AVAILABLE"
15+
},
16+
"category": "Productivity"
17+
}
18+
]
19+
}

.github/workflows/bats-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
push:
55
paths:
66
- 'plugins/**/*.sh'
7+
- 'plugins/ralph-specum-codex/**'
78
- 'tests/**/*.bats'
89
- 'tests/helpers/**'
910
- 'tests/fixtures/**'
1011
- '.github/workflows/bats-tests.yml'
1112
pull_request:
1213
paths:
1314
- 'plugins/**/*.sh'
15+
- 'plugins/ralph-specum-codex/**'
1416
- 'tests/**/*.bats'
1517
- 'tests/helpers/**'
1618
- 'tests/fixtures/**'

.github/workflows/codex-version-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Codex Version Check
33
on:
44
pull_request:
55
paths:
6-
- 'platforms/codex/**'
6+
- 'plugins/ralph-specum-codex/**'
77

88
jobs:
99
check-version-bump:
@@ -18,7 +18,7 @@ jobs:
1818
- name: Check Codex manifest version
1919
run: |
2020
BASE_BRANCH="${{ github.base_ref }}"
21-
MANIFEST="platforms/codex/manifest.json"
21+
MANIFEST="plugins/ralph-specum-codex/.codex-plugin/plugin.json"
2222
2323
version_greater() {
2424
local v1=$1 v2=$2
@@ -50,8 +50,8 @@ jobs:
5050
exit 1
5151
fi
5252
53-
if ! git diff --quiet "origin/${BASE_BRANCH}...HEAD" -- platforms/codex/; then
54-
echo "Detected changes under platforms/codex/"
53+
if ! git diff --quiet "origin/${BASE_BRANCH}...HEAD" -- plugins/ralph-specum-codex/; then
54+
echo "Detected changes under plugins/ralph-specum-codex/"
5555
else
5656
echo "No Codex package changes detected"
5757
exit 0

.github/workflows/plugin-version-check.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,15 @@ jobs:
9595
echo ""
9696
echo "=== Checking $plugin_name ==="
9797
98+
# Check both Claude (.claude-plugin) and Codex (.codex-plugin) manifest paths
9899
PLUGIN_JSON="plugins/${plugin_name}/.claude-plugin/plugin.json"
100+
if [ ! -f "$PLUGIN_JSON" ]; then
101+
PLUGIN_JSON="plugins/${plugin_name}/.codex-plugin/plugin.json"
102+
fi
99103
100104
if [ ! -f "$PLUGIN_JSON" ]; then
101105
echo "❌ ERROR: No plugin.json found for $plugin_name!"
102-
echo "Plugin changes detected but plugin.json is missing at: $PLUGIN_JSON"
106+
echo "Checked: plugins/${plugin_name}/.claude-plugin/plugin.json and plugins/${plugin_name}/.codex-plugin/plugin.json"
103107
ALL_PASSED=false
104108
continue
105109
fi
@@ -115,10 +119,16 @@ jobs:
115119
echo "plugin.json: ${BASE_PLUGIN_VERSION:-new} → $PR_PLUGIN_VERSION"
116120
echo "marketplace.json: ${BASE_MARKETPLACE_VERSION:-new} → $PR_MARKETPLACE_VERSION"
117121
118-
# Check if plugin exists in marketplace
122+
# Check if plugin exists in Claude marketplace
123+
# Codex plugins use .agents/plugins/marketplace.json (no version field) and are exempt
119124
if [ "$PR_MARKETPLACE_VERSION" == "null" ] || [ -z "$PR_MARKETPLACE_VERSION" ]; then
120-
echo "❌ ERROR: Plugin $plugin_name not found in marketplace.json!"
121-
echo "Please add an entry for $plugin_name in $MARKETPLACE_JSON"
125+
echo "ℹ️ Plugin $plugin_name not in Claude marketplace ($MARKETPLACE_JSON)"
126+
echo " Checking if it has its own manifest..."
127+
if [ -f "$PLUGIN_JSON" ]; then
128+
echo "✅ $plugin_name has manifest at $PLUGIN_JSON (version: $PR_PLUGIN_VERSION)"
129+
continue
130+
fi
131+
echo "❌ ERROR: Plugin $plugin_name not found in any marketplace!"
122132
ALL_PASSED=false
123133
continue
124134
fi

README.md

Lines changed: 77 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -51,103 +51,88 @@ Named after the [Ralph agentic loop pattern](https://ghuntley.com/ralph/) and ev
5151

5252
### Codex
5353

54-
Codex support ships as a versioned package under `platforms/codex/`. Current package version: `4.8.4`.
54+
**Personal install** (available in every project you open with Codex):
5555

56-
Install the primary skill from this repo:
57-
58-
Prompt to send to Codex:
59-
60-
```text
61-
Use $skill-installer to install the Smart Ralph Codex skill from repo `tzachbon/smart-ralph` at path `platforms/codex/skills/ralph-specum`.
62-
First ask whether to install globally under `$CODEX_HOME/skills` or project-local inside this repo.
63-
Before installing, check whether an existing install already has a `manifest.json` version for Smart Ralph Codex.
64-
Compare that installed version to `platforms/codex/manifest.json` in this repo.
65-
If no install exists or the versions differ, run the installer for the selected target.
66-
If the versions match, say it is already up to date and skip reinstalling.
56+
```bash
57+
# 1. Download the plugin
58+
git clone https://github.com/tzachbon/smart-ralph.git /tmp/smart-ralph
59+
mkdir -p ~/.codex/plugins
60+
cp -R /tmp/smart-ralph/plugins/ralph-specum-codex ~/.codex/plugins/ralph-specum-codex
61+
rm -rf /tmp/smart-ralph
62+
63+
# 2. Register it in your personal marketplace
64+
mkdir -p ~/.agents/plugins
65+
cat > ~/.agents/plugins/marketplace.json << 'EOF'
66+
{
67+
"name": "smart-ralph",
68+
"plugins": [{
69+
"name": "ralph-specum-codex",
70+
"source": {"source": "local", "path": "~/.codex/plugins/ralph-specum-codex"},
71+
"policy": {"installation": "AVAILABLE"},
72+
"category": "Productivity"
73+
}]
74+
}
75+
EOF
76+
77+
# 3. Restart Codex, open the plugin directory, install ralph-specum-codex
6778
```
6879

80+
**Per-project install** (available only in one repo):
81+
6982
```bash
70-
python3 "$CODEX_HOME/skills/.system/skill-installer/scripts/install-skill-from-github.py" \
71-
--repo tzachbon/smart-ralph \
72-
--path platforms/codex/skills/ralph-specum
83+
# From your project root
84+
git clone https://github.com/tzachbon/smart-ralph.git /tmp/smart-ralph
85+
mkdir -p ./plugins
86+
cp -R /tmp/smart-ralph/plugins/ralph-specum-codex ./plugins/ralph-specum-codex
87+
cp -R /tmp/smart-ralph/.agents ./.agents
88+
rm -rf /tmp/smart-ralph
89+
90+
# Restart Codex, open the plugin directory, install ralph-specum-codex
7391
```
7492

75-
Install the helper bundle when you want explicit skill entrypoints:
93+
**Optional**: Enable the Stop hook for automatic task execution:
7694

77-
Prompt to send to Codex:
95+
```toml
96+
# ~/.codex/config.toml
97+
[features]
98+
codex_hooks = true
99+
```
100+
101+
**Or just ask Codex to do it for you:**
78102

103+
Install prompt:
79104
```text
80-
Use $skill-installer to install the Smart Ralph Codex skills from repo `tzachbon/smart-ralph` at these paths:
81-
- `platforms/codex/skills/ralph-specum`
82-
- `platforms/codex/skills/ralph-specum-start`
83-
- `platforms/codex/skills/ralph-specum-triage`
84-
- `platforms/codex/skills/ralph-specum-research`
85-
- `platforms/codex/skills/ralph-specum-requirements`
86-
- `platforms/codex/skills/ralph-specum-design`
87-
- `platforms/codex/skills/ralph-specum-tasks`
88-
- `platforms/codex/skills/ralph-specum-implement`
89-
- `platforms/codex/skills/ralph-specum-status`
90-
- `platforms/codex/skills/ralph-specum-switch`
91-
- `platforms/codex/skills/ralph-specum-cancel`
92-
- `platforms/codex/skills/ralph-specum-index`
93-
- `platforms/codex/skills/ralph-specum-refactor`
94-
- `platforms/codex/skills/ralph-specum-feedback`
95-
- `platforms/codex/skills/ralph-specum-help`
96-
First ask whether to install globally under `$CODEX_HOME/skills` or project-local inside this repo.
97-
Before installing, check whether an existing Smart Ralph Codex install already has a `manifest.json` version.
98-
Compare that installed version to `platforms/codex/manifest.json` in this repo.
99-
If no install exists or the versions differ, run the installer for the selected target.
100-
If the versions match, say it is already up to date and skip reinstalling.
105+
Install the Smart Ralph Codex plugin from repo tzachbon/smart-ralph.
106+
The plugin is at plugins/ralph-specum-codex. Copy it to my personal
107+
plugins directory at ~/.codex/plugins/ralph-specum-codex, create a
108+
personal marketplace entry at ~/.agents/plugins/marketplace.json,
109+
and restart Codex.
101110
```
102111

103-
```bash
104-
python3 "$CODEX_HOME/skills/.system/skill-installer/scripts/install-skill-from-github.py" \
105-
--repo tzachbon/smart-ralph \
106-
--path \
107-
platforms/codex/skills/ralph-specum \
108-
platforms/codex/skills/ralph-specum-start \
109-
platforms/codex/skills/ralph-specum-triage \
110-
platforms/codex/skills/ralph-specum-research \
111-
platforms/codex/skills/ralph-specum-requirements \
112-
platforms/codex/skills/ralph-specum-design \
113-
platforms/codex/skills/ralph-specum-tasks \
114-
platforms/codex/skills/ralph-specum-implement \
115-
platforms/codex/skills/ralph-specum-status \
116-
platforms/codex/skills/ralph-specum-switch \
117-
platforms/codex/skills/ralph-specum-cancel \
118-
platforms/codex/skills/ralph-specum-index \
119-
platforms/codex/skills/ralph-specum-refactor \
120-
platforms/codex/skills/ralph-specum-feedback \
121-
platforms/codex/skills/ralph-specum-help
112+
Migrate prompt (if upgrading from the old `platforms/codex/` skills):
113+
```text
114+
Migrate from the old Smart Ralph Codex skills to the new plugin.
115+
Remove all ralph-specum* skills from ~/.codex/skills/ and
116+
$CODEX_HOME/skills/. Then install the Smart Ralph plugin from
117+
repo tzachbon/smart-ralph at plugins/ralph-specum-codex into
118+
my personal plugins directory. Create the marketplace entry
119+
and restart Codex.
122120
```
123121

124-
Upgrade prompt to send to Codex:
122+
See [`plugins/ralph-specum-codex/README.md`](plugins/ralph-specum-codex/README.md) for agent configs and full details.
125123

126-
```text
127-
Use $skill-installer to update the Smart Ralph Codex install from repo `tzachbon/smart-ralph`.
128-
First ask whether the current install lives globally under `$CODEX_HOME/skills` or project-local inside this repo.
129-
Check the installed Smart Ralph Codex `manifest.json` version and compare it to `platforms/codex/manifest.json` in this repo.
130-
Only if the versions differ, reinstall these paths into the selected target:
131-
- `platforms/codex/skills/ralph-specum`
132-
- `platforms/codex/skills/ralph-specum-start`
133-
- `platforms/codex/skills/ralph-specum-triage`
134-
- `platforms/codex/skills/ralph-specum-research`
135-
- `platforms/codex/skills/ralph-specum-requirements`
136-
- `platforms/codex/skills/ralph-specum-design`
137-
- `platforms/codex/skills/ralph-specum-tasks`
138-
- `platforms/codex/skills/ralph-specum-implement`
139-
- `platforms/codex/skills/ralph-specum-status`
140-
- `platforms/codex/skills/ralph-specum-switch`
141-
- `platforms/codex/skills/ralph-specum-cancel`
142-
- `platforms/codex/skills/ralph-specum-index`
143-
- `platforms/codex/skills/ralph-specum-refactor`
144-
- `platforms/codex/skills/ralph-specum-feedback`
145-
- `platforms/codex/skills/ralph-specum-help`
146-
If the versions match, say it is already up to date and do not reinstall.
147-
Then restart Codex.
148-
```
124+
<details>
125+
<summary>Migrating from old skills (platforms/codex/)?</summary>
126+
127+
The old `platforms/codex/` skill-installer approach is deprecated. Remove your old skill installs and switch to the plugin:
128+
129+
1. Remove old skills: `rm -rf $CODEX_HOME/skills/ralph-specum*`
130+
2. Follow the plugin install steps above
131+
3. All 15 skills ship in one package now
149132

150-
More Codex packaging details, including the package manifest at `platforms/codex/manifest.json`, live in [`platforms/codex/README.md`](platforms/codex/README.md).
133+
See the [migration guide](plugins/ralph-specum-codex/README.md#migration-from-old-skills-platformscodex) for full details.
134+
135+
</details>
151136

152137
<details>
153138
<summary>Troubleshooting & alternative methods</summary>
@@ -212,7 +197,7 @@ Codex Ralph is approval-gated by default. After each spec artifact, Ralph stops
212197

213198
## Commands
214199

215-
For Codex, the equivalent public surface is the primary `$ralph-specum` skill plus the installable helper skills under `platforms/codex/skills/`.
200+
For Codex, the equivalent surface is `$ralph-specum` plus 14 helper skills installed via the `ralph-specum-codex` plugin.
216201

217202
| Command | What it does |
218203
|---------|--------------|
@@ -391,14 +376,22 @@ smart-ralph/
391376
├── .claude-plugin/
392377
│ └── marketplace.json
393378
├── plugins/
394-
│ ├── ralph-specum/ # Spec workflow (self-contained)
379+
│ ├── ralph-specum/ # Claude Code plugin (self-contained)
395380
│ │ ├── .claude-plugin/
396381
│ │ │ └── plugin.json
397382
│ │ ├── agents/ # Sub-agent definitions
398383
│ │ ├── commands/ # Slash commands
399384
│ │ ├── hooks/ # Stop watcher (controls execution loop)
400385
│ │ ├── templates/ # Spec templates
401386
│ │ └── schemas/ # Validation schemas
387+
│ ├── ralph-specum-codex/ # Codex plugin (full parity)
388+
│ │ ├── .codex-plugin/
389+
│ │ │ └── plugin.json
390+
│ │ ├── skills/ # 15 skills ($ralph-specum-*)
391+
│ │ ├── hooks/ # Stop watcher (Codex format)
392+
│ │ ├── agent-configs/ # 9 TOML bootstrap templates
393+
│ │ ├── templates/ # Spec templates
394+
│ │ └── references/ # Workflow, state, parity docs
402395
│ └── ralph-speckit/ # Spec-kit methodology
403396
│ ├── .claude-plugin/
404397
│ │ └── plugin.json

0 commit comments

Comments
 (0)