@pageai/ralph-loop 1.1.0 → 1.2.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.
package/.agent/PROMPT.md CHANGED
@@ -4,7 +4,7 @@ You are implementing the project described in @.agent/prd/SUMMARY.md
4
4
 
5
5
  ## Required Setup
6
6
 
7
- Run `npm run dev` (as background process).
7
+ Run `npm run dev` (as background process) in `src` directory.
8
8
  App will be running at http://localhost:3000
9
9
 
10
10
  ## Before Starting
@@ -29,7 +29,7 @@ Tasks are listed in @.agent/tasks.json
29
29
  8. All tests must pass. Broke unrelated test? Fix it before proceeding.
30
30
  9. When tests pass, set `passes: true` in `tasks.json` for the task you completed.
31
31
  10. Log entry → `.agent/logs/LOG.md` (date, brief summary, screenshot path)
32
- 11. Update `.agent/STRUCTURE.md` if dirs changed
32
+ 11. Update `.agent/STRUCTURE.md` if dirs changed. Exclude dotfiles, tests and config.
33
33
  12. Commit changes, using the Conventional Commit format.
34
34
 
35
35
  ## Rules
package/README.md CHANGED
@@ -96,9 +96,9 @@ This script assumes the following are installed:
96
96
  I recommend using a CLI to bootstrap your project with the necessary tools and dependencies, e.g.:
97
97
 
98
98
  ```bash
99
- npx create-vite@latest app --template react-ts
99
+ npx create-vite@latest src --template react-ts
100
100
  # or
101
- npx create-next-app@latest app
101
+ npx create-next-app@latest src
102
102
  ```
103
103
 
104
104
  If you must start from a blank slate, which is not recommended, you can use the following commands to install the necessary tools and dependencies:
package/bin/cli.js CHANGED
@@ -14,6 +14,7 @@ const { copyFile, copyDir, mergeDir, exists, ensureDir } = require('./lib/copy')
14
14
 
15
15
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
16
16
  const TARGET_DIR = process.cwd();
17
+ const DEFAULT_APP_DIR = 'src';
17
18
 
18
19
  // Directories to ensure exist (created even if source doesn't exist)
19
20
  const DIRS_TO_ENSURE = [
@@ -91,12 +92,9 @@ async function main() {
91
92
 
92
93
  // Prompt 1 — App source directory
93
94
  const appDir = await clack.text({
94
- message: 'Where does your app source code live?',
95
- placeholder: 'app',
96
- defaultValue: 'app',
97
- validate(value) {
98
- if (!value.trim()) return 'Directory name cannot be empty';
99
- },
95
+ message: 'Where does your app source code live? (e.g. src, public, etc.)',
96
+ placeholder: DEFAULT_APP_DIR,
97
+ defaultValue: DEFAULT_APP_DIR,
100
98
  });
101
99
 
102
100
  if (clack.isCancel(appDir)) {
@@ -275,6 +273,19 @@ async function main() {
275
273
  }
276
274
  }
277
275
 
276
+ // Replace app directory in PROMPT.md if different from default
277
+ if (appDir !== DEFAULT_APP_DIR) {
278
+ const promptFile = path.join(TARGET_DIR, '.agent/PROMPT.md');
279
+ if (exists(promptFile)) {
280
+ console.log();
281
+ display.printStep('📂', 'App directory');
282
+ const content = fs.readFileSync(promptFile, 'utf8');
283
+ const updated = content.replaceAll('`' + DEFAULT_APP_DIR + '`', `\`${appDir}\``);
284
+ fs.writeFileSync(promptFile, updated, 'utf8');
285
+ display.printSuccess(`.agent/PROMPT.md → ${appDir}`);
286
+ }
287
+ }
288
+
278
289
  // Playwright setup
279
290
  if (installPlaywright) {
280
291
  console.log();
@@ -32,7 +32,7 @@ function formatCatchphrase(text) {
32
32
  const leftPad = Math.floor(padding / 2);
33
33
  const rightPad = padding - leftPad;
34
34
 
35
- return prefix + ''.repeat(leftPad) + text + ''.repeat(rightPad) + suffix;
35
+ return prefix + ' '.repeat(leftPad) + text + ' '.repeat(rightPad) + suffix;
36
36
  }
37
37
 
38
38
  // Catchphrases (text only, will be formatted)
@@ -77,7 +77,7 @@ ${Y}██████╗ █████╗ ██╗ ██████
77
77
  ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝${R}
78
78
 
79
79
  ${D}${emptyLine}${R}
80
- ${Y}${catchphrase}${R}
80
+ ${D}${catchphrase}${R}
81
81
  ${D}${emptyLine}${R}
82
82
  ${D}═══════════════════════════════════════════════════════════${R}
83
83
  ${C}Ralph Wiggum Loop${R} ${D}・${R} Long-running AI agents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageai/ralph-loop",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },