Best bet is to look to sister ordinances from similar municipalities in your county/state - each state has its own "flavor" in the way code is drafted, and ordinances need to be read as part of a cohesive whole, not in isolation.
Consider these sources to get started -
Comparison
MSU Suggestions, representative ordinance
More considerations, representative samples
etc.
Primary means its the first use of the property. In residential zones, the primary building is usually the house. That's permitted by zoning (subject to various restrictions). Typically, the zoning will allow one or more accessory buildings or uses, incidental to your main purpose and structure. So the property with your house may allow a shed, a pool house, and a dog house. Those are all accessory uses.
Note that a kennel (in the way we think of a boarding operation, or the row kennels you might see at the animal shelter) is generally NOT an "accessory building or use" (in residential zones, anyways). A vet's office and associated keenel for the keeping of animals overnight would be a primary use, most typically.
Hope those examples help.
You should also be aware that larger municipalities often have employees tasked to help in the drafting of new ordinances and legislation, consistent with standards for that Gov't unit. If you are in a large enough area, and have the support of your representative in theory, they may be able to assist by involving that person or department.
and yes, I've helped draft, revise, support, modify, and oppose legislation (not re: chickens) in States all over this nation, some multiple times, plus two foreign countries. On behalf of industry groups. Its not hard, but it is research intensive to do well.