terraproof 0.8.0 → 0.9.0

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.
package/README.md CHANGED
@@ -1,190 +1,218 @@
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).
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 (only against a declared verification contract), checks passed, review required, or advisory only. Every report lists the applicable checks that did not run.
12
+
13
+ Everything runs locally and offline. No model API key is needed.
14
+
15
+ **Status:** experimental (v0.9.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+). Since 0.8.0 it installs from PyPI 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 or checks passed, `2` review required, `3` advisory only, `1` usage error. Without a contract, a clean run is **checks passed**, not decision-grade: read the report's coverage section for what was not checked.
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 and valid support, vertical units, 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 | جاهز للقرار | A declared verification contract was fully verified, and every check that ran passed. |
67
+ | Checks passed | الفحوصات نجحت (التغطية غير مُقيَّمة) | Every check that ran passed, but no contract was declared, so coverage was not assessed. The report lists applicable checks that did not run and what enables them. |
68
+ | Review required | يحتاج مراجعة | At least one check warned; none failed or could not run. |
69
+ | Advisory only | استرشادي فقط | At least one check failed or could not run, or no check ran. |
70
+
71
+ The grade describes the data path and the checks that ran. It is not a certification of survey, engineering, legal, or safety fitness.
72
+
73
+ For explicit task requirements, add `--contract contract.json` (MCP: `contract`).
74
+ The contract's outcome becomes the report's grade: it is decision-grade only when every
75
+ required check on every required output ran and passed with its declared sources and
76
+ parameters, and any other failure or warning still counts. See
77
+ [verification contracts, diagnostics and unsigned evidence bundles](docs/VERIFICATION_CONTRACTS.md).
78
+
79
+ ### Verify a spectral index against its source bands
80
+
81
+ ```bash
82
+ python -m terraproof check outputs/ndvi.tif --index-formula ndvi --nir inputs/nir.tif --red inputs/red.tif
83
+ ```
84
+
85
+ This opt-in check compares every output cell with `(NIR-red)/(NIR+red)`, using each
86
+ raster's own scale/offset metadata. Supply single-band rasters on the same grid;
87
+ source-band roles and calibration must be declared correctly. Missing source data
88
+ and a zero denominator cannot become valid output values. Extra output masking
89
+ warns because its QA policy is not verified here. Source files are included in the
90
+ evidence report and must be covered when a provenance manifest is supplied.
91
+ See [the full contract and limits](docs/INDEX_FORMULA.md).
92
+
93
+ The same check covers NBR, dNBR (pre minus post), McFeeters NDWI, MNDWI, Gao's NDMI, SAVI
94
+ and EVI. Name each source band by its role; a multi-band source also needs its band number:
95
+
96
+ ```bash
97
+ python -m terraproof check outputs/evi.tif --index-formula evi --band blue=inputs/bands.tif --band-number blue=1 \
98
+ --band red=inputs/bands.tif --band-number red=2 --band nir=inputs/bands.tif --band-number nir=3
99
+ ```
100
+
101
+ ### Verify a composite, an accumulation or a trend against its input stack
102
+
103
+ ```bash
104
+ python -m terraproof check outputs/storm_total.tif --stack-reduction weighted-sum \
105
+ --stack inputs/rate1.tif --stack-weight 1 --stack inputs/rate2.tif --stack-weight 4.5
106
+ ```
107
+
108
+ `--stack-reduction` is `median`, `count`, `weighted-sum` (for example rate x hours),
109
+ `mean-power-db` (dB averaged in linear power) or `ols-slope` (against `--stack-weight`
110
+ times, with `--stack-min-count`). Every output cell is compared with that reduction of the
111
+ ordered layers; a cell without enough valid inputs must be nodata. The check does not
112
+ verify how the input layers were made, so pair it with the calibration and QA checks.
113
+
114
+ ### Verify slope and lossless raster delivery
115
+
116
+ ```bash
117
+ python -m terraproof check outputs/result.tif --dem inputs/elevation.tif --slope-method central-difference
118
+ python -m terraproof check outputs/delivery.tif --compare-to inputs/analysis.tif --raster-identity
119
+ ```
120
+
121
+ The explicit slope method checks all required values, flat cells, stencil masks
122
+ and nodata edges. Raster identity checks every band's valid samples, complete
123
+ validity masks and grid/band metadata against the declared source. Full COG
124
+ conformance remains separate from this data comparison and the existing layout
125
+ screen. See [supported contracts and limits](docs/RASTER_CONTRACTS.md).
126
+ For final calibration/QA audits, `--processing-full-scan` checks every corresponding
127
+ band and pixel in bounded windows; see [scope, examples and measured controls](docs/PROCESSING_FULL_SCAN.md).
128
+
129
+
130
+ ---
131
+
132
+ ## Use it from your agent
133
+
134
+ ### MCP server
135
+
136
+ ```bash
137
+ python -m terraproof.mcp # stdio server; needs the `mcp` extra
138
+ ```
139
+
140
+ 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.
141
+
142
+ ### Install into a project
143
+
144
+ ```bash
145
+ python -m terraproof.install --agent claude --task "NDVI change for 2020-2024" --target DIR --with-mcp
146
+ python -m terraproof.install --agent cursor --skills gdal,crs-and-units --target DIR --dry-run
147
+ ```
148
+
149
+ | `--agent` | Skills are written to | MCP config (`--with-mcp`) |
150
+ |---|---|---|
151
+ | `antigravity` | `.agents/skills/<skill>/` and `AGENTS.md` | `.agents/mcp_config.json` |
152
+ | `claude` | `.claude/skills/<skill>/` | `.mcp.json` |
153
+ | `codex` | `.agents/skills/<skill>/` and `AGENTS.md` | `.codex/config.toml` |
154
+ | `cursor` | `.cursor/rules/terraproof-<skill>.mdc` | `.cursor/mcp.json` |
155
+ | `gemini` | `GEMINI.md` | `.gemini/settings.json` |
156
+ | `copilot` | `.github/instructions/terraproof-<skill>.instructions.md` | `.vscode/mcp.json` |
157
+ | `opencode` | `AGENTS.md` | `opencode.json` |
158
+
159
+ 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.
160
+
161
+ ### Route and export with the Node CLI
162
+
163
+ ```bash
164
+ npx terraproof route "Design a PostGIS schema for GPS tracks" --collection gis --dry-run
165
+ npx terraproof bundle "TASK" --out context.md # one reviewable context file
166
+ npx terraproof apply "TASK" --target ./demo/.agents/skills --dry-run # export skill folders
167
+ npx terraproof validate
168
+ ```
169
+
170
+ `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).
171
+
172
+ ---
173
+
174
+ ## Skills
175
+
176
+ | Area | Skills |
177
+ |---|---|
178
+ | Process | `brainstorming`, `writing-plans`, `systematic-debugging`, `verification` |
179
+ | Mapping and GIS | `gdal`, `crs-and-units`, `raster-processing`, `vector-quality`, `geopandas`, `design-postgis-tables`, `geoparquet-validation`, `geospatial-frontend`, `networkx` |
180
+ | Remote sensing | `satellite-preprocessing`, `spectral-indices`, `sar-basics`, `time-series-and-change`, `accuracy-assessment`, `geomaster`, `geozarr` |
181
+ | Data access | `geospatial-data-discovery`, `stac-and-cloud-access` |
182
+ | Analysis and figures | `statistical-analysis`, `scientific-visualization` |
183
+
184
+ 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).
185
+
186
+ 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).
187
+
188
+ ---
189
+
190
+ ## Evaluation status
191
+
192
+ - **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).
193
+ - **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.
194
+ - **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).
195
+ - **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.
196
+ - **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.
197
+
198
+ ---
199
+
200
+ ## Repository
201
+
202
+ | Path | Contents |
203
+ |---|---|
204
+ | `skills/` | The 24 skills |
205
+ | `routing/` | Generated skill registry, check catalog, rules, and collections |
206
+ | `router/` | TypeScript router and CLI (the npm package) |
207
+ | `src/terraproof/` | Python package: inspectors, checks, reports, router, MCP server, installers, evals |
208
+ | `evals/` | Eval task specs and routing sets |
209
+ | `tests/` | Router, Python, package, and release-validation tests |
210
+ | `instructions/` | Universal engineering rules shipped with the skills |
211
+ | `docs/` | [Release checklist](docs/RELEASE_CHECKLIST.md) and [design plans](docs/plans/) |
212
+ | `sources/`, `third_party/` | Upstream attribution and licenses |
213
+
214
+ To contribute, see [`CONTRIBUTING.md`](CONTRIBUTING.md). Changes are listed in [`CHANGELOG.md`](CHANGELOG.md).
215
+
216
+ ## License
217
+
218
+ [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).
package/package.json CHANGED
@@ -1,67 +1,67 @@
1
- {
2
- "name": "terraproof",
3
- "version": "0.8.0",
4
- "description": "evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. By Geova.",
5
- "type": "module",
6
- "main": "./dist/router/index.js",
7
- "exports": {
8
- ".": "./dist/router/index.js",
9
- "./router": "./dist/router/index.js",
10
- "./routing": "./routing/registry.json"
11
- },
12
- "bin": {
13
- "terraproof": "bin/terraproof.js"
14
- },
15
- "scripts": {
16
- "build": "tsc -p tsconfig.build.json",
17
- "prepack": "npm run build",
18
- "route": "node router/index.ts route",
19
- "validate": "node router/index.ts validate",
20
- "registry:build": "node router/build-registry.ts",
21
- "registry:check": "node router/build-registry.ts --check",
22
- "test:router": "node tests/router/run.ts",
23
- "test:validate": "python tests/validate_repo.py",
24
- "test:package": "node tests/package/smoke.mjs",
25
- "test": "node tests/router/run.ts",
26
- "typecheck": "tsc --noEmit"
27
- },
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/esmailhussien/terraproof.git"
31
- },
32
- "homepage": "https://github.com/esmailhussien/terraproof#readme",
33
- "bugs": {
34
- "url": "https://github.com/esmailhussien/terraproof/issues"
35
- },
36
- "engines": {
37
- "node": ">=20"
38
- },
39
- "files": [
40
- "bin",
41
- "dist",
42
- "routing",
43
- "skills",
44
- "instructions",
45
- "third_party",
46
- "sources",
47
- "README.md",
48
- "LICENSE"
49
- ],
50
- "keywords": [
51
- "ai",
52
- "agent",
53
- "skills",
54
- "router",
55
- "geospatial",
56
- "gis",
57
- "remote-sensing",
58
- "earth-observation",
59
- "mapping"
60
- ],
61
- "author": "Terraproof Contributors",
62
- "license": "MIT",
63
- "devDependencies": {
64
- "typescript": "^5.7.0",
65
- "@types/node": "^22.0.0"
66
- }
67
- }
1
+ {
2
+ "name": "terraproof",
3
+ "version": "0.9.0",
4
+ "description": "evidence-graded skills, tools, and checks for mapping and remote-sensing AI agents. By Geova.",
5
+ "type": "module",
6
+ "main": "./dist/router/index.js",
7
+ "exports": {
8
+ ".": "./dist/router/index.js",
9
+ "./router": "./dist/router/index.js",
10
+ "./routing": "./routing/registry.json"
11
+ },
12
+ "bin": {
13
+ "terraproof": "bin/terraproof.js"
14
+ },
15
+ "scripts": {
16
+ "build": "tsc -p tsconfig.build.json",
17
+ "prepack": "npm run build",
18
+ "route": "node router/index.ts route",
19
+ "validate": "node router/index.ts validate",
20
+ "registry:build": "node router/build-registry.ts",
21
+ "registry:check": "node router/build-registry.ts --check",
22
+ "test:router": "node tests/router/run.ts",
23
+ "test:validate": "python tests/validate_repo.py",
24
+ "test:package": "node tests/package/smoke.mjs",
25
+ "test": "node tests/router/run.ts",
26
+ "typecheck": "tsc --noEmit"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/esmailhussien/terraproof.git"
31
+ },
32
+ "homepage": "https://github.com/esmailhussien/terraproof#readme",
33
+ "bugs": {
34
+ "url": "https://github.com/esmailhussien/terraproof/issues"
35
+ },
36
+ "engines": {
37
+ "node": ">=20"
38
+ },
39
+ "files": [
40
+ "bin",
41
+ "dist",
42
+ "routing",
43
+ "skills",
44
+ "instructions",
45
+ "third_party",
46
+ "sources",
47
+ "README.md",
48
+ "LICENSE"
49
+ ],
50
+ "keywords": [
51
+ "ai",
52
+ "agent",
53
+ "skills",
54
+ "router",
55
+ "geospatial",
56
+ "gis",
57
+ "remote-sensing",
58
+ "earth-observation",
59
+ "mapping"
60
+ ],
61
+ "author": "Terraproof Contributors",
62
+ "license": "MIT",
63
+ "devDependencies": {
64
+ "typescript": "^5.7.0",
65
+ "@types/node": "^22.0.0"
66
+ }
67
+ }
@@ -1,141 +1,289 @@
1
- {
2
- "version": "1.0.0",
3
- "checks": {
4
- "crs.defined": {
5
- "family": "crs",
6
- "description": "Each georeferenced input declares a CRS."
7
- },
8
- "crs.consistent": {
9
- "family": "crs",
10
- "description": "Inputs that are combined share one CRS; a mismatch fails until they are reprojected."
11
- },
12
- "crs.metric_operation": {
13
- "family": "crs",
14
- "description": "A distance, area, or buffer operation runs in a projected horizontal CRS with metre or foot units, not in degrees or geocentric coordinates."
15
- },
16
- "geometry.valid": {
17
- "family": "geometry",
18
- "description": "Every geometry is valid (no self-intersections or invalid rings)."
19
- },
20
- "geometry.non_empty": {
21
- "family": "geometry",
22
- "description": "No null or empty geometries are present."
23
- },
24
- "geometry.type_consistent": {
25
- "family": "geometry",
26
- "description": "The layer holds one geometry family; single and multi-part types count together."
27
- },
28
- "geometry.winding": {
29
- "family": "geometry",
30
- "description": "GeoJSON polygon rings follow the RFC 7946 right-hand rule: counterclockwise exteriors, clockwise holes."
31
- },
32
- "scope.record_count": {
33
- "family": "scope",
34
- "description": "The output feature count is compared with a reference dataset's count."
35
- },
36
- "raster.nodata_declared": {
37
- "family": "raster",
38
- "description": "Every raster band declares a nodata value."
39
- },
40
- "raster.resampling": {
41
- "family": "raster",
42
- "description": "The resampling method suits categorical data (nearest or mode)."
43
- },
44
- "raster.grid_alignment": {
45
- "family": "raster",
46
- "description": "Rasters share CRS, pixel size, and pixel-grid origin so they can be combined."
47
- },
48
- "raster.cog_layout": {
49
- "family": "raster",
50
- "description": "Heuristic layout screen for GeoTIFFs: tiled, with internal overviews unless the raster fits in one block, and not lossy JPEG; not COG validation."
51
- },
52
- "rs.reflectance_range": {
53
- "family": "rs",
54
- "description": "Sampled plausibility screen: reflectance values lie within [-0.5, 1.5]; non-finite scale, offset, or values fail. Not a calibration check."
55
- },
56
- "rs.index_range": {
57
- "family": "rs",
58
- "description": "Sampled plausibility screen: spectral index values lie within [-1, 1]; non-finite scale, offset, or values fail."
59
- },
60
- "stac.provenance": {
61
- "family": "stac",
62
- "description": "A STAC Item records a time and a projection code."
63
- },
64
- "rs.scale_applied_once": {
65
- "family": "rs",
66
- "description": "Output pixels equal the input DN through the declared calibration exactly once. Default: sampled band-1 screen. processing_full_scan verifies every corresponding band/pixel, finite delivered values and source invalidity, in bounded windows. Additional output-mask policy and other processing steps are not verified."
67
- },
68
- "rs.cloud_mask_applied": {
69
- "family": "rs",
70
- "description": "Pixels flagged as cloud or shadow by aligned Sentinel-2 SCL or Landsat QA_PIXEL are nodata or NaN. Default: sampled band-1 screen. processing_full_scan verifies all QA locations and output bands; missing or unsupported QA leaves verification not-run. Cloud detection quality and additional masking policy are not verified."
71
- },
72
- "rs.temporal_scope": {
73
- "family": "rs",
74
- "description": "Every STAC item datetime, or the whole start/end interval, falls inside a declared time range; items without a usable acquisition time are not-run."
75
- },
76
- "terrain.slope_consistent": {
77
- "family": "terrain",
78
- "description": "A slope-in-degrees raster matches central differences on its DEM (passed with --dem) using the DEM's declared vertical unit and real pixel spacing; matching the slope with vertical units ignored or square pixels assumed fails, matching neither warns, and geographic or unaligned grids are not-run."
79
- },
80
- "sar.value_domain": {
81
- "family": "sar",
82
- "description": "Sampled backscatter values lie in the domain declared by the expected scale (sigma0-db within [-50, 15] dB; sigma0-linear non-negative with p99 <= 5). Flags decibel/linear confusion as one possible cause; not a calibration check."
83
- },
84
- "sar.geocoded": {
85
- "family": "sar",
86
- "description": "A raster carries both a CRS and a non-identity geotransform; GCP-only geometry or an identity transform fails as not geocoded."
87
- },
88
- "accuracy.sample_design": {
89
- "family": "accuracy",
90
- "description": "Every map class in the reference-sample CSV has at least min_per_class samples (default 50, a configurable rule of thumb); missing class areas when area estimates are requested are warned."
91
- },
92
- "accuracy.estimates": {
93
- "family": "accuracy",
94
- "description": "Confusion matrix, user's and area-weighted producer's accuracy, overall accuracy, and the stratified area-adjusted area of each reference class with 95% confidence intervals (Olofsson et al. 2014, eqs. 5-6 and 10-12); not-run when map-class areas are missing."
95
- },
96
- "provenance.reproducible": {
97
- "family": "provenance",
98
- "description": "A written run manifest verifies: recorded input/output files re-hash identically and recorded tool versions still match; warns on tool-version drift, fails on changed or missing files, an edited manifest core, or a recorded path outside the workspace."
99
- },
100
- "preflight.metric_crs": {
101
- "family": "preflight",
102
- "description": "Plan check: a declared distance, area, or buffer step runs in a projected horizontal CRS with metre or foot units, not in a geographic or geocentric CRS."
103
- },
104
- "preflight.alignment": {
105
- "family": "preflight",
106
- "description": "Plan check: inputs declared for combination or comparison share a CRS, pixel size, and pixel-grid origin, or the plan declares a reprojection/alignment step."
107
- },
108
- "preflight.categorical_resampling": {
109
- "family": "preflight",
110
- "description": "Plan check: a declared categorical layer (classification, mask, or QA band) is resampled with nearest neighbour or mode, not with a bilinear or cubic kernel."
111
- },
112
- "preflight.reflectance_decode": {
113
- "family": "preflight",
114
- "description": "Plan check: an 'expect reflectance' operation on integer raster inputs that carry a non-trivial scale or offset declares a decode step. Reads the plan and input encoding metadata only; it does not compare outputs or show how often a decode was actually applied."
115
- },
116
- "preflight.temporal_scope": {
117
- "family": "preflight",
118
- "description": "Plan check: the requested analysis time range contains the datetimes of the STAC items or inputs the plan selects."
119
- },
120
- "preflight.index_inputs": {
121
- "family": "preflight",
122
- "description": "Plan check: an 'expect index' operation on integer raster inputs that carry a non-trivial scale or offset declares a decode step, so the index would be computed on decoded values rather than raw DN. Reads the plan and input encoding metadata only; it does not verify that the bands a given index needs are present or that any formula was applied."
123
- },
124
- "preflight.output_units": {
125
- "family": "preflight",
126
- "description": "Plan check: the output CRS units match the measurement units the plan requests, so a metric result is not written in degrees or the reverse."
127
- },
128
- "rs.index_formula": {
129
- "family": "rs",
130
- "description": "Opt-in NDVI comparison with declared red/NIR sources, their scale/offset and joint valid support; extra masking warns."
131
- },
132
- "terrain.slope_formula": {
133
- "family": "terrain",
134
- "description": "Opt-in calibrated central-difference slope comparison: every required value, complete center/four-neighbour support and nodata edges."
135
- },
136
- "raster.source_identity": {
137
- "family": "raster",
138
- "description": "Opt-in exact decoded valid-sample and full band-validity comparison with a declared raster source, including grid and band metadata; not COG conformance."
139
- }
140
- }
141
- }
1
+ {
2
+ "version": "1.0.0",
3
+ "checks": {
4
+ "crs.defined": {
5
+ "family": "crs",
6
+ "description": "Each georeferenced input declares a CRS."
7
+ },
8
+ "crs.consistent": {
9
+ "family": "crs",
10
+ "description": "Inputs that are combined share one CRS; a mismatch fails until they are reprojected."
11
+ },
12
+ "crs.metric_operation": {
13
+ "family": "crs",
14
+ "description": "A distance, area, or buffer operation runs in a projected horizontal CRS with metre or foot units, not in degrees or geocentric coordinates.",
15
+ "applies_to": [
16
+ "raster",
17
+ "vector"
18
+ ],
19
+ "enabled_by": [
20
+ "operation"
21
+ ]
22
+ },
23
+ "geometry.valid": {
24
+ "family": "geometry",
25
+ "description": "Every geometry is valid (no self-intersections or invalid rings)."
26
+ },
27
+ "geometry.non_empty": {
28
+ "family": "geometry",
29
+ "description": "No null or empty geometries are present."
30
+ },
31
+ "geometry.type_consistent": {
32
+ "family": "geometry",
33
+ "description": "The layer holds one geometry family; single and multi-part types count together."
34
+ },
35
+ "geometry.winding": {
36
+ "family": "geometry",
37
+ "description": "GeoJSON polygon rings follow the RFC 7946 right-hand rule: counterclockwise exteriors, clockwise holes."
38
+ },
39
+ "scope.record_count": {
40
+ "family": "scope",
41
+ "description": "The output feature count is compared with a reference dataset's count.",
42
+ "applies_to": [
43
+ "vector"
44
+ ],
45
+ "enabled_by": [
46
+ "compare_to"
47
+ ]
48
+ },
49
+ "raster.nodata_declared": {
50
+ "family": "raster",
51
+ "description": "Every raster band declares a nodata value."
52
+ },
53
+ "raster.resampling": {
54
+ "family": "raster",
55
+ "description": "The resampling method suits categorical data (nearest or mode).",
56
+ "applies_to": [
57
+ "raster"
58
+ ],
59
+ "enabled_by": [
60
+ "resampling",
61
+ "categorical"
62
+ ]
63
+ },
64
+ "raster.grid_alignment": {
65
+ "family": "raster",
66
+ "description": "Rasters share CRS, pixel size, and pixel-grid origin so they can be combined."
67
+ },
68
+ "raster.cog_layout": {
69
+ "family": "raster",
70
+ "description": "Heuristic layout screen for GeoTIFFs: tiled, with internal overviews unless the raster fits in one block, and not lossy JPEG; not COG validation."
71
+ },
72
+ "rs.reflectance_range": {
73
+ "family": "rs",
74
+ "description": "Sampled plausibility screen: reflectance values lie within [-0.5, 1.5]; non-finite scale, offset, or values fail. Not a calibration check.",
75
+ "applies_to": [
76
+ "raster"
77
+ ],
78
+ "enabled_by": [
79
+ "expect"
80
+ ]
81
+ },
82
+ "rs.index_range": {
83
+ "family": "rs",
84
+ "description": "Sampled plausibility screen: spectral index values lie within [-1, 1]; non-finite scale, offset, or values fail.",
85
+ "applies_to": [
86
+ "raster"
87
+ ],
88
+ "enabled_by": [
89
+ "expect"
90
+ ]
91
+ },
92
+ "stac.provenance": {
93
+ "family": "stac",
94
+ "description": "A STAC Item records a time and a projection code."
95
+ },
96
+ "rs.scale_applied_once": {
97
+ "family": "rs",
98
+ "description": "Output pixels equal the input DN through the declared calibration exactly once. Default: sampled band-1 screen. processing_full_scan verifies every corresponding band/pixel, finite delivered values and source invalidity, in bounded windows. Additional output-mask policy and other processing steps are not verified.",
99
+ "applies_to": [
100
+ "raster"
101
+ ],
102
+ "enabled_by": [
103
+ "reference_input",
104
+ "encoding"
105
+ ]
106
+ },
107
+ "rs.cloud_mask_applied": {
108
+ "family": "rs",
109
+ "description": "Pixels flagged as cloud or shadow by aligned Sentinel-2 SCL or Landsat QA_PIXEL are nodata or NaN. Default: sampled band-1 screen. processing_full_scan verifies all QA locations and output bands; missing or unsupported QA leaves verification not-run. Cloud detection quality and additional masking policy are not verified.",
110
+ "applies_to": [
111
+ "raster"
112
+ ],
113
+ "enabled_by": [
114
+ "qa_path",
115
+ "qa_kind"
116
+ ]
117
+ },
118
+ "rs.temporal_scope": {
119
+ "family": "rs",
120
+ "description": "Every STAC item datetime, or the whole start/end interval, falls inside a declared time range; items without a usable acquisition time are not-run.",
121
+ "applies_to": [
122
+ "stac"
123
+ ],
124
+ "enabled_by": [
125
+ "time_range"
126
+ ]
127
+ },
128
+ "terrain.slope_consistent": {
129
+ "family": "terrain",
130
+ "description": "A slope-in-degrees raster matches central differences on its DEM (passed with --dem) using the DEM's declared vertical unit and real pixel spacing; matching the slope with vertical units ignored or square pixels assumed fails, matching neither warns, and geographic or unaligned grids are not-run.",
131
+ "applies_to": [
132
+ "raster"
133
+ ],
134
+ "enabled_by": [
135
+ "dem"
136
+ ]
137
+ },
138
+ "sar.value_domain": {
139
+ "family": "sar",
140
+ "description": "Sampled backscatter values lie in the domain declared by the expected scale (sigma0-db within [-50, 15] dB; sigma0-linear non-negative with p99 <= 5). Flags decibel/linear confusion as one possible cause; not a calibration check.",
141
+ "applies_to": [
142
+ "raster"
143
+ ],
144
+ "enabled_by": [
145
+ "sar_expect"
146
+ ]
147
+ },
148
+ "sar.geocoded": {
149
+ "family": "sar",
150
+ "description": "A raster carries both a CRS and a non-identity geotransform; GCP-only geometry or an identity transform fails as not geocoded.",
151
+ "applies_to": [
152
+ "raster"
153
+ ],
154
+ "enabled_by": [
155
+ "sar_expect"
156
+ ]
157
+ },
158
+ "accuracy.sample_design": {
159
+ "family": "accuracy",
160
+ "description": "Every map class in the reference-sample CSV has at least min_per_class samples (default 50, a configurable rule of thumb); missing class areas when area estimates are requested are warned."
161
+ },
162
+ "accuracy.estimates": {
163
+ "family": "accuracy",
164
+ "description": "Confusion matrix, user's and area-weighted producer's accuracy, overall accuracy, and the stratified area-adjusted area of each reference class with 95% confidence intervals (Olofsson et al. 2014, eqs. 5-6 and 10-12); not-run when map-class areas are missing."
165
+ },
166
+ "provenance.reproducible": {
167
+ "family": "provenance",
168
+ "description": "A written run manifest verifies: recorded input/output files re-hash identically and recorded tool versions still match; warns on tool-version drift, fails on changed or missing files, an edited manifest core, or a recorded path outside the workspace.",
169
+ "applies_to": [
170
+ "raster",
171
+ "vector",
172
+ "stac"
173
+ ],
174
+ "enabled_by": [
175
+ "manifest"
176
+ ]
177
+ },
178
+ "preflight.metric_crs": {
179
+ "family": "preflight",
180
+ "description": "Plan check: a declared distance, area, or buffer step runs in a projected horizontal CRS with metre or foot units, not in a geographic or geocentric CRS."
181
+ },
182
+ "preflight.alignment": {
183
+ "family": "preflight",
184
+ "description": "Plan check: inputs declared for combination or comparison share a CRS, pixel size, and pixel-grid origin, or the plan declares a reprojection/alignment step."
185
+ },
186
+ "preflight.categorical_resampling": {
187
+ "family": "preflight",
188
+ "description": "Plan check: a declared categorical layer (classification, mask, or QA band) is resampled with nearest neighbour or mode, not with a bilinear or cubic kernel."
189
+ },
190
+ "preflight.reflectance_decode": {
191
+ "family": "preflight",
192
+ "description": "Plan check: an 'expect reflectance' operation on integer raster inputs that carry a non-trivial scale or offset declares a decode step. Reads the plan and input encoding metadata only; it does not compare outputs or show how often a decode was actually applied."
193
+ },
194
+ "preflight.temporal_scope": {
195
+ "family": "preflight",
196
+ "description": "Plan check: the requested analysis time range contains the datetimes of the STAC items or inputs the plan selects."
197
+ },
198
+ "preflight.index_inputs": {
199
+ "family": "preflight",
200
+ "description": "Plan check: an 'expect index' operation on integer raster inputs that carry a non-trivial scale or offset declares a decode step, so the index would be computed on decoded values rather than raw DN. Reads the plan and input encoding metadata only; it does not verify that the bands a given index needs are present or that any formula was applied."
201
+ },
202
+ "preflight.output_units": {
203
+ "family": "preflight",
204
+ "description": "Plan check: the output CRS units match the measurement units the plan requests, so a metric result is not written in degrees or the reverse."
205
+ },
206
+ "rs.index_formula": {
207
+ "family": "rs",
208
+ "description": "Opt-in spectral-index comparison (NDVI, NBR, dNBR, McFeeters NDWI, MNDWI, Gao NDMI, SAVI, EVI) with declared source-band roles, each band's scale/offset and joint valid support; unsupported cells must be nodata and extra masking warns.",
209
+ "applies_to": [
210
+ "raster"
211
+ ],
212
+ "enabled_by": [
213
+ "index_formula",
214
+ "nir",
215
+ "red",
216
+ "index_bands"
217
+ ]
218
+ },
219
+ "rs.stack_reduction": {
220
+ "family": "rs",
221
+ "description": "Opt-in per-pixel reduction of an ordered input stack (median, count, weighted sum such as rate x hours, mean in linear power for dB, OLS slope against declared times) on the output grid; cells without enough valid inputs must be nodata, extra masking warns, and how the inputs were made is not checked.",
222
+ "applies_to": [
223
+ "raster"
224
+ ],
225
+ "enabled_by": [
226
+ "stack",
227
+ "stack_reduction"
228
+ ]
229
+ },
230
+ "terrain.slope_formula": {
231
+ "family": "terrain",
232
+ "description": "Opt-in calibrated central-difference slope comparison: every required value, complete center/four-neighbour support and nodata edges.",
233
+ "applies_to": [
234
+ "raster"
235
+ ],
236
+ "enabled_by": [
237
+ "slope_method",
238
+ "dem"
239
+ ]
240
+ },
241
+ "raster.source_identity": {
242
+ "family": "raster",
243
+ "description": "Opt-in exact decoded valid-sample and full band-validity comparison with a declared raster source, including grid and band metadata; not COG conformance.",
244
+ "applies_to": [
245
+ "raster"
246
+ ],
247
+ "enabled_by": [
248
+ "raster_identity",
249
+ "compare_to"
250
+ ]
251
+ },
252
+ "raster.vertical_units": {
253
+ "family": "raster",
254
+ "description": "A height or height-difference output matches its declared sources' vertical units converted to the declared output unit, and its unit label does not contradict it.",
255
+ "applies_to": [
256
+ "raster"
257
+ ],
258
+ "enabled_by": [
259
+ "vertical_operation",
260
+ "vertical_sources",
261
+ "vertical_source_units",
262
+ "vertical_unit"
263
+ ]
264
+ },
265
+ "raster.nodata_support": {
266
+ "family": "raster",
267
+ "description": "The output is valid exactly where its declared sources are valid under the declared rule, so fill is not treated as data and valid values are not treated as fill.",
268
+ "applies_to": [
269
+ "raster"
270
+ ],
271
+ "enabled_by": [
272
+ "support_sources",
273
+ "support_rule"
274
+ ]
275
+ },
276
+ "geometry.metric_values": {
277
+ "family": "geometry",
278
+ "description": "Delivered vector measurements (area or length properties, or a buffer's ground distance) match their geodesic values, whatever CRS the output is stored in.",
279
+ "applies_to": [
280
+ "vector"
281
+ ],
282
+ "enabled_by": [
283
+ "metric_quantity",
284
+ "metric_property",
285
+ "metric_unit"
286
+ ]
287
+ }
288
+ }
289
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "note": "A goal profile names the checks a declared goal requires. Each check still needs its own declared bindings; a missing one makes the requirement incomplete. Nothing is inferred from task text.",
4
+ "profiles": {
5
+ "vertical-units": {
6
+ "description": "A height, depth or elevation-change output made from sources with declared vertical units.",
7
+ "checks": [
8
+ "raster.vertical_units"
9
+ ]
10
+ },
11
+ "nodata-support": {
12
+ "description": "An output whose valid cells must follow its sources' declared fill and support rule.",
13
+ "checks": [
14
+ "raster.nodata_support"
15
+ ]
16
+ },
17
+ "qa-masked": {
18
+ "description": "An optical output that must exclude cells flagged by a declared QA layer.",
19
+ "checks": [
20
+ "rs.cloud_mask_applied"
21
+ ]
22
+ },
23
+ "scaled-reflectance": {
24
+ "description": "Surface reflectance decoded once from a declared integer product encoding.",
25
+ "checks": [
26
+ "rs.reflectance_range",
27
+ "rs.scale_applied_once"
28
+ ]
29
+ },
30
+ "metric-operation": {
31
+ "description": "A dataset about to be used for a distance, area, length or buffer operation must be in a metric CRS. For measurements already delivered, use metric-values.",
32
+ "checks": [
33
+ "crs.metric_operation"
34
+ ]
35
+ },
36
+ "slope-from-dem": {
37
+ "description": "A slope-in-degrees output derived from a declared DEM.",
38
+ "checks": [
39
+ "terrain.slope_consistent"
40
+ ]
41
+ },
42
+ "metric-values": {
43
+ "description": "Vector measurements already delivered (area or length properties, or a buffer), in any CRS.",
44
+ "checks": [
45
+ "geometry.metric_values"
46
+ ]
47
+ }
48
+ }
49
+ }
@@ -390,3 +390,12 @@ The full calibration/QA checks (`src/terraproof/checks/processing_full.py`) and
390
390
  checker scorecard (`tests/checker_scorecard.py`) are original Terraproof/Geova MIT code. No
391
391
  external implementation is vendored. Raster validity follows the
392
392
  [Rasterio mask API](https://rasterio.readthedocs.io/en/stable/topics/masks.html).
393
+
394
+ ## Verification contracts and runtime admission
395
+
396
+ Verification contracts, structured diagnostics, unsigned evidence bundles and the
397
+ study runtime-admission helper are original Terraproof/Geova code under this
398
+ repository's MIT license. No external implementation or data is vendored.
399
+ Existing product skills, sources and third-party attribution remain included in
400
+ candidate wheels. Evidence bundles are local integrity records, not signatures
401
+ or scientific certification.