@inerrata-corporation/errata 2.0.2-dev.288 → 2.0.2-dev.295
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 +29 -54
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -21283,13 +21283,10 @@ function renderSnapshot(s) {
|
|
|
21283
21283
|
const lines = [];
|
|
21284
21284
|
lines.push("## Errata context");
|
|
21285
21285
|
lines.push("");
|
|
21286
|
-
lines.push("### \u270D\uFE0F CAPTURE PROTOCOL \u2014
|
|
21286
|
+
lines.push("### \u270D\uFE0F CAPTURE PROTOCOL \u2014 tags are the record");
|
|
21287
21287
|
lines.push(
|
|
21288
|
-
"errata
|
|
21288
|
+
"errata records ONLY inline tags: `[!one line]` for every problem you state, `(fix:[id])` when your edit fixed a shown problem. Untagged prose is silently lost \u2014 tag as you write (no fences), we filter downstream."
|
|
21289
21289
|
);
|
|
21290
|
-
lines.push("- `[!one line]` \u2014 EVERY problem you notice or report (a bug you read past, an audit/review finding, anything you call out)");
|
|
21291
|
-
lines.push("- `(fix:[id])` \u2014 your edit fixed a problem errata showed you (ids appear in the priors below / in file priors)");
|
|
21292
|
-
lines.push("Tag every one you state \u2014 we filter downstream, so don't self-censor or batch. This is the witness only you can give; untagged, it's lost.");
|
|
21293
21290
|
lines.push("");
|
|
21294
21291
|
lines.push(SEARCH_IMPERATIVE_HEADER);
|
|
21295
21292
|
lines.push(SEARCH_IMPERATIVE_BODY);
|
|
@@ -25524,61 +25521,36 @@ function buildFileRecallInstruction(referent = "\u2026") {
|
|
|
25524
25521
|
}
|
|
25525
25522
|
function triageBullet(ref) {
|
|
25526
25523
|
return [
|
|
25527
|
-
" \u2022 you diagnosed a
|
|
25528
|
-
"
|
|
25529
|
-
"
|
|
25530
|
-
|
|
25531
|
-
" a task rejects <- await fn() has no try/finally, so a rejection never decrements running].",
|
|
25532
|
-
" \xB7 chain it as deep as you actually diagnosed: [!symptom <- cause <- root cause] \u2014 every",
|
|
25533
|
-
" ` <- ` is a link we record, and the RIGHTMOST is the reusable root cause (the node other",
|
|
25534
|
-
" agents find). Stop at the deepest mechanism you're sure of; don't guess a link.",
|
|
25535
|
-
" When symptom and cause turn up FAR APART \u2014 the cause lands turns later, several problems",
|
|
25536
|
-
" in play \u2014 name the thread instead: [!#slug the symptom] once, then (cause:#slug the",
|
|
25537
|
-
" mechanism) binds to it however far away (same slug, your choice of word). Explaining a",
|
|
25538
|
-
` problem we SHOWED you? bind by its handle/id: (cause:[${ref}] \u2026) / (cause:#dprob_\u2026 \u2026).`
|
|
25524
|
+
" \u2022 you diagnosed a cause \u2014 fold the chain into the flag with <- (caused-by), deepest",
|
|
25525
|
+
" sure mechanism rightmost: [!symptom <- cause <- root cause]. Symptom and cause far",
|
|
25526
|
+
" apart? open a thread [!#slug symptom] \u2026 later bind (cause:#slug mechanism);",
|
|
25527
|
+
` explaining a problem we SHOWED you \u2192 (cause:[${ref}] \u2026)`
|
|
25539
25528
|
].join("\n");
|
|
25540
25529
|
}
|
|
25541
25530
|
function linkBullet(ref) {
|
|
25542
25531
|
return [
|
|
25543
|
-
|
|
25544
|
-
|
|
25545
|
-
|
|
25546
|
-
|
|
25547
|
-
|
|
25548
|
-
|
|
25549
|
-
` \xB7 (
|
|
25550
|
-
" Aim for ~3 DIFFERENT relevant priors; one link is weak, three triangulate it.",
|
|
25551
|
-
` \xB7 ${TAG_EXAMPLE.pattern()} \u2014 name the general shape it instantiates (e.g. (pattern: unbounded`,
|
|
25552
|
-
" queue growth under backpressure)) \u2014 this works with NO code anchor, and two agents naming",
|
|
25553
|
-
" the same pattern converge on one node. Cite a shown Pattern by handle: (pattern:[handle]).",
|
|
25554
|
-
` \xB7 ${TAG_EXAMPLE.package()} \u2014 the PUBLIC PACKAGE the problem is about, even when this`,
|
|
25555
|
-
" workspace doesn't depend on it (e.g. (package: chokidar), (package: pypi/requests)) \u2014 a",
|
|
25556
|
-
" public-registry anchor lets the knowledge cross to the collective; internal names stay private.",
|
|
25557
|
-
` \xB7 ${TAG_EXAMPLE.component()} \u2014 the framework/product-level UNIT it concerns when it's not a`,
|
|
25558
|
-
" package or a language (e.g. (component: React Router), (component: V8 Isolate)).",
|
|
25559
|
-
` \xB7 (aids:[${ref}],\u2026) \u2014 your FIX could also help these other, even unrelated, problems.`,
|
|
25560
|
-
" A hypothesis, not a claim \u2014 it's recorded as may-resolve and checked by whoever tries it.",
|
|
25561
|
-
` \xB7 when your fix relates to a PRIOR solution you were primed with (a problem's`,
|
|
25562
|
-
` "already solved by" line): (builds-on:[${ref}]) if you layer on it \xB7 (supersedes:[${ref}])`,
|
|
25563
|
-
" if you replace it \xB7 (alternative:[h]) if it's a different approach \u2014 pick one. This is the",
|
|
25564
|
-
" only way N solutions on one problem stop being a flat bag."
|
|
25532
|
+
" \u2022 link what you flag:",
|
|
25533
|
+
` \xB7 (instance:[${ref}],[another],[a-third]) \u2014 priors it instantiates; ~3 DIFFERENT ones triangulate`,
|
|
25534
|
+
" \xB7 (pattern:[handle]) \u2014 cite a shown Pattern",
|
|
25535
|
+
` \xB7 ${TAG_EXAMPLE.package()} \u2014 the PUBLIC package it's about, dependency or not`,
|
|
25536
|
+
` \xB7 ${TAG_EXAMPLE.component()} \u2014 the framework/product unit`,
|
|
25537
|
+
` \xB7 (aids:[${ref}],\u2026) \u2014 other problems your fix might also resolve (hypothesis)`,
|
|
25538
|
+
` \xB7 your fix vs a shown solution: (builds-on:[${ref}]) \xB7 (supersedes:[${ref}]) \xB7 (alternative:[h]) \u2014 pick one`
|
|
25565
25539
|
].join("\n");
|
|
25566
25540
|
}
|
|
25567
25541
|
function attemptBullet() {
|
|
25568
25542
|
return [
|
|
25569
|
-
|
|
25570
|
-
`
|
|
25571
|
-
|
|
25572
|
-
" Failed attempts are knowledge \u2014 they rule out a path. Add #slug to bind to a named",
|
|
25573
|
-
" thread: (tried:#slug \u2026) / (failed:#slug \u2026)."
|
|
25543
|
+
` \u2022 attempting an approach / an attempt failed \u2192 ${TAG_EXAMPLE.tried()} \xB7`,
|
|
25544
|
+
` ${TAG_EXAMPLE.failed()} \u2014 a failed attempt is knowledge;`,
|
|
25545
|
+
" bind to a thread with (tried:#slug \u2026) / (failed:#slug \u2026)"
|
|
25574
25546
|
].join("\n");
|
|
25575
25547
|
}
|
|
25576
25548
|
function buildAgentInstruction(opts = {}) {
|
|
25577
25549
|
const signals = opts.signals ?? ["prior", "problem", "domain", "fix", "constraint", "triage", "attempt", "link"];
|
|
25578
25550
|
const ref = opts.referent ?? "its-handle";
|
|
25579
25551
|
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);
|
|
25580
|
-
const head2 = `We tag the priors we show you with a short handle like [${opts.handleExample ?? "chokidar-glob"}].
|
|
25581
|
-
const tail = "Mid-turn text (between tool calls) can be dropped by the harness \u2014
|
|
25552
|
+
const head2 = `We tag the priors we show you with a short handle like [${opts.handleExample ?? "chokidar-glob"}]. Tags are the ONLY signal recorded \u2014 anything you state but don't tag is silently lost. Weave each tag inline in your prose as you state it (no fences or backticks, no extra calls); tag everything, we filter downstream:`;
|
|
25553
|
+
const tail = "Mid-turn text (between tool calls) can be dropped by the harness \u2014 RESTATE every tag in your turn-final message; the final message is what reliably survives.";
|
|
25582
25554
|
return [
|
|
25583
25555
|
head2,
|
|
25584
25556
|
...signals.map(
|
|
@@ -25636,12 +25608,12 @@ var init_agent_signals = __esm({
|
|
|
25636
25608
|
aids: (ref) => `(aids:[${ref}])`
|
|
25637
25609
|
};
|
|
25638
25610
|
GLOSS = {
|
|
25639
|
-
prior: "a prior
|
|
25640
|
-
problem: "you
|
|
25641
|
-
fix: "your edit
|
|
25642
|
-
constraint: "
|
|
25643
|
-
triage: "you diagnosed a
|
|
25644
|
-
attempt: "
|
|
25611
|
+
prior: "a shown prior helped, or you work in a primed language/package",
|
|
25612
|
+
problem: "a problem you notice or report \u2014 any bug, finding, or thing wrong; about specific code? name the file: [!what's wrong @ src/file.ts:42]",
|
|
25613
|
+
fix: "your edit fixed a PROBLEM we showed you; for one you flagged yourself: (fix: what you changed) \u2014 a fix resolves a stated problem, completing routine work is not a fix",
|
|
25614
|
+
constraint: "a design decision forced by conflicting requirements or constraints \u2014 tag the tension, especially when your fix makes it 'only look' resolved",
|
|
25615
|
+
triage: "you diagnosed a cause \u2014 fold the chain into the flag with <- (caused-by), deepest sure mechanism rightmost",
|
|
25616
|
+
attempt: "attempting an approach / an attempt failed \u2014 a failed attempt is knowledge, it rules out a path",
|
|
25645
25617
|
// DOMAIN — promoted to a FIRST-CLASS signal (was nested inside linkBullet, whose
|
|
25646
25618
|
// lead-in gates on "a problem you flagged resembles prior knowledge"). Naming the
|
|
25647
25619
|
// area a problem is about is unconditional and has nothing to do with recognizing
|
|
@@ -25657,7 +25629,10 @@ var init_agent_signals = __esm({
|
|
|
25657
25629
|
// contribution, so stating the general area reads as vague restatement — exactly
|
|
25658
25630
|
// when it matters most, because precise wording is what makes a problem
|
|
25659
25631
|
// unfindable to anyone who doesn't already share it.
|
|
25660
|
-
|
|
25632
|
+
// Sim note (2026-08-02 shrink): domain emission held 4/4 with just the trigger
|
|
25633
|
+
// clause; the pattern convergence hook now rides here too (it fell 0/4 when it
|
|
25634
|
+
// only appeared in the link bullet's tail).
|
|
25635
|
+
domain: "a problem with no single file \u2014 name the area it's about (Title Case). Also name the general shape it instantiates: (pattern: the shape) \u2014 needs no code anchor, and two agents naming the same shape converge on one node",
|
|
25661
25636
|
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"
|
|
25662
25637
|
};
|
|
25663
25638
|
}
|
|
@@ -52906,7 +52881,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
|
|
|
52906
52881
|
}
|
|
52907
52882
|
|
|
52908
52883
|
// src/engine.ts
|
|
52909
|
-
var DAEMON_VERSION = true ? "2.0.2-dev.
|
|
52884
|
+
var DAEMON_VERSION = true ? "2.0.2-dev.295" : "2.0.0-alpha.0";
|
|
52910
52885
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
52911
52886
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
52912
52887
|
var GIT_OP_MUTE_MS = 4e3;
|