@c-d-cc/reap 0.7.3 → 0.7.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +14 -45
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -9373,16 +9373,6 @@ class ClaudeCodeAdapter {
9373
9373
  const dest = join2(ReapPaths.userReapCommands, `${cmd}.md`);
9374
9374
  await writeTextFile(dest, await readTextFileOrThrow(src));
9375
9375
  }
9376
- await mkdir(this.commandsDir, { recursive: true });
9377
- for (const cmd of commandNames) {
9378
- const dest = join2(this.commandsDir, `${cmd}.md`);
9379
- const redirectContent = `---
9380
- description: "REAP — redirected to ~/.reap/commands/"
9381
- ---
9382
- Read \`~/.reap/commands/${cmd}.md\` and follow the instructions there.
9383
- `;
9384
- await writeTextFile(dest, redirectContent);
9385
- }
9386
9376
  }
9387
9377
  async removeStaleCommands(validNames) {
9388
9378
  try {
@@ -9604,16 +9594,6 @@ class OpenCodeAdapter {
9604
9594
  const dest = join3(ReapPaths.userReapCommands, `${cmd}.md`);
9605
9595
  await writeTextFile(dest, await readTextFileOrThrow(src));
9606
9596
  }
9607
- await mkdir2(this.commandsDir, { recursive: true });
9608
- for (const cmd of commandNames) {
9609
- const dest = join3(this.commandsDir, `${cmd}.md`);
9610
- const redirectContent = `---
9611
- description: "REAP — redirected to ~/.reap/commands/"
9612
- ---
9613
- Read \`~/.reap/commands/${cmd}.md\` and follow the instructions there.
9614
- `;
9615
- await writeTextFile(dest, redirectContent);
9616
- }
9617
9597
  }
9618
9598
  async removeStaleCommands(validNames) {
9619
9599
  try {
@@ -10706,32 +10686,21 @@ async function updateProject(projectRoot, dryRun = false) {
10706
10686
  }
10707
10687
  for (const adapter of adapters) {
10708
10688
  const agentCmdDir = adapter.getCommandsDir();
10709
- const label = `${adapter.displayName}`;
10710
- for (const file of commandFiles) {
10711
- if (!file.endsWith(".md"))
10712
- continue;
10713
- const cmdName = file.replace(/\.md$/, "");
10714
- const redirectContent = `---
10715
- description: "REAP redirected to ~/.reap/commands/"
10716
- ---
10717
- Read \`~/.reap/commands/${cmdName}.md\` and follow the instructions there.
10718
- `;
10719
- const dest = join10(agentCmdDir, file);
10720
- const existingContent = await readTextFile(dest);
10721
- if (existingContent !== null && existingContent === redirectContent) {
10722
- result.skipped.push(`[${label}] commands/${file}`);
10723
- } else {
10724
- if (!dryRun) {
10725
- await mkdir6(agentCmdDir, { recursive: true });
10726
- await writeTextFile(dest, redirectContent);
10689
+ const label = adapter.displayName;
10690
+ try {
10691
+ const existing = await readdir9(agentCmdDir);
10692
+ for (const file of existing) {
10693
+ if (!file.startsWith("reap.") || !file.endsWith(".md"))
10694
+ continue;
10695
+ const filePath = join10(agentCmdDir, file);
10696
+ const content = await readTextFile(filePath);
10697
+ if (content !== null && content.includes("redirected to ~/.reap/commands/")) {
10698
+ if (!dryRun)
10699
+ await unlink3(filePath);
10700
+ result.removed.push(`[${label}] commands/${file} (Phase 2: redirect removed)`);
10727
10701
  }
10728
- result.updated.push(`[${label}] commands/${file}`);
10729
10702
  }
10730
- }
10731
- const validCommandFiles = new Set(commandFiles);
10732
- if (!dryRun) {
10733
- await adapter.removeStaleCommands(validCommandFiles);
10734
- }
10703
+ } catch {}
10735
10704
  }
10736
10705
  await mkdir6(ReapPaths.userReapTemplates, { recursive: true });
10737
10706
  const artifactFiles = ["01-objective.md", "02-planning.md", "03-implementation.md", "04-validation.md", "05-completion.md"];
@@ -10970,7 +10939,7 @@ async function fixProject(projectRoot) {
10970
10939
  // src/cli/index.ts
10971
10940
  init_fs();
10972
10941
  import { join as join11 } from "path";
10973
- program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.7.3");
10942
+ program.name("reap").description("REAP — Recursive Evolutionary Autonomous Pipeline").version("0.7.4");
10974
10943
  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) => {
10975
10944
  try {
10976
10945
  const cwd = process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c-d-cc/reap",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Recursive Evolutionary Autonomous Pipeline — AI and humans evolve software across generations",
5
5
  "type": "module",
6
6
  "license": "MIT",