lalph 0.3.3 → 0.3.5

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
@@ -151201,7 +151201,9 @@ If you need to add a research task, mention in the description that it needs to:
151201
151201
  - add a specification file in the \`${options.specsDirectory}\` directory with
151202
151202
  an implementation plan based on the research findings.
151203
151203
  - once the specification file is added, turn the implementation plan into tasks
151204
- in the prd.yml file.
151204
+ in the prd.yml file. Each task should reference the specification file in its
151205
+ description, and be small, atomic and independently shippable without failing
151206
+ validation checks (typechecks, linting, tests).
151205
151207
  - make sure the follow up tasks include a dependency on the research task.` : ""}
151206
151208
 
151207
151209
  ### Removing tasks
@@ -151360,10 +151362,34 @@ ${options.plan}
151360
151362
  accordingly.
151361
151363
  2. Add a detailed implementation plan to the specification, breaking down the work into
151362
151364
  smaller, manageable tasks.
151363
- 3. Start two subagents with a copy of this prompt.
151364
- - The first subagent will review the plan and provide feedback or improvements.
151365
- - The second subagent will look over the implementation plan, and ensure each task is
151366
- small, atomic and independently shippable without failing validation checks (typechecks, linting, tests).
151365
+ 3. Start two subagents to review the plan:
151366
+ - The first subagent will recieve the following prompt:
151367
+ \`\`\`
151368
+ Your job is to thoroughly review the specification created for the request,
151369
+ recommend improvements, and ensure every detail is covered.
151370
+
151371
+ Below is the original request.
151372
+
151373
+ ---
151374
+
151375
+ {insert original prompt here}
151376
+ \`\`\`
151377
+
151378
+ - The second subagent will receive the following prompt:
151379
+ \`\`\`
151380
+ Your job is to look over the implementation plan, and ensure each task is
151381
+ small, atomic and independently shippable. You also **NEED TO** make sure task
151382
+ can be completed without failing validation checks (typechecks, linting, tests).
151383
+ If a task will only pass validations when combined with another, the subagent should
151384
+ combine the work into one task.
151385
+
151386
+ Below is the original request.
151387
+
151388
+ ---
151389
+
151390
+ {insert original prompt here}
151391
+ \`\`\`
151392
+
151367
151393
  4. Write the specification details to a \`.lalph/plan.json\` file using the following format:
151368
151394
  \`\`\`json
151369
151395
  {
@@ -151924,7 +151950,8 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
151924
151950
  static layerProvided = this.layer.pipe(provide$3([
151925
151951
  layer,
151926
151952
  layer$17,
151927
- CurrentIssueSource.layer
151953
+ CurrentIssueSource.layer,
151954
+ Settings.layer
151928
151955
  ]));
151929
151956
  static layerLocal = this.layerNoWorktree.pipe(provideMerge(Worktree.layerLocal));
151930
151957
  static layerLocalProvided = this.layerLocal.pipe(provide$3([
@@ -152347,8 +152374,7 @@ const commandPlanTasks = make$35("tasks", { specificationPath }).pipe(withDescri
152347
152374
  Settings.layer,
152348
152375
  PromptGen.layer,
152349
152376
  Prd.layerProvided.pipe(provide$3(layerProjectIdPrompt)),
152350
- CurrentIssueSource.layer,
152351
- Settings.layer
152377
+ CurrentIssueSource.layer
152352
152378
  ]))));
152353
152379
 
152354
152380
  //#endregion
@@ -152396,19 +152422,17 @@ const commandPlan = make$35("plan", {
152396
152422
  }).pipe(withDescription("Iterate on an issue plan and create PRD tasks"), withHandler(fnUntraced(function* ({ dangerous, withNewProject }) {
152397
152423
  const thePlan = yield* (yield* Editor).editTemp({ suffix: ".md" });
152398
152424
  if (isNone(thePlan)) return;
152399
- const project = withNewProject ? yield* addOrUpdateProject() : yield* selectProject;
152400
- const { specsDirectory } = yield* commandRoot;
152401
- yield* plan({
152402
- plan: thePlan.value,
152403
- specsDirectory,
152404
- targetBranch: project.targetBranch,
152405
- dangerous
152406
- }).pipe(provideService(CurrentProjectId, project.id));
152407
- }, provide$1([
152408
- Settings.layer,
152409
- CurrentIssueSource.layer,
152410
- Editor.layer
152411
- ]))), withSubcommands([commandPlanTasks]));
152425
+ yield* gen(function* () {
152426
+ const project = withNewProject ? yield* addOrUpdateProject() : yield* selectProject;
152427
+ const { specsDirectory } = yield* commandRoot;
152428
+ yield* plan({
152429
+ plan: thePlan.value,
152430
+ specsDirectory,
152431
+ targetBranch: project.targetBranch,
152432
+ dangerous
152433
+ }).pipe(provideService(CurrentProjectId, project.id));
152434
+ }).pipe(provide$1([Settings.layer, CurrentIssueSource.layer]));
152435
+ }, provide$1(Editor.layer))), withSubcommands([commandPlanTasks]));
152412
152436
  const plan = fnUntraced(function* (options) {
152413
152437
  const fs = yield* FileSystem;
152414
152438
  const pathService = yield* Path$1;
@@ -152510,7 +152534,7 @@ const commandSource = make$35("source").pipe(withDescription("Select the issue s
152510
152534
 
152511
152535
  //#endregion
152512
152536
  //#region package.json
152513
- var version = "0.3.3";
152537
+ var version = "0.3.5";
152514
152538
 
152515
152539
  //#endregion
152516
152540
  //#region src/commands/projects/ls.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.3.3",
4
+ "version": "0.3.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,6 +27,7 @@
27
27
  "@linear/sdk": "^72.0.0",
28
28
  "@octokit/plugin-rest-endpoint-methods": "^17.0.0",
29
29
  "@octokit/types": "^16.0.0",
30
+ "concurrently": "^9.2.1",
30
31
  "effect": "https://pkg.pr.new/Effect-TS/effect-smol/effect@39ecde9",
31
32
  "husky": "^9.1.7",
32
33
  "lint-staged": "^16.2.7",
@@ -47,7 +48,7 @@
47
48
  ]
48
49
  },
49
50
  "scripts": {
50
- "check": "tsc --noEmit && oxlint -c .oxlintrc.json",
51
+ "check": "concurrently \"tsc --noEmit\" \"oxlint -c .oxlintrc.json\" \"pnpm build\"",
51
52
  "build": "tsdown"
52
53
  }
53
54
  }
package/src/Prd.ts CHANGED
@@ -15,7 +15,7 @@ import { PrdIssue } from "./domain/PrdIssue.ts"
15
15
  import { IssueSource, IssueSourceError } from "./IssueSource.ts"
16
16
  import { AtomRegistry, Reactivity } from "effect/unstable/reactivity"
17
17
  import { CurrentIssueSource, currentIssuesAtom } from "./CurrentIssueSource.ts"
18
- import { CurrentProjectId } from "./Settings.ts"
18
+ import { CurrentProjectId, Settings } from "./Settings.ts"
19
19
 
20
20
  export class Prd extends ServiceMap.Service<
21
21
  Prd,
@@ -282,6 +282,7 @@ export class Prd extends ServiceMap.Service<
282
282
  AtomRegistry.layer,
283
283
  Reactivity.layer,
284
284
  CurrentIssueSource.layer,
285
+ Settings.layer,
285
286
  ]),
286
287
  )
287
288
  static layerLocal = this.layerNoWorktree.pipe(
package/src/PromptGen.ts CHANGED
@@ -55,7 +55,9 @@ If you need to add a research task, mention in the description that it needs to:
55
55
  - add a specification file in the \`${options.specsDirectory}\` directory with
56
56
  an implementation plan based on the research findings.
57
57
  - once the specification file is added, turn the implementation plan into tasks
58
- in the prd.yml file.
58
+ in the prd.yml file. Each task should reference the specification file in its
59
+ description, and be small, atomic and independently shippable without failing
60
+ validation checks (typechecks, linting, tests).
59
61
  - make sure the follow up tasks include a dependency on the research task.`
