This is something completely new in FE that we couldn't do in E:wom. Production rules basically allow us to attach one kind of production to something else. That's how tech, production and gildar work in cities; population produces those things.
For more examples, see CityResourceEffectDefs.xml in the installation directory.
To set up a new production rule, there are three steps that need to be taken. Below, you will find the XML to produce 1 metal for every earth shard connected to, or in the city.
<CityResourceEffectDef InternalName="EarthManaEffectOnMetal">
<InputResource>EarthMana</InputResource>
<OutputResource>Metal</OutputResource>
<ResourceForMultiplierOnInput>MetalPerEarthMana</ResourceForMultiplierOnInput>
<EffectType>Harvest</EffectType>
</CityResourceEffectDef>
<PlayerAbilityType InternalName="A_Additive_MetalPerEarthMana">
<DisplayName>Base Research Per Earth Mana</DisplayName>
<Description>How much Metal each unit of Earth mana produces.</Description>
<Icon>Icon_Level.png</Icon>
<DefaultValue>1</DefaultValue>
</PlayerAbilityType>
<ResourceType InternalName="MetalPerEarthMana">
<DisplayName>Metal per Earth mana</DisplayName>
<Description>Amount of Metal each unit of Earth Mana produces.</Description>
<Type>MetalPerEarthMana</Type>
<IconColor>0,0,0</IconColor>
<!--<Icon>Gfx//Icons//dude_icon.png</Icon>-->
<Icon>Gfx//Icons//Icon_Population.png</Icon>
<HideInHiergamenon>1</HideInHiergamenon>
<ModelColor>0,0,0</ModelColor>
<Worth>0</Worth>
<Global>0</Global>
<Stored>0</Stored>
<Rarity>0.0</Rarity>
<Shared>0</Shared>
<TradedByCaravans>0</TradedByCaravans>
<ShownInGlobalDisplay>0</ShownInGlobalDisplay>
<Medallions InternalName="Population_Res_Medallions">
<All>Res_Ores_Plains.png</All>
</Medallions>
</ResourceType>
The steps are in no particular order.
The CityResourceEffectDef is what defines which productions are linked. As you can see in the example, we are linking EarthMana to Metal. This creates a "go-between" production of "MetalPerEarthMana".
The PlayerAbilityType allows us to globally modify this "MetalPerEarthMana". The default value is set to 1; 1 metal for each earth shard. If it was 2, there would be 2 metal for each earth shard. The internalname is crucial, it has to be A_Additive_*. If this wasn't a mod example, I wouldn't set it to default 1.
The ResourceType is also needed. Even though we are just creating a go-between of two different resources, we still need to create this kind of resourcetype. Note that the Internalname is not important here, rather the <Type> is what is important.
All put into action:

After this rule has been set up, we can also modify the values using different things. For example, a building that can only be built in a city with an earth shard, and produces 1 metal, might have this:
<GameModifier>
<ModType>Resource</ModType>
<Attribute>MetalPerEarthMana</Attribute>
<Value>1</Value>
<PerTurn>1</PerTurn>
<Provides>+1 metal per earth shard</Provides>
</GameModifier>
or we might globally affect it like other similar things, for example in a faction bonus or a high-level earth spell (this gives 1 metal per earth shard faction-wide):
<GameModifier>
<ModType>Player</ModType>
<Attribute>AbilityBonus</Attribute>
<StrVal>A_Additive_MetalPerEarthMana</StrVal>
<Value>1</Value>
</GameModifier>
The game also has support for making one type of production lower another one by a percentage (like Unrest lowers production). See CityResourceEffectDefs.xml in the installation directory.