COMI (Crop Operation Machine Index) is a formal, machine-usable schema that defines the semantic relationships between crops, agricultural operations, and machine capabilities. It provides a structured index for robotic and autonomous systems to reason about what operations are allowed, on which crops, at what growth stages, and using which machines or implements, while respecting environmental and spatial constraints. COMI is designed as a shared knowledge layer to support task planning, coordination, and compatibility validation across heterogeneous agents in precision agriculture.
This repository contains a complete JSON-based implementation of the COMI schema with:
comi/
├── schemas/ # JSON Schema definitions
│ ├── operation.schema.json # Agricultural operations
│ ├── device.schema.json # Machines and implements
│ ├── crop.schema.json # Crop definitions
│ └── vendor.schema.json # Equipment manufacturers
├── data/ # Structured data files
│ ├── operations/ # Operation definitions by category
│ ├── devices/ # Device definitions by type
│ ├── crops/ # Crop definitions by category
│ └── vendors/ # Vendor information
├── rules/ # Compatibility validation rules
├── examples/ # Usage examples
└── comi.json # Main manifest/index
- Load the main index:
// Load comi.json to get the complete resource manifest
{
"name": "COMI",
"version": "1.0.0",
"resources": { ... }
}- Access structured data:
# Operations by category
./data/operations/tillage.json
./data/operations/planting.json
./data/operations/protection.json
./data/operations/harvest.json
# Devices by type
./data/devices/tractors.json
./data/devices/implements.json
./data/devices/harvesters.json
# Crops by category
./data/crops/cereals.json
./data/crops/legumes.json
./data/crops/vegetables.json- Validate compatibility:
// Use rules/compatibility-rules.json for validation logic
{
"rules": {
"width_compatibility": { ... },
"power_compatibility": { ... },
"environmental_compatibility": { ... }
}
}// Example: Can John Deere 6140R with Amazone D9-30 plant wheat?
const tractor = loadDevice("TRACTOR_JD_6140R_001");
const seeder = loadDevice("SEEDER_AMZ_D930_001");
const wheat = loadCrop("WHEAT_WINTER");
const operation = loadOperation("PLANT_SEED");
const result = validateCompatibility(
[tractor, seeder],
wheat,
operation,
"PLANT" // growth stage
);
// Result: VALID with 95% compatibility scoreSuggested REST endpoints for consuming applications:
GET /operations- List all operationsGET /devices/{category}- Get devices by categoryGET /crops/{category}- Get crops by categoryPOST /compatibility/check- Validate combinationsPOST /planning/suggest- Suggest compatible devices
- 52 Operations across 7 categories (tillage, planting, protection, harvest, fertilization, post-harvest, cultivation)
- 19 Devices from 8 major vendors (tractors, implements, harvesters, tillage equipment, planting equipment)
- 12 Crops across 4 categories (cereals, legumes, vegetables, oilseeds)
- 6 Compatibility Rules with validation logic
- 8 Equipment Vendors with authentication keys
Progress toward full list.md implementation:
- ✅ 52/89 Operations (58% complete)
- ✅ 19/156 Device types (12% complete)
- ✅ 12/250+ Crop varieties (5% complete)
The JSON-based structure allows easy extension:
- Add Operations: Follow
operation.schema.jsonstructure - Add Devices: Follow
device.schema.jsonstructure - Add Crops: Follow
crop.schema.jsonstructure - Regional Variants: Create localized data files
- Custom Rules: Extend compatibility validation logic
Advantages of JSON:
- ✅ Universal language support
- ✅ Human-readable with formatting
- ✅ Schema validation with JSON Schema
- ✅ Web browser native support
- ✅ Easy to version control
- ✅ Simple to extend and modify
Schema Validation: All data files include JSON Schema references for structure validation and IDE support.
- Autonomous Systems: Task planning and device selection
- Fleet Management: Compatibility validation before field operations
- Precision Agriculture: Operation optimization based on crop growth stages
- Equipment Dealers: Compatibility checking for equipment combinations
- Research: Agricultural system modeling and simulation
Six core validation rules ensure safe and effective operations:
- Width Compatibility - Device width vs crop access requirements
- Growth Stage - Operation timing restrictions
- Device Capability - Machine operation capabilities
- Power Compatibility - Power supply and demand matching
- Attachment Compatibility - Mechanical connection validation
- Environmental - Weather and soil condition constraints
Load and validate data in any programming language:
import json
# Load main index
with open('comi.json') as f:
comi = json.load(f)
# Load specific data
with open('data/operations/planting.json') as f:
planting_ops = json.load(f)
# Implement compatibility validation
def check_compatibility(devices, crop, operation):
# Apply rules from rules/compatibility-rules.json
passFor detailed examples, see examples/wheat-planting-example.json
For schema definitions, see the schemas/ directory
For questions or contributions, see Issues