devkb 0.2.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.
- devkb-0.2.0/LICENSE +202 -0
- devkb-0.2.0/NOTICE +11 -0
- devkb-0.2.0/PKG-INFO +162 -0
- devkb-0.2.0/README.md +126 -0
- devkb-0.2.0/devkb/__init__.py +11 -0
- devkb-0.2.0/devkb/audit.py +173 -0
- devkb-0.2.0/devkb/bench/add_packs.py +52 -0
- devkb-0.2.0/devkb/bench/cli_tasks.py +105 -0
- devkb-0.2.0/devkb/bench/confirm_tasks.py +149 -0
- devkb-0.2.0/devkb/bench/module_truth.py +249 -0
- devkb-0.2.0/devkb/bench/oco_tasks.py +216 -0
- devkb-0.2.0/devkb/bench/pipeline.py +313 -0
- devkb-0.2.0/devkb/bench/process_tasks.py +135 -0
- devkb-0.2.0/devkb/bench/report.py +74 -0
- devkb-0.2.0/devkb/bench/run.py +174 -0
- devkb-0.2.0/devkb/bench/truth_check.py +148 -0
- devkb-0.2.0/devkb/bench/workflow_report.py +64 -0
- devkb-0.2.0/devkb/bench/workflow_run.py +206 -0
- devkb-0.2.0/devkb/bench/workflow_tasks.py +227 -0
- devkb-0.2.0/devkb/build.py +258 -0
- devkb-0.2.0/devkb/build_symbols.py +1394 -0
- devkb-0.2.0/devkb/call_recall.py +159 -0
- devkb-0.2.0/devkb/cli.py +53 -0
- devkb-0.2.0/devkb/coverage.py +155 -0
- devkb-0.2.0/devkb/edge_truth.py +272 -0
- devkb-0.2.0/devkb/extractors/backlog.py +113 -0
- devkb-0.2.0/devkb/extractors/component_subsystem.py +116 -0
- devkb-0.2.0/devkb/extractors/configuration.py +267 -0
- devkb-0.2.0/devkb/extractors/files_tests.py +220 -0
- devkb-0.2.0/devkb/extractors/flows.py +117 -0
- devkb-0.2.0/devkb/extractors/lifecycle.py +258 -0
- devkb-0.2.0/devkb/extractors/members.py +160 -0
- devkb-0.2.0/devkb/extractors/pull_requests.py +271 -0
- devkb-0.2.0/devkb/extractors/releases.py +49 -0
- devkb-0.2.0/devkb/extractors/source_baseline.py +66 -0
- devkb-0.2.0/devkb/extractors/spec_docs.py +220 -0
- devkb-0.2.0/devkb/extractors/symbol_tests.py +131 -0
- devkb-0.2.0/devkb/extractors/test_inventory.py +38 -0
- devkb-0.2.0/devkb/extractors/ticket_similarity.py +193 -0
- devkb-0.2.0/devkb/extractors/tickets_git.py +151 -0
- devkb-0.2.0/devkb/extractors/warnings.py +230 -0
- devkb-0.2.0/devkb/extractors/work_units.py +90 -0
- devkb-0.2.0/devkb/github.py +515 -0
- devkb-0.2.0/devkb/gitutil.py +16 -0
- devkb-0.2.0/devkb/index.py +51 -0
- devkb-0.2.0/devkb/init.py +178 -0
- devkb-0.2.0/devkb/mcp_server.py +216 -0
- devkb-0.2.0/devkb/model.py +221 -0
- devkb-0.2.0/devkb/module_file_bridge.py +57 -0
- devkb-0.2.0/devkb/ontology.md +178 -0
- devkb-0.2.0/devkb/packs.py +462 -0
- devkb-0.2.0/devkb/process_api.py +1601 -0
- devkb-0.2.0/devkb/project_context.py +191 -0
- devkb-0.2.0/devkb/query.py +251 -0
- devkb-0.2.0/devkb/service.py +324 -0
- devkb-0.2.0/devkb/startup.py +103 -0
- devkb-0.2.0/devkb/test_discovery.py +76 -0
- devkb-0.2.0/devkb/ts_symbols.py +291 -0
- devkb-0.2.0/devkb.egg-info/PKG-INFO +162 -0
- devkb-0.2.0/devkb.egg-info/SOURCES.txt +94 -0
- devkb-0.2.0/devkb.egg-info/dependency_links.txt +1 -0
- devkb-0.2.0/devkb.egg-info/entry_points.txt +2 -0
- devkb-0.2.0/devkb.egg-info/requires.txt +12 -0
- devkb-0.2.0/devkb.egg-info/top_level.txt +1 -0
- devkb-0.2.0/pyproject.toml +47 -0
- devkb-0.2.0/setup.cfg +4 -0
- devkb-0.2.0/tests/test_bench_pipeline_detail.py +30 -0
- devkb-0.2.0/tests/test_devkb_ablation_process_odsf316.py +54 -0
- devkb-0.2.0/tests/test_devkb_audit_efficiency_odsf314.py +101 -0
- devkb-0.2.0/tests/test_devkb_authoring_odsf311.py +182 -0
- devkb-0.2.0/tests/test_devkb_bench_odsf308.py +108 -0
- devkb-0.2.0/tests/test_devkb_bl_baseline_symbols_odsf042.py +216 -0
- devkb-0.2.0/tests/test_devkb_bl_containment_errors_criticality_odsf043.py +332 -0
- devkb-0.2.0/tests/test_devkb_bl_crossfile_ts_api_odsf043.py +214 -0
- devkb-0.2.0/tests/test_devkb_bl_linkage_workunits_odsf042.py +171 -0
- devkb-0.2.0/tests/test_devkb_bl_similarity_flows_specs_odsf043.py +364 -0
- devkb-0.2.0/tests/test_devkb_builder_checkout_odsf104.py +154 -0
- devkb-0.2.0/tests/test_devkb_call_resolution_odsf305.py +88 -0
- devkb-0.2.0/tests/test_devkb_confirmatory_truth_odsf315.py +57 -0
- devkb-0.2.0/tests/test_devkb_coverage_classes_odsf313.py +194 -0
- devkb-0.2.0/tests/test_devkb_coverage_odsf304.py +106 -0
- devkb-0.2.0/tests/test_devkb_files_tests_odsf032.py +297 -0
- devkb-0.2.0/tests/test_devkb_init.py +83 -0
- devkb-0.2.0/tests/test_devkb_mcp_odsf307.py +85 -0
- devkb-0.2.0/tests/test_devkb_process_api_odsf306.py +179 -0
- devkb-0.2.0/tests/test_devkb_process_api_odsf309.py +169 -0
- devkb-0.2.0/tests/test_devkb_product_graph_odsf312.py +142 -0
- devkb-0.2.0/tests/test_devkb_pull_requests_adr007.py +685 -0
- devkb-0.2.0/tests/test_devkb_similarity_ranking_odsf059.py +120 -0
- devkb-0.2.0/tests/test_devkb_submodules_odsf312.py +38 -0
- devkb-0.2.0/tests/test_devkb_typed_calls_odsf312.py +39 -0
- devkb-0.2.0/tests/test_devkb_warnings_odsf033.py +210 -0
- devkb-0.2.0/tests/test_devkb_workflow_bench_odsf310.py +52 -0
- devkb-0.2.0/tests/test_devkb_workflows_odsf310.py +172 -0
- devkb-0.2.0/tests/test_module_truth_routes.py +62 -0
- devkb-0.2.0/tests/test_reexports_module_calls.py +147 -0
devkb-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
devkb-0.2.0/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
devkb
|
|
2
|
+
Copyright 2026 Hung T. Le
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (LICENSE).
|
|
5
|
+
|
|
6
|
+
The study in study/ (paper, figures, pre-registration, results and data) is licensed under the Creative Commons
|
|
7
|
+
Attribution 4.0 International licence (study/LICENSE).
|
|
8
|
+
|
|
9
|
+
bench/results/ contains short excerpts of third-party source code (file paths, function names and quoted lines) from
|
|
10
|
+
the benchmarked repositories, in tasks, packs and agent answers. Those excerpts remain under their own licences; see
|
|
11
|
+
bench/results/NOTICE.
|
devkb-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devkb
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A software-process knowledge graph for software development agents: extraction, pre-computed context packs, and an MCP server
|
|
5
|
+
Author: Hung T. Le
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/namiq-ai/devkb
|
|
8
|
+
Project-URL: Issues, https://github.com/namiq-ai/devkb/issues
|
|
9
|
+
Project-URL: Benchmark, https://github.com/namiq-ai/devkb/blob/main/docs/BENCHMARK.md
|
|
10
|
+
Keywords: knowledge graph,software development agents,coding agents,mcp,code intelligence,call graph,software process
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
License-File: NOTICE
|
|
26
|
+
Requires-Dist: pyyaml>=6
|
|
27
|
+
Provides-Extra: mcp
|
|
28
|
+
Requires-Dist: mcp<2,>=1.23; extra == "mcp"
|
|
29
|
+
Provides-Extra: study
|
|
30
|
+
Requires-Dist: scipy>=1.10; extra == "study"
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
33
|
+
Requires-Dist: mcp<2,>=1.23; extra == "dev"
|
|
34
|
+
Requires-Dist: scipy>=1.10; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# devkb
|
|
38
|
+
|
|
39
|
+
[](https://doi.org/10.5281/zenodo.24267143)
|
|
40
|
+
|
|
41
|
+
**A knowledge graph of your repository for software development agents.** Agents answer "what calls this, what breaks, which tests"
|
|
42
|
+
in one step instead of searching file by file: 55% cheaper, with better answers, in our benchmark.
|
|
43
|
+
|
|
44
|
+
<picture>
|
|
45
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/img/benchmark-dark.svg">
|
|
46
|
+
<img alt="Median cost per task: plain search $0.070 (quality 0.931); devkb 12 tools $0.059, 18% cheaper (0.955); devkb 7 tools $0.040, 38% cheaper (0.963); devkb pack $0.025, 55% cheaper (0.981)" src="docs/img/benchmark-light.svg">
|
|
47
|
+
</picture>
|
|
48
|
+
|
|
49
|
+
## 1. What devkb is
|
|
50
|
+
|
|
51
|
+
- **A graph** built from your source and git history: functions, calls, tests, routes, errors, configuration,
|
|
52
|
+
commits, pull requests, tickets ([ontology](devkb/ontology.md)).
|
|
53
|
+
- **Packs**: one command answers a whole question (who calls this, what breaks, which tests to run), each item with
|
|
54
|
+
the source line that proves it, and a statement of what the graph could not see.
|
|
55
|
+
- **An MCP server** giving agents the same answers as tools, for Claude Code, Codex and any MCP client.
|
|
56
|
+
|
|
57
|
+
Everything runs locally: devkb reads files and runs `git`, never your code (unless `devkb.json` opts in), and the graph never leaves your machine.
|
|
58
|
+
|
|
59
|
+
### Languages
|
|
60
|
+
|
|
61
|
+
| Language | Status | What devkb understands |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| Python | ✅ Supported | functions, classes, calls (through imports, re-exports, typed objects, base classes), tests, FastAPI/Flask routes, raised and logged errors, environment variables; every pack |
|
|
64
|
+
| TypeScript, TSX | 🟡 Partial | functions, components, classes, and the HTTP calls they make to backend routes; not calls between them |
|
|
65
|
+
| JavaScript (`.js`, `.mjs`) | 🟡 Partial | as TypeScript |
|
|
66
|
+
| Odoo XML | 🟡 Partial | templates and menus |
|
|
67
|
+
| Bash / shell | ⬜ Not yet | files and history only |
|
|
68
|
+
| C, C++, Java, Rust, Go, C#, others | ⬜ Not yet | files and history only |
|
|
69
|
+
|
|
70
|
+
"Files and history" is the language-independent layer every repository gets: files, commits, pull requests and
|
|
71
|
+
tickets.
|
|
72
|
+
|
|
73
|
+
## 2. How much it saves
|
|
74
|
+
|
|
75
|
+
Latest benchmark: the 7 open-source repositories in [`bench/repos.yaml`](bench/repos.yaml), 57 tasks, 1,138 agent
|
|
76
|
+
runs, the same model (Sonnet) in every arm, answers scored against truth computed from the source. Cost, turns and
|
|
77
|
+
tokens are the median run; saving is per task against plain search, averaged over tasks; quality is the mean score:
|
|
78
|
+
|
|
79
|
+
| | Plain search | devkb, 12 tools | devkb, 7 tools | devkb pack |
|
|
80
|
+
|---|---|---|---|---|
|
|
81
|
+
| **Cost per task** | $0.070 | $0.059 | $0.040 | **$0.025** |
|
|
82
|
+
| **Saving** | — | 18% | 38% | **55%** |
|
|
83
|
+
| **Quality** (0–1) | 0.931 | 0.955 (+0.024) | 0.963 (+0.032) | **0.981 (+0.050)** |
|
|
84
|
+
| Turns | 4 | 6 | 5 | **3** |
|
|
85
|
+
| Context processed (tokens) | 126k | 169k | 147k | **75k** |
|
|
86
|
+
| of which cache reads | 123k | 163k | 141k | 74k |
|
|
87
|
+
| of which new input and cache writes | 8.3k | 4.1k | 2.0k | 1.3k |
|
|
88
|
+
| Output tokens | 1.4k | 1.8k | 1.3k | 0.9k |
|
|
89
|
+
|
|
90
|
+
Saving and quality gain by repository (95% intervals in the results):
|
|
91
|
+
|
|
92
|
+
| Repository | Tasks | 7 tools: saving / quality | pack: saving / quality |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| lnbits | 10 | 53% / +0.032 | **66%** / +0.049 |
|
|
95
|
+
| Netflix Dispatch | 8 | 45% / +0.040 | **61%** / +0.081 |
|
|
96
|
+
| Prefect | 9 | 41% / −0.017 | **59%** / +0.047 |
|
|
97
|
+
| lattice-scan | 12 | 36% / +0.052 | **51%** / +0.058 |
|
|
98
|
+
| Mealie | 6 | 18% / +0.095 | **42%** / +0.062 |
|
|
99
|
+
| devkb | 4 | 1% / +0.004 | **40%** / +0.004 |
|
|
100
|
+
| click | 8 | 6% / +0.016 | 15% / +0.023 |
|
|
101
|
+
|
|
102
|
+
The saving is in call chains (66–77% on tasks that trace an error or a change to the route handlers that reach it);
|
|
103
|
+
on one-hop questions, as in click, plain search is already good. An earlier pre-registered study (30 held-out tasks,
|
|
104
|
+
1,020 runs, two model sizes) found packs 41% cheaper and the lean tools 35% ([`study/`](study/); `make verify`
|
|
105
|
+
recomputes it). Details and corrections: [`bench/results/2026-11-15-registry`](bench/results/2026-11-15-registry/);
|
|
106
|
+
add a repository: [`docs/BENCHMARK.md`](docs/BENCHMARK.md).
|
|
107
|
+
|
|
108
|
+
## 3. Set up
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install "devkb[mcp]"
|
|
112
|
+
cd your-repo
|
|
113
|
+
devkb init --hooks
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This builds the graph into `.devkb/`, adds a short devkb section to `AGENTS.md` and `CLAUDE.md`, registers the MCP
|
|
117
|
+
server in `.mcp.json`, and rebuilds the graph after each commit. Your own content in those files is kept;
|
|
118
|
+
`devkb init --remove` undoes it.
|
|
119
|
+
|
|
120
|
+
Ask it directly:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
devkb pack --project . refactor my_function # who calls it, which tests
|
|
124
|
+
devkb pack --project . error "message text" # which route handlers reach it
|
|
125
|
+
devkb pack --project . file path/to/file.py # before editing a file
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Your agent
|
|
129
|
+
|
|
130
|
+
**Claude Code**: nothing more to do. `devkb init` registered the server in `.mcp.json` and pointed `CLAUDE.md` at the
|
|
131
|
+
instructions. Start `claude` in the repository, approve the `devkb` server when asked, and check it with `/mcp`.
|
|
132
|
+
|
|
133
|
+
**Cursor**: add `.cursor/mcp.json` to the repository, then enable `devkb` under Settings → MCP:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{"mcpServers": {"devkb": {"command": "devkb", "args": ["mcp", "--project", ".", "--toolset", "lean-pack"]}}}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Codex**: add to `~/.codex/config.toml`:
|
|
140
|
+
|
|
141
|
+
```toml
|
|
142
|
+
[mcp_servers.devkb]
|
|
143
|
+
command = "devkb"
|
|
144
|
+
args = ["mcp", "--project", ".", "--toolset", "lean-pack"]
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Codex and Cursor read the instructions in `AGENTS.md`; Claude Code reads them through `CLAUDE.md`.
|
|
148
|
+
|
|
149
|
+
What agents get by default (`--toolset lean-pack`): a `pack` tool that returns a whole answer in one call, and the
|
|
150
|
+
seven single-question tools. The instructions tell them to ask for a pack when a question follows a chain (a file
|
|
151
|
+
before editing, a change, an error) and to search as usual for a one-hop lookup, which is where the benchmark found
|
|
152
|
+
the saving and where it did not. Measured with agents asking for the pack themselves (lnbits and Dispatch, 400 runs):
|
|
153
|
+
53% cheaper than plain search with the highest quality of any arm, against 42% for the seven tools alone
|
|
154
|
+
([`bench/results/2026-11-15-lean-pack`](bench/results/2026-11-15-lean-pack/)).
|
|
155
|
+
|
|
156
|
+
## 4. Licence and citation
|
|
157
|
+
|
|
158
|
+
Code: [Apache-2.0](LICENSE). The study in [`study/`](study/) (paper, figures, pre-registration, data):
|
|
159
|
+
[CC BY 4.0](study/LICENSE). Benchmark results quote third-party code under its own licences
|
|
160
|
+
([`bench/results/NOTICE`](bench/results/NOTICE)). Releases: [`docs/RELEASING.md`](docs/RELEASING.md).
|
|
161
|
+
|
|
162
|
+
> Hung T. Le. *Precomputed Context, Not More Tools: A Pre-Registered Study of Process Graphs for Coding Agents.* 2026.
|
devkb-0.2.0/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# devkb
|
|
2
|
+
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.24267143)
|
|
4
|
+
|
|
5
|
+
**A knowledge graph of your repository for software development agents.** Agents answer "what calls this, what breaks, which tests"
|
|
6
|
+
in one step instead of searching file by file: 55% cheaper, with better answers, in our benchmark.
|
|
7
|
+
|
|
8
|
+
<picture>
|
|
9
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/img/benchmark-dark.svg">
|
|
10
|
+
<img alt="Median cost per task: plain search $0.070 (quality 0.931); devkb 12 tools $0.059, 18% cheaper (0.955); devkb 7 tools $0.040, 38% cheaper (0.963); devkb pack $0.025, 55% cheaper (0.981)" src="docs/img/benchmark-light.svg">
|
|
11
|
+
</picture>
|
|
12
|
+
|
|
13
|
+
## 1. What devkb is
|
|
14
|
+
|
|
15
|
+
- **A graph** built from your source and git history: functions, calls, tests, routes, errors, configuration,
|
|
16
|
+
commits, pull requests, tickets ([ontology](devkb/ontology.md)).
|
|
17
|
+
- **Packs**: one command answers a whole question (who calls this, what breaks, which tests to run), each item with
|
|
18
|
+
the source line that proves it, and a statement of what the graph could not see.
|
|
19
|
+
- **An MCP server** giving agents the same answers as tools, for Claude Code, Codex and any MCP client.
|
|
20
|
+
|
|
21
|
+
Everything runs locally: devkb reads files and runs `git`, never your code (unless `devkb.json` opts in), and the graph never leaves your machine.
|
|
22
|
+
|
|
23
|
+
### Languages
|
|
24
|
+
|
|
25
|
+
| Language | Status | What devkb understands |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Python | ✅ Supported | functions, classes, calls (through imports, re-exports, typed objects, base classes), tests, FastAPI/Flask routes, raised and logged errors, environment variables; every pack |
|
|
28
|
+
| TypeScript, TSX | 🟡 Partial | functions, components, classes, and the HTTP calls they make to backend routes; not calls between them |
|
|
29
|
+
| JavaScript (`.js`, `.mjs`) | 🟡 Partial | as TypeScript |
|
|
30
|
+
| Odoo XML | 🟡 Partial | templates and menus |
|
|
31
|
+
| Bash / shell | ⬜ Not yet | files and history only |
|
|
32
|
+
| C, C++, Java, Rust, Go, C#, others | ⬜ Not yet | files and history only |
|
|
33
|
+
|
|
34
|
+
"Files and history" is the language-independent layer every repository gets: files, commits, pull requests and
|
|
35
|
+
tickets.
|
|
36
|
+
|
|
37
|
+
## 2. How much it saves
|
|
38
|
+
|
|
39
|
+
Latest benchmark: the 7 open-source repositories in [`bench/repos.yaml`](bench/repos.yaml), 57 tasks, 1,138 agent
|
|
40
|
+
runs, the same model (Sonnet) in every arm, answers scored against truth computed from the source. Cost, turns and
|
|
41
|
+
tokens are the median run; saving is per task against plain search, averaged over tasks; quality is the mean score:
|
|
42
|
+
|
|
43
|
+
| | Plain search | devkb, 12 tools | devkb, 7 tools | devkb pack |
|
|
44
|
+
|---|---|---|---|---|
|
|
45
|
+
| **Cost per task** | $0.070 | $0.059 | $0.040 | **$0.025** |
|
|
46
|
+
| **Saving** | — | 18% | 38% | **55%** |
|
|
47
|
+
| **Quality** (0–1) | 0.931 | 0.955 (+0.024) | 0.963 (+0.032) | **0.981 (+0.050)** |
|
|
48
|
+
| Turns | 4 | 6 | 5 | **3** |
|
|
49
|
+
| Context processed (tokens) | 126k | 169k | 147k | **75k** |
|
|
50
|
+
| of which cache reads | 123k | 163k | 141k | 74k |
|
|
51
|
+
| of which new input and cache writes | 8.3k | 4.1k | 2.0k | 1.3k |
|
|
52
|
+
| Output tokens | 1.4k | 1.8k | 1.3k | 0.9k |
|
|
53
|
+
|
|
54
|
+
Saving and quality gain by repository (95% intervals in the results):
|
|
55
|
+
|
|
56
|
+
| Repository | Tasks | 7 tools: saving / quality | pack: saving / quality |
|
|
57
|
+
|---|---|---|---|
|
|
58
|
+
| lnbits | 10 | 53% / +0.032 | **66%** / +0.049 |
|
|
59
|
+
| Netflix Dispatch | 8 | 45% / +0.040 | **61%** / +0.081 |
|
|
60
|
+
| Prefect | 9 | 41% / −0.017 | **59%** / +0.047 |
|
|
61
|
+
| lattice-scan | 12 | 36% / +0.052 | **51%** / +0.058 |
|
|
62
|
+
| Mealie | 6 | 18% / +0.095 | **42%** / +0.062 |
|
|
63
|
+
| devkb | 4 | 1% / +0.004 | **40%** / +0.004 |
|
|
64
|
+
| click | 8 | 6% / +0.016 | 15% / +0.023 |
|
|
65
|
+
|
|
66
|
+
The saving is in call chains (66–77% on tasks that trace an error or a change to the route handlers that reach it);
|
|
67
|
+
on one-hop questions, as in click, plain search is already good. An earlier pre-registered study (30 held-out tasks,
|
|
68
|
+
1,020 runs, two model sizes) found packs 41% cheaper and the lean tools 35% ([`study/`](study/); `make verify`
|
|
69
|
+
recomputes it). Details and corrections: [`bench/results/2026-11-15-registry`](bench/results/2026-11-15-registry/);
|
|
70
|
+
add a repository: [`docs/BENCHMARK.md`](docs/BENCHMARK.md).
|
|
71
|
+
|
|
72
|
+
## 3. Set up
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install "devkb[mcp]"
|
|
76
|
+
cd your-repo
|
|
77
|
+
devkb init --hooks
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This builds the graph into `.devkb/`, adds a short devkb section to `AGENTS.md` and `CLAUDE.md`, registers the MCP
|
|
81
|
+
server in `.mcp.json`, and rebuilds the graph after each commit. Your own content in those files is kept;
|
|
82
|
+
`devkb init --remove` undoes it.
|
|
83
|
+
|
|
84
|
+
Ask it directly:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
devkb pack --project . refactor my_function # who calls it, which tests
|
|
88
|
+
devkb pack --project . error "message text" # which route handlers reach it
|
|
89
|
+
devkb pack --project . file path/to/file.py # before editing a file
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Your agent
|
|
93
|
+
|
|
94
|
+
**Claude Code**: nothing more to do. `devkb init` registered the server in `.mcp.json` and pointed `CLAUDE.md` at the
|
|
95
|
+
instructions. Start `claude` in the repository, approve the `devkb` server when asked, and check it with `/mcp`.
|
|
96
|
+
|
|
97
|
+
**Cursor**: add `.cursor/mcp.json` to the repository, then enable `devkb` under Settings → MCP:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{"mcpServers": {"devkb": {"command": "devkb", "args": ["mcp", "--project", ".", "--toolset", "lean-pack"]}}}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Codex**: add to `~/.codex/config.toml`:
|
|
104
|
+
|
|
105
|
+
```toml
|
|
106
|
+
[mcp_servers.devkb]
|
|
107
|
+
command = "devkb"
|
|
108
|
+
args = ["mcp", "--project", ".", "--toolset", "lean-pack"]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Codex and Cursor read the instructions in `AGENTS.md`; Claude Code reads them through `CLAUDE.md`.
|
|
112
|
+
|
|
113
|
+
What agents get by default (`--toolset lean-pack`): a `pack` tool that returns a whole answer in one call, and the
|
|
114
|
+
seven single-question tools. The instructions tell them to ask for a pack when a question follows a chain (a file
|
|
115
|
+
before editing, a change, an error) and to search as usual for a one-hop lookup, which is where the benchmark found
|
|
116
|
+
the saving and where it did not. Measured with agents asking for the pack themselves (lnbits and Dispatch, 400 runs):
|
|
117
|
+
53% cheaper than plain search with the highest quality of any arm, against 42% for the seven tools alone
|
|
118
|
+
([`bench/results/2026-11-15-lean-pack`](bench/results/2026-11-15-lean-pack/)).
|
|
119
|
+
|
|
120
|
+
## 4. Licence and citation
|
|
121
|
+
|
|
122
|
+
Code: [Apache-2.0](LICENSE). The study in [`study/`](study/) (paper, figures, pre-registration, data):
|
|
123
|
+
[CC BY 4.0](study/LICENSE). Benchmark results quote third-party code under its own licences
|
|
124
|
+
([`bench/results/NOTICE`](bench/results/NOTICE)). Releases: [`docs/RELEASING.md`](docs/RELEASING.md).
|
|
125
|
+
|
|
126
|
+
> Hung T. Le. *Precomputed Context, Not More Tools: A Pre-Registered Study of Process Graphs for Coding Agents.* 2026.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""devkb — cross-project dev-process knowledge graph (ADR-SDP-DEVKB-001).
|
|
2
|
+
|
|
3
|
+
Tickets, Bug Lineage, git commit log, work packages/milestones (Phase 1);
|
|
4
|
+
source files/tests, compliance warnings, specs (later phases). One small,
|
|
5
|
+
governed graph per registered project, persisted at
|
|
6
|
+
<project-repo>/.devkb/{nodes,edges,manifest}.jsonl — not a fork of OCO's
|
|
7
|
+
cyber-threat-intel graph (ADR-SDP-FACTORY-EXTRACTION-001 judged that one
|
|
8
|
+
domain-coupled and deliberately non-reusable) and not an extension of
|
|
9
|
+
discovery/'s component-architecture graph (discovery/ontology.md scopes
|
|
10
|
+
itself to source structure only, by design).
|
|
11
|
+
"""
|