caveat-cli 0.11.2 → 0.13.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.
@@ -0,0 +1,7 @@
1
+ -- v3: classify each entry's text into role buckets so the surface gate can
2
+ -- demand at least one match in the symptom section ("situational"), not just
3
+ -- topical (title / tags / environment) overlap.
4
+ -- Existing rows have NULL until db.ts backfills from stored body + frontmatter
5
+ -- on first openDb after migration.
6
+ ALTER TABLE entries ADD COLUMN topical_text TEXT;
7
+ ALTER TABLE entries ADD COLUMN symptom_text TEXT;
package/dist/schema.sql CHANGED
@@ -1,4 +1,4 @@
1
- PRAGMA user_version = 2;
1
+ PRAGMA user_version = 3;
2
2
 
3
3
  CREATE TABLE entries (
4
4
  rowid INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -14,6 +14,14 @@ CREATE TABLE entries (
14
14
  file_mtime TEXT NOT NULL,
15
15
  indexed_at TEXT NOT NULL,
16
16
  last_hit_at TEXT,
17
+ -- title + tags + environment values, concatenated. Used at search time to
18
+ -- classify a matched token as "topical" (the prompt named the entry's
19
+ -- topic without describing the failure state).
20
+ topical_text TEXT,
21
+ -- The entry's `## Symptom` section content. A matched token here is
22
+ -- "situational" — the prompt is using failure-state vocabulary, not
23
+ -- merely naming the topic. Surface gate requires ≥ 1 situational match.
24
+ symptom_text TEXT,
17
25
  UNIQUE (source, id)
18
26
  );
19
27