There are mainly four ways how a Chinese character is created:
- 象形 The character is drawing of the object (牛 羊)
- 指事 ideograms express an abstract idea through an iconic form (一 上)
- 会意 compound ideographs, also called associative compounds or logical aggregates, are compounds of two or more pictographic or ideographic characters to suggest the meaning of the word to be represented. (森 休)
- 形声 these are often called radical-phonetic characters. (狗 猪 猴)
See this wiki article for details. (Note: The other two mentioned in this article, 转注 and 假借, are ways of giving an existing character a new meaning)
I'm guessing your "rule of prefix" refers to the radical-phonetic characters. Most Chinese characters falls into this category, but there are still a lot of characters that do not.
btw: The character 鸡 went through a more complex process to get the current form. I do not know the details.
Although @Colin's answer has touched on this, I feel like this needs to be emphasised more, especially for learners of Simplified Chinese.
「犭」only means dog or a dog-like creature. It was originally a graphical variant of「犬」, as seen with the following ancient forms for 犭/犬:
To emphasise, these were originally derived from a picture of a dog; they did not mean animal in general. However, usage of「犭」was sometimes flexible for non-dog-like animals, but only when there was no other component were deemed suitable, and thus may also appear in characters describing uncivilised people e.g. 狄. This is also true of some other components such as「豸」and「虫」.
Simplified Chinese has forced several characters which didn't originally use the「犭」component to use it, e.g.:
- 貓, originally used the component「豸」
- 豬, originally used the component「豕」
In general, the structure or history of the characters for animals and mythical beasts can be categorised as either 'basic' animals, which were derived from a picture, and 'other', which are mostly phono-semantic compounds and which use one of the basic animals as a component. There are a large number of basic animal or beast characters which can't be broken down further at all:
- 鳥/隹 (bird)
- 象 (elephant)
- 魚 (fish)
- 鹿 (deer)
- 馬 (horse)
- 龜 (turtle)
- 能 (bear, now written as 熊)
- 虫 (poisonous snake, now written as 虺; 虫 is now mostly used for insects and arthropods)
- 牛 (cow)
- 羊 (sheep/goat)
- 鼠 (mouse/rat)
- 龍 (dragon)
- 豕 (pig)
- 犬 (dog)
- 虎 (tiger)
Many animals are specific kinds or similar to the above, and are mostly phono-semantic compounds which consist of the components「虫」,「魚」,「鳥」, or「豸」, not just「犭」. The other animal components that appear are:
- 「隹」; occasionally used for birds, e.g. 雞, but mostly phonetic loan characters for what were originally names of different types of birds that are not used in that sense anymore, e.g. 舊, 雚.
- Sometimes used in characters with the meaning of capture, extended from capturing a bird, e.g. in the characters 獲, 隻, 穫 (to harvest), through the addition of 「又」(a hand).
- 「馬」, used for characters like mule (驢) and camel (駱駝), but otherwise mostly appear in characters describing swiftness (as in swiftness in war), or characters describing horse-related equipment.
- 「鹿」, appears in 麒麟 (The mythical beast Qilin/Kirin); occasionally seen in some other characters, e.g. 麗, 塵.
- 「虎」, not really used for animals; variously used as a phonetic component in 處, 虛, etc.
- 「羊」, describes sheep/goats in general; 羊羔 (lamb)，羶 (smell of mutton).
- Occasionally appears in characters to do with docility and morality, sometimes as the component forms 𠁥, 𦫳, e.g. 義, 乖.
- 「牛」, mostly used in characters to do with animal farming, e.g. 牧 (shepard), 牝 (female animal), 犧/牲 (sacrifice). Originally also used as part of characters which were names for different types of cows, e.g. 物 (cow with multiple colours/patterns), 特 (male cow/bull), but these characters are not used in this sense anymore.
In short, please don't get the impression that「犭」is used to describe most animals!
Some Chinese characters are pictographs. For instance 牛 and 羊 come from pictographs of animals.
By contrast, many other Chinese characters are composites of a "meaning part" and a "sound part". 狗, 猪, 猴 have as meaning part an alteration of 犬 "dog" and sound parts 句 (compare 够), 者 （compare 煮, 著, 诸), 候 respectively. 鸡 has meaning part 鸟 “bird”. The left hand side, 又, is an elision of the sound part 奚 (pronounced xi1).
There is no rule that all characters must have both a sound part and a meaning part. Many besides 牛 and 羊 do not.
However some characters originated in a way similar to your suggestions. For instance 萬 is from a pictograph of a scorpion. At some point a scribe added the common meaning part 虫 "bug", yielding the character 蠆 "scorpion". This was probably more as a disambiguation than out of any desire that all bugs have 虫 in their character for the sake of consistency.
First you should know 犭 is not the meaning of all animals but some.
In one hand, 犭 means dog or a dog-like creature.
In another hand, 犭 is simplified of 豸 and 豕 as a radical. It replaced the other two in most of characters in simplified Chinese. BUT here’s an inconspicuous fact that 犭 replaced the other two before the appearance of simplified Chinese. In ancient China, traditional Chinese is official among the publications. In contrast, there is a kind of running write, a cursive script in Chinese so-called 草書. The replacement of 犭 does exist in this cursive script so that simplified Chinese carries on. That is why most of 豸 and 豕 as radicals disappeared in simplified Chinese.
Now the question is, what do 豸 and 豕 mean? And what the relationship between the meaning and the original question?
豸zhì (犭) are kinds of vertebrate beasts with a wiggle to tuck their legs in and hunchbacked when hunting, like worms without feet (lions 獅, wolves 狼, leopards 豹, etc.), or specially the primates (猿) or some beasts with furs (cats 貓, foxes 狐, sables 貂, etc.).
Except 貌 (face), it is double of 皃.
豕 shǐ (犭) is pig (豬) or animal looks like pig (badger 獾).
In another question I answered, the ancient scholars wanted the name (名) to fit on the form (形) and reality (实). The appearance of 豸 and 豕 reflects this idea. So you can easily distinguish different kinds of animals. Since that, you would understand why do 牛 and 羊 and 鸡 not use 犭.