@c-d-cc/reap 0.7.6 → 0.7.7

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/dist/cli.js CHANGED
@@ -10906,7 +10906,7 @@ async function fixProject(projectRoot) {
10906
10906
  // src/cli/index.ts
10907
10907
  init_fs();
10908
10908
  import { join as join11 } from "path";
10909
- program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.7.6");
10909
+ program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.7.7");
10910
10910
  program.command("init").description("Initialize a new REAP project (Genesis)").argument("[project-name]", "Project name (defaults to current directory name)").option("-m, --mode <mode>", "Entry mode: greenfield, migration, adoption", "greenfield").option("-p, --preset <preset>", "Bootstrap with a genome preset (e.g., bun-hono-react)").action(async (projectName, options) => {
10911
10911
  try {
10912
10912
  const cwd = process.cwd();
@@ -28,7 +28,7 @@ if (!gl.dirExists(reapDir)) {
28
28
  process.exit(0);
29
29
  }
30
30
 
31
- // Step 0: Install project-level command symlinks
31
+ // Step 0: Install project-level command files (copy, not symlink — Claude Code doesn't follow symlinks)
32
32
  const fs = require('fs');
33
33
  const os = require('os');
34
34
  const userReapCommands = path.join(os.homedir(), '.reap', 'commands');
@@ -38,34 +38,37 @@ if (gl.dirExists(userReapCommands)) {
38
38
  try {
39
39
  fs.mkdirSync(projectClaudeCommands, { recursive: true });
40
40
  const cmdFiles = fs.readdirSync(userReapCommands).filter(f => f.startsWith('reap.') && f.endsWith('.md'));
41
+ let installed = 0;
41
42
  for (const file of cmdFiles) {
42
43
  const src = path.join(userReapCommands, file);
43
44
  const dest = path.join(projectClaudeCommands, file);
44
45
  try {
45
46
  const stat = fs.lstatSync(dest);
46
47
  if (stat.isSymbolicLink()) {
47
- const target = fs.readlinkSync(dest);
48
- if (target === src) continue; // already correct
49
- fs.unlinkSync(dest); // stale symlink
48
+ fs.unlinkSync(dest); // replace legacy symlink with real file
50
49
  } else {
51
- // Regular file (old redirect or original) — replace with symlink
50
+ // Skip if content is identical
51
+ const srcContent = fs.readFileSync(src);
52
+ const destContent = fs.readFileSync(dest);
53
+ if (srcContent.equals(destContent)) continue;
52
54
  fs.unlinkSync(dest);
53
55
  }
54
56
  } catch { /* dest doesn't exist */ }
55
- fs.symlinkSync(src, dest);
57
+ fs.copyFileSync(src, dest);
58
+ installed++;
56
59
  }
57
- // Ensure .gitignore excludes these symlinks
60
+ // Ensure .gitignore excludes these files
58
61
  const gitignorePath = path.join(projectRoot, '.gitignore');
59
62
  const gitignoreEntry = '.claude/commands/reap.*';
60
63
  try {
61
64
  const gitignore = fs.existsSync(gitignorePath) ? fs.readFileSync(gitignorePath, 'utf-8') : '';
62
65
  if (!gitignore.includes(gitignoreEntry)) {
63
- fs.appendFileSync(gitignorePath, `\n# REAP command symlinks (managed by session-start hook)\n${gitignoreEntry}\n`);
66
+ fs.appendFileSync(gitignorePath, `\n# REAP command files (managed by session-start hook)\n${gitignoreEntry}\n`);
64
67
  }
65
68
  } catch { /* best effort */ }
66
- process.stderr.write(`[REAP] Symlinked ${cmdFiles.length} commands to .claude/commands/\n`);
69
+ process.stderr.write(`[REAP] Installed ${installed} commands to .claude/commands/ (${cmdFiles.length - installed} unchanged)\n`);
67
70
  } catch (err) {
68
- process.stderr.write(`[REAP] Warning: failed to create command symlinks: ${err.message}\n`);
71
+ process.stderr.write(`[REAP] Warning: failed to install commands: ${err.message}\n`);
69
72
  }
70
73
  }
71
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-d-cc/reap",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "Recursive Evolutionary Autonomous Pipeline — AI and humans evolve software across generations",
5
5
  "type": "module",
6
6
  "license": "MIT",