@lorekit/cli 1.32.0 → 1.32.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorekit/cli",
3
- "version": "1.32.0",
3
+ "version": "1.32.1",
4
4
  "description": "Install the LoreKit shared-memory skill and run health checks for the LoreKit MCP server.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,6 +20,7 @@ The design has two tiers connected by a recurrence gate. Both run on LoreKit.
20
20
  - [Conventions](#conventions)
21
21
  - [Read step (start of every run)](#read-step-start-of-every-run)
22
22
  - [Write step (on failure / at the end of a run)](#write-step-on-failure--at-the-end-of-a-run)
23
+ - [The reconcile-on-re-run flow (resolve + record)](#the-reconcile-on-re-run-flow-resolve--record)
23
24
  - [Promotion (fast → slow)](#promotion-fast--slow)
24
25
  - [Entrenchment guards (do not skip these)](#entrenchment-guards-do-not-skip-these)
25
26
  - [Wiring checklist](#wiring-checklist)
@@ -178,6 +179,70 @@ bar is stricter for `repo::` writes — a repo scope is team-visible.
178
179
 
179
180
  ---
180
181
 
182
+ ## The reconcile-on-re-run flow (resolve + record)
183
+
184
+ Some hosts do not just fail-and-learn — they **produce durable outputs at a
185
+ shared target that they revisit on later runs**: a reviewer posts comment threads
186
+ on a PR it re-reviews on every push, a triager files issues it re-scans, a linter
187
+ opens tickets it re-opens. For these, a plain read/write loop is not enough:
188
+ stale outputs pile up at the target, and the signal about which outputs were
189
+ *useful* is thrown away.
190
+
191
+ The reconcile-on-re-run flow closes both gaps. On each re-run over the same
192
+ target, the host **reconciles its own prior outputs** in three steps:
193
+
194
+ 1. **Classify** each prior output the host itself produced against the current
195
+ state of the target. The three outcomes that carry signal:
196
+
197
+ | Outcome | Meaning | Evidence |
198
+ | --- | --- | --- |
199
+ | **resolved** | The output was acted on — the thing it flagged is now handled | the flagged region changed and the finding no longer reproduces, or the owner acknowledged it |
200
+ | **declined** | The owner explicitly rejected it | a "won't fix" / "by design" reply, a 👎 |
201
+ | **still-open** | The finding still reproduces this run | the host re-produces the same output |
202
+
203
+ 2. **Clean up at the target.** For `resolved` and `declined` outputs, close them
204
+ at the source — resolve the thread, close the ticket, check the box — so a
205
+ re-run leaves the target tidier than it found it instead of accumulating
206
+ cruft. **Never** close a `still-open` output; that would hide a live finding.
207
+ Only ever touch outputs the host itself authored.
208
+
209
+ 3. **Record the outcome** to a **Signal**-shaped bucket (a durable, per-target
210
+ relevance memory — distinct from the fast lessons bucket). Write `resolved` as
211
+ a positive signal for that output's *pattern* and `declined` as a negative
212
+ one, keyed by a stable pattern fingerprint (never by a line number or an id
213
+ that drifts). Over runs this bucket teaches the host which of its output
214
+ patterns get acted on in this target and which are noise — read it at the
215
+ start of a run to suppress the reliably-declined patterns and reinforce the
216
+ reliably-resolved ones. `still-open` writes nothing: there is no outcome yet.
217
+
218
+ The Signal bucket is a second bucket alongside the lessons one, in the same
219
+ grammar as [Conventions](#conventions):
220
+
221
+ - **Tag:** `loop::<host>-<signal>` — e.g. `loop::reviewer-comment-relevance`.
222
+ Reads filter by it; writes always carry it.
223
+ - **Key:** `<host>-<signal>::<pattern-fingerprint>` — e.g.
224
+ `reviewer-comment-relevance::unsupported-cross-repo-claim`. The fingerprint
225
+ is the key segment, so the same `scope` + `key` overwrites in place and one
226
+ output pattern accumulates one record across runs.
227
+
228
+ Two guards keep this honest, both instances of the entrenchment guards below:
229
+
230
+ - **Absence of confirmation is not resolution.** If a re-run did not re-scan the
231
+ region a prior output covers (e.g. it only looked at the diff), the output is
232
+ `still-open`, not `resolved` — silence is not a fix.
233
+ - **The cleanup is idempotent and non-fatal.** A target already closed is
234
+ skipped; a cleanup error is logged and never fails the run.
235
+
236
+ Wire it as its own step at the host's re-run seam, gated on "a prior run's output
237
+ exists at this target". It composes with the read/write steps: the Signal bucket
238
+ it writes is read back at the next run's read step. The reference implementation
239
+ is the `agent-skills` `pr-reviewer` agent: it resolves its own addressed PR
240
+ threads on each commit-triggered re-review and records the fixed/declined
241
+ outcome to a `reviewer-comment-relevance` bucket, whose classification and
242
+ record shape are specified in `agents/shared/rules/comment-relevance-memory.md`.
243
+
244
+ ---
245
+
181
246
  ## Promotion (fast → slow)
182
247
 
183
248
  After a read or write, a lesson is **promotion-eligible** when either: