know-cli 0.7.0__tar.gz → 0.7.2__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.
Files changed (90) hide show
  1. {know_cli-0.7.0 → know_cli-0.7.2}/PKG-INFO +29 -16
  2. {know_cli-0.7.0 → know_cli-0.7.2}/README.md +27 -14
  3. know_cli-0.7.2/benchmark/answer_keys/q1.json +49 -0
  4. know_cli-0.7.2/benchmark/answer_keys/q2.json +49 -0
  5. know_cli-0.7.2/benchmark/answer_keys/q3.json +49 -0
  6. know_cli-0.7.2/benchmark/bench_agent_e2e.py +405 -0
  7. know_cli-0.7.2/benchmark/bench_report.py +139 -0
  8. know_cli-0.7.2/benchmark/bench_session_dedup.py +129 -0
  9. know_cli-0.7.2/benchmark/bench_token_efficiency.py +186 -0
  10. know_cli-0.7.2/benchmark/conftest.py +170 -0
  11. know_cli-0.7.2/benchmark/results/.gitignore +3 -0
  12. know_cli-0.7.2/benchmark/results/BENCHMARK_REPORT.md +33 -0
  13. know_cli-0.7.2/benchmark/results/agent_grep_answers.md +217 -0
  14. know_cli-0.7.2/benchmark/results/agent_know_answers.md +220 -0
  15. know_cli-0.7.2/benchmark/results/session_dedup.json +172 -0
  16. know_cli-0.7.2/benchmark/results/token_efficiency.json +351 -0
  17. know_cli-0.7.2/benchmark/run_all.py +58 -0
  18. {know_cli-0.7.0 → know_cli-0.7.2}/docs/arc.md +6 -6
  19. {know_cli-0.7.0 → know_cli-0.7.2}/docs/architecture.md +6 -1
  20. {know_cli-0.7.0 → know_cli-0.7.2}/docs/digest-llm.md +9 -9
  21. {know_cli-0.7.0 → know_cli-0.7.2}/docs/plans/2026-02-16-feat-progressive-disclosure-session-dedup-deep-context-plan.md +74 -74
  22. {know_cli-0.7.0 → know_cli-0.7.2}/pyproject.toml +2 -2
  23. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/__init__.py +1 -1
  24. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/context_engine.py +6 -6
  25. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/daemon.py +2 -4
  26. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/daemon_db.py +5 -3
  27. {know_cli-0.7.0 → know_cli-0.7.2}/.github/actions/know-cli/action.yml +0 -0
  28. {know_cli-0.7.0 → know_cli-0.7.2}/.github/workflows/example-advanced.yml +0 -0
  29. {know_cli-0.7.0 → know_cli-0.7.2}/.github/workflows/example-basic.yml +0 -0
  30. {know_cli-0.7.0 → know_cli-0.7.2}/.gitignore +0 -0
  31. {know_cli-0.7.0 → know_cli-0.7.2}/AGENTS.md +0 -0
  32. {know_cli-0.7.0 → know_cli-0.7.2}/KNOW_SKILL.md +0 -0
  33. {know_cli-0.7.0 → know_cli-0.7.2}/benchmark/benchmark_task.md +0 -0
  34. {know_cli-0.7.0 → know_cli-0.7.2}/docs/architecture-diff.md +0 -0
  35. {know_cli-0.7.0 → know_cli-0.7.2}/docs/dependencies.md +0 -0
  36. {know_cli-0.7.0 → know_cli-0.7.2}/docs/digest-compact.md +0 -0
  37. {know_cli-0.7.0 → know_cli-0.7.2}/docs/onboarding-new-devs.md +0 -0
  38. {know_cli-0.7.0 → know_cli-0.7.2}/docs/onboarding-new_devs.md +0 -0
  39. {know_cli-0.7.0 → know_cli-0.7.2}/docs/plans/2026-02-15-refactor-know-cli-v2-daemon-architecture-plan.md +0 -0
  40. {know_cli-0.7.0 → know_cli-0.7.2}/docs/plans/2026-02-16-feat-10x-agent-search-ranking-plan.md +0 -0
  41. {know_cli-0.7.0 → know_cli-0.7.2}/docs/plans/2026-02-16-feat-10x-search-quality-plan.md +0 -0
  42. {know_cli-0.7.0 → know_cli-0.7.2}/docs/plans/2026-02-16-fix-testing-issues-search-graph-performance-plan.md +0 -0
  43. {know_cli-0.7.0 → know_cli-0.7.2}/docs/solutions/architecture/p2-p3-architectural-improvements.md +0 -0
  44. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/IMPROVEMENTS.md +0 -0
  45. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/ai.py +0 -0
  46. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/__init__.py +0 -0
  47. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/agent.py +0 -0
  48. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/core.py +0 -0
  49. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/diff.py +0 -0
  50. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/hooks.py +0 -0
  51. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/knowledge.py +0 -0
  52. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/mcp.py +0 -0
  53. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/search.py +0 -0
  54. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/cli/stats.py +0 -0
  55. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/config.py +0 -0
  56. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/diff.py +0 -0
  57. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/embeddings.py +0 -0
  58. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/exceptions.py +0 -0
  59. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/file_categories.py +0 -0
  60. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/generator.py +0 -0
  61. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/git_hooks.py +0 -0
  62. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/import_graph.py +0 -0
  63. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/index.py +0 -0
  64. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/knowledge_base.py +0 -0
  65. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/logger.py +0 -0
  66. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/mcp_server.py +0 -0
  67. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/models.py +0 -0
  68. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/parsers.py +0 -0
  69. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/quality.py +0 -0
  70. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/query.py +0 -0
  71. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/ranking.py +0 -0
  72. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/scanner.py +0 -0
  73. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/semantic_search.py +0 -0
  74. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/stats.py +0 -0
  75. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/token_counter.py +0 -0
  76. {know_cli-0.7.0 → know_cli-0.7.2}/src/know/watcher.py +0 -0
  77. {know_cli-0.7.0 → know_cli-0.7.2}/tests/README.md +0 -0
  78. {know_cli-0.7.0 → know_cli-0.7.2}/tests/conftest.py +0 -0
  79. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_efficiency.py +0 -0
  80. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_know.py +0 -0
  81. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_phases_4_6_7.py +0 -0
  82. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_query_understanding.py +0 -0
  83. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_token_features.py +0 -0
  84. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_unit.py +0 -0
  85. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_v2_features.py +0 -0
  86. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_v3_features.py +0 -0
  87. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_v3_search.py +0 -0
  88. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_week2.py +0 -0
  89. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_week3.py +0 -0
  90. {know_cli-0.7.0 → know_cli-0.7.2}/tests/test_week4.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: know-cli
