tenets 0.5.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 (142) hide show
  1. tenets-0.5.0/.gitignore +226 -0
  2. tenets-0.5.0/LICENSE +21 -0
  3. tenets-0.5.0/PKG-INFO +471 -0
  4. tenets-0.5.0/README.md +293 -0
  5. tenets-0.5.0/pyproject.toml +457 -0
  6. tenets-0.5.0/tenets/__init__.py +979 -0
  7. tenets-0.5.0/tenets/__main__.py +13 -0
  8. tenets-0.5.0/tenets/cli/__init__.py +27 -0
  9. tenets-0.5.0/tenets/cli/__main__.py +13 -0
  10. tenets-0.5.0/tenets/cli/app.py +243 -0
  11. tenets-0.5.0/tenets/cli/commands/__init__.py +14 -0
  12. tenets-0.5.0/tenets/cli/commands/_utils.py +16 -0
  13. tenets-0.5.0/tenets/cli/commands/chronicle.py +495 -0
  14. tenets-0.5.0/tenets/cli/commands/config.py +667 -0
  15. tenets-0.5.0/tenets/cli/commands/distill.py +619 -0
  16. tenets-0.5.0/tenets/cli/commands/examine.py +642 -0
  17. tenets-0.5.0/tenets/cli/commands/instill.py +776 -0
  18. tenets-0.5.0/tenets/cli/commands/momentum.py +763 -0
  19. tenets-0.5.0/tenets/cli/commands/rank.py +1356 -0
  20. tenets-0.5.0/tenets/cli/commands/session.py +297 -0
  21. tenets-0.5.0/tenets/cli/commands/system_instruction.py +476 -0
  22. tenets-0.5.0/tenets/cli/commands/tenet.py +784 -0
  23. tenets-0.5.0/tenets/cli/commands/viz.py +1144 -0
  24. tenets-0.5.0/tenets/config.py +1688 -0
  25. tenets-0.5.0/tenets/core/__init__.py +47 -0
  26. tenets-0.5.0/tenets/core/analysis/__init__.py +11 -0
  27. tenets-0.5.0/tenets/core/analysis/analyzer.py +1307 -0
  28. tenets-0.5.0/tenets/core/analysis/base.py +201 -0
  29. tenets-0.5.0/tenets/core/analysis/implementations/__init__.py +65 -0
  30. tenets-0.5.0/tenets/core/analysis/implementations/cpp_analyzer.py +1097 -0
  31. tenets-0.5.0/tenets/core/analysis/implementations/csharp_analyzer.py +1533 -0
  32. tenets-0.5.0/tenets/core/analysis/implementations/css_analyzer.py +1305 -0
  33. tenets-0.5.0/tenets/core/analysis/implementations/dart_analyzer.py +1348 -0
  34. tenets-0.5.0/tenets/core/analysis/implementations/gdscript_analyzer.py +946 -0
  35. tenets-0.5.0/tenets/core/analysis/implementations/generic_analyzer.py +1791 -0
  36. tenets-0.5.0/tenets/core/analysis/implementations/go_analyzer.py +1022 -0
  37. tenets-0.5.0/tenets/core/analysis/implementations/html_analyzer.py +910 -0
  38. tenets-0.5.0/tenets/core/analysis/implementations/java_analyzer.py +1017 -0
  39. tenets-0.5.0/tenets/core/analysis/implementations/javascript_analyzer.py +1021 -0
  40. tenets-0.5.0/tenets/core/analysis/implementations/kotlin_analyzer.py +1126 -0
  41. tenets-0.5.0/tenets/core/analysis/implementations/php_analyzer.py +1259 -0
  42. tenets-0.5.0/tenets/core/analysis/implementations/python_analyzer.py +1006 -0
  43. tenets-0.5.0/tenets/core/analysis/implementations/ruby_analyzer.py +1138 -0
  44. tenets-0.5.0/tenets/core/analysis/implementations/rust_analyzer.py +1185 -0
  45. tenets-0.5.0/tenets/core/analysis/implementations/scala_analyzer.py +1211 -0
  46. tenets-0.5.0/tenets/core/analysis/implementations/swift_analyzer.py +1247 -0
  47. tenets-0.5.0/tenets/core/analysis/project_detector.py +339 -0
  48. tenets-0.5.0/tenets/core/distiller/__init__.py +21 -0
  49. tenets-0.5.0/tenets/core/distiller/aggregator.py +410 -0
  50. tenets-0.5.0/tenets/core/distiller/distiller.py +468 -0
  51. tenets-0.5.0/tenets/core/distiller/formatter.py +1485 -0
  52. tenets-0.5.0/tenets/core/distiller/optimizer.py +322 -0
  53. tenets-0.5.0/tenets/core/distiller/transform.py +205 -0
  54. tenets-0.5.0/tenets/core/examiner/__init__.py +282 -0
  55. tenets-0.5.0/tenets/core/examiner/complexity.py +1148 -0
  56. tenets-0.5.0/tenets/core/examiner/examiner.py +767 -0
  57. tenets-0.5.0/tenets/core/examiner/hotspots.py +1914 -0
  58. tenets-0.5.0/tenets/core/examiner/metrics.py +758 -0
  59. tenets-0.5.0/tenets/core/examiner/ownership.py +1003 -0
  60. tenets-0.5.0/tenets/core/git/__init__.py +501 -0
  61. tenets-0.5.0/tenets/core/git/analyzer.py +517 -0
  62. tenets-0.5.0/tenets/core/git/blame.py +977 -0
  63. tenets-0.5.0/tenets/core/git/chronicle.py +1111 -0
  64. tenets-0.5.0/tenets/core/git/stats.py +1132 -0
  65. tenets-0.5.0/tenets/core/instiller/__init__.py +18 -0
  66. tenets-0.5.0/tenets/core/instiller/injector.py +507 -0
  67. tenets-0.5.0/tenets/core/instiller/instiller.py +1419 -0
  68. tenets-0.5.0/tenets/core/instiller/manager.py +649 -0
  69. tenets-0.5.0/tenets/core/momentum/__init__.py +448 -0
  70. tenets-0.5.0/tenets/core/momentum/metrics.py +833 -0
  71. tenets-0.5.0/tenets/core/momentum/tracker.py +1569 -0
  72. tenets-0.5.0/tenets/core/nlp/__init__.py +165 -0
  73. tenets-0.5.0/tenets/core/nlp/bm25.py +572 -0
  74. tenets-0.5.0/tenets/core/nlp/cache.py +194 -0
  75. tenets-0.5.0/tenets/core/nlp/embeddings.py +284 -0
  76. tenets-0.5.0/tenets/core/nlp/keyword_extractor.py +1107 -0
  77. tenets-0.5.0/tenets/core/nlp/ml_utils.py +365 -0
  78. tenets-0.5.0/tenets/core/nlp/programming_patterns.py +493 -0
  79. tenets-0.5.0/tenets/core/nlp/similarity.py +318 -0
  80. tenets-0.5.0/tenets/core/nlp/stopwords.py +235 -0
  81. tenets-0.5.0/tenets/core/nlp/tfidf.py +170 -0
  82. tenets-0.5.0/tenets/core/nlp/tokenizer.py +201 -0
  83. tenets-0.5.0/tenets/core/prompt/__init__.py +354 -0
  84. tenets-0.5.0/tenets/core/prompt/cache.py +494 -0
  85. tenets-0.5.0/tenets/core/prompt/entity_recognizer.py +950 -0
  86. tenets-0.5.0/tenets/core/prompt/external_sources.py +30 -0
  87. tenets-0.5.0/tenets/core/prompt/intent_detector.py +941 -0
  88. tenets-0.5.0/tenets/core/prompt/normalizer.py +111 -0
  89. tenets-0.5.0/tenets/core/prompt/parser.py +1584 -0
  90. tenets-0.5.0/tenets/core/prompt/temporal_parser.py +1014 -0
  91. tenets-0.5.0/tenets/core/ranking/__init__.py +304 -0
  92. tenets-0.5.0/tenets/core/ranking/factors.py +525 -0
  93. tenets-0.5.0/tenets/core/ranking/ranker.py +967 -0
  94. tenets-0.5.0/tenets/core/ranking/strategies.py +1014 -0
  95. tenets-0.5.0/tenets/core/reporting/__init__.py +653 -0
  96. tenets-0.5.0/tenets/core/reporting/generator.py +1506 -0
  97. tenets-0.5.0/tenets/core/reporting/html_reporter.py +1419 -0
  98. tenets-0.5.0/tenets/core/reporting/markdown_reporter.py +726 -0
  99. tenets-0.5.0/tenets/core/reporting/visualizer.py +1056 -0
  100. tenets-0.5.0/tenets/core/session/__init__.py +1 -0
  101. tenets-0.5.0/tenets/core/session/session.py +99 -0
  102. tenets-0.5.0/tenets/core/summarizer/__init__.py +407 -0
  103. tenets-0.5.0/tenets/core/summarizer/llm.py +472 -0
  104. tenets-0.5.0/tenets/core/summarizer/strategies.py +837 -0
  105. tenets-0.5.0/tenets/core/summarizer/summarizer.py +1657 -0
  106. tenets-0.5.0/tenets/core/summarizer/summarizer_utils.py +481 -0
  107. tenets-0.5.0/tenets/data/patterns/entity_patterns.json +1317 -0
  108. tenets-0.5.0/tenets/data/patterns/external_patterns.json +673 -0
  109. tenets-0.5.0/tenets/data/patterns/intent_patterns.json +378 -0
  110. tenets-0.5.0/tenets/data/patterns/programming_patterns.json +417 -0
  111. tenets-0.5.0/tenets/data/patterns/temporal_patterns.json +744 -0
  112. tenets-0.5.0/tenets/data/stopwords/minimal.txt +48 -0
  113. tenets-0.5.0/tenets/data/stopwords/prompt_aggressive.txt +369 -0
  114. tenets-0.5.0/tenets/mcp/__init__.py +56 -0
  115. tenets-0.5.0/tenets/mcp/server.py +771 -0
  116. tenets-0.5.0/tenets/models/__init__.py +85 -0
  117. tenets-0.5.0/tenets/models/analysis.py +1100 -0
  118. tenets-0.5.0/tenets/models/context.py +490 -0
  119. tenets-0.5.0/tenets/models/llm.py +143 -0
  120. tenets-0.5.0/tenets/models/summary.py +436 -0
  121. tenets-0.5.0/tenets/models/tenet.py +340 -0
  122. tenets-0.5.0/tenets/storage/__init__.py +19 -0
  123. tenets-0.5.0/tenets/storage/cache.py +436 -0
  124. tenets-0.5.0/tenets/storage/session_db.py +284 -0
  125. tenets-0.5.0/tenets/storage/sqlite.py +131 -0
  126. tenets-0.5.0/tenets/utils/__init__.py +16 -0
  127. tenets-0.5.0/tenets/utils/external_sources.py +895 -0
  128. tenets-0.5.0/tenets/utils/logger.py +177 -0
  129. tenets-0.5.0/tenets/utils/multiprocessing.py +147 -0
  130. tenets-0.5.0/tenets/utils/scanner.py +431 -0
  131. tenets-0.5.0/tenets/utils/timing.py +650 -0
  132. tenets-0.5.0/tenets/utils/tokens.py +296 -0
  133. tenets-0.5.0/tenets/viz/__init__.py +686 -0
  134. tenets-0.5.0/tenets/viz/base.py +737 -0
  135. tenets-0.5.0/tenets/viz/complexity.py +442 -0
  136. tenets-0.5.0/tenets/viz/contributors.py +438 -0
  137. tenets-0.5.0/tenets/viz/coupling.py +459 -0
  138. tenets-0.5.0/tenets/viz/dependencies.py +528 -0
  139. tenets-0.5.0/tenets/viz/displays.py +423 -0
  140. tenets-0.5.0/tenets/viz/graph_generator.py +929 -0
  141. tenets-0.5.0/tenets/viz/hotspots.py +414 -0
  142. tenets-0.5.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.5.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.