GE
geological-logic
Standards for handling drillhole data, section interpolation, and 3-level validation.
Install
mkdir -p .claude/skills/geological-logic && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14204" && unzip -o skill.zip -d .claude/skills/geological-logic && rm skill.zipInstalls to .claude/skills/geological-logic
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Standards for handling drillhole data, section interpolation, and 3-level validation.85 charsno explicit “when” trigger
About this skill
Geological and Domain Logic
Defines the business rules for processing mining/geological data, ensuring geometric consistency and the integrity of drillhole data.
When to use this skill
- When modifying drillhole processing services (
DrillholeService). - When designing interpolation algorithms or section intersections.
- When implementing new geological data validation rules.
Degree of Freedom
- Strict: 3-level validation rules and PyQGIS decoupling are mandatory.
Workflow
- Modeling: Define entities using Dataclasses and strict types.
- Validation: Implement the 3 levels (Type, Schema, Business).
- Abstraction: Ensure core logic uses WKT or DTOs, not
QgsGeometry. - Testing: Create unit tests with varied CRS contexts.
Instructions and Rules
3-Level Validation
- Level 1 (Type): Basic data types and allowed ranges.
- Level 2 (Schema): Consistency between fields (e.g.,
StartDepth < EndDepth). - Level 3 (Business): External consistency (e.g., "Layer exists", "No overlaps in geology").
Geometry Rules
- Decoupling: Core services MUST NEVER depend on
QgsGeometry. - WKT Standard: Operate with WKT strings; convert to PyQGIS only at the UI boundary.
- Endpoint Interpolation: Mandate interpolation at exact interval depths in
TrajectoryEngineto guarantee valid segment geometry generation for short intervals. - Mocks: Use
MockQgsGeometryfor local unit tests.
Quality Checklist
- Is core logic independent of PyQGIS?
- Are all 3 validation levels implemented?
- Do tests exist for edge cases (vertical, parallel drillholes)?
- Are units and CRS handled correctly?