lalph 0.1.11 → 0.1.13

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.mjs CHANGED
@@ -59520,18 +59520,14 @@ const opencode = new CliAgent({
59520
59520
  id: "opencode",
59521
59521
  name: "opencode",
59522
59522
  command: ({ prompt, prdFilePath }) => [
59523
- "npx",
59524
- "-y",
59525
- "opencode-ai@latest",
59523
+ "opencode",
59526
59524
  "run",
59527
59525
  prompt,
59528
59526
  "-f",
59529
59527
  prdFilePath
59530
59528
  ],
59531
59529
  commandPlan: ({ prompt, prdFilePath }) => [
59532
- "npx",
59533
- "-y",
59534
- "opencode-ai@latest",
59530
+ "opencode",
59535
59531
  "--prompt",
59536
59532
  `@${prdFilePath}
59537
59533
 
@@ -59542,22 +59538,15 @@ const claude = new CliAgent({
59542
59538
  id: "claude",
59543
59539
  name: "Claude Code",
59544
59540
  command: ({ prompt, prdFilePath }) => [
59545
- "npx",
59546
- "-y",
59547
- "@anthropic-ai/claude-code@latest",
59541
+ "claude",
59548
59542
  "-p",
59549
59543
  `@${prdFilePath}
59550
59544
 
59551
59545
  ${prompt}`
59552
59546
  ],
59553
- commandPlan: ({ prompt, prdFilePath }) => [
59554
- "npx",
59555
- "-y",
59556
- "@anthropic-ai/claude-code@latest",
59557
- `@${prdFilePath}
59547
+ commandPlan: ({ prompt, prdFilePath }) => ["claude", `@${prdFilePath}
59558
59548
 
59559
- ${prompt}`
59560
- ]
59549
+ ${prompt}`]
59561
59550
  });
59562
59551
  const allCliAgents = [opencode, claude];
59563
59552
 
@@ -140434,6 +140423,8 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
140434
140423
  ${sourceMeta.githubPrInstructions}
140435
140424
  The PR description should include a summary of the changes made.
140436
140425
  - None of the files in the \`.lalph\` directory should be committed.
140426
+ - You have permission to create or update the PR as needed. No need to ask for
140427
+ permission to push branches or create PRs.
140437
140428
  7. Update the prd.json file to reflect any changes in task states.
140438
140429
  - Add follow up tasks only if needed.
140439
140430
  - Append to the \`description\` field with any notes or important discoveries.
@@ -140699,6 +140690,8 @@ const plan = gen(function* () {
140699
140690
  const promptGen = yield* PromptGen;
140700
140691
  const cliAgent = yield* getOrSelectCliAgent;
140701
140692
  const idea = yield* text$2({ message: "Enter the idea / request:" });
140693
+ const lalphPlanPath = pathService.join(worktree.directory, "lalph-plan.md");
140694
+ yield* scoped$1(fs.open(lalphPlanPath, { flag: "a+" }));
140702
140695
  const cliCommand = cliAgent.commandPlan({
140703
140696
  prompt: promptGen.planPrompt(idea),
140704
140697
  prdFilePath: pathService.join(worktree.directory, ".lalph", "prd.json")
@@ -140712,7 +140705,7 @@ const plan = gen(function* () {
140712
140705
  stdin: "inherit"
140713
140706
  }).pipe(exitCode);
140714
140707
  yield* log$1(`Agent exited with code: ${exitCode$1}`);
140715
- const planContent = yield* fs.readFileString(pathService.join(worktree.directory, "lalph-plan.md")).pipe(orElseSucceed(() => ""));
140708
+ const planContent = yield* fs.readFileString(lalphPlanPath);
140716
140709
  yield* fs.writeFileString(pathService.resolve("lalph-plan.md"), planContent);
140717
140710
  }).pipe(scoped$1, provide$1([
140718
140711
  PromptGen.layer,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.1.11",
4
+ "version": "0.1.13",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/src/Planner.ts CHANGED
@@ -17,6 +17,9 @@ export const plan = Effect.gen(function* () {
17
17
  message: "Enter the idea / request:",
18
18
  })
19
19
 
20
+ const lalphPlanPath = pathService.join(worktree.directory, "lalph-plan.md")
21
+ yield* Effect.scoped(fs.open(lalphPlanPath, { flag: "a+" }))
22
+
20
23
  const cliCommand = cliAgent.commandPlan({
21
24
  prompt: promptGen.planPrompt(idea),
22
25
  prdFilePath: pathService.join(worktree.directory, ".lalph", "prd.json"),
@@ -38,10 +41,7 @@ export const plan = Effect.gen(function* () {
38
41
 
39
42
  yield* Effect.log(`Agent exited with code: ${exitCode}`)
40
43
 
41
- const planContent = yield* fs
42
- .readFileString(pathService.join(worktree.directory, "lalph-plan.md"))
43
- .pipe(Effect.orElseSucceed(() => ""))
44
-
44
+ const planContent = yield* fs.readFileString(lalphPlanPath)
45
45
  yield* fs.writeFileString(pathService.resolve("lalph-plan.md"), planContent)
46
46
  }).pipe(
47
47
  Effect.scoped,
package/src/PromptGen.ts CHANGED
@@ -64,6 +64,8 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
64
64
  ${sourceMeta.githubPrInstructions}
65
65
  The PR description should include a summary of the changes made.
66
66
  - None of the files in the \`.lalph\` directory should be committed.
67
+ - You have permission to create or update the PR as needed. No need to ask for
68
+ permission to push branches or create PRs.
67
69
  7. Update the prd.json file to reflect any changes in task states.
68
70
  - Add follow up tasks only if needed.
69
71
  - Append to the \`description\` field with any notes or important discoveries.
@@ -17,18 +17,14 @@ export const opencode = new CliAgent({
17
17
  id: "opencode",
18
18
  name: "opencode",
19
19
  command: ({ prompt, prdFilePath }) => [
20
- "npx",
21
- "-y",
22
- "opencode-ai@latest",
20
+ "opencode",
23
21
  "run",
24
22
  prompt,
25
23
  "-f",
26
24
  prdFilePath,
27
25
  ],
28
26
  commandPlan: ({ prompt, prdFilePath }) => [
29
- "npx",
30
- "-y",
31
- "opencode-ai@latest",
27
+ "opencode",
32
28
  "--prompt",
33
29
  `@${prdFilePath}
34
30
 
@@ -40,18 +36,14 @@ export const claude = new CliAgent({
40
36
  id: "claude",
41
37
  name: "Claude Code",
42
38
  command: ({ prompt, prdFilePath }) => [
43
- "npx",
44
- "-y",
45
- "@anthropic-ai/claude-code@latest",
39
+ "claude",
46
40
  "-p",
47
41
  `@${prdFilePath}
48
42
 
49
43
  ${prompt}`,
50
44
  ],
51
45
  commandPlan: ({ prompt, prdFilePath }) => [
52
- "npx",
53
- "-y",
54
- "@anthropic-ai/claude-code@latest",
46
+ "claude",
55
47
  `@${prdFilePath}
56
48
 
57
49
  ${prompt}`,