tenets 0.1.0__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 (139) hide show
  1. tenets-0.1.0/.gitignore +226 -0
  2. tenets-0.1.0/LICENSE +21 -0
  3. tenets-0.1.0/PKG-INFO +414 -0
  4. tenets-0.1.0/README.md +242 -0
  5. tenets-0.1.0/pyproject.toml +448 -0
  6. tenets-0.1.0/tenets/__init__.py +979 -0
  7. tenets-0.1.0/tenets/__main__.py +13 -0
  8. tenets-0.1.0/tenets/cli/__init__.py +27 -0
  9. tenets-0.1.0/tenets/cli/__main__.py +13 -0
  10. tenets-0.1.0/tenets/cli/app.py +243 -0
  11. tenets-0.1.0/tenets/cli/commands/__init__.py +14 -0
  12. tenets-0.1.0/tenets/cli/commands/_utils.py +16 -0
  13. tenets-0.1.0/tenets/cli/commands/chronicle.py +495 -0
  14. tenets-0.1.0/tenets/cli/commands/config.py +667 -0
  15. tenets-0.1.0/tenets/cli/commands/distill.py +596 -0
  16. tenets-0.1.0/tenets/cli/commands/examine.py +642 -0
  17. tenets-0.1.0/tenets/cli/commands/instill.py +776 -0
  18. tenets-0.1.0/tenets/cli/commands/momentum.py +763 -0
  19. tenets-0.1.0/tenets/cli/commands/rank.py +1337 -0
  20. tenets-0.1.0/tenets/cli/commands/session.py +297 -0
  21. tenets-0.1.0/tenets/cli/commands/system_instruction.py +476 -0
  22. tenets-0.1.0/tenets/cli/commands/tenet.py +784 -0
  23. tenets-0.1.0/tenets/cli/commands/viz.py +1144 -0
  24. tenets-0.1.0/tenets/config.py +1685 -0
  25. tenets-0.1.0/tenets/core/__init__.py +47 -0
  26. tenets-0.1.0/tenets/core/analysis/__init__.py +11 -0
  27. tenets-0.1.0/tenets/core/analysis/analyzer.py +1307 -0
  28. tenets-0.1.0/tenets/core/analysis/base.py +201 -0
  29. tenets-0.1.0/tenets/core/analysis/implementations/__init__.py +65 -0
  30. tenets-0.1.0/tenets/core/analysis/implementations/cpp_analyzer.py +1097 -0
  31. tenets-0.1.0/tenets/core/analysis/implementations/csharp_analyzer.py +1533 -0
  32. tenets-0.1.0/tenets/core/analysis/implementations/css_analyzer.py +1305 -0
  33. tenets-0.1.0/tenets/core/analysis/implementations/dart_analyzer.py +1348 -0
  34. tenets-0.1.0/tenets/core/analysis/implementations/gdscript_analyzer.py +946 -0
  35. tenets-0.1.0/tenets/core/analysis/implementations/generic_analyzer.py +1791 -0
  36. tenets-0.1.0/tenets/core/analysis/implementations/go_analyzer.py +1022 -0
  37. tenets-0.1.0/tenets/core/analysis/implementations/html_analyzer.py +910 -0
  38. tenets-0.1.0/tenets/core/analysis/implementations/java_analyzer.py +1017 -0
  39. tenets-0.1.0/tenets/core/analysis/implementations/javascript_analyzer.py +1021 -0
  40. tenets-0.1.0/tenets/core/analysis/implementations/kotlin_analyzer.py +1126 -0
  41. tenets-0.1.0/tenets/core/analysis/implementations/php_analyzer.py +1259 -0
  42. tenets-0.1.0/tenets/core/analysis/implementations/python_analyzer.py +1006 -0
  43. tenets-0.1.0/tenets/core/analysis/implementations/ruby_analyzer.py +1138 -0
  44. tenets-0.1.0/tenets/core/analysis/implementations/rust_analyzer.py +1185 -0
  45. tenets-0.1.0/tenets/core/analysis/implementations/scala_analyzer.py +1211 -0
  46. tenets-0.1.0/tenets/core/analysis/implementations/swift_analyzer.py +1247 -0
  47. tenets-0.1.0/tenets/core/analysis/project_detector.py +339 -0
  48. tenets-0.1.0/tenets/core/distiller/__init__.py +21 -0
  49. tenets-0.1.0/tenets/core/distiller/aggregator.py +410 -0
  50. tenets-0.1.0/tenets/core/distiller/distiller.py +468 -0
  51. tenets-0.1.0/tenets/core/distiller/formatter.py +1485 -0
  52. tenets-0.1.0/tenets/core/distiller/optimizer.py +322 -0
  53. tenets-0.1.0/tenets/core/distiller/transform.py +205 -0
  54. tenets-0.1.0/tenets/core/examiner/__init__.py +282 -0
  55. tenets-0.1.0/tenets/core/examiner/complexity.py +1148 -0
  56. tenets-0.1.0/tenets/core/examiner/examiner.py +767 -0
  57. tenets-0.1.0/tenets/core/examiner/hotspots.py +1914 -0
  58. tenets-0.1.0/tenets/core/examiner/metrics.py +758 -0
  59. tenets-0.1.0/tenets/core/examiner/ownership.py +1003 -0
  60. tenets-0.1.0/tenets/core/git/__init__.py +501 -0
  61. tenets-0.1.0/tenets/core/git/analyzer.py +517 -0
  62. tenets-0.1.0/tenets/core/git/blame.py +977 -0
  63. tenets-0.1.0/tenets/core/git/chronicle.py +1111 -0
  64. tenets-0.1.0/tenets/core/git/stats.py +1132 -0
  65. tenets-0.1.0/tenets/core/instiller/__init__.py +18 -0
  66. tenets-0.1.0/tenets/core/instiller/injector.py +507 -0
  67. tenets-0.1.0/tenets/core/instiller/instiller.py +1419 -0
  68. tenets-0.1.0/tenets/core/instiller/manager.py +649 -0
  69. tenets-0.1.0/tenets/core/momentum/__init__.py +448 -0
  70. tenets-0.1.0/tenets/core/momentum/metrics.py +833 -0
  71. tenets-0.1.0/tenets/core/momentum/tracker.py +1569 -0
  72. tenets-0.1.0/tenets/core/nlp/__init__.py +165 -0
  73. tenets-0.1.0/tenets/core/nlp/bm25.py +572 -0
  74. tenets-0.1.0/tenets/core/nlp/cache.py +194 -0
  75. tenets-0.1.0/tenets/core/nlp/embeddings.py +284 -0
  76. tenets-0.1.0/tenets/core/nlp/keyword_extractor.py +1107 -0
  77. tenets-0.1.0/tenets/core/nlp/ml_utils.py +365 -0
  78. tenets-0.1.0/tenets/core/nlp/programming_patterns.py +493 -0
  79. tenets-0.1.0/tenets/core/nlp/similarity.py +318 -0
  80. tenets-0.1.0/tenets/core/nlp/stopwords.py +235 -0
  81. tenets-0.1.0/tenets/core/nlp/tfidf.py +170 -0
  82. tenets-0.1.0/tenets/core/nlp/tokenizer.py +201 -0
  83. tenets-0.1.0/tenets/core/prompt/__init__.py +354 -0
  84. tenets-0.1.0/tenets/core/prompt/cache.py +494 -0
  85. tenets-0.1.0/tenets/core/prompt/entity_recognizer.py +950 -0
  86. tenets-0.1.0/tenets/core/prompt/external_sources.py +30 -0
  87. tenets-0.1.0/tenets/core/prompt/intent_detector.py +941 -0
  88. tenets-0.1.0/tenets/core/prompt/normalizer.py +111 -0
  89. tenets-0.1.0/tenets/core/prompt/parser.py +1584 -0
  90. tenets-0.1.0/tenets/core/prompt/temporal_parser.py +1014 -0
  91. tenets-0.1.0/tenets/core/ranking/__init__.py +304 -0
  92. tenets-0.1.0/tenets/core/ranking/factors.py +525 -0
  93. tenets-0.1.0/tenets/core/ranking/ranker.py +881 -0
  94. tenets-0.1.0/tenets/core/ranking/strategies.py +958 -0
  95. tenets-0.1.0/tenets/core/reporting/__init__.py +653 -0
  96. tenets-0.1.0/tenets/core/reporting/generator.py +1506 -0
  97. tenets-0.1.0/tenets/core/reporting/html_reporter.py +1419 -0
  98. tenets-0.1.0/tenets/core/reporting/markdown_reporter.py +726 -0
  99. tenets-0.1.0/tenets/core/reporting/visualizer.py +1056 -0
  100. tenets-0.1.0/tenets/core/session/__init__.py +1 -0
  101. tenets-0.1.0/tenets/core/session/session.py +99 -0
  102. tenets-0.1.0/tenets/core/summarizer/__init__.py +409 -0
  103. tenets-0.1.0/tenets/core/summarizer/llm.py +472 -0
  104. tenets-0.1.0/tenets/core/summarizer/strategies.py +837 -0
  105. tenets-0.1.0/tenets/core/summarizer/summarizer.py +1691 -0
  106. tenets-0.1.0/tenets/data/pattterns/entity_patterns.json +1317 -0
  107. tenets-0.1.0/tenets/data/pattterns/external_patterns.json +673 -0
  108. tenets-0.1.0/tenets/data/pattterns/intent_patterns.json +378 -0
  109. tenets-0.1.0/tenets/data/pattterns/programming_patterns.json +417 -0
  110. tenets-0.1.0/tenets/data/pattterns/temporal_patterns.json +751 -0
  111. tenets-0.1.0/tenets/data/stopwords/minimal.txt +48 -0
  112. tenets-0.1.0/tenets/data/stopwords/prompt_aggressive.txt +369 -0
  113. tenets-0.1.0/tenets/models/__init__.py +85 -0
  114. tenets-0.1.0/tenets/models/analysis.py +1100 -0
  115. tenets-0.1.0/tenets/models/context.py +490 -0
  116. tenets-0.1.0/tenets/models/llm.py +143 -0
  117. tenets-0.1.0/tenets/models/summary.py +436 -0
  118. tenets-0.1.0/tenets/models/tenet.py +340 -0
  119. tenets-0.1.0/tenets/storage/__init__.py +19 -0
  120. tenets-0.1.0/tenets/storage/cache.py +436 -0
  121. tenets-0.1.0/tenets/storage/session_db.py +284 -0
  122. tenets-0.1.0/tenets/storage/sqlite.py +131 -0
  123. tenets-0.1.0/tenets/utils/__init__.py +16 -0
  124. tenets-0.1.0/tenets/utils/external_sources.py +895 -0
  125. tenets-0.1.0/tenets/utils/logger.py +177 -0
  126. tenets-0.1.0/tenets/utils/multiprocessing.py +147 -0
  127. tenets-0.1.0/tenets/utils/scanner.py +431 -0
  128. tenets-0.1.0/tenets/utils/timing.py +650 -0
  129. tenets-0.1.0/tenets/utils/tokens.py +296 -0
  130. tenets-0.1.0/tenets/viz/__init__.py +686 -0
  131. tenets-0.1.0/tenets/viz/base.py +737 -0
  132. tenets-0.1.0/tenets/viz/complexity.py +442 -0
  133. tenets-0.1.0/tenets/viz/contributors.py +438 -0
  134. tenets-0.1.0/tenets/viz/coupling.py +459 -0
  135. tenets-0.1.0/tenets/viz/dependencies.py +528 -0
  136. tenets-0.1.0/tenets/viz/displays.py +423 -0
  137. tenets-0.1.0/tenets/viz/graph_generator.py +929 -0
  138. tenets-0.1.0/tenets/viz/hotspots.py +414 -0
  139. tenets-0.1.0/tenets/viz/momentum.py +439 -0
