know-cli 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- {know_cli-0.3.0 → know_cli-0.3.1}/.gitignore +1 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/PKG-INFO +108 -5
- {know_cli-0.3.0 → know_cli-0.3.1}/README.md +107 -4
- know_cli-0.3.1/docs/IMPLEMENTATION_PLAN.md +305 -0
- know_cli-0.3.1/docs/IMPROVEMENTS.md +72 -0
- know_cli-0.3.1/docs/STRATEGIC_AUDIT.md +624 -0
- know_cli-0.3.1/docs/arc.md +38 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/architecture.md +45 -35
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/digest-llm.md +12 -8
- know_cli-0.3.1/docs/onboarding-new-devs.md +13 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/pyproject.toml +1 -1
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/cli.py +761 -37
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/context_engine.py +14 -4
- know_cli-0.3.1/src/know/cost.py +199 -0
- know_cli-0.3.1/src/know/history.py +163 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/index.py +96 -3
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/knowledge_base.py +26 -2
- know_cli-0.3.1/src/know/lexical_index.py +291 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/semantic_search.py +290 -15
- know_cli-0.3.1/src/know/state.py +118 -0
- know_cli-0.3.1/src/know/tools.py +276 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/conftest.py +2 -0
- know_cli-0.3.1/tests/mcp_stub/mcp/__init__.py +11 -0
- know_cli-0.3.1/tests/mcp_stub/mcp/server/__init__.py +1 -0
- know_cli-0.3.1/tests/mcp_stub/mcp/server/fastmcp.py +44 -0
- know_cli-0.3.1/tests/test_history_cost.py +119 -0
- know_cli-0.3.1/tests/test_search_hybrid.py +162 -0
- know_cli-0.3.1/tests/test_state.py +62 -0
- know_cli-0.3.1/tests/test_week6_tools.py +124 -0
- know_cli-0.3.0/.know/config.yaml +0 -47
- know_cli-0.3.0/.know/knowledge.db +0 -0
- know_cli-0.3.0/.know/stats.db +0 -0
- know_cli-0.3.0/docs/arc.md +0 -43
- know_cli-0.3.0/docs/onboarding-new-devs.md +0 -13
- {know_cli-0.3.0 → know_cli-0.3.1}/.github/actions/know-cli/action.yml +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/.github/workflows/example-advanced.yml +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/.github/workflows/example-basic.yml +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/AGENTS.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/KNOW_SKILL.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/architecture-diff.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/dependencies.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/digest-compact.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/docs/onboarding-new_devs.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/__init__.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/ai.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/config.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/diff.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/exceptions.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/generator.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/git_hooks.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/import_graph.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/logger.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/mcp_server.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/models.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/parsers.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/quality.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/scanner.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/stats.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/token_counter.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/src/know/watcher.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/README.md +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_efficiency.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_know.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_unit.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_week2.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_week3.py +0 -0
- {know_cli-0.3.0 → know_cli-0.3.1}/tests/test_week4.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: know-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Context Intelligence for AI Coding Agents — smart, token-budgeted code context
|
|
5
5
|
Project-URL: Homepage, https://github.com/vic/know-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/vic/know-cli
|
|
@@ -127,17 +127,39 @@ know recall "how does auth work?"
|
|
|
127
127
|
|
|
128
128
|
Memories are automatically included in `know context` results. Your agent gets smarter over time.
|
|
129
129
|
|
|
130
|
-
### 🔍
|
|
130
|
+
### 🔍 Search — `know search` (Hybrid like qmd)
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
Hybrid retrieval by default:
|
|
133
|
+
- **Lexical**: SQLite **FTS5** (BM25 ranking) over chunk text + metadata
|
|
134
|
+
- **Vector**: embeddings via **fastembed** (when installed)
|
|
135
|
+
- **Deterministic rerank**: **Reciprocal Rank Fusion (RRF)**
|
|
133
136
|
|
|
134
137
|
```bash
|
|
138
|
+
# Default: hybrid (FTS + vectors when available)
|
|
135
139
|
know search "error handling"
|
|
140
|
+
|
|
141
|
+
# JSON output (stable schema)
|
|
142
|
+
know --json search "database connection pooling" --top-k 10
|
|
143
|
+
# (also supported after the command)
|
|
136
144
|
know search "database connection pooling" --top-k 10 --json
|
|
137
|
-
|
|
145
|
+
|
|
146
|
+
Notes:
|
|
147
|
+
- Queries with punctuation (e.g. `click.option`) are normalized for lexical search.
|
|
148
|
+
- Results downweight docs/tests so source code tends to rank higher.
|
|
149
|
+
# Force engine
|
|
150
|
+
know search "authentication" --engine lexical
|
|
151
|
+
know search "authentication" --engine vector
|
|
152
|
+
|
|
153
|
+
# Filters
|
|
154
|
+
know search "jwt" --path src/auth/ --type py
|
|
155
|
+
|
|
156
|
+
# Better snippets
|
|
157
|
+
know search "retry" --line-numbers
|
|
138
158
|
```
|
|
139
159
|
|
|
140
|
-
|
|
160
|
+
Notes:
|
|
161
|
+
- The FTS index is stored in: `.know/cache/index.db` (table: `chunks_fts`).
|
|
162
|
+
- If **FTS5** and/or **fastembed** are unavailable, `know search` gracefully falls back.
|
|
141
163
|
|
|
142
164
|
### 📊 Import Graph — `know graph`
|
|
143
165
|
|
|
@@ -173,6 +195,77 @@ know mcp config # Print Claude Desktop config
|
|
|
173
195
|
|
|
174
196
|
**MCP Resources:** `codebase://digest`, `codebase://structure`, `codebase://memories`
|
|
175
197
|
|
|
198
|
+
### 🛠 Tool Discovery — `know tools`
|
|
199
|
+
|
|
200
|
+
Find runnable project tools so agents stop guessing commands.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
know tools list
|
|
204
|
+
know tools search "database"
|
|
205
|
+
know tools suggest "deploy"
|
|
206
|
+
know --output-format markdown tools list
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Scans common sources: `scripts/`, `bin/`, `tools/`, `package.json` scripts, `Makefile` targets, Python CLIs, `docker-compose` services, and GitHub Actions workflows.
|
|
210
|
+
|
|
211
|
+
### 🧭 Agent State — `know state`
|
|
212
|
+
|
|
213
|
+
Track active task progress and create checkpoints you can restore later.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
know state set --task "fix auth bug" --progress "analyzed middleware"
|
|
217
|
+
know state get
|
|
218
|
+
know state checkpoint --name "before refactor"
|
|
219
|
+
know state restore cp_1739078400
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### 🗂 Execution History — `know history`
|
|
223
|
+
|
|
224
|
+
Log what you tried and whether it worked.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
know history log --command "npm test" --result failed --reason "missing env var"
|
|
228
|
+
know history search "test" --result failed
|
|
229
|
+
know history success-rate "deploy"
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### 💸 Cost Analytics — `know cost`
|
|
233
|
+
|
|
234
|
+
Analyze token usage and estimated cost from local telemetry.
|
|
235
|
+
If exact pricing/baseline data is unavailable, know reports fallback estimates and `unknown_fields` explicitly.
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
know cost summary
|
|
239
|
+
know cost by-query --limit 5
|
|
240
|
+
know cost savings
|
|
241
|
+
know cost budget --limit 100000
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### ⚡ Quick File Context — `know quick`
|
|
245
|
+
|
|
246
|
+
Get a minimal context bundle for one file (default 500-token budget).
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
know quick src/auth.py
|
|
250
|
+
know quick src/auth.py --budget 800 --json
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### 🔗 Dependency Neighbors — `know related`
|
|
254
|
+
|
|
255
|
+
See what a file imports and what imports it.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
know related src/auth.py
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### 📊 Module Summaries — `know summarize`
|
|
262
|
+
|
|
263
|
+
One-sentence summary for each module in the codebase.
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
know summarize --limit 50
|
|
267
|
+
```
|
|
268
|
+
|
|
176
269
|
### 📈 Usage Stats — `know stats`
|
|
177
270
|
|
|
178
271
|
Track your ROI. See how much context you're serving and how efficiently.
|
|
@@ -267,9 +360,18 @@ know status --json
|
|
|
267
360
|
| `know recall "query"` | Recall memories |
|
|
268
361
|
| `know forget <id>` | Delete a memory |
|
|
269
362
|
| `know graph <file>` | Show import dependencies |
|
|
363
|
+
| `know quick <file>` | Minimal context for one file |
|
|
364
|
+
| `know related <file>` | Show import/dependent neighbors for a file |
|
|
365
|
+
| `know summarize` | One-line module summaries |
|
|
270
366
|
| `know explain -c <name>` | AI-explain a component |
|
|
271
367
|
| `know stats` | Usage statistics |
|
|
272
368
|
| `know status` | Project health check |
|
|
369
|
+
| `know tools list` | List discovered project tools |
|
|
370
|
+
| `know tools search "query"` | Search for tools |
|
|
371
|
+
| `know tools suggest "intent"` | Suggest relevant tools for a task |
|
|
372
|
+
| `know state set/get/checkpoint/restore` | Manage agent task state |
|
|
373
|
+
| `know history log/search/success-rate` | Track command outcomes |
|
|
374
|
+
| `know cost summary/by-query/savings/budget` | Token/cost analytics + budget |
|
|
273
375
|
| `know reindex` | Rebuild search index |
|
|
274
376
|
| `know mcp serve` | Start MCP server |
|
|
275
377
|
| `know mcp config` | Print MCP client config |
|
|
@@ -281,6 +383,7 @@ know status --json
|
|
|
281
383
|
| Flag | Description |
|
|
282
384
|
|------|-------------|
|
|
283
385
|
| `--json` | Machine-readable JSON output |
|
|
386
|
+
| `--output-format markdown` | Human-readable markdown output for supported commands |
|
|
284
387
|
| `--quiet` | Minimal output |
|
|
285
388
|
| `--verbose` | Detailed output |
|
|
286
389
|
| `--time` | Show execution time |
|
|
@@ -83,17 +83,39 @@ know recall "how does auth work?"
|
|
|
83
83
|
|
|
84
84
|
Memories are automatically included in `know context` results. Your agent gets smarter over time.
|
|
85
85
|
|
|
86
|
-
### 🔍
|
|
86
|
+
### 🔍 Search — `know search` (Hybrid like qmd)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Hybrid retrieval by default:
|
|
89
|
+
- **Lexical**: SQLite **FTS5** (BM25 ranking) over chunk text + metadata
|
|
90
|
+
- **Vector**: embeddings via **fastembed** (when installed)
|
|
91
|
+
- **Deterministic rerank**: **Reciprocal Rank Fusion (RRF)**
|
|
89
92
|
|
|
90
93
|
```bash
|
|
94
|
+
# Default: hybrid (FTS + vectors when available)
|
|
91
95
|
know search "error handling"
|
|
96
|
+
|
|
97
|
+
# JSON output (stable schema)
|
|
98
|
+
know --json search "database connection pooling" --top-k 10
|
|
99
|
+
# (also supported after the command)
|
|
92
100
|
know search "database connection pooling" --top-k 10 --json
|
|
93
|
-
|
|
101
|
+
|
|
102
|
+
Notes:
|
|
103
|
+
- Queries with punctuation (e.g. `click.option`) are normalized for lexical search.
|
|
104
|
+
- Results downweight docs/tests so source code tends to rank higher.
|
|
105
|
+
# Force engine
|
|
106
|
+
know search "authentication" --engine lexical
|
|
107
|
+
know search "authentication" --engine vector
|
|
108
|
+
|
|
109
|
+
# Filters
|
|
110
|
+
know search "jwt" --path src/auth/ --type py
|
|
111
|
+
|
|
112
|
+
# Better snippets
|
|
113
|
+
know search "retry" --line-numbers
|
|
94
114
|
```
|
|
95
115
|
|
|
96
|
-
|
|
116
|
+
Notes:
|
|
117
|
+
- The FTS index is stored in: `.know/cache/index.db` (table: `chunks_fts`).
|
|
118
|
+
- If **FTS5** and/or **fastembed** are unavailable, `know search` gracefully falls back.
|
|
97
119
|
|
|
98
120
|
### 📊 Import Graph — `know graph`
|
|
99
121
|
|
|
@@ -129,6 +151,77 @@ know mcp config # Print Claude Desktop config
|
|
|
129
151
|
|
|
130
152
|
**MCP Resources:** `codebase://digest`, `codebase://structure`, `codebase://memories`
|
|
131
153
|
|
|
154
|
+
### 🛠 Tool Discovery — `know tools`
|
|
155
|
+
|
|
156
|
+
Find runnable project tools so agents stop guessing commands.
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
know tools list
|
|
160
|
+
know tools search "database"
|
|
161
|
+
know tools suggest "deploy"
|
|
162
|
+
know --output-format markdown tools list
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Scans common sources: `scripts/`, `bin/`, `tools/`, `package.json` scripts, `Makefile` targets, Python CLIs, `docker-compose` services, and GitHub Actions workflows.
|
|
166
|
+
|
|
167
|
+
### 🧭 Agent State — `know state`
|
|
168
|
+
|
|
169
|
+
Track active task progress and create checkpoints you can restore later.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
know state set --task "fix auth bug" --progress "analyzed middleware"
|
|
173
|
+
know state get
|
|
174
|
+
know state checkpoint --name "before refactor"
|
|
175
|
+
know state restore cp_1739078400
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### 🗂 Execution History — `know history`
|
|
179
|
+
|
|
180
|
+
Log what you tried and whether it worked.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
know history log --command "npm test" --result failed --reason "missing env var"
|
|
184
|
+
know history search "test" --result failed
|
|
185
|
+
know history success-rate "deploy"
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 💸 Cost Analytics — `know cost`
|
|
189
|
+
|
|
190
|
+
Analyze token usage and estimated cost from local telemetry.
|
|
191
|
+
If exact pricing/baseline data is unavailable, know reports fallback estimates and `unknown_fields` explicitly.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
know cost summary
|
|
195
|
+
know cost by-query --limit 5
|
|
196
|
+
know cost savings
|
|
197
|
+
know cost budget --limit 100000
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### ⚡ Quick File Context — `know quick`
|
|
201
|
+
|
|
202
|
+
Get a minimal context bundle for one file (default 500-token budget).
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
know quick src/auth.py
|
|
206
|
+
know quick src/auth.py --budget 800 --json
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 🔗 Dependency Neighbors — `know related`
|
|
210
|
+
|
|
211
|
+
See what a file imports and what imports it.
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
know related src/auth.py
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### 📊 Module Summaries — `know summarize`
|
|
218
|
+
|
|
219
|
+
One-sentence summary for each module in the codebase.
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
know summarize --limit 50
|
|
223
|
+
```
|
|
224
|
+
|
|
132
225
|
### 📈 Usage Stats — `know stats`
|
|
133
226
|
|
|
134
227
|
Track your ROI. See how much context you're serving and how efficiently.
|
|
@@ -223,9 +316,18 @@ know status --json
|
|
|
223
316
|
| `know recall "query"` | Recall memories |
|
|
224
317
|
| `know forget <id>` | Delete a memory |
|
|
225
318
|
| `know graph <file>` | Show import dependencies |
|
|
319
|
+
| `know quick <file>` | Minimal context for one file |
|
|
320
|
+
| `know related <file>` | Show import/dependent neighbors for a file |
|
|
321
|
+
| `know summarize` | One-line module summaries |
|
|
226
322
|
| `know explain -c <name>` | AI-explain a component |
|
|
227
323
|
| `know stats` | Usage statistics |
|
|
228
324
|
| `know status` | Project health check |
|
|
325
|
+
| `know tools list` | List discovered project tools |
|
|
326
|
+
| `know tools search "query"` | Search for tools |
|
|
327
|
+
| `know tools suggest "intent"` | Suggest relevant tools for a task |
|
|
328
|
+
| `know state set/get/checkpoint/restore` | Manage agent task state |
|
|
329
|
+
| `know history log/search/success-rate` | Track command outcomes |
|
|
330
|
+
| `know cost summary/by-query/savings/budget` | Token/cost analytics + budget |
|
|
229
331
|
| `know reindex` | Rebuild search index |
|
|
230
332
|
| `know mcp serve` | Start MCP server |
|
|
231
333
|
| `know mcp config` | Print MCP client config |
|
|
@@ -237,6 +339,7 @@ know status --json
|
|
|
237
339
|
| Flag | Description |
|
|
238
340
|
|------|-------------|
|
|
239
341
|
| `--json` | Machine-readable JSON output |
|
|
342
|
+
| `--output-format markdown` | Human-readable markdown output for supported commands |
|
|
240
343
|
| `--quiet` | Minimal output |
|
|
241
344
|
| `--verbose` | Detailed output |
|
|
242
345
|
| `--time` | Show execution time |
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# know-cli Implementation Plan
|
|
2
|
+
**Based on:** STRATEGIC_AUDIT.md
|
|
3
|
+
**Start Date:** Feb 8, 2026
|
|
4
|
+
**Timeline:** 16 weeks to first revenue
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Sprint 1: Critical Bug Fixes (Week 1-2)
|
|
9
|
+
|
|
10
|
+
### 🔴 P0 - Must Fix Before Any Marketing
|
|
11
|
+
|
|
12
|
+
| Task | Effort | Status | Owner | Notes |
|
|
13
|
+
|------|--------|--------|-------|-------|
|
|
14
|
+
| Fix cross-project contamination | 4h | 🟡 In Progress | Vic | Verify EmbeddingCache isolation |
|
|
15
|
+
| Implement hybrid search (BM25+vector) | 8h | ⬜ Not Started | Vic | Like QMD does |
|
|
16
|
+
| Deduplicate search results | 2h | ⬜ Not Started | Vic | Filter by file path |
|
|
17
|
+
| Better chunk previews | 2h | ⬜ Not Started | Vic | Show actual function body |
|
|
18
|
+
| Add performance benchmarks | 2h | ⬜ Not Started | Vic | README stats |
|
|
19
|
+
| Integration tests (MCP) | 6h | ⬜ Not Started | Vic | Automated |
|
|
20
|
+
|
|
21
|
+
**Total: 24h**
|
|
22
|
+
**Target: Feb 15, 2026**
|
|
23
|
+
|
|
24
|
+
**Success Criteria:**
|
|
25
|
+
- ✅ Zero cross-project results
|
|
26
|
+
- ✅ Zero duplicates
|
|
27
|
+
- ✅ 95%+ precision@5
|
|
28
|
+
- ✅ <500ms search latency
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Sprint 2: Power Features (Week 3-4)
|
|
33
|
+
|
|
34
|
+
### 🟡 P1 - Quality Improvements
|
|
35
|
+
|
|
36
|
+
| Task | Effort | Status | Notes |
|
|
37
|
+
|------|--------|--------|-------|
|
|
38
|
+
| Code graph traversal ("find callers") | 12h | ⬜ Not Started | High impact |
|
|
39
|
+
| Query expansion (synonyms) | 6h | ⬜ Not Started | Better recall |
|
|
40
|
+
| Reranking with cross-encoder | 8h | ⬜ Not Started | Better precision |
|
|
41
|
+
| TypeScript/JavaScript AST support | 16h | ⬜ Not Started | Broader adoption |
|
|
42
|
+
| Caching improvements | 6h | ⬜ Not Started | Faster UX |
|
|
43
|
+
| Documentation overhaul | 4h | ⬜ Not Started | Clear value prop |
|
|
44
|
+
|
|
45
|
+
**Total: 52h**
|
|
46
|
+
**Target: Feb 28, 2026**
|
|
47
|
+
|
|
48
|
+
**Success Criteria:**
|
|
49
|
+
- ✅ Works on TS/JS codebases
|
|
50
|
+
- ✅ <200ms cached search
|
|
51
|
+
- ✅ Graph queries supported
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Sprint 3: Distribution (Week 5-8)
|
|
56
|
+
|
|
57
|
+
### 🟢 Marketing & Growth
|
|
58
|
+
|
|
59
|
+
| Task | Effort | Status | Notes |
|
|
60
|
+
|------|--------|--------|-------|
|
|
61
|
+
| **Content Creation** | | | |
|
|
62
|
+
| - Show HN post draft | 2h | ⬜ Not Started | Get feedback first |
|
|
63
|
+
| - Demo video (Twitter, 30s) | 2h | ⬜ Not Started | Screen record |
|
|
64
|
+
| - Tutorial videos (5x 5min) | 16h | ⬜ Not Started | YouTube |
|
|
65
|
+
| - Dev.to articles (3x) | 12h | ⬜ Not Started | SEO keywords |
|
|
66
|
+
| **Distribution** | | | |
|
|
67
|
+
| - SEO-optimized docs site | 12h | ⬜ Not Started | Docusaurus/Nextra |
|
|
68
|
+
| - ProductHunt launch prep | 4h | ⬜ Not Started | Images, copy |
|
|
69
|
+
| - Twitter demo clips (10x) | 8h | ⬜ Not Started | Viral format |
|
|
70
|
+
| **Community** | | | |
|
|
71
|
+
| - Discord server setup | 2h | ⬜ Not Started | Invite early users |
|
|
72
|
+
| - GitHub Discussions enable | 1h | ⬜ Not Started | Q&A |
|
|
73
|
+
| - Email list (ConvertKit) | 2h | ⬜ Not Started | Collect signups |
|
|
74
|
+
|
|
75
|
+
**Total: 61h**
|
|
76
|
+
**Target: Mar 31, 2026**
|
|
77
|
+
|
|
78
|
+
**Success Criteria:**
|
|
79
|
+
- ✅ 1K GitHub stars
|
|
80
|
+
- ✅ 500 MAU
|
|
81
|
+
- ✅ Show HN front page
|
|
82
|
+
- ✅ 1K newsletter subscribers
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Sprint 4: Monetization (Week 9-12)
|
|
87
|
+
|
|
88
|
+
### 💰 Launch Pro Tier
|
|
89
|
+
|
|
90
|
+
| Task | Effort | Status | Notes |
|
|
91
|
+
|------|--------|--------|-------|
|
|
92
|
+
| **Backend Infrastructure** | | | |
|
|
93
|
+
| - Cloud sync (Supabase) | 16h | ⬜ Not Started | Postgres + auth |
|
|
94
|
+
| - Stripe integration | 8h | ⬜ Not Started | Subscriptions |
|
|
95
|
+
| - User dashboard (Next.js) | 12h | ⬜ Not Started | Manage account |
|
|
96
|
+
| - Billing + webhooks | 8h | ⬜ Not Started | Handle events |
|
|
97
|
+
| **Product** | | | |
|
|
98
|
+
| - Pro features (cloud sync, reranking) | 12h | ⬜ Not Started | Value differentiation |
|
|
99
|
+
| - Pricing page | 4h | ⬜ Not Started | Clear tiers |
|
|
100
|
+
| - Onboarding emails (5-part) | 6h | ⬜ Not Started | Activate users |
|
|
101
|
+
| **Launch** | | | |
|
|
102
|
+
| - Beta user recruitment | 4h | ⬜ Not Started | 20 early adopters |
|
|
103
|
+
| - Pricing validation interviews | 6h | ⬜ Not Started | Willingness to pay |
|
|
104
|
+
| - Launch announcement | 2h | ⬜ Not Started | Twitter, email |
|
|
105
|
+
|
|
106
|
+
**Total: 78h**
|
|
107
|
+
**Target: Apr 30, 2026**
|
|
108
|
+
|
|
109
|
+
**Success Criteria:**
|
|
110
|
+
- ✅ $1K MRR
|
|
111
|
+
- ✅ 50 paying users
|
|
112
|
+
- ✅ <5% churn
|
|
113
|
+
- ✅ 10% free→paid conversion
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Sprint 5-8: Scale (Week 13-16+)
|
|
118
|
+
|
|
119
|
+
### 🚀 Growth & Optimization
|
|
120
|
+
|
|
121
|
+
**Week 13-14: Team Tier**
|
|
122
|
+
- Shared knowledge base
|
|
123
|
+
- Team analytics
|
|
124
|
+
- SSO/SAML basics
|
|
125
|
+
- Admin dashboard
|
|
126
|
+
|
|
127
|
+
**Week 15-16: Enterprise Pilot**
|
|
128
|
+
- Self-hosted docs
|
|
129
|
+
- Security audit
|
|
130
|
+
- First enterprise customer
|
|
131
|
+
- Custom contract
|
|
132
|
+
|
|
133
|
+
**Ongoing:**
|
|
134
|
+
- Content marketing (weekly)
|
|
135
|
+
- Community management (daily)
|
|
136
|
+
- Customer support (daily)
|
|
137
|
+
- Feature iteration (bi-weekly)
|
|
138
|
+
- Hiring prep (CTO/eng)
|
|
139
|
+
|
|
140
|
+
**Success Criteria (Month 6):**
|
|
141
|
+
- ✅ $5K-10K MRR
|
|
142
|
+
- ✅ 200 paid users
|
|
143
|
+
- ✅ 2-3 team accounts
|
|
144
|
+
- ✅ 1 enterprise pilot
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Key Milestones
|
|
149
|
+
|
|
150
|
+
| Date | Milestone | Metric |
|
|
151
|
+
|------|-----------|--------|
|
|
152
|
+
| **Feb 15** | v0.4.0 shipped | Zero critical bugs |
|
|
153
|
+
| **Feb 28** | Multi-language support | Works on TS/JS |
|
|
154
|
+
| **Mar 15** | Show HN launch | Front page |
|
|
155
|
+
| **Mar 31** | 1K stars | GitHub |
|
|
156
|
+
| **Apr 15** | Pro tier beta | 10 users |
|
|
157
|
+
| **Apr 30** | Public launch | $1K MRR |
|
|
158
|
+
| **May 31** | Team tier | $3K MRR |
|
|
159
|
+
| **Jun 30** | Enterprise pilot | $5K MRR |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Resource Allocation
|
|
164
|
+
|
|
165
|
+
### Time Budget (Per Week)
|
|
166
|
+
|
|
167
|
+
**Sushil (40h/week):**
|
|
168
|
+
- 50% Engineering (20h) - Features, bugs
|
|
169
|
+
- 25% Marketing (10h) - Content, community
|
|
170
|
+
- 15% Product (6h) - Roadmap, interviews
|
|
171
|
+
- 10% Admin (4h) - Ops, support
|
|
172
|
+
|
|
173
|
+
**Vic (100h/week):**
|
|
174
|
+
- 70% Engineering (70h) - Implementation
|
|
175
|
+
- 20% QA (20h) - Testing, debugging
|
|
176
|
+
- 10% Docs (10h) - Guides, examples
|
|
177
|
+
|
|
178
|
+
### Monthly Burn Rate
|
|
179
|
+
|
|
180
|
+
**Current: $0/mo** (bootstrap)
|
|
181
|
+
|
|
182
|
+
**With revenue ($1K MRR):**
|
|
183
|
+
- $0 - Infrastructure (Supabase free tier)
|
|
184
|
+
- $0 - Tools (open source)
|
|
185
|
+
- $0 - Marketing (organic only)
|
|
186
|
+
- **Net: $1K profit → reinvest**
|
|
187
|
+
|
|
188
|
+
**With scale ($5K MRR):**
|
|
189
|
+
- $100 - Infrastructure (Supabase Pro)
|
|
190
|
+
- $200 - Tools (Stripe, SendGrid, etc.)
|
|
191
|
+
- $500 - Marketing (ads, sponsorships)
|
|
192
|
+
- **Net: $4.2K profit → hire 1st employee**
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Decision Points
|
|
197
|
+
|
|
198
|
+
### After Sprint 1 (Week 2)
|
|
199
|
+
|
|
200
|
+
**Question:** Is search quality world-class?
|
|
201
|
+
|
|
202
|
+
- ✅ YES → Proceed to Sprint 2 (distribution)
|
|
203
|
+
- ❌ NO → Iterate 2 more weeks
|
|
204
|
+
|
|
205
|
+
### After Sprint 3 (Week 8)
|
|
206
|
+
|
|
207
|
+
**Question:** Do we have traction (1K stars, 500 MAU)?
|
|
208
|
+
|
|
209
|
+
- ✅ YES → Build monetization (Sprint 4)
|
|
210
|
+
- ❌ NO → Double down on content, delay Pro launch
|
|
211
|
+
|
|
212
|
+
### After Sprint 4 (Week 12)
|
|
213
|
+
|
|
214
|
+
**Question:** Are people paying ($1K MRR)?
|
|
215
|
+
|
|
216
|
+
- ✅ YES → Scale (hire, enterprise)
|
|
217
|
+
- ❌ NO → Reassess pricing/value prop, pivot if needed
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Risk Mitigation
|
|
222
|
+
|
|
223
|
+
### If Search Quality Doesn't Improve
|
|
224
|
+
|
|
225
|
+
**Pivot:** Position as "LLM context formatter" not "search tool"
|
|
226
|
+
**Focus:** Token budgeting, MCP integration, memory
|
|
227
|
+
**Market:** Still valuable even without best-in-class search
|
|
228
|
+
|
|
229
|
+
### If No Traction (Low Stars/MAU)
|
|
230
|
+
|
|
231
|
+
**Diagnosis:** Wrong audience? Wrong messaging? Wrong timing?
|
|
232
|
+
**Action:** 20 user interviews → find PMF
|
|
233
|
+
**Pivot:** Maybe B2B (teams) first, not B2C (individuals)
|
|
234
|
+
|
|
235
|
+
### If Free→Paid Conversion Fails
|
|
236
|
+
|
|
237
|
+
**Diagnosis:** Value prop unclear? Pricing wrong? Features weak?
|
|
238
|
+
**Action:** A/B test pricing ($15 vs $25), add killer Pro feature
|
|
239
|
+
**Pivot:** Open source everything, monetize via consulting/support
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Success Tracking
|
|
244
|
+
|
|
245
|
+
### Weekly Review (Every Friday)
|
|
246
|
+
|
|
247
|
+
**Metrics to track:**
|
|
248
|
+
- GitHub stars (week-over-week growth)
|
|
249
|
+
- PyPI downloads
|
|
250
|
+
- MAU (active users)
|
|
251
|
+
- Searches/day
|
|
252
|
+
- Conversion funnel (signups → actives → paid)
|
|
253
|
+
|
|
254
|
+
**Questions to answer:**
|
|
255
|
+
- What worked this week?
|
|
256
|
+
- What didn't work?
|
|
257
|
+
- What are users asking for?
|
|
258
|
+
- Any red flags (bugs, churn)?
|
|
259
|
+
|
|
260
|
+
### Monthly Review (1st of month)
|
|
261
|
+
|
|
262
|
+
**Deep dive:**
|
|
263
|
+
- MRR growth
|
|
264
|
+
- Churn analysis
|
|
265
|
+
- Feature usage (what's popular?)
|
|
266
|
+
- Competitor moves
|
|
267
|
+
- Roadmap adjustments
|
|
268
|
+
|
|
269
|
+
**Board update (if funded):**
|
|
270
|
+
- Financials (revenue, burn)
|
|
271
|
+
- Product (shipped features)
|
|
272
|
+
- Metrics (users, engagement)
|
|
273
|
+
- Risks + mitigation
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Next Actions (This Week)
|
|
278
|
+
|
|
279
|
+
### Monday Feb 8
|
|
280
|
+
- [x] Strategic audit complete
|
|
281
|
+
- [x] Implementation plan written
|
|
282
|
+
- [ ] Fix cross-project bug (4h)
|
|
283
|
+
- [ ] Start hybrid search (4h)
|
|
284
|
+
|
|
285
|
+
### Tuesday Feb 9
|
|
286
|
+
- [ ] Finish hybrid search (4h)
|
|
287
|
+
- [ ] Deduplicate results (2h)
|
|
288
|
+
- [ ] Better previews (2h)
|
|
289
|
+
|
|
290
|
+
### Wednesday Feb 10
|
|
291
|
+
- [ ] Add benchmarks (2h)
|
|
292
|
+
- [ ] Integration tests (6h)
|
|
293
|
+
|
|
294
|
+
### Thursday Feb 11
|
|
295
|
+
- [ ] Ship v0.4.0
|
|
296
|
+
- [ ] Write Show HN draft
|
|
297
|
+
- [ ] Create demo video
|
|
298
|
+
|
|
299
|
+
### Friday Feb 12
|
|
300
|
+
- [ ] Weekly review
|
|
301
|
+
- [ ] Plan Sprint 2
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
**Let's ship. 🦉**
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# know-cli Search Improvements
|
|
2
|
+
|
|
3
|
+
## Issues Found (Feb 8, 2026)
|
|
4
|
+
|
|
5
|
+
### 1. Duplicate Results
|
|
6
|
+
**Problem:** Same file appears multiple times in search results
|
|
7
|
+
**Root cause:** TBD - need to investigate semantic_search.py
|
|
8
|
+
**Fix:** Deduplicate by file path before returning results
|
|
9
|
+
|
|
10
|
+
### 2. Cross-Project Contamination
|
|
11
|
+
**Problem:** Searching in know-cli returns allconvert files
|
|
12
|
+
**Root cause:** Project scoping exists but may not be working correctly
|
|
13
|
+
**Fix:** Verify project_root isolation in EmbeddingCache
|
|
14
|
+
|
|
15
|
+
### 3. Missing --chunk Flag in CLI
|
|
16
|
+
**Problem:** Backend supports function-level search but CLI doesn't expose it
|
|
17
|
+
**Root cause:** cli.py search command missing the --chunk option
|
|
18
|
+
**Fix:** Add `--chunk` flag to `@cli.command() search`
|
|
19
|
+
|
|
20
|
+
### 4. Poor Preview Quality
|
|
21
|
+
**Problem:** Previews show first 200 chars of file, not the matching chunk
|
|
22
|
+
**Root cause:** search_code() truncates file start instead of matching section
|
|
23
|
+
**Fix:** For chunk search, show the actual function/class body
|
|
24
|
+
|
|
25
|
+
### 5. No Hybrid Search
|
|
26
|
+
**Problem:** Only uses vector embeddings, no keyword matching
|
|
27
|
+
**Missing:** BM25 + vector combination like QMD does
|
|
28
|
+
**Fix:** Implement hybrid_search() combining both approaches
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Phase 1: Quick Wins (Today)
|
|
33
|
+
|
|
34
|
+
- [x] Document issues
|
|
35
|
+
- [ ] Fix #1: Deduplicate results
|
|
36
|
+
- [ ] Fix #2: Verify project scoping
|
|
37
|
+
- [ ] Fix #3: Expose --chunk in CLI
|
|
38
|
+
- [ ] Fix #4: Better previews for chunk search
|
|
39
|
+
- [ ] Test all fixes on real codebases
|
|
40
|
+
|
|
41
|
+
## Phase 2: Power Features (Next)
|
|
42
|
+
|
|
43
|
+
- [ ] Hybrid search (BM25 + vector)
|
|
44
|
+
- [ ] Reranking with cross-encoder
|
|
45
|
+
- [ ] Query expansion (synonyms, related terms)
|
|
46
|
+
- [ ] Code-aware filters (complexity, recency, test vs prod)
|
|
47
|
+
- [ ] Caching improvements (faster repeat searches)
|
|
48
|
+
|
|
49
|
+
## Phase 3: Advanced (Later)
|
|
50
|
+
|
|
51
|
+
- [ ] Multi-modal search (code + docs + comments)
|
|
52
|
+
- [ ] Interactive refinement
|
|
53
|
+
- [ ] Code graph traversal ("find all callers of X")
|
|
54
|
+
- [ ] Diff-aware search ("what changed related to auth?")
|
|
55
|
+
- [ ] Natural language understanding ("how to validate JWT tokens")
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Testing Strategy
|
|
60
|
+
|
|
61
|
+
1. **Use on know-cli itself** - dogfood our own tool
|
|
62
|
+
2. **Test on video-pipeline** - real production codebase
|
|
63
|
+
3. **Test on remotion code** - TypeScript/React
|
|
64
|
+
4. **Benchmark** - compare speed before/after
|
|
65
|
+
|
|
66
|
+
## Success Metrics
|
|
67
|
+
|
|
68
|
+
- Search returns 0 duplicates
|
|
69
|
+
- Cross-project results = 0
|
|
70
|
+
- Function-level search available via CLI
|
|
71
|
+
- Previews show relevant code (not file start)
|
|
72
|
+
- Search time < 500ms for 100+ files
|