sensemaking 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +28 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,18 +5,19 @@ Query a knowledge base you build with an agent: filter notes by frontmatter, the
5
5
  ## The problem
6
6
 
7
7
  When you work with an AI agent on anything substantial, you end up with a pile of small notes —
8
- findings, decisions, sources, summaries. The pile is the point: it's how knowledge accumulates
9
- instead of being re-derived every session.
8
+ findings, decisions, sources, summaries. Small, categorized notes are how knowledge accumulates
9
+ instead of being re-derived every session: structured frontmatter over free-form prose.
10
10
 
11
11
  But accumulation only pays off if it's findable. Past a couple dozen notes, an agent can't tell
12
- which fifteen of two hundred bear on its task, so it greps blindly, swallows the whole folder into
13
- context, or quietly rebuilds knowledge that already exists three files away.
12
+ which fifteen of two hundred bear on its task, so it greps, reads whole folders into context, or
13
+ rebuilds knowledge that already exists three files away.
14
14
 
15
15
  The classification an agent adds while writing — `status`, `type`, `tags`, `source` — is what keeps
16
16
  the pile navigable. `sensemaking` is the layer that acts on it, without an app running, a build
17
- step, or you re-explaining anything.
17
+ step, or you re-explaining anything. The intended shape is a small vault per project, not one big
18
+ one — starting a new one is a single command with no schema to design.
18
19
 
19
- ## How it works
20
+ ## The model
20
21
 
21
22
  Every file becomes a row; every frontmatter key becomes a column; the prose becomes a full-text
22
23
  index you can join against. You write named SQL queries once and run them by name.
@@ -40,20 +41,12 @@ WHERE f.status = 'active' AND content MATCH 'revenue'
40
41
  ORDER BY bm25(content, 10.0, 5.0, 1.0) LIMIT 10
41
42
  ```
42
43
 
43
- The filter shrinks the haystack, the search finds the needle, and each row that comes back —
44
+ The filter narrows the set, the search ranks it, and each row that comes back —
44
45
  path, title, summary, matching excerpt — is enough to decide whether to open the file, without
45
46
  carrying the file. On a real 26-note vault that's a few hundred tokens, against ~6,000 to read the
46
47
  three files it points at. Cheap enough to run before deciding what to open; reading afterward is
47
48
  the expensive step, and it happens through the filesystem, not SQL.
48
49
 
49
- Two properties make it trustworthy:
50
-
51
- - **Never stale.** Every query re-checks the filesystem first, re-reading only what changed. The
52
- SQLite cache under `.sense/` is disposable — delete it any time, the next query rebuilds it. An
53
- agent can trust a result without knowing when anything was last indexed.
54
- - **Headless.** Files on disk are the only source of truth. Nothing needs to be open — not
55
- Obsidian, not a server, not a daemon.
56
-
57
50
  ## Use it
58
51
 
59
52
  ```bash
@@ -121,13 +114,26 @@ npx skills add kmalakoff/sensemaking # the agent skill (add -g for global, -a
121
114
  The skill teaches an agent the essentials: discovery, `--list`, `--format json`, `has()`, when to
122
115
  use ad-hoc `query` versus saving a named one, and when to `rebuild`.
123
116
 
124
- ### Optional: a background pre-warmer
117
+ ## How it works, how it scales
118
+
119
+ `sense` is a command, not an app. Nothing has to be running: it starts, answers,
120
+ and exits.
121
+
122
+ Every query begins with a freshness check: each file's timestamp and size is
123
+ compared against the SQLite cache in `.sense/`, changed files are re-parsed, and
124
+ deleted files are dropped. When nothing has changed, that check is the entire
125
+ cost. Results are never stale, and the cache is disposable — `sense rebuild`
126
+ deletes and rebuilds it.
127
+
128
+ For a vault of a few hundred notes, the check takes a few milliseconds.
125
129
 
126
- `sense watch` runs the same reconcile ahead of time whenever the filesystem changes, so queries
127
- open on an already-warm cache. It's purely an optimization queries reconcile on open anyway, so
128
- a missed event can never make a result wrong and under ~1000 files you likely won't notice a
129
- difference. It runs in the foreground and never daemonizes; process supervision belongs to the OS.
130
- launchd and systemd examples: [WATCH.md](WATCH.md).
130
+ On a large vault (10,000+ files), the check grows with file count roughly a
131
+ tenth of a second at 10k and the first query after editing many files pays to
132
+ re-parse them. `sense watch` moves that parsing into the background: a job that
133
+ re-parses files as they change, so queries find the work already done. It is
134
+ optional queries always run their own check, so a stopped watcher never causes
135
+ a wrong answer, only a slower next query. launchd and systemd examples:
136
+ [WATCH.md](WATCH.md).
131
137
 
132
138
  ## Why not …
133
139
 
@@ -145,7 +151,7 @@ launchd and systemd examples: [WATCH.md](WATCH.md).
145
151
  - **Note CLIs (zk and similar):** good at their own model — tags, links, full text — but can't
146
152
  filter on arbitrary frontmatter fields, which is the whole point here.
147
153
  - **grep / one-off scripts:** fine until you want named, reusable, parameterized queries with real
148
- AND/OR/ORDER BY — at which point you've started writing a worse query engine.
154
+ AND/OR/ORDER BY — at which point you're writing your own query engine.
149
155
 
150
156
  `sensemaking` is deliberately thin glue: [gray-matter](https://github.com/jonschlinkert/gray-matter)
151
157
  parses, [remove-markdown](https://github.com/zuchka/remove-markdown) cleans the prose for indexing,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sensemaking",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Query a knowledge base you build with an agent: filter notes by frontmatter, then search inside them",
5
5
  "keywords": [
6
6
  "markdown",