@pageai/ralph-loop 1.15.0 → 1.17.0

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.
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  name: prd-creator
3
3
  description: Guides creation of comprehensive Product Requirement Documents (PRDs) for software projects through structured questioning and validation, then generates implementation task lists in JSON format. Use when users want to document a software idea, create specifications for development, plan a new application feature/bug, or break down requirements into actionable tasks. Transforms ideas into implementation-ready documents with verifiable pass criteria.
4
+ license: MIT
5
+ metadata:
6
+ author: pageai
7
+ version: '1.0.1'
8
+ tags: prd, product requirements, software development, documentation, task generation
9
+ website: https://pageai.pro/blog/long-running-ai-coding-agents-ralph-loop#step-2-write-your-requirements
4
10
  ---
5
11
 
6
12
  # PRD Creation Assistant
package/README.md CHANGED
@@ -87,6 +87,8 @@ Requirements:
87
87
  // etc.
88
88
  ```
89
89
 
90
+ > Check out [the video](https://www.youtube.com/watch?v=3TL8Ez66I3o&t=403s) for a more realistic example on how to write requirements.
91
+
90
92
  <details>
91
93
  <summary><strong>✨ Pro tips</strong></summary>
92
94
 
@@ -145,7 +147,7 @@ And follow the instructions to log in into Claude Code.
145
147
 
146
148
  > NB: you might need to run `chmod +x ralph.sh` to make the script executable.
147
149
 
148
- > ⚠️ The default "mode" is "implementation". Depending on your use case, you might want to change `.agent/PROMPT.md` to a different mode, e.g. "refactor", "review", "test" etc.
150
+ > The default "mode" is "implementation". Depending on your use case, you might want to change `.agent/PROMPT.md` to a different mode, e.g. "refactor", "review", "test" etc.
149
151
 
150
152
  ⚠️ If you want to use a different language or testing framework, see below.
151
153
 
package/bin/cli.js CHANGED
@@ -353,12 +353,12 @@ async function main() {
353
353
 
354
354
  // Playwright setup
355
355
  if (installPlaywright) {
356
- setupPlaywright(clack, TARGET_DIR, appDir);
356
+ await setupPlaywright(clack, TARGET_DIR, appDir);
357
357
  }
358
358
 
359
359
  // Vitest setup
360
360
  if (installVitest) {
361
- setupVitest(clack, TARGET_DIR, appDir);
361
+ await setupVitest(clack, TARGET_DIR, appDir);
362
362
  }
363
363
 
364
364
  // Final setup steps (git init, shadcn install)
@@ -372,7 +372,7 @@ async function main() {
372
372
 
373
373
  if (needsGit) {
374
374
  try {
375
- initGitRepo(TARGET_DIR);
375
+ await initGitRepo(TARGET_DIR);
376
376
  } catch {
377
377
  // Non-critical — continue setup even if git init fails
378
378
  }
@@ -380,7 +380,7 @@ async function main() {
380
380
 
381
381
  if (needsShadcn) {
382
382
  try {
383
- installAllComponents(appDirPath);
383
+ await installAllComponents(appDirPath);
384
384
  } catch {
385
385
  // Non-critical — continue setup even if shadcn install fails
386
386
  }
package/bin/lib/git.js CHANGED
@@ -4,9 +4,12 @@
4
4
  */
5
5
 
6
6
  const path = require('path');
7
- const { execSync } = require('child_process');
7
+ const { exec } = require('child_process');
8
+ const { promisify } = require('util');
8
9
  const { exists } = require('./copy');
9
10
 
11
+ const execAsync = promisify(exec);
12
+
10
13
  /**
11
14
  * Checks if a directory is inside a git repository
12
15
  * @param {string} dir - Directory path to check
@@ -19,9 +22,10 @@ function isGitRepo(dir) {
19
22
  /**
20
23
  * Initializes a new git repository in the given directory
21
24
  * @param {string} dir - Directory path to initialize
25
+ * @returns {Promise<void>}
22
26
  */
23
- function initGitRepo(dir) {
24
- execSync('git init', { cwd: dir, stdio: 'pipe' });
27
+ async function initGitRepo(dir) {
28
+ await execAsync('git init', { cwd: dir });
25
29
  }
26
30
 
27
31
  module.exports = {
@@ -4,17 +4,20 @@
4
4
  */
5
5
 
6
6
  const path = require('path');
7
- const { execSync } = require('child_process');
7
+ const { exec } = require('child_process');
8
+ const { promisify } = require('util');
8
9
  const { copyFile, exists } = require('./copy');
9
10
  const display = require('./display');
10
11
 
12
+ const execAsync = promisify(exec);
13
+
11
14
  /**
12
15
  * Copies playwright.config.ts into the app directory and installs Chromium.
13
16
  * @param {object} clack - @clack/prompts module (passed in because it's ESM)
14
17
  * @param {string} targetDir - Project root (TARGET_DIR)
15
18
  * @param {string} appDir - Relative app source directory
16
19
  */
17
- function setupPlaywright(clack, targetDir, appDir) {
20
+ async function setupPlaywright(clack, targetDir, appDir) {
18
21
  console.log();
19
22
  display.printStep('🎭', 'Playwright setup');
20
23
 
@@ -31,9 +34,8 @@ function setupPlaywright(clack, targetDir, appDir) {
31
34
  const s = clack.spinner();
32
35
  s.start('Installing Playwright browsers (chromium)...');
33
36
  try {
34
- execSync('npx playwright install --with-deps chromium', {
37
+ await execAsync('npx playwright install --with-deps chromium', {
35
38
  cwd: path.join(targetDir, appDir),
36
- stdio: 'pipe',
37
39
  });
38
40
  s.stop('Playwright browsers installed');
39
41
  } catch (err) {
package/bin/lib/shadcn.js CHANGED
@@ -5,9 +5,12 @@
5
5
 
6
6
  const fs = require('fs');
7
7
  const path = require('path');
8
- const { execSync } = require('child_process');
8
+ const { exec } = require('child_process');
9
+ const { promisify } = require('util');
9
10
  const { exists } = require('./copy');
10
11
 
12
+ const execAsync = promisify(exec);
13
+
11
14
  const SHADCN_SCHEMA = 'https://ui.shadcn.com/schema.json';
12
15
 
13
16
  /**
@@ -61,10 +64,9 @@ function isShadcnProject(dir) {
61
64
  * then strips the "#/" alias prefix from components.json.
62
65
  * @param {string} dir - Directory path to run the init in
63
66
  */
64
- function initShadcn(dir) {
65
- execSync('npx shadcn@latest init -y -d 2>&1', {
67
+ async function initShadcn(dir) {
68
+ await execAsync('npx shadcn@latest init -y -d 2>&1', {
66
69
  cwd: dir,
67
- stdio: 'pipe',
68
70
  });
69
71
 
70
72
  stripAliasPrefix(dir);
@@ -97,14 +99,13 @@ function stripAliasPrefix(dir) {
97
99
  * Runs init first if no components.json exists.
98
100
  * @param {string} dir - Directory path to run the install in
99
101
  */
100
- function installAllComponents(dir) {
102
+ async function installAllComponents(dir) {
101
103
  if (!hasShadcnConfig(dir)) {
102
- initShadcn(dir);
104
+ await initShadcn(dir);
103
105
  }
104
106
 
105
- execSync('npx shadcn@latest add --all --yes --overwrite 2>&1', {
107
+ await execAsync('npx shadcn@latest add --all --yes --overwrite 2>&1', {
106
108
  cwd: dir,
107
- stdio: 'pipe',
108
109
  });
109
110
  }
110
111
 
package/bin/lib/vitest.js CHANGED
@@ -5,11 +5,14 @@
5
5
 
6
6
  const fs = require('fs');
7
7
  const path = require('path');
8
- const { execSync } = require('child_process');
8
+ const { exec } = require('child_process');
9
+ const { promisify } = require('util');
9
10
  const { copyFile, exists } = require('./copy');
10
11
  const display = require('./display');
11
12
  const { DEFAULT_APP_DIR } = require('./consts');
12
13
 
14
+ const execAsync = promisify(exec);
15
+
13
16
  /**
14
17
  * Copies vitest.config.ts into the app directory, patches the include
15
18
  * paths to match appDir, and installs vitest + react plugin.
@@ -17,7 +20,7 @@ const { DEFAULT_APP_DIR } = require('./consts');
17
20
  * @param {string} targetDir - Project root (TARGET_DIR)
18
21
  * @param {string} appDir - Relative app source directory
19
22
  */
20
- function setupVitest(clack, targetDir, appDir) {
23
+ async function setupVitest(clack, targetDir, appDir) {
21
24
  console.log();
22
25
  display.printStep('⚡', 'Vitest setup');
23
26
 
@@ -42,9 +45,8 @@ function setupVitest(clack, targetDir, appDir) {
42
45
  const s = clack.spinner();
43
46
  s.start('Installing Vitest dependencies...');
44
47
  try {
45
- execSync('npm install --save-dev vitest @vitejs/plugin-react', {
48
+ await execAsync('npm install --save-dev vitest @vitejs/plugin-react', {
46
49
  cwd: path.join(targetDir, appDir),
47
- stdio: 'pipe',
48
50
  });
49
51
  s.stop('Vitest dependencies installed');
50
52
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageai/ralph-loop",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },