ecological-agent-skills 3.1.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.
Files changed (217) hide show
  1. package/AGENT_CONTEXT.md +191 -0
  2. package/CATALOG.md +329 -0
  3. package/LICENSE +692 -0
  4. package/README.md +347 -0
  5. package/bin/install.mjs +168 -0
  6. package/docs/comparison-with-alternatives.md +38 -0
  7. package/docs/global-examples-index.md +103 -0
  8. package/docs/repository-statistics.md +101 -0
  9. package/docs/theoretical-foundations.md +188 -0
  10. package/environment.yaml +106 -0
  11. package/examples/community/arctic_tundra_vegetation_example.md +247 -0
  12. package/examples/community/bird_landuse_example.md +63 -0
  13. package/examples/community/phytoplankton_reservoir_example.md +60 -0
  14. package/examples/community/reef_fish_indopacific_example.md +221 -0
  15. package/examples/impact/baci_road_example.md +57 -0
  16. package/examples/impact/ecosystem_services_atlantic_forest.md +83 -0
  17. package/examples/impact/forest_loss_borneo_timeseries_example.md +225 -0
  18. package/examples/occupancy/puma_camera_example.md +61 -0
  19. package/examples/occupancy/snow_leopard_himalayas_example.md +204 -0
  20. package/examples/reproducible/whittaker_biome_sdm_example.md +406 -0
  21. package/examples/sdm/anteater_cerrado_example.md +69 -0
  22. package/examples/sdm/jaguar_amazon_example.md +80 -0
  23. package/examples/sdm/koala_climate_change_example.md +170 -0
  24. package/examples/sdm/wolf_recolonization_europe_example.md +193 -0
  25. package/package.json +43 -0
  26. package/renv.lock +194 -0
  27. package/skills/SKILL_INDEX.json +1020 -0
  28. package/skills/acoustic-monitoring/SKILL.md +163 -0
  29. package/skills/acoustic-monitoring/examples/example-prompts.md +100 -0
  30. package/skills/acoustic-monitoring/examples/temperate_forest_birds_example.md +285 -0
  31. package/skills/acoustic-monitoring/resources/acoustic-indices-reference.md +93 -0
  32. package/skills/acoustic-monitoring/resources/soundscape-ecology-guide.md +90 -0
  33. package/skills/acoustic-monitoring/resources/species-id-tools-comparison.md +89 -0
  34. package/skills/acoustic-monitoring/scripts/batch_species_detection.py +360 -0
  35. package/skills/acoustic-monitoring/scripts/compute_acoustic_indices.R +235 -0
  36. package/skills/acoustic-monitoring/scripts/compute_acoustic_indices.py +374 -0
  37. package/skills/biostatistics-workbench/SKILL.md +140 -0
  38. package/skills/biostatistics-workbench/examples/example-prompts.md +39 -0
  39. package/skills/biostatistics-workbench/resources/effect-size-reference.md +81 -0
  40. package/skills/biostatistics-workbench/resources/glm-family-link-reference.md +47 -0
  41. package/skills/biostatistics-workbench/resources/test-selection-guide.md +93 -0
  42. package/skills/biostatistics-workbench/scripts/glm_pipeline.R +78 -0
  43. package/skills/biostatistics-workbench/scripts/glm_pipeline.py +210 -0
  44. package/skills/camera-trap-processing/SKILL.md +159 -0
  45. package/skills/camera-trap-processing/examples/example-prompts.md +103 -0
  46. package/skills/camera-trap-processing/examples/leopard_serengeti_example.md +231 -0
  47. package/skills/camera-trap-processing/resources/activity-patterns-reference.md +113 -0
  48. package/skills/camera-trap-processing/resources/camtrapR-workflow-guide.md +130 -0
  49. package/skills/camera-trap-processing/resources/detection-event-definition-guide.md +89 -0
  50. package/skills/camera-trap-processing/scripts/estimate_activity.R +169 -0
  51. package/skills/camera-trap-processing/scripts/process_camtrap_data.R +179 -0
  52. package/skills/camera-trap-processing/scripts/process_camtrap_data.py +192 -0
  53. package/skills/community-ecology-ordination/SKILL.md +133 -0
  54. package/skills/community-ecology-ordination/examples/example-prompts.md +35 -0
  55. package/skills/community-ecology-ordination/resources/dissimilarity-metric-guide.md +53 -0
  56. package/skills/community-ecology-ordination/resources/nmds-interpretation-guide.md +104 -0
  57. package/skills/community-ecology-ordination/scripts/__pycache__/community_analysis.cpython-311.pyc +0 -0
  58. package/skills/community-ecology-ordination/scripts/community_analysis.R +143 -0
  59. package/skills/community-ecology-ordination/scripts/community_analysis.py +231 -0
  60. package/skills/ecological-data-foundation/SKILL.md +129 -0
  61. package/skills/ecological-data-foundation/examples/example-prompts.md +40 -0
  62. package/skills/ecological-data-foundation/resources/coordinate-cleaning-flags.md +66 -0
  63. package/skills/ecological-data-foundation/resources/darwin-core-glossary.md +91 -0
  64. package/skills/ecological-data-foundation/resources/data-citation-guide.md +265 -0
  65. package/skills/ecological-data-foundation/resources/gbif-data-citation-guide.md +193 -0
  66. package/skills/ecological-data-foundation/resources/qa-checklist.md +83 -0
  67. package/skills/ecological-data-foundation/scripts/__pycache__/clean_occurrences.cpython-311.pyc +0 -0
  68. package/skills/ecological-data-foundation/scripts/__pycache__/download_from_ebird.cpython-311.pyc +0 -0
  69. package/skills/ecological-data-foundation/scripts/__pycache__/download_from_inat.cpython-311.pyc +0 -0
  70. package/skills/ecological-data-foundation/scripts/__pycache__/download_from_iucn.cpython-311.pyc +0 -0
  71. package/skills/ecological-data-foundation/scripts/__pycache__/download_from_obis.cpython-311.pyc +0 -0
  72. package/skills/ecological-data-foundation/scripts/clean_occurrences.R +230 -0
  73. package/skills/ecological-data-foundation/scripts/clean_occurrences.py +268 -0
  74. package/skills/ecological-data-foundation/scripts/download_from_ebird.R +251 -0
  75. package/skills/ecological-data-foundation/scripts/download_from_ebird.py +364 -0
  76. package/skills/ecological-data-foundation/scripts/download_from_gbif.R +315 -0
  77. package/skills/ecological-data-foundation/scripts/download_from_gbif.py +407 -0
  78. package/skills/ecological-data-foundation/scripts/download_from_inat.R +238 -0
  79. package/skills/ecological-data-foundation/scripts/download_from_inat.py +304 -0
  80. package/skills/ecological-data-foundation/scripts/download_from_iucn.R +273 -0
  81. package/skills/ecological-data-foundation/scripts/download_from_iucn.py +344 -0
  82. package/skills/ecological-data-foundation/scripts/download_from_obis.R +248 -0
  83. package/skills/ecological-data-foundation/scripts/download_from_obis.py +318 -0
  84. package/skills/ecological-impact-assessment/SKILL.md +123 -0
  85. package/skills/ecological-impact-assessment/examples/example-prompts.md +32 -0
  86. package/skills/ecological-impact-assessment/resources/baci-design-guide.md +55 -0
  87. package/skills/ecological-impact-assessment/resources/fragmentation-metrics-reference.md +86 -0
  88. package/skills/ecological-impact-assessment/resources/pressure-index-template.md +78 -0
  89. package/skills/ecological-impact-assessment/resources/study-design-guide.md +168 -0
  90. package/skills/ecological-impact-assessment/scripts/baci_analysis.R +161 -0
  91. package/skills/ecological-impact-assessment/scripts/fragmentation_analysis.py +141 -0
  92. package/skills/ecological-impact-assessment/scripts/power_analysis_baci.R +274 -0
  93. package/skills/ecosystem-services-assessment/SKILL.md +125 -0
  94. package/skills/ecosystem-services-assessment/examples/example-prompts.md +24 -0
  95. package/skills/ecosystem-services-assessment/resources/es-indicator-reference.md +45 -0
  96. package/skills/ecosystem-services-assessment/resources/invest-parameter-guide.md +86 -0
  97. package/skills/ecosystem-services-assessment/resources/rusle-coefficients.md +88 -0
  98. package/skills/ecosystem-services-assessment/scripts/__pycache__/compute_es.cpython-311.pyc +0 -0
  99. package/skills/ecosystem-services-assessment/scripts/compute_es.py +189 -0
  100. package/skills/ecosystem-services-assessment/scripts/tradeoff_analysis.R +161 -0
  101. package/skills/environmental-time-series/SKILL.md +125 -0
  102. package/skills/environmental-time-series/examples/example-prompts.md +33 -0
  103. package/skills/environmental-time-series/resources/anomaly-indices-reference.md +88 -0
  104. package/skills/environmental-time-series/resources/bfast-parameter-guide.md +69 -0
  105. package/skills/environmental-time-series/scripts/__pycache__/recovery_trajectory.cpython-311.pyc +0 -0
  106. package/skills/environmental-time-series/scripts/__pycache__/trend_analysis.cpython-311.pyc +0 -0
  107. package/skills/environmental-time-series/scripts/recovery_trajectory.R +305 -0
  108. package/skills/environmental-time-series/scripts/recovery_trajectory.py +178 -0
  109. package/skills/environmental-time-series/scripts/trend_analysis.R +192 -0
  110. package/skills/environmental-time-series/scripts/trend_analysis.py +184 -0
  111. package/skills/geoprocessing-for-ecology/SKILL.md +123 -0
  112. package/skills/geoprocessing-for-ecology/examples/example-prompts.md +32 -0
  113. package/skills/geoprocessing-for-ecology/resources/crs-reference.md +62 -0
  114. package/skills/geoprocessing-for-ecology/resources/global-predictor-sources.md +331 -0
  115. package/skills/geoprocessing-for-ecology/resources/resampling-methods.md +57 -0
  116. package/skills/geoprocessing-for-ecology/scripts/__pycache__/download_predictors.cpython-311.pyc +0 -0
  117. package/skills/geoprocessing-for-ecology/scripts/download_predictors.R +239 -0
  118. package/skills/geoprocessing-for-ecology/scripts/download_predictors.py +379 -0
  119. package/skills/geoprocessing-for-ecology/scripts/stack_and_extract.R +224 -0
  120. package/skills/geoprocessing-for-ecology/scripts/stack_and_extract.py +172 -0
  121. package/skills/landscape-connectivity/SKILL.md +170 -0
  122. package/skills/landscape-connectivity/examples/example-prompts.md +96 -0
  123. package/skills/landscape-connectivity/examples/jaguar_mesoamerica_corridor_example.md +271 -0
  124. package/skills/landscape-connectivity/resources/circuitscape-parameter-guide.md +155 -0
  125. package/skills/landscape-connectivity/resources/graph-theory-for-ecology.md +134 -0
  126. package/skills/landscape-connectivity/resources/resistance-surface-guide.md +141 -0
  127. package/skills/landscape-connectivity/scripts/connectivity_analysis.py +387 -0
  128. package/skills/landscape-connectivity/scripts/connectivity_metrics.R +274 -0
  129. package/skills/landscape-connectivity/scripts/resistance_surface.R +239 -0
  130. package/skills/model-validation-and-uncertainty/SKILL.md +131 -0
  131. package/skills/model-validation-and-uncertainty/examples/example-prompts.md +30 -0
  132. package/skills/model-validation-and-uncertainty/resources/extrapolation-risk-guide.md +236 -0
  133. package/skills/model-validation-and-uncertainty/resources/metric-selection-guide.md +52 -0
  134. package/skills/model-validation-and-uncertainty/resources/threshold-selection-guide.md +64 -0
  135. package/skills/model-validation-and-uncertainty/scripts/__pycache__/validate_model.cpython-311.pyc +0 -0
  136. package/skills/model-validation-and-uncertainty/scripts/extrapolation_risk.R +315 -0
  137. package/skills/model-validation-and-uncertainty/scripts/validate_model.py +226 -0
  138. package/skills/model-validation-and-uncertainty/scripts/validate_sdm.R +162 -0
  139. package/skills/occupancy-and-detection/SKILL.md +126 -0
  140. package/skills/occupancy-and-detection/examples/example-prompts.md +33 -0
  141. package/skills/occupancy-and-detection/resources/detection-history-format.md +100 -0
  142. package/skills/occupancy-and-detection/resources/occupancy-study-design.md +47 -0
  143. package/skills/occupancy-and-detection/scripts/__pycache__/occupancy_analysis.cpython-311.pyc +0 -0
  144. package/skills/occupancy-and-detection/scripts/occupancy_analysis.R +160 -0
  145. package/skills/occupancy-and-detection/scripts/occupancy_analysis.py +159 -0
  146. package/skills/population-viability-analysis/SKILL.md +161 -0
  147. package/skills/population-viability-analysis/examples/african_elephant_pva_example.md +266 -0
  148. package/skills/population-viability-analysis/examples/example-prompts.md +95 -0
  149. package/skills/population-viability-analysis/resources/extinction-risk-thresholds.md +128 -0
  150. package/skills/population-viability-analysis/resources/matrix-model-guide.md +139 -0
  151. package/skills/population-viability-analysis/resources/sensitivity-elasticity-reference.md +182 -0
  152. package/skills/population-viability-analysis/scripts/matrix_pva.R +258 -0
  153. package/skills/population-viability-analysis/scripts/pva_analysis.py +442 -0
  154. package/skills/population-viability-analysis/scripts/stochastic_pva.R +353 -0
  155. package/skills/predictive-modeling-best-practices/SKILL.md +136 -0
  156. package/skills/predictive-modeling-best-practices/examples/example-prompts.md +58 -0
  157. package/skills/predictive-modeling-best-practices/resources/collinearity-decision-tree.md +65 -0
  158. package/skills/predictive-modeling-best-practices/resources/sampling-bias-correction.md +267 -0
  159. package/skills/predictive-modeling-best-practices/resources/spatial-cv-guide.md +73 -0
  160. package/skills/predictive-modeling-best-practices/scripts/__pycache__/spatial_cv.cpython-311.pyc +0 -0
  161. package/skills/predictive-modeling-best-practices/scripts/collinearity_check.R +112 -0
  162. package/skills/predictive-modeling-best-practices/scripts/spatial_cv.py +182 -0
  163. package/skills/reproducible-ecology-pipeline/SKILL.md +139 -0
  164. package/skills/reproducible-ecology-pipeline/examples/example-prompts.md +35 -0
  165. package/skills/reproducible-ecology-pipeline/resources/directory-structure-template.md +94 -0
  166. package/skills/reproducible-ecology-pipeline/resources/params-yaml-template.yaml +84 -0
  167. package/skills/reproducible-ecology-pipeline/resources/reproducibility-checklist-template.md +66 -0
  168. package/skills/reproducible-ecology-pipeline/scripts/generate_file_manifest.py +110 -0
  169. package/skills/reproducible-ecology-pipeline/scripts/init_project.sh +53 -0
  170. package/skills/spatial-prioritization/SKILL.md +162 -0
  171. package/skills/spatial-prioritization/examples/biodiversity_hotspot_prioritization_example.md +289 -0
  172. package/skills/spatial-prioritization/examples/example-prompts.md +93 -0
  173. package/skills/spatial-prioritization/resources/cost-surface-reference.md +130 -0
  174. package/skills/spatial-prioritization/resources/marxan-vs-prioritizr-comparison.md +125 -0
  175. package/skills/spatial-prioritization/resources/prioritizr-formulation-guide.md +188 -0
  176. package/skills/spatial-prioritization/resources/representation-targets-guide.md +186 -0
  177. package/skills/spatial-prioritization/scripts/prioritization_sensitivity.R +320 -0
  178. package/skills/spatial-prioritization/scripts/run_prioritization.R +336 -0
  179. package/skills/species-distribution-modeling/SKILL.md +139 -0
  180. package/skills/species-distribution-modeling/examples/example-prompts.md +36 -0
  181. package/skills/species-distribution-modeling/resources/algorithm-comparison.md +25 -0
  182. package/skills/species-distribution-modeling/resources/calibration-area-guide.md +71 -0
  183. package/skills/species-distribution-modeling/resources/climate-scenario-preparation.md +170 -0
  184. package/skills/species-distribution-modeling/resources/maxent-calibration-guide.md +211 -0
  185. package/skills/species-distribution-modeling/resources/sdm-checklist.md +37 -0
  186. package/skills/species-distribution-modeling/scripts/predict_distribution.R +236 -0
  187. package/skills/species-distribution-modeling/scripts/predict_distribution.py +286 -0
  188. package/skills/species-distribution-modeling/scripts/prepare_future_layers.R +351 -0
  189. package/skills/species-distribution-modeling/scripts/project_scenarios.R +220 -0
  190. package/skills/species-distribution-modeling/scripts/run_ensemble_sdm.R +99 -0
  191. package/skills/species-distribution-modeling/scripts/sdm_pipeline.py +318 -0
  192. package/skills/species-distribution-modeling/scripts/tune_maxnet.R +344 -0
  193. package/templates/SKILL_TEMPLATE.md +225 -0
  194. package/templates/checklists/data-submission-checklist.md +38 -0
  195. package/templates/checklists/post-analysis-checklist.md +55 -0
  196. package/templates/checklists/pre-analysis-checklist.md +31 -0
  197. package/templates/prompts/debug-skill.md +47 -0
  198. package/templates/prompts/invoke-skill.md +34 -0
  199. package/templates/prompts/invoke-workflow.md +45 -0
  200. package/templates/reports/technical-report-template.md +80 -0
  201. package/templates/scripts/logger_setup.R +79 -0
  202. package/templates/scripts/logger_setup.py +119 -0
  203. package/templates/scripts/params_loader.R +28 -0
  204. package/templates/scripts/params_loader.py +38 -0
  205. package/workflows/analyze-community-structure/WORKFLOW.md +72 -0
  206. package/workflows/analyze-environmental-change/WORKFLOW.md +73 -0
  207. package/workflows/assess-ecological-impact/WORKFLOW.md +75 -0
  208. package/workflows/assess-ecosystem-services/WORKFLOW.md +68 -0
  209. package/workflows/assess-landscape-connectivity/WORKFLOW.md +84 -0
  210. package/workflows/build-fire-risk-map/WORKFLOW.md +79 -0
  211. package/workflows/produce-technical-report/WORKFLOW.md +113 -0
  212. package/workflows/run-camera-trap-occupancy/WORKFLOW.md +87 -0
  213. package/workflows/run-conservation-prioritization/WORKFLOW.md +89 -0
  214. package/workflows/run-multispecies-screening/WORKFLOW.md +197 -0
  215. package/workflows/run-occupancy-analysis/WORKFLOW.md +74 -0
  216. package/workflows/run-population-viability/WORKFLOW.md +90 -0
  217. package/workflows/run-sdm-study/WORKFLOW.md +99 -0
