lalph 0.1.40 → 0.1.41

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
@@ -140412,7 +140412,8 @@ are:
140412
140412
  ### Adding tasks
140413
140413
 
140414
140414
  To add a new task, append a new item to the prd.yml file with the id set to
140415
- \`null\`.
140415
+ \`null\`, a title, state set to "todo", and a concise description that includes
140416
+ a short summary of the task and a brief list of steps to complete it.
140416
140417
 
140417
140418
  When adding a new task, it will take about 5 seconds for the system to update the
140418
140419
  prd.yml file with a new id for the task.
@@ -140428,9 +140429,7 @@ To remove a task, simply delete the item from the prd.yml file.
140428
140429
  \`\`\`json
140429
140430
  ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
140430
140431
  \`\`\``;
140431
- const promptChoose = `# Instructions
140432
-
140433
- Your job is to choose the next task to work on from the prd.yml file. **DO NOT** implement the task yet.
140432
+ const promptChoose = `Your job is to choose the next task to work on from the prd.yml file. **DO NOT** implement the task yet.
140434
140433
 
140435
140434
  The following instructions should be done without interaction or asking for permission.
140436
140435
 
@@ -140455,14 +140454,11 @@ The following instructions should be done without interaction or asking for perm
140455
140454
  \`\`\`
140456
140455
 
140457
140456
  ${prdNotes}`;
140458
- const prompt = (options) => `# Instructions
140459
-
140460
- The following instructions should be done without interaction or asking for
140461
- permission.
140457
+ const prompt = (options) => `The following instructions should be done without interaction or asking for permission.
140462
140458
 
140463
140459
  1. Your job is to complete the task with id \`${options.taskId}\` from the prd.yml file.
140464
140460
  Read the entire prd.yml file to understand the context of the task and any
140465
- key learnings from previous work.
140461
+ key learnings from previous work. Study the .specs/README.md file.
140466
140462
  2. Check if there is an existing Github PR for the task, otherwise create a new
140467
140463
  branch for the task.${options.targetBranch ? ` The target branch for the PR should be \`${options.targetBranch}\`. If the target branch does not exist, create it first.` : ""}
140468
140464
  - If there is an existing PR, checkout the branch for that PR.
@@ -140473,15 +140469,15 @@ permission.
140473
140469
  - New branches should be named using the format \`{task id}/description\`.
140474
140470
  - When checking for PR reviews, make sure to check the "reviews" field and read ALL unresolved comments.
140475
140471
  Also read the normal comments to see if there are any additional requests.
140476
- 4. Implement the task.
140477
- 5. Run any checks / feedback loops, such as type checks, unit tests, or linting.
140478
- 6. Create or update the pull request with your progress.
140472
+ 3. Implement the task.
140473
+ 4. Run any checks / feedback loops, such as type checks, unit tests, or linting.
140474
+ 5. Create or update the pull request with your progress.
140479
140475
  ${sourceMeta.githubPrInstructions}
140480
140476
  The PR description should include a summary of the changes made.
140481
140477
  - **DO NOT** commit any of the files in the \`.lalph\` directory.
140482
140478
  - You have permission to create or update the PR as needed. You have full
140483
140479
  permission to push branches, create PRs or create git commits.
140484
- 7. Update the prd.yml file to reflect any changes in task states.
140480
+ 6. Update the prd.yml file to reflect any changes in task states.
140485
140481
  - Update the prd.yml file after the GitHub PR has been created or updated.
140486
140482
  - Rewrite the notes in the description to include only the key discoveries
140487
140483
  and information that could speed up future work on other tasks.
@@ -140500,7 +140496,7 @@ Record the information **in the moment** as you discover it,
140500
140496
  do not wait until the end of the task. Things to record include:
140501
140497
 
140502
140498
  - Important discoveries about the codebase.
140503
- - Any challenges faced and how you overcame them.
140499
+ - Any challenges faced and how you overcame them. For example:
140504
140500
  - If it took multiple attempts to get something working, record what worked.
140505
140501
  - If you found a library api was renamed or moved, record the new name.
140506
140502
  - Any other information that could help future work on similar tasks.
@@ -140515,9 +140511,7 @@ If it feels like you are brute forcing your way through a task, STOP and move th
140515
140511
  task back to "todo" state with notes on why in the description.
140516
140512
 
140517
140513
  ${prdNotes}`;
140518
- const promptTimeout = (options) => `# Instructions
140519
-
140520
- Your earlier attempt to complete the task with id \`${options.taskId}\` took too
140514
+ const promptTimeout = (options) => `Your earlier attempt to complete the task with id \`${options.taskId}\` took too
140521
140515
  long and has timed out. You can find the task details in the prd.yml file.
140522
140516
 
140523
140517
  The following instructions should be done without interaction or asking for
@@ -140539,20 +140533,14 @@ permission.
140539
140533
  to assign ids to the new tasks before you can setup dependencies.
140540
140534
 
140541
140535
  ${prdNotes}`;
