Sprig & Prose

A small system for describing worlds and observing how systems respond to them.


A tiny example

universe Garden {
  describe {
    A small garden with a few plants.
  }

  concept Plant {
    describe {
      A living thing that grows over time.
    }

    dimension species {
      describe {
        Plants come in many different varieties.
      }
    }

    species TomatoPlant { }
    species BasilPlant { }
  }

  relationship hydrates and isHydratedBy { }

  concept Watering {
    describe {
      Giving water to a plant.
    }

    relationships {
      hydrates { Plant }
    }
  }
}

This describes a world.


What this system is

Sprig and prose separate two concerns.

prose describes a world:

  • what exists
  • how things relate
  • what patterns are possible

sprig observes systems:

  • reads a universe
  • compares it to real systems
  • produces simple receipts of what is true

How to read this

You can start in either place:

  • Read prose to understand the language
  • Read sprig to see how systems participate