ralph-prd 3.0.5 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.mjs +9 -7
- package/package.json +3 -2
- package/ralph/index.mjs +1 -0
package/bin/cli.mjs
CHANGED
|
@@ -17,10 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
import { existsSync, readFileSync } from 'fs';
|
|
19
19
|
import { resolve, dirname } from 'path';
|
|
20
|
-
import { fileURLToPath } from 'url';
|
|
20
|
+
import { fileURLToPath, pathToFileURL } from 'url';
|
|
21
21
|
|
|
22
22
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
23
|
const PKG_ROOT = resolve(__dirname, '..');
|
|
24
|
+
const RUNNER_PATH = resolve(PKG_ROOT, 'ralph', 'ralph-claude.mjs');
|
|
25
|
+
const RUNNER_URL = pathToFileURL(RUNNER_PATH).href;
|
|
24
26
|
|
|
25
27
|
// ─── Version ─────────────────────────────────────────────────────────────────
|
|
26
28
|
|
|
@@ -50,9 +52,9 @@ if (subcommand === 'run') {
|
|
|
50
52
|
|
|
51
53
|
// Import and run ralph-claude.mjs directly from the package
|
|
52
54
|
// Override process.argv so ralph-claude.mjs sees the correct args
|
|
53
|
-
process.argv = [process.argv[0],
|
|
55
|
+
process.argv = [process.argv[0], RUNNER_PATH, ...runArgs];
|
|
54
56
|
|
|
55
|
-
await import(
|
|
57
|
+
await import(RUNNER_URL);
|
|
56
58
|
|
|
57
59
|
} else if (subcommand === 'init' || !subcommand) {
|
|
58
60
|
// npx ralph-prd init OR npx ralph-prd (legacy: bare invocation = init)
|
|
@@ -61,12 +63,12 @@ if (subcommand === 'run') {
|
|
|
61
63
|
|
|
62
64
|
} else if (subcommand === '--update-skills') {
|
|
63
65
|
// npx ralph-prd --update-skills
|
|
64
|
-
process.argv = [process.argv[0],
|
|
65
|
-
await import(
|
|
66
|
+
process.argv = [process.argv[0], RUNNER_PATH, '--update-skills'];
|
|
67
|
+
await import(RUNNER_URL);
|
|
66
68
|
|
|
67
69
|
} else {
|
|
68
70
|
// Assume it's a plan file path (legacy: npx ralph-prd docs/feature/plan.md)
|
|
69
71
|
// Treat bare arguments as plan files for backward compat
|
|
70
|
-
process.argv = [process.argv[0],
|
|
71
|
-
await import(
|
|
72
|
+
process.argv = [process.argv[0], RUNNER_PATH, ...args];
|
|
73
|
+
await import(RUNNER_URL);
|
|
72
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ralph-prd",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI-powered phased implementation runner for Claude Code — from PRD to shipped code",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./ralph/index.mjs",
|
|
11
|
-
"./transport": "./ralph/lib/transport.mjs"
|
|
11
|
+
"./transport": "./ralph/lib/transport.mjs",
|
|
12
|
+
"./plan-validator": "./ralph/lib/plan-validator.mjs"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"claude",
|
package/ralph/index.mjs
CHANGED