prjct-cli 2.32.7 → 2.33.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ## [2.33.0] - 2026-05-31
6
+
7
+ A project-memory RAG overhaul — recall that never bloats, never guesses on vocabulary, ingests your documents, and a vault that is synthesis rather than a mirror. Consolidates 2.32.3–2.32.8.
8
+
9
+ ### Added
10
+
11
+ - Semantic recall **on by default** for every project — a zero-dependency local embedder (feature-hashed character n-grams) vectorizes memory into SQLite, catching morphological / cross-vocabulary matches BM25 misses.
12
+ - Global **BYOT embeddings**: `prjct embeddings set|status|test|clear` — bring one API key, stored in the macOS Keychain (else a 0600 file), used by every project. OpenAI-compatible (OpenAI, Ollama, LM Studio).
13
+ - **Bidirectional vault ingest**: drop text files (`.txt/.json/.csv/.md`, auto-chunked) or binary/rich docs (`.pdf/.docx/.rtf`/images, extracted via `textutil`/`pdftotext`/`tesseract` with zero bundled dependency) into `captured/` — they become vectorized memory.
14
+ - `architecture.md` is now synthesized for **every** project (from decisions + gotchas), not only when an LLM analysis exists.
15
+
16
+ ### Changed
17
+
18
+ - Capture **dedups** on `(type, content)` — a verbatim re-capture is skipped, so detectors firing each session can't bloat the store.
19
+ - Memory content is authored in **English** by convention, for cleaner embeddings and better LLM comprehension.
20
+ - Vault sprawl cut ~46%: a single `releases/index.md` rollup (was one file per version), and opaque machine tag-pages (hash/session/…) dropped.
21
+ - `prjct ship` infers the semver bump from the change — `feat` → minor, `fix`/`chore` → patch, breaking → major — instead of always bumping patch.
22
+
23
+ ### Fixed
24
+
25
+ - friction-detector cross-session dedup compared a 64-char hash to a 12-char key, re-recording the same pushback every session. Migration v25 backfills `content_hash` and purges historical duplicates from both memory tables.
26
+
3
27
  ## [2.32.1] - 2026-05-30
4
28
 
5
29
  ### Bug Fixes
