@inerrata-corporation/errata 2.0.2-dev.201 → 2.0.2-dev.206

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/errata.mjs CHANGED
@@ -20982,10 +20982,13 @@ function buildSnapshot(opts) {
20982
20982
  episodeId: episodeId2,
20983
20983
  problems: problems2
20984
20984
  }));
20985
- const needsRevisit = listNeedsRevisit(
20986
- opts.store,
20987
- (opts.now ?? /* @__PURE__ */ new Date()).getTime()
20988
- ).slice(0, 10);
20985
+ const revisitSeen = /* @__PURE__ */ new Set();
20986
+ const needsRevisit = listNeedsRevisit(opts.store, (opts.now ?? /* @__PURE__ */ new Date()).getTime()).filter((r) => {
20987
+ const key = `${r.label}:${r.description.trim().toLowerCase()}`;
20988
+ if (revisitSeen.has(key)) return false;
20989
+ revisitSeen.add(key);
20990
+ return true;
20991
+ }).slice(0, 5);
20989
20992
  const norm = (x) => x.toLowerCase().replace(/[^a-z0-9]+/g, "");
20990
20993
  const pkgBase = (x) => {
20991
20994
  const at = x.lastIndexOf("@");
@@ -21386,8 +21389,16 @@ ${RECALL_FIRST_BODY}`;
21386
21389
  // A standing design tension outranks an enrichment nudge (it prevents a wrong
21387
21390
  // decision) but yields to a live defect (which is actionable now).
21388
21391
  "recentConstraints",
21389
- "recentProblems",
21390
- "needsRevisit"
21392
+ // `needsRevisit` used to sit LAST — the most protected band in the block. That
21393
+ // inverted the block's whole purpose once the link-elicitation instruction (4,942
21394
+ // chars, 55% of the budget, non-evictable) started competing for room: the
21395
+ // budgeter drained all 8 Problems and all 4 Solutions and kept nine stale
21396
+ // auto-close notices, so the agent was handed an instruction to cite `[handles]`
21397
+ // with zero problem handles left to cite. A revisit flag is a maintenance nudge
21398
+ // about something ALREADY closed; a live prior is the substrate every link verb
21399
+ // needs. Problems outrank it now.
21400
+ "needsRevisit",
21401
+ "recentProblems"
21391
21402
  ];
21392
21403
  DEFAULT_AGENT_CONTEXT_BUDGET = 9e3;
21393
21404
  }
@@ -25259,15 +25270,17 @@ function triageBullet(ref) {
25259
25270
  }
25260
25271
  function linkBullet(ref) {
25261
25272
  return [
25262
- " \u2022 a problem you flagged resembles prior knowledge \u2014 LINK it to the canonical priors, not just one:",
25273
+ // Lead-in states the trigger without the old "resembles prior knowledge"
25274
+ // conditional (which gated the whole bullet on recognising a prior). Kept to ONE
25275
+ // line on purpose: Cycle 13 measured this instruction at 55% of the 9,000-char
25276
+ // passive-context budget, and every char here is paid for by evicting a prior the
25277
+ // agent could have cited — so unproven framing is a net loss, however good it reads.
25278
+ " \u2022 you flagged a problem \u2014 LINK it, ESPECIALLY when the finding feels novel to here:",
25263
25279
  ` \xB7 (instance:[${ref}],[another-prior],\u2026) \u2014 the priors this problem is an instance of.`,
25264
25280
  " Aim for ~3 DIFFERENT relevant priors; one link is weak, three triangulate it.",
25265
25281
  ` \xB7 ${TAG_EXAMPLE.pattern()} \u2014 name the general shape it instantiates (e.g. (pattern: unbounded`,
25266
25282
  " queue growth under backpressure)) \u2014 this works with NO code anchor, and two agents naming",
25267
25283
  " the same pattern converge on one node. Cite a shown Pattern by handle: (pattern:[handle]).",
25268
- ` \xB7 ${TAG_EXAMPLE.domain()} \u2014 name the ABSTRACT AREA it's about (e.g. (domain: Observability),`,
25269
- " (domain: Community Detection)). An abstract problem with no code anchor NEEDS this or it's",
25270
- " an invisible island: the Domain is the topic other problems in the area cluster on. Title Case.",
25271
25284
  ` \xB7 ${TAG_EXAMPLE.package()} \u2014 the PUBLIC PACKAGE the problem is about, even when this`,
25272
25285
  " workspace doesn't depend on it (e.g. (package: chokidar), (package: pypi/requests)) \u2014 a",
25273
25286
  " public-registry anchor lets the knowledge cross to the collective; internal names stay private.",
@@ -25291,9 +25304,9 @@ function attemptBullet() {
25291
25304
  ].join("\n");
25292
25305
  }
25293
25306
  function buildAgentInstruction(opts = {}) {
25294
- const signals = opts.signals ?? ["prior", "problem", "fix", "constraint", "triage", "attempt", "link"];
25307
+ const signals = opts.signals ?? ["prior", "problem", "domain", "fix", "constraint", "triage", "attempt", "link"];
25295
25308
  const ref = opts.referent ?? "its-handle";
25296
- const token = (s) => s === "problem" ? TAG_EXAMPLE.problem() : s === "constraint" ? TAG_EXAMPLE.constraint() : s === "attempt" ? TAG_EXAMPLE.tried() : s === "link" ? TAG_EXAMPLE.pattern() : TAG_EXAMPLE[s](ref);
25309
+ const token = (s) => s === "problem" ? TAG_EXAMPLE.problem() : s === "constraint" ? TAG_EXAMPLE.constraint() : s === "attempt" ? TAG_EXAMPLE.tried() : s === "domain" ? TAG_EXAMPLE.domain() : s === "link" ? TAG_EXAMPLE.pattern() : TAG_EXAMPLE[s](ref);
25297
25310
  const head2 = `We tag the priors we show you with a short handle like [${opts.handleExample ?? "chokidar-glob"}]. This is a capture protocol, not optional notes: what you DON'T tag is silently lost \u2014 the tag is the ONLY thing recorded. Whenever one of these is true, wrap it inline in your prose (no fences, no extra calls). Tag every one you state; we filter downstream, so don't self-censor or batch:`;
25298
25311
  const tail = "Mid-turn text (between tool calls) can be dropped by the harness \u2014 if a tag above appeared only mid-turn, RESTATE it in your final message of the turn; the final message always survives.";
25299
25312
  return [
@@ -25359,6 +25372,22 @@ var init_agent_signals = __esm({
25359
25372
  constraint: "you made a design decision because requirements conflict or something's constrained \u2014 tag the tension, ESPECIALLY when your fix makes it 'only look' contradictory (a clean solution still hides a real trap the next agent needs)",
25360
25373
  triage: "you diagnosed a bug \u2014 SPLIT the symptom (what breaks \u2192 [!\u2026]) from the cause (the mechanism you'd change \u2192 (cause:\u2026)); if the line says WHY it breaks, it's a cause, not a problem",
25361
25374
  attempt: "you're attempting an approach, or an attempt didn't pan out \u2014 (tried: \u2026) / (failed: \u2026); a failed attempt rules out a path for the next agent",
25375
+ // DOMAIN — promoted to a FIRST-CLASS signal (was nested inside linkBullet, whose
25376
+ // lead-in gates on "a problem you flagged resembles prior knowledge"). Naming the
25377
+ // area a problem is about is unconditional and has nothing to do with recognizing
25378
+ // a prior, so that gate silently suppressed it: field census 2026-07-30 across 387
25379
+ // sessions — `domain` in 10/194 tag-emitting sessions (5%) against `problem` in
25380
+ // 124/194 (64%), and bimodal (the 10 that do emit average ~7 each), i.e. the
25381
+ // syntax is fine and the trigger was never reached.
25382
+ //
25383
+ // The gloss carries the anti-performance framing Cycles 9–11 proved is the actual
25384
+ // lever (the tag alone scored 0 = control; naming the bias and inverting it is
25385
+ // what lifted capture). The bias here is the mirror of the constraint one: an
25386
+ // agent that has just named a problem *precisely* feels the precision IS the
25387
+ // contribution, so stating the general area reads as vague restatement — exactly
25388
+ // when it matters most, because precise wording is what makes a problem
25389
+ // unfindable to anyone who doesn't already share it.
25390
+ domain: "you flagged a problem that isn't about one specific file \u2014 name the AREA it's about. The sharper your wording, the LESS anyone else will search for it; an abstract problem with no area is an invisible island. Title Case",
25362
25391
  link: "the problem you flagged is an instance of priors/abstractions you can name \u2014 (instance:[h1],[h2],\u2026) / (pattern: \u2026) / (aids:[h]); rendered whole via linkBullet"
25363
25392
  };
25364
25393
  }
@@ -52247,7 +52276,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
52247
52276
  }
52248
52277
 
52249
52278
  // src/engine.ts
52250
- var DAEMON_VERSION = true ? "2.0.2-dev.201" : "2.0.0-alpha.0";
52279
+ var DAEMON_VERSION = true ? "2.0.2-dev.206" : "2.0.0-alpha.0";
52251
52280
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
52252
52281
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
52253
52282
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.201",
3
+ "version": "2.0.2-dev.206",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/pass-worker.mjs CHANGED
@@ -26106,10 +26106,13 @@ function buildSnapshot(opts) {
26106
26106
  episodeId,
26107
26107
  problems: problems2
26108
26108
  }));
26109
- const needsRevisit = listNeedsRevisit(
26110
- opts.store,
26111
- (opts.now ?? /* @__PURE__ */ new Date()).getTime()
26112
- ).slice(0, 10);
26109
+ const revisitSeen = /* @__PURE__ */ new Set();
26110
+ const needsRevisit = listNeedsRevisit(opts.store, (opts.now ?? /* @__PURE__ */ new Date()).getTime()).filter((r) => {
26111
+ const key = `${r.label}:${r.description.trim().toLowerCase()}`;
26112
+ if (revisitSeen.has(key)) return false;
26113
+ revisitSeen.add(key);
26114
+ return true;
26115
+ }).slice(0, 5);
26113
26116
  const norm = (x) => x.toLowerCase().replace(/[^a-z0-9]+/g, "");
26114
26117
  const pkgBase = (x) => {
26115
26118
  const at = x.lastIndexOf("@");