@pmelab/gtd 20.4.0 → 21.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmelab/gtd",
3
- "version": "20.4.0",
3
+ "version": "21.0.0",
4
4
  "private": false,
5
5
  "description": "Git-aware CLI that emits the next prompt for an autonomous coding agent based on the current repository state",
6
6
  "bin": {
@@ -8,7 +8,16 @@
8
8
  },
9
9
  "exports": {
10
10
  "./flows": "./src/flows/index.ts",
11
- "./workflow": "./src/workflows/bundled.ts"
11
+ "./workflows": {
12
+ "types": "./src/workflows/index.ts",
13
+ "source": "./src/workflows/index.ts",
14
+ "default": "./dist/workflows.mjs"
15
+ },
16
+ "./workflow": {
17
+ "types": "./src/workflows/index.ts",
18
+ "source": "./src/workflows/index.ts",
19
+ "default": "./dist/workflows.mjs"
20
+ }
12
21
  },
13
22
  "files": [
14
23
  "dist/",
@@ -42,7 +51,7 @@
42
51
  "scripts": {
43
52
  "prepare": "husky",
44
53
  "dev": "node dev/run.mjs",
45
- "build": "tsdown --filter web && npx @tailwindcss/cli -i src/web/styles.css -o dist/web/main.css --minify && node scripts/inline-web-client.mjs && tsdown --filter gtd",
54
+ "build": "tsdown --filter web && npx @tailwindcss/cli -i src/web/styles.css -o dist/web/main.css --minify && node scripts/inline-web-client.mjs && tsdown --filter gtd && tsdown --filter workflows",
46
55
  "postbuild": "jiti scripts/generate-schema.ts && node scripts/assert-no-test-doubles.mjs",
47
56
  "watch": "tsdown --watch",
48
57
  "bench:replay": "node scripts/bench-replay.mjs",
@@ -29,12 +29,12 @@ what a driver does.
29
29
  state (`gtd next`, `gtd lsp`, `gtd door` and `gtd doors` included). It is code
30
30
  the user's repository runs; write it with the same care as a build script.
31
31
 
32
- ## Golden rule: start from the bundled default, edit incrementally
32
+ ## Golden rule: start from the shipped workflows, edit incrementally
33
33
 
34
34
  Do **not** write a workflow from a blank page unless the user wants something
35
- tiny. gtd ships three startable workflows (`feature`, `review`, `fix`) as named
36
- exports of `@pmelab/gtd/workflow` and runs them when no `gtd.config.ts` is
37
- found. Its default export is `feature` (the ordinary start), and every phase and
35
+ tiny. gtd ships three workflows (`feature`, `review`, `fix`) as named exports of
36
+ `@pmelab/gtd/workflows`; `gtd install` scaffolds a `gtd.config.ts` re-exporting
37
+ them. Its default export is `feature` (the ordinary start), and every phase and
38
38
  single step they are built from is a named export too. Start by importing what
39
39
  you keep and writing only what changes. Import phases by name; **never
40
40
  `export *` from it** — every exported function of your file would become a
@@ -42,7 +42,7 @@ startable workflow:
42
42
 
43
43
  ```ts
44
44
  import { start } from "@pmelab/gtd/flows"
45
- import { afterTail, buildTail, feature } from "@pmelab/gtd/workflow"
45
+ import { afterTail, buildTail, feature } from "@pmelab/gtd/workflows"
46
46
 
47
47
  export {
48
48
  defaults,
@@ -51,7 +51,7 @@ export {
51
51
  base,
52
52
  steering,
53
53
  skills,
54
- } from "@pmelab/gtd/workflow"
54
+ } from "@pmelab/gtd/workflows"
55
55
 
56
56
  export default feature
57
57
 
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from "vitest"
2
2
  import { access } from "./access.js"
3
- import { bundled as workflow } from "./index.js"
3
+ import * as workflow from "./index.js"
4
4
 
5
5
  const { defaults } = workflow
6
6
 
@@ -1 +1,4 @@
1
- export * as bundled from "./bundled.js"
1
+ // The `@pmelab/gtd/workflows` entry, built on its own: core never imports it,
2
+ // a repository's `gtd.config.ts` does.
3
+ export * from "./bundled.js"
4
+ export { default } from "./bundled.js"
@@ -1,7 +1,7 @@
1
1
  import { afterEach, describe, expect, it } from "vitest"
2
2
  import { installContext, type Change, type JudgeAnswer, type StepRequest } from "../flows/index.js"
3
3
  import { fixQualityFindings, review, type ReviewOutcome } from "./review.js"
4
- import { bundled } from "./index.js"
4
+ import * as bundled from "./index.js"
5
5
  import { fixtureContext } from "./text.fixture.js"
6
6
 
7
7
  afterEach(() => installContext(undefined))
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from "vitest"
2
2
  import { skills } from "./skills.js"
3
- import { bundled as workflow } from "./index.js"
3
+ import * as workflow from "./index.js"
4
4
 
5
5
  const { defaults } = workflow
6
6