Peace and Truce of God
The first representative and legislative bodies in Catalonia were the Count's Court ("Cort Comtal") of Barcelona, modelling after the Frankish "curia regis", and the Peace and Truce of God Assemblies ("Assemblees de Pau i Treva"), of which the earliest record dates from 1027. The last ones were originally ad hoc, local meetings convened by the clergy (Oliba, Bishop of Vic, who died in 1046, was a notable instigator) but progressively became subsumed into the court of the Counts of Barcelona. The first Catalan legal code, the "Usatges de Barcelona", was promulgated by Count Ramon Berenguer I based on the decisions of these assemblies.