@lumpcode/recipes 0.3.0 → 0.4.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/README.md +16 -7
- package/dist/index.cjs +605 -260
- package/dist/index.d.ts +77 -14
- package/dist/index.js +592 -262
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ npm install @lumpcode/recipes
|
|
|
15
15
|
| Recipe | Export | Use when |
|
|
16
16
|
|--------|--------|----------|
|
|
17
17
|
| **backlog** | `backlog` | Generic folder backlog with a typed stage map and per-item stage resolution |
|
|
18
|
-
| **featureBacklog** | `featureBacklog` | Folder feature campaign:
|
|
18
|
+
| **featureBacklog** | `featureBacklog` | Folder feature campaign: optional `workflow` stages, tickets, and primary / per-item campaign discovery |
|
|
19
19
|
| **abstractionFinder** | `abstractionFinder` | One ephemeral context per tick that appends a backlog item + requirements doc while `todo/` is under `maxPendingAbstractions` |
|
|
20
20
|
| **abstractionBacklog** | `abstractionBacklog` | Folder backlog items with requirements — implement abstraction with verify-until-green, then move item to completed/ |
|
|
21
21
|
|
|
@@ -28,15 +28,15 @@ The backlog recipes (`backlog`, `featureBacklog`, `abstractionBacklog`) use a fo
|
|
|
28
28
|
```
|
|
29
29
|
.lumpcode/lumps/<lump>/backlogItems/
|
|
30
30
|
todo/<name>/desc.yml
|
|
31
|
-
todo/<name>/requirements.md # optional until
|
|
32
|
-
todo/<name>/testPlan.md # featureBacklog
|
|
33
|
-
todo/<parent>/tickets/<ticket>/desc.yml # featureBacklog
|
|
31
|
+
todo/<name>/requirements.md # optional until the `req` stage / finder writes it
|
|
32
|
+
todo/<name>/testPlan.md # featureBacklog; optional until the `testPlan` stage
|
|
33
|
+
todo/<parent>/tickets/<ticket>/desc.yml # featureBacklog tickets; parent runs `completion` after all tickets
|
|
34
34
|
completed/<name>/desc.yml # includes completedAt after move-to-done
|
|
35
35
|
completed/<name>/requirements.md # moves with the folder
|
|
36
36
|
completed/<name>/testPlan.md
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
`desc.yml` is a single YAML object with `name`, `task`, `priority`, optional `dependsOn`, and recipe-specific fields (`
|
|
39
|
+
`desc.yml` is a single YAML object with `name`, `task`, `priority`, optional `dependsOn`, and recipe-specific fields (`workflow`, `manual` for featureBacklog).
|
|
40
40
|
|
|
41
41
|
## Kit
|
|
42
42
|
|
|
@@ -51,6 +51,16 @@ Flat helpers under `src/kit/` (re-exported from the package root):
|
|
|
51
51
|
- `ymlBacklogContexts` / `setTaskDoneStep` — **deprecated** YAML-list helpers (warn once, still work)
|
|
52
52
|
- `resolveImplValidateCommand` — string, descriptor, or fn → `ValidationCommandFn`
|
|
53
53
|
- `shellCommand` — `sh -c` helper for validation commands
|
|
54
|
+
- `openPrPostTeardown` — `postTeardownWorkspaceFn` that opens a PR from `branchName` into resolved `baseBranch`. Pass `{ provider: 'github' }` (`gh` on PATH). Skips when the branch was not pushed or a PR already exists; create failures are logged and do not fail the run.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { featureBacklog, openPrPostTeardown } from '@lumpcode/recipes';
|
|
58
|
+
|
|
59
|
+
export default featureBacklog({
|
|
60
|
+
configUrl: import.meta.url,
|
|
61
|
+
postTeardownWorkspaceFn: openPrPostTeardown({ provider: 'github' }),
|
|
62
|
+
});
|
|
63
|
+
```
|
|
54
64
|
|
|
55
65
|
## Generic backlog stage map
|
|
56
66
|
|
|
@@ -100,7 +110,6 @@ export default featureBacklog<
|
|
|
100
110
|
verbose: true,
|
|
101
111
|
keepHistory: true,
|
|
102
112
|
lumpVariables: { model: 'composer-2.5' },
|
|
103
|
-
discoveryBranches: ['dev', 'feature/*'],
|
|
104
113
|
implValidateCommand: [
|
|
105
114
|
'npm run build -w=@lumpcode/cli',
|
|
106
115
|
'npm run test -w=@lumpcode/cli',
|
|
@@ -108,7 +117,7 @@ export default featureBacklog<
|
|
|
108
117
|
});
|
|
109
118
|
```
|
|
110
119
|
|
|
111
|
-
`desc.yml` `workflow
|
|
120
|
+
`desc.yml` `workflow` is an array of `req`, `testPlan`, `testImpl`, `impl`, and/or `directImpl`. Omit ≡ `[req, testPlan, testImpl]` (terminal defaults to `impl`). `directImpl` in the array wins over `impl` and may implement without `requirements.md`; default `impl` waits for that file unless `req` is in the array. `manual: true` skips standalone items and tickets (umbrella `completion` still runs). On the primary discovery branch (default `dev`) only top-level items without `testPlan`/`testImpl` run; tickets never run there. On `<itemDiscoveryBranchPrefix>/<key>` (default `feature/<key>`) the matching item or parent runs. Ticket context names are `<parent>-<ticket>`. After every ticket finishes, one parent `completion` context (no agent) depends on all ticket impl names and merges the parent folder into `completed/`. Status reads use the concrete `discoveryBranch`. Optional `primaryDiscoveryBranch` / `itemDiscoveryBranchPrefix` replace hardcoded `dev` / `feature`; the recipe emits `discoveryBranches` from those values. Optional `promptFns` replaces the main `promptFn` per stage (`req`, `testPlan`, `testImpl`, `impl`, `directImpl`); artifact validation and fix prompts stay the defaults.
|
|
112
121
|
|
|
113
122
|
### abstractionFinder + abstractionBacklog
|
|
114
123
|
|