human-hindsight 1.8.1 → 1.8.2
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 +49 -14
- package/dist/cli.js +118 -74
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,6 +44,18 @@ No data move or re-distillation is required. Data-directory precedence is:
|
|
|
44
44
|
a fresh installation. If both directories exist, the new one wins; use
|
|
45
45
|
`--home` to choose explicitly. Directories are never merged automatically.
|
|
46
46
|
|
|
47
|
+
In 1.8.2, existing preferences remain visible as **candidates**. Open the
|
|
48
|
+
Preferences tab, check the evidence and scope, then **Accept**, **Edit**, or
|
|
49
|
+
**Dismiss** each candidate. **Accepted instructions** builds a block from
|
|
50
|
+
accepted global rules, with an optional project selection. Task-only choices
|
|
51
|
+
stay out of standing instruction files. Reviews are saved in your library and
|
|
52
|
+
survive browser restarts.
|
|
53
|
+
|
|
54
|
+
Re-running `distill` refreshes results whose source content, prompt version,
|
|
55
|
+
runner/model selection, or grouping mode changed. Older checkpoints are refreshed
|
|
56
|
+
once because they have no input fingerprints. Hand-edited prompts are preserved;
|
|
57
|
+
`--force` explicitly allows replacing them.
|
|
58
|
+
|
|
47
59
|
Updating the old npm package installs the small compatibility wrapper, so
|
|
48
60
|
`npx cc-hindsight@latest gui` also works. Both global commands can coexist:
|
|
49
61
|
the main package owns `human-hindsight`, and the wrapper owns `cc-hindsight`.
|
|
@@ -129,7 +141,8 @@ npx human-hindsight@latest copy <slug> # → clipboard, paste into a fre
|
|
|
129
141
|
npx human-hindsight@latest edit <slug> # open in $EDITOR; your edits are protected
|
|
130
142
|
npx human-hindsight@latest rate <slug> up # record a verdict (up|down)
|
|
131
143
|
npx human-hindsight@latest prune # remove orphaned entries (asks first)
|
|
132
|
-
npx human-hindsight@latest preferences # → CLAUDE.md
|
|
144
|
+
npx human-hindsight@latest preferences # accepted global rules → CLAUDE.md
|
|
145
|
+
npx human-hindsight@latest preferences --project my-app # include this project's accepted rules
|
|
133
146
|
npx human-hindsight@latest status # pipeline funnel + orphan/skip flags
|
|
134
147
|
npx human-hindsight@latest retention # optional: preview longer local retention
|
|
135
148
|
```
|
|
@@ -160,10 +173,17 @@ making a model call; newly distilled sessions use hierarchical domain paths.
|
|
|
160
173
|
lists, and code blocks. **Markdown** shows the original source. Copy always
|
|
161
174
|
uses that original Markdown, including when the preview is selected.
|
|
162
175
|
|
|
163
|
-
Each prompt links to its
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
Each prompt links to its preference candidates. Newly distilled candidates
|
|
177
|
+
show exact human quotations, message references, and global/project/task scope;
|
|
178
|
+
older observations are labeled for review. Candidates can come from failed or
|
|
179
|
+
unfinished sessions too. You can bookmark either view and use your browser's
|
|
180
|
+
Back and Forward buttons. **View all candidates** shows observations;
|
|
181
|
+
**Accepted instructions** provides the reviewed block for `CLAUDE.md` or
|
|
182
|
+
`AGENTS.md`. Changed source evidence returns a candidate to review.
|
|
183
|
+
|
|
184
|
+
The terminal `preferences` command also exports accepted rules by default.
|
|
185
|
+
Use `--include-unreviewed` explicitly to inspect draft observations in scripts.
|
|
186
|
+
This flag does not accept them or change their review status.
|
|
167
187
|
|
|
168
188
|
The tips bar starts with an open-source and privacy reminder, then rotates
|
|
169
189
|
through quick tips with copyable `npx human-hindsight@latest` commands.
|
|
@@ -175,12 +195,17 @@ Interactive terminals get a colorful elapsed-time progress indicator during
|
|
|
175
195
|
scanning, export, and model work; redirected output stays free of animation.
|
|
176
196
|
|
|
177
197
|
Consolidation is optional: `npx human-hindsight@latest preferences --consolidate`
|
|
178
|
-
uses
|
|
198
|
+
uses your accepted rules in a call through your own coding harness and its configured provider,
|
|
179
199
|
with consent and the subscription/credit cost explained first. Successful
|
|
180
200
|
results are saved, with their Markdown and input metadata, in
|
|
181
201
|
`<home>/library/preferences.consolidated.json`. Refresh the GUI to open
|
|
182
|
-
**Saved consolidation**.
|
|
183
|
-
|
|
202
|
+
**Saved consolidation**. Every output rule links to its input preferences.
|
|
203
|
+
Coverage, scope, explicit conditions, and direct contradictions are checked;
|
|
204
|
+
invalid output gets one semantic correction attempt. Failed, empty, incomplete,
|
|
205
|
+
or declined results leave the last saved result intact. Saved results are
|
|
206
|
+
flagged when the selected inputs or their review status change. Legacy saved
|
|
207
|
+
results remain readable and need regeneration before copying as reviewed
|
|
208
|
+
instructions.
|
|
184
209
|
|
|
185
210
|
The viewer uses a minimal black-and-white palette and system monospace fonts.
|
|
186
211
|
Light and dark appearance follow your system setting. Local edits, ratings,
|
|
@@ -191,8 +216,11 @@ The GUI uses Node's built-in HTTP server and bundled HTML/CSS/JavaScript:
|
|
|
191
216
|
no frontend framework, database, font download, or external assets.
|
|
192
217
|
Markdown parsing and sanitization ship inside the bundle. Raw HTML stays
|
|
193
218
|
inert and remote images are represented by their alt text, without fetching them.
|
|
194
|
-
It listens only on `127.0.0.1
|
|
195
|
-
|
|
219
|
+
It listens only on `127.0.0.1` and stops with Ctrl+C. Browsing stays read-only.
|
|
220
|
+
The single write action saves an explicit preference review to
|
|
221
|
+
`library/preferences.review.json`; it requires the current browser session's
|
|
222
|
+
token, matching origin, and a current candidate revision. The GUI never invokes
|
|
223
|
+
an agent, edits source history, or writes an instruction file for you.
|
|
196
224
|
|
|
197
225
|
### Multiple backends (Claude Code + Codex + Kiro + OpenCode)
|
|
198
226
|
|
|
@@ -246,7 +274,13 @@ source defaults to `AGENTS.md`. The Codex runner uses `codex exec` with a JSON
|
|
|
246
274
|
schema, a read-only sandbox, and ephemeral sessions; generated distill sessions
|
|
247
275
|
do not become new source history. Claude supports current `structured_output`
|
|
248
276
|
results as well as legacy `result` objects/strings and verbose event arrays.
|
|
249
|
-
|
|
277
|
+
The Claude runner requires current isolation controls, including `--safe-mode`.
|
|
278
|
+
It runs from a private directory, disables tools, hooks, skills, and ambient
|
|
279
|
+
MCP configuration, supplies a dedicated system instruction, and disables session
|
|
280
|
+
persistence. Unsupported CLIs fail before any model call with an upgrade hint
|
|
281
|
+
or the option to choose another runner. Updating Human Hindsight does not update
|
|
282
|
+
Claude Code. Organization-managed policy remains authoritative; these controls
|
|
283
|
+
do not override administrator policy or constitute an operating-system sandbox.
|
|
250
284
|
|
|
251
285
|
### OpenCode 1 and 2
|
|
252
286
|
|
|
@@ -352,7 +386,7 @@ product:
|
|
|
352
386
|
in the repository's `package-lock.json`, which is not published. Bundled
|
|
353
387
|
libraries include citty, Zod, Clack, smol-toml, jsonc-parser, Marked, and
|
|
354
388
|
DOMPurify; their license texts ship in `dist/THIRD_PARTY_NOTICES.txt`.
|
|
355
|
-
- **Consent-gated LLM use.** `distill` states
|
|
389
|
+
- **Consent-gated LLM use.** `distill` states its estimated invocation count and
|
|
356
390
|
waits for `[y/N]` before anything runs on your subscription/credits.
|
|
357
391
|
`--dry-run` shows the full plan for free. If you decline, it exits without
|
|
358
392
|
invoking anything (exit code 2).
|
|
@@ -431,10 +465,11 @@ chosen local agent CLI to its configured provider, using its authentication.
|
|
|
431
465
|
|
|
432
466
|
**What does distill cost?**
|
|
433
467
|
Whatever your chosen agent CLI costs you: it runs on your existing subscription or
|
|
434
|
-
API credits. The consent prompt
|
|
468
|
+
API credits. The consent prompt estimates the invocation count up front
|
|
435
469
|
(one call per session digested, one to cluster, one per task authored), and
|
|
436
470
|
`--dry-run` prints the same plan without running anything. Checkpoints mean an
|
|
437
|
-
interrupted run
|
|
471
|
+
interrupted run can reuse completed work. Retries and windowed grouping may add
|
|
472
|
+
calls. Sessions too large for the input budget
|
|
438
473
|
(default 400k chars, `--input-budget`) are **refused before anything is
|
|
439
474
|
spent**. Re-run with `--truncate=extreme` to cut them (recorded in
|
|
440
475
|
provenance) or narrow the scope. Digest and author calls run 3 at a time by
|