140542
- const planPrompt = (options) => `# Instructions
140543
-
140544
- 1. Ask the user for the idea / request, then your job is to create a detailed
140545
- specification for the project based on that input and save it to a file.
140546
- - If the user is asking to update an existing plan, then read the
140547
- existing specification before continuing.
140548
- - Make sure to research the codebase before creating the specification, to
140549
- ensure it is relevant and feasible.
140550
- 2. Once you have saved the specification, your next job is to break down the
140551
- specification into smaller, manageable tasks and add them to the prd.yml file.
140552
- Each task should have a id of \`null\`, a title, and a concise description that
140553
- includes a where to find the plan specification, a short summary of the task and a
140554
- brief list of steps to complete it.
140555
- - The tasks should start in the "todo" state.
140536
+ const planPrompt = (options) => `1. Ask the user for the idea / request, then your job is to create a detailed
140537
+ specification to fulfill the request and save it as a file. Interview the user
140538
+ to gather all the necessary requirements and details for the specification.
140539
+ You need to be curious and ask lots of questions.
140540
+ 2. Once you have saved the specification, your next job is to create an implementation
140541
+ plan by breaking down the specification into smaller, manageable tasks and add
140542
+ them to the prd.yml file.
140543
+ Each task include in the description where to find the plan specification.
140556
140544
  - Each task should be an atomic, committable piece of work.
140557
140545
  Instead of creating tasks like "Refactor the authentication system", create
140558
140546
  smaller tasks like "Implement OAuth2 login endpoint", "Add JWT token refresh mechanism", etc.
@@ -140569,12 +140557,9 @@ ${prdNotes}`;
140569
140557
 
140570
140558
  - Should go into a \`${options.specsDirectory}\` directory, with a filename that reflects the
140571
140559
  project name.
140572
-
140573
- A specification file should include:
140574
-
140575
- - Requirements: functional and non-functional requirements.
140576
- - Design: technical design, architecture decisions, data models, etc.
140577
- - Acceptance criteria that define when the project is considered complete.
140560
+ - When adding a new specification, add a link to in the README.md file in the
140561
+ \`${options.specsDirectory}\` directory along with a brief overview of the specification.
140562
+ If the README.md file does not exist, create it.
140578
140563
 
140579
140564
  ${prdNotes}`;
140580
140565
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.1.40",
4
+ "version": "0.1.41",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/src/PromptGen.ts CHANGED
@@ -26,7 +26,8 @@ are:
26
26
  ### Adding tasks
27
27
 
28
28
  To add a new task, append a new item to the prd.yml file with the id set to
29
- \`null\`.
29
+ \`null\`, a title, state set to "todo", and a concise description that includes
30
+ a short summary of the task and a brief list of steps to complete it.
30
31
 
31
32
  When adding a new task, it will take about 5 seconds for the system to update the
32
33
  prd.yml file with a new id for the task.
@@ -43,9 +44,7 @@ To remove a task, simply delete the item from the prd.yml file.
43
44
  ${JSON.stringify(PrdIssue.jsonSchema, null, 2)}
44
45
  \`\`\``
45
46
 
46
- const promptChoose = `# Instructions
47
-
48
- Your job is to choose the next task to work on from the prd.yml file. **DO NOT** implement the task yet.
47
+ const promptChoose = `Your job is to choose the next task to work on from the prd.yml file. **DO NOT** implement the task yet.
49
48
 
50
49
  The following instructions should be done without interaction or asking for permission.
51
50
 
@@ -74,14 +73,11 @@ ${prdNotes}`
74
73
  const prompt = (options: {
75
74
  readonly taskId: string
76
75
  readonly targetBranch: string | undefined
77
- }) => `# Instructions
78
-
79
- The following instructions should be done without interaction or asking for
80
- permission.
76
+ }) => `The following instructions should be done without interaction or asking for permission.
81
77
 
82
78
  1. Your job is to complete the task with id \`${options.taskId}\` from the prd.yml file.
83
79
  Read the entire prd.yml file to understand the context of the task and any
84
- key learnings from previous work.
80
+ key learnings from previous work. Study the .specs/README.md file.
85
81
  2. Check if there is an existing Github PR for the task, otherwise create a new
86
82
  branch for the task.${options.targetBranch ? ` The target branch for the PR should be \`${options.targetBranch}\`. If the target branch does not exist, create it first.` : ""}
