How p229279-cmyk/grem4 works
GREM 4 supports natural-language editing of OpenDRIVE road maps. A user’s intent is interpreted as a change request, grounded against map knowledge, and passed through planning, application, verification, and response; the system’s domain logic determines values and verdicts. The graph also preserves the map import/IR, geometry and relationship-query capabilities, and the separate model-run harness. The README documents the product workflow and major capabilities; some internal stage-to-stage calls are not shown in the excerpts, so those links are dashed and unevidenced.
Main entry points: ir Nine-shelf IR · loop.py Model harness · engine.py Relation engine · understand Intent understanding
Components 21
Map knowledge
- OpenDRIVE door
doors/opendrive - Fact rows
contract/row.py - Nine-shelf IR
ir
Map science
- Road geometry
geometry - Relation engine
relations/engine.py - Quantity resolution
shared/quantity.py - Map selection
shared/select.py - Proof suites
suites
Editing workflow
- Change capability
change/capability.py - Change request
change/request.py - Intent understanding
pipeline/understand - Request grounding
pipeline/resolve/ground.py - Change planning
pipeline/plan/plan.py - Change application
pipeline/apply/apply.py - Change verification
pipeline/verify/verify.py - User response
pipeline/respond/respond.py
Assistant runtime
- Map context tools
window/tools.py - Model harness
harness/loop.py
Editing tools
- Frozen edit tool
edit/session.py
Other components
- Map editor
- Model provider
Connections 18
- Map editor → Intent understanding: states intent
README.md - OpenDRIVE door → Fact rows: hands over facts
contract/row.py - Fact rows → Nine-shelf IR: builds shelves
contract/row.py - Intent understanding → Change request: forms request
- Change request → Request grounding: grounds intent
- Request grounding → Change planning: plans change
- Change planning → Change application: applies change
- Change application → Change verification: checks result
- Change verification → User response: reports verdict
- Change capability → Intent understanding: defines vocabulary
- Nine-shelf IR → Relation engine: answers questions
relations/engine.py - Relation engine → Quantity resolution: resolves measures
- Nine-shelf IR → Map context tools: supplies map context
- Map editor → Model harness: starts assistant run
- Model harness → Model provider: requests completion
- Model harness → Map context tools: offers tools
- Frozen edit tool → Relation engine: asks map query
- Nine-shelf IR → Road geometry: supports map science