terraproof 0.8.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 (230) hide show
  1. terraproof-0.8.0/LICENSE +21 -0
  2. terraproof-0.8.0/MANIFEST.in +6 -0
  3. terraproof-0.8.0/PKG-INFO +219 -0
  4. terraproof-0.8.0/README.md +190 -0
  5. terraproof-0.8.0/instructions/engineering.md +14 -0
  6. terraproof-0.8.0/instructions/security.md +14 -0
  7. terraproof-0.8.0/instructions/simplicity.md +13 -0
  8. terraproof-0.8.0/pyproject.toml +57 -0
  9. terraproof-0.8.0/routing/DOMAIN_ROUTING.md +161 -0
  10. terraproof-0.8.0/routing/ROUTER_DESIGN.md +173 -0
  11. terraproof-0.8.0/routing/SKILL_MANIFEST.md +86 -0
  12. terraproof-0.8.0/routing/checks.json +141 -0
  13. terraproof-0.8.0/routing/collections.json +47 -0
  14. terraproof-0.8.0/routing/registry.json +2212 -0
  15. terraproof-0.8.0/routing/rules.json +64 -0
  16. terraproof-0.8.0/setup.cfg +4 -0
  17. terraproof-0.8.0/skills/accuracy-assessment/SKILL.md +213 -0
  18. terraproof-0.8.0/skills/accuracy-assessment/UPSTREAM.md +7 -0
  19. terraproof-0.8.0/skills/accuracy-assessment/references/stratified-estimator.md +127 -0
  20. terraproof-0.8.0/skills/accuracy-assessment/skill.json +103 -0
  21. terraproof-0.8.0/skills/brainstorming/SKILL.md +250 -0
  22. terraproof-0.8.0/skills/brainstorming/UPSTREAM.md +29 -0
  23. terraproof-0.8.0/skills/brainstorming/scripts/frame-template.html +213 -0
  24. terraproof-0.8.0/skills/brainstorming/scripts/helper.js +167 -0
  25. terraproof-0.8.0/skills/brainstorming/scripts/server.cjs +723 -0
  26. terraproof-0.8.0/skills/brainstorming/scripts/start-server.sh +209 -0
  27. terraproof-0.8.0/skills/brainstorming/scripts/stop-server.sh +120 -0
  28. terraproof-0.8.0/skills/brainstorming/skill.json +73 -0
  29. terraproof-0.8.0/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  30. terraproof-0.8.0/skills/brainstorming/visual-companion.md +299 -0
  31. terraproof-0.8.0/skills/crs-and-units/SKILL.md +200 -0
  32. terraproof-0.8.0/skills/crs-and-units/UPSTREAM.md +7 -0
  33. terraproof-0.8.0/skills/crs-and-units/skill.json +74 -0
  34. terraproof-0.8.0/skills/design-postgis-tables/SKILL.md +494 -0
  35. terraproof-0.8.0/skills/design-postgis-tables/UPSTREAM.md +21 -0
  36. terraproof-0.8.0/skills/design-postgis-tables/skill.json +90 -0
  37. terraproof-0.8.0/skills/gdal/SKILL.md +125 -0
  38. terraproof-0.8.0/skills/gdal/UPSTREAM.md +22 -0
  39. terraproof-0.8.0/skills/gdal/references/gdal-recipes.md +103 -0
  40. terraproof-0.8.0/skills/gdal/skill.json +67 -0
  41. terraproof-0.8.0/skills/geomaster/README.md +105 -0
  42. terraproof-0.8.0/skills/geomaster/SKILL.md +395 -0
  43. terraproof-0.8.0/skills/geomaster/UPSTREAM.md +34 -0
  44. terraproof-0.8.0/skills/geomaster/references/advanced-gis.md +376 -0
  45. terraproof-0.8.0/skills/geomaster/references/big-data.md +363 -0
  46. terraproof-0.8.0/skills/geomaster/references/code-examples.md +518 -0
  47. terraproof-0.8.0/skills/geomaster/references/coordinate-systems.md +364 -0
  48. terraproof-0.8.0/skills/geomaster/references/core-libraries.md +273 -0
  49. terraproof-0.8.0/skills/geomaster/references/data-sources.md +330 -0
  50. terraproof-0.8.0/skills/geomaster/references/gis-software.md +369 -0
  51. terraproof-0.8.0/skills/geomaster/references/industry-applications.md +420 -0
  52. terraproof-0.8.0/skills/geomaster/references/machine-learning.md +462 -0
  53. terraproof-0.8.0/skills/geomaster/references/programming-languages.md +456 -0
  54. terraproof-0.8.0/skills/geomaster/references/remote-sensing.md +370 -0
  55. terraproof-0.8.0/skills/geomaster/references/scientific-domains.md +416 -0
  56. terraproof-0.8.0/skills/geomaster/references/specialized-topics.md +428 -0
  57. terraproof-0.8.0/skills/geomaster/references/troubleshooting.md +439 -0
  58. terraproof-0.8.0/skills/geomaster/skill.json +157 -0
  59. terraproof-0.8.0/skills/geopandas/SKILL.md +250 -0
  60. terraproof-0.8.0/skills/geopandas/UPSTREAM.md +22 -0
  61. terraproof-0.8.0/skills/geopandas/references/crs-management.md +231 -0
  62. terraproof-0.8.0/skills/geopandas/references/data-io.md +323 -0
  63. terraproof-0.8.0/skills/geopandas/references/data-structures.md +207 -0
  64. terraproof-0.8.0/skills/geopandas/references/geometric-operations.md +262 -0
  65. terraproof-0.8.0/skills/geopandas/references/spatial-analysis.md +294 -0
  66. terraproof-0.8.0/skills/geopandas/references/visualization.md +230 -0
  67. terraproof-0.8.0/skills/geopandas/scripts/_common.py +605 -0
  68. terraproof-0.8.0/skills/geopandas/scripts/crs_reprojection_plan.py +210 -0
  69. terraproof-0.8.0/skills/geopandas/scripts/export_plan.py +305 -0
  70. terraproof-0.8.0/skills/geopandas/scripts/geometry_validity_report.py +227 -0
  71. terraproof-0.8.0/skills/geopandas/scripts/sensitive_coordinates_checklist.py +230 -0
  72. terraproof-0.8.0/skills/geopandas/scripts/spatial_join_audit.py +368 -0
  73. terraproof-0.8.0/skills/geopandas/scripts/vector_inventory.py +140 -0
  74. terraproof-0.8.0/skills/geopandas/skill.json +116 -0
  75. terraproof-0.8.0/skills/geoparquet-validation/SKILL.md +125 -0
  76. terraproof-0.8.0/skills/geoparquet-validation/UPSTREAM.md +24 -0
  77. terraproof-0.8.0/skills/geoparquet-validation/references/distribution-best-practices.md +118 -0
  78. terraproof-0.8.0/skills/geoparquet-validation/references/gpio-commands.md +264 -0
  79. terraproof-0.8.0/skills/geoparquet-validation/references/tool-comparison.md +155 -0
  80. terraproof-0.8.0/skills/geoparquet-validation/skill.json +71 -0
  81. terraproof-0.8.0/skills/geospatial-data-discovery/SKILL.md +49 -0
  82. terraproof-0.8.0/skills/geospatial-data-discovery/UPSTREAM.md +15 -0
  83. terraproof-0.8.0/skills/geospatial-data-discovery/skill.json +51 -0
  84. terraproof-0.8.0/skills/geospatial-frontend/SKILL.md +86 -0
  85. terraproof-0.8.0/skills/geospatial-frontend/UPSTREAM.md +23 -0
  86. terraproof-0.8.0/skills/geospatial-frontend/references/design-system.md +283 -0
  87. terraproof-0.8.0/skills/geospatial-frontend/references/user-preferences.md +96 -0
  88. terraproof-0.8.0/skills/geospatial-frontend/skill.json +87 -0
  89. terraproof-0.8.0/skills/geozarr/SKILL.md +244 -0
  90. terraproof-0.8.0/skills/geozarr/UPSTREAM.md +21 -0
  91. terraproof-0.8.0/skills/geozarr/skill.json +97 -0
  92. terraproof-0.8.0/skills/networkx/SKILL.md +440 -0
  93. terraproof-0.8.0/skills/networkx/UPSTREAM.md +22 -0
  94. terraproof-0.8.0/skills/networkx/references/algorithms.md +384 -0
  95. terraproof-0.8.0/skills/networkx/references/generators.md +385 -0
  96. terraproof-0.8.0/skills/networkx/references/graph-basics.md +284 -0
  97. terraproof-0.8.0/skills/networkx/references/io.md +457 -0
  98. terraproof-0.8.0/skills/networkx/references/visualization.md +531 -0
  99. terraproof-0.8.0/skills/networkx/skill.json +93 -0
  100. terraproof-0.8.0/skills/raster-processing/SKILL.md +222 -0
  101. terraproof-0.8.0/skills/raster-processing/UPSTREAM.md +7 -0
  102. terraproof-0.8.0/skills/raster-processing/skill.json +81 -0
  103. terraproof-0.8.0/skills/sar-basics/SKILL.md +202 -0
  104. terraproof-0.8.0/skills/sar-basics/UPSTREAM.md +7 -0
  105. terraproof-0.8.0/skills/sar-basics/references/calibration-lut.md +98 -0
  106. terraproof-0.8.0/skills/sar-basics/skill.json +97 -0
  107. terraproof-0.8.0/skills/satellite-preprocessing/SKILL.md +241 -0
  108. terraproof-0.8.0/skills/satellite-preprocessing/UPSTREAM.md +7 -0
  109. terraproof-0.8.0/skills/satellite-preprocessing/skill.json +84 -0
  110. terraproof-0.8.0/skills/scientific-visualization/SKILL.md +285 -0
  111. terraproof-0.8.0/skills/scientific-visualization/UPSTREAM.md +25 -0
  112. terraproof-0.8.0/skills/scientific-visualization/assets/color_palettes.py +263 -0
  113. terraproof-0.8.0/skills/scientific-visualization/assets/nature.mplstyle +68 -0
  114. terraproof-0.8.0/skills/scientific-visualization/assets/presentation.mplstyle +68 -0
  115. terraproof-0.8.0/skills/scientific-visualization/assets/publication.mplstyle +77 -0
  116. terraproof-0.8.0/skills/scientific-visualization/assets/publisher_profiles.json +269 -0
  117. terraproof-0.8.0/skills/scientific-visualization/references/color_palettes.md +227 -0
  118. terraproof-0.8.0/skills/scientific-visualization/references/journal_requirements.md +169 -0
  119. terraproof-0.8.0/skills/scientific-visualization/references/matplotlib_examples.md +336 -0
  120. terraproof-0.8.0/skills/scientific-visualization/references/publication_guidelines.md +196 -0
  121. terraproof-0.8.0/skills/scientific-visualization/references/sources.md +76 -0
  122. terraproof-0.8.0/skills/scientific-visualization/scripts/_common.py +136 -0
  123. terraproof-0.8.0/skills/scientific-visualization/scripts/export_plan.py +493 -0
  124. terraproof-0.8.0/skills/scientific-visualization/scripts/figure_export.py +642 -0
  125. terraproof-0.8.0/skills/scientific-visualization/scripts/image_metadata.py +731 -0
  126. terraproof-0.8.0/skills/scientific-visualization/scripts/palette_audit.py +327 -0
  127. terraproof-0.8.0/skills/scientific-visualization/scripts/style_presets.py +501 -0
  128. terraproof-0.8.0/skills/scientific-visualization/scripts/style_preview.py +232 -0
  129. terraproof-0.8.0/skills/scientific-visualization/skill.json +95 -0
  130. terraproof-0.8.0/skills/spectral-indices/SKILL.md +235 -0
  131. terraproof-0.8.0/skills/spectral-indices/UPSTREAM.md +7 -0
  132. terraproof-0.8.0/skills/spectral-indices/skill.json +88 -0
  133. terraproof-0.8.0/skills/stac-and-cloud-access/SKILL.md +209 -0
  134. terraproof-0.8.0/skills/stac-and-cloud-access/UPSTREAM.md +7 -0
  135. terraproof-0.8.0/skills/stac-and-cloud-access/references/run-manifest.md +94 -0
  136. terraproof-0.8.0/skills/stac-and-cloud-access/skill.json +98 -0
  137. terraproof-0.8.0/skills/statistical-analysis/SKILL.md +446 -0
  138. terraproof-0.8.0/skills/statistical-analysis/UPSTREAM.md +24 -0
  139. terraproof-0.8.0/skills/statistical-analysis/references/assumptions_and_diagnostics.md +379 -0
  140. terraproof-0.8.0/skills/statistical-analysis/references/bayesian_statistics.md +686 -0
  141. terraproof-0.8.0/skills/statistical-analysis/references/effect_sizes_and_power.md +649 -0
  142. terraproof-0.8.0/skills/statistical-analysis/references/reporting_standards.md +482 -0
  143. terraproof-0.8.0/skills/statistical-analysis/references/test_selection_guide.md +129 -0
  144. terraproof-0.8.0/skills/statistical-analysis/scripts/assumption_checks.py +652 -0
  145. terraproof-0.8.0/skills/statistical-analysis/skill.json +127 -0
  146. terraproof-0.8.0/skills/systematic-debugging/SKILL.md +283 -0
  147. terraproof-0.8.0/skills/systematic-debugging/UPSTREAM.md +28 -0
  148. terraproof-0.8.0/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  149. terraproof-0.8.0/skills/systematic-debugging/condition-based-waiting.md +115 -0
  150. terraproof-0.8.0/skills/systematic-debugging/defense-in-depth.md +122 -0
  151. terraproof-0.8.0/skills/systematic-debugging/find-polluter.sh +72 -0
  152. terraproof-0.8.0/skills/systematic-debugging/root-cause-tracing.md +169 -0
  153. terraproof-0.8.0/skills/systematic-debugging/skill.json +88 -0
  154. terraproof-0.8.0/skills/time-series-and-change/SKILL.md +217 -0
  155. terraproof-0.8.0/skills/time-series-and-change/UPSTREAM.md +7 -0
  156. terraproof-0.8.0/skills/time-series-and-change/references/change-methods.md +42 -0
  157. terraproof-0.8.0/skills/time-series-and-change/skill.json +116 -0
  158. terraproof-0.8.0/skills/vector-quality/SKILL.md +204 -0
  159. terraproof-0.8.0/skills/vector-quality/UPSTREAM.md +7 -0
  160. terraproof-0.8.0/skills/vector-quality/skill.json +82 -0
  161. terraproof-0.8.0/skills/verification/SKILL.md +120 -0
  162. terraproof-0.8.0/skills/verification/UPSTREAM.md +31 -0
  163. terraproof-0.8.0/skills/verification/skill.json +67 -0
  164. terraproof-0.8.0/skills/writing-plans/SKILL.md +171 -0
  165. terraproof-0.8.0/skills/writing-plans/UPSTREAM.md +23 -0
  166. terraproof-0.8.0/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  167. terraproof-0.8.0/skills/writing-plans/skill.json +80 -0
  168. terraproof-0.8.0/sources/SOURCES.md +392 -0
  169. terraproof-0.8.0/src/terraproof/__init__.py +3 -0
  170. terraproof-0.8.0/src/terraproof/__main__.py +17 -0
  171. terraproof-0.8.0/src/terraproof/_build.py +14 -0
  172. terraproof-0.8.0/src/terraproof/_common.py +126 -0
  173. terraproof-0.8.0/src/terraproof/_run_helpers.py +216 -0
  174. terraproof-0.8.0/src/terraproof/checks/__init__.py +113 -0
  175. terraproof-0.8.0/src/terraproof/checks/accuracy.py +421 -0
  176. terraproof-0.8.0/src/terraproof/checks/base.py +40 -0
  177. terraproof-0.8.0/src/terraproof/checks/crs.py +170 -0
  178. terraproof-0.8.0/src/terraproof/checks/geometry.py +98 -0
  179. terraproof-0.8.0/src/terraproof/checks/index_formula.py +81 -0
  180. terraproof-0.8.0/src/terraproof/checks/processing_full.py +159 -0
  181. terraproof-0.8.0/src/terraproof/checks/raster.py +183 -0
  182. terraproof-0.8.0/src/terraproof/checks/raster_identity.py +64 -0
  183. terraproof-0.8.0/src/terraproof/checks/rs.py +161 -0
  184. terraproof-0.8.0/src/terraproof/checks/rs_processing.py +615 -0
  185. terraproof-0.8.0/src/terraproof/checks/sar.py +275 -0
  186. terraproof-0.8.0/src/terraproof/checks/scope.py +56 -0
  187. terraproof-0.8.0/src/terraproof/checks/slope_formula.py +104 -0
  188. terraproof-0.8.0/src/terraproof/checks/stac.py +35 -0
  189. terraproof-0.8.0/src/terraproof/checks/terrain.py +130 -0
  190. terraproof-0.8.0/src/terraproof/cli.py +297 -0
  191. terraproof-0.8.0/src/terraproof/evidence/__init__.py +16 -0
  192. terraproof-0.8.0/src/terraproof/evidence/grade.py +24 -0
  193. terraproof-0.8.0/src/terraproof/evidence/report.py +211 -0
  194. terraproof-0.8.0/src/terraproof/inspect/__init__.py +41 -0
  195. terraproof-0.8.0/src/terraproof/inspect/raster.py +104 -0
  196. terraproof-0.8.0/src/terraproof/inspect/stac.py +45 -0
  197. terraproof-0.8.0/src/terraproof/inspect/vector.py +115 -0
  198. terraproof-0.8.0/src/terraproof/install/__init__.py +174 -0
  199. terraproof-0.8.0/src/terraproof/install/__main__.py +8 -0
  200. terraproof-0.8.0/src/terraproof/install/agents.py +398 -0
  201. terraproof-0.8.0/src/terraproof/mcp/__init__.py +5 -0
  202. terraproof-0.8.0/src/terraproof/mcp/__main__.py +18 -0
  203. terraproof-0.8.0/src/terraproof/mcp/server.py +352 -0
  204. terraproof-0.8.0/src/terraproof/mcp/skills.py +128 -0
  205. terraproof-0.8.0/src/terraproof/preflight.py +1121 -0
  206. terraproof-0.8.0/src/terraproof/provenance/__init__.py +7 -0
  207. terraproof-0.8.0/src/terraproof/provenance/__main__.py +114 -0
  208. terraproof-0.8.0/src/terraproof/provenance/_core.py +432 -0
  209. terraproof-0.8.0/src/terraproof/router/__init__.py +376 -0
  210. terraproof-0.8.0/src/terraproof/router/__main__.py +33 -0
  211. terraproof-0.8.0/src/terraproof/router/evaluate.py +115 -0
  212. terraproof-0.8.0/src/terraproof/router/index.py +123 -0
  213. terraproof-0.8.0/src/terraproof/router/intent.py +84 -0
  214. terraproof-0.8.0/src/terraproof/router/lexicon.py +416 -0
  215. terraproof-0.8.0/src/terraproof/router/semantic.py +157 -0
  216. terraproof-0.8.0/src/terraproof/router/signals.py +531 -0
  217. terraproof-0.8.0/src/terraproof/router/text.py +137 -0
  218. terraproof-0.8.0/src/terraproof.egg-info/PKG-INFO +219 -0
  219. terraproof-0.8.0/src/terraproof.egg-info/SOURCES.txt +228 -0
  220. terraproof-0.8.0/src/terraproof.egg-info/dependency_links.txt +1 -0
  221. terraproof-0.8.0/src/terraproof.egg-info/requires.txt +14 -0
  222. terraproof-0.8.0/src/terraproof.egg-info/top_level.txt +1 -0
  223. terraproof-0.8.0/third_party/isaaccorley-geospatial-skills/LICENSE +176 -0
  224. terraproof-0.8.0/third_party/isaaccorley-geospatial-skills/NOTICE.md +17 -0
  225. terraproof-0.8.0/third_party/kdense-scientific-agent-skills/LICENSE +21 -0
  226. terraproof-0.8.0/third_party/kdense-scientific-agent-skills/NOTICE.md +19 -0
  227. terraproof-0.8.0/third_party/superpowers/LICENSE +21 -0
  228. terraproof-0.8.0/third_party/superpowers/NOTICE.md +17 -0
  229. terraproof-0.8.0/third_party/timescale-pg-aiguide/LICENSE +176 -0
  230. terraproof-0.8.0/third_party/timescale-pg-aiguide/NOTICE.md +14 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Terraproof Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ graft skills
