lalph 0.3.2 → 0.3.4

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
@@ -151363,7 +151365,10 @@ ${options.plan}
151363
151365
  3. Start two subagents with a copy of this prompt.
151364
151366
  - The first subagent will review the plan and provide feedback or improvements.
151365
151367
  - 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).
151368
+ small, atomic and independently shippable. It also **NEEDS TO** make sure task
151369
+ can be completed without failing validation checks (typechecks, linting, tests).
151370
+ If a task will only pass validations when combined with another, the subagent should
151371
+ combine the work into one task.
151367
151372
  4. Write the specification details to a \`.lalph/plan.json\` file using the following format:
151368
151373
  \`\`\`json
151369
151374
  {
@@ -151591,7 +151596,7 @@ const addOrUpdateProject = fnUntraced(function* (existing) {
151591
151596
  title: "Commit",
151592
151597
  description: "Tasks are committed directly to the target branch",
151593
151598
  value: "commit",
151594
- selected: existing ? existing.gitFlow === "pr" : false
151599
+ selected: existing ? existing.gitFlow === "commit" : false
151595
151600
  }]
151596
151601
  });
151597
151602
  const reviewAgent = yield* toggle({
@@ -151924,7 +151929,8 @@ var Prd = class extends Service$1()("lalph/Prd", { make: gen(function* () {
151924
151929
  static layerProvided = this.layer.pipe(provide$3([
151925
151930
  layer,
151926
151931
  layer$17,
151927
- CurrentIssueSource.layer
151932
+ CurrentIssueSource.layer,
151933
+ Settings.layer
151928
151934
  ]));
151929
151935
  static layerLocal = this.layerNoWorktree.pipe(provideMerge(Worktree.layerLocal));
151930
151936
  static layerLocalProvided = this.layerLocal.pipe(provide$3([
@@ -152347,8 +152353,7 @@ const commandPlanTasks = make$35("tasks", { specificationPath }).pipe(withDescri
152347
152353
  Settings.layer,
152348
152354
  PromptGen.layer,
152349
152355
  Prd.layerProvided.pipe(provide$3(layerProjectIdPrompt)),
152350
- CurrentIssueSource.layer,
152351
- Settings.layer
152356
+ CurrentIssueSource.layer
152352
152357
  ]))));
152353
152358
 
152354
152359
  //#endregion
@@ -152396,19 +152401,17 @@ const commandPlan = make$35("plan", {
152396
152401
  }).pipe(withDescription("Iterate on an issue plan and create PRD tasks"), withHandler(fnUntraced(function* ({ dangerous, withNewProject }) {
152397
152402
  const thePlan = yield* (yield* Editor).editTemp({ suffix: ".md" });
152398
152403
  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]));
152404
+ yield* gen(function* () {
152405
+ const project = withNewProject ? yield* addOrUpdateProject() : yield* selectProject;
152406
+ const { specsDirectory } = yield* commandRoot;
152407
+ yield* plan({
152408
+ plan: thePlan.value,
152409
+ specsDirectory,
152410
+ targetBranch: project.targetBranch,
152411
+ dangerous
152412
+ }).pipe(provideService(CurrentProjectId, project.id));
152413
+ }).pipe(provide$1([Settings.layer, CurrentIssueSource.layer]));
152414
+ }, provide$1(Editor.layer))), withSubcommands([commandPlanTasks]));
152412
152415
  const plan = fnUntraced(function* (options) {
152413
152416
  const fs = yield* FileSystem;
152414
152417
  const pathService = yield* Path$1;
@@ -152510,7 +152513,7 @@ const commandSource = make$35("source").pipe(withDescription("Select the issue s
152510
152513
 
152511
152514
  //#endregion
152512
152515
  //#region package.json
152513
- var version = "0.3.2";
152516
+ var version = "0.3.4";
152514
152517
 
152515
152518
  //#endregion
152516
152519
  //#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.2",
4
+ "version": "0.3.4",
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/Projects.ts CHANGED
@@ -188,7 +188,7 @@ export const addOrUpdateProject = Effect.fnUntraced(function* (
188
188
  title: "Commit",
189
189
  description: "Tasks are committed directly to the target branch",
190
190
  value: "commit",
191
- selected: existing ? existing.gitFlow === "pr" : false,
191
+ selected: existing ? existing.gitFlow === "commit" : false,
192
192
  },
193
193
  ] as const,
194
194
  })
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
  }
@@ -256,7 +258,10 @@ ${options.plan}
256
258
  3. Start two subagents with a copy of this prompt.
257
259
  - The first subagent will review the plan and provide feedback or improvements.
258
260
  - 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).
261
+ small, atomic and independently shippable. It also **NEEDS TO** make sure task
262
+ can be completed without failing validation checks (typechecks, linting, tests).
263
+ If a task will only pass validations when combined with another, the subagent should
264
+ combine the work into one task.
260
265
  4. Write the specification details to a \`.lalph/plan.json\` file using the following format:
261
266
  \`\`\`json
262
267
  {
@@ -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
  )