3
- Version: 0.7.0
3
+ Version: 0.7.2
4
4
  Summary: Context Intelligence for AI Coding Agents — smart, token-budgeted code context
5
5
  Project-URL: Homepage, https://github.com/sushilk1991/know-cli
6
6
  Project-URL: Repository, https://github.com/sushilk1991/know-cli
@@ -18,6 +18,7 @@ Classifier: Topic :: Software Development :: Documentation
18
18
  Classifier: Topic :: Utilities
19
19
  Requires-Python: >=3.10
20
20
  Requires-Dist: click>=8.1.0
21
+ Requires-Dist: numpy>=1.24.0
21
22
  Requires-Dist: pathspec>=0.11.0
22
23
  Requires-Dist: pyyaml>=6.0
23
24
  Requires-Dist: rich>=13.0.0
@@ -46,7 +47,6 @@ Provides-Extra: mcp
46
47
  Requires-Dist: mcp>=1.0.0; extra == 'mcp'
47
48
  Provides-Extra: search
48
49
  Requires-Dist: fastembed>=0.3.0; extra == 'search'
49
- Requires-Dist: numpy>=1.24.0; extra == 'search'
50
50
  Description-Content-Type: text/markdown
51
51
 
52
52
  # know — 3x Fewer Tokens for AI Coding Agents