@@ -0,0 +1,226 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ MagicMock/
42
+ mock.cache_dir/
43
+ mock_*/
44
+ *.cache_dir/
45
+ .tenets.yml
46
+ .tox/
47
+ .nox/
48
+ .coverage
49
+ .coverage.*
50
+ .cache
51
+ nosetests.xml
52
+ coverage.xml
53
+ junit.xml
54
+ *.cover
55
+ *.py.cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Examination reports and outputs
61
+ examination_report.html
62
+ examination_report.json
63
+ examination_report.md
64
+ examination_report*.html
65
+ examination_report*.json
66
+ examination_report*.md
67
+ *_report.html
68
+ *_report.json
69
+
70
+ # Translations
71
+ *.mo
72
+ *.pot
73
+
74
+ # Django stuff:
75
+ *.log
76
+ local_settings.py
77
+ db.sqlite3
78
+ db.sqlite3-journal
79
+
80
+ # Flask stuff:
81
+ instance/
82
+ .webassets-cache
83
+
84
+ # Scrapy stuff:
85
+ .scrapy
86
+
87
+ # Sphinx documentation
88
+ docs/_build/
89
+
90
+ # PyBuilder
91
+ .pybuilder/
92
+ target/
93
+
94
+ # Jupyter Notebook
95
+ .ipynb_checkpoints
96
+
97
+ # IPython
98
+ profile_default/
99
+ ipython_config.py
100
+
101
+ # pyenv
102
+ # For a library or package, you might want to ignore these files since the code is
103
+ # intended to run in multiple environments; otherwise, check them in:
104
+ # .python-version
105
+
106
+ # pipenv
107
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
108
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
109
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
110
+ # install all needed dependencies.
111
+ #Pipfile.lock
112
+
113
+ # UV
114
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
115
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
116
+ # commonly ignored for libraries.
117
+ #uv.lock
118
+
119
+ # poetry
120
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
121
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
122
+ # commonly ignored for libraries.
123
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
124
+ #poetry.lock
125
+ #poetry.toml
126
+
127
+ # pdm
128
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
129
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
130
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
131
+ #pdm.lock
132
+ #pdm.toml
133
+ .pdm-python
134
+ .pdm-build/
135
+
136
+ # pixi
137
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
138
+ #pixi.lock
139
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
140
+ # in the .venv directory. It is recommended not to include this directory in version control.
141
+ .pixi
142
+
143
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
144
+ __pypackages__/
145
+
146
+ # Celery stuff
147
+ celerybeat-schedule
148
+ celerybeat.pid
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ #.idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ .vscode/
206
+
207
+ # Ruff stuff:
208
+ .ruff_cache/
209
+
210
+ # PyPI configuration file
211
+ .pypirc
212
+
213
+ # Cursor
214
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
215
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
216
+ # refer to https://docs.cursor.com/context/ignore-files
217
+ .cursorignore
218
+ .cursorindexingignore
219
+
220
+ # Marimo
221
+ marimo/_static/
222
+ marimo/_lsp/
223
+ __marimo__/
224
+
225
+ # Claude
226
+ .claude/
tenets-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 Johnny Dunn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
tenets-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,414 @@
1
+ Metadata-Version: 2.4
2
+ Name: tenets
3
+ Version: 0.1.0
4
+ Summary: AI-native code exploration and context management platform
5
+ Project-URL: Homepage, https://github.com/jddunn/tenets
6
+ Project-URL: Documentation, https://docs.tenets.dev
7
+ Project-URL: Repository, https://github.com/jddunn/tenets
8
+ Project-URL: Issues, https://github.com/jddunn/tenets/issues
9
+ Project-URL: Changelog, https://github.com/jddunn/tenets/blob/main/CHANGELOG.md
10
+ Author-email: Tenets Team <team@tenets.dev>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: ai,code-analysis,code-intelligence,context-management,developer-tools,llm,prompt-engineering
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: Software Development :: Code Generators
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Classifier: Topic :: Software Development :: Quality Assurance
27
+ Requires-Python: >=3.9
28
+ Requires-Dist: aiofiles>=23.0.0
29
+ Requires-Dist: chardet>=5.0.0
30
+ Requires-Dist: click>=8.1.0
31
+ Requires-Dist: gitpython>=3.1.0
32
+ Requires-Dist: httpx>=0.25.0
33
+ Requires-Dist: numpy>=1.24.0
34
+ Requires-Dist: pathspec>=0.11.0
35
+ Requires-Dist: psutil>=5.9.0
36
+ Requires-Dist: pydantic-settings>=2.0.0
37
+ Requires-Dist: pydantic>=2.0.0
38
+ Requires-Dist: pyyaml>=6.0
39
+ Requires-Dist: rich>=13.0.0
40
+ Requires-Dist: tqdm>=4.65.0
41
+ Requires-Dist: typer>=0.9.0
42
+ Provides-Extra: all
43
+ Requires-Dist: alembic>=1.12.0; extra == 'all'
44
+ Requires-Dist: anthropic>=0.25.0; extra == 'all'
45
+ Requires-Dist: diskcache>=5.6.0; extra == 'all'
46
+ Requires-Dist: faiss-cpu>=1.7.4; extra == 'all'
47
+ Requires-Dist: fastapi>=0.100.0; extra == 'all'
48
+ Requires-Dist: graphviz>=0.20.0; extra == 'all'
49
+ Requires-Dist: huggingface-hub>=0.19.0; extra == 'all'
50
+ Requires-Dist: jinja2>=3.1.0; extra == 'all'
51
+ Requires-Dist: litellm>=1.0.0; extra == 'all'
52
+ Requires-Dist: matplotlib>=3.7.0; extra == 'all'
53
+ Requires-Dist: networkx>=3.0; extra == 'all'
54
+ Requires-Dist: nltk>=3.8.0; extra == 'all'
55
+ Requires-Dist: openai>=1.0.0; extra == 'all'
56
+ Requires-Dist: plotly>=5.0.0; extra == 'all'
57
+ Requires-Dist: pydot>=1.4.0; extra == 'all'
58
+ Requires-Dist: python-multipart>=0.0.6; extra == 'all'
59
+ Requires-Dist: rake-nltk>=1.0.6; extra == 'all'
60
+ Requires-Dist: redis>=5.0.0; extra == 'all'
61
+ Requires-Dist: scikit-learn>=1.3.0; extra == 'all'
62
+ Requires-Dist: sentence-transformers>=2.2.0; extra == 'all'
63
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'all'
64
+ Requires-Dist: sse-starlette>=1.6.0; extra == 'all'
65
+ Requires-Dist: textstat>=0.7.3; extra == 'all'
66
+ Requires-Dist: tiktoken>=0.5.0; extra == 'all'
67
+ Requires-Dist: torch>=2.0.0; extra == 'all'
68
+ Requires-Dist: transformers>=4.30.0; extra == 'all'
69
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == 'all'
70
+ Requires-Dist: websockets>=11.0; extra == 'all'
71
+ Requires-Dist: yake>=0.4.8; extra == 'all'
72
+ Provides-Extra: db
73
+ Requires-Dist: alembic>=1.12.0; extra == 'db'
74
+ Requires-Dist: diskcache>=5.6.0; extra == 'db'
75
+ Requires-Dist: redis>=5.0.0; extra == 'db'
76
+ Requires-Dist: sqlalchemy>=2.0.0; extra == 'db'
77
+ Provides-Extra: dev
78
+ Requires-Dist: autoflake>=2.2.0; extra == 'dev'
79
+ Requires-Dist: bandit[toml]>=1.7.5; extra == 'dev'
80
+ Requires-Dist: black>=23.0.0; extra == 'dev'
81
+ Requires-Dist: build>=1.0.0; extra == 'dev'
82
+ Requires-Dist: commitizen>=3.12.0; extra == 'dev'
83
+ Requires-Dist: coverage-badge>=1.1.0; extra == 'dev'
84
+ Requires-Dist: coverage>=7.3.0; extra == 'dev'
85
+ Requires-Dist: faker>=19.0.0; extra == 'dev'
86
+ Requires-Dist: freezegun>=1.2.0; extra == 'dev'
87
+ Requires-Dist: hypothesis>=6.82.0; extra == 'dev'
88
+ Requires-Dist: isort>=5.12.0; extra == 'dev'
89
+ Requires-Dist: mike>=2.0.0; extra == 'dev'
90
+ Requires-Dist: mkdocs-autorefs>=1.0.0; extra == 'dev'
91
+ Requires-Dist: mkdocs-awesome-pages-plugin>=2.9.0; extra == 'dev'
92
+ Requires-Dist: mkdocs-gen-files>=0.5.0; extra == 'dev'
93
+ Requires-Dist: mkdocs-git-authors-plugin>=0.7.0; extra == 'dev'
94
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.2.0; extra == 'dev'
95
+ Requires-Dist: mkdocs-jupyter>=0.24.0; extra == 'dev'
96
+ Requires-Dist: mkdocs-literate-nav>=0.6.0; extra == 'dev'
97
+ Requires-Dist: mkdocs-macros-plugin>=0.9.0; extra == 'dev'
98
+ Requires-Dist: mkdocs-material[imaging]>=9.5.0; extra == 'dev'
99
+ Requires-Dist: mkdocs-mermaid2-plugin>=1.1.0; extra == 'dev'
100
+ Requires-Dist: mkdocs-minify-plugin>=0.8.0; extra == 'dev'
101
+ Requires-Dist: mkdocs-section-index>=0.3.0; extra == 'dev'
102
+ Requires-Dist: mkdocs>=1.5.0; extra == 'dev'
103
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'dev'
104
+ Requires-Dist: mypy>=1.5.0; extra == 'dev'
105
+ Requires-Dist: pip-tools>=7.3.0; extra == 'dev'
106
+ Requires-Dist: pre-commit>=3.4.0; extra == 'dev'
107
+ Requires-Dist: pyinstaller>=6.0.0; extra == 'dev'
108
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
109
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
110
+ Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
111
+ Requires-Dist: pytest-timeout>=2.2.0; extra == 'dev'
112
+ Requires-Dist: pytest-xdist>=3.3.0; extra == 'dev'
113
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
114
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
115
+ Requires-Dist: safety>=2.3.0; extra == 'dev'
116
+ Requires-Dist: twine>=4.0.0; extra == 'dev'
117
+ Requires-Dist: wheel>=0.41.0; extra == 'dev'
118
+ Provides-Extra: docs
119
+ Requires-Dist: mike>=2.0.0; extra == 'docs'
120
+ Requires-Dist: mkdocs-awesome-pages-plugin>=2.9.0; extra == 'docs'
121
+ Requires-Dist: mkdocs-gen-files>=0.5.0; extra == 'docs'
122
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin>=1.2.0; extra == 'docs'
123
+ Requires-Dist: mkdocs-literate-nav>=0.6.0; extra == 'docs'
124
+ Requires-Dist: mkdocs-material[imaging]>=9.5.0; extra == 'docs'
125
+ Requires-Dist: mkdocs-minify-plugin>=0.7.0; extra == 'docs'
126
+ Requires-Dist: mkdocs-redirects>=1.2.0; extra == 'docs'
127
+ Requires-Dist: mkdocs-section-index>=0.3.0; extra == 'docs'
128
+ Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
129
+ Requires-Dist: mkdocstrings[python]>=0.23.0; extra == 'docs'
130
+ Requires-Dist: pymdown-extensions>=10.0; extra == 'docs'
131
+ Provides-Extra: light
132
+ Requires-Dist: nltk>=3.8.0; extra == 'light'
133
+ Requires-Dist: rake-nltk>=1.0.6; extra == 'light'
134
+ Requires-Dist: scikit-learn>=1.3.0; extra == 'light'
135
+ Requires-Dist: textstat>=0.7.3; extra == 'light'
136
+ Requires-Dist: yake>=0.4.8; extra == 'light'
137
+ Provides-Extra: ml
138
+ Requires-Dist: anthropic>=0.25.0; extra == 'ml'
139
+ Requires-Dist: faiss-cpu>=1.7.4; extra == 'ml'
140
+ Requires-Dist: huggingface-hub>=0.19.0; extra == 'ml'
141
+ Requires-Dist: litellm>=1.0.0; extra == 'ml'
142
+ Requires-Dist: openai>=1.0.0; extra == 'ml'
143
+ Requires-Dist: sentence-transformers>=2.2.0; extra == 'ml'
144
+ Requires-Dist: tiktoken>=0.5.0; extra == 'ml'
145
+ Requires-Dist: torch>=2.0.0; extra == 'ml'
146
+ Requires-Dist: transformers>=4.30.0; extra == 'ml'
147
+ Provides-Extra: test
148
+ Requires-Dist: faker>=20.0.0; extra == 'test'
149
+ Requires-Dist: hypothesis>=6.92.0; extra == 'test'
150
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
151
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'test'
152
+ Requires-Dist: pytest-mock>=3.12.0; extra == 'test'
153
+ Requires-Dist: pytest-timeout>=2.2.0; extra == 'test'
154
+ Requires-Dist: pytest-xdist>=3.3.0; extra == 'test'
155
+ Requires-Dist: pytest>=7.4.0; extra == 'test'
156
+ Requires-Dist: responses>=0.24.0; extra == 'test'
157
+ Requires-Dist: tiktoken>=0.5.0; extra == 'test'
158
+ Provides-Extra: viz
159
+ Requires-Dist: graphviz>=0.20.0; extra == 'viz'
160
+ Requires-Dist: matplotlib>=3.7.0; extra == 'viz'
161
+ Requires-Dist: networkx>=3.0; extra == 'viz'
162
+ Requires-Dist: plotly>=5.0.0; extra == 'viz'
163
+ Requires-Dist: pydot>=1.4.0; extra == 'viz'
164
+ Provides-Extra: web
165
+ Requires-Dist: fastapi>=0.100.0; extra == 'web'
166
+ Requires-Dist: jinja2>=3.1.0; extra == 'web'
167
+ Requires-Dist: python-multipart>=0.0.6; extra == 'web'
168
+ Requires-Dist: sse-starlette>=1.6.0; extra == 'web'
169
+ Requires-Dist: uvicorn[standard]>=0.23.0; extra == 'web'
170
+ Requires-Dist: websockets>=11.0; extra == 'web'
171
+ Description-Content-Type: text/markdown
172
+
173
+ # **tenets**
174
+
175
+ <a href="https://tenets.dev"><img src="https://raw.githubusercontent.com/jddunn/tenets/master/docs/logos/tenets_dark_icon_transparent.png" alt="tenets logo" width="140" /></a>
176
+
177
+ **context that feeds your prompts.**
178
+
179
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
180
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
181
+ [![PyPI version](https://badge.fury.io/py/tenets.svg)](https://pypi.org/project/tenets/)
182
+ [![CI](https://github.com/jddunn/tenets/actions/workflows/ci.yml/badge.svg)](https://github.com/jddunn/tenets/actions/workflows/ci.yml)
183
+ [![codecov](https://codecov.io/gh/jddunn/tenets/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/jddunn/tenets)
184
+ [![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://tenets.dev/docs)
185
+
186
+ **tenets** automatically finds and builds the most relevant context from your codebase. Instead of manually copying files or searching for documentation, tenets intelligently aggregates exactly what you need for debugging, building features, or chatting with AI assistants.
187
+
188
+ ## What is tenets?
189
+
190
+ Intelligent context aggregation that:
191
+
192
+ - **Finds** all relevant files automatically
193
+ - **Ranks** them by importance using multiple factors
194
+ - **Aggregates** them within your token budget
195
+ - **Formats** perfectly for any use case
196
+ - **Pins** critical files per session for guaranteed inclusion
197
+ - **Injects** your tenets (guiding principles) into session interactions automatically in prompts
198
+ - **Transforms** content on demand (strip comments, condense whitespace, or force full raw context)
199
+
200
+ ## Installation
201
+
202
+ ```bash
203
+ # Core features only - lightweight, no ML dependencies
204
+ pip install tenets
205
+
206
+ # Add specific features
207
+ pip install tenets[light] # Adds keyword extraction & BM25/TF-IDF ranking
208
+ pip install tenets[viz] # Adds visualization capabilities
209
+ pip install tenets[ml] # Adds deep learning models (2GB+)
210
+ pip install tenets[all] # Everything
211
+ ```
212
+
213
+ **Python 3.13 Note:** Compatible but some ML features have limitations. Use Python 3.12 for full ML support.
214
+
215
+ ## Quick Start
216
+
217
+ ### Three Ranking Modes
218
+
219
+ Tenets offers three modes that balance speed vs. accuracy for both `distill` and `rank` commands:
220
+
221
+ | Mode | Speed | Accuracy | Use Case | What It Does |
222
+ | ------------ | ----------- | -------- | ------------------------ | ------------------------------------------------------------ |
223
+ | **fast** | Fastest | Good | Quick exploration | Keyword & path matching, basic relevance |
224
+ | **balanced** | 1.5x slower | Better | Most use cases (default) | BM25 scoring, keyword extraction, structure analysis |
225
+ | **thorough** | 4x slower | Best | Complex refactoring | ML semantic similarity, pattern detection, dependency graphs |
226
+
227
+ ### Core Commands
228
+
229
+ #### `distill` - Build Context with Content
230
+
231
+ ```bash
232
+ # Basic usage - finds and aggregates relevant files
233
+ tenets distill "implement OAuth2" ./src
234
+
235
+ # Copy to clipboard (great for AI chats)
236
+ tenets distill "fix payment bug" --copy
237
+
238
+ # Generate interactive HTML report
239
+ tenets distill "analyze auth flow" --format html -o report.html
240
+
241
+ # Speed/accuracy trade-offs
242
+ tenets distill "debug issue" --mode fast # <5s, keyword matching
243
+ tenets distill "refactor API" --mode thorough # Semantic analysis
244
+
245
+ # Transform content to save tokens
246
+ tenets distill "review code" --remove-comments --condense
247
+ ```
248
+
249
+ #### `rank` - Preview Files Without Content
250
+
251
+ ```bash
252
+ # See what files would be included (much faster than distill!)
253
+ tenets rank "implement payments" --top 20
254
+
255
+ # Understand WHY files are ranked
256
+ tenets rank "fix auth" --factors
257
+
258
+ # Tree view for structure understanding
259
+ tenets rank "add caching" --tree --scores
260
+
261
+ # Export for automation
262
+ tenets rank "database migration" --format json | jq '.files[].path'
263
+ ```
264
+
265
+ **Why use `rank` instead of `distill`?**
266
+
267
+ - **Preview**: See what files would be included before generating full context
268
+ - **Performance**: Much faster - no file reading or content processing
269
+ - **Automation**: Export file lists for CI/CD or custom scripts
270
+ - **Understanding**: See ranking factors to understand WHY files are relevant
271
+ - **Planning**: Identify key files before making changes
272
+
273
+ ### Sessions & Persistence
274
+
275
+ ```bash
276
+ # Create a working session
277
+ tenets session create payment-feature
278
+
279
+ # Pin critical files for the session
280
+ tenets instill --session payment-feature --add-file src/core/payment.py
281
+
282
+ # Add guiding principles (tenets)
283
+ tenets tenet add "Always validate inputs" --priority critical
284
+ tenets instill --session payment-feature
285
+
286
+ # Build context using the session
287
+ tenets distill "add refund flow" --session payment-feature
288
+ ```
289
+
290
+ ### Other Commands
291
+
292
+ ```bash
293
+ # Visualize architecture
294
+ tenets viz deps --output architecture.svg # Dependency graph
295
+ tenets viz deps --format html -o deps.html # Interactive HTML
296
+
297
+ # Track development patterns
298
+ tenets chronicle --since "last week" # Git activity
299
+ tenets momentum --team # Sprint velocity
300
+
301
+ # Analyze codebase
302
+ tenets examine . --complexity --threshold 10 # Find complex code
303
+ ```
304
+
305
+ ## Configuration
306
+
307
+ Create `.tenets.yml` in your project:
308
+
309
+ ```yaml
310
+ ranking:
311
+ algorithm: balanced # fast | balanced | thorough
312
+ threshold: 0.1
313
+ use_git: true # Use git signals for relevance
314
+
315
+ context:
316
+ max_tokens: 100000
317
+
318
+ output:
319
+ format: markdown
320
+ copy_on_distill: true # Auto-copy to clipboard
321
+
322
+ ignore:
323
+ - vendor/
324
+ - '*.generated.*'
325
+ ```
326
+
327
+ ## Documentation
328
+
329
+ - **[Full Documentation](https://tenets.dev/docs)** - Complete guide and API reference
330
+ - **[CLI Reference](docs/CLI.md)** - All commands and options
331
+ - **[Configuration Guide](docs/CONFIG.md)** - Detailed configuration options
332
+ - **[Architecture Overview](docs/ARCHITECTURE.md)** - How tenets works internally
333
+
334
+ ### Smart Summarization
335
+
336
+ When files exceed token budgets, tenets intelligently preserves:
337
+
338
+ - Function/class signatures
339
+ - Import statements
340
+ - Complex logic blocks
341
+ - Documentation and comments
342
+ - Recent changes
343
+
344
+ For more details on the summarization system, see [Architecture Documentation](docs/ARCHITECTURE.md).
345
+
346
+ ## Advanced Features
347
+
348
+ ### Test File Handling
349
+
350
+ Tests are **excluded by default** for most prompts, **automatically included** when your prompt mentions testing:
351
+
352
+ ```bash
353
+ # Tests excluded (better context):
354
+ tenets distill "explain auth flow"
355
+
356
+ # Tests included (detected by intent):
357
+ tenets distill "write tests for auth"
358
+ tenets distill "fix failing tests"
359
+
360
+ # Manual override:
361
+ tenets distill "review code" --include-tests
362
+ tenets distill "fix test_user.py" --exclude-tests
363
+ ```
364
+
365
+ ### Output Formats
366
+
367
+ ```bash
368
+ # Markdown (default, optimized for AI)
369
+ tenets distill "implement OAuth2" --format markdown
370
+
371
+ # Interactive HTML with search, charts, copy buttons
372
+ tenets distill "review API" --format html -o report.html
373
+
374
+ # JSON for programmatic use
375
+ tenets distill "analyze" --format json | jq '.files[0]'
376
+
377
+ # XML optimized for Claude
378
+ tenets distill "debug issue" --format xml
379
+ ```
380
+
381
+ ## Python API
382
+
383
+ ```python
384
+ from tenets import Tenets
385
+
386
+ # Initialize
387
+ tenets = Tenets()
388
+
389
+ # Basic usage
390
+ result = tenets.distill("implement user authentication")
391
+ print(f"Generated {result.token_count} tokens")
392
+
393
+ # Rank files without content
394
+ from tenets.core.ranking import RelevanceRanker
395
+ ranker = RelevanceRanker(algorithm="balanced")
396
+ ranked_files = ranker.rank(files, prompt_context, threshold=0.1)
397
+
398
+ for file in ranked_files[:10]:
399
+ print(f"{file.path}: {file.relevance_score:.3f}")
400
+ ```
401
+
402
+ ## Supported Languages
403
+
404
+ Specialized analyzers for Python, JavaScript/TypeScript, Go, Java, C/C++, Ruby, PHP, Rust, and more. Configuration and documentation files are analyzed with smart heuristics for YAML, TOML, JSON, Markdown, etc.
405
+
406
+ ## Contributing
407
+
408
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
409
+
410
+ ## License
411
+
412
+ MIT License - see [LICENSE](LICENSE) for details.
413
+
414
+ ---