stitchgraph 3.27.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 (262) hide show
  1. stitchgraph-3.27.1/.github/workflows/ci.yml +52 -0
  2. stitchgraph-3.27.1/.github/workflows/publish.yml +23 -0
  3. stitchgraph-3.27.1/.gitignore +16 -0
  4. stitchgraph-3.27.1/AGENTS.md +62 -0
  5. stitchgraph-3.27.1/CHANGELOG.md +2612 -0
  6. stitchgraph-3.27.1/CONTRIBUTING.md +473 -0
  7. stitchgraph-3.27.1/LICENSE +21 -0
  8. stitchgraph-3.27.1/LIMITATIONS.md +619 -0
  9. stitchgraph-3.27.1/PKG-INFO +316 -0
  10. stitchgraph-3.27.1/README.md +253 -0
  11. stitchgraph-3.27.1/RELEASE_READINESS.md +113 -0
  12. stitchgraph-3.27.1/REVIEW_HISTORY.md +2461 -0
  13. stitchgraph-3.27.1/docs/BODY_MATRIX_LESSONS.md +162 -0
  14. stitchgraph-3.27.1/docs/IDEAS.md +340 -0
  15. stitchgraph-3.27.1/docs/LANGUAGES.md +90 -0
  16. stitchgraph-3.27.1/docs/OVERVIEW.md +132 -0
  17. stitchgraph-3.27.1/docs/RELEASE_NOTES_v0.2.0.md +85 -0
  18. stitchgraph-3.27.1/docs/RELEASE_NOTES_v0.3.0.md +72 -0
  19. stitchgraph-3.27.1/docs/RELEASE_NOTES_v0.4.0.md +103 -0
  20. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.0.md +110 -0
  21. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.1.md +116 -0
  22. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.2.md +82 -0
  23. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.3.md +57 -0
  24. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.4.md +73 -0
  25. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.5.md +57 -0
  26. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.6.md +189 -0
  27. stitchgraph-3.27.1/docs/RELEASE_NOTES_v1.0.7.md +104 -0
  28. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.0.0.md +91 -0
  29. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.0.1.md +45 -0
  30. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.0.md +70 -0
  31. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.1.md +54 -0
  32. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.10.md +41 -0
  33. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.11.md +54 -0
  34. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.12.md +50 -0
  35. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.13.md +43 -0
  36. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.14.md +43 -0
  37. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.15.md +44 -0
  38. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.16.md +37 -0
  39. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.17.md +38 -0
  40. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.18.md +107 -0
  41. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.19.md +59 -0
  42. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.2.md +57 -0
  43. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.20.md +72 -0
  44. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.21.md +74 -0
  45. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.22.md +68 -0
  46. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.23.md +69 -0
  47. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.24.md +58 -0
  48. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.25.md +70 -0
  49. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.26.md +63 -0
  50. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.27.md +60 -0
  51. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.28.md +55 -0
  52. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.29.md +54 -0
  53. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.3.md +62 -0
  54. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.30.md +48 -0
  55. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.31.md +58 -0
  56. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.4.md +85 -0
  57. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.5.md +63 -0
  58. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.6.md +59 -0
  59. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.7.md +44 -0
  60. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.8.md +37 -0
  61. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.1.9.md +43 -0
  62. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.2.0.md +86 -0
  63. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.2.1.md +58 -0
  64. stitchgraph-3.27.1/docs/RELEASE_NOTES_v2.3.0.md +52 -0
  65. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.0.0.md +78 -0
  66. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.1.0.md +65 -0
  67. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.2.0.md +71 -0
  68. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.24.0.md +83 -0
  69. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.25.0.md +136 -0
  70. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.25.1.md +25 -0
  71. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.26.0.md +44 -0
  72. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.27.0.md +32 -0
  73. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.27.1.md +33 -0
  74. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.3.0.md +79 -0
  75. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.4.0.md +76 -0
  76. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.5.0.md +84 -0
  77. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.6.0.md +101 -0
  78. stitchgraph-3.27.1/docs/RELEASE_NOTES_v3.7.0.md +166 -0
  79. stitchgraph-3.27.1/docs/REVIEW_FINDINGS_2026-07-03.md +84 -0
  80. stitchgraph-3.27.1/docs/STATUS.md +108 -0
  81. stitchgraph-3.27.1/docs/TESTING.md +102 -0
  82. stitchgraph-3.27.1/docs/V2_STREAMING_DESIGN.md +98 -0
  83. stitchgraph-3.27.1/docs/design.md +684 -0
  84. stitchgraph-3.27.1/pyproject.toml +94 -0
  85. stitchgraph-3.27.1/release_readiness.json +3348 -0
  86. stitchgraph-3.27.1/research/01-structural-redundancy/FINDINGS.md +71 -0
  87. stitchgraph-3.27.1/research/01-structural-redundancy/experiment.py +102 -0
  88. stitchgraph-3.27.1/research/01-structural-redundancy/experiment_idf.py +74 -0
  89. stitchgraph-3.27.1/research/02-body-matrix/FINDINGS.md +81 -0
  90. stitchgraph-3.27.1/research/02-body-matrix/body_matrix.py +164 -0
  91. stitchgraph-3.27.1/research/02-body-matrix/fixtures/clones.py +31 -0
  92. stitchgraph-3.27.1/research/03-pdg/FINDINGS.md +87 -0
  93. stitchgraph-3.27.1/research/03-pdg/fixtures/pdg_clones.py +62 -0
  94. stitchgraph-3.27.1/research/03-pdg/pdg.py +220 -0
  95. stitchgraph-3.27.1/research/04-expr-dfg/FINDINGS.md +50 -0
  96. stitchgraph-3.27.1/research/04-expr-dfg/expr_dfg.py +280 -0
  97. stitchgraph-3.27.1/research/05-archetype-purpose/FINDINGS.md +95 -0
  98. stitchgraph-3.27.1/research/06-spectral/FINDINGS.md +117 -0
  99. stitchgraph-3.27.1/research/06-spectral/pod_coverage.py +127 -0
  100. stitchgraph-3.27.1/research/06-spectral/spectral_cluster.py +165 -0
  101. stitchgraph-3.27.1/research/06-spectral/spectral_criticality.py +144 -0
  102. stitchgraph-3.27.1/research/06-spectral/spectral_decompose.py +189 -0
  103. stitchgraph-3.27.1/research/06-spectral/spectral_probe.py +158 -0
  104. stitchgraph-3.27.1/research/06-spectral/spectral_scale.py +159 -0
  105. stitchgraph-3.27.1/research/07-dogfood-build/FINDINGS.md +147 -0
  106. stitchgraph-3.27.1/research/07-dogfood-build/round1/DEVLOG_A_stitchgraph.md +257 -0
  107. stitchgraph-3.27.1/research/07-dogfood-build/round1/DEVLOG_B_control.md +288 -0
  108. stitchgraph-3.27.1/research/07-dogfood-build/round1/SPEC.md +89 -0
  109. stitchgraph-3.27.1/research/07-dogfood-build/round1/acceptance.py +119 -0
  110. stitchgraph-3.27.1/research/07-dogfood-build/round2/BASE_SPEC.md +58 -0
  111. stitchgraph-3.27.1/research/07-dogfood-build/round2/CHANGE.md +54 -0
  112. stitchgraph-3.27.1/research/07-dogfood-build/round2/DEVLOG_A_stitchgraph.md +314 -0
  113. stitchgraph-3.27.1/research/07-dogfood-build/round2/DEVLOG_B_control.md +238 -0
  114. stitchgraph-3.27.1/research/07-dogfood-build/round2/acceptance_phase2.py +151 -0
  115. stitchgraph-3.27.1/research/08-large-repo-impact/FINDINGS.md +148 -0
  116. stitchgraph-3.27.1/research/09-translation/FINDINGS.md +105 -0
  117. stitchgraph-3.27.1/research/10-pod-python/FINDINGS.md +117 -0
  118. stitchgraph-3.27.1/research/10-pod-python/full_stitchgraph_pod.txt +86 -0
  119. stitchgraph-3.27.1/research/10-pod-python/pod_modes.py +66 -0
  120. stitchgraph-3.27.1/research/10-pod-python/pod_uses.py +53 -0
  121. stitchgraph-3.27.1/research/11-pod-roadmap.md +145 -0
  122. stitchgraph-3.27.1/research/12-self-analysis.md +81 -0
  123. stitchgraph-3.27.1/research/13-large-repos.md +293 -0
  124. stitchgraph-3.27.1/research/14-dogfood-v3.25.md +115 -0
  125. stitchgraph-3.27.1/research/15-dogfood-v3.27.md +75 -0
  126. stitchgraph-3.27.1/research/README.md +241 -0
  127. stitchgraph-3.27.1/research/SYNTHESIS.md +72 -0
  128. stitchgraph-3.27.1/research/archetype_fingerprint.py +189 -0
  129. stitchgraph-3.27.1/research/archetype_scale.py +239 -0
  130. stitchgraph-3.27.1/research/find_component.py +77 -0
  131. stitchgraph-3.27.1/research/find_component_eval.py +112 -0
  132. stitchgraph-3.27.1/research/graphdiff/FINDINGS.md +117 -0
  133. stitchgraph-3.27.1/research/graphdiff/demo.py +124 -0
  134. stitchgraph-3.27.1/research/graphdiff/fixtures/calc_js/calc.js +129 -0
  135. stitchgraph-3.27.1/research/graphdiff/fixtures/calc_py/calc.py +110 -0
  136. stitchgraph-3.27.1/research/graphdiff/graphdiff.py +134 -0
  137. stitchgraph-3.27.1/research/graphdiff/measure_translation.py +75 -0
  138. stitchgraph-3.27.1/research/graphdiff/structure_diff.py +126 -0
  139. stitchgraph-3.27.1/research/risk_centrality_check.py +83 -0
  140. stitchgraph-3.27.1/review-kit/panel_prompt.template.md +86 -0
  141. stitchgraph-3.27.1/scripts/mutate.py +162 -0
  142. stitchgraph-3.27.1/scripts/readiness.py +214 -0
  143. stitchgraph-3.27.1/src/stitchgraph/__init__.py +85 -0
  144. stitchgraph-3.27.1/src/stitchgraph/adapters/__init__.py +4 -0
  145. stitchgraph-3.27.1/src/stitchgraph/adapters/_guard.py +47 -0
  146. stitchgraph-3.27.1/src/stitchgraph/adapters/cli.py +219 -0
  147. stitchgraph-3.27.1/src/stitchgraph/adapters/mcp.py +88 -0
  148. stitchgraph-3.27.1/src/stitchgraph/adapters/render.py +56 -0
  149. stitchgraph-3.27.1/src/stitchgraph/adapters/report.py +99 -0
  150. stitchgraph-3.27.1/src/stitchgraph/core/__init__.py +12 -0
  151. stitchgraph-3.27.1/src/stitchgraph/core/_scc.py +60 -0
  152. stitchgraph-3.27.1/src/stitchgraph/core/algebra.py +167 -0
  153. stitchgraph-3.27.1/src/stitchgraph/core/config.py +104 -0
  154. stitchgraph-3.27.1/src/stitchgraph/core/coverage_query.py +194 -0
  155. stitchgraph-3.27.1/src/stitchgraph/core/coverage_scaffold.py +258 -0
  156. stitchgraph-3.27.1/src/stitchgraph/core/dataloop.py +49 -0
  157. stitchgraph-3.27.1/src/stitchgraph/core/entrypoints.py +137 -0
  158. stitchgraph-3.27.1/src/stitchgraph/core/envelope.py +156 -0
  159. stitchgraph-3.27.1/src/stitchgraph/core/extract/__init__.py +60 -0
  160. stitchgraph-3.27.1/src/stitchgraph/core/extract/_testfile.py +22 -0
  161. stitchgraph-3.27.1/src/stitchgraph/core/extract/python.py +1808 -0
  162. stitchgraph-3.27.1/src/stitchgraph/core/extract/treesitter.py +3072 -0
  163. stitchgraph-3.27.1/src/stitchgraph/core/gitrisk.py +98 -0
  164. stitchgraph-3.27.1/src/stitchgraph/core/graphdiff.py +127 -0
  165. stitchgraph-3.27.1/src/stitchgraph/core/model.py +140 -0
  166. stitchgraph-3.27.1/src/stitchgraph/core/modes.py +411 -0
  167. stitchgraph-3.27.1/src/stitchgraph/core/operations.py +2107 -0
  168. stitchgraph-3.27.1/src/stitchgraph/core/reach.py +293 -0
  169. stitchgraph-3.27.1/src/stitchgraph/core/resolve/__init__.py +140 -0
  170. stitchgraph-3.27.1/src/stitchgraph/core/resolve/events.py +124 -0
  171. stitchgraph-3.27.1/src/stitchgraph/core/resolve/express.py +144 -0
  172. stitchgraph-3.27.1/src/stitchgraph/core/resolve/html.py +113 -0
  173. stitchgraph-3.27.1/src/stitchgraph/core/resolve/jedi_resolver.py +96 -0
  174. stitchgraph-3.27.1/src/stitchgraph/core/resolve/jsfetch.py +145 -0
  175. stitchgraph-3.27.1/src/stitchgraph/core/resolve/orm.py +111 -0
  176. stitchgraph-3.27.1/src/stitchgraph/core/resolve/routes.py +118 -0
  177. stitchgraph-3.27.1/src/stitchgraph/core/resolve/spring.py +117 -0
  178. stitchgraph-3.27.1/src/stitchgraph/core/resolve/sql.py +139 -0
  179. stitchgraph-3.27.1/src/stitchgraph/core/runtime.py +192 -0
  180. stitchgraph-3.27.1/src/stitchgraph/core/similar.py +301 -0
  181. stitchgraph-3.27.1/src/stitchgraph/core/spectral.py +252 -0
  182. stitchgraph-3.27.1/src/stitchgraph/core/store.py +882 -0
  183. stitchgraph-3.27.1/src/stitchgraph/core/structure.py +570 -0
  184. stitchgraph-3.27.1/src/stitchgraph/core/structure_bash.py +584 -0
  185. stitchgraph-3.27.1/src/stitchgraph/core/structure_common.py +120 -0
  186. stitchgraph-3.27.1/src/stitchgraph/core/structure_cpp.py +928 -0
  187. stitchgraph-3.27.1/src/stitchgraph/core/structure_csharp.py +908 -0
  188. stitchgraph-3.27.1/src/stitchgraph/core/structure_go.py +665 -0
  189. stitchgraph-3.27.1/src/stitchgraph/core/structure_java.py +752 -0
  190. stitchgraph-3.27.1/src/stitchgraph/core/structure_js.py +705 -0
  191. stitchgraph-3.27.1/src/stitchgraph/core/structure_php.py +752 -0
  192. stitchgraph-3.27.1/src/stitchgraph/core/structure_ruby.py +649 -0
  193. stitchgraph-3.27.1/src/stitchgraph/core/structure_rust.py +798 -0
  194. stitchgraph-3.27.1/src/stitchgraph/core/watch.py +43 -0
  195. stitchgraph-3.27.1/stitchgraph.toml.example +25 -0
  196. stitchgraph-3.27.1/tests/oracles/README.md +30 -0
  197. stitchgraph-3.27.1/tests/oracles/test_cardinal_matrix.py +71 -0
  198. stitchgraph-3.27.1/tests/oracles/test_comment_invariance.py +247 -0
  199. stitchgraph-3.27.1/tests/oracles/test_corrupt_store.py +126 -0
  200. stitchgraph-3.27.1/tests/oracles/test_graph_diff_dogfood.py +39 -0
  201. stitchgraph-3.27.1/tests/oracles/test_incremental_differential.py +169 -0
  202. stitchgraph-3.27.1/tests/oracles/test_param_and_index_invariance.py +129 -0
  203. stitchgraph-3.27.1/tests/oracles/test_pdg_bash_vfg_differential.py +131 -0
  204. stitchgraph-3.27.1/tests/oracles/test_pdg_cpp_vfg_differential.py +190 -0
  205. stitchgraph-3.27.1/tests/oracles/test_pdg_csharp_vfg_differential.py +120 -0
  206. stitchgraph-3.27.1/tests/oracles/test_pdg_java_vfg_differential.py +131 -0
  207. stitchgraph-3.27.1/tests/oracles/test_pdg_php_vfg_differential.py +130 -0
  208. stitchgraph-3.27.1/tests/oracles/test_pdg_ruby_vfg_differential.py +126 -0
  209. stitchgraph-3.27.1/tests/oracles/test_pdg_rust_vfg_differential.py +231 -0
  210. stitchgraph-3.27.1/tests/oracles/test_pdg_source_bash_layer.py +196 -0
  211. stitchgraph-3.27.1/tests/oracles/test_pdg_source_cpp_layer.py +276 -0
  212. stitchgraph-3.27.1/tests/oracles/test_pdg_source_csharp_layer.py +254 -0
  213. stitchgraph-3.27.1/tests/oracles/test_pdg_source_go_layer.py +181 -0
  214. stitchgraph-3.27.1/tests/oracles/test_pdg_source_java_layer.py +254 -0
  215. stitchgraph-3.27.1/tests/oracles/test_pdg_source_js_layer.py +182 -0
  216. stitchgraph-3.27.1/tests/oracles/test_pdg_source_layer.py +189 -0
  217. stitchgraph-3.27.1/tests/oracles/test_pdg_source_php_layer.py +227 -0
  218. stitchgraph-3.27.1/tests/oracles/test_pdg_source_ruby_layer.py +203 -0
  219. stitchgraph-3.27.1/tests/oracles/test_pdg_source_rust_layer.py +329 -0
  220. stitchgraph-3.27.1/tests/oracles/test_streaming_differential.py +161 -0
  221. stitchgraph-3.27.1/tests/oracles/test_structure_bash_completeness.py +128 -0
  222. stitchgraph-3.27.1/tests/oracles/test_structure_completeness.py +212 -0
  223. stitchgraph-3.27.1/tests/oracles/test_structure_cpp_completeness.py +214 -0
  224. stitchgraph-3.27.1/tests/oracles/test_structure_csharp_completeness.py +190 -0
  225. stitchgraph-3.27.1/tests/oracles/test_structure_go_completeness.py +159 -0
  226. stitchgraph-3.27.1/tests/oracles/test_structure_java_completeness.py +150 -0
  227. stitchgraph-3.27.1/tests/oracles/test_structure_js_completeness.py +174 -0
  228. stitchgraph-3.27.1/tests/oracles/test_structure_php_completeness.py +146 -0
  229. stitchgraph-3.27.1/tests/oracles/test_structure_ruby_completeness.py +149 -0
  230. stitchgraph-3.27.1/tests/oracles/test_structure_rust_completeness.py +146 -0
  231. stitchgraph-3.27.1/tests/oracles/test_vfg_source_layers.py +95 -0
  232. stitchgraph-3.27.1/tests/test_algebra.py +81 -0
  233. stitchgraph-3.27.1/tests/test_chokepoints.py +104 -0
  234. stitchgraph-3.27.1/tests/test_config.py +63 -0
  235. stitchgraph-3.27.1/tests/test_core.py +118 -0
  236. stitchgraph-3.27.1/tests/test_coverage_query.py +301 -0
  237. stitchgraph-3.27.1/tests/test_dataloop.py +56 -0
  238. stitchgraph-3.27.1/tests/test_eval.py +68 -0
  239. stitchgraph-3.27.1/tests/test_extract.py +164 -0
  240. stitchgraph-3.27.1/tests/test_find_similar_structure.py +398 -0
  241. stitchgraph-3.27.1/tests/test_frameworks.py +77 -0
  242. stitchgraph-3.27.1/tests/test_graph_diff.py +481 -0
  243. stitchgraph-3.27.1/tests/test_layer_matrix.py +320 -0
  244. stitchgraph-3.27.1/tests/test_mcp.py +152 -0
  245. stitchgraph-3.27.1/tests/test_modes.py +264 -0
  246. stitchgraph-3.27.1/tests/test_polyglot.py +143 -0
  247. stitchgraph-3.27.1/tests/test_properties.py +117 -0
  248. stitchgraph-3.27.1/tests/test_reach_pure.py +133 -0
  249. stitchgraph-3.27.1/tests/test_regressions.py +9139 -0
  250. stitchgraph-3.27.1/tests/test_resolve.py +235 -0
  251. stitchgraph-3.27.1/tests/test_review_body_matrix.py +115 -0
  252. stitchgraph-3.27.1/tests/test_risk.py +50 -0
  253. stitchgraph-3.27.1/tests/test_runtime.py +92 -0
  254. stitchgraph-3.27.1/tests/test_safety.py +71 -0
  255. stitchgraph-3.27.1/tests/test_scc.py +116 -0
  256. stitchgraph-3.27.1/tests/test_seams.py +49 -0
  257. stitchgraph-3.27.1/tests/test_selfaudit.py +55 -0
  258. stitchgraph-3.27.1/tests/test_similar.py +282 -0
  259. stitchgraph-3.27.1/tests/test_streaming_reindex.py +281 -0
  260. stitchgraph-3.27.1/tests/test_structure.py +335 -0
  261. stitchgraph-3.27.1/tests/test_subsystems.py +191 -0
  262. stitchgraph-3.27.1/tests/test_watch.py +24 -0
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ name: test (py${{ matrix.python-version }})
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.11", "3.12"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - run: python -m pip install --upgrade pip
22
+ - run: pip install -e ".[all,dev]"
23
+ - run: pytest -q
24
+
25
+ lint:
26
+ name: lint + type-check
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.12"
33
+ - run: python -m pip install --upgrade pip
34
+ - run: pip install -e ".[all,dev]"
35
+ - run: ruff check src tests
36
+ - run: mypy
37
+
38
+ # Prove the stdlib-only core: install the package with NO optional extras, so
39
+ # every gated surface (tree-sitter, graphblas, sqlglot, jedi, mcp) is absent and
40
+ # its tests must skip cleanly rather than error. The analog of an optional-deps
41
+ # job — here it guards the "core is stdlib-only" claim.
42
+ core-only:
43
+ name: core-only (no extras)
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ - uses: actions/setup-python@v5
48
+ with:
49
+ python-version: "3.12"
50
+ - run: python -m pip install --upgrade pip
51
+ - run: pip install -e . pytest
52
+ - run: pytest -q
@@ -0,0 +1,23 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build-and-publish:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write # trusted publishing (no token needed)
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - name: Build
19
+ run: |
20
+ python -m pip install --upgrade build
21
+ python -m build
22
+ - name: Publish
23
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .eggs/
5
+ build/
6
+ dist/
7
+ .pytest_cache/
8
+ .venv/
9
+ venv/
10
+ *.db
11
+ stitchgraph.db
12
+ .DS_Store
13
+ .coverage*
14
+ .readiness_cov.json
15
+ .claude/worktrees/
16
+ research/_corpus/
@@ -0,0 +1,62 @@
1
+ # Using stitchgraph (agent rules)
2
+
3
+ stitchgraph is a code-intelligence graph for this repository, available as MCP
4
+ tools, a CLI (`stitchgraph <op>`), and a Python library (`import stitchgraph`).
5
+ **Query the graph before grepping** — it already knows the structure, callers,
6
+ impact, and full-stack paths, with a confidence on every answer.
7
+
8
+ ## First, index
9
+ Run `reindex <path>` once (and after large changes). Add `--precise` for
10
+ jedi-accurate resolution. Optionally `ingest_trace coverage.json` after running
11
+ tests to ground liveness in what actually executed.
12
+
13
+ ## Situational rules
14
+
15
+ - **Landing on unfamiliar code?** Call `orient` first — it returns the entry
16
+ points, the most-depended-on hubs to read first, the layers, and subsystems.
17
+ Don't read files at random.
18
+ - **About to edit a function?** Call `impact_of <name>` for the blast radius and
19
+ exactly which tests to run. Edit with that in mind.
20
+ - **Need to understand how a request flows?** Call `trace_path <source> <sink>` —
21
+ it returns the full-stack path (HTML form → route → handler → … → DB table)
22
+ with a propagated confidence.
23
+ - **Looking for "the code that does X"?** Call `find_similar "<description>"`
24
+ before grepping; fall back to `find_symbol <name>` for an exact name.
25
+ - **Who calls / what does this call?** `get_callers` / `get_callees`.
26
+ - **Tempted to delete "unused" code?** Call `find_stale` — but it is advisory.
27
+ **Respect `needs_review`**: a result is "unreached by my analysis," not "proven
28
+ dead." Verify (dynamic dispatch, plugins, framework callbacks) before deleting.
29
+ - **Hunting bugs / tech debt?** Call `scan` — ranked issues with urgency
30
+ (🔴 fix now / 🟠 look closer / 🟢 cleanup): live stubs, holes, cycles, data
31
+ loops, god objects. Triage by urgency, **then by `needs_review`**: a cycle or
32
+ god-object whose coupling rests on name-ambiguous/heuristic edges is flagged
33
+ `needs_review: true`, capped to 🟢, and reports its confident-only degree — it's
34
+ likely a resolution artifact (common on languages without type resolution), so
35
+ verify before acting.
36
+ - **Where's the risk?** Call `risk` — files that change often AND are depended on
37
+ heavily, plus hidden coupling (files that co-change but share no code edge).
38
+ - **What's dangerous to touch structurally?** Call `find_chokepoints` — the
39
+ articulation points (sole bridges whose removal fragments the graph), ranked by
40
+ blast radius. Distinct from `risk`/`orient`: a chokepoint can have modest
41
+ fan-in/out yet be the only link between two subsystems. Advisory.
42
+ - **Want the codebase's natural subsystems?** Call `find_subsystems` — spectral
43
+ clustering of the call graph into auto-labelled clusters (the structural
44
+ complement to `orient`/`summarize_subsystem`; it *discovers* the boundaries).
45
+ Advisory; `[spectral]` extra (scipy) lets it scale past large graphs.
46
+ - **Want the raw structure of one module?** `get_matrix <scope> <relation>` —
47
+ a small relation matrix for a single file/class (it refuses broad scopes).
48
+
49
+ ## Reading results
50
+ Every result carries `confidence`, `provenance`, and `needs_review`. Treat
51
+ `needs_review: true` as "double-check this," and prefer high-confidence,
52
+ `extracted`-provenance answers. Issue results also carry an `urgency`.
53
+
54
+ ## Don't
55
+ - Don't treat `find_stale` / `find_holes` as ground truth — they're suspicion,
56
+ not proof, and stitchgraph never edits code itself.
57
+ - Don't read `find_holes` returning empty as "no broken wiring": it reports references
58
+ orphaned by edits (delete/rename), not first-index calls to undefined/stdlib names. For
59
+ reachable unimplemented stubs (the `is_stub ∧ reachable` landmine), use `scan` — they
60
+ surface there as `live_stub`.
61
+ - Don't dump whole matrices into context; use the bounded `get_matrix` or the
62
+ summaries from `orient`.