@@ -81,26 +81,39 @@ Session dedup means the second query never re-sends code from the first.
81
81
 
82
82
  ## Benchmarks
83
83
 
84
- ### Token efficiency: know context vs Grep+Read
84
+ **farfield** (764 files, 2487 functions, production TypeScript+Python monorepo)
85
85
 
86
- **farfield** (762 files, production TypeScript+Python):
86
+ ### Token efficiency: 3-tier vs single-context vs Grep+Read (8 scenarios)
87
87
 
88
- | Scenario | Grep+Read | know context | Reduction |
89
- |---|---|---|---|
90
- | WebSocket handling | 12,936 tokens | 1,714 tokens | **7.5x** |
91
- | Auth and API keys | 3,383 tokens | 1,623 tokens | **2.1x** |
92
- | Model routing | 27,556 tokens | 1,772 tokens | **15.6x** |
93
- | Error handling | 25,160 tokens | 1,773 tokens | **14.2x** |
94
- | Database + storage | 5,357 tokens | 1,773 tokens | **3.0x** |
95
- | **Total** | **74,392** | **8,655** | **8.6x** |
88
+ | Scenario | Grep+Read | v0.6 context-only | v0.7 3-tier | v0.7 vs v0.6 |
89
+ |---|---|---|---|---|
90
+ | WebSocket handling | 106,257 | 5,976 | 3,549 | **-41%** |
91
+ | Auth & API keys | 145,690 | 4,063 | 3,569 | **-12%** |
92
+ | Model routing | 125,453 | 5,271 | 3,251 | **-38%** |
93
+ | Error handling | 45,205 | 7,517 | 4,226 | **-44%** |
94
+ | Database storage | 180,329 | 5,479 | 3,138 | **-43%** |
95
+ | Billing | 41,789 | 5,424 | 3,295 | **-39%** |
96
+ | LLM providers | 176,184 | 5,085 | 3,184 | **-37%** |
97
+ | Agent execution | 175,338 | 2,250 | 2,445 | -9% |
98
+ | **Total** | **996,245** | **41,065** | **26,657** | **-35%** |
96
99
 
97
- ### Head-to-head agent benchmark (farfield, 762 files)
100
+ v0.7 3-tier = `know map` `know context --session` → `know deep`
101
+
102
+ - **37.4x** fewer tokens than grep+read
103
+ - **35%** fewer tokens than v0.6 context-only
104
+
105
+ ### Live head-to-head agent benchmark
106
+
107
+ Two Claude Opus agents answered 3 identical questions about the farfield codebase. One used `know` CLI, the other used grep+read.
98
108
 
99
109
  | Metric | Agent with `know` | Agent with Grep+Read |
100
110
  |---|---|---|
101
- | Tool calls | 14 | 36 |
102
- | Total tokens | 105,950 | 113,471 |
103
- | Quality | Equivalent | Equivalent |
111
+ | Tool calls | **28** | 40 |
112
+ | Total tokens | **98,593** | 107,060 |
113
+ | Duration | 215s | 206s |
114
+ | Answer quality | Equivalent | Equivalent |
115
+
116
+ **30% fewer tool calls. 8% fewer tokens. Same answer quality.**
104
117
 
105
118
  ---
106
119
 
@@ -30,26 +30,39 @@ Session dedup means the second query never re-sends code from the first.
30
30
 
31
31
  ## Benchmarks
32
32
 
33
- ### Token efficiency: know context vs Grep+Read
33
+ **farfield** (764 files, 2487 functions, production TypeScript+Python monorepo)
34
34
 
35
- **farfield** (762 files, production TypeScript+Python):
35
+ ### Token efficiency: 3-tier vs single-context vs Grep+Read (8 scenarios)
36
36
 