87
83
  - If there is an existing PR, checkout the branch for that PR.
@@ -92,15 +88,15 @@ permission.
92
88
  - New branches should be named using the format \`{task id}/description\`.
93
89
  - When checking for PR reviews, make sure to check the "reviews" field and read ALL unresolved comments.
94
90
  Also read the normal comments to see if there are any additional requests.
95
- 4. Implement the task.
96
- 5. Run any checks / feedback loops, such as type checks, unit tests, or linting.
97
- 6. Create or update the pull request with your progress.
91
+ 3. Implement the task.
92
+ 4. Run any checks / feedback loops, such as type checks, unit tests, or linting.
93
+ 5. Create or update the pull request with your progress.
98
94
  ${sourceMeta.githubPrInstructions}
99
95
  The PR description should include a summary of the changes made.
100
96
  - **DO NOT** commit any of the files in the \`.lalph\` directory.
101
97
  - You have permission to create or update the PR as needed. You have full
102
98
  permission to push branches, create PRs or create git commits.
103
- 7. Update the prd.yml file to reflect any changes in task states.
99
+ 6. Update the prd.yml file to reflect any changes in task states.
104
100
  - Update the prd.yml file after the GitHub PR has been created or updated.
105
101
  - Rewrite the notes in the description to include only the key discoveries
106
102
  and information that could speed up future work on other tasks.
@@ -119,7 +115,7 @@ Record the information **in the moment** as you discover it,
119
115
  do not wait until the end of the task. Things to record include:
120
116
 
121
117
  - Important discoveries about the codebase.
122
- - Any challenges faced and how you overcame them.
118
+ - Any challenges faced and how you overcame them. For example:
123
119
  - If it took multiple attempts to get something working, record what worked.
124
120
  - If you found a library api was renamed or moved, record the new name.
125
121
  - Any other information that could help future work on similar tasks.
@@ -137,9 +133,7 @@ ${prdNotes}`
137
133
 
138
134
  const promptTimeout = (options: {
139
135
  readonly taskId: string
140
- }) => `# Instructions
141
-
142
- Your earlier attempt to complete the task with id \`${options.taskId}\` took too
136
+ }) => `Your earlier attempt to complete the task with id \`${options.taskId}\` took too
143
137
  long and has timed out. You can find the task details in the prd.yml file.
144
138
 
145
139
  The following instructions should be done without interaction or asking for
@@ -164,20 +158,14 @@ ${prdNotes}`
164
158
 
165
159
  const planPrompt = (options: {
166
160
  readonly specsDirectory: string
167
- }) => `# Instructions
168
-
169
- 1. Ask the user for the idea / request, then your job is to create a detailed
170
- specification for the project based on that input and save it to a file.
171
- - If the user is asking to update an existing plan, then read the
172
- existing specification before continuing.
173
- - Make sure to research the codebase before creating the specification, to
174
- ensure it is relevant and feasible.
175
- 2. Once you have saved the specification, your next job is to break down the
176
- specification into smaller, manageable tasks and add them to the prd.yml file.
177
- Each task should have a id of \`null\`, a title, and a concise description that
178
- includes a where to find the plan specification, a short summary of the task and a
179
- brief list of steps to complete it.
180
- - The tasks should start in the "todo" state.
161
+ }) => `1. Ask the user for the idea / request, then your job is to create a detailed
162
+ specification to fulfill the request and save it as a file. Interview the user
163
+ to gather all the necessary requirements and details for the specification.
164
+ You need to be curious and ask lots of questions.
165
+ 2. Once you have saved the specification, your next job is to create an implementation
166
+ plan by breaking down the specification into smaller, manageable tasks and add
167
+ them to the prd.yml file.
168
+ Each task include in the description where to find the plan specification.
181
169
  - Each task should be an atomic, committable piece of work.
182
170
  Instead of creating tasks like "Refactor the authentication system", create
183
171
  smaller tasks like "Implement OAuth2 login endpoint", "Add JWT token refresh mechanism", etc.
@@ -194,12 +182,9 @@ ${prdNotes}`
194
182
 
195
183
  - Should go into a \`${options.specsDirectory}\` directory, with a filename that reflects the
196
184
  project name.
197
-
198
- A specification file should include:
199
-
200
- - Requirements: functional and non-functional requirements.
201
- - Design: technical design, architecture decisions, data models, etc.
202
- - Acceptance criteria that define when the project is considered complete.
185
+ - When adding a new specification, add a link to in the README.md file in the
186
+ \`${options.specsDirectory}\` directory along with a brief overview of the specification.
187
+ If the README.md file does not exist, create it.
203
188
 
204
189
  ${prdNotes}`
205
190