lalph 0.3.55 → 0.3.56
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 +22 -30
- package/package.json +1 -1
- package/src/GitFlow.ts +2 -2
- package/src/PromptGen.ts +24 -28
- package/src/commands/root.ts +4 -0
package/dist/cli.mjs
CHANGED
|
@@ -233026,24 +233026,18 @@ If for any reason you get stuck on a task, mark the task back as "todo" by updat
|
|
|
233026
233026
|
challenges faced.
|
|
233027
233027
|
|
|
233028
233028
|
${taskGuidelines(options)}`;
|
|
233029
|
-
const prompt = (options) => `#
|
|
233029
|
+
const prompt = (options) => `# ${options.task.title}
|
|
233030
233030
|
|
|
233031
|
-
ID: ${options.task.id}
|
|
233032
|
-
Task: ${options.task.title}
|
|
233033
|
-
Description:
|
|
233031
|
+
Task ID: ${options.task.id}
|
|
233034
233032
|
|
|
233035
233033
|
${options.task.description}
|
|
233036
233034
|
|
|
233037
|
-
|
|
233035
|
+
### Instructions
|
|
233038
233036
|
|
|
233039
|
-
Your job is to implement the task described above.
|
|
233037
|
+
Your job is to implement the task described above.${options.task.description.includes(options.specsDirectory) ? `\nMake sure to review the prd.yml for any key information that may help you with this task.` : ""}
|
|
233040
233038
|
|
|
233041
|
-
1.
|
|
233042
|
-
|
|
233043
|
-
Also read the ${options.specsDirectory}/README.md file (if available), to see
|
|
233044
|
-
if any previous specifications could assist you.
|
|
233045
|
-
2. ${options.gitFlow.setupInstructions(options)}
|
|
233046
|
-
3. Implement the task.
|
|
233039
|
+
1. ${options.gitFlow.setupInstructions(options)}
|
|
233040
|
+
2. Implement the task.
|
|
233047
233041
|
- If this task is a research task, **do not** make any code changes yet.
|
|
233048
233042
|
- If this task is a research task and you add follow-up tasks, include (at least) "${options.task.id}" in the new task's \`blockedBy\` field.
|
|
233049
233043
|
- **If at any point** you discover something that needs fixing, or another task
|
|
@@ -233051,15 +233045,14 @@ Your job is to implement the task described above.
|
|
|
233051
233045
|
you plan to fix it as part of this task.
|
|
233052
233046
|
- Add important discoveries about the codebase, or challenges faced to the task's
|
|
233053
233047
|
\`description\`. More details below.
|
|
233054
|
-
|
|
233055
|
-
|
|
233048
|
+
3. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
233049
|
+
4. ${options.gitFlow.commitInstructions({
|
|
233056
233050
|
githubPrInstructions: sourceMeta.githubPrInstructions,
|
|
233057
233051
|
githubPrNumber: options.githubPrNumber,
|
|
233058
233052
|
taskId: options.task.id ?? "unknown",
|
|
233059
233053
|
targetBranch: options.targetBranch
|
|
233060
233054
|
})}
|
|
233061
|
-
|
|
233062
|
-
your changes, update the prd.yml to reflect any changes in the task state.
|
|
233055
|
+
5. **After ${options.gitFlow.requiresGithubPr ? "pushing" : "committing"}** your changes, update the prd.yml to reflect any changes in the task state.
|
|
233063
233056
|
- Rewrite the notes in the description to include only the key discoveries and information that could speed up future work on other tasks. Make sure to preserve important information such as specification file references.
|
|
233064
233057
|
- If you believe the task is complete, update the \`state\` to "in-review".
|
|
233065
233058
|
|
|
@@ -233070,16 +233063,12 @@ Task ID: ${options.task.id}
|
|
|
233070
233063
|
|
|
233071
233064
|
${options.task.description}
|
|
233072
233065
|
|
|
233073
|
-
|
|
233066
|
+
### Instructions
|
|
233074
233067
|
|
|
233075
|
-
All steps must be done before the task can be considered complete.
|
|
233068
|
+
All steps must be done before the task can be considered complete.${options.task.description.includes(options.specsDirectory) ? `\nMake sure to review the previous tasks (using "listTasks") for any key information that may help you with this task.` : ""}
|
|
233076
233069
|
|
|
233077
|
-
1.
|
|
233078
|
-
|
|
233079
|
-
Also read the ${options.specsDirectory}/README.md file (if available), to see
|
|
233080
|
-
if any previous specifications could assist you.
|
|
233081
|
-
2. ${options.gitFlow.setupInstructions(options)}
|
|
233082
|
-
3. Implement the task.
|
|
233070
|
+
1. ${options.gitFlow.setupInstructions(options)}
|
|
233071
|
+
2. Implement the task.
|
|
233083
233072
|
- If this task is a research task, **do not** make any code changes yet.
|
|
233084
233073
|
- If this task is a research task and you add follow-up tasks, include (at least) "${options.task.id}" in the new task's \`blockedBy\` field.
|
|
233085
233074
|
- **If at any point** you discover something that needs fixing, or another task
|
|
@@ -233087,15 +233076,14 @@ All steps must be done before the task can be considered complete.
|
|
|
233087
233076
|
as part of this task.
|
|
233088
233077
|
- Add important discoveries about the codebase, or challenges faced to the task's
|
|
233089
233078
|
\`description\`. More details below.
|
|
233090
|
-
|
|
233091
|
-
|
|
233079
|
+
3. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
233080
|
+
4. ${options.gitFlow.commitInstructions({
|
|
233092
233081
|
githubPrInstructions: sourceMeta.githubPrInstructions,
|
|
233093
233082
|
githubPrNumber: options.githubPrNumber,
|
|
233094
233083
|
taskId: options.task.id ?? "unknown",
|
|
233095
233084
|
targetBranch: options.targetBranch
|
|
233096
233085
|
})}
|
|
233097
|
-
|
|
233098
|
-
your changes, update current task to reflect any changes in the task state.
|
|
233086
|
+
5. **After ${options.gitFlow.requiresGithubPr ? "pushing" : "committing"}** your changes, update current task to reflect any changes in the task state.
|
|
233099
233087
|
- Rewrite the notes in the description to include only the key discoveries and information that could speed up future work on other tasks. Make sure to preserve important information such as specification file references.
|
|
233100
233088
|
- If you believe the task is complete, update the \`state\` to "in-review".`;
|
|
233101
233089
|
const promptReview = (options) => `A previous engineer has completed a task from the instructions below.
|
|
@@ -233919,7 +233907,7 @@ const GitFlowPR = succeed$4(GitFlow, GitFlow.of({
|
|
|
233919
233907
|
requiresGithubPr: true,
|
|
233920
233908
|
branch: void 0,
|
|
233921
233909
|
setupInstructions: ({ githubPrNumber }) => githubPrNumber ? `The Github PR #${githubPrNumber} has been detected for this task and the branch has been checked out.
|
|
233922
|
-
- **REVIEW FEEDBACK** in the .lalph/feedback.md file.` : `
|
|
233910
|
+
- **REVIEW ALL FEEDBACK** in the .lalph/feedback.md file.` : `You are currently on a new branch for this task. You do not need to checkout any other branches.`,
|
|
233923
233911
|
commitInstructions: (options) => `${!options.githubPrNumber ? `Create a pull request for this task. If the target branch does not exist, create it first.` : "Commit and push your changes to the pull request."}
|
|
233924
233912
|
${options.githubPrInstructions}
|
|
233925
233913
|
The PR description should include a summary of the changes made.${options.targetBranch ? `\n - The target branch for the PR should be \`${options.targetBranch}\`.` : ""}
|
|
@@ -234186,6 +234174,10 @@ const run = fnUntraced(function* (options) {
|
|
|
234186
234174
|
yield* worktree.exec`gh pr checkout ${chosenTask.githubPrNumber}`;
|
|
234187
234175
|
const feedback = yield* gh.prFeedbackMd(chosenTask.githubPrNumber);
|
|
234188
234176
|
yield* fs.writeFileString(pathService.join(worktree.directory, ".lalph", "feedback.md"), feedback);
|
|
234177
|
+
} else if (gitFlow.requiresGithubPr) {
|
|
234178
|
+
const branchName = `lalph/${taskId.replace(/#/g, "").replace(/[^a-zA-Z0-9-_]/g, "-")}`;
|
|
234179
|
+
yield* worktree.exec`git branch -D ${branchName}`;
|
|
234180
|
+
yield* worktree.exec`git checkout -b ${branchName}`;
|
|
234189
234181
|
}
|
|
234190
234182
|
const taskPreset = getOrElse$2(yield* source.issueCliAgentPreset(chosenTask.prd), () => preset);
|
|
234191
234183
|
const catchStallInReview = (effect) => catchIf$2(effect, (u) => u instanceof RunnerStalled, fnUntraced(function* (e) {
|
|
@@ -234628,7 +234620,7 @@ const commandEdit = make$46("edit").pipe(withDescription("Open the selected proj
|
|
|
234628
234620
|
const commandSource = make$46("source").pipe(withDescription("Select the issue source to use (e.g. GitHub Issues or Linear). This applies to all projects."), withHandler(() => selectIssueSource), provide(Settings.layer));
|
|
234629
234621
|
//#endregion
|
|
234630
234622
|
//#region package.json
|
|
234631
|
-
var version = "0.3.
|
|
234623
|
+
var version = "0.3.56";
|
|
234632
234624
|
//#endregion
|
|
234633
234625
|
//#region src/commands/projects/ls.ts
|
|
234634
234626
|
const commandProjectsLs = make$46("ls").pipe(withDescription("List configured projects and how they run (enabled state, concurrency, branch, git flow, review agent)."), withHandler(fnUntraced(function* () {
|
package/package.json
CHANGED
package/src/GitFlow.ts
CHANGED
|
@@ -61,8 +61,8 @@ export const GitFlowPR = Layer.succeed(
|
|
|
61
61
|
setupInstructions: ({ githubPrNumber }) =>
|
|
62
62
|
githubPrNumber
|
|
63
63
|
? `The Github PR #${githubPrNumber} has been detected for this task and the branch has been checked out.
|
|
64
|
-
- **REVIEW FEEDBACK** in the .lalph/feedback.md file.`
|
|
65
|
-
: `
|
|
64
|
+
- **REVIEW ALL FEEDBACK** in the .lalph/feedback.md file.`
|
|
65
|
+
: `You are currently on a new branch for this task. You do not need to checkout any other branches.`,
|
|
66
66
|
|
|
67
67
|
commitInstructions: (
|
|
68
68
|
options,
|
package/src/PromptGen.ts
CHANGED
|
@@ -178,24 +178,22 @@ ${taskGuidelines(options)}`
|
|
|
178
178
|
readonly specsDirectory: string
|
|
179
179
|
readonly githubPrNumber: number | undefined
|
|
180
180
|
readonly gitFlow: GitFlow["Service"]
|
|
181
|
-
}) => `#
|
|
181
|
+
}) => `# ${options.task.title}
|
|
182
182
|
|
|
183
|
-
ID: ${options.task.id}
|
|
184
|
-
Task: ${options.task.title}
|
|
185
|
-
Description:
|
|
183
|
+
Task ID: ${options.task.id}
|
|
186
184
|
|
|
187
185
|
${options.task.description}
|
|
188
186
|
|
|
189
|
-
|
|
187
|
+
### Instructions
|
|
190
188
|
|
|
191
|
-
Your job is to implement the task described above
|
|
189
|
+
Your job is to implement the task described above.${
|
|
190
|
+
options.task.description.includes(options.specsDirectory)
|
|
191
|
+
? `\nMake sure to review the prd.yml for any key information that may help you with this task.`
|
|
192
|
+
: ""
|
|
193
|
+
}
|
|
192
194
|
|
|
193
|
-
1.
|
|
194
|
-
|
|
195
|
-
Also read the ${options.specsDirectory}/README.md file (if available), to see
|
|
196
|
-
if any previous specifications could assist you.
|
|
197
|
-
2. ${options.gitFlow.setupInstructions(options)}
|
|
198
|
-
3. Implement the task.
|
|
195
|
+
1. ${options.gitFlow.setupInstructions(options)}
|
|
196
|
+
2. Implement the task.
|
|
199
197
|
- If this task is a research task, **do not** make any code changes yet.
|
|
200
198
|
- If this task is a research task and you add follow-up tasks, include (at least) "${options.task.id}" in the new task's \`blockedBy\` field.
|
|
201
199
|
- **If at any point** you discover something that needs fixing, or another task
|
|
@@ -203,15 +201,14 @@ Your job is to implement the task described above.
|
|
|
203
201
|
you plan to fix it as part of this task.
|
|
204
202
|
- Add important discoveries about the codebase, or challenges faced to the task's
|
|
205
203
|
\`description\`. More details below.
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
3. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
205
|
+
4. ${options.gitFlow.commitInstructions({
|
|
208
206
|
githubPrInstructions: sourceMeta.githubPrInstructions,
|
|
209
207
|
githubPrNumber: options.githubPrNumber,
|
|
210
208
|
taskId: options.task.id ?? "unknown",
|
|
211
209
|
targetBranch: options.targetBranch,
|
|
212
210
|
})}
|
|
213
|
-
|
|
214
|
-
your changes, update the prd.yml to reflect any changes in the task state.
|
|
211
|
+
5. **After ${options.gitFlow.requiresGithubPr ? "pushing" : "committing"}** your changes, update the prd.yml to reflect any changes in the task state.
|
|
215
212
|
- Rewrite the notes in the description to include only the key discoveries and information that could speed up future work on other tasks. Make sure to preserve important information such as specification file references.
|
|
216
213
|
- If you believe the task is complete, update the \`state\` to "in-review".
|
|
217
214
|
|
|
@@ -229,16 +226,16 @@ Task ID: ${options.task.id}
|
|
|
229
226
|
|
|
230
227
|
${options.task.description}
|
|
231
228
|
|
|
232
|
-
|
|
229
|
+
### Instructions
|
|
233
230
|
|
|
234
|
-
All steps must be done before the task can be considered complete
|
|
231
|
+
All steps must be done before the task can be considered complete.${
|
|
232
|
+
options.task.description.includes(options.specsDirectory)
|
|
233
|
+
? `\nMake sure to review the previous tasks (using "listTasks") for any key information that may help you with this task.`
|
|
234
|
+
: ""
|
|
235
|
+
}
|
|
235
236
|
|
|
236
|
-
1.
|
|
237
|
-
|
|
238
|
-
Also read the ${options.specsDirectory}/README.md file (if available), to see
|
|
239
|
-
if any previous specifications could assist you.
|
|
240
|
-
2. ${options.gitFlow.setupInstructions(options)}
|
|
241
|
-
3. Implement the task.
|
|
237
|
+
1. ${options.gitFlow.setupInstructions(options)}
|
|
238
|
+
2. Implement the task.
|
|
242
239
|
- If this task is a research task, **do not** make any code changes yet.
|
|
243
240
|
- If this task is a research task and you add follow-up tasks, include (at least) "${options.task.id}" in the new task's \`blockedBy\` field.
|
|
244
241
|
- **If at any point** you discover something that needs fixing, or another task
|
|
@@ -246,15 +243,14 @@ All steps must be done before the task can be considered complete.
|
|
|
246
243
|
as part of this task.
|
|
247
244
|
- Add important discoveries about the codebase, or challenges faced to the task's
|
|
248
245
|
\`description\`. More details below.
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
3. Run any checks / feedback loops, such as type checks, unit tests, or linting.
|
|
247
|
+
4. ${options.gitFlow.commitInstructions({
|
|
251
248
|
githubPrInstructions: sourceMeta.githubPrInstructions,
|
|
252
249
|
githubPrNumber: options.githubPrNumber,
|
|
253
250
|
taskId: options.task.id ?? "unknown",
|
|
254
251
|
targetBranch: options.targetBranch,
|
|
255
252
|
})}
|
|
256
|
-
|
|
257
|
-
your changes, update current task to reflect any changes in the task state.
|
|
253
|
+
5. **After ${options.gitFlow.requiresGithubPr ? "pushing" : "committing"}** your changes, update current task to reflect any changes in the task state.
|
|
258
254
|
- Rewrite the notes in the description to include only the key discoveries and information that could speed up future work on other tasks. Make sure to preserve important information such as specification file references.
|
|
259
255
|
- If you believe the task is complete, update the \`state\` to "in-review".`
|
|
260
256
|
|
package/src/commands/root.ts
CHANGED
|
@@ -178,6 +178,10 @@ const run = Effect.fnUntraced(
|
|
|
178
178
|
pathService.join(worktree.directory, ".lalph", "feedback.md"),
|
|
179
179
|
feedback,
|
|
180
180
|
)
|
|
181
|
+
} else if (gitFlow.requiresGithubPr) {
|
|
182
|
+
const branchName = `lalph/${taskId.replace(/#/g, "").replace(/[^a-zA-Z0-9-_]/g, "-")}`
|
|
183
|
+
yield* worktree.exec`git branch -D ${branchName}`
|
|
184
|
+
yield* worktree.exec`git checkout -b ${branchName}`
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
const taskPreset = Option.getOrElse(
|