@activate-core/test-forge 0.9.5 → 0.9.6

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.
@@ -215,6 +215,15 @@ export async function runGenerate(docsDir, useAI = true, force = false, only, ar
215
215
  if (harnessByArea.has(area))
216
216
  return harnessByArea.get(area) ?? undefined;
217
217
  const info = harnessInfo(areaDir, framework, ext);
218
+ // REUSE an existing testkit instead of regenerating it. This is what
219
+ // makes one-by-one (`generate --journey X`) cheap: the first journey
220
+ // in an area builds the testkit, every later journey reuses it — no
221
+ // extra AI call (and no risk of that call eating the token limit).
222
+ // Pass --force to rebuild a stale testkit (e.g. after upgrading).
223
+ if (!force && existsSync(info.path)) {
224
+ harnessByArea.set(area, info.path);
225
+ return info.path;
226
+ }
218
227
  const kit = await generateValidatedAsync(() => generateHarnessAsync(info.path, framework), ext.endsWith('.js') ? '.js' : '.ts');
219
228
  if (kit === null) {
220
229
  harnessByArea.set(area, null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "AI-powered QA automation. Scans a project, drafts journey docs, and generates seeded Jest/Playwright tests. Works in any project, with any AI CLI.",
5
5
  "type": "module",
6
6
  "bin": {