backpass 0.1.12 → 0.1.13
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/README.md +6 -4
- package/package.json +1 -1
- package/src/fold.js +5 -5
- package/src/gap-ledger.js +3 -3
- package/src/prompts/analysis.md +6 -6
- package/src/prompts/synthesis.md +2 -2
package/README.md
CHANGED
|
@@ -158,8 +158,9 @@ strict JSON: which instructions helped, which were violated, and what mistakes n
|
|
|
158
158
|
instruction covers. Every negative carries a class - `harm` (following the instruction
|
|
159
159
|
caused damage), `non-compliance` (the agent ignored it), or `irrelevant` - because those
|
|
160
160
|
argue for opposite fates: harm argues against an instruction, non-compliance argues for
|
|
161
|
-
reinforcing it. Every gap carries a domain - `
|
|
162
|
-
|
|
161
|
+
reinforcing it. Every gap carries a domain - `orchestration` when the mistake was caused
|
|
162
|
+
not by this repository but by an external agent harness or tooling that orchestrated the
|
|
163
|
+
task, `project` for every other mistake - and the
|
|
163
164
|
analysis is shown the ledger's open gaps so it can cite an existing gap id instead of
|
|
164
165
|
coining a paraphrase of it.
|
|
165
166
|
|
|
@@ -193,8 +194,9 @@ consolidation call sees the full open gap set and merges entries that describe t
|
|
|
193
194
|
mistake. That second judgment is what lets two sightings of a brand-new gap in the same
|
|
194
195
|
run's parallel fan-out corroborate. A failed consolidation call degrades the run to
|
|
195
196
|
lexical identity and says so; it never aborts. Orchestration-domain gaps are counted and
|
|
196
|
-
reported but never cluster:
|
|
197
|
-
become
|
|
197
|
+
reported but never cluster: a mistake caused not by this repository but by the external
|
|
198
|
+
agent harness or tooling that orchestrated a session does not become an instruction in the
|
|
199
|
+
project's memory file.
|
|
198
200
|
|
|
199
201
|
Only evidence judged against the _current_ memory-file set hash is folded into a proposal. A
|
|
200
202
|
transcript that fell out of this run's sample - the time window, `maxTranscripts`, or the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backpass",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"packageManager": "pnpm@11.5.0",
|
|
5
5
|
"description": "Gradient descent for your agent memory - analyzes past agent session transcripts and proposes evidence-backed edits to AGENTS.md / CLAUDE.md",
|
|
6
6
|
"type": "module",
|
package/src/fold.js
CHANGED
|
@@ -91,9 +91,9 @@ export function foldEvidence(evidenceRecords, { minGapEvidence = 2, memoryFile =
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// Orchestration-domain sightings are
|
|
95
|
-
//
|
|
96
|
-
// never cluster, so they can never corroborate into a project proposal.
|
|
94
|
+
// Orchestration-domain sightings are mistakes caused not by this repository but by the
|
|
95
|
+
// external agent harness or tooling that orchestrated the session; they are counted for
|
|
96
|
+
// legibility but never cluster, so they can never corroborate into a project proposal.
|
|
97
97
|
const allObservations = gapObservations ?? recordObservations;
|
|
98
98
|
const projectObservations = allObservations.filter((obs) => obs?.domain !== "orchestration");
|
|
99
99
|
const orchestrationGapSightings = allObservations.length - projectObservations.length;
|
|
@@ -230,8 +230,8 @@ export function renderEvidenceForPrompt(summary) {
|
|
|
230
230
|
lines.push("### Gap clusters (mistakes no current instruction covers)");
|
|
231
231
|
if (summary.totals.orchestrationGapSightings) {
|
|
232
232
|
lines.push(
|
|
233
|
-
`- ${summary.totals.orchestrationGapSightings} orchestration-domain sighting(s)
|
|
234
|
-
`
|
|
233
|
+
`- ${summary.totals.orchestrationGapSightings} orchestration-domain sighting(s) caused by the ` +
|
|
234
|
+
`orchestrating harness or tooling were excluded; they never enter this repository's memory file`,
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
if (!summary.gaps.length) {
|
package/src/gap-ledger.js
CHANGED
|
@@ -26,9 +26,9 @@ import { sha256 } from "./state.js";
|
|
|
26
26
|
* merged by the pre-synthesis consolidation pass (`mergeGapEntries`, driven by
|
|
27
27
|
* `src/consolidate.js`), which is what lets two same-run parallel sightings - neither
|
|
28
28
|
* of which could cite the other - still corroborate.
|
|
29
|
-
* - Every observation carries the `domain` the analysis judged: `
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* - Every observation carries the `domain` the analysis judged: `orchestration` when the
|
|
30
|
+
* mistake was not caused by this repository but by an external agent harness or tooling
|
|
31
|
+
* that orchestrated the task, `project` for every other mistake.
|
|
32
32
|
* Orchestration sightings are recorded for legibility but never counted toward
|
|
33
33
|
* corroboration and never surface in a proposal; a missing domain counts as project,
|
|
34
34
|
* so evidence from before the field existed keeps its old behavior.
|
package/src/prompts/analysis.md
CHANGED
|
@@ -53,12 +53,12 @@ Rules, in order of importance:
|
|
|
53
53
|
or violated the instruction - evidence the instruction failed to steer, which argues
|
|
54
54
|
for reinforcing it, never for deleting it. `irrelevant`: on inspection the moment
|
|
55
55
|
does not actually bear on this instruction. Never report a skipped rule as `harm`.
|
|
56
|
-
4. **`domain` states
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
4. **`domain` states what caused a gap.** A gap is `orchestration` when the mistake was
|
|
57
|
+
not caused by this repository, but by an external agent harness or tooling that
|
|
58
|
+
orchestrated the task (a task brief, a supervisor's process, the harness itself - by
|
|
59
|
+
way of illustration only, not a list to match against); every other gap is `project`.
|
|
60
|
+
Ask the causal question, not which category the wording resembles. Orchestration gaps
|
|
61
|
+
are counted but never proposed into this repository's memory file.
|
|
62
62
|
5. **Do not confabulate influence.** Only call something positive when the trace shows
|
|
63
63
|
the agent doing the specific thing the instruction asks for. An outcome that would
|
|
64
64
|
have happened anyway is not evidence.
|
package/src/prompts/synthesis.md
CHANGED
|
@@ -81,7 +81,7 @@ analyzed sessions in which an instruction drew any evidence at all.
|
|
|
81
81
|
5. **Every edit must be backed by at least one verbatim quote** from the evidence. You
|
|
82
82
|
will attach the quotes in the next step, so only make changes you can back.
|
|
83
83
|
6. **Budget:** {{BUDGET_RULE}}
|
|
84
|
-
7.
|
|
84
|
+
7. You can extract a long, narrow, crisply-triggered section instead of deleting it:
|
|
85
85
|
extraction frees the same always-loaded tokens and loses nothing.
|
|
86
86
|
8. Change only `./{{MEMORY_PATH}}` and files under `./{{SKILLS_DIR}}/`. Never delete a
|
|
87
87
|
file. Do not create notes, scripts, or scratch files.
|
|
@@ -94,7 +94,7 @@ analyzed sessions in which an instruction drew any evidence at all.
|
|
|
94
94
|
| Conditional / narrow | **skill** (the description is the condition) | deletion candidate |
|
|
95
95
|
|
|
96
96
|
A skill's description is always loaded and its body is free until triggered, so moving a
|
|
97
|
-
|
|
97
|
+
section into a skill trades its always-loaded cost for that one description line.
|
|
98
98
|
|
|
99
99
|
**Skill descriptions are weights too.** If the evidence shows an agent lacked knowledge
|
|
100
100
|
an existing skill already contains, that is a failed trigger: rewrite that skill's
|