Pheasants meet most of your criteria.
lay eggs semi-regularly(females only)
able to fly, but not sustained flight(eventually ends, and gaining altitude is hard, if not impossible)
I think this is true of every bird, but their flight definitely ends. More to what I think you're saying, pheasants generally fly low from cover to cover, never more than a couple hundred feet up and normally much less, to my knowledge.
preferably lives in foresty area, but if not i can make something up about invasive species or whatever.
These are invasive/introduced (pick your semantics) to the U.S., actually. While they definitely are comfortable in the plains, hunters know to look for them along strips of trees, where they shelter from wind (especially in winter) and predators. I think you could adapt them to a grassy forest environment or a woods with interspersed meadows rather easily. A hidden meadow in a vast forest could even be a sort of hunter-free utopia for them, which could be an interesting plot element.
live in flocks/packs with pecking order or equivilant
You'll definitely find them in groups, and fights between the males are about as epic as any bird fight on that scale.
lives in the wild, but sometimes has been domesticated as pets or farm animals(used to humans and not used to hunt/forageing much)
These do live in the wild and have been domesticated (often to be released on hunting preserves), but if you're strict on the hunting rule, this is probably the biggest drawback to pheasants, as they are heavily hunted. On the upside, you can easily set a clan of a species like this in a remote area where they aren't hunted much. I'm sure there are roosters in the back country of North Dakota that have rarely (if ever) heard a gunshot.
sleep on tree branches
Not super common, but it apparently does happen.
is a bird
Yep. Pheasants are in the same family as chickens, Phasianidae.
Bonus: Pheasants look awesome. Tell me a more full-feathered version of this coming head-on wouldn't look great on a book cover!