37
- | Scenario | Grep+Read | know context | Reduction |
38
- |---|---|---|---|
39
- | WebSocket handling | 12,936 tokens | 1,714 tokens | **7.5x** |
40
- | Auth and API keys | 3,383 tokens | 1,623 tokens | **2.1x** |
41
- | Model routing | 27,556 tokens | 1,772 tokens | **15.6x** |
42
- | Error handling | 25,160 tokens | 1,773 tokens | **14.2x** |
43
- | Database + storage | 5,357 tokens | 1,773 tokens | **3.0x** |
44
- | **Total** | **74,392** | **8,655** | **8.6x** |
37
+ | Scenario | Grep+Read | v0.6 context-only | v0.7 3-tier | v0.7 vs v0.6 |
38
+ |---|---|---|---|---|
39
+ | WebSocket handling | 106,257 | 5,976 | 3,549 | **-41%** |
40
+ | Auth & API keys | 145,690 | 4,063 | 3,569 | **-12%** |
41
+ | Model routing | 125,453 | 5,271 | 3,251 | **-38%** |
42
+ | Error handling | 45,205 | 7,517 | 4,226 | **-44%** |
43
+ | Database storage | 180,329 | 5,479 | 3,138 | **-43%** |
44
+ | Billing | 41,789 | 5,424 | 3,295 | **-39%** |
45
+ | LLM providers | 176,184 | 5,085 | 3,184 | **-37%** |
46
+ | Agent execution | 175,338 | 2,250 | 2,445 | -9% |
47
+ | **Total** | **996,245** | **41,065** | **26,657** | **-35%** |
45
48
 
46
- ### Head-to-head agent benchmark (farfield, 762 files)
49
+ v0.7 3-tier = `know map` `know context --session` → `know deep`
50
+
51
+ - **37.4x** fewer tokens than grep+read
52
+ - **35%** fewer tokens than v0.6 context-only
53
+
54
+ ### Live head-to-head agent benchmark
55
+
56
+ Two Claude Opus agents answered 3 identical questions about the farfield codebase. One used `know` CLI, the other used grep+read.
47
57
 
48
58
  | Metric | Agent with `know` | Agent with Grep+Read |
49
59
  |---|---|---|
50
- | Tool calls | 14 | 36 |
51
- | Total tokens | 105,950 | 113,471 |
52
- | Quality | Equivalent | Equivalent |
60
+ | Tool calls | **28** | 40 |
61
+ | Total tokens | **98,593** | 107,060 |
62
+ | Duration | 215s | 206s |
63
+ | Answer quality | Equivalent | Equivalent |
64
+
65
+ **30% fewer tool calls. 8% fewer tokens. Same answer quality.**
53
66
 
54
67
  ---
55
68
 
