@lumpcode/recipes 0.0.12 → 0.0.13

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/index.cjs CHANGED
@@ -443,12 +443,8 @@ function backlog(options) {
443
443
  }
444
444
  const backlogRecipe = defineRecipe((options) => backlog(options));
445
445
 
446
- const DEFAULT_IMPL_VALIDATE_COMMAND = [
447
- 'npm run build -w=@lumpcode/cli',
448
- 'npm run test -w=@lumpcode/cli',
449
- ].join(' && ');
450
446
  const abstractionBacklog = defineRecipe((options) => {
451
- const { implValidateCommand = DEFAULT_IMPL_VALIDATE_COMMAND, configUrl, ...rest } = options;
447
+ const { implValidateCommand, configUrl, implSteps, ...rest } = options;
452
448
  const projectRoot = projectRootFromConfigUrl(configUrl);
453
449
  const runImplValidation = resolveImplValidateCommand(implValidateCommand);
454
450
  return backlog({
@@ -470,7 +466,7 @@ const abstractionBacklog = defineRecipe((options) => {
470
466
  implementation: {
471
467
  completion: 'moveToDone',
472
468
  steps: retryUntilGreen({
473
- steps: [{
469
+ steps: implSteps ?? [{
474
470
  promptFn({ context: ctx }) {
475
471
  const vars = ctx.variables;
476
472
  const { PRD_FILE, TASK_NAME, TASK } = vars;
@@ -482,10 +478,10 @@ const abstractionBacklog = defineRecipe((options) => {
482
478
  ${TASK}
483
479
 
484
480
  Requirements:
485
- - Materialize the abstraction as a new util under packages/apps/cli/src/utils/<utilName>/ following existing conventions: main.ts (implementation), index.ts (re-export), unit.test.ts (unit tests), and a barrel export from packages/apps/cli/src/utils/index.ts.
486
- - Refactor all call sites in packages/apps/cli to import the new util.
481
+ - Materialize the abstraction as a new util following existing conventions in the codebase.
482
+ - Refactor all call sites to import the new util.
487
483
  - Net line count must go down after the refactor (removed duplication minus new util code, excluding the new unit test file). Do not extract one-off logic or move code without deleting repetition.
488
- - Include unit tests in unit.test.ts (match sibling utils in packages/apps/cli/src/utils/).
484
+ - Include unit tests for the new util.
489
485
  `.trim();
490
486
  },
491
487
  }],
package/dist/index.d.ts CHANGED
@@ -118,14 +118,15 @@ declare function ymlBacklogContexts<Item extends BaseBacklogItem = BaseBacklogIt
118
118
  declare function validateBaseBacklogItem(raw: unknown, index: number): BaseBacklogItem;
119
119
 
120
120
  type AbstractionBacklogOptions = {
121
- implValidateCommand?: ValidationCommandFn | string;
121
+ implValidateCommand: ValidationCommandFn | string;
122
122
  /** Lump config module URL — pass `import.meta.url` from `config.ts`. */
123
123
  configUrl: string | URL;
124
+ implSteps?: LumpJsConfig['steps'];
124
125
  } & Omit<LumpJsConfig, 'contextListJson' | 'contextMatchFn' | 'getContextListFn' | 'prompt' | 'steps'>;
125
126
  declare const abstractionBacklog: Recipe<AbstractionBacklogOptions>;
126
127
 
127
128
  type AbstractionFinderOptions = {
128
- scanDirectories: string[];
129
+ scanDirectories?: string[];
129
130
  customPrompt?(): string;
130
131
  maxPendingAbstractions?: number;
131
132
  backlogFilePath: string;
package/dist/index.js CHANGED
@@ -441,12 +441,8 @@ function backlog(options) {
441
441
  }
442
442
  const backlogRecipe = defineRecipe((options) => backlog(options));
443
443
 
444
- const DEFAULT_IMPL_VALIDATE_COMMAND = [
445
- 'npm run build -w=@lumpcode/cli',
446
- 'npm run test -w=@lumpcode/cli',
447
- ].join(' && ');
448
444
  const abstractionBacklog = defineRecipe((options) => {
449
- const { implValidateCommand = DEFAULT_IMPL_VALIDATE_COMMAND, configUrl, ...rest } = options;
445
+ const { implValidateCommand, configUrl, implSteps, ...rest } = options;
450
446
  const projectRoot = projectRootFromConfigUrl(configUrl);
451
447
  const runImplValidation = resolveImplValidateCommand(implValidateCommand);
452
448
  return backlog({
@@ -468,7 +464,7 @@ const abstractionBacklog = defineRecipe((options) => {
468
464
  implementation: {
469
465
  completion: 'moveToDone',
470
466
  steps: retryUntilGreen({
471
- steps: [{
467
+ steps: implSteps ?? [{
472
468
  promptFn({ context: ctx }) {
473
469
  const vars = ctx.variables;
474
470
  const { PRD_FILE, TASK_NAME, TASK } = vars;
@@ -480,10 +476,10 @@ const abstractionBacklog = defineRecipe((options) => {
480
476
  ${TASK}
481
477
 
482
478
  Requirements:
483
- - Materialize the abstraction as a new util under packages/apps/cli/src/utils/<utilName>/ following existing conventions: main.ts (implementation), index.ts (re-export), unit.test.ts (unit tests), and a barrel export from packages/apps/cli/src/utils/index.ts.
484
- - Refactor all call sites in packages/apps/cli to import the new util.
479
+ - Materialize the abstraction as a new util following existing conventions in the codebase.
480
+ - Refactor all call sites to import the new util.
485
481
  - Net line count must go down after the refactor (removed duplication minus new util code, excluding the new unit test file). Do not extract one-off logic or move code without deleting repetition.
486
- - Include unit tests in unit.test.ts (match sibling utils in packages/apps/cli/src/utils/).
482
+ - Include unit tests for the new util.
487
483
  `.trim();
488
484
  },
489
485
  }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumpcode/recipes",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Lumpcode lump recipes and kit helpers",
5
5
  "keywords": [
6
6
  "lumpcode",