depmesh 0.1.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.
Files changed (102) hide show
  1. depmesh-0.1.1/.gitignore +221 -0
  2. depmesh-0.1.1/CHANGELOG.md +16 -0
  3. depmesh-0.1.1/LICENSE +28 -0
  4. depmesh-0.1.1/PKG-INFO +211 -0
  5. depmesh-0.1.1/README.md +183 -0
  6. depmesh-0.1.1/depmesh/__init__.py +0 -0
  7. depmesh-0.1.1/depmesh/__main__.py +4 -0
  8. depmesh-0.1.1/depmesh/cli/__init__.py +3 -0
  9. depmesh-0.1.1/depmesh/cli/application.py +183 -0
  10. depmesh-0.1.1/depmesh/cli/entities.py +84 -0
  11. depmesh-0.1.1/depmesh/cli/errors.py +14 -0
  12. depmesh-0.1.1/depmesh/cli/tests/__init__.py +0 -0
  13. depmesh-0.1.1/depmesh/cli/tests/test_application.py +392 -0
  14. depmesh-0.1.1/depmesh/cli/tests/test_entities.py +70 -0
  15. depmesh-0.1.1/depmesh/core/__init__.py +4 -0
  16. depmesh-0.1.1/depmesh/core/entities.py +19 -0
  17. depmesh-0.1.1/depmesh/core/errors.py +23 -0
  18. depmesh-0.1.1/depmesh/core/tests/__init__.py +0 -0
  19. depmesh-0.1.1/depmesh/core/tests/test_warnings.py +45 -0
  20. depmesh-0.1.1/depmesh/core/warnings.py +15 -0
  21. depmesh-0.1.1/depmesh/discovery/__init__.py +4 -0
  22. depmesh-0.1.1/depmesh/discovery/artifacts.py +55 -0
  23. depmesh-0.1.1/depmesh/discovery/entities.py +69 -0
  24. depmesh-0.1.1/depmesh/discovery/errors.py +28 -0
  25. depmesh-0.1.1/depmesh/discovery/paths.py +141 -0
  26. depmesh-0.1.1/depmesh/discovery/predicates/__init__.py +46 -0
  27. depmesh-0.1.1/depmesh/discovery/predicates/all.py +36 -0
  28. depmesh-0.1.1/depmesh/discovery/predicates/any.py +29 -0
  29. depmesh-0.1.1/depmesh/discovery/predicates/base.py +23 -0
  30. depmesh-0.1.1/depmesh/discovery/predicates/compiler.py +33 -0
  31. depmesh-0.1.1/depmesh/discovery/predicates/entities.py +131 -0
  32. depmesh-0.1.1/depmesh/discovery/predicates/glob.py +91 -0
  33. depmesh-0.1.1/depmesh/discovery/predicates/not_.py +24 -0
  34. depmesh-0.1.1/depmesh/discovery/predicates/one_of.py +30 -0
  35. depmesh-0.1.1/depmesh/discovery/predicates/regex.py +27 -0
  36. depmesh-0.1.1/depmesh/discovery/predicates/tests/__init__.py +1 -0
  37. depmesh-0.1.1/depmesh/discovery/predicates/tests/test_compiler.py +82 -0
  38. depmesh-0.1.1/depmesh/discovery/predicates/tests/test_composition.py +64 -0
  39. depmesh-0.1.1/depmesh/discovery/predicates/tests/test_glob.py +31 -0
  40. depmesh-0.1.1/depmesh/discovery/predicates/tests/test_one_of.py +33 -0
  41. depmesh-0.1.1/depmesh/discovery/predicates/tests/test_regex.py +33 -0
  42. depmesh-0.1.1/depmesh/discovery/query.py +98 -0
  43. depmesh-0.1.1/depmesh/discovery/sources/__init__.py +45 -0
  44. depmesh-0.1.1/depmesh/discovery/sources/base.py +15 -0
  45. depmesh-0.1.1/depmesh/discovery/sources/command.py +52 -0
  46. depmesh-0.1.1/depmesh/discovery/sources/compiler.py +41 -0
  47. depmesh-0.1.1/depmesh/discovery/sources/difference.py +29 -0
  48. depmesh-0.1.1/depmesh/discovery/sources/entities.py +97 -0
  49. depmesh-0.1.1/depmesh/discovery/sources/files.py +52 -0
  50. depmesh-0.1.1/depmesh/discovery/sources/filter.py +31 -0
  51. depmesh-0.1.1/depmesh/discovery/sources/intersection.py +21 -0
  52. depmesh-0.1.1/depmesh/discovery/sources/list.py +31 -0
  53. depmesh-0.1.1/depmesh/discovery/sources/tests/__init__.py +1 -0
  54. depmesh-0.1.1/depmesh/discovery/sources/tests/test_command.py +41 -0
  55. depmesh-0.1.1/depmesh/discovery/sources/tests/test_compiler.py +117 -0
  56. depmesh-0.1.1/depmesh/discovery/sources/tests/test_composition.py +92 -0
  57. depmesh-0.1.1/depmesh/discovery/sources/tests/test_files.py +49 -0
  58. depmesh-0.1.1/depmesh/discovery/sources/tests/test_list.py +22 -0
  59. depmesh-0.1.1/depmesh/discovery/sources/union.py +25 -0
  60. depmesh-0.1.1/depmesh/discovery/tests/__init__.py +0 -0
  61. depmesh-0.1.1/depmesh/discovery/tests/test_entities.py +63 -0
  62. depmesh-0.1.1/depmesh/discovery/tests/test_errors.py +28 -0
  63. depmesh-0.1.1/depmesh/discovery/tests/test_paths.py +82 -0
  64. depmesh-0.1.1/depmesh/discovery/tests/test_query.py +257 -0
  65. depmesh-0.1.1/depmesh/domain/__init__.py +15 -0
  66. depmesh-0.1.1/depmesh/domain/entities.py +25 -0
  67. depmesh-0.1.1/depmesh/domain/tests/__init__.py +0 -0
  68. depmesh-0.1.1/depmesh/protocol/__init__.py +6 -0
  69. depmesh-0.1.1/depmesh/protocol/entities.py +9 -0
  70. depmesh-0.1.1/depmesh/protocol/renderers/__init__.py +6 -0
  71. depmesh-0.1.1/depmesh/protocol/renderers/automation.py +60 -0
  72. depmesh-0.1.1/depmesh/protocol/renderers/base.py +30 -0
  73. depmesh-0.1.1/depmesh/protocol/renderers/human.py +39 -0
  74. depmesh-0.1.1/depmesh/protocol/renderers/llm.py +47 -0
  75. depmesh-0.1.1/depmesh/protocol/renderers/tests/__init__.py +1 -0
  76. depmesh-0.1.1/depmesh/protocol/renderers/tests/test_automation.py +95 -0
  77. depmesh-0.1.1/depmesh/protocol/renderers/tests/test_base.py +31 -0
  78. depmesh-0.1.1/depmesh/protocol/renderers/tests/test_human.py +60 -0
  79. depmesh-0.1.1/depmesh/protocol/renderers/tests/test_llm.py +95 -0
  80. depmesh-0.1.1/depmesh/protocol/tests/__init__.py +0 -0
  81. depmesh-0.1.1/depmesh/protocol/tests/test_utils.py +18 -0
  82. depmesh-0.1.1/depmesh/protocol/utils.py +17 -0
  83. depmesh-0.1.1/depmesh/skills/__init__.py +1 -0
  84. depmesh-0.1.1/depmesh/skills/entities.py +9 -0
  85. depmesh-0.1.1/depmesh/skills/fixtures/configuration.md +292 -0
  86. depmesh-0.1.1/depmesh/skills/fixtures/initialization.md +221 -0
  87. depmesh-0.1.1/depmesh/skills/fixtures/usage.md +281 -0
  88. depmesh-0.1.1/depmesh/skills/fixtures.py +15 -0
  89. depmesh-0.1.1/depmesh/skills/tests/__init__.py +1 -0
  90. depmesh-0.1.1/depmesh/skills/tests/test_entities.py +10 -0
  91. depmesh-0.1.1/depmesh/skills/tests/test_fixtures.py +15 -0
  92. depmesh-0.1.1/depmesh/workspace/__init__.py +4 -0
  93. depmesh-0.1.1/depmesh/workspace/config.py +70 -0
  94. depmesh-0.1.1/depmesh/workspace/entities.py +73 -0
  95. depmesh-0.1.1/depmesh/workspace/errors.py +52 -0
  96. depmesh-0.1.1/depmesh/workspace/fixtures/base_config.toml +33 -0
  97. depmesh-0.1.1/depmesh/workspace/init.py +34 -0
  98. depmesh-0.1.1/depmesh/workspace/tests/__init__.py +0 -0
  99. depmesh-0.1.1/depmesh/workspace/tests/test_config.py +207 -0
  100. depmesh-0.1.1/depmesh/workspace/tests/test_entities.py +29 -0
  101. depmesh-0.1.1/depmesh/workspace/tests/test_init.py +58 -0
  102. depmesh-0.1.1/pyproject.toml +141 -0
