You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Before agent starts (after pre-execute-agent/ is copied)
389
419
preExecuteAgent: async (args, log) => {
390
420
log.message('Starting agent');
391
421
},
392
422
393
-
// After agent completes
423
+
// After agent completes (after post-execute-agent/ is copied)
394
424
postExecuteAgent: async (args, log) => {
395
425
log.message('Agent finished');
396
426
},
397
427
398
-
// Before evaluation runs
428
+
// Before evaluation runs (after pre-evaluate/ is copied)
399
429
preEvaluate: async (args, log) => {
400
430
log.start('Custom pre-evaluation');
401
431
},
402
432
403
-
// After evaluation completes
433
+
// After evaluation completes (after post-evaluate/ is copied)
404
434
postEvaluate: async (args, log) => {
405
435
log.success('Custom post-evaluation');
436
+
},
437
+
438
+
// Before results are saved (after pre-save/ is copied)
439
+
preSave: async (args, log) => {
440
+
log.message('Saving results');
441
+
},
442
+
443
+
// After results are saved (after post-save/ is copied)
444
+
postSave: async (args, log) => {
445
+
log.success('All done');
406
446
}
407
447
} satisfies Hooks;
408
448
```
409
449
450
+
**Execution Order:** For each lifecycle step, the framework first copies files from the hook directory (if it exists), then calls the hook function (if defined).
451
+
410
452
**Logger Interface:**
411
453
412
454
Both `taskLog` (verbose) and `spinner` (normal) are wrapped in a unified interface:
@@ -472,7 +514,7 @@ Each experiment's project includes:
472
514
473
515
### Expected Stories
474
516
475
-
Evals should include `expected/stories/*.stories.ts` files that:
517
+
Evals should include `pre-evaluate/stories/*.stories.ts` files that:
476
518
477
519
1. Import the component
478
520
2. Define basic stories (e.g., Default)
@@ -614,7 +656,7 @@ When using `--context mcp.config.json`, the framework:
0 commit comments