@lumpcode/recipes 0.0.13 → 0.0.15
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 +35 -12
- package/dist/index.cjs +263 -133
- package/dist/index.d.ts +47 -43
- package/dist/index.js +261 -133
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,16 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Lumpcode **recipes** and **kit** helpers for authoring lump configs without boilerplate.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Install [`@lumpcode/cli`](https://www.npmjs.com/package/@lumpcode/cli) for the Lumpcode CLI. Add this package when you want the recipes and kit helpers. Built on [`@lumpcode/cli-utils`](https://www.npmjs.com/package/@lumpcode/cli-utils) and [`@lumpcode/core`](https://www.npmjs.com/package/@lumpcode/core).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @lumpcode/recipes
|
|
11
|
+
```
|
|
6
12
|
|
|
7
13
|
## Recipes
|
|
8
14
|
|
|
9
15
|
| Recipe | Export | Use when |
|
|
10
16
|
|--------|--------|----------|
|
|
11
|
-
| **backlog** | `backlog` | Generic
|
|
12
|
-
| **featureBacklog** | `featureBacklog` | Feature items with
|
|
13
|
-
| **abstractionFinder** | `abstractionFinder` | Ephemeral contexts that scan for duplicated CLI utils and append one backlog item +
|
|
14
|
-
| **abstractionBacklog** | `abstractionBacklog` |
|
|
17
|
+
| **backlog** | `backlog` | Generic folder backlog with a typed stage map and per-item stage resolution |
|
|
18
|
+
| **featureBacklog** | `featureBacklog` | Feature items with requirements → test plan → test implementation → implementation |
|
|
19
|
+
| **abstractionFinder** | `abstractionFinder` | Ephemeral contexts that scan for duplicated CLI utils and append one backlog item + requirements doc per run |
|
|
20
|
+
| **abstractionBacklog** | `abstractionBacklog` | Folder backlog items with requirements — implement abstraction with verify-until-green, then move item to completed/ |
|
|
21
|
+
|
|
22
|
+
## Backlog layout
|
|
23
|
+
|
|
24
|
+
The backlog recipes (`backlog`, `featureBacklog`, `abstractionBacklog`) use a folder backlog under `backlogItems/`:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
.lumpcode/lumps/<lump>/backlogItems/
|
|
28
|
+
todo/<name>/desc.yml
|
|
29
|
+
todo/<name>/requirements.md # optional until makeReq / finder writes it
|
|
30
|
+
todo/<name>/testPlan.md # featureBacklog only; optional until makeTestPlan
|
|
31
|
+
completed/<name>/desc.yml # includes completedAt after move-to-done
|
|
32
|
+
completed/<name>/requirements.md # moves with the folder
|
|
33
|
+
completed/<name>/testPlan.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`desc.yml` is a single YAML object with `name`, `task`, `priority`, optional `dependsOn`, and recipe-specific fields (e.g. `manualReq` for featureBacklog).
|
|
15
37
|
|
|
16
38
|
## Kit
|
|
17
39
|
|
|
@@ -21,8 +43,9 @@ Flat helpers under `src/kit/` (re-exported from the package root):
|
|
|
21
43
|
- `getRecursiveSteps` — agent step(s) + validation command, retry until pass
|
|
22
44
|
- `retryUntilGreen` — opinionated wrapper over `getRecursiveSteps` with default fix prompt
|
|
23
45
|
- `ephemeralContextListFn` — N fresh synthetic contexts per run (`contextCount`, index-aware names)
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
46
|
+
- `folderBacklogContexts` — `getContextListFn` from `backlogItems/todo/` with optional per-item parsing
|
|
47
|
+
- `folderSetTaskDoneStep` — move finished item folder from `todo/` to `completed/` after a context completes
|
|
48
|
+
- `ymlBacklogContexts` / `setTaskDoneStep` — **deprecated** YAML-list helpers (warn once, still work)
|
|
26
49
|
- `resolveImplValidateCommand` — string, descriptor, or fn → `ValidationCommandFn`
|
|
27
50
|
- `shellCommand` — `sh -c` helper for validation commands
|
|
28
51
|
|
|
@@ -47,7 +70,9 @@ export default backlog({
|
|
|
47
70
|
});
|
|
48
71
|
```
|
|
49
72
|
|
|
50
|
-
`resolveItem` returns `{ stage, contextName?, variables?, additionalDependsOnContexts? }` or `{ ignored: true }`. Terminal stages with `completion: 'moveToDone'` append `
|
|
73
|
+
`resolveItem` returns `{ stage, contextName?, variables?, additionalDependsOnContexts? }` or `{ ignored: true }`. Terminal stages with `completion: 'moveToDone'` append `folderSetTaskDoneStep`.
|
|
74
|
+
|
|
75
|
+
Context variables injected by `backlog`: `TASK_NAME`, `TASK`, `BACKLOG_ITEMS_DIR`, `BACKLOG_ITEM_DIR`, `BACKLOG_STAGE`.
|
|
51
76
|
|
|
52
77
|
## Examples
|
|
53
78
|
|
|
@@ -79,7 +104,7 @@ export default {
|
|
|
79
104
|
|
|
80
105
|
### abstractionFinder + abstractionBacklog
|
|
81
106
|
|
|
82
|
-
Two-lump pipeline: finder tops up the implementer backlog; implementer runs items that already have
|
|
107
|
+
Two-lump pipeline: finder tops up the implementer backlog; implementer runs items that already have requirements documents.
|
|
83
108
|
|
|
84
109
|
```ts
|
|
85
110
|
// .lumpcode/lumps/abstractionFinder/config.ts
|
|
@@ -90,9 +115,7 @@ export default {
|
|
|
90
115
|
...abstractionFinder({
|
|
91
116
|
maxPendingAbstractions: 5,
|
|
92
117
|
scanDirectories: ['packages/apps/cli'],
|
|
93
|
-
|
|
94
|
-
doneFilePath: '.lumpcode/lumps/abstractionImplementer/DONE.yml',
|
|
95
|
-
prdDirPath: '.lumpcode/lumps/abstractionImplementer/prds',
|
|
118
|
+
backlogItemsDir: '.lumpcode/lumps/abstractionImplementer/backlogItems',
|
|
96
119
|
command: 'cursor',
|
|
97
120
|
lumpVariables: { model: 'composer-2.5' },
|
|
98
121
|
discoveryBranch: 'dev',
|