@@ -0,0 +1,113 @@
1
+ # Workflow: produce-technical-report
2
+
3
+ **Purpose:** Synthesise analytical outputs into a publication-ready technical report
4
+ **Skills:** reproducible-ecology-pipeline → (read analytical outputs) → report template → technical synthesis
5
+
6
+ ---
7
+
8
+ ## Trigger
9
+
10
+ Invoke when the user wants to generate a structured technical report from the outputs of a completed analysis.
11
+
12
+ **Example prompts:**
13
+ - "Write a technical report from the SDM results"
14
+ - "Generate a methods and results section based on these outputs"
15
+ - "Produce the final impact assessment report"
16
+
17
+ ---
18
+
19
+ ## Prerequisites
20
+
21
+ At least one upstream workflow must have been completed. The following files should exist:
22
+ - `parameter_manifest.yaml`
23
+ - `decision_log.md`
24
+ - `performance_metrics.csv` or equivalent results tables
25
+ - Key figures (maps, plots)
26
+
27
+ ---
28
+
29
+ ## Steps
30
+
31
+ ### Step 1 — Read Reproducibility Package
32
+ - Load `parameter_manifest.yaml` and `decision_log.md`
33
+ - Extract: data sources, software versions, all parameters, key decisions
34
+
35
+ ### Step 2 — Inventory Analytical Outputs
36
+ - List all result tables, maps, and figures
37
+ - Confirm each output is traceable to its generating step
38
+
39
+ ### Step 3 — Synthesise Methods Section
40
+ - Write Methods following the relevant reporting standard:
41
+ - SDM: ODMAP protocol
42
+ - Occupancy: standard unmarked/PRESENCE reporting
43
+ - Impact assessment: BACI reporting guidelines
44
+ - Community ecology: vegan + PERMANOVA conventions
45
+ - Include: data sources, cleaning steps, modeling approach, validation strategy, uncertainty quantification
46
+
47
+ ### Step 4 — Synthesise Results Section
48
+ - Present results in order: data summary → model performance → main findings → uncertainty
49
+ - Integrate figures and tables with cross-references
50
+ - State statistical findings with: estimate, CI, test statistic, p-value, effect size
51
+
52
+ ### Step 5 — Write Discussion Outline
53
+ - Interpret main findings in ecological context
54
+ - Discuss model limitations and uncertainties
55
+ - Suggest management implications (if applicable)
56
+ - Propose follow-up studies
57
+
58
+ ### Step 6 — Final Checklist
59
+ - [ ] All figures labelled and captioned
60
+ - [ ] All tables numbered and titled
61
+ - [ ] All statistical values reported completely (estimate, CI, test stat, p, effect size)
62
+ - [ ] Data and code availability statement included
63
+ - [ ] Software citations included
64
+ - [ ] Report cross-checks against `parameter_manifest.yaml` complete
65
+
66
+ ---
67
+
68
+ ## Report Template Structure
69
+
70
+ ```
71
+ 1. Introduction
72
+ 2. Methods
73
+ 2.1 Study area
74
+ 2.2 Data sources
75
+ 2.3 Data preparation
76
+ 2.4 Analysis approach
77
+ 2.5 Validation and uncertainty
78
+ 3. Results
79
+ 3.1 Data summary
80
+ 3.2 Model performance
81
+ 3.3 Main findings
82
+ 3.4 Uncertainty
83
+ 4. Discussion
84
+ 5. Conclusions
85
+ 6. References
86
+ Appendix: Reproducibility package
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Reporting Standards Reference
92
+
93
+ | Analysis type | Standard |
94
+ |---------------|---------|
95
+ | SDM | ODMAP (Zurell et al. 2020, Ecography) |
96
+ | Occupancy | MacKenzie et al. (2018) textbook conventions |
97
+ | Community ecology | vegan documentation; Oksanen et al. |
98
+ | Impact assessment | CEQ NEPA guidelines or local equivalent |
99
+ | Ecosystem services | IPBES assessment framework |
100
+
101
+ ---
102
+
103
+ ## Decision Points
104
+
105
+ | Condition | Diagnosis | Recommended Action |
106
+ |---|---|---|
107
+ | Analysis not reproducible from params.yaml alone | Missing parameter documentation | Complete params.yaml before finalising report; add all missing parameters and run again |
108
+ | Figures generated with different software versions | Version lock not enforced | Record all package versions in session_info.txt; use renv/conda lockfile for environment reproducibility |
109
+ | Statistical results change with different random seed | Stochastic component not fixed | Set and document seed in params.yaml; report sensitivity of results to seed variation |
110
+ | External reviewer cannot reproduce key figure | Code sharing incomplete | Ensure all scripts are included; verify all input data paths are documented and data is accessible |
111
+ | Report references unpublished dataset | Citation incomplete for peer review | Obtain dataset DOI (Zenodo, Dryad, GBIF) or write data availability statement before submission |
112
+ | Methods section length exceeds journal limit | Too much methodological detail in main text | Move detailed parameters to Supplementary Methods; use ODMAP table format for SDMs |
113
+ | Discussion cites model predictions without uncertainty | Overconfident interpretation | Always pair predictions with uncertainty estimates; use conditional language ("model suggests", "under assumptions") |
@@ -0,0 +1,87 @@
1
+ # Workflow: run-camera-trap-occupancy
2
+
3
+ **Purpose:** Process camera trap data into detection histories and estimate occupancy with imperfect detection
4
+ **Skills:** ecological-data-foundation → camera-trap-processing → occupancy-and-detection → model-validation-and-uncertainty → reproducible-ecology-pipeline
5
+
6
+ ---
7
+
8
+ ## Trigger
9
+
10
+ Invoke when the user has camera trap image records and wants to estimate species occupancy accounting for imperfect detection.
11
+
12
+ **Example prompts:**
13
+ - "Process my camera trap data and estimate jaguar occupancy in the study area"
14
+ - "Build detection histories from camera trap records and run an occupancy model"
15
+ - "Estimate puma occupancy from camera trap surveys across 40 stations"
16
+
17
+ ---
18
+
19
+ ## Steps
20
+
21
+ ### Step 1 — ecological-data-foundation
22
+ - Validate camera station metadata (GPS coordinates, deployment/retrieval dates)
23
+ - Clean species identification records; resolve taxonomy
24
+ - Flag stations with incomplete deployment periods
25
+ - Output: `stations_clean.csv`, `records_clean.csv`, `qa_report.md`
26
+
27
+ ### Step 2 — camera-trap-processing
28
+ - Define independence threshold (default 30 min; adjust per taxon)
29
+ - Generate record table with independent detection events
30
+ - Build camera operation matrix (active/inactive per station per day)
31
+ - Construct detection history matrix (sites x occasions)
32
+ - Compute trap effort summary and RAI (relative abundance index)
33
+ - Output: `record_table.csv`, `detection_history.csv`, `camera_operation.csv`, `trap_effort.csv`
34
+
35
+ ### Step 3 — occupancy-and-detection
36
+ - Fit null model psi(.), p(.)
37
+ - Fit candidate models with site covariates (habitat, elevation, distance to water) and detection covariates (effort, season, camera model)
38
+ - Goodness-of-fit: MacKenzie-Bailey chi-squared (parametric bootstrap)
39
+ - Model selection by AICc (or QAICc if c-hat > 1.5)
40
+ - Report psi and p with 95% CIs
41
+ - Output: `model_selection_table.csv`, `occupancy_estimates.csv`, `gof_report.md`
42
+
43
+ ### Step 4 — model-validation-and-uncertainty
44
+ - Report goodness-of-fit and c-hat
45
+ - Assess sensitivity to independence threshold choice
46
+ - Compute minimum surveys needed for target detection power
47
+ - Output: `validation_report.md`, `power_analysis.csv`
48
+
49
+ ### Step 5 — reproducible-ecology-pipeline
50
+ - Document independence threshold justification
51
+ - Log candidate model rationale and closure assumption
52
+ - Capture software environment (R/camtrapR/unmarked versions)
53
+ - Output: `parameter_manifest.yaml`, `decision_log.md`, `reproducibility_checklist.md`
54
+
55
+ ---
56
+
57
+ ## Expected Deliverables
58
+
59
+ - Detection history matrix (sites x occasions)
60
+ - Camera operation and trap effort summaries
61
+ - Occupancy estimate (psi) with 95% CI
62
+ - Detection estimate (p) with 95% CI
63
+ - Model selection table (AICc, delta-AIC, weights)
64
+ - Covariate effect estimates
65
+ - Reproducibility package
66
+
67
+ ---
68
+
69
+ ## Minimum Data Requirements
70
+
71
+ - >= 20 camera stations with >= 3 survey occasions each
72
+ - Station metadata with GPS coordinates and deployment dates
73
+ - Species identification for target species
74
+ - >= 5 independent detections of target species across stations
75
+
76
+ ---
77
+
78
+ ## Decision Points
79
+
80
+ | Condition | Diagnosis | Recommended Action |
81
+ |---|---|---|
82
+ | RAI = 0 for target species | Species not detected at any station | Cannot fit occupancy model; report non-detection; consider expanding survey effort |
83
+ | < 5 detections across all stations | Extremely low detection rate | Occupancy estimates will be unreliable; report with strong caveats; consider pooling occasions |
84
+ | Independence threshold changes results by > 20% | Sensitivity to threshold choice | Report results at multiple thresholds (15, 30, 60 min); justify final choice in decision log |
85
+ | Camera operation < 70% of planned effort | High station failure rate | Exclude stations with < 14 active days; report effective vs planned effort |
86
+ | GoF test fails (p < 0.05) | Closure violation or unmodelled heterogeneity | Shorten occasion length to reduce closure violations; add detection covariates |
87
+ | Naive occupancy = 1.0 | Species detected at every station | Occupancy model unnecessary; report naive occupancy; focus on abundance or activity patterns |
@@ -0,0 +1,89 @@
1
+ # Workflow: run-conservation-prioritization
2
+
3
+ **Purpose:** Identify priority areas for conservation using systematic planning tools (prioritizr/Marxan)
4
+ **Skills:** ecological-data-foundation → geoprocessing-for-ecology → species-distribution-modeling → spatial-prioritization → reproducible-ecology-pipeline
5
+
6
+ ---
7
+
8
+ ## Trigger
9
+
10
+ Invoke when the user wants to design a reserve network, identify priority areas for conservation, evaluate representation targets, or assess existing protected area coverage.
11
+
12
+ **Example prompts:**
13
+ - "Run a spatial prioritization for 50 species in the Atlantic Forest with 30% targets"
14
+ - "Design a reserve network using prioritizr to meet representation targets"
15
+ - "Evaluate which areas should be added to the protected area network for [region]"
16
+
17
+ ---
18
+
19
+ ## Steps
20
+
21
+ ### Step 1 — ecological-data-foundation
22
+ - Validate species distribution data (rasters or occurrence records)
23
+ - Check planning unit layer (grid or irregular polygons)
24
+ - Validate cost layer and locked-in/locked-out constraint layers
25
+ - Output: `species_data_clean/`, `planning_units.shp`, `cost_layer.tif`, `qa_report.md`
26
+
27
+ ### Step 2 — geoprocessing-for-ecology
28
+ - Reproject all layers to common equal-area CRS
29
+ - Align raster resolutions across species distributions and cost surface
30
+ - Clip to study area extent
31
+ - Rasterise planning units if needed
32
+ - Output: `planning_units_raster.tif`, `species_stack.tif`, `cost_aligned.tif`
33
+
34
+ ### Step 3 — species-distribution-modeling (conditional)
35
+ - If species distributions are not yet available as rasters, fit SDMs
36
+ - Generate binary suitability maps for each species
37
+ - Stack all species distributions into a single raster stack
38
+ - Output: `species_binary_stack.tif`, `sdm_report.md`
39
+
40
+ ### Step 4 — spatial-prioritization
41
+ - Define representation targets (e.g., 30% of each species' range)
42
+ - Set up minimum-set or maximum-coverage problem formulation
43
+ - Apply locked-in constraints (existing protected areas) and locked-out constraints
44
+ - Calibrate boundary length modifier (BLM) for spatial compactness
45
+ - Solve using ILP solver (HiGHS via prioritizr)
46
+ - Compute irreplaceability (selection frequency across near-optimal solutions)
47
+ - Run target sensitivity analysis (20%, 30%, 50%)
48
+ - Output: `solution_map.tif`, `representation_table.csv`, `irreplaceability_map.tif`, `blm_calibration.csv`, `sensitivity_report.md`
49
+
50
+ ### Step 5 — reproducible-ecology-pipeline
51
+ - Document target justification and data sources
52
+ - Log solver parameters and BLM choice
53
+ - Record constraint rationale (locked-in/out areas)
54
+ - Output: `parameter_manifest.yaml`, `decision_log.md`, `reproducibility_checklist.md`
55
+
56
+ ---
57
+
58
+ ## Expected Deliverables
59
+
60
+ - Optimal reserve solution map
61
+ - Feature representation summary (% target met per species)
62
+ - Irreplaceability map (selection frequency)
63
+ - BLM calibration curve (cost vs boundary length)
64
+ - Target sensitivity analysis
65
+ - Cost efficiency summary
66
+ - Reproducibility package
67
+
68
+ ---
69
+
70
+ ## Minimum Data Requirements
71
+
72
+ - Distribution data (rasters or occurrence records) for >= 5 species/features
73
+ - Planning unit layer covering study area
74
+ - Cost layer (opportunity cost or area-based)
75
+ - Representation targets (default: 30% per feature)
76
+
77
+ ---
78
+
79
+ ## Decision Points
80
+
81
+ | Condition | Diagnosis | Recommended Action |
82
+ |---|---|---|
83
+ | Problem infeasible (no solution found) | Targets exceed available habitat | Reduce targets or expand study area; report which species are infeasible |
84
+ | > 50% of planning units selected | Targets too high or cost surface too uniform | Review target realism; consider log-linear targets scaled by range size |
85
+ | BLM calibration shows no elbow | Trade-off between cost and compactness is linear | Use BLM = 0 (no compactness penalty) and report fragmented solution; justify ecologically |
86
+ | Some species at 0% representation | Species range falls outside planning units or data gap | Add occurrence data or expand study area; flag unrepresented species |
87
+ | Locked-in areas already meet all targets | Existing protected areas are sufficient | Report as positive finding; analyse gap for underrepresented species |
88
+ | Irreplaceability > 0.9 for specific planning units | Critical areas with no substitutes | Flag as highest priority for immediate protection |
89
+ | Solution changes > 40% with +/- 10% target shift | High sensitivity to target choice | Report portfolio of solutions across target range; do not present single solution as definitive |
@@ -0,0 +1,197 @@
1
+ # Workflow: run-multispecies-screening
2
+
3
+ Multi-species SDM screening pipeline for rapid prioritisation of conservation targets.
4
+
5
+ ---
6
+
7
+ ## Trigger Phrases
8
+
9
+ - "screening de [N] espécies"
10
+ - "lista de espécies ameaçadas"
11
+ - "triagem de risco"
12
+ - "priorização de espécies para modelagem"
13
+ - "quais espécies têm área adequada reduzida"
14
+ - "screen [N] species for distribution modeling"
15
+
16
+ ---
17
+
18
+ ## Skills Used
19
+
20
+ `1 → 2 → 4 → 6 → 5`
21
+
22
+ | Step | Skill |
23
+ |---|---|
24
+ | Data download + cleaning | `ecological-data-foundation` (skill 1) |
25
+ | Spatial operations | `geoprocessing-for-ecology` (skill 2) |
26
+ | Modeling best practices | `predictive-modeling-best-practices` (skill 4) |
27
+ | SDM | `species-distribution-modeling` (skill 6) |
28
+ | Validation | `model-validation-and-uncertainty` (skill 5) |
29
+
30
+ ---
31
+
32
+ ## Inputs
33
+
34
+ | Input | Format | Required | Description |
35
+ |---|---|---|---|
36
+ | `species_list.csv` | CSV with column `scientificName` | Yes | List of species to screen |
37
+ | `predictor_stack.tif` | Multi-band GeoTIFF | Yes | Environmental predictor layers |
38
+ | `study_area.shp` | Shapefile / GeoJSON | Yes | Geographic extent for projections |
39
+ | `n_min_occurrences` | Integer (default: 30) | No | Minimum cleaned records required |
40
+ | `auc_threshold` | Numeric 0–1 (default: 0.75) | No | Minimum AUC for "adequate model" |
41
+ | `suitable_area_threshold_km2` | Numeric (default: 50000) | No | Area below which species flagged as high priority |
42
+
43
+ ---
44
+
45
+ ## Pipeline — Loop per Species
46
+
47
+ For each `scientificName` in `species_list.csv`:
48
+
49
+ ### Step 1 — Download + Cleaning
50
+ **Skill:** `ecological-data-foundation`
51
+
52
+ - Download occurrences from GBIF using `download_from_gbif.R` or `.py`
53
+ - Apply standard cleaning: coordinate flags, duplicates, spatial thinning (1 grid cell)
54
+ - Record `n_raw` and `n_clean`
55
+
56
+ ### Step 2 — Data Sufficiency Check
57
+
58
+ ```
59
+ IF n_clean < n_min_occurrences:
60
+ → flag species as "dados_insuficientes" = TRUE
61
+ → write row to screening_summary.csv with flag
62
+ → SKIP to next species
63
+ ```
64
+
65
+ ### Step 3 — Quick Calibration
66
+ **Skill:** `species-distribution-modeling`
67
+
68
+ - Use fixed quick-calibration settings: RM = 1, FC = "LQ"
69
+ - Run `sdm_pipeline.py` or `run_ensemble_sdm.R` with these parameters
70
+ - No full ENMeval grid search (reserved for high-priority species in full `run-sdm-study`)
71
+
72
+ ### Step 4 — Minimum Validation
73
+ **Skill:** `model-validation-and-uncertainty`
74
+
75
+ - Calculate AUC (random 20% hold-out) and TSS
76
+ - Run `validate_model.py` or `validate_sdm.R`
77
+ - Flag model as `model_adequate = AUC >= auc_threshold`
78
+
79
+ ### Step 5 — Extrapolation Risk Check
80
+
81
+ - Run `extrapolation_risk.R` comparing training stack vs. full study area projection
82
+ - Record `pct_mop_zero` (% area with MOP = 0) and `pct_mop_low` (% area with MOP < 0.25)
83
+ - Flag `severe_extrapolation = pct_mop_zero > 0.40`
84
+
85
+ ---
86
+
87
+ ## Per-Species Outputs
88
+
89
+ All written to `output/{scientificName}/`:
90
+
91
+ | File | Description |
92
+ |---|---|
93
+ | `suitability_current.tif` | Continuous suitability map (0–1) |
94
+ | `binary_map.tif` | Binary presence/absence map (threshold = max TSS) |
95
+ | `metrics.csv` | AUC, TSS, n_clean, suitable_area_km2, pct_mop_zero |
96
+ | `mop_layer.tif` | MOP extrapolation layer |
97
+
98
+ ---
99
+
100
+ ## Consolidated Output
101
+
102
+ **File:** `output/screening_summary.csv`
103
+
104
+ | Column | Description |
105
+ |---|---|
106
+ | `scientificName` | Species name |
107
+ | `n_raw` | Records before cleaning |
108
+ | `n_clean` | Records after cleaning + thinning |
109
+ | `dados_insuficientes` | TRUE if n_clean < n_min |
110
+ | `AUC` | Model AUC (hold-out) |
111
+ | `TSS` | Model TSS |
112
+ | `suitable_area_km2` | Current suitable area (binary map) |
113
+ | `pct_mop_zero` | % projection area with MOP = 0 |
114
+ | `severe_extrapolation` | TRUE if pct_mop_zero > 0.40 |
115
+ | `model_adequate` | TRUE if AUC >= auc_threshold |
116
+ | `priority` | Alta / Média / Baixa (see criteria below) |
117
+
118
+ ---
119
+
120
+ ## Priority Classification Criteria
121
+
122
+ ```
123
+ Alta priority:
124
+ suitable_area_km2 < suitable_area_threshold_km2
125
+ AND AUC >= auc_threshold
126
+ AND dados_insuficientes == FALSE
127
+ AND severe_extrapolation == FALSE
128
+
129
+ Média priority:
130
+ (suitable_area_km2 >= suitable_area_threshold_km2 AND AUC >= auc_threshold)
131
+ OR severe_extrapolation == TRUE (model adequate but extrapolation concern)
132
+
133
+ Baixa priority:
134
+ AUC < auc_threshold (model unreliable)
135
+ OR dados_insuficientes == TRUE
136
+ ```
137
+
138
+ Species flagged `dados_insuficientes` or with `AUC < auc_threshold` should NOT be
139
+ ranked by area — insufficient basis for reliable prioritisation.
140
+
141
+ ---
142
+
143
+ ## Decision Points
144
+
145
+ | Condition | Diagnosis | Recommended Action |
146
+ |---|---|---|
147
+ | AUC < 0.70 | Model has no predictive power | Revise predictor set; do not include in priority ranking |
148
+ | n_clean < 30 after thinning | Insufficient data for reliable SDM | Classify as "dados_insuficientes"; supplement with field surveys |
149
+ | MOP = 0 in > 40% of projected area | Severe extrapolation | Flag as `severe_extrapolation`; restrict interpretation to calibration area |
150
+ | > 50% of range in a single biome | Biome-specific background needed | Re-run with biome-restricted background for that species |
151
+ | All species in list return AUC < 0.70 | Wrong predictor set or data quality issue | Check coordinate cleaning, CRS alignment, and predictor resolution |
152
+ | n species with Alta priority = 0 | Thresholds too strict or genuinely no high-priority species | Adjust `suitable_area_threshold_km2` and document rationale |
153
+
154
+ ---
155
+
156
+ ## Parallelisation Note
157
+
158
+ For lists of N > 10 species, use `future` for parallel processing:
159
+
160
+ ```r
161
+ library(future)
162
+ library(furrr)
163
+
164
+ # Use all available cores (or set workers = N explicitly)
165
+ plan(multisession, workers = parallel::detectCores() - 1)
166
+
167
+ results <- future_map(species_list, run_single_species_screen,
168
+ .options = furrr_options(seed = 42))
169
+ ```
170
+
171
+ For Python equivalents, use `concurrent.futures.ProcessPoolExecutor`.
172
+
173
+ ---
174
+
175
+ ## Deliverables
176
+
177
+ | Deliverable | Format | Description |
178
+ |---|---|---|
179
+ | `screening_summary.csv` | CSV | Master table with all species metrics and priority flags |
180
+ | `suitability_current.tif` | GeoTIFF (per species) | Continuous suitability map |
181
+ | `binary_map.tif` | GeoTIFF (per species) | Binary presence/absence |
182
+ | `mop_layer.tif` | GeoTIFF (per species) | Extrapolation risk layer |
183
+ | `metrics.csv` | CSV (per species) | Individual species metrics |
184
+ | `screening_report.md` | Markdown | Auto-generated summary with priority lists |
185
+
186
+ ---
187
+
188
+ ## Notes
189
+
190
+ - This workflow is designed for **rapid screening**, not publication-quality SDMs.
191
+ High-priority species identified here should be modelled in full using `run-sdm-study`.
192
+ - The quick calibration (RM=1, FC=LQ) will generally produce slightly over-fitted
193
+ models compared to full ENMeval calibration. This is acceptable for screening
194
+ purposes but must not be used for conservation planning directly.
195
+ - Always document `n_min_occurrences` and `auc_threshold` used in the screening in
196
+ the project's `params.yaml`.
197
+ - Record the GBIF download DOIs for each species in `data_provenance.md`.
@@ -0,0 +1,74 @@
1
+ # Workflow: run-occupancy-analysis
2
+
3
+ **Purpose:** Estimate species occupancy and detection probability from repeated survey data
4
+ **Skills:** ecological-data-foundation → biostatistics-workbench → occupancy-and-detection → model-validation-and-uncertainty → reproducible-ecology-pipeline
5
+
6
+ ---
7
+
8
+ ## Trigger
9
+
10
+ Invoke when the user has repeated presence/absence survey data and wants to estimate occupancy while accounting for imperfect detection.
11
+
12
+ **Example prompts:**
13
+ - "Analyse camera trap data to estimate jaguar occupancy"
14
+ - "Run a single-season occupancy model for [species] using repeated point counts"
15
+ - "How does occupancy probability vary with habitat quality after accounting for detection?"
16
+
17
+ ---
18
+
19
+ ## Steps
20
+
21
+ ### Step 1 — ecological-data-foundation
22
+ - Validate detection history matrix (sites × occasions)
23
+ - Check site and observation covariate tables
24
+ - Flag sites with all-zero histories (never detected)
25
+ - Output: `detection_history.csv`, `site_covariates.csv`, `obs_covariates.csv`
26
+
27
+ ### Step 2 — biostatistics-workbench
28
+ - Check covariate distributions and standardise continuous predictors
29
+ - Assess collinearity among site and observation covariates
30
+ - Output: `covariate_summary.csv`, `collinearity_report.csv`
31
+
32
+ ### Step 3 — occupancy-and-detection
33
+ - Fit null model (ψ(.), p(.))
34
+ - Fit candidate model set based on a priori hypotheses
35
+ - Goodness-of-fit: MacKenzie-Bailey χ² (parametric bootstrap)
36
+ - Model selection by AICc (or QAICc if ĉ > 1.5)
37
+ - Report ψ and p with 95% CIs
38
+ - Output: `model_selection_table.csv`, `occupancy_estimates.csv`, `gof_report.md`
39
+
40
+ ### Step 4 — model-validation-and-uncertainty
41
+ - Report goodness-of-fit and ĉ
42
+ - Assess sensitivity to number of survey occasions
43
+ - Compute minimum surveys needed for target power
44
+ - Output: `validation_report.md`, `power_analysis.csv`
45
+
46
+ ### Step 5 — reproducible-ecology-pipeline
47
+ - Document closure assumption justification
48
+ - Log candidate model rationale
49
+ - Capture R session and unmarked version
50
+ - Output: `parameter_manifest.yaml`, `software_environment.txt`
51
+
52
+ ---
53
+
54
+ ## Expected Deliverables
55
+
56
+ - Occupancy estimate (ψ) with 95% CI
57
+ - Detection estimate (p) with 95% CI
58
+ - Model selection table (AICc, ΔAIC, weights)
59
+ - Covariate effect estimates
60
+ - Goodness-of-fit results
61
+
62
+ ---
63
+
64
+ ## Decision Points
65
+
66
+ | Condition | Diagnosis | Recommended Action |
67
+ |---|---|---|
68
+ | GoF test fails (p < 0.05) | Violation of closure assumption or unmodelled heterogeneity | Add detection covariate; consider mixture models (heterogeneity in detection); verify closure window |
69
+ | naive_p > 0.5 but estimated p̂ < 0.1 | Multicollinearity in detection covariates inflating estimates | Check pairwise correlation among detection covariates; reduce model; use VIF screening |
70
+ | AIC-best model has ψ̂ ≈ 1.0 with high SE | Numerical convergence issue (perfect detection or near-saturation) | Simplify model; check for sites with detection at every occasion; constrain starting values |
71
+ | k (number of surveys) < 3 | Low power to separate ψ from p | Report power analysis alongside estimates; collect more survey occasions in future |
72
+ | Detection probability varies strongly by observer | Unmodelled observer effect | Include observer ID as categorical detection covariate |
73
+ | ĉ > 1.5 (overdispersion) | Extra-binomial variance; GoF indicates poor fit | Use QAICc instead of AICc for model selection; report ĉ in methods |
74
+ | All sites have detection at every occasion | 100% naive occupancy | Consider whether closure is violated or species is truly ubiquitous; occupancy model may be unnecessary |
@@ -0,0 +1,90 @@
1
+ # Workflow: run-population-viability
2
+
3
+ **Purpose:** Project population trajectories and estimate extinction risk using matrix population models
4
+ **Skills:** ecological-data-foundation → biostatistics-workbench → population-viability-analysis → model-validation-and-uncertainty → reproducible-ecology-pipeline
5
+
6
+ ---
7
+
8
+ ## Trigger
9
+
10
+ Invoke when the user wants to project population growth, estimate extinction probability, compute lambda/elasticity, or evaluate a species against IUCN Criterion E.
11
+
12
+ **Example prompts:**
13
+ - "Run a PVA for African elephants using a Lefkovitch matrix"
14
+ - "Estimate extinction probability for [species] over the next 100 years"
15
+ - "Compute lambda and elasticity for a population with 4 life stages"
16
+
17
+ ---
18
+
19
+ ## Steps
20
+
21
+ ### Step 1 — ecological-data-foundation
22
+ - Validate vital rate data (survival and fecundity per stage or age class)
23
+ - Check demographic data sources (mark-recapture, census, literature)
24
+ - Flag missing stages or implausible rates (survival > 1, negative fecundity)
25
+ - Output: `vital_rates_clean.csv`, `demographic_sources.md`, `qa_report.md`
26
+
27
+ ### Step 2 — biostatistics-workbench
28
+ - Assess variance in vital rate estimates
29
+ - Compute coefficient of variation (CV) for each rate
30
+ - Check for temporal autocorrelation in demographic time series (if available)
31
+ - Output: `vital_rate_summary.csv`, `cv_report.csv`
32
+
33
+ ### Step 3 — population-viability-analysis
34
+ - Construct Leslie (age-based) or Lefkovitch (stage-based) projection matrix
35
+ - Compute deterministic lambda, stable stage distribution, reproductive value
36
+ - Compute sensitivity and elasticity matrices
37
+ - Run stochastic PVA (Monte Carlo, >= 1000 simulations):
38
+ - Beta distribution for survival rates
39
+ - Lognormal distribution for fecundity rates
40
+ - Optional: catastrophe scenarios, density dependence
41
+ - Estimate extinction probability at quasi-extinction threshold
42
+ - Classify against IUCN Criterion E thresholds
43
+ - Output: `lambda_summary.csv`, `elasticity_matrix.csv`, `pva_trajectories.csv`, `extinction_curve.csv`, `iucn_criterion_e.md`
44
+
45
+ ### Step 4 — model-validation-and-uncertainty
46
+ - Sensitivity analysis: vary vital rates +/- 10% individually
47
+ - Compare deterministic vs stochastic lambda
48
+ - Assess effect of catastrophe frequency on extinction risk
49
+ - Report confidence intervals on extinction probability
50
+ - Output: `sensitivity_report.md`, `validation_report.md`
51
+
52
+ ### Step 5 — reproducible-ecology-pipeline
53
+ - Document vital rate sources with citations
54
+ - Log matrix structure and parameterisation choices
55
+ - Record simulation parameters (n_sims, time horizon, quasi-extinction threshold)
56
+ - Output: `parameter_manifest.yaml`, `decision_log.md`, `reproducibility_checklist.md`
57
+
58
+ ---
59
+
60
+ ## Expected Deliverables
61
+
62
+ - Projection matrix with lambda, sensitivity, and elasticity
63
+ - Stochastic PVA trajectories (median + 95% CI)
64
+ - Extinction probability curve over time horizon
65
+ - IUCN Criterion E classification
66
+ - Elasticity-based management recommendations
67
+ - Reproducibility package
68
+
69
+ ---
70
+
71
+ ## Minimum Data Requirements
72
+
73
+ - Vital rates (survival + fecundity) for >= 2 life stages
74
+ - Initial population size or stage distribution
75
+ - Quasi-extinction threshold (default: 50 individuals)
76
+ - Time horizon (default: 100 years)
77
+
78
+ ---
79
+
80
+ ## Decision Points
81
+
82
+ | Condition | Diagnosis | Recommended Action |
83
+ |---|---|---|
84
+ | Deterministic lambda < 1.0 | Population declining without stochasticity | Report decline rate; identify which vital rate has highest elasticity for management |
85
+ | CV of any vital rate > 0.3 | High demographic stochasticity | Use stochastic PVA as primary result; do not rely on deterministic lambda alone |
86
+ | Extinction probability > 0.10 in 100 years | Meets IUCN Criterion E (Vulnerable threshold) | Report IUCN classification; identify management levers via elasticity analysis |
87
+ | Elasticity concentrated in one rate (> 0.6) | Population growth dominated by single vital rate | Focus conservation action on that rate; run targeted management scenarios |
88
+ | Catastrophe probability unknown | Cannot parameterise rare events | Run scenarios at 0%, 5%, 10% catastrophe frequency; report range |
89
+ | n_stages < 3 with available data for more | Matrix oversimplified | Expand matrix to match available data resolution; justify aggregation if used |
90
+ | Stochastic lambda >> deterministic lambda | Possible parameterisation error or Jensen's inequality effect | Verify distribution choices; report both values and explain discrepancy |