@@ -0,0 +1,49 @@
1
+ {
2
+ "question_id": "q1",
3
+ "topic": "Billing/Subscription System",
4
+ "facts": [
5
+ {
6
+ "id": "f1",
7
+ "description": "Names the Subscription model or equivalent billing model class",
8
+ "keywords": ["Subscription", "subscription", "model"],
9
+ "weight": 2
10
+ },
11
+ {
12
+ "id": "f2",
13
+ "description": "Identifies billing plan tiers (e.g. free, pro, team, enterprise or sandbox, paid)",
14
+ "keywords": ["plan", "tier", "free", "pro", "team", "enterprise", "sandbox"],
15
+ "weight": 2
16
+ },
17
+ {
18
+ "id": "f3",
19
+ "description": "Explains how sandbox limits are enforced (rate limits, usage caps, middleware)",
20
+ "keywords": ["sandbox", "limit", "enforce", "rate", "cap", "usage"],
21
+ "weight": 2
22
+ },
23
+ {
24
+ "id": "f4",
25
+ "description": "Names specific files involved in billing (e.g. billing router, subscription service)",
26
+ "keywords": ["billing", "router", "service", "file"],
27
+ "weight": 1
28
+ },
29
+ {
30
+ "id": "f5",
31
+ "description": "Describes the payment processing flow (Stripe integration, webhooks)",
32
+ "keywords": ["Stripe", "payment", "webhook", "checkout"],
33
+ "weight": 1
34
+ },
35
+ {
36
+ "id": "f6",
37
+ "description": "Names specific functions involved in subscription management",
38
+ "keywords": ["create_subscription", "cancel", "update", "function"],
39
+ "weight": 1
40
+ },
41
+ {
42
+ "id": "f7",
43
+ "description": "Describes how plan limits map to features or quotas",
44
+ "keywords": ["quota", "feature", "limit", "plan"],
45
+ "weight": 1
46
+ }
47
+ ],
48
+ "max_score": 10
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "question_id": "q2",
3
+ "topic": "LLM Provider System",
4
+ "facts": [
5
+ {
6
+ "id": "f1",
7
+ "description": "Names provider_discovery module and explains its purpose",
8
+ "keywords": ["provider_discovery", "discover", "provider"],
9
+ "weight": 2
10
+ },
11
+ {
12
+ "id": "f2",
13
+ "description": "Lists supported LLM providers (OpenAI, Anthropic, Gemini, etc.)",
14
+ "keywords": ["OpenAI", "Anthropic", "Gemini", "provider"],
15
+ "weight": 2
16
+ },
17
+ {
18
+ "id": "f3",
19
+ "description": "Explains workspace-level model settings and how they're stored",
20
+ "keywords": ["workspace", "model", "settings", "config"],
21
+ "weight": 2
22
+ },
23
+ {
24
+ "id": "f4",
25
+ "description": "Describes how provider selection/routing works",
26
+ "keywords": ["select", "route", "routing", "choose"],
27
+ "weight": 1
28
+ },
29
+ {
30
+ "id": "f5",
31
+ "description": "Names specific files involved in provider configuration",
32
+ "keywords": ["file", "config", "provider"],
33
+ "weight": 1
34
+ },
35
+ {
36
+ "id": "f6",
37
+ "description": "Explains API key management for different providers",
38
+ "keywords": ["api_key", "key", "credential", "secret"],
39
+ "weight": 1
40
+ },
41
+ {
42
+ "id": "f7",
43
+ "description": "Describes model fallback or default behavior",
44
+ "keywords": ["fallback", "default", "model"],
45
+ "weight": 1
46
+ }
47
+ ],
48
+ "max_score": 10
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "question_id": "q3",
3
+ "topic": "Agent Execution Pipeline",
4
+ "facts": [
5
+ {
6
+ "id": "f1",
7
+ "description": "Describes the flow from user message to agent response",
8
+ "keywords": ["message", "flow", "pipeline", "request", "response"],
9
+ "weight": 2
10
+ },
11
+ {
12
+ "id": "f2",
13
+ "description": "Explains LangGraph's role in the agent execution",
14
+ "keywords": ["LangGraph", "langgraph", "graph", "state"],
15
+ "weight": 2
16
+ },
17
+ {
18
+ "id": "f3",
19
+ "description": "Describes how tools/MCP servers are integrated",
20
+ "keywords": ["tool", "MCP", "mcp", "server", "integrate"],
21
+ "weight": 2
22
+ },
23
+ {
24
+ "id": "f4",
25
+ "description": "Names specific files in the execution pipeline",
26
+ "keywords": ["file", "agent", "executor", "runner"],
27
+ "weight": 1
28
+ },
29
+ {
30
+ "id": "f5",
31
+ "description": "Describes the agent loop or turn-based execution",
32
+ "keywords": ["loop", "turn", "iteration", "step"],
33
+ "weight": 1
34
+ },
35
+ {
36
+ "id": "f6",
37
+ "description": "Explains how agent state is managed between turns",
38
+ "keywords": ["state", "memory", "context", "history"],
39
+ "weight": 1
40
+ },
41
+ {
42
+ "id": "f7",
43
+ "description": "Names specific classes or functions in the pipeline",
44
+ "keywords": ["class", "function", "agent", "run"],
45
+ "weight": 1
46
+ }
47
+ ],
48
+ "max_score": 10
49
+ }