60
62
  : ""
61
63
  }
@@ -253,10 +255,34 @@ ${options.plan}
253
255
  accordingly.
254
256
  2. Add a detailed implementation plan to the specification, breaking down the work into
255
257
  smaller, manageable tasks.
256
- 3. Start two subagents with a copy of this prompt.
257
- - The first subagent will review the plan and provide feedback or improvements.
258
- - The second subagent will look over the implementation plan, and ensure each task is
259
- small, atomic and independently shippable without failing validation checks (typechecks, linting, tests).
258
+ 3. Start two subagents to review the plan:
259
+ - The first subagent will recieve the following prompt:
260
+ \`\`\`
261
+ Your job is to thoroughly review the specification created for the request,
262
+ recommend improvements, and ensure every detail is covered.
263
+
264
+ Below is the original request.
265
+
266
+ ---
267
+
268
+ {insert original prompt here}
269
+ \`\`\`
270
+
271
+ - The second subagent will receive the following prompt:
272
+ \`\`\`
273
+ Your job is to look over the implementation plan, and ensure each task is
274
+ small, atomic and independently shippable. You also **NEED TO** make sure task
275
+ can be completed without failing validation checks (typechecks, linting, tests).
276
+ If a task will only pass validations when combined with another, the subagent should
277
+ combine the work into one task.
278
+
279
+ Below is the original request.
280
+
281
+ ---
282
+
283
+ {insert original prompt here}
284
+ \`\`\`
285
+
260
286
  4. Write the specification details to a \`.lalph/plan.json\` file using the following format:
261
287
  \`\`\`json
262
288
  {
@@ -54,7 +54,6 @@ export const commandPlanTasks = Command.make("tasks", {
54
54
  PromptGen.layer,
55
55
  Prd.layerProvided.pipe(Layer.provide(layerProjectIdPrompt)),
56
56
  CurrentIssueSource.layer,
57
- Settings.layer,
58
57
  ]),
59
58
  ),
60
59
  ),
@@ -31,15 +31,17 @@ export const commandPlan = Command.make("plan", {
31
31
  }).pipe(
32
32
  Command.withDescription("Iterate on an issue plan and create PRD tasks"),
33
33
  Command.withHandler(
34
- Effect.fnUntraced(
35
- function* ({ dangerous, withNewProject }) {
36
- const editor = yield* Editor
34
+ Effect.fnUntraced(function* ({ dangerous, withNewProject }) {
35
+ const editor = yield* Editor
37
36
 
38
- const thePlan = yield* editor.editTemp({
39
- suffix: ".md",
40
- })
41
- if (Option.isNone(thePlan)) return
37
+ const thePlan = yield* editor.editTemp({
38
+ suffix: ".md",
39
+ })
40
+ if (Option.isNone(thePlan)) return
42
41
 
42
+ // We nest this effect, so we can launch the editor first as fast as
43
+ // possible
44
+ yield* Effect.gen(function* () {
43
45
  const project = withNewProject
44
46
  ? yield* addOrUpdateProject()
45
47
  : yield* selectProject
@@ -51,9 +53,8 @@ export const commandPlan = Command.make("plan", {
51
53
  targetBranch: project.targetBranch,
52
54
  dangerous,
53
55
  }).pipe(Effect.provideService(CurrentProjectId, project.id))
54
- },
55
- Effect.provide([Settings.layer, CurrentIssueSource.layer, Editor.layer]),
56
- ),
56
+ }).pipe(Effect.provide([Settings.layer, CurrentIssueSource.layer]))
57
+ }, Effect.provide(Editor.layer)),
57
58
  ),
58
59
  Command.withSubcommands([commandPlanTasks]),
59
60
  )