2
+ graft routing
3
+ graft instructions
4
+ graft sources
5
+ graft third_party
6
+ global-exclude __pycache__ *.py[cod]
@@ -0,0 +1,219 @@
1
+ Metadata-Version: 2.4
2
+ Name: terraproof
3
+ Version: 0.8.0
4
+ Summary: Evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. By Geova.
5
+ Author: Terraproof Contributors
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/esmailhussien/terraproof
8
+ Project-URL: Repository, https://github.com/esmailhussien/terraproof
9
+ Keywords: gis,geospatial,remote-sensing,agents,validation,crs,raster,vector
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Topic :: Scientific/Engineering :: GIS
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: pyproj
18
+ Requires-Dist: shapely>=2
19
+ Requires-Dist: numpy
20
+ Requires-Dist: pyogrio
21
+ Requires-Dist: rasterio
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest; extra == "dev"
24
+ Provides-Extra: semantic
25
+ Requires-Dist: fastembed==0.9.0; extra == "semantic"
26
+ Provides-Extra: mcp
27
+ Requires-Dist: mcp<3,>=2.3; extra == "mcp"
28
+ Dynamic: license-file
29
+
30
+ # Terraproof
31
+
32
+ > Evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. *By Geova.*
33
+
34
+ [![npm](https://img.shields.io/npm/v/terraproof)](https://www.npmjs.com/package/terraproof) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
35
+
36
+ Terraproof helps AI coding agents do geospatial work they can prove. It gives an agent three things:
37
+
38
+ - **Skills.** 24 focused guides (GDAL, CRS and units, satellite preprocessing, SAR, spectral indices, time series, accuracy assessment, and more), split into sections an agent can load one at a time.
39
+ - **A router.** It picks the smallest useful set of skills for a task, in English or Arabic, and explains why.
40
+ - **Checks with an evidence grade.** They inspect the real datasets an agent produced (CRS, nodata, value ranges, geometry, COG layout, provenance) and grade the result as decision-grade, review required, or advisory only.
41
+
42
+ Everything runs locally and offline. No model API key is needed.
43
+
44
+ **Status:** experimental (v0.8.0). See [Evaluation status](#evaluation-status) for what has and has not been measured.
45
+
46
+ ---
47
+
48
+ ## Quick start
49
+
50
+ Route a task with the published CLI (Node.js 20+):
51
+
52
+ ```bash
53
+ npx terraproof route "Reproject a GeoTIFF to EPSG:3857 and build a COG with GDAL"
54
+ npx terraproof route "Download Sentinel-2 from a STAC catalog, compute NDVI, and map the change with MapLibre" --format json
55
+ ```
56
+
57
+ Then check the data the work produced with the Python package (Python 3.10+). From the first PyPI release (0.8.0) it installs with `pip`:
58
+
59
+ ```bash
60
+ pip install "terraproof[mcp]"
61
+ ```
62
+
63
+ Until then, install it from a clone:
64
+
65
+ ```bash
66
+ git clone https://github.com/esmailhussien/terraproof.git
67
+ cd terraproof
68
+ python -m venv .venv
69
+ .venv/bin/python -m pip install -e ".[mcp]" # Windows: .venv\Scripts\python -m pip install -e ".[mcp]"
70
+
71
+ python -m terraproof check ndvi.tif --expect index --format md
72
+ python -m terraproof check outputs/clip.gpkg --compare-to data/parcels.gpkg --format md --lang ar --out report_ar.md
73
+ ```
74
+
75
+ The exit code is the grade: `0` decision-grade, `2` review required, `3` advisory only, `1` usage error.
76
+
77
+ ---
78
+
79
+ ## Python checks
80
+
81
+ `python -m terraproof` reads local vector, raster and STAC Item files and makes no network calls.
82
+
83
+ | Command | What it does |
84
+ |---|---|
85
+ | `inspect PATH` | Profile one dataset: CRS and units, schema or bands, dtype, nodata, extent, counts. |
86
+ | `check PATHS` | Run the applicable checks and write a JSON or Markdown evidence report (English or Arabic). |
87
+ | `preflight PATHS --plan plan.json` | Check a declared processing plan against the real inputs before running it. |
88
+ | `manifest write` / `manifest verify` | Record and verify a deterministic run manifest (inputs, outputs, parameters). |
89
+ | `route "TASK" [--data PATH]` | Retrieve the skill sections worth reading, using the task text and inspected datasets. |
90
+
91
+ Checks cover CRS and units, geometry validity and GeoJSON winding, record counts, raster nodata, resampling, grid alignment and COG layout, reflectance and index ranges, scale/offset applied once, cloud masking, temporal scope, SAR domain, area-adjusted accuracy, and STAC provenance. A check that does not apply is left out; one that applies but cannot run is reported as `not-run`.
92
+
93
+ | Grade | Arabic label | Meaning |
94
+ |---|---|---|
95
+ | Decision-grade | جاهز للقرار | Every check that ran passed. |
96
+ | Review required | يحتاج مراجعة | At least one check warned; none failed or could not run. |
97
+ | Advisory only | استرشادي فقط | At least one check failed or could not run, or no check ran. |
98
+
99
+ The grade describes the data path and the checks that ran. It is not a certification of survey, engineering, legal, or safety fitness.
100
+
101
+ ### Verify NDVI against its source bands
102
+
103
+ ```bash
104
+ python -m terraproof check outputs/ndvi.tif --index-formula ndvi --nir inputs/nir.tif --red inputs/red.tif
105
+ ```
106
+
107
+ This opt-in check compares every output cell with `(NIR-red)/(NIR+red)`, using each
108
+ raster's own scale/offset metadata. Supply single-band rasters on the same grid;
109
+ source-band roles and calibration must be declared correctly. Missing source data
110
+ and a zero denominator cannot become valid output values. Extra output masking
111
+ warns because its QA policy is not verified here. Source files are included in the
112
+ evidence report and must be covered when a provenance manifest is supplied.
113
+ See [the full contract and limits](docs/INDEX_FORMULA.md).
114
+
115
+ ### Verify slope and lossless raster delivery
116
+
117
+ ```bash
118
+ python -m terraproof check outputs/result.tif --dem inputs/elevation.tif --slope-method central-difference
119
+ python -m terraproof check outputs/delivery.tif --compare-to inputs/analysis.tif --raster-identity
120
+ ```
121
+
122
+ The explicit slope method checks all required values, flat cells, stencil masks
123
+ and nodata edges. Raster identity checks every band's valid samples, complete
124
+ validity masks and grid/band metadata against the declared source. Full COG
125
+ conformance remains separate from this data comparison and the existing layout
126
+ screen. See [supported contracts and limits](docs/RASTER_CONTRACTS.md).
127
+ For final calibration/QA audits, `--processing-full-scan` checks every corresponding
128
+ band and pixel in bounded windows; see [scope, examples and measured controls](docs/PROCESSING_FULL_SCAN.md).
129
+
130
+
131
+ ---
132
+
133
+ ## Use it from your agent
134
+
135
+ ### MCP server
136
+
137
+ ```bash
138
+ python -m terraproof.mcp # stdio server; needs the `mcp` extra
139
+ ```
140
+
141
+ It is read-only and offline, with six tools: `preflight`, `inspect_dataset`, `run_checks`, `list_skills`, `load_section`, and `find_guidance`. CLI and MCP return the same reports.
142
+
143
+ ### Install into a project
144
+
145
+ ```bash
146
+ python -m terraproof.install --agent claude --task "NDVI change for 2020-2024" --target DIR --with-mcp
147
+ python -m terraproof.install --agent cursor --skills gdal,crs-and-units --target DIR --dry-run
148
+ ```
149
+
150
+ | `--agent` | Skills are written to | MCP config (`--with-mcp`) |
151
+ |---|---|---|
152
+ | `antigravity` | `.agents/skills/<skill>/` and `AGENTS.md` | `.agents/mcp_config.json` |
153
+ | `claude` | `.claude/skills/<skill>/` | `.mcp.json` |
154
+ | `codex` | `.agents/skills/<skill>/` and `AGENTS.md` | `.codex/config.toml` |
155
+ | `cursor` | `.cursor/rules/terraproof-<skill>.mdc` | `.cursor/mcp.json` |
156
+ | `gemini` | `GEMINI.md` | `.gemini/settings.json` |
157
+ | `copilot` | `.github/instructions/terraproof-<skill>.instructions.md` | `.vscode/mcp.json` |
158
+ | `opencode` | `AGENTS.md` | `opencode.json` |
159
+
160
+ The installer only writes inside `--target`, merges existing configs, and is idempotent. Some hosts need you to approve or trust the project before its MCP server connects (Claude Code shows it as "Pending approval"; Codex and Gemini load project config only in trusted folders). Writing the files does not prove the agent loaded or followed them.
161
+
162
+ ### Route and export with the Node CLI
163
+
164
+ ```bash
165
+ npx terraproof route "Design a PostGIS schema for GPS tracks" --collection gis --dry-run
166
+ npx terraproof bundle "TASK" --out context.md # one reviewable context file
167
+ npx terraproof apply "TASK" --target ./demo/.agents/skills --dry-run # export skill folders
168
+ npx terraproof validate
169
+ ```
170
+
171
+ `apply` and `bundle --out` overwrite files without asking, so start in a disposable folder. Routing is deterministic keyword and section scoring, not semantic understanding; review the selection before you use it. Details: [`router/README.md`](router/README.md) and [`routing/ROUTER_DESIGN.md`](routing/ROUTER_DESIGN.md).
172
+
173
+ ---
174
+
175
+ ## Skills
176
+
177
+ | Area | Skills |
178
+ |---|---|
179
+ | Process | `brainstorming`, `writing-plans`, `systematic-debugging`, `verification` |
180
+ | Mapping and GIS | `gdal`, `crs-and-units`, `raster-processing`, `vector-quality`, `geopandas`, `design-postgis-tables`, `geoparquet-validation`, `geospatial-frontend`, `networkx` |
181
+ | Remote sensing | `satellite-preprocessing`, `spectral-indices`, `sar-basics`, `time-series-and-change`, `accuracy-assessment`, `geomaster`, `geozarr` |
182
+ | Data access | `geospatial-data-discovery`, `stac-and-cloud-access` |
183
+ | Analysis and figures | `statistical-analysis`, `scientific-visualization` |
184
+
185
+ Skills are **unmeasured**: no study has separated their effect from the MCP checks, and in the Phase 5 Claude Code runs no skill file was read. Their content is frozen during Phase 6 (factual fixes only, no new skills) until the skills decision in the [Phase 6 plan](docs/plans/Terraproof_Phase6_PLAN.md).
186
+
187
+ Each skill lives in `skills/<name>/` with a `SKILL.md`, references, and a `skill.json` routing manifest. Preset collections (`gis`, `remote-sensing`, `data-analysis`, `production`) are in [`routing/collections.json`](routing/collections.json).
188
+
189
+ ---
190
+
191
+ ## Evaluation status
192
+
193
+ - **Checks:** 33 executable eval tasks with independent oracles pass with 0 false passes. The benchmark runs from a clone; the Python package does not include it. Of 50 seeded wrong outputs, production checks reject 25; the other 25 are caught only by the independent oracle (declared blind spots). Passing the benchmark does not mean the production checks catch every wrong output. See [`evals/README.md`](evals/README.md).
194
+ - **Routing:** an independent, frozen 160-item set (v5) passed once in both languages: English recall 0.97 with 3.75 wrong picks per 100, Arabic recall 0.96 with 2.5. Earlier independent sets (v3, v4) failed and stay on record. The v5 set was written by an AI agent, not reviewed by an expert.
195
+ - **Agent lift:** in a 54-run Claude Code comparison on 9 tasks, runs with Terraproof passed 27/27 and runs without it 21/27. The pre-specified test is **not significant** (p = 0.125), and five tasks passed either way, so no lift is claimed. The clearest single result is Landsat QA masking (3/3 with, 0/3 without). See [`docs/plans/Terraproof_Phase5_PLAN.md`](docs/plans/Terraproof_Phase5_PLAN.md).
196
+ - **Harder cohort:** a one-repeat Claude Code screen passed all six tasks both with and without Terraproof. That small screen shows no observed benefit and is separate from the original nine-task study. API pilots are exploratory and do not establish lift.
197
+ - **Real hosts:** tool use through MCP has been verified with Codex, Claude Code and Antigravity (Gemini). OpenCode's install format passes a no-model check with the real CLI, but no real tool call has been recorded yet. Cursor and Copilot are unit-tested against their documented layouts only.
198
+
199
+ ---
200
+
201
+ ## Repository
202
+
203
+ | Path | Contents |
204
+ |---|---|
205
+ | `skills/` | The 24 skills |
206
+ | `routing/` | Generated skill registry, check catalog, rules, and collections |
207
+ | `router/` | TypeScript router and CLI (the npm package) |
208
+ | `src/terraproof/` | Python package: inspectors, checks, reports, router, MCP server, installers, evals |
209
+ | `evals/` | Eval task specs and routing sets |
210
+ | `tests/` | Router, Python, package, and release-validation tests |
211
+ | `instructions/` | Universal engineering rules shipped with the skills |
212
+ | `docs/` | [Release checklist](docs/RELEASE_CHECKLIST.md) and [design plans](docs/plans/) |
213
+ | `sources/`, `third_party/` | Upstream attribution and licenses |
214
+
215
+ To contribute, see [`CONTRIBUTING.md`](CONTRIBUTING.md). Changes are listed in [`CHANGELOG.md`](CHANGELOG.md).
216
+
217
+ ## License
218
+
219
+ [MIT](LICENSE). Vendored and adapted components keep their upstream licenses (MIT, Apache-2.0, 3-clause BSD), documented in `third_party/` and [`sources/SOURCES.md`](sources/SOURCES.md).
@@ -0,0 +1,190 @@
1
+ # Terraproof
2
+
3
+ > Evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. *By Geova.*
4
+
5
+ [![npm](https://img.shields.io/npm/v/terraproof)](https://www.npmjs.com/package/terraproof) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ Terraproof helps AI coding agents do geospatial work they can prove. It gives an agent three things:
8
+
9
+ - **Skills.** 24 focused guides (GDAL, CRS and units, satellite preprocessing, SAR, spectral indices, time series, accuracy assessment, and more), split into sections an agent can load one at a time.
10
+ - **A router.** It picks the smallest useful set of skills for a task, in English or Arabic, and explains why.
11
+ - **Checks with an evidence grade.** They inspect the real datasets an agent produced (CRS, nodata, value ranges, geometry, COG layout, provenance) and grade the result as decision-grade, review required, or advisory only.
12
+
13
+ Everything runs locally and offline. No model API key is needed.
14
+
15
+ **Status:** experimental (v0.8.0). See [Evaluation status](#evaluation-status) for what has and has not been measured.
16
+
17
+ ---
18
+
19
+ ## Quick start
20
+
21
+ Route a task with the published CLI (Node.js 20+):
22
+
23
+ ```bash
24
+ npx terraproof route "Reproject a GeoTIFF to EPSG:3857 and build a COG with GDAL"
25
+ npx terraproof route "Download Sentinel-2 from a STAC catalog, compute NDVI, and map the change with MapLibre" --format json
26
+ ```
27
+
28
+ Then check the data the work produced with the Python package (Python 3.10+). From the first PyPI release (0.8.0) it installs with `pip`:
29
+
30
+ ```bash
31
+ pip install "terraproof[mcp]"
32
+ ```
33
+
34
+ Until then, install it from a clone:
35
+
36
+ ```bash
37
+ git clone https://github.com/esmailhussien/terraproof.git
38
+ cd terraproof
39
+ python -m venv .venv
40
+ .venv/bin/python -m pip install -e ".[mcp]" # Windows: .venv\Scripts\python -m pip install -e ".[mcp]"
41
+
42
+ python -m terraproof check ndvi.tif --expect index --format md
43
+ python -m terraproof check outputs/clip.gpkg --compare-to data/parcels.gpkg --format md --lang ar --out report_ar.md
44
+ ```
45
+
46
+ The exit code is the grade: `0` decision-grade, `2` review required, `3` advisory only, `1` usage error.
47
+
48
+ ---
49
+
50
+ ## Python checks
51
+
52
+ `python -m terraproof` reads local vector, raster and STAC Item files and makes no network calls.
53
+
54
+ | Command | What it does |
55
+ |---|---|
56
+ | `inspect PATH` | Profile one dataset: CRS and units, schema or bands, dtype, nodata, extent, counts. |
57
+ | `check PATHS` | Run the applicable checks and write a JSON or Markdown evidence report (English or Arabic). |
58
+ | `preflight PATHS --plan plan.json` | Check a declared processing plan against the real inputs before running it. |
59
+ | `manifest write` / `manifest verify` | Record and verify a deterministic run manifest (inputs, outputs, parameters). |
60
+ | `route "TASK" [--data PATH]` | Retrieve the skill sections worth reading, using the task text and inspected datasets. |
61
+
62
+ Checks cover CRS and units, geometry validity and GeoJSON winding, record counts, raster nodata, resampling, grid alignment and COG layout, reflectance and index ranges, scale/offset applied once, cloud masking, temporal scope, SAR domain, area-adjusted accuracy, and STAC provenance. A check that does not apply is left out; one that applies but cannot run is reported as `not-run`.
63
+
64
+ | Grade | Arabic label | Meaning |
65
+ |---|---|---|
66
+ | Decision-grade | جاهز للقرار | Every check that ran passed. |
67
+ | Review required | يحتاج مراجعة | At least one check warned; none failed or could not run. |
68
+ | Advisory only | استرشادي فقط | At least one check failed or could not run, or no check ran. |
69
+
70
+ The grade describes the data path and the checks that ran. It is not a certification of survey, engineering, legal, or safety fitness.
71
+
72
+ ### Verify NDVI against its source bands
73
+
74
+ ```bash
75
+ python -m terraproof check outputs/ndvi.tif --index-formula ndvi --nir inputs/nir.tif --red inputs/red.tif
76
+ ```
77
+
78
+ This opt-in check compares every output cell with `(NIR-red)/(NIR+red)`, using each
79
+ raster's own scale/offset metadata. Supply single-band rasters on the same grid;
80
+ source-band roles and calibration must be declared correctly. Missing source data
81
+ and a zero denominator cannot become valid output values. Extra output masking
82
+ warns because its QA policy is not verified here. Source files are included in the
83
+ evidence report and must be covered when a provenance manifest is supplied.
84
+ See [the full contract and limits](docs/INDEX_FORMULA.md).
85
+
86
+ ### Verify slope and lossless raster delivery
87
+
88
+ ```bash
89
+ python -m terraproof check outputs/result.tif --dem inputs/elevation.tif --slope-method central-difference
90
+ python -m terraproof check outputs/delivery.tif --compare-to inputs/analysis.tif --raster-identity
91
+ ```
92
+
93
+ The explicit slope method checks all required values, flat cells, stencil masks
94
+ and nodata edges. Raster identity checks every band's valid samples, complete
95
+ validity masks and grid/band metadata against the declared source. Full COG
96
+ conformance remains separate from this data comparison and the existing layout
97
+ screen. See [supported contracts and limits](docs/RASTER_CONTRACTS.md).
98
+ For final calibration/QA audits, `--processing-full-scan` checks every corresponding
99
+ band and pixel in bounded windows; see [scope, examples and measured controls](docs/PROCESSING_FULL_SCAN.md).
100
+
101
+
102
+ ---
103
+
104
+ ## Use it from your agent
105
+
106
+ ### MCP server
107
+
108
+ ```bash
109
+ python -m terraproof.mcp # stdio server; needs the `mcp` extra
110
+ ```
111
+
112
+ It is read-only and offline, with six tools: `preflight`, `inspect_dataset`, `run_checks`, `list_skills`, `load_section`, and `find_guidance`. CLI and MCP return the same reports.
113
+
114
+ ### Install into a project
115
+
116
+ ```bash
117
+ python -m terraproof.install --agent claude --task "NDVI change for 2020-2024" --target DIR --with-mcp
118
+ python -m terraproof.install --agent cursor --skills gdal,crs-and-units --target DIR --dry-run
119
+ ```
120
+
121
+ | `--agent` | Skills are written to | MCP config (`--with-mcp`) |
122
+ |---|---|---|
123
+ | `antigravity` | `.agents/skills/<skill>/` and `AGENTS.md` | `.agents/mcp_config.json` |
124
+ | `claude` | `.claude/skills/<skill>/` | `.mcp.json` |
125
+ | `codex` | `.agents/skills/<skill>/` and `AGENTS.md` | `.codex/config.toml` |
126
+ | `cursor` | `.cursor/rules/terraproof-<skill>.mdc` | `.cursor/mcp.json` |
127
+ | `gemini` | `GEMINI.md` | `.gemini/settings.json` |
128
+ | `copilot` | `.github/instructions/terraproof-<skill>.instructions.md` | `.vscode/mcp.json` |
129
+ | `opencode` | `AGENTS.md` | `opencode.json` |
130
+
131
+ The installer only writes inside `--target`, merges existing configs, and is idempotent. Some hosts need you to approve or trust the project before its MCP server connects (Claude Code shows it as "Pending approval"; Codex and Gemini load project config only in trusted folders). Writing the files does not prove the agent loaded or followed them.
132
+
133
+ ### Route and export with the Node CLI
134
+
135
+ ```bash
136
+ npx terraproof route "Design a PostGIS schema for GPS tracks" --collection gis --dry-run
137
+ npx terraproof bundle "TASK" --out context.md # one reviewable context file
138
+ npx terraproof apply "TASK" --target ./demo/.agents/skills --dry-run # export skill folders
139
+ npx terraproof validate
140
+ ```
141
+
142
+ `apply` and `bundle --out` overwrite files without asking, so start in a disposable folder. Routing is deterministic keyword and section scoring, not semantic understanding; review the selection before you use it. Details: [`router/README.md`](router/README.md) and [`routing/ROUTER_DESIGN.md`](routing/ROUTER_DESIGN.md).
143
+
144
+ ---
145
+
146
+ ## Skills
147
+
148
+ | Area | Skills |
149
+ |---|---|
150
+ | Process | `brainstorming`, `writing-plans`, `systematic-debugging`, `verification` |
151
+ | Mapping and GIS | `gdal`, `crs-and-units`, `raster-processing`, `vector-quality`, `geopandas`, `design-postgis-tables`, `geoparquet-validation`, `geospatial-frontend`, `networkx` |
152
+ | Remote sensing | `satellite-preprocessing`, `spectral-indices`, `sar-basics`, `time-series-and-change`, `accuracy-assessment`, `geomaster`, `geozarr` |
153
+ | Data access | `geospatial-data-discovery`, `stac-and-cloud-access` |
154
+ | Analysis and figures | `statistical-analysis`, `scientific-visualization` |
155
+
156
+ Skills are **unmeasured**: no study has separated their effect from the MCP checks, and in the Phase 5 Claude Code runs no skill file was read. Their content is frozen during Phase 6 (factual fixes only, no new skills) until the skills decision in the [Phase 6 plan](docs/plans/Terraproof_Phase6_PLAN.md).
157
+
158
+ Each skill lives in `skills/<name>/` with a `SKILL.md`, references, and a `skill.json` routing manifest. Preset collections (`gis`, `remote-sensing`, `data-analysis`, `production`) are in [`routing/collections.json`](routing/collections.json).
159
+
160
+ ---
161
+
162
+ ## Evaluation status
163
+
164
+ - **Checks:** 33 executable eval tasks with independent oracles pass with 0 false passes. The benchmark runs from a clone; the Python package does not include it. Of 50 seeded wrong outputs, production checks reject 25; the other 25 are caught only by the independent oracle (declared blind spots). Passing the benchmark does not mean the production checks catch every wrong output. See [`evals/README.md`](evals/README.md).
165
+ - **Routing:** an independent, frozen 160-item set (v5) passed once in both languages: English recall 0.97 with 3.75 wrong picks per 100, Arabic recall 0.96 with 2.5. Earlier independent sets (v3, v4) failed and stay on record. The v5 set was written by an AI agent, not reviewed by an expert.
166
+ - **Agent lift:** in a 54-run Claude Code comparison on 9 tasks, runs with Terraproof passed 27/27 and runs without it 21/27. The pre-specified test is **not significant** (p = 0.125), and five tasks passed either way, so no lift is claimed. The clearest single result is Landsat QA masking (3/3 with, 0/3 without). See [`docs/plans/Terraproof_Phase5_PLAN.md`](docs/plans/Terraproof_Phase5_PLAN.md).
167
+ - **Harder cohort:** a one-repeat Claude Code screen passed all six tasks both with and without Terraproof. That small screen shows no observed benefit and is separate from the original nine-task study. API pilots are exploratory and do not establish lift.
168
+ - **Real hosts:** tool use through MCP has been verified with Codex, Claude Code and Antigravity (Gemini). OpenCode's install format passes a no-model check with the real CLI, but no real tool call has been recorded yet. Cursor and Copilot are unit-tested against their documented layouts only.
169
+
170
+ ---
171
+
172
+ ## Repository
173
+
174
+ | Path | Contents |
175
+ |---|---|
176
+ | `skills/` | The 24 skills |
177
+ | `routing/` | Generated skill registry, check catalog, rules, and collections |
178
+ | `router/` | TypeScript router and CLI (the npm package) |
179
+ | `src/terraproof/` | Python package: inspectors, checks, reports, router, MCP server, installers, evals |
180
+ | `evals/` | Eval task specs and routing sets |
181
+ | `tests/` | Router, Python, package, and release-validation tests |
182
+ | `instructions/` | Universal engineering rules shipped with the skills |
183
+ | `docs/` | [Release checklist](docs/RELEASE_CHECKLIST.md) and [design plans](docs/plans/) |
184
+ | `sources/`, `third_party/` | Upstream attribution and licenses |
185
+
186
+ To contribute, see [`CONTRIBUTING.md`](CONTRIBUTING.md). Changes are listed in [`CHANGELOG.md`](CHANGELOG.md).
187
+
188
+ ## License
189
+
190
+ [MIT](LICENSE). Vendored and adapted components keep their upstream licenses (MIT, Apache-2.0, 3-clause BSD), documented in `third_party/` and [`sources/SOURCES.md`](sources/SOURCES.md).
@@ -0,0 +1,14 @@
1
+ # Engineering Principles
2
+
3
+ Universal engineering guidelines for code quality, maintainability, and stability.
4
+
5
+ ---
6
+
7
+ ## Principles
8
+
9
+ 1. **Maintainability**: Write clear, readable, and self-documenting code. Future maintainers should easily understand intent and behavior.
10
+ 2. **Clear Naming**: Use precise, descriptive names for variables, functions, types, and files. Avoid cryptic abbreviations.
11
+ 3. **Respect Existing Architecture**: Follow existing code conventions, folder structures, and patterns already established in the project.
12
+ 4. **Minimal Changes**: Keep changes targeted to the requirement. Avoid touching unrelated files or making gratuitous refactorings.
13
+ 5. **Avoid Unnecessary Dependencies**: Prefer standard libraries and existing utilities over adding external third-party dependencies.
14
+ 6. **Explicit Error Handling**: Handle potential failure modes explicitly. Do not silently suppress errors or rely on unhandled exceptions.
@@ -0,0 +1,14 @@
1
+ # Security Principles
2
+
3
+ Universal baseline security principles applicable across all engineering tasks.
4
+
5
+ ---
6
+
7
+ ## Principles
8
+
9
+ 1. **Secrets Management**: Never commit hardcoded API keys, tokens, credentials, or private certificates into source code or version control. Use secure environment variables or secret managers.
10
+ 2. **Authentication**: Verify caller identities rigorously using robust, modern authentication protocols before granting access to resources.
11
+ 3. **Authorization & Access Control**: Enforce explicit permission checks on every sensitive operation. Never assume trust based on UI state or client-side checks.
12
+ 4. **Input Validation & Sanitization**: Treat all external input (user input, query parameters, webhook payloads, third-party responses) as untrusted. Validate types, lengths, formats, and sanitize against injection attacks (SQLi, XSS, command injection).
13
+ 5. **Principle of Least Privilege**: Grant processes, API tokens, database connections, and users only the minimum permissions necessary to perform their specific function.
14
+ 6. **Sensitive Data Protection**: Safeguard personally identifiable information (PII) and sensitive business data in transit (TLS) and at rest (encryption). Avoid leaking sensitive data in logs, error messages, or crash reports.
@@ -0,0 +1,13 @@
1
+ # Simplicity Principles
2
+
3
+ Universal guidelines for keeping code and architecture simple, direct, and unbloated.
4
+
5
+ ---
6
+
7
+ ## Principles
8
+
9
+ 1. **Avoid Over-Engineering**: Build the simplest solution that completely and correctly solves the stated problem.
10
+ 2. **Avoid Premature Abstractions**: Do not abstract until patterns emerge across concrete, existing use cases (rule of three).
11
+ 3. **Avoid Speculative Extensibility**: Implement what is needed right now. Do not write code for hypothetical future requirements (YAGNI).
12
+ 4. **Solve the Current Requirement First**: Focus directly on the immediate goal before contemplating generalizations.
13
+ 5. **Prefer Understandable Code**: Prefer straightforward, explicit, and readable code over clever, terse, or overly complex implementations.
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "terraproof"
7
+ version = "0.8.0"
8
+ description = "Evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. By Geova."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.10"
13
+ authors = [{ name = "Terraproof Contributors" }]
14
+ keywords = ["gis", "geospatial", "remote-sensing", "agents", "validation", "crs", "raster", "vector"]
15
+ classifiers = [
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ "Topic :: Scientific/Engineering :: GIS",
19
+ "Development Status :: 3 - Alpha",
20
+ ]
21
+ dependencies = [
22
+ "pyproj",
23
+ "shapely>=2",
24
+ "numpy",
25
+ "pyogrio",
26
+ "rasterio",
27
+ ]
28
+
29
+ [project.optional-dependencies]
30
+ dev = ["pytest"]
31
+ semantic = ["fastembed==0.9.0"]
32
+ # Optional: the MCP server (`python -m terraproof.mcp`). The core install stays dependency-light.
33
+ # The official Python SDK's current stable line is 2.x, where FastMCP is renamed MCPServer
34
+ # (https://py.sdk.modelcontextprotocol.io/whats-new/#fastmcp-is-now-mcpserver).
35
+ mcp = ["mcp>=2.3,<3"]
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/esmailhussien/terraproof"
39
+ Repository = "https://github.com/esmailhussien/terraproof"
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+ # Product-only distributions: the benchmark and the lift harness (recipes, oracles, fixtures and
44
+ # task specs) run from a checkout and are never installed beside the checks they grade.
45
+ exclude = ["terraproof.evals", "terraproof.evals.*"]
46
+
47
+ [tool.setuptools.cmdclass]
48
+ build_py = "terraproof._build.BuildPy"
49
+
50
+ [tool.pytest.ini_options]
51
+ testpaths = ["tests/python"]
52
+ # Import this checkout's package first, even when the environment has an editable
53
+ # install of another checkout (for example a shared venv used by git worktrees).
54
+ pythonpath = ["src"]
55
+ # Python on some Windows setups cannot write to the user temp directory, so
56
+ # pytest's tmp_path root is kept inside the (git-ignored) pytest cache instead.
57
+ addopts = "--basetemp=.pytest_cache/basetemp"