@@ -165,7 +189,10 @@
165
189
  - optimistic CAS on StorageManager.update() — close the lost-update data race (#346)
166
190
  - gate workflow rules ingested from repo markdown (close clone-to-RCE) (#345)
167
191
 
168
- ## [Unreleased]
192
+ ## [2.32.8] - 2026-05-31
193
+
194
+ ### Added
195
+ - global BYOT embeddings: one securely-stored API key (Keychain) for all projects + prjct embeddings command
169
196
 
170
197
  ## [2.32.7] - 2026-05-31
171
198
 
package/README.md CHANGED
@@ -69,13 +69,12 @@ check, logs to `~/.prjct-cli/state/auto-update.log`).
69
69
 
70
70
  Full install + upgrade paths: [INSTALL_PROMPT.md](./INSTALL_PROMPT.md).
71
71
 
72
- ### Native dependency repair
72
+ ### Zero native dependencies
73
73
 
74
- prjct-cli uses SQLite for local project memory. On Node installs, that requires the
75
- `better-sqlite3` native binding. The package install, `prjct install`, and
76
- daemon startup all verify the binding and retry `npm rebuild better-sqlite3`
77
- when needed. If a locked-down sandbox blocks the rebuild, install still
78
- continues and the daemon retries the repair the next time it starts.
74
+ prjct-cli uses SQLite for local project memory through the runtime's **built-in**
75
+ driver — `bun:sqlite` on Bun, `node:sqlite` on Node (≥22.5). No native addon, no
76
+ `node-gyp`, no postinstall script. It installs cleanly under `--ignore-scripts`
77
+ and locked-down CI, which closes the supply-chain surface a native rebuild opens.
79
78
 
80
79
  ## What you get
81
80
 
@@ -202,6 +201,7 @@ Cursor / Windsurf use the same commands with a `/` prefix: `/capture`, `/task`,
202
201
  | `prjct status <value>` | Inline status change on the active task (`done`, `paused`, `active`, …). |
203
202
  | `prjct tag <k:v>` | Tag the active task (`type:bug`, `domain:auth`, …). |
204
203
  | `prjct remember <type> "<content>"` | Persist a memory entry (decision, learning, gotcha, …). |
204
+ | `prjct embeddings <set\|status\|test\|clear>` | Configure the global BYOT embeddings provider (one secure key, all projects). |
205
205
  | `prjct ship [name]` | Run the project's ship workflow (commit, push, PR, persist). |
206
206
  | `prjct sync` | Re-index files, git co-change, imports; refresh project analysis. |
207
207
  | `prjct regen` | Full rebuild of the Obsidian vault snapshot from SQLite. |
@@ -302,24 +302,40 @@ prjct capture "check why webhook retries on 502"
302
302
  prjct context memory "auth refresh"
303
303
  ```
304
304
 
305
- Memory is FTS5-backed (SQLite) and persona-filtered. Every `remember`, `capture`, `ship`, and the SessionStart / Stop hooks regenerate the agent-readable markdown export at `~/Documents/prjct/<slug>/_generated/`.
305
+ Memory is FTS5-backed (SQLite) and persona-filtered. Recall blends three signals — BM25 lexical, semantic vectors, and a usefulness ledger that reinforces what the project keeps building on. Capture **dedups** automatically: a verbatim re-capture of the same `(type, content)` is skipped, so detectors firing each session can't bloat the store. Every `remember`, `capture`, `ship`, and the SessionStart / Stop hooks regenerate the agent-readable markdown export at `~/Documents/prjct/<slug>/_generated/`.
306
306
 
307
307
  > SQLite is the source of truth. The export is a snapshot — never hand-edit `_generated/`; if data is missing, fix the pipeline.
308
308
 
309
- ### Capture from any markdown editor
309
+ ### Semantic recall (embeddings)
310
310
 
311
- Drop a markdown file into `~/Documents/prjct/<slug>/captured/` with a YAML frontmatter:
311
+ On by default for **every** project — no setup, no key, no native dependency. A built-in pure-JS embedder (feature-hashed character n-grams) vectorizes memory into SQLite so recall catches morphological / cross-vocabulary matches BM25 misses (`auth`≈`authentication`).
312
+
313
+ Want higher quality? Bring your own key once, globally:
314
+
315
+ ```bash
316
+ prjct embeddings set --key sk-... # stored in the macOS Keychain (else a 0600 file), never in config
317
+ prjct embeddings test # validate connectivity
318
+ prjct embeddings status # show provider + key location
319
+ ```
320
+
321
+ One key applies to every project (OpenAI-compatible — OpenAI, Ollama at `http://localhost:11434/v1`, LM Studio, …). Without it, the local embedder is used. Each project re-vectorizes on its next session.
322
+
323
+ ### Drop files into the vault (bidirectional)
324
+
325
+ Drop a file into `~/Documents/prjct/<slug>/captured/` — it becomes memory, vectorized into the DB. Two shapes:
312
326
 
313
327
  ```markdown
314
328
  ---
315
329
  type: learning
316
- tags:
317
- domain: auth
330
+ tags: { domain: auth }
318
331
  ---
319
332
  JWT refresh rotation needs the prior token's `iat` to detect replay.
320
333
  ```
321
334
 
322
- The Stop hook (or `prjct context wiki sync`) ingests it into SQLite, then moves it to `captured/_ingested/<timestamp>/`. Works from Obsidian, vim, iA Writer, or anything that writes a `.md` file. Frontmatter is scanned for secrets before ingest.
335
+ - **Structured** a markdown file WITH frontmatter one typed entry.
336
+ - **Raw document** — any text file with no frontmatter (`.txt`, `.json`, `.csv`, `.md`, …) → a `source` entry, auto-chunked when long. Binary/rich docs (`.pdf`, `.docx`, `.rtf`, images) are extracted via tools you already have — `textutil` (macOS), `pdftotext` (poppler), `tesseract` (OCR) — with zero bundled dependency; without the tool the file waits for a re-sync after you install it.
337
+
338
+ The Stop hook (or `prjct context wiki sync`) ingests, vectorizes, then moves the file to `captured/_ingested/<timestamp>/`. Content is scanned for secrets and prompt-injection before ingest.
323
339
 
324
340
  ### Why a markdown export?
325
341
 
@@ -351,6 +367,7 @@ Bring your own MCP — prjct-cli doesn't duplicate trackers.
351
367
  | Variable | Default | Description |
352
368
  |---|---|---|
353
369
  | `PRJCT_CLI_HOME` | `~/.prjct-cli` | Override global storage |
370
+ | `PRJCT_EMBEDDINGS_API_KEY` | — | Embeddings API key (overrides `prjct embeddings set`; prefer the keychain-backed command) |
354
371
  | `PRJCT_DEBUG` | — | Enable debug logging (`1`, `true`, log level) |
355
372
  | `PRJCT_NO_DAEMON` | — | Force non-daemon path (debugging) |
356
373
  | `DEBUG` | — | Fallback debug flag |