arango-sparql-py 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.
Files changed (613) hide show
  1. arango_sparql_py-0.2.0/.cursor/rules/000-project-context.mdc +61 -0
  2. arango_sparql_py-0.2.0/.cursor/rules/100-backend-python.mdc +86 -0
  3. arango_sparql_py-0.2.0/.cursor/rules/200-testing.mdc +62 -0
  4. arango_sparql_py-0.2.0/.cursor/rules/300-nl2sparql.mdc +48 -0
  5. arango_sparql_py-0.2.0/.cursor/rules/400-frontend-ui.mdc +58 -0
  6. arango_sparql_py-0.2.0/.cursor/rules/checkpoint-regularly.mdc +44 -0
  7. arango_sparql_py-0.2.0/.cursor/rules/comprehensiveness-over-simplification.mdc +64 -0
  8. arango_sparql_py-0.2.0/.cursor/rules/incremental-over-atomic.mdc +50 -0
  9. arango_sparql_py-0.2.0/.cursor/rules/modularity-and-structure.mdc +53 -0
  10. arango_sparql_py-0.2.0/.cursor/rules/read-before-write.mdc +52 -0
  11. arango_sparql_py-0.2.0/.cursor/rules/surface-dont-guess.mdc +56 -0
  12. arango_sparql_py-0.2.0/.cursor/rules/test-what-you-touch.mdc +52 -0
  13. arango_sparql_py-0.2.0/.cursor/rules/ui-architecture.mdc +276 -0
  14. arango_sparql_py-0.2.0/.cursor/rules/verify-before-done.mdc +52 -0
  15. arango_sparql_py-0.2.0/.cursor/rules/wiring-over-deletion.mdc +41 -0
  16. arango_sparql_py-0.2.0/.cursor/skills/sparql-to-aql/SKILL.md +220 -0
  17. arango_sparql_py-0.2.0/.env.example +28 -0
  18. arango_sparql_py-0.2.0/.gitguardian.yaml +21 -0
  19. arango_sparql_py-0.2.0/.github/workflows/ci.yml +137 -0
  20. arango_sparql_py-0.2.0/.github/workflows/publish.yml +120 -0
  21. arango_sparql_py-0.2.0/.github/workflows/w3c-nightly.yml +54 -0
  22. arango_sparql_py-0.2.0/.gitignore +87 -0
  23. arango_sparql_py-0.2.0/.planning/BRIEF-nl-to-conceptual-sota.md +151 -0
  24. arango_sparql_py-0.2.0/.planning/INGEST-CONFLICTS.md +33 -0
  25. arango_sparql_py-0.2.0/.planning/PROJECT.md +105 -0
  26. arango_sparql_py-0.2.0/.planning/REQUIREMENTS.md +151 -0
  27. arango_sparql_py-0.2.0/.planning/ROADMAP.md +546 -0
  28. arango_sparql_py-0.2.0/.planning/STATE.md +269 -0
  29. arango_sparql_py-0.2.0/.planning/config.json +5 -0
  30. arango_sparql_py-0.2.0/.planning/intel/SYNTHESIS.md +38 -0
  31. arango_sparql_py-0.2.0/.planning/intel/classifications/0001-named-graphs-per-document-a1f3c9d2.json +13 -0
  32. arango_sparql_py-0.2.0/.planning/intel/classifications/0002-cross-subject-optional-leftjoin-3f2a9c7d.json +13 -0
  33. arango_sparql_py-0.2.0/.planning/intel/classifications/300-nl2sparql-6a3f9c1d.json +27 -0
  34. arango_sparql_py-0.2.0/.planning/intel/classifications/COVERAGE-REPORT-3f9a1c2e.json +19 -0
  35. arango_sparql_py-0.2.0/.planning/intel/classifications/PRD-7c4a1f9e.json +29 -0
  36. arango_sparql_py-0.2.0/.planning/intel/classifications/SKILL-7b3d9f2a.json +37 -0
  37. arango_sparql_py-0.2.0/.planning/intel/classifications/implementation-plan-b7e4a91c.json +13 -0
  38. arango_sparql_py-0.2.0/.planning/intel/classifications/vision-7b3c9e14.json +13 -0
  39. arango_sparql_py-0.2.0/.planning/intel/constraints.md +58 -0
  40. arango_sparql_py-0.2.0/.planning/intel/context.md +67 -0
  41. arango_sparql_py-0.2.0/.planning/intel/decisions.md +74 -0
  42. arango_sparql_py-0.2.0/.planning/intel/requirements.md +123 -0
  43. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-01-PLAN.md +217 -0
  44. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-01-SUMMARY.md +115 -0
  45. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-02-PLAN.md +235 -0
  46. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-02-SUMMARY.md +135 -0
  47. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-03-PLAN.md +170 -0
  48. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-03-SUMMARY.md +117 -0
  49. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-04-PLAN.md +164 -0
  50. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-04-SUMMARY.md +110 -0
  51. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-05-PLAN.md +168 -0
  52. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-05-SUMMARY.md +126 -0
  53. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-06-PLAN.md +188 -0
  54. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-06-SUMMARY.md +137 -0
  55. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-07-PLAN.md +161 -0
  56. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-07-SUMMARY.md +148 -0
  57. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-08-PLAN.md +163 -0
  58. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-08-SUMMARY.md +97 -0
  59. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-CONTEXT.md +198 -0
  60. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-DISCUSSION-LOG.md +97 -0
  61. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-PATTERNS.md +454 -0
  62. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-RESEARCH.md +744 -0
  63. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-VALIDATION.md +87 -0
  64. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/04-VERIFICATION.md +160 -0
  65. arango_sparql_py-0.2.0/.planning/phases/04-interoperability-performance-verification/deferred-items.md +79 -0
  66. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-01-PLAN.md +161 -0
  67. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-01-SUMMARY.md +110 -0
  68. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-02-PLAN.md +213 -0
  69. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-02-SUMMARY.md +127 -0
  70. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-03-PLAN.md +155 -0
  71. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-03-SUMMARY.md +104 -0
  72. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-PATTERNS.md +265 -0
  73. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-RESEARCH.md +510 -0
  74. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-REVIEW-FIX.md +111 -0
  75. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-REVIEW.md +225 -0
  76. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-VALIDATION.md +80 -0
  77. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/06-VERIFICATION.md +109 -0
  78. arango_sparql_py-0.2.0/.planning/phases/06-nl-sparql-eval-harness-seed-corpus/deferred-items.md +28 -0
  79. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/.gitkeep +0 -0
  80. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-01-PLAN.md +152 -0
  81. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-01-SUMMARY.md +45 -0
  82. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-02-PLAN.md +273 -0
  83. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-02-SUMMARY.md +48 -0
  84. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-03-PLAN.md +278 -0
  85. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-03-SUMMARY.md +63 -0
  86. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-RESEARCH.md +56 -0
  87. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-SPIKE-repoint.py +148 -0
  88. arango_sparql_py-0.2.0/.planning/phases/06.1-re-point-nl2sparql-onto-arango-query-core-shared-engine/06.1-VALIDATION.md +73 -0
  89. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/.gitkeep +0 -0
  90. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-01-PLAN.md +184 -0
  91. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-01-SUMMARY.md +113 -0
  92. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-02-PLAN.md +225 -0
  93. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-02-SUMMARY.md +126 -0
  94. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-03-PLAN.md +242 -0
  95. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-03-SUMMARY.md +113 -0
  96. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-04-PLAN.md +228 -0
  97. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-04-SUMMARY.md +115 -0
  98. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-AI-SPEC.md +531 -0
  99. arango_sparql_py-0.2.0/.planning/phases/06.2-nl-to-sparql-harder-corpus-and-genuine-live-model-baseline/06.2-VERIFICATION.md +107 -0
  100. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-01-PLAN.md +215 -0
  101. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-01-SUMMARY.md +147 -0
  102. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-02-PLAN.md +229 -0
  103. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-02-SUMMARY.md +114 -0
  104. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-03-PLAN.md +243 -0
  105. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-03-SUMMARY.md +150 -0
  106. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-04-PLAN.md +322 -0
  107. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-04-SUMMARY.md +258 -0
  108. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-AUDIT.md +43 -0
  109. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-CONTEXT.md +246 -0
  110. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-DISCUSSION-LOG.md +116 -0
  111. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-PATTERNS.md +484 -0
  112. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-RESEARCH.md +771 -0
  113. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-REVIEW.md +183 -0
  114. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-VALIDATION.md +90 -0
  115. arango_sparql_py-0.2.0/.planning/phases/07-nl-sparql-dense-few-shot-retrieval/07-VERIFICATION.md +167 -0
  116. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/.gitkeep +0 -0
  117. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-01-PLAN.md +177 -0
  118. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-01-SUMMARY.md +132 -0
  119. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-02-PLAN.md +101 -0
  120. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-02-SUMMARY.md +93 -0
  121. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-03-PLAN.md +129 -0
  122. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-03-SUMMARY.md +125 -0
  123. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-04-PLAN.md +161 -0
  124. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-04-SUMMARY.md +145 -0
  125. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-05-PLAN.md +162 -0
  126. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-05-SUMMARY.md +163 -0
  127. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-06-PLAN.md +180 -0
  128. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-06-SUMMARY.md +154 -0
  129. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-CONTEXT.md +221 -0
  130. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-DISCUSSION-LOG.md +134 -0
  131. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-RESEARCH.md +840 -0
  132. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-REVIEW.md +226 -0
  133. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-VALIDATION.md +88 -0
  134. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/07.1-VERIFICATION.md +105 -0
  135. arango_sparql_py-0.2.0/.planning/phases/07.1-nl-to-sparql-synthetic-eval-corpus-growth-ontology-driven-ge/deferred-items.md +66 -0
  136. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-01-PLAN.md +308 -0
  137. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-01-SUMMARY.md +138 -0
  138. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-02-PLAN.md +162 -0
  139. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-02-SUMMARY.md +99 -0
  140. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-03-PLAN.md +208 -0
  141. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-03-SUMMARY.md +131 -0
  142. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-04-PLAN.md +164 -0
  143. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-04-SUMMARY.md +102 -0
  144. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-CONTEXT.md +152 -0
  145. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-RESEARCH.md +438 -0
  146. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-SPIKE-FINDINGS.md +84 -0
  147. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-VALIDATION.md +72 -0
  148. arango_sparql_py-0.2.0/.planning/phases/07.2-execution-based-eval-judging-for-adopted-benchmarks-ck25/07.2-VERIFICATION.md +111 -0
  149. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/.gitkeep +1 -0
  150. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-01-PLAN.md +219 -0
  151. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-01-SUMMARY.md +146 -0
  152. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-02-PLAN.md +152 -0
  153. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-02-SUMMARY.md +137 -0
  154. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-03-PLAN.md +198 -0
  155. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-03-SUMMARY.md +135 -0
  156. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-04-PLAN.md +189 -0
  157. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-04-SUMMARY.md +114 -0
  158. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-05-PLAN.md +161 -0
  159. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-05-SUMMARY.md +104 -0
  160. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-06-PLAN.md +181 -0
  161. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-06-SUMMARY.md +184 -0
  162. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-PATTERNS.md +505 -0
  163. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-RESEARCH.md +833 -0
  164. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-REVIEW.md +247 -0
  165. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-SPIKE-FINDINGS.md +69 -0
  166. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-VALIDATION.md +82 -0
  167. arango_sparql_py-0.2.0/.planning/phases/07.3-nl-to-sparql-entity-instance-grounding/07.3-VERIFICATION.md +137 -0
  168. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/.gitkeep +0 -0
  169. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-01-PLAN.md +217 -0
  170. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-01-SUMMARY.md +78 -0
  171. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-02-PLAN.md +187 -0
  172. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-02-SUMMARY.md +150 -0
  173. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-03-PLAN.md +207 -0
  174. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-03-SUMMARY.md +183 -0
  175. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-04-PLAN.md +217 -0
  176. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-04-SUMMARY.md +176 -0
  177. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-05-PLAN.md +226 -0
  178. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-05-SUMMARY.md +122 -0
  179. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-06-SUMMARY.md +213 -0
  180. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-CONTEXT.md +192 -0
  181. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-DISCUSSION-LOG.md +73 -0
  182. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-PATTERNS.md +664 -0
  183. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-RESEARCH.md +841 -0
  184. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-REVIEW.md +252 -0
  185. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-VALIDATION.md +90 -0
  186. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/07.4-VERIFICATION.md +128 -0
  187. arango_sparql_py-0.2.0/.planning/phases/07.4-nl-sparql-predicate-schema-convention-grounding/deferred-items.md +26 -0
  188. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-01-PLAN.md +182 -0
  189. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-01-SUMMARY.md +110 -0
  190. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-02-PLAN.md +157 -0
  191. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-02-SUMMARY.md +134 -0
  192. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-03-PLAN.md +153 -0
  193. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-03-SUMMARY.md +163 -0
  194. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-04-PLAN.md +144 -0
  195. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-04-SUMMARY.md +180 -0
  196. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-05-DEVIATION-FIX-2-SUMMARY.md +136 -0
  197. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-05-DEVIATION-FIX-SUMMARY.md +164 -0
  198. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-05-PLAN.md +192 -0
  199. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-05-SUMMARY.md +198 -0
  200. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-06-PLAN.md +152 -0
  201. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-06-SUMMARY.md +133 -0
  202. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-CONTEXT.md +162 -0
  203. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-DISCUSSION-LOG.md +40 -0
  204. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-RESEARCH.md +411 -0
  205. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-SPEC.md +114 -0
  206. arango_sparql_py-0.2.0/.planning/phases/07.5-nl-sparql-query-first-synthetic-few-shot-bank/07.5-VALIDATION.md +97 -0
  207. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/.gitkeep +1 -0
  208. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-01-PLAN.md +240 -0
  209. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-01-SUMMARY.md +211 -0
  210. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-02-PLAN.md +234 -0
  211. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-02-SUMMARY.md +172 -0
  212. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-03-PLAN.md +211 -0
  213. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-03-SUMMARY.md +193 -0
  214. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-CONTEXT.md +180 -0
  215. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-DISCUSSION-LOG.md +73 -0
  216. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-PATTERNS.md +317 -0
  217. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-RESEARCH.md +548 -0
  218. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-SPEC.md +133 -0
  219. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-VALIDATION.md +115 -0
  220. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/07.6-VERIFICATION.md +116 -0
  221. arango_sparql_py-0.2.0/.planning/phases/07.6-nl-sparql-relationship-path-grounding/COVERAGE.md +17 -0
  222. arango_sparql_py-0.2.0/.planning/research/execution-feedback-self-repair-lever.md +81 -0
  223. arango_sparql_py-0.2.0/.planning/research/expasy-schema-context-levers.md +174 -0
  224. arango_sparql_py-0.2.0/.planning/research/nl-to-sparql-sota.md +94 -0
  225. arango_sparql_py-0.2.0/.planning/research/query-first-synthetic-fewshot-bank-design.md +123 -0
  226. arango_sparql_py-0.2.0/.planning/research/relationship-path-grounding-scope.md +95 -0
  227. arango_sparql_py-0.2.0/.planning/spikes/001-ck25-thin-fewshot-signal/README.md +175 -0
  228. arango_sparql_py-0.2.0/.planning/spikes/001-ck25-thin-fewshot-signal/ck25_thin_fewshot_bank.yml +126 -0
  229. arango_sparql_py-0.2.0/.planning/spikes/001-ck25-thin-fewshot-signal/run_spike.py +187 -0
  230. arango_sparql_py-0.2.0/.planning/spikes/001-ck25-thin-fewshot-signal/spike_result.json +141 -0
  231. arango_sparql_py-0.2.0/.planning/spikes/001-ck25-thin-fewshot-signal/verify_bank.py +145 -0
  232. arango_sparql_py-0.2.0/.planning/spikes/CONVENTIONS.md +46 -0
  233. arango_sparql_py-0.2.0/.planning/spikes/MANIFEST.md +34 -0
  234. arango_sparql_py-0.2.0/AGENTS.md +288 -0
  235. arango_sparql_py-0.2.0/CLAUDE.md +1 -0
  236. arango_sparql_py-0.2.0/CONTRIBUTING.md +125 -0
  237. arango_sparql_py-0.2.0/Dockerfile +44 -0
  238. arango_sparql_py-0.2.0/LICENSE +21 -0
  239. arango_sparql_py-0.2.0/PKG-INFO +271 -0
  240. arango_sparql_py-0.2.0/README.md +220 -0
  241. arango_sparql_py-0.2.0/RELEASE.md +99 -0
  242. arango_sparql_py-0.2.0/SECURITY.md +46 -0
  243. arango_sparql_py-0.2.0/arango_sparql/__init__.py +12 -0
  244. arango_sparql_py-0.2.0/arango_sparql/_env.py +149 -0
  245. arango_sparql_py-0.2.0/arango_sparql/api.py +128 -0
  246. arango_sparql_py-0.2.0/arango_sparql/arango_admin.py +192 -0
  247. arango_sparql_py-0.2.0/arango_sparql/cli.py +65 -0
  248. arango_sparql_py-0.2.0/arango_sparql/errors.py +59 -0
  249. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/__init__.py +99 -0
  250. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/_core.py +149 -0
  251. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/adapter.py +266 -0
  252. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/client.py +421 -0
  253. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/corpora/base.yml +171 -0
  254. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/cost.py +83 -0
  255. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/engine_adapter.py +424 -0
  256. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/models.py +118 -0
  257. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/pipeline.py +486 -0
  258. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/postconditions.py +191 -0
  259. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/prompt.py +181 -0
  260. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/repair.py +175 -0
  261. arango_sparql_py-0.2.0/arango_sparql/nl2sparql/samples.py +208 -0
  262. arango_sparql_py-0.2.0/arango_sparql/partition.py +272 -0
  263. arango_sparql_py-0.2.0/arango_sparql/schema/__init__.py +94 -0
  264. arango_sparql_py-0.2.0/arango_sparql/schema/acquire.py +965 -0
  265. arango_sparql_py-0.2.0/arango_sparql/schema/cache.py +378 -0
  266. arango_sparql_py-0.2.0/arango_sparql/schema/detect.py +1189 -0
  267. arango_sparql_py-0.2.0/arango_sparql/schema/fingerprint.py +414 -0
  268. arango_sparql_py-0.2.0/arango_sparql/schema/graph_scope.py +192 -0
  269. arango_sparql_py-0.2.0/arango_sparql/service/__init__.py +231 -0
  270. arango_sparql_py-0.2.0/arango_sparql/service/app.py +200 -0
  271. arango_sparql_py-0.2.0/arango_sparql/service/mapping.py +217 -0
  272. arango_sparql_py-0.2.0/arango_sparql/service/models.py +656 -0
  273. arango_sparql_py-0.2.0/arango_sparql/service/observability.py +541 -0
  274. arango_sparql_py-0.2.0/arango_sparql/service/protocol/__init__.py +26 -0
  275. arango_sparql_py-0.2.0/arango_sparql/service/protocol/negotiate.py +266 -0
  276. arango_sparql_py-0.2.0/arango_sparql/service/protocol/results.py +451 -0
  277. arango_sparql_py-0.2.0/arango_sparql/service/protocol/results_rdf.py +255 -0
  278. arango_sparql_py-0.2.0/arango_sparql/service/protocol/service_description.py +242 -0
  279. arango_sparql_py-0.2.0/arango_sparql/service/protocol/update_detect.py +183 -0
  280. arango_sparql_py-0.2.0/arango_sparql/service/registry.py +46 -0
  281. arango_sparql_py-0.2.0/arango_sparql/service/routes/__init__.py +27 -0
  282. arango_sparql_py-0.2.0/arango_sparql/service/routes/connect.py +309 -0
  283. arango_sparql_py-0.2.0/arango_sparql/service/routes/health.py +61 -0
  284. arango_sparql_py-0.2.0/arango_sparql/service/routes/mapping.py +517 -0
  285. arango_sparql_py-0.2.0/arango_sparql/service/routes/nl.py +450 -0
  286. arango_sparql_py-0.2.0/arango_sparql/service/routes/protocol.py +1075 -0
  287. arango_sparql_py-0.2.0/arango_sparql/service/routes/schema.py +1071 -0
  288. arango_sparql_py-0.2.0/arango_sparql/service/routes/sparql.py +587 -0
  289. arango_sparql_py-0.2.0/arango_sparql/service/security.py +640 -0
  290. arango_sparql_py-0.2.0/arango_sparql/service/tenant.py +55 -0
  291. arango_sparql_py-0.2.0/arango_sparql/translate/__init__.py +13 -0
  292. arango_sparql_py-0.2.0/arango_sparql/translate/builder.py +880 -0
  293. arango_sparql_py-0.2.0/arango_sparql/translate/csi.py +122 -0
  294. arango_sparql_py-0.2.0/arango_sparql/translate/filter_builtins.py +660 -0
  295. arango_sparql_py-0.2.0/arango_sparql/translate/mapping.py +457 -0
  296. arango_sparql_py-0.2.0/arango_sparql/translate/minus_exists.py +328 -0
  297. arango_sparql_py-0.2.0/arango_sparql/translate/optional_crosssubject.py +155 -0
  298. arango_sparql_py-0.2.0/arango_sparql/translate/owl.py +760 -0
  299. arango_sparql_py-0.2.0/arango_sparql/translate/parser.py +200 -0
  300. arango_sparql_py-0.2.0/arango_sparql/translate/paths.py +566 -0
  301. arango_sparql_py-0.2.0/arango_sparql/translate/resolver.py +890 -0
  302. arango_sparql_py-0.2.0/arango_sparql/translate/subselect.py +264 -0
  303. arango_sparql_py-0.2.0/arango_sparql/translate/union_paths.py +327 -0
  304. arango_sparql_py-0.2.0/arango_sparql/translate/variable_predicates.py +402 -0
  305. arango_sparql_py-0.2.0/arango_sparql/translate/visitor.py +2280 -0
  306. arango_sparql_py-0.2.0/docker-compose.yml +24 -0
  307. arango_sparql_py-0.2.0/docs/SPARQL_SUPPORT_SCORECARD.md +227 -0
  308. arango_sparql_py-0.2.0/docs/architecture/PRD.md +3945 -0
  309. arango_sparql_py-0.2.0/docs/architecture/decisions/0001-named-graphs-per-document.md +8 -0
  310. arango_sparql_py-0.2.0/docs/architecture/decisions/0002-cross-subject-optional-leftjoin.md +8 -0
  311. arango_sparql_py-0.2.0/docs/architecture/decisions/0003-foxx-parity-retired.md +8 -0
  312. arango_sparql_py-0.2.0/docs/architecture/implementation_plan.md +415 -0
  313. arango_sparql_py-0.2.0/docs/architecture/proposals/federation-entry-point.md +144 -0
  314. arango_sparql_py-0.2.0/docs/architecture/proposals/nl-engine-extraction.md +92 -0
  315. arango_sparql_py-0.2.0/docs/architecture/vision.md +9 -0
  316. arango_sparql_py-0.2.0/docs/ck25-failure-atlas.md +187 -0
  317. arango_sparql_py-0.2.0/docs/howto/arq.md +112 -0
  318. arango_sparql_py-0.2.0/docs/howto/index.md +28 -0
  319. arango_sparql_py-0.2.0/docs/howto/ontology-playground.md +109 -0
  320. arango_sparql_py-0.2.0/docs/howto/protege.md +126 -0
  321. arango_sparql_py-0.2.0/docs/howto/sparqlwrapper.md +118 -0
  322. arango_sparql_py-0.2.0/docs/howto/yasgui.md +124 -0
  323. arango_sparql_py-0.2.0/main.py +34 -0
  324. arango_sparql_py-0.2.0/pyproject.toml +154 -0
  325. arango_sparql_py-0.2.0/references/README.md +45 -0
  326. arango_sparql_py-0.2.0/scripts/diagnose_live_divergences.py +128 -0
  327. arango_sparql_py-0.2.0/scripts/ensure_database.py +70 -0
  328. arango_sparql_py-0.2.0/scripts/fetch_w3c.sh +27 -0
  329. arango_sparql_py-0.2.0/scripts/regen_translate_goldens.py +239 -0
  330. arango_sparql_py-0.2.0/scripts/setup_references.sh +31 -0
  331. arango_sparql_py-0.2.0/tests/__init__.py +0 -0
  332. arango_sparql_py-0.2.0/tests/conftest.py +40 -0
  333. arango_sparql_py-0.2.0/tests/cross/__init__.py +0 -0
  334. arango_sparql_py-0.2.0/tests/cross/test_bgp_select_cross.py +410 -0
  335. arango_sparql_py-0.2.0/tests/cross/test_edge_traversal_cross.py +219 -0
  336. arango_sparql_py-0.2.0/tests/cross/test_minus_exists_cross.py +103 -0
  337. arango_sparql_py-0.2.0/tests/cross/test_minus_optional_cross.py +126 -0
  338. arango_sparql_py-0.2.0/tests/cross/test_multimodel_cross.py +457 -0
  339. arango_sparql_py-0.2.0/tests/cross/test_optional_crosssubject_cross.py +127 -0
  340. arango_sparql_py-0.2.0/tests/cross/test_partition_cross.py +145 -0
  341. arango_sparql_py-0.2.0/tests/fixtures/cosmic_coffee.NOTICE.md +43 -0
  342. arango_sparql_py-0.2.0/tests/fixtures/cosmic_coffee.rdf +481 -0
  343. arango_sparql_py-0.2.0/tests/helpers/__init__.py +0 -0
  344. arango_sparql_py-0.2.0/tests/helpers/aql_interp.py +855 -0
  345. arango_sparql_py-0.2.0/tests/helpers/oxi.py +189 -0
  346. arango_sparql_py-0.2.0/tests/helpers/test_aql_interp_optional_rows.py +89 -0
  347. arango_sparql_py-0.2.0/tests/helpers/test_aql_interp_subquery.py +129 -0
  348. arango_sparql_py-0.2.0/tests/helpers/test_aql_interp_traversal.py +114 -0
  349. arango_sparql_py-0.2.0/tests/integration/__init__.py +15 -0
  350. arango_sparql_py-0.2.0/tests/integration/conftest.py +169 -0
  351. arango_sparql_py-0.2.0/tests/integration/test_aoe_roundtrip.py +312 -0
  352. arango_sparql_py-0.2.0/tests/integration/test_execute_endpoint.py +271 -0
  353. arango_sparql_py-0.2.0/tests/integration/test_ontology_playground_roundtrip.py +165 -0
  354. arango_sparql_py-0.2.0/tests/integration/test_sparqlwrapper_smoke.py +327 -0
  355. arango_sparql_py-0.2.0/tests/legacy/test_legacy_semantic_parity.py +157 -0
  356. arango_sparql_py-0.2.0/tests/nl2sparql/__init__.py +0 -0
  357. arango_sparql_py-0.2.0/tests/nl2sparql/eval/README.md +1153 -0
  358. arango_sparql_py-0.2.0/tests/nl2sparql/eval/__init__.py +0 -0
  359. arango_sparql_py-0.2.0/tests/nl2sparql/eval/bank_generator.py +870 -0
  360. arango_sparql_py-0.2.0/tests/nl2sparql/eval/baseline.json +2105 -0
  361. arango_sparql_py-0.2.0/tests/nl2sparql/eval/candidates_dump.json +350 -0
  362. arango_sparql_py-0.2.0/tests/nl2sparql/eval/configs.yml +653 -0
  363. arango_sparql_py-0.2.0/tests/nl2sparql/eval/corpus.yml +506 -0
  364. arango_sparql_py-0.2.0/tests/nl2sparql/eval/derive_path_golds.py +301 -0
  365. arango_sparql_py-0.2.0/tests/nl2sparql/eval/dump_candidates.py +117 -0
  366. arango_sparql_py-0.2.0/tests/nl2sparql/eval/fewshot_bank.yml +237 -0
  367. arango_sparql_py-0.2.0/tests/nl2sparql/eval/generated_sweep_result.json +153 -0
  368. arango_sparql_py-0.2.0/tests/nl2sparql/eval/gpt5_mini_diagnostic.py +218 -0
  369. arango_sparql_py-0.2.0/tests/nl2sparql/eval/grounding_index_builder.py +517 -0
  370. arango_sparql_py-0.2.0/tests/nl2sparql/eval/path_recall_golds.yml +151 -0
  371. arango_sparql_py-0.2.0/tests/nl2sparql/eval/power.py +44 -0
  372. arango_sparql_py-0.2.0/tests/nl2sparql/eval/run_composed_sweep.py +231 -0
  373. arango_sparql_py-0.2.0/tests/nl2sparql/eval/run_generated_sweep.py +246 -0
  374. arango_sparql_py-0.2.0/tests/nl2sparql/eval/runner.py +927 -0
  375. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_bank_generator.py +983 -0
  376. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_corpus_schema.py +154 -0
  377. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_eval.py +261 -0
  378. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_fewshot_bank_disjoint.py +423 -0
  379. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_gold_transpilable.py +109 -0
  380. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_grounding_index_builder.py +354 -0
  381. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_grounding_recall.py +97 -0
  382. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_judge.py +62 -0
  383. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_judge_execution.py +183 -0
  384. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_path_recall.py +110 -0
  385. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_power.py +82 -0
  386. arango_sparql_py-0.2.0/tests/nl2sparql/eval/test_vendored_provenance.py +131 -0
  387. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/__init__.py +0 -0
  388. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/NOTICE.md +49 -0
  389. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/__init__.py +0 -0
  390. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/analytic_fewshot_bank.yml +603 -0
  391. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/convert_ck25.py +297 -0
  392. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/corpus.yml +1076 -0
  393. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/filter_log.md +18 -0
  394. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/generated_fewshot_bank.yml +686 -0
  395. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/ontology.ttl +400 -0
  396. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/raw/prod-inst-schema.ttl +376 -0
  397. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/raw/prod-inst.ttl +24663 -0
  398. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/raw/questions.yml +1382 -0
  399. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/ck25/test_convert_ck25.py +117 -0
  400. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/NOTICE.md +41 -0
  401. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/__init__.py +0 -0
  402. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/convert_qald.py +541 -0
  403. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/corpus.yml +3300 -0
  404. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/dbpedia_subset.ttl +370 -0
  405. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/filter_log.md +65 -0
  406. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/generated_fewshot_bank.yml +16 -0
  407. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/raw/qald_9_plus_test_dbpedia_en.json +1804 -0
  408. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/raw/qald_9_plus_train_dbpedia_en.json +4900 -0
  409. arango_sparql_py-0.2.0/tests/nl2sparql/eval/vendored/qald9plus/test_convert_qald.py +156 -0
  410. arango_sparql_py-0.2.0/tests/nl2sparql/eval/verify_generated_bank.py +279 -0
  411. arango_sparql_py-0.2.0/tests/nl2sparql/test_adapter.py +162 -0
  412. arango_sparql_py-0.2.0/tests/nl2sparql/test_client_factory.py +114 -0
  413. arango_sparql_py-0.2.0/tests/nl2sparql/test_client_reasoning_model.py +95 -0
  414. arango_sparql_py-0.2.0/tests/nl2sparql/test_cost.py +143 -0
  415. arango_sparql_py-0.2.0/tests/nl2sparql/test_engine_adapter.py +394 -0
  416. arango_sparql_py-0.2.0/tests/nl2sparql/test_fewshot_engine_prompt.py +82 -0
  417. arango_sparql_py-0.2.0/tests/nl2sparql/test_grounding_engine_prompt.py +114 -0
  418. arango_sparql_py-0.2.0/tests/nl2sparql/test_grounding_prompt_parity.py +151 -0
  419. arango_sparql_py-0.2.0/tests/nl2sparql/test_pipeline.py +338 -0
  420. arango_sparql_py-0.2.0/tests/nl2sparql/test_postconditions.py +193 -0
  421. arango_sparql_py-0.2.0/tests/nl2sparql/test_prompt_builder.py +194 -0
  422. arango_sparql_py-0.2.0/tests/nl2sparql/test_samples.py +141 -0
  423. arango_sparql_py-0.2.0/tests/perf/LATENCY_REPORT.md +31 -0
  424. arango_sparql_py-0.2.0/tests/perf/__init__.py +0 -0
  425. arango_sparql_py-0.2.0/tests/perf/baseline.json +9 -0
  426. arango_sparql_py-0.2.0/tests/perf/conftest.py +317 -0
  427. arango_sparql_py-0.2.0/tests/perf/test_concurrency.py +146 -0
  428. arango_sparql_py-0.2.0/tests/perf/test_execute_overhead.py +171 -0
  429. arango_sparql_py-0.2.0/tests/perf/test_first_byte.py +186 -0
  430. arango_sparql_py-0.2.0/tests/perf/test_memory_idle.py +90 -0
  431. arango_sparql_py-0.2.0/tests/perf/test_memory_load.py +152 -0
  432. arango_sparql_py-0.2.0/tests/perf/test_nl_latency.py +95 -0
  433. arango_sparql_py-0.2.0/tests/perf/test_schema_introspect_latency.py +134 -0
  434. arango_sparql_py-0.2.0/tests/perf/test_sparql_protocol_latency.py +140 -0
  435. arango_sparql_py-0.2.0/tests/perf/test_translate_latency.py +209 -0
  436. arango_sparql_py-0.2.0/tests/protocol/__init__.py +7 -0
  437. arango_sparql_py-0.2.0/tests/protocol/test_negotiate.py +289 -0
  438. arango_sparql_py-0.2.0/tests/protocol/test_results.py +390 -0
  439. arango_sparql_py-0.2.0/tests/protocol/test_results_rdf.py +338 -0
  440. arango_sparql_py-0.2.0/tests/protocol/test_service_description.py +184 -0
  441. arango_sparql_py-0.2.0/tests/protocol/test_update_detect.py +212 -0
  442. arango_sparql_py-0.2.0/tests/schema/__init__.py +0 -0
  443. arango_sparql_py-0.2.0/tests/schema/fixtures/hybrid.export.json +94 -0
  444. arango_sparql_py-0.2.0/tests/schema/fixtures/lpg.export.json +96 -0
  445. arango_sparql_py-0.2.0/tests/schema/fixtures/multitenant.export.json +95 -0
  446. arango_sparql_py-0.2.0/tests/schema/fixtures/pg.export.json +87 -0
  447. arango_sparql_py-0.2.0/tests/schema/fixtures/rpt.export.json +87 -0
  448. arango_sparql_py-0.2.0/tests/schema/fixtures/rpt_lpg_hybrid.export.json +98 -0
  449. arango_sparql_py-0.2.0/tests/schema/fixtures/rpt_pg_hybrid.export.json +94 -0
  450. arango_sparql_py-0.2.0/tests/schema/fixtures/rpt_pg_lpg_hybrid.export.json +119 -0
  451. arango_sparql_py-0.2.0/tests/schema/fixtures/sharded.export.json +51 -0
  452. arango_sparql_py-0.2.0/tests/schema/test_acquire.py +996 -0
  453. arango_sparql_py-0.2.0/tests/schema/test_cache.py +552 -0
  454. arango_sparql_py-0.2.0/tests/schema/test_detect.py +1095 -0
  455. arango_sparql_py-0.2.0/tests/schema/test_fingerprint.py +527 -0
  456. arango_sparql_py-0.2.0/tests/schema/test_fixtures.py +571 -0
  457. arango_sparql_py-0.2.0/tests/schema/test_graph_scope.py +170 -0
  458. arango_sparql_py-0.2.0/tests/sparql_protocol/__init__.py +14 -0
  459. arango_sparql_py-0.2.0/tests/sparql_protocol/conftest.py +237 -0
  460. arango_sparql_py-0.2.0/tests/sparql_protocol/test_accept.py +292 -0
  461. arango_sparql_py-0.2.0/tests/sparql_protocol/test_construct_describe.py +318 -0
  462. arango_sparql_py-0.2.0/tests/sparql_protocol/test_errors.py +363 -0
  463. arango_sparql_py-0.2.0/tests/sparql_protocol/test_happy.py +326 -0
  464. arango_sparql_py-0.2.0/tests/sparql_protocol/test_tenant.py +205 -0
  465. arango_sparql_py-0.2.0/tests/test_arango_admin.py +176 -0
  466. arango_sparql_py-0.2.0/tests/test_cli.py +93 -0
  467. arango_sparql_py-0.2.0/tests/test_env.py +131 -0
  468. arango_sparql_py-0.2.0/tests/test_packaging_smoke.py +44 -0
  469. arango_sparql_py-0.2.0/tests/test_service_graph_routes.py +250 -0
  470. arango_sparql_py-0.2.0/tests/test_service_mapping.py +161 -0
  471. arango_sparql_py-0.2.0/tests/test_service_mapping_routes.py +796 -0
  472. arango_sparql_py-0.2.0/tests/test_service_nl_routes.py +493 -0
  473. arango_sparql_py-0.2.0/tests/test_service_schema_routes.py +1134 -0
  474. arango_sparql_py-0.2.0/tests/test_service_sparql_routes.py +1309 -0
  475. arango_sparql_py-0.2.0/tests/test_service_startup_guard.py +266 -0
  476. arango_sparql_py-0.2.0/tests/translate/__init__.py +0 -0
  477. arango_sparql_py-0.2.0/tests/translate/aggregate.yml +180 -0
  478. arango_sparql_py-0.2.0/tests/translate/ask.yml +75 -0
  479. arango_sparql_py-0.2.0/tests/translate/bgp_select.yml +103 -0
  480. arango_sparql_py-0.2.0/tests/translate/builtin_megabundle.yml +263 -0
  481. arango_sparql_py-0.2.0/tests/translate/construct.yml +105 -0
  482. arango_sparql_py-0.2.0/tests/translate/describe.yml +103 -0
  483. arango_sparql_py-0.2.0/tests/translate/edge_traversal.yml +221 -0
  484. arango_sparql_py-0.2.0/tests/translate/extend.yml +175 -0
  485. arango_sparql_py-0.2.0/tests/translate/filter.yml +225 -0
  486. arango_sparql_py-0.2.0/tests/translate/filter_builtins.yml +462 -0
  487. arango_sparql_py-0.2.0/tests/translate/hybrid.yml +139 -0
  488. arango_sparql_py-0.2.0/tests/translate/join.yml +127 -0
  489. arango_sparql_py-0.2.0/tests/translate/leftjoin.yml +109 -0
  490. arango_sparql_py-0.2.0/tests/translate/minus_exists.yml +274 -0
  491. arango_sparql_py-0.2.0/tests/translate/multitenancy.yml +126 -0
  492. arango_sparql_py-0.2.0/tests/translate/named_graphs.yml +254 -0
  493. arango_sparql_py-0.2.0/tests/translate/order_by.yml +114 -0
  494. arango_sparql_py-0.2.0/tests/translate/property_paths.yml +409 -0
  495. arango_sparql_py-0.2.0/tests/translate/rpt.yml +143 -0
  496. arango_sparql_py-0.2.0/tests/translate/sharding.yml +235 -0
  497. arango_sparql_py-0.2.0/tests/translate/subselect.yml +276 -0
  498. arango_sparql_py-0.2.0/tests/translate/test_attribute_uri_map.py +94 -0
  499. arango_sparql_py-0.2.0/tests/translate/test_csi_import.py +226 -0
  500. arango_sparql_py-0.2.0/tests/translate/test_mapping.py +866 -0
  501. arango_sparql_py-0.2.0/tests/translate/test_owl.py +778 -0
  502. arango_sparql_py-0.2.0/tests/translate/test_parser.py +34 -0
  503. arango_sparql_py-0.2.0/tests/translate/test_phys_namespace.py +51 -0
  504. arango_sparql_py-0.2.0/tests/translate/test_translate_aggregate_goldens.py +121 -0
  505. arango_sparql_py-0.2.0/tests/translate/test_translate_ask_goldens.py +58 -0
  506. arango_sparql_py-0.2.0/tests/translate/test_translate_bgp_select_goldens.py +64 -0
  507. arango_sparql_py-0.2.0/tests/translate/test_translate_builtin_megabundle_goldens.py +181 -0
  508. arango_sparql_py-0.2.0/tests/translate/test_translate_construct_goldens.py +58 -0
  509. arango_sparql_py-0.2.0/tests/translate/test_translate_describe_goldens.py +58 -0
  510. arango_sparql_py-0.2.0/tests/translate/test_translate_edge_traversal_goldens.py +63 -0
  511. arango_sparql_py-0.2.0/tests/translate/test_translate_extend_goldens.py +129 -0
  512. arango_sparql_py-0.2.0/tests/translate/test_translate_filter_builtins_goldens.py +159 -0
  513. arango_sparql_py-0.2.0/tests/translate/test_translate_filter_goldens.py +60 -0
  514. arango_sparql_py-0.2.0/tests/translate/test_translate_hybrid_goldens.py +65 -0
  515. arango_sparql_py-0.2.0/tests/translate/test_translate_join_goldens.py +58 -0
  516. arango_sparql_py-0.2.0/tests/translate/test_translate_leftjoin_goldens.py +58 -0
  517. arango_sparql_py-0.2.0/tests/translate/test_translate_minus_exists_goldens.py +183 -0
  518. arango_sparql_py-0.2.0/tests/translate/test_translate_multitenancy_goldens.py +116 -0
  519. arango_sparql_py-0.2.0/tests/translate/test_translate_named_graphs_goldens.py +218 -0
  520. arango_sparql_py-0.2.0/tests/translate/test_translate_optional_crosssubject_goldens.py +159 -0
  521. arango_sparql_py-0.2.0/tests/translate/test_translate_order_by_goldens.py +59 -0
  522. arango_sparql_py-0.2.0/tests/translate/test_translate_partition.py +185 -0
  523. arango_sparql_py-0.2.0/tests/translate/test_translate_property_paths_goldens.py +374 -0
  524. arango_sparql_py-0.2.0/tests/translate/test_translate_rpt_goldens.py +68 -0
  525. arango_sparql_py-0.2.0/tests/translate/test_translate_sharding_goldens.py +169 -0
  526. arango_sparql_py-0.2.0/tests/translate/test_translate_subselect_goldens.py +241 -0
  527. arango_sparql_py-0.2.0/tests/translate/test_translate_union_paths_goldens.py +192 -0
  528. arango_sparql_py-0.2.0/tests/translate/test_translate_variable_predicate_goldens.py +271 -0
  529. arango_sparql_py-0.2.0/tests/translate/union_paths.yml +177 -0
  530. arango_sparql_py-0.2.0/tests/translate/variable_predicate.yml +200 -0
  531. arango_sparql_py-0.2.0/tests/w3c/COVERAGE_REPORT.md +60 -0
  532. arango_sparql_py-0.2.0/tests/w3c/SKIP_REASONS.md +40 -0
  533. arango_sparql_py-0.2.0/tests/w3c/__init__.py +0 -0
  534. arango_sparql_py-0.2.0/tests/w3c/analyze_coverage.py +724 -0
  535. arango_sparql_py-0.2.0/tests/w3c/loader.py +728 -0
  536. arango_sparql_py-0.2.0/tests/w3c/runner.py +316 -0
  537. arango_sparql_py-0.2.0/tests/w3c/srx_parser.py +683 -0
  538. arango_sparql_py-0.2.0/tests/w3c/test_analyze_coverage.py +112 -0
  539. arango_sparql_py-0.2.0/tests/w3c/test_coverage_gate.py +51 -0
  540. arango_sparql_py-0.2.0/tests/w3c/test_live_coverage_gate.py +42 -0
  541. arango_sparql_py-0.2.0/tests/w3c/test_loader.py +129 -0
  542. arango_sparql_py-0.2.0/tests/w3c/test_srx_parser.py +93 -0
  543. arango_sparql_py-0.2.0/tests/w3c/test_w3c_harness_smoke.py +127 -0
  544. arango_sparql_py-0.2.0/tests/w3c/test_w3c_live_execution.py +591 -0
  545. arango_sparql_py-0.2.0/tests/w3c/test_w3c_query_evaluation.py +161 -0
  546. arango_sparql_py-0.2.0/tests/w3c/test_w3c_syntax_tests.py +85 -0
  547. arango_sparql_py-0.2.0/ui/README.md +14 -0
  548. arango_sparql_py-0.2.0/ui/eslint.config.js +46 -0
  549. arango_sparql_py-0.2.0/ui/index.html +13 -0
  550. arango_sparql_py-0.2.0/ui/package-lock.json +4143 -0
  551. arango_sparql_py-0.2.0/ui/package.json +53 -0
  552. arango_sparql_py-0.2.0/ui/public/favicon.svg +1 -0
  553. arango_sparql_py-0.2.0/ui/public/icons.svg +24 -0
  554. arango_sparql_py-0.2.0/ui/scripts/check-i18n.mjs +70 -0
  555. arango_sparql_py-0.2.0/ui/src/App.tsx +1196 -0
  556. arango_sparql_py-0.2.0/ui/src/api/client.ts +634 -0
  557. arango_sparql_py-0.2.0/ui/src/api/owlFromTurtle.test.ts +99 -0
  558. arango_sparql_py-0.2.0/ui/src/api/owlFromTurtle.ts +153 -0
  559. arango_sparql_py-0.2.0/ui/src/api/store.test.ts +454 -0
  560. arango_sparql_py-0.2.0/ui/src/api/store.ts +603 -0
  561. arango_sparql_py-0.2.0/ui/src/components/AqlEditor.tsx +405 -0
  562. arango_sparql_py-0.2.0/ui/src/components/ChatComposer.tsx +160 -0
  563. arango_sparql_py-0.2.0/ui/src/components/ClauseOutline.tsx +156 -0
  564. arango_sparql_py-0.2.0/ui/src/components/CommandPalette.tsx +156 -0
  565. arango_sparql_py-0.2.0/ui/src/components/ConnectionDialog.tsx +349 -0
  566. arango_sparql_py-0.2.0/ui/src/components/CytoscapeGraph.tsx +515 -0
  567. arango_sparql_py-0.2.0/ui/src/components/CytoscapeSchemaGraph.tsx +351 -0
  568. arango_sparql_py-0.2.0/ui/src/components/GraphSelector.tsx +71 -0
  569. arango_sparql_py-0.2.0/ui/src/components/MappingPanel.tsx +331 -0
  570. arango_sparql_py-0.2.0/ui/src/components/ParameterPanel.tsx +140 -0
  571. arango_sparql_py-0.2.0/ui/src/components/PrefixManager.tsx +155 -0
  572. arango_sparql_py-0.2.0/ui/src/components/QueryHistory.tsx +120 -0
  573. arango_sparql_py-0.2.0/ui/src/components/QueryInspector.tsx +250 -0
  574. arango_sparql_py-0.2.0/ui/src/components/ResultAffordances.tsx +48 -0
  575. arango_sparql_py-0.2.0/ui/src/components/ResultsPanel.tsx +617 -0
  576. arango_sparql_py-0.2.0/ui/src/components/SampleQueries.tsx +220 -0
  577. arango_sparql_py-0.2.0/ui/src/components/SchemaGraph.tsx +156 -0
  578. arango_sparql_py-0.2.0/ui/src/components/SchemaWarningBanner.tsx +115 -0
  579. arango_sparql_py-0.2.0/ui/src/components/SettingsMenu.tsx +229 -0
  580. arango_sparql_py-0.2.0/ui/src/components/SparqlEditor.tsx +230 -0
  581. arango_sparql_py-0.2.0/ui/src/components/TenantSelector.tsx +89 -0
  582. arango_sparql_py-0.2.0/ui/src/components/Transcript.tsx +78 -0
  583. arango_sparql_py-0.2.0/ui/src/components/theme.ts +118 -0
  584. arango_sparql_py-0.2.0/ui/src/hooks/useTheme.ts +82 -0
  585. arango_sparql_py-0.2.0/ui/src/i18n/en.ts +53 -0
  586. arango_sparql_py-0.2.0/ui/src/i18n/i18n.test.ts +31 -0
  587. arango_sparql_py-0.2.0/ui/src/i18n/index.ts +28 -0
  588. arango_sparql_py-0.2.0/ui/src/index.css +136 -0
  589. arango_sparql_py-0.2.0/ui/src/lang/aql.ts +528 -0
  590. arango_sparql_py-0.2.0/ui/src/lang/sparql.ts +22 -0
  591. arango_sparql_py-0.2.0/ui/src/lang/sparqlComplete.test.ts +134 -0
  592. arango_sparql_py-0.2.0/ui/src/lang/sparqlComplete.ts +233 -0
  593. arango_sparql_py-0.2.0/ui/src/main.tsx +10 -0
  594. arango_sparql_py-0.2.0/ui/src/utils/affordances.test.ts +107 -0
  595. arango_sparql_py-0.2.0/ui/src/utils/affordances.ts +86 -0
  596. arango_sparql_py-0.2.0/ui/src/utils/commandPalette.test.ts +106 -0
  597. arango_sparql_py-0.2.0/ui/src/utils/commandPalette.ts +78 -0
  598. arango_sparql_py-0.2.0/ui/src/utils/correspondenceMap.ts +110 -0
  599. arango_sparql_py-0.2.0/ui/src/utils/mappingWire.test.ts +55 -0
  600. arango_sparql_py-0.2.0/ui/src/utils/mappingWire.ts +39 -0
  601. arango_sparql_py-0.2.0/ui/src/utils/pipeline.test.ts +79 -0
  602. arango_sparql_py-0.2.0/ui/src/utils/pipeline.ts +63 -0
  603. arango_sparql_py-0.2.0/ui/src/utils/schemaGraph.test.ts +163 -0
  604. arango_sparql_py-0.2.0/ui/src/utils/schemaGraph.ts +249 -0
  605. arango_sparql_py-0.2.0/ui/src/utils/theme.test.ts +46 -0
  606. arango_sparql_py-0.2.0/ui/src/utils/theme.ts +39 -0
  607. arango_sparql_py-0.2.0/ui/src/utils/transcript.test.ts +36 -0
  608. arango_sparql_py-0.2.0/ui/src/utils/transcript.ts +30 -0
  609. arango_sparql_py-0.2.0/ui/tsconfig.app.json +25 -0
  610. arango_sparql_py-0.2.0/ui/tsconfig.json +7 -0
  611. arango_sparql_py-0.2.0/ui/tsconfig.node.json +24 -0
  612. arango_sparql_py-0.2.0/ui/vite.config.ts +52 -0
  613. arango_sparql_py-0.2.0/uv.lock +2820 -0
