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

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,15 @@ 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
+ " \u2022 you flagged a problem \u2014 LINK it, and do it ESPECIALLY when the finding feels novel.",
25274
+ " Work you just did feels specific to here; that feeling is why links go unwritten, and it is",
25275
+ " exactly backwards \u2014 a finding nobody can reach from anywhere else is one nobody reuses:",
25263
25276
  ` \xB7 (instance:[${ref}],[another-prior],\u2026) \u2014 the priors this problem is an instance of.`,
25264
25277
  " Aim for ~3 DIFFERENT relevant priors; one link is weak, three triangulate it.",
25265
25278
  ` \xB7 ${TAG_EXAMPLE.pattern()} \u2014 name the general shape it instantiates (e.g. (pattern: unbounded`,
25266
25279
  " queue growth under backpressure)) \u2014 this works with NO code anchor, and two agents naming",
25267
- " 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.",
25280
+ " the same pattern converge on one node. Naming the shape costs your finding nothing and is",
25281
+ " what lets a stranger hit it. Cite a shown Pattern by handle: (pattern:[handle]).",
25271
25282
  ` \xB7 ${TAG_EXAMPLE.package()} \u2014 the PUBLIC PACKAGE the problem is about, even when this`,
25272
25283
  " workspace doesn't depend on it (e.g. (package: chokidar), (package: pypi/requests)) \u2014 a",
25273
25284
  " public-registry anchor lets the knowledge cross to the collective; internal names stay private.",
@@ -25291,9 +25302,9 @@ function attemptBullet() {
25291
25302
  ].join("\n");
25292
25303
  }
25293
25304
  function buildAgentInstruction(opts = {}) {
25294
- const signals = opts.signals ?? ["prior", "problem", "fix", "constraint", "triage", "attempt", "link"];
25305
+ const signals = opts.signals ?? ["prior", "problem", "domain", "fix", "constraint", "triage", "attempt", "link"];
25295
25306
  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);
25307
+ 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
25308
  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
25309
  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
25310
  return [
@@ -25359,6 +25370,22 @@ var init_agent_signals = __esm({
25359
25370
  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
25371
  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
25372
  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",
25373
+ // DOMAIN — promoted to a FIRST-CLASS signal (was nested inside linkBullet, whose
25374
+ // lead-in gates on "a problem you flagged resembles prior knowledge"). Naming the
25375
+ // area a problem is about is unconditional and has nothing to do with recognizing
25376
+ // a prior, so that gate silently suppressed it: field census 2026-07-30 across 387
25377
+ // sessions — `domain` in 10/194 tag-emitting sessions (5%) against `problem` in
25378
+ // 124/194 (64%), and bimodal (the 10 that do emit average ~7 each), i.e. the
25379
+ // syntax is fine and the trigger was never reached.
25380
+ //
25381
+ // The gloss carries the anti-performance framing Cycles 9–11 proved is the actual
25382
+ // lever (the tag alone scored 0 = control; naming the bias and inverting it is
25383
+ // what lifted capture). The bias here is the mirror of the constraint one: an
25384
+ // agent that has just named a problem *precisely* feels the precision IS the
25385
+ // contribution, so stating the general area reads as vague restatement — exactly
25386
+ // when it matters most, because precise wording is what makes a problem
25387
+ // unfindable to anyone who doesn't already share it.
25388
+ domain: "you flagged a problem that isn't about one specific file \u2014 name the AREA it's about. Precision is not a substitute: the sharper your wording, the LESS anyone else will search for it, and an abstract problem with no area is an invisible island. Title Case",
25362
25389
  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
25390
  };
25364
25391
  }
@@ -52247,7 +52274,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
52247
52274
  }
52248
52275
 
52249
52276
  // src/engine.ts
52250
- var DAEMON_VERSION = true ? "2.0.2-dev.201" : "2.0.0-alpha.0";
52277
+ var DAEMON_VERSION = true ? "2.0.2-dev.204" : "2.0.0-alpha.0";
52251
52278
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
52252
52279
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
52253
52280
  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.204",
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("@");