lalph 0.1.12 → 0.1.14

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
@@ -140399,6 +140399,9 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
140399
140399
  \`\`\``;
140400
140400
  const prompt = `# Instructions
140401
140401
 
140402
+ The following instructions should be done without interaction or asking for
140403
+ permission.
140404
+
140402
140405
  1. Decide which single task to work on next from the prd.json file. This should
140403
140406
  be the task YOU decide as the most important to work on next, not just the
140404
140407
  first task in the list.
@@ -140423,6 +140426,8 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
140423
140426
  ${sourceMeta.githubPrInstructions}
140424
140427
  The PR description should include a summary of the changes made.
140425
140428
  - None of the files in the \`.lalph\` directory should be committed.
140429
+ - You have permission to create or update the PR as needed. No need to ask for
140430
+ permission to push branches or create PRs.
140426
140431
  7. Update the prd.json file to reflect any changes in task states.
140427
140432
  - Add follow up tasks only if needed.
140428
140433
  - Append to the \`description\` field with any notes or important discoveries.
@@ -140688,6 +140693,8 @@ const plan = gen(function* () {
140688
140693
  const promptGen = yield* PromptGen;
140689
140694
  const cliAgent = yield* getOrSelectCliAgent;
140690
140695
  const idea = yield* text$2({ message: "Enter the idea / request:" });
140696
+ const lalphPlanPath = pathService.join(worktree.directory, "lalph-plan.md");
140697
+ yield* scoped$1(fs.open(lalphPlanPath, { flag: "a+" }));
140691
140698
  const cliCommand = cliAgent.commandPlan({
140692
140699
  prompt: promptGen.planPrompt(idea),
140693
140700
  prdFilePath: pathService.join(worktree.directory, ".lalph", "prd.json")
@@ -140701,7 +140708,7 @@ const plan = gen(function* () {
140701
140708
  stdin: "inherit"
140702
140709
  }).pipe(exitCode);
140703
140710
  yield* log$1(`Agent exited with code: ${exitCode$1}`);
140704
- const planContent = yield* fs.readFileString(pathService.join(worktree.directory, "lalph-plan.md")).pipe(orElseSucceed(() => ""));
140711
+ const planContent = yield* fs.readFileString(lalphPlanPath);
140705
140712
  yield* fs.writeFileString(pathService.resolve("lalph-plan.md"), planContent);
140706
140713
  }).pipe(scoped$1, provide$1([
140707
140714
  PromptGen.layer,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
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
@@ -40,6 +40,9 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
40
40
 
41
41
  const prompt = `# Instructions
42
42
 
43
+ The following instructions should be done without interaction or asking for
44
+ permission.
45
+
43
46
  1. Decide which single task to work on next from the prd.json file. This should
44
47
  be the task YOU decide as the most important to work on next, not just the
45
48
  first task in the list.
@@ -64,6 +67,8 @@ ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
64
67
  ${sourceMeta.githubPrInstructions}
65
68
  The PR description should include a summary of the changes made.
66
69
  - None of the files in the \`.lalph\` directory should be committed.
70
+ - You have permission to create or update the PR as needed. No need to ask for
71
+ permission to push branches or create PRs.
67
72
  7. Update the prd.json file to reflect any changes in task states.
68
73
  - Add follow up tasks only if needed.
69
74
  - Append to the \`description\` field with any notes or important discoveries.