it is the teachings and life of these imams which distinguish between the wrong and right hadis.
Imams include Hakim bi amr illah, I shall just reproduce a section from famous egyptian historian Al Maqirizi.
Al-Hakim repeatedly exhibited erratic, eccentric and contradictory behavior. He seemed to have been keen on the morality of his subjects, repeatedly issuing orders for this to be done or that not to be done. This goes as far as micromanaging what is eaten and what is not.
Moreover, he would forbid something then later allow it. He would repeatedly enforce trivial orders he issued.
Decorations and Night Life
Ordered the decoration of the streets and lighting them up by night. Orderedthat people should not be prevented by his guards from approaching him.He then ordered women not to go out at all.
وأمر الناس بالوقيد فتزايدوا فيه بالشوارع والأزقة وزينت الأسواق والقياسربأنواع الزينة وباعوا واشتروا وأوقدوا الشموع الكبيرة طول الليل وأنفقواالأموال الكثيرة في المآكل والمشارب والغناء واللهو
.
وزينت الصناعة وخرج سائر الناس بالليل للتفرج وغلب النساء الرجال علىالخروج في الليل وتزايد الزحام في الشوارع والطرقات وتجاهروا بكثير منالمسكرات وأفرط الأمر من ليلة التاسع عشر إلى ليلة الرابع والعشرين فلماخرج الناس عن الحد أمر الحاكم ألا تخرج امرأة من العشاء فإن ظهرت نكلبها.
ومنع الناس من الجلوس في الحوانيت
Certain Foods Forbidden
Orders that people should not eat Molokheya, the national dish of Egypt, since is was liked byMu'awya, nor water cress since it was liked by Aisha the prophet's wife.
وقرئ سجل في الأطعمة بالمنع من أكل الملوخية المحببة كانت لمعاوية بن أبيسفيان والبقلة المسماة بالجرجير المنسوبة إلى عائشة رضي الله عنهاوالمتوكلية المنسوبة إلى المتوكل.
Orders not to knead dough with legs, andprevented eating of some foods, and the slaughter of cows that have noprogeny except in feast days, or those that are not good for plowingfields.
وفيه المنع من عجن الخبز بالرجل والمنع من أكل الدلنيس والمنع من ذبحالبقر التي لا عاقبة لها إلا في أيام الأضاحي وما سواها من الأيام لا يذبحمنها إلا ما لا يصلح للحرث.
Orderedthat fisherman should not go for fish that has no scales, nor that anysuch fish be sold or consumed. Note that this is similar to Jewish law,and in Egypt would forbid the Nile Catfish which is commonly consumedin Egypt.
ولا يباع شيء من السمك بغير قشر ولا يصطاده أحد من الصيادين
Arrested fishmongers who sold fish without scales, as well as bath house rules violators and those who drink a certain drink.
وقبض على جماعة من أصحاب الفقاع والسماكين وكبست الحمامات وضرب جماعة لمخالفتهم ما نهو عنه وشهروا.
Enforced rules about Molokheya and Fish
وضرب جماعة وشهروا لبيعهم الملوخية والسمك الذي لا قشر له.
Orderedthat weights and measures be calibrated and no one to cheat others onthose. Forbade the manufacture and sale of a certain drink because Aliforbade it.
وإصلاح المكاييل والموازين والنهي عن البخس فيهما والمنع من بيع الفقاعوعمله ألبتة لما يؤثر عن علي رضي الله عنه من كراهة شرب الفقاع.
Wine and intoxicating beverages
Rumors flew that wine will be forbidden, hence causing prices to go up and supply to dwindle.
وأشيع بين الناس بأن النبيذ يمنع من بيعه فازدحموا على شرائهوبيع منه شيء كثير فعز حتى بيع كل عشر جرار بدينار ولم يوجد لكثرة طلابه.
Ordered that wine and bananas be forbidden as well as other drinks, scaleless fish, stinky lupins
وقرئ سجل في ربيع الأول بالمنع من حمل النبيذ والموز وحذر منالتظاهر بشيء منه أو من الفقاع والدلينس والسمك الذي لا قشر له والترمسالمعفن
Went after those who make intoxicating drinks and broke the jars.
وفي ربيع الأول تتبعت الدور ومن يعرف بعمل المسكرات وكسر من أوعيتها شيء كثير
Also enforced, and people were arrested
وقبض على جماعة بسبب بيع النبيذ واعتقلوا وكبست مواضع ذلك.
Prayers
Ordered certain times for the Azan (Call to prayers) for the mid day and afternoon prayers.
وقرئ سجل آخر بأن يؤذن لصلاة الظهر في أول الساعة السابعة ويؤذن لصلاة العصر في أول الساعة التاسعة
Arrested and punished thirteen men who prayed a pre-noon prayer.
وقبض على ثلاثة عشر رجلا ضربوا وشهروا على الجمال وحبسوا ثلاثة أيام بسبب أنهم صلوا صلاة الضحى
Bath House Morality Rules and Woman
Bellsrang in the streets and ordered that no one should go into bathhousesunless wearing something to cover his mid body, and no woman is to showher face on the street, nor attend funerals nor wear revealing oronrate clothes.
وضرب في الطرقات بالأجراس ونودي ألا يدخل الحمام أحد إلا بمئزر وألا تكشف امرأة وجهها في طريق ولا خلف جنازة ولا تتبرج.
Also prevented women from going outside, going as far as closing the bathhouses for women, not differentiating between young and elderly, and preventing the shoe makers from making any footwear for women, causing some to go bankrupt.
ومنع النساء أن يخرجن إلى الطرقات في ليل أو نهار سواء أكانت المرأة شابةً أم عجوزاً فاحتبسن في بيوتهن ولم تر امرأة في طريق وأغلقت حماماتهن وامتنع الأساكفة من عمل خفاف النساء وتعطلت حوانيتهم
To the extent that some elderly women and female servants were arrested
واشتد الأمر في منع النساء من الخروج وحبس عدة عجائز وخدم وجدن في الطرقات
Ordered that people should cover their body in bathhouses and that Christians and Jews have to wear different dress, and punished those who didn't do so.
ونودي ألا يدخل أحد الحمام إلا بمئزر ولا يمشي اليهود والنصارى إلا بالغيار وضربوا على ترك ذلك.
Again punished those who violated bathhouse rules
وكسبت الحمامات وأخذ منها جماعة وشهروا من أجل أنهم وجدوا بغير مئزر
Enforced the bath house rules and had some violators beaten.
وتتبعت الحمامات وقبض على جماعة وجدوا بغير مئزر فضربوا وشهروا.
Orderthat at the celebration of the Nile's annual flooding there will be nosinging, and no drinking in the boats, and arrested some people.
وفي تاسعه وهو نصف توت أشيع وفاء النيل وخلع على ابن أبيالرداد فابتدأ في النقص قبل أن يوفى ستة عشر ذراعا من تاسع عشر توت فأمرالناس كافةً بألا يتظاهر أحد منهم على شاطىء النيل بشيء من الغناء ولايسمع في دار ولا يشرب في المراكب.وكبست عدة دور وقبض على جماعة.
Preventedonlookers from going to the slave market unless they are selling orbuying, and separated males from females and made them on alternatedays.
ومنع أن يدخل أحد إلى سوق الرقيق إلا أن يكون بائعا أو مشتريا وأفرد الجواري من الغلمان وجعل لكل منهم يوم.
Prevented women from erecting makeshift shades in graveyards when they visited.
ومنع من نصب الشراعات التي كانت النساء تنصبها في المقابر أيام الزيارة.
Curfew
If you go through the above, most of the attitudes can be found in our present practices as ordained by syedna saheb. I have come to this conclusion, that for obvious reason a slightly modified Hakimid version of Ismailism is being enforced. It is best suited to the intrest of royal family.