@agjs/tsforge 0.2.8 → 0.2.9
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/package.json
CHANGED
|
@@ -161,7 +161,9 @@ export function activeRules(ledger: IMemoryLedger, now: number): ITtsrRule[] {
|
|
|
161
161
|
name: e.name,
|
|
162
162
|
condition: [e.condition],
|
|
163
163
|
scope: "tool-args" as const,
|
|
164
|
-
fileGlobs:
|
|
164
|
+
// No fileGlobs: the condition is already a specific code snippet, and the
|
|
165
|
+
// TTSR file-glob matcher does not match `**/*.ts`-style patterns — setting
|
|
166
|
+
// one would silently prevent the rule from ever firing.
|
|
165
167
|
guidance: e.guidance,
|
|
166
168
|
repeatMode: "cooldown" as const,
|
|
167
169
|
repeatGap: 3,
|
package/src/loop/memory/mine.ts
CHANGED
|
@@ -31,6 +31,15 @@ export function mineLessons(events: readonly ILoopEvent[]): ICandidateLesson[] {
|
|
|
31
31
|
let edits: IEditWindow[] = [];
|
|
32
32
|
|
|
33
33
|
for (const event of events) {
|
|
34
|
+
// The pre-run RED gate is a `red` event (not `validated`), so seed the
|
|
35
|
+
// baseline failing set from it — otherwise a one-turn red→green fix, whose
|
|
36
|
+
// only `validated` event is the GREEN one, would mine nothing.
|
|
37
|
+
if (event.kind === "red") {
|
|
38
|
+
prevFailing = new Set(event.rules ?? []);
|
|
39
|
+
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
|
|
34
43
|
if (
|
|
35
44
|
event.kind === "edit" &&
|
|
36
45
|
event.file !== undefined &&
|
package/src/loop/run.ts
CHANGED
|
@@ -268,6 +268,9 @@ export async function runTask(
|
|
|
268
268
|
kind: "red",
|
|
269
269
|
task: task.id,
|
|
270
270
|
errors: red.errors.length,
|
|
271
|
+
// Carry the failing rule codes so the memory miner can seed the baseline
|
|
272
|
+
// failure set — a one-turn red→green fix has no prior `validated` event.
|
|
273
|
+
rules: red.errors.flatMap((e) => (e.rule === undefined ? [] : [e.rule])),
|
|
271
274
|
message: `task ${task.id}: RED (${red.errors.length} error(s))`,
|
|
272
275
|
});
|
|
273
276
|
|