@@ -0,0 +1,221 @@
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
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ # Temporary file for partial code execution
204
+ tempCodeRunnerFile.py
205
+
206
+ # Ruff stuff:
207
+ .ruff_cache/
208
+
209
+ # PyPI configuration file
210
+ .pypirc
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # Streamlit
218
+ .streamlit/secrets.toml
219
+
220
+ # Emacs tmp files
221
+ *~
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ Generated by [Changy](https://github.com/Tiendil/changy/tree/main).
6
+
7
+ ## Unreleased
8
+
9
+ No changes.
10
+
11
+ ## 0.1.1 on 2026-05-04
12
+
13
+ ### Changes
14
+
15
+ - Initial release with configurable artifact dependency discovery, built-in agent-oriented usage docs, and Docker-backed development workflow.
16
+ - Added changelog documentation specification and dependency mapping for changelog artifacts.
depmesh-0.1.1/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Aliaksei Yaletski
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
depmesh-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,211 @@
1
+ Metadata-Version: 2.4
2
+ Name: depmesh
3
+ Version: 0.1.1
4
+ Summary: Unified, deterministic CLI for coding agents to discover relationships between project files and artifacts.
5
+ Project-URL: Homepage, https://github.com/Tiendil/depmesh
6
+ Project-URL: Repository, https://github.com/Tiendil/depmesh
7
+ Project-URL: Issues, https://github.com/Tiendil/depmesh/issues
8
+ Project-URL: Changelog, https://github.com/Tiendil/depmesh/blob/main/CHANGELOG.md
9
+ Author-email: Aliaksei Yaletski <a.eletsky@gmail.com>
10
+ License-Expression: BSD-3-Clause
11
+ License-File: LICENSE
12
+ Keywords: ai-agents,cli,code-analysis,codebase-intelligence,codebase-navigation,coding-agents,dependency-analysis,dependency-graph,impact-analysis,llm
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: BSD License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Build Tools
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Utilities
23
+ Requires-Python: <4.0,>=3.12
24
+ Requires-Dist: pydantic~=2.13.3
25
+ Requires-Dist: tomli>=2.4.0
26
+ Requires-Dist: typer~=0.25.1
27
+ Description-Content-Type: text/markdown
28
+
29
+ # depmesh
30
+
31
+ `depmesh` is a CLI tool that helps agents and developers investigate how project artifacts depend on each other.
32
+
33
+ Use it to explore a codebase, find related files, inspect the impact of a possible change, locate tests or specifications, and follow project-specific relationships that are hard to remember or discover manually.
34
+
35
+ `depmesh` gives one stable interface for navigating dependency relationships, while each project decides how dependencies are discovered exactly: path patterns, fixed lists, filesystem searches, static-analysis commands, or project-specific scripts.
36
+
37
+ ## Example
38
+
39
+ Before changing a CLI module, ask `depmesh` for the specifications and tests connected to it:
40
+
41
+ ```bash
42
+ > depmesh -p llm dependencies --relation governed_by --relation tested_by ./depmesh/cli/app.py
43
+
44
+ ## governed_by
45
+
46
+ Specifications that apply to the input.
47
+
48
+ - @/specs/architecture/entities.md
49
+ - @/specs/architecture/errors.md
50
+ - @/specs/architecture/modules_layout.md
51
+ - @/specs/architecture/naming.md
52
+ - @/specs/architecture/static_analysis.md
53
+ - @/specs/architecture/tests.md
54
+ - @/specs/behavior/cli.md
55
+ - @/specs/behavior/file_paths.md
56
+
57
+ ## tested_by
58
+
59
+ Tests that verify the input.
60
+
61
+ - @/depmesh/cli/tests/test_app.py
62
+
63
+ ```
64
+
65
+ ## Rationale
66
+
67
+ Coding agents often need to answer practical questions before editing:
68
+
69
+ - Which tests should be read before changing this file?
70
+ - Which specifications govern this module?
71
+ - Which files import this shared helper?
72
+ - Which artifacts are affected by this specification change?
73
+
74
+ `depmesh` answers those questions through configured relations.
75
+
76
+ For example, a project can define relations such as:
77
+
78
+ - `tested_by` — tests that verify an artifact.
79
+ - `governed_by` — specifications that apply to an artifact.
80
+ - `imports` — Python files imported by a Python file.
81
+ - `imported_by` — Python files that import a Python file.
82
+
83
+ ## Features
84
+
85
+ - Unified interface for discovering project dependencies.
86
+ - Configurable ways to detect dependencies behind the scenes: path patterns, fixed lists, calling CLI commands, or running project-specific scripts.
87
+
88
+ ## Quick Usage
89
+
90
+ List available relations first:
91
+
92
+ ```bash
93
+ depmesh relations
94
+ ```
95
+
96
+ Query dependencies for an artifact:
97
+
98
+ ```bash
99
+ depmesh dependencies ./src/app.py
100
+ ```
101
+
102
+ Query selected relations:
103
+
104
+ ```bash
105
+ depmesh dependencies --relation governed_by --relation tested_by ./src/app.py
106
+ ```
107
+
108
+ Initialize a starter configuration:
109
+
110
+ ```bash
111
+ depmesh init
112
+ ```
113
+
114
+ Read detailed agent-oriented usage:
115
+
116
+ ```bash
117
+ depmesh skill usage
118
+ ```
119
+
120
+ Other built-in docs:
121
+
122
+ ```bash
123
+ depmesh skill configuration
124
+ depmesh skill initialization
125
+ ```
126
+
127
+ ## Installation
128
+
129
+ Install `depmesh` from PyPI in the environment where your agent or tools run:
130
+
131
+ ```bash
132
+ uv tool install depmesh
133
+
134
+ # or
135
+ pip install depmesh
136
+ ```
137
+
138
+ Then initialize a starter configuration in the project root:
139
+
140
+ ```bash
141
+ depmesh init
142
+ ```
143
+
144
+ The starter `depmesh.toml` is valid, but it is only a starting point. Edit it so it describes the dependency relations that matter in your project.
145
+
146
+ Tell agents to use `depmesh` by adding a short note to `AGENTS.md`:
147
+
148
+ ```markdown
149
+ Use `depmesh` to discover dependencies between project artifacts.
150
+ Agents MUST use `depmesh` for dependency types supported by its configuration.
151
+ At the start of each work session, run `depmesh skill usage`.
152
+ ```
153
+
154
+ You can ask a coding agent to help fill the configuration. A good prompt is:
155
+
156
+ ```text
157
+ Inspect this project and update depmesh.toml with useful dependency relations.
158
+ Start by reading output of `depmesh skill initialization` and `depmesh skill configuration`.
159
+ ```
160
+
161
+ This repository uses `depmesh` for its own dependency mapping. See [depmesh.toml](./depmesh.toml) for a real configuration example.
162
+
163
+ ## Configuration
164
+
165
+ `depmesh` is useful only when the project has a meaningful `depmesh.toml`.
166
+
167
+ The configuration declares:
168
+
169
+ - relations that can be queried.
170
+ - rules that match queried artifacts.
171
+ - sources that produce dependency artifacts.
172
+
173
+ Minimal relation example:
174
+
175
+ ```toml
176
+ version = 1
177
+
178
+ [[relations]]
179
+ id = "tested_by"
180
+ description = "Tests that verify the artifact."
181
+
182
+ [[rules]]
183
+ relation = "tested_by"
184
+ input = { type = "glob", pattern = "./src/{*module}.py" }
185
+ output = { type = "files", pattern = "./tests/test_{module}.py" }
186
+ ```
187
+
188
+ This defines one relation named `tested_by`. The rule matches source files like `./src/app.py`, captures `app` as `module`, and looks for `./tests/test_app.py` as the dependency.
189
+
190
+ Run `depmesh skill configuration` for the agent-oriented configuration guide.
191
+
192
+ For the full configuration contract, see [the configuration specification](./specs/behavior/config.md).
193
+
194
+ ## Specifications
195
+
196
+ Project behavior and architecture are specified in [./specs](./specs). Start with [./specs/intro.md](./specs/intro.md) when looking for the source of truth.
197
+
198
+ ## Development
199
+
200
+ Development commands run through Docker:
201
+
202
+ ```bash
203
+ ./bin/dev.sh uv run -- pytest
204
+ ./bin/dev.sh uv run -- depmesh relations
205
+ ```
206
+
207
+ Build development containers only after approved Docker or dependency changes:
208
+
209
+ ```bash
210
+ ./bin/dev-build-containers.sh
211
+ ```
@@ -0,0 +1,183 @@
1
+ # depmesh
2
+
3
+ `depmesh` is a CLI tool that helps agents and developers investigate how project artifacts depend on each other.
4
+
5
+ Use it to explore a codebase, find related files, inspect the impact of a possible change, locate tests or specifications, and follow project-specific relationships that are hard to remember or discover manually.
6
+
7
+ `depmesh` gives one stable interface for navigating dependency relationships, while each project decides how dependencies are discovered exactly: path patterns, fixed lists, filesystem searches, static-analysis commands, or project-specific scripts.
8
+
9
+ ## Example
10
+
11
+ Before changing a CLI module, ask `depmesh` for the specifications and tests connected to it:
12
+
13
+ ```bash
14
+ > depmesh -p llm dependencies --relation governed_by --relation tested_by ./depmesh/cli/app.py
15
+
16
+ ## governed_by
17
+
18
+ Specifications that apply to the input.
19
+
20
+ - @/specs/architecture/entities.md
21
+ - @/specs/architecture/errors.md
22
+ - @/specs/architecture/modules_layout.md
23
+ - @/specs/architecture/naming.md
24
+ - @/specs/architecture/static_analysis.md
25
+ - @/specs/architecture/tests.md
26
+ - @/specs/behavior/cli.md
27
+ - @/specs/behavior/file_paths.md
28
+
29
+ ## tested_by
30
+
31
+ Tests that verify the input.
32
+
33
+ - @/depmesh/cli/tests/test_app.py
34
+
35
+ ```
36
+
37
+ ## Rationale
38
+
39
+ Coding agents often need to answer practical questions before editing:
40
+
41
+ - Which tests should be read before changing this file?
42
+ - Which specifications govern this module?
43
+ - Which files import this shared helper?
44
+ - Which artifacts are affected by this specification change?
45
+
46
+ `depmesh` answers those questions through configured relations.
47
+
48
+ For example, a project can define relations such as:
49
+
50
+ - `tested_by` — tests that verify an artifact.
51
+ - `governed_by` — specifications that apply to an artifact.
52
+ - `imports` — Python files imported by a Python file.
53
+ - `imported_by` — Python files that import a Python file.
54
+
55
+ ## Features
56
+
57
+ - Unified interface for discovering project dependencies.
58
+ - Configurable ways to detect dependencies behind the scenes: path patterns, fixed lists, calling CLI commands, or running project-specific scripts.
59
+
60
+ ## Quick Usage
61
+
62
+ List available relations first:
63
+
64
+ ```bash
65
+ depmesh relations
66
+ ```
67
+
68
+ Query dependencies for an artifact:
69
+
70
+ ```bash
71
+ depmesh dependencies ./src/app.py
72
+ ```
73
+
74
+ Query selected relations:
75
+
76
+ ```bash
77
+ depmesh dependencies --relation governed_by --relation tested_by ./src/app.py
78
+ ```
79
+
80
+ Initialize a starter configuration:
81
+
82
+ ```bash
83
+ depmesh init
84
+ ```
85
+
86
+ Read detailed agent-oriented usage:
87
+
88
+ ```bash
89
+ depmesh skill usage
90
+ ```
91
+
92
+ Other built-in docs:
93
+
94
+ ```bash
95
+ depmesh skill configuration
96
+ depmesh skill initialization
97
+ ```
98
+
99
+ ## Installation
100
+
101
+ Install `depmesh` from PyPI in the environment where your agent or tools run:
102
+
103
+ ```bash
104
+ uv tool install depmesh
105
+
106
+ # or
107
+ pip install depmesh
108
+ ```
109
+
110
+ Then initialize a starter configuration in the project root:
111
+
112
+ ```bash
113
+ depmesh init
114
+ ```
115
+
116
+ The starter `depmesh.toml` is valid, but it is only a starting point. Edit it so it describes the dependency relations that matter in your project.
117
+
118
+ Tell agents to use `depmesh` by adding a short note to `AGENTS.md`:
119
+
120
+ ```markdown
121
+ Use `depmesh` to discover dependencies between project artifacts.
122
+ Agents MUST use `depmesh` for dependency types supported by its configuration.
123
+ At the start of each work session, run `depmesh skill usage`.
124
+ ```
125
+
126
+ You can ask a coding agent to help fill the configuration. A good prompt is:
127
+
128
+ ```text
129
+ Inspect this project and update depmesh.toml with useful dependency relations.
130
+ Start by reading output of `depmesh skill initialization` and `depmesh skill configuration`.
131
+ ```
132
+
133
+ This repository uses `depmesh` for its own dependency mapping. See [depmesh.toml](./depmesh.toml) for a real configuration example.
134
+
135
+ ## Configuration
136
+
137
+ `depmesh` is useful only when the project has a meaningful `depmesh.toml`.
138
+
139
+ The configuration declares:
140
+
141
+ - relations that can be queried.
142
+ - rules that match queried artifacts.
143
+ - sources that produce dependency artifacts.
144
+
145
+ Minimal relation example:
146
+
147
+ ```toml
148
+ version = 1
149
+
150
+ [[relations]]
151
+ id = "tested_by"
152
+ description = "Tests that verify the artifact."
153
+
154
+ [[rules]]
155
+ relation = "tested_by"
156
+ input = { type = "glob", pattern = "./src/{*module}.py" }
157
+ output = { type = "files", pattern = "./tests/test_{module}.py" }
158
+ ```
159
+
160
+ This defines one relation named `tested_by`. The rule matches source files like `./src/app.py`, captures `app` as `module`, and looks for `./tests/test_app.py` as the dependency.
161
+
162
+ Run `depmesh skill configuration` for the agent-oriented configuration guide.
163
+
164
+ For the full configuration contract, see [the configuration specification](./specs/behavior/config.md).
165
+
166
+ ## Specifications
167
+
168
+ Project behavior and architecture are specified in [./specs](./specs). Start with [./specs/intro.md](./specs/intro.md) when looking for the source of truth.
169
+
170
+ ## Development
171
+
172
+ Development commands run through Docker:
173
+
174
+ ```bash
175
+ ./bin/dev.sh uv run -- pytest
176
+ ./bin/dev.sh uv run -- depmesh relations
177
+ ```
178
+
179
+ Build development containers only after approved Docker or dependency changes:
180
+
181
+ ```bash
182
+ ./bin/dev-build-containers.sh
183
+ ```
File without changes
@@ -0,0 +1,4 @@
1
+ from depmesh.cli.application import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,3 @@
1
+ from depmesh.cli.application import main
2
+
3
+ __all__ = ["main"]