@inerrata-corporation/errata 2.0.2-dev.125 → 2.0.2-dev.145
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/consolidate-worker.mjs +12 -1
- package/errata.mjs +50 -8
- package/package.json +1 -1
- package/pass-worker.mjs +12 -1
package/consolidate-worker.mjs
CHANGED
|
@@ -133,7 +133,14 @@ var init_castalia = __esm({
|
|
|
133
133
|
"SOLVED_BY",
|
|
134
134
|
"MITIGATES",
|
|
135
135
|
"REPORTED_FAILURE",
|
|
136
|
-
"CONTRADICTS"
|
|
136
|
+
"CONTRADICTS",
|
|
137
|
+
// Motif twin-faces (KN-twin-faces): failure-face motif → remedy-face motif
|
|
138
|
+
// across layers (AntiPattern/Weakness ↔ Technique/Pattern). Same
|
|
139
|
+
// problem→fix direction as FIXED_BY/SOLVED_BY. Minted by the nightly LLM
|
|
140
|
+
// twin-face pass — these are the near-identical cross-layer pairs the
|
|
141
|
+
// polarity gate (finding 5) correctly refuses to FUSE; the link carries
|
|
142
|
+
// what fusion can't.
|
|
143
|
+
"REMEDIED_BY"
|
|
137
144
|
];
|
|
138
145
|
CONCEPTUAL_EDGES = [
|
|
139
146
|
"INSTANCE_OF",
|
|
@@ -223,6 +230,10 @@ var init_castalia = __esm({
|
|
|
223
230
|
CAUSED_BY: 3,
|
|
224
231
|
FIXED_BY: 3,
|
|
225
232
|
SOLVED_BY: 3,
|
|
233
|
+
// Twin-face link (failure motif → remedy motif, KN-twin-faces) — causal-grade
|
|
234
|
+
// but a notch below witnessed FIXED_BY/SOLVED_BY: the pairing is an LLM
|
|
235
|
+
// judgment over descriptions, not an agent-witnessed resolution.
|
|
236
|
+
REMEDIED_BY: 2.5,
|
|
226
237
|
MANIFESTS_AS: 2,
|
|
227
238
|
ESCALATES_TO: 1.5,
|
|
228
239
|
AFFECTS: 1.2,
|
package/errata.mjs
CHANGED
|
@@ -183,7 +183,14 @@ var init_castalia = __esm({
|
|
|
183
183
|
"SOLVED_BY",
|
|
184
184
|
"MITIGATES",
|
|
185
185
|
"REPORTED_FAILURE",
|
|
186
|
-
"CONTRADICTS"
|
|
186
|
+
"CONTRADICTS",
|
|
187
|
+
// Motif twin-faces (KN-twin-faces): failure-face motif → remedy-face motif
|
|
188
|
+
// across layers (AntiPattern/Weakness ↔ Technique/Pattern). Same
|
|
189
|
+
// problem→fix direction as FIXED_BY/SOLVED_BY. Minted by the nightly LLM
|
|
190
|
+
// twin-face pass — these are the near-identical cross-layer pairs the
|
|
191
|
+
// polarity gate (finding 5) correctly refuses to FUSE; the link carries
|
|
192
|
+
// what fusion can't.
|
|
193
|
+
"REMEDIED_BY"
|
|
187
194
|
];
|
|
188
195
|
CONCEPTUAL_EDGES = [
|
|
189
196
|
"INSTANCE_OF",
|
|
@@ -313,6 +320,10 @@ var init_castalia = __esm({
|
|
|
313
320
|
CAUSED_BY: 3,
|
|
314
321
|
FIXED_BY: 3,
|
|
315
322
|
SOLVED_BY: 3,
|
|
323
|
+
// Twin-face link (failure motif → remedy motif, KN-twin-faces) — causal-grade
|
|
324
|
+
// but a notch below witnessed FIXED_BY/SOLVED_BY: the pairing is an LLM
|
|
325
|
+
// judgment over descriptions, not an agent-witnessed resolution.
|
|
326
|
+
REMEDIED_BY: 2.5,
|
|
316
327
|
MANIFESTS_AS: 2,
|
|
317
328
|
ESCALATES_TO: 1.5,
|
|
318
329
|
AFFECTS: 1.2,
|
|
@@ -50249,7 +50260,15 @@ function harvestInlineTags(store, text, opts) {
|
|
|
50249
50260
|
}
|
|
50250
50261
|
return plan;
|
|
50251
50262
|
}
|
|
50252
|
-
var CORROBORATABLE_LABELS = /* @__PURE__ */ new Set([
|
|
50263
|
+
var CORROBORATABLE_LABELS = /* @__PURE__ */ new Set([
|
|
50264
|
+
"Problem",
|
|
50265
|
+
"Solution",
|
|
50266
|
+
"RootCause",
|
|
50267
|
+
"Pattern",
|
|
50268
|
+
"AntiPattern",
|
|
50269
|
+
"Technique",
|
|
50270
|
+
"Weakness"
|
|
50271
|
+
]);
|
|
50253
50272
|
function stampWitnessOrigin(items, origin) {
|
|
50254
50273
|
if (!origin) return [...items];
|
|
50255
50274
|
const o = digest({ p: origin }).slice(0, 12);
|
|
@@ -51227,6 +51246,7 @@ async function syncSkills(paths, client, seed, pins = []) {
|
|
|
51227
51246
|
}
|
|
51228
51247
|
|
|
51229
51248
|
// src/agent-skills.ts
|
|
51249
|
+
init_src2();
|
|
51230
51250
|
import {
|
|
51231
51251
|
cpSync,
|
|
51232
51252
|
existsSync as existsSync15,
|
|
@@ -51259,14 +51279,34 @@ function deriveDescription(title, layer, body2) {
|
|
|
51259
51279
|
const when = ` Apply when working on ${layer === "antipattern" ? "code that risks this pitfall" : "problems in this area"}.`;
|
|
51260
51280
|
return `${lead}${lead.endsWith(".") ? "" : "."}${when}`.slice(0, 1024);
|
|
51261
51281
|
}
|
|
51262
|
-
function renderSkillMd(name2, description, body2) {
|
|
51282
|
+
function renderSkillMd(name2, description, body2, citeHandle) {
|
|
51283
|
+
const footer = citeHandle ? `
|
|
51284
|
+
|
|
51285
|
+
---
|
|
51286
|
+
When this skill actually helps you, witness it inline in your reply: \`([${citeHandle}])\` \u2014 the citation is recorded and feeds this skill's reliability, so it keeps being served. Untagged help is invisible.
|
|
51287
|
+
` : "\n";
|
|
51263
51288
|
return `---
|
|
51264
51289
|
name: ${name2}
|
|
51265
51290
|
description: ${yamlScalar(description)}
|
|
51266
51291
|
---
|
|
51267
51292
|
|
|
51268
|
-
${body2.trimEnd()}
|
|
51269
|
-
|
|
51293
|
+
${body2.trimEnd()}${footer}`;
|
|
51294
|
+
}
|
|
51295
|
+
var LAYER_TO_LABEL = {
|
|
51296
|
+
pattern: "Pattern",
|
|
51297
|
+
antipattern: "AntiPattern",
|
|
51298
|
+
technique: "Technique",
|
|
51299
|
+
weakness: "Weakness"
|
|
51300
|
+
};
|
|
51301
|
+
function skillHandleNodes(skills) {
|
|
51302
|
+
return skills.map((s) => ({
|
|
51303
|
+
id: s.id,
|
|
51304
|
+
label: LAYER_TO_LABEL[s.layer.toLowerCase()] ?? "Pattern",
|
|
51305
|
+
description: s.title
|
|
51306
|
+
}));
|
|
51307
|
+
}
|
|
51308
|
+
function skillCiteHandle(s) {
|
|
51309
|
+
return priorHandle({ id: s.id, description: s.title });
|
|
51270
51310
|
}
|
|
51271
51311
|
function reconcileNamespaced(dir, keep) {
|
|
51272
51312
|
if (!existsSync15(dir)) return 0;
|
|
@@ -51324,7 +51364,7 @@ function emitAndProjectSkills(root, skills) {
|
|
|
51324
51364
|
mkdirSync7(join19(agentsSkillsDir, slug2), { recursive: true });
|
|
51325
51365
|
writeFileSync12(
|
|
51326
51366
|
join19(agentsSkillsDir, slug2, "SKILL.md"),
|
|
51327
|
-
renderSkillMd(slug2, description, body2),
|
|
51367
|
+
renderSkillMd(slug2, description, body2, skillCiteHandle(s)),
|
|
51328
51368
|
"utf8"
|
|
51329
51369
|
);
|
|
51330
51370
|
emitted++;
|
|
@@ -51829,7 +51869,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
51829
51869
|
}
|
|
51830
51870
|
|
|
51831
51871
|
// src/engine.ts
|
|
51832
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
51872
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.145" : "2.0.0-alpha.0";
|
|
51833
51873
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
51834
51874
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
51835
51875
|
var GIT_OP_MUTE_MS = 4e3;
|
|
@@ -52895,7 +52935,9 @@ function createWorkspaceEngine(opts) {
|
|
|
52895
52935
|
const pins = profile?.projectId ? await cloud.getSkillPins(profile.projectId).then((r) => r.pins).catch(() => []) : [];
|
|
52896
52936
|
const result = await syncSkills(paths, cloud, skillSeed, pins);
|
|
52897
52937
|
try {
|
|
52898
|
-
|
|
52938
|
+
const inputs = emitInputsFromManifest(paths.configDir, paths.skillsManifest);
|
|
52939
|
+
emitAndProjectSkills(opts.workspaceRoot, inputs);
|
|
52940
|
+
writePrimingHandles(join22(paths.configDir, "priming-handles.json"), skillHandleNodes(inputs));
|
|
52899
52941
|
} catch (err2) {
|
|
52900
52942
|
console.warn("[skills] agent-skills projection failed (non-fatal):", err2 instanceof Error ? err2.message : err2);
|
|
52901
52943
|
}
|
package/package.json
CHANGED
package/pass-worker.mjs
CHANGED
|
@@ -144,7 +144,14 @@ var init_castalia = __esm({
|
|
|
144
144
|
"SOLVED_BY",
|
|
145
145
|
"MITIGATES",
|
|
146
146
|
"REPORTED_FAILURE",
|
|
147
|
-
"CONTRADICTS"
|
|
147
|
+
"CONTRADICTS",
|
|
148
|
+
// Motif twin-faces (KN-twin-faces): failure-face motif → remedy-face motif
|
|
149
|
+
// across layers (AntiPattern/Weakness ↔ Technique/Pattern). Same
|
|
150
|
+
// problem→fix direction as FIXED_BY/SOLVED_BY. Minted by the nightly LLM
|
|
151
|
+
// twin-face pass — these are the near-identical cross-layer pairs the
|
|
152
|
+
// polarity gate (finding 5) correctly refuses to FUSE; the link carries
|
|
153
|
+
// what fusion can't.
|
|
154
|
+
"REMEDIED_BY"
|
|
148
155
|
];
|
|
149
156
|
CONCEPTUAL_EDGES = [
|
|
150
157
|
"INSTANCE_OF",
|
|
@@ -274,6 +281,10 @@ var init_castalia = __esm({
|
|
|
274
281
|
CAUSED_BY: 3,
|
|
275
282
|
FIXED_BY: 3,
|
|
276
283
|
SOLVED_BY: 3,
|
|
284
|
+
// Twin-face link (failure motif → remedy motif, KN-twin-faces) — causal-grade
|
|
285
|
+
// but a notch below witnessed FIXED_BY/SOLVED_BY: the pairing is an LLM
|
|
286
|
+
// judgment over descriptions, not an agent-witnessed resolution.
|
|
287
|
+
REMEDIED_BY: 2.5,
|
|
277
288
|
MANIFESTS_AS: 2,
|
|
278
289
|
ESCALATES_TO: 1.5,
|
|
279
290
|
AFFECTS: 1.2,
|