@@ -0,0 +1,61 @@
1
+ ---
2
+ description: Always-on project identity and hard guardrails for arango-sparql-py
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Project: arango-sparql-py
7
+
8
+ You are an expert Semantic Web and ArangoDB developer building `arango-sparql-py`,
9
+ a Python microservice that transpiles SPARQL 1.1 queries into ArangoDB AQL.
10
+
11
+ This project is the modernization of the legacy JavaScript Foxx service
12
+ `arango-sparql` and the sister project to `arango-cypher-py`.
13
+
14
+ ## Hard guardrails (non-negotiable)
15
+
16
+ 1. **DO NOT use ANTLR or roll a custom SPARQL parser.** Always use
17
+ `rdflib.plugins.sparql.parser.parseQuery()` to obtain the SPARQL AST
18
+ (Algebra), then walk it with a Python visitor.
19
+ 2. **Never hand-concatenate AQL.** All AQL must be emitted via the
20
+ parameterized AQL query builder (mirroring `arango-cypher-py`'s pattern)
21
+ so bind variables are the only injection-safe path.
22
+ 3. **Do not invent translation rules.** The semantic mapping of SPARQL
23
+ constructs to AQL must be ported from the legacy
24
+ `references/arango-sparql/src/lib/*-translator.js` files. When in doubt,
25
+ read the JS first and translate the *behavior*, not the syntax.
26
+ 4. **Match `arango-cypher-py` architecture.** FastAPI app factory, route
27
+ modules, pydantic request/response models, multitenancy guards, `uv` +
28
+ `pyproject.toml` dependency management, and `pytest` harness layout must
29
+ be structurally identical so a developer who knows one repo can read the
30
+ other immediately.
31
+
32
+ ## Reference repos (sibling projects)
33
+
34
+ When you need to understand a pattern, consult these — they are symlinked
35
+ into `references/`:
36
+
37
+ - `references/arango-cypher-py/` — the architecture template (FastAPI,
38
+ nl2cypher, eval harness, UI shell, pyproject layout).
39
+ - `references/arango-sparql/` — the legacy Foxx service whose SPARQL→AQL
40
+ translation semantics are being ported (read-only source of truth for
41
+ query translation behavior).
42
+ - `references/arango-schema-mapper/` — generates the OWL/Turtle ontology
43
+ this service consumes for URI→collection resolution.
44
+
45
+ ## Directory anchors
46
+
47
+ - `arango_sparql/` — Python package (mirror of `arango_cypher/`).
48
+ - `arango_sparql/service/` — FastAPI app + routes (mirror of
49
+ `arango_cypher/service/`).
50
+ - `arango_sparql/nl2sparql/` — NL→SPARQL pipeline (mirror of
51
+ `arango_cypher/nl2cypher/`).
52
+ - `tests/` — pytest harness; `tests/w3c/` is the SPARQL DAWG runner
53
+ (analog of `arango-cypher-py/tests/tck/`).
54
+ - `ui/` — Vite + React + TypeScript frontend (mirror of
55
+ `arango-cypher-py/ui/`).
56
+
57
+ ## Task management
58
+
59
+ Always update the project todo list when starting non-trivial work. Refer
60
+ to the file you are about to change with the Read tool before editing —
61
+ no blind edits.
@@ -0,0 +1,86 @@
1
+ ---
2
+ description: Backend Python conventions — FastAPI service, rdflib parsing, AQL builder, OWL schema mapping
3
+ globs:
4
+ - "arango_sparql/**/*.py"
5
+ - "main.py"
6
+ - "scripts/**/*.py"
7
+ ---
8
+
9
+ # Backend Python rules
10
+
11
+ ## Tooling
12
+ - Dependency manager: **`uv`** (no `poetry`, no bare `pip`). Add deps with
13
+ `uv add ...`; update lock with `uv lock`.
14
+ - Python: **>=3.11**, `from __future__ import annotations` at top of every
15
+ module.
16
+ - Lint/format: **`ruff`** with `line-length = 110`, `target-version = "py311"`.
17
+ - Typing: prefer PEP 604 unions (`str | None`), `dataclass` for plain data,
18
+ `pydantic.BaseModel` for any HTTP request/response or external contract.
19
+
20
+ ## SPARQL parsing — always rdflib
21
+ - Entry point for parsing:
22
+ `from rdflib.plugins.sparql.parser import parseQuery`
23
+ followed by `from rdflib.plugins.sparql.algebra import translateQuery` to
24
+ obtain the Algebra tree.
25
+ - The translator is a **visitor over the Algebra**, not over the parse
26
+ tree. Every Algebra node type (`BGP`, `Project`, `Filter`, `LeftJoin`,
27
+ `Union`, `Slice`, `OrderBy`, `Distinct`, `Extend`, `Group`, `AggregateJoin`,
28
+ `Service`, …) gets one `visit_<NodeType>` method.
29
+ - Unknown nodes must raise a typed error (e.g. `UnsupportedSparqlError`) —
30
+ never fall through silently.
31
+
32
+ ## AQL emission — always the builder
33
+ - All AQL strings flow through the AQL query builder (port of
34
+ `references/arango-sparql/src/lib/aql-query-builder.js`). Never concatenate
35
+ AQL with `+` or f-strings outside the builder.
36
+ - Variables from SPARQL bind to AQL bind variables (`@var`). Literal values
37
+ always become bind variables; never inline them into the AQL string.
38
+ - The builder owns aliasing — do not generate FOR-loop variable names
39
+ manually; ask the builder for a fresh alias.
40
+
41
+ ## OWL / schema mapping
42
+ - Load the ontology produced by `arango-schema-mapper` into a single
43
+ `rdflib.Graph` at app startup; cache by ontology hash.
44
+ - URI → physical collection/edge/property resolution goes through one
45
+ `SchemaResolver` class. SPARQL visitors call the resolver; they never
46
+ reach into the graph directly.
47
+ - Treat the OWL graph as immutable after load. If schema can change at
48
+ runtime, version the resolver and swap atomically.
49
+
50
+ ## FastAPI service shape (mirror `arango_cypher/service/`)
51
+ - `app.py` owns the `FastAPI(...)` instance, CORS middleware, observability
52
+ install, and import-time guards. Route modules import `app` from here.
53
+ - `models.py` holds every pydantic request/response model and the
54
+ `_MAX_*` length constants (e.g. `_MAX_SPARQL_LENGTH`,
55
+ `_MAX_AQL_LENGTH`, `_MAX_TURTLE_LENGTH`). All user-controlled string
56
+ fields use `Field(..., max_length=_MAX_*)`.
57
+ - `security.py` collects sessions, rate limit, SSRF guard, error redaction,
58
+ pydantic 422 handler.
59
+ - `routes/` — one module per resource: `sparql.py`, `nl.py`, `schema.py`,
60
+ `owl.py`, `connect.py`, `health.py`. Each route uses
61
+ `Depends(_check_compute_rate_limit)` and `Depends(_get_session)` exactly
62
+ like the Cypher service.
63
+ - `mapping.py` adapts incoming JSON mapping payloads to the in-memory
64
+ schema/resolver objects.
65
+ - Multitenancy guards: every endpoint that runs AQL must enforce a
66
+ `TenantContext`; physical-tenant collection rewriting happens in one
67
+ place, not scattered.
68
+
69
+ ## Errors
70
+ - Define a typed error hierarchy:
71
+ `SparqlError` → `SparqlParseError`, `UnsupportedSparqlError`,
72
+ `SchemaResolutionError`, `AqlEmitError`. Each carries a stable
73
+ `code` string for the HTTP layer to surface.
74
+ - Service layer maps `SparqlError` → `HTTPException(status_code=422)` with
75
+ `{"error": <sanitized>, "code": <code>}`; all other exceptions are
76
+ 500s after sanitization.
77
+
78
+ ## Logging
79
+ - Module-level `logger = logging.getLogger(__name__)`. Do not use
80
+ `print()`. Correlation-ID middleware (mirror Cypher's
81
+ `CorrelationIdMiddleware`) tags every request log line.
82
+
83
+ ## Forbidden
84
+ - ANTLR runtime, hand-written SPARQL parsers, raw AQL string
85
+ concatenation, top-level mutable globals (other than the FastAPI `app`,
86
+ module-level loggers, and the immutable schema cache).
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: Testing rules — pyoxigraph as ground truth, W3C DAWG harness, golden tests, eval harness
3
+ globs:
4
+ - "tests/**/*.py"
5
+ - "conftest.py"
6
+ ---
7
+
8
+ # Testing rules
9
+
10
+ ## Frameworks
11
+ - `pytest` is the only test runner. Use `pytest -q -ra` locally.
12
+ - Markers (declared in `pyproject.toml`):
13
+ - `integration` — requires a running ArangoDB.
14
+ - `w3c` — W3C SPARQL 1.1 DAWG harness.
15
+ - `cross` — cross-validation against `pyoxigraph` as the reference
16
+ triplestore (the SPARQL analog of the Cypher project's `cross`/Neo4j
17
+ marker).
18
+ - `eval` — NL→SPARQL eval harness (slow; gated behind env var).
19
+
20
+ ## Reference triplestore — `pyoxigraph`
21
+ - Use `pyoxigraph` as the **embedded W3C-compliant ground truth** for
22
+ every SPARQL semantics test. It runs in-process (no Docker) so tests
23
+ stay fast.
24
+ - Cross-validation pattern: load the same RDF data into `pyoxigraph` and
25
+ into ArangoDB (via the schema-mapper-defined mapping), execute the same
26
+ SPARQL against `pyoxigraph` directly and against ArangoDB via
27
+ `arango-sparql-py`'s transpiled AQL, then assert the result bindings
28
+ match — order-insensitive for SELECT, set-equality for ASK/CONSTRUCT.
29
+ - Helpers live in `tests/helpers/oxi.py` (loader + binding-equality
30
+ comparator). Do not call `pyoxigraph` directly from individual test
31
+ files.
32
+
33
+ ## W3C DAWG harness (mirror `tests/tck/`)
34
+ - Vendor the W3C SPARQL 1.1 Evaluation tests under
35
+ `tests/w3c/data/` (gitignored if large; provide a `make fetch-w3c`
36
+ script).
37
+ - `tests/w3c/runner.py` enumerates manifests (`mf:Manifest`) via `rdflib`
38
+ and yields `(query_file, data_files, expected_results)` tuples.
39
+ - Each test is a single pytest case parametrized over the manifest entry
40
+ IRI so failures point back to the W3C test name.
41
+ - Maintain a `tests/w3c/SKIP_REASONS.md` listing intentionally skipped
42
+ tests with the reason (analog of the TCK skip file).
43
+
44
+ ## Golden tests for translation
45
+ - Pattern: one test file per SPARQL feature — e.g.
46
+ `test_translate_optional_goldens.py`, `test_translate_filter_goldens.py`.
47
+ - Inputs and expected AQL/bind_vars live in YAML next to the test file
48
+ (mirror Cypher's golden YAML format). Updates require explicit human
49
+ review — never auto-regenerate goldens in CI.
50
+
51
+ ## NL→SPARQL eval harness (mirror `tests/nl2cypher/eval/`)
52
+ - `tests/nl2sparql/eval/runner.py` consumes `corpus.yml` + `configs.yml`,
53
+ produces JSON + Markdown reports under `tests/nl2sparql/eval/reports/`
54
+ (gitignored — only `baseline.json` is checked in as the regression gate).
55
+ - The runner accepts any `LLMProvider`, so unit tests use a scripted mock
56
+ and CI uses the real provider only on demand.
57
+
58
+ ## Forbidden
59
+ - Calling LLM providers from non-`eval`-marked tests.
60
+ - Hitting a real ArangoDB from non-`integration`-marked tests.
61
+ - Comparing AQL strings character-for-character outside the goldens —
62
+ semantic equivalence is what matters everywhere else.
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: NL→SPARQL pipeline rules — Turtle prompts, providers, fewshot, tenant guardrails
3
+ globs:
4
+ - "arango_sparql/nl2sparql/**/*.py"
5
+ - "tests/nl2sparql/**/*.py"
6
+ ---
7
+
8
+ # NL→SPARQL rules
9
+
10
+ ## Structure (mirror `arango_cypher/nl2cypher/`)
11
+ - `_core.py` — pipeline orchestrator and `NL2SparqlResult` dataclass.
12
+ - `providers.py` — `LLMProvider` protocol + concrete `OpenAIProvider`,
13
+ `AnthropicProvider`, plus the test-only `ScriptedProvider` mock.
14
+ - `fewshot.py` — BM25-backed few-shot index over a curated corpus.
15
+ - `tenant_guardrail.py` + `tenant_scope.py` — same multitenancy posture
16
+ as Cypher: physical-tenant collection rewriting and prompt-side scope
17
+ hints, enforced before the AQL ever runs.
18
+ - `entity_resolution.py` — optional ER hook (mirrors Cypher's).
19
+ - `_aql.py` — final AQL emission step (translates the LLM's SPARQL
20
+ through the same parser/visitor/builder pipeline the `/translate`
21
+ endpoint uses; never asks the LLM for AQL directly).
22
+
23
+ ## Prompt construction
24
+ - Always provide the **OWL ontology in Turtle (`.ttl`)** as the schema
25
+ context. LLMs read Turtle far better than JSON-LD or XML. Generate
26
+ Turtle from `arango-schema-mapper`'s OWL output.
27
+ - Prompt header: pin the SPARQL dialect (`SPARQL 1.1`), forbid vendor
28
+ extensions, require fully-qualified IRIs (no bare prefixes the model
29
+ invents), and constrain output to a fenced ```sparql``` block.
30
+ - Few-shot examples come from the BM25 index over a curated YAML corpus;
31
+ never inline more than 3 shots — token budget is real.
32
+
33
+ ## Result type
34
+ - `NL2SparqlResult` carries: `sparql`, `explanation`, `confidence`,
35
+ `method` (`"llm"` | `"rule_based"` | `"cached"`), `schema_context`,
36
+ `prompt_tokens`, `completion_tokens`, `total_tokens`, `cached_tokens`,
37
+ `retries`. Match Cypher's `NL2CypherResult` field-for-field where the
38
+ semantics carry over — easier cross-repo telemetry.
39
+
40
+ ## Caching / corrections
41
+ - Persist user corrections in `nl_corrections.db` (SQLite, WAL mode),
42
+ identical schema shape to Cypher. Lookups happen before any LLM call.
43
+
44
+ ## Forbidden
45
+ - Asking the LLM to emit AQL directly. The LLM's job is SPARQL only;
46
+ the deterministic transpiler turns SPARQL into AQL.
47
+ - Inlining the entire OWL ontology when a tenant-scoped slice would do
48
+ — pre-trim the Turtle to the tenant's reachable classes/properties.
@@ -0,0 +1,58 @@
1
+ ---
2
+ description: Frontend rules — Vite + React + TS + CodeMirror SPARQL + Cytoscape RDF visualization
3
+ globs:
4
+ - "ui/**/*.{ts,tsx,css,html}"
5
+ - "ui/package.json"
6
+ - "ui/vite.config.ts"
7
+ ---
8
+
9
+ # Frontend rules
10
+
11
+ ## Stack (mirror `arango-cypher-py/ui/`)
12
+ - **Vite + React 19 + TypeScript**, ESM-only.
13
+ - Editor: **CodeMirror 6** with `@codemirror/legacy-modes/mode/sparql`
14
+ for syntax highlighting. Mirror the structure of
15
+ `references/arango-cypher-py/ui/src/components/CypherEditor.tsx` in a
16
+ new `SparqlEditor.tsx`.
17
+ - Graph viz: **Cytoscape.js**, mirror
18
+ `references/arango-cypher-py/ui/src/components/CytoscapeGraph.tsx`.
19
+ - Tailwind v4 via `@tailwindcss/vite` (same as Cypher UI).
20
+
21
+ ## Component map (1:1 with Cypher UI where it carries over)
22
+ - `SparqlEditor.tsx` ← `CypherEditor.tsx`
23
+ - `AqlEditor.tsx` ← keep as-is, it's language-agnostic.
24
+ - `CytoscapeGraph.tsx` — extended for RDF (see below).
25
+ - `SchemaGraph.tsx` / `CytoscapeSchemaGraph.tsx` — render OWL classes
26
+ + properties from the ontology endpoint.
27
+ - `MappingPanel.tsx`, `ParameterPanel.tsx`, `ResultsPanel.tsx`,
28
+ `QueryHistory.tsx`, `SampleQueries.tsx`, `ConnectionDialog.tsx`,
29
+ `TenantSelector.tsx`, `SchemaWarningBanner.tsx`, `ClauseOutline.tsx`,
30
+ `theme.ts` — port verbatim with SPARQL-flavored copy.
31
+
32
+ ## RDF graph rendering rule (the key UX delta vs Cypher)
33
+ - In strict RDF every literal is a node. That clutters Cytoscape badly.
34
+ - Default render mode: **collapse RDF literal nodes into properties on
35
+ their subject node**. Edges to literals become key/value pairs in the
36
+ subject's tooltip / side panel.
37
+ - Provide a UI toggle ("Show literals as nodes") that opts back into the
38
+ raw triple view for power users.
39
+ - IRI nodes keep their full IRI as a hover tooltip; the displayed label
40
+ is the local name (after `#` or last `/`), or `rdfs:label` when present.
41
+
42
+ ## Lang module
43
+ - `ui/src/lang/sparql.ts` — wires the legacy SPARQL mode + a
44
+ hover/completion provider that pulls term definitions from the
45
+ ontology endpoint. Mirror `cypher.ts` / `cypher-completion.ts` /
46
+ `cypher-hover.ts`.
47
+
48
+ ## API client
49
+ - `ui/src/api/` mirrors the Cypher project's API folder: typed wrappers
50
+ around `/translate`, `/execute`, `/execute-aql`, `/validate`,
51
+ `/explain`, `/nl/sparql`, `/schema/owl`, `/connect`. Use `fetch` with
52
+ `credentials: "include"` and pass through the session token header.
53
+
54
+ ## Forbidden
55
+ - `react-router` unless the app actually grows multi-route — the Cypher
56
+ UI is single-page and so is this one initially.
57
+ - Any Cypher-flavored editor mode in the SPARQL editor; pick `sparql`
58
+ explicitly, do not auto-detect.
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Commit early, push often - never lose work to uncommitted changes
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Checkpoint Regularly
7
+
8
+ > **"Commit early, push often, never lose work."**
9
+
10
+ Large, uncommitted changesets are disasters waiting to happen.
11
+
12
+ ## Checkpoint Triggers
13
+
14
+ You MUST commit and push when:
15
+
16
+ | Trigger | Why |
17
+ | --- | --- |
18
+ | Feature complete | Logical unit of work done |
19
+ | Tests passing | Known-good state worth preserving |
20
+ | Before risky refactor | Safety net if refactor fails |
21
+ | After ~30 minutes of work | Time-based protection |
22
+ | Before switching tasks | Clean handoff point |
23
+ | Before ending session | Never leave work uncommitted |
24
+
25
+ ## Git Discipline
26
+
27
+ ### Commit Messages
28
+
29
+ ```bash
30
+ # GOOD: Descriptive, scoped
31
+ git commit -m "feat(wormhole): wire initializeCentroids to respect config"
32
+ git commit -m "fix(aboyeur): integrate createWorkItemsFromChecklist"
33
+
34
+ # BAD: Vague
35
+ git commit -m "updates"
36
+ git commit -m "wip"
37
+ ```
38
+
39
+ ### Rules
40
+ - One logical change per commit
41
+ - If you can't describe it in one line, it's too big
42
+ - Push immediately after every commit — push is free, losing work is expensive
43
+
44
+ **Checkpoint. Push. Repeat.**
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: Production-ready mandate - never simplify away completeness in error handling, edge cases, security, tests, observability, or config
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Comprehensiveness Over Simplification
7
+
8
+ > **"If a feature ships incomplete, it didn't ship—it leaked."**
9
+
10
+ You are building **production systems**. Simplification is the enemy of completeness.
11
+
12
+ ## Completeness Dimensions
13
+
14
+ Every piece of work must address ALL of the following. Skipping any is a defect.
15
+
16
+ ### Error Handling
17
+ - No swallowed errors — every `catch`/`if err != nil` must DO something
18
+ - Descriptive messages — WHAT failed, WITH WHAT input, WHY
19
+ - Context wrapping — `fmt.Errorf("loading config: %w", err)`
20
+ - Graceful degradation over crashing
21
+
22
+ ### Edge Cases
23
+ Every function must handle: empty/nil inputs, boundary values, invalid inputs, unicode/special chars, concurrent access.
24
+
25
+ ### Configuration Over Hardcoding
26
+ If a value could EVER differ across dev/staging/prod, it must be configurable.
27
+
28
+ ### Test Completeness
29
+ Cover: happy path, error paths, edge cases, concurrency, regressions.
30
+
31
+ ### Observability
32
+ Structured logging (not `fmt.Println`), metrics, tracing, health checks, alertable events.
33
+
34
+ ### Security
35
+ Input validation at boundaries, no secrets in code/logs, auth/authz checks, least privilege.
36
+
37
+ ### Documentation
38
+ Public function docstrings, README updates, API docs with examples, architecture notes for non-obvious decisions.
39
+
40
+ ### UI/UX (Frontend)
41
+ Handle: loading, error, empty, success states. Accessibility (ARIA, keyboard nav). Responsive design.
42
+
43
+ ### Data Integrity
44
+ Validate at boundaries, database constraints, transaction safety, idempotency.
45
+
46
+ ### Performance
47
+ Pagination, caching, lazy loading, indexing, connection pooling.
48
+
49
+ ## Anti-Patterns (NEVER Do)
50
+
51
+ | Anti-Pattern | Consequence |
52
+ | --- | --- |
53
+ | Happy Path Only | Production incidents |
54
+ | "We'll Add That Later" | "Later" never comes |
55
+ | Empty Catch Blocks | Hidden failures |
56
+ | Magic Numbers | Unmaintainable code |
57
+ | Copy-Paste Coding | Divergent behavior over time |
58
+ | Console.log Debugging | Noise in production logs |
59
+
60
+ ## The Mantra
61
+
62
+ > **"Complete is better than clever. Robust is better than fast. Production-ready is the only ready."**
63
+
64
+ When in doubt, do MORE, not less.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Small verifiable steps over big-bang changes - each increment must compile, pass tests, and be functional
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Incremental Over Atomic
7
+
8
+ > **"Small steps that individually work > Large steps that eventually work."**
9
+
10
+ Big-bang changes are high-risk gambles. Incremental changes are safe, reviewable, and reversible.
11
+
12
+ ## Instead of Big Bang → Incremental Slices
13
+
14
+ | Big Bang | Incremental |
15
+ | --- | --- |
16
+ | Refactor entire module at once | Refactor one function, verify, commit, repeat |
17
+ | Add feature + tests + docs in one PR | Types first → logic → tests → docs |
18
+ | Replace old system with new | Run both in parallel, migrate gradually, remove old |
19
+
20
+ ## Each Increment Must Be
21
+
22
+ - **Verifiable** — can be tested independently
23
+ - **Reversible** — can be rolled back without affecting other changes
24
+ - **Reviewable** — small enough to understand in < 5 minutes
25
+ - **Deployable** — doesn't break the build in isolation
26
+
27
+ If an increment takes more than 30 minutes, slice smaller.
28
+
29
+ ## The Working State Rule
30
+
31
+ At every checkpoint, the codebase MUST: compile, pass tests, be functional.
32
+
33
+ ## Refactoring Pattern
34
+
35
+ ```text
36
+ # GOOD: Incremental
37
+ 1. Add new function alongside old → verify (commit)
38
+ 2. Migrate one caller → verify (commit)
39
+ 3. Repeat until all callers migrated
40
+ 4. Remove old function (commit)
41
+ ```
42
+
43
+ ## Anti-Pattern Detector
44
+
45
+ - Changing more than 5 files at once → **Slice smaller**
46
+ - Working 1+ hour without a commit → **Checkpoint now**
47
+ - Unable to describe the change in one sentence → **It's too big**
48
+ - Afraid to run tests because "it's not done yet" → **You've gone too far**
49
+
50
+ **Small steps. Verify each one. Never break the build.**
@@ -0,0 +1,53 @@
1
+ ---
2
+ description: Everything has a place - enforce file size limits, directory conventions, and module cohesion
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Modularity and Structure
7
+
8
+ > **"Everything has a place. Put everything in its place."**
9
+
10
+ ## File Size Limits
11
+
12
+ | File Type | Max Lines | Action If Exceeded |
13
+ | --- | --- | --- |
14
+ | Source code | 1500 | Split into multiple files |
15
+ | Test files | 2000 | Split by test category |
16
+ | Config files | 500 | Use includes/imports |
17
+ | Documentation | 1000 | Split into sections |
18
+
19
+ ### Signs a File Needs Splitting
20
+ - Can't find things without search
21
+ - Multiple unrelated concerns
22
+ - Multiple people need to edit it simultaneously
23
+
24
+ ## File Placement Rules
25
+
26
+ | File Type | Goes In | NOT In |
27
+ | --- | --- | --- |
28
+ | Shared types | Core/types module | Random location |
29
+ | Tests | Next to source file | Separate `tests/` folder (except E2E) |
30
+ | Configs | `configs/` | Root directory |
31
+ | Scripts | `scripts/` | Root directory |
32
+
33
+ ## Module Cohesion
34
+
35
+ Each package/module should:
36
+ - Have a single responsibility
37
+ - Expose a minimal public API
38
+ - Hide implementation details
39
+ - Be independently testable
40
+
41
+ ## Before Creating Any File
42
+
43
+ | Check | Question |
44
+ | --- | --- |
45
+ | Location | Is this the right directory? |
46
+ | Naming | Does the name follow existing conventions? |
47
+ | Size | Will this file stay under limits? |
48
+ | Cohesion | Does this file belong with its neighbors? |
49
+ | Discoverability | Can someone find this file intuitively? |
50
+
51
+ > A new developer should be able to find any file based solely on what it does, without searching.
52
+
53
+ **Structure is not bureaucracy—it's navigation.**
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Match the codebase - search for existing patterns, utilities, and conventions before writing new code
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Read Before Write
7
+
8
+ > **"Match the codebase, don't fight it."**
9
+
10
+ Before writing ANY code, understand what already exists. The codebase has patterns, conventions, and utilities. Use them, don't reinvent them.
11
+
12
+ ## The Reading Protocol
13
+
14
+ Before implementing anything:
15
+
16
+ 1. **Pattern Search** — How does the codebase already do this?
17
+ 2. **Utility Search** — Is there a helper for this?
18
+ 3. **Existing Implementation** — Has someone already solved this?
19
+ 4. **Test Pattern Search** — How are similar things tested?
20
+
21
+ ## What You Must Find Before Writing
22
+
23
+ | Before Writing | Find First |
24
+ | --- | --- |
25
+ | New struct/type | Existing similar types |
26
+ | New function | Existing utilities with same behavior |
27
+ | New endpoint | Existing endpoint patterns |
28
+ | New test | Existing test helpers/patterns |
29
+ | New error type | Existing error conventions |
30
+ | New config field | Existing config structure |
31
+
32
+ ## Pattern Matching Requirements
33
+
34
+ When you find existing patterns, you MUST:
35
+ 1. Use the same naming conventions
36
+ 2. Use the same file organization
37
+ 3. Use the same error handling style
38
+ 4. Use the same logging approach
39
+ 5. Use existing utilities — don't write `formatTime()` if `utils.FormatTime()` exists
40
+
41
+ ## The Duplication Detector
42
+
43
+ | Question | If Yes → |
44
+ | --- | --- |
45
+ | Does this function already exist? | Use it |
46
+ | Does a similar type already exist? | Extend or reuse it |
47
+ | Is there a util/helper for this? | Call it |
48
+ | Is there an established pattern? | Follow it |
49
+
50
+ The codebase was here before you. Your job is to make it *more* consistent, not less.
51
+
52
+ **Read first. Match the patterns. Then write.**
@@ -0,0 +1,56 @@
1
+ ---
2
+ description: When unsure, ask the user - never silently guess on ambiguous requirements, architecture, or scope
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Surface Don't Guess
7
+
8
+ > **"When unsure, ask—don't bet the codebase."**
9
+
10
+ A wrong guess implemented is worse than an honest question asked.
11
+
12
+ ## When You MUST Ask
13
+
14
+ | Situation | Why |
15
+ | --- | --- |
16
+ | Ambiguous requirements | "Add caching" — Cache what? Where? How long? |
17
+ | Multiple valid approaches | Sync or async? REST or gRPC? |
18
+ | Breaking changes | Will this affect existing callers? |
19
+ | Architectural decisions | New service or extend existing? |
20
+ | Unclear scope | Is this feature supposed to include X? |
21
+ | Missing context | Why does this code exist? |
22
+
23
+ ## The Uncertainty Protocol
24
+
25
+ 1. **Attempt Self-Resolution (60 seconds max)** — Search codebase, check docs, look at tests
26
+ 2. **If Still Uncertain → ASK** — State what you understand, what's unclear, and options with tradeoffs
27
+ 3. **WAIT** — Do NOT proceed with a guess
28
+
29
+ ## Good vs. Bad
30
+
31
+ ```text
32
+ # BAD: Silent Guessing
33
+ User: "Add retry logic"
34
+ Agent: *implements exponential backoff with 5 retries, 1s delay, max 30s*
35
+ User: "Why 30 seconds? I wanted 3 quick retries."
36
+
37
+ # GOOD: Surfacing Uncertainty
38
+ User: "Add retry logic"
39
+ Agent: "Before I implement:
40
+ 1. Max retries: 3? 5?
41
+ 2. Backoff: fixed? exponential? jitter?
42
+ 3. Which errors trigger retry?
43
+ 4. Max total timeout?"
44
+ ```
45
+
46
+ ## Cost of Guessing
47
+
48
+ | Guess | Cost |
49
+ | --- | --- |
50
+ | Wrong architecture | Days of refactoring |
51
+ | Wrong behavior | User-facing bugs |
52
+ | Wrong scope | Wasted effort |
53
+
54
+ **Cost of asking: 30 seconds of the user's time.**
55
+
56
+ Your confidence is not a substitute for their knowledge. **Ask.**