Breeding plan brainstorm

Spinning this out as a standalone topic from Quick Gestation Calculator Form (1.x) - #6 by Skipper

Generally speaking, we are developing a nice pattern around “planning” modules (eg: Crop Plan and Grazing Plan mentioned above), which center around a simple relationship between the “plan” object (of which you can have one or many each year), and relationships to the underlying assets and logs that are directly relevent (eg: Crop Plans link to Plant assets, Grazing Plans link to movement logs).

In this case, I’m imagining a new farm_breeding_plan module that provides a breeding plan type, and a gestation plan record type. The latter would link the plan to an animal asset (the mother), and have an insemination_date field (representing the “planned” insemination date, similar to the seeding_date field in crop plans), and a gestation_days field (representing the expected days of gestation, similar to the maturity_days field in crop plans).

With this data model, we could display the information in a gantt chart similar to the ones in the Crop/Grazing plan screenshots links to in my quote above, where each row represents a single gestation. These could be grouped by Animal Type (similar to how the Crop Plan groups by Plant Type or Location, and the Grazing Plan groups by Animal Type or Location - in this case I’m not sure it makes sense to have a “by Location” grouping option, but curious if there are other ideas that would work similarly to the other plan types). Each row would display a colored bar on a timeline that starts with the “planned insemination date”, and ends where the “expected gestation period” ends. Within this colored bar, circles representing the actual logs associated with the mother animal asset would be displayed, giving you quick visibility and access to every relevant event.

In order to make the key events easier to create (I’m thinking specifically about insemination and birth), the plan UI could provide shortcut links to quick forms. The Birth quick form that comes with farmOS provides everything we need to record births. We don’t currently have an Insemination/Breeding quick form, but perhaps that could be added as well. Either way, manually adding logs that reference the mother would result in dots showing up on her timeline, so the quick forms are just handy shortcuts in that regard. We could build the Breeding Plan without a Breeding quick form as a first step, in other words, and work on that separately. This is the beauty of our modular approach to these things: they are all separate components that work together, but can also be built/used independently.

What do others think? If we consider this as the “core” framework for a Breeding Plan module, what other features would you like to see?

3 Likes

cc @BOTLFarm @danigrover @Symbioquine @Farmer-Ed @ibekannfarms @marlonv @WHFarms @pat @Guillermo @StuartP and anyone else with experience in this topic. :slight_smile:

1 Like

Love this concept. This has been on my wishlist for years now.

I would love to see it taken a step further with any other planned events around breeding. Weaning, castration, immunizations, stuff like that. For me these are all very structured timed events around birthing. 12 days before separate the sow, 3 days after castrate, 70 days after deworm, 100 days after wean, 118 days ready to rebreed. Being able to have these preset schedule after a breeding event is created would be nice.

Would also be cool to track heat cycles in a breeding plan.

2 Likes

Makes perfect sense! This would extend the range of the events/timeline I outlined above, which only focused on insemination->birth, and would also expand the data model to include the offspring assets as well. Perhaps those could automatically appear as new rows under each mother… with their own color-coded bars to represent planned post-birth stages.

Interesting. This would extend the plan in the other direction (before insemination), I imagine. Would love to hear more about what these requirements/use-cases might look like in the UI / data model, as I don’t have experience with this myself.

1 Like

These kinds of schedules feel like they could be generalized to all types of activities - so I also wonder if we could brainstorm some kind of general-purpose feature to accomplish this, which could then be linked to / leveraged from within plans. :thinking:

For me if I’m breeding a sow that has had a break I typically will track 2 or more heat cycles before breeding. This will let me better gauge when the sow will be I heat next so I can order semen for the correct time.

Agreed. This reminds me of a discussion years about about time tracking, reoccurring tasks, and timmers. Additional log "time" features - any interest?

1 Like

Interesting. Busy farming these days but I will think and return :cowboy_hat_face:

2 Likes

Hello guys
Any luck on creating a plan for gestation?

1 Like

@ibekannfarms I haven’t started anything. I was hoping to get some feedback on the idea I suggested above to see if there’s general interest, and if it makes sense.

That said, there’s no budget to prioritize this work currently, so no guarantees that anything will happen by volunteers. Sometimes I have a free morning and brain space and will volunteer time to sketch things up for fun, but that’s not something to rely on. If you want to see this happen it’s up to you to help make it happen. :slight_smile:

Relevant: How things get built... (from ideas to code)

There could be a lot of value in having “plans” for this to provide a mechanism for multiple future/planned breeding efforts to be grouped together - and perhaps abandoned/postponed together.

That said, you can do a lot with the current model - even without a concept of “breeding plans”.

Many small livestock are more ambiguous regarding whether breeding has been successful so you only really know it worked once they start nesting (in the case of rabbits) or if eggs show evidence of developing when candled (i.e. poultry). In those scenarios, the “breeding attempt” is a record that the male and female animals were placed in together - with perhaps a note saying that mating was observed.

For rabbits, we were just using an activity log for capturing those breeding attempts and a status page in Asset Link that shows recent breeding attempt logs then provides quick actions to capture births and generate the new assets for the babies.

2025_06_17_example_record_breeding

2023_03_10_rabbit_breeding_status_page

1 Like

I use a very simple react app to plan my cattle breeding. I choose between a 5 or 7 day CIDR protocol and either AI or Embryo and it calculates the insertion/removal time, shot schedule, check for heat, preg check and expected calving date.

I wrote it myself (along with ChatGPT because he offered to help almost every line of code I typed) and it is not fancy at all but helps keep all the dates in sequence.

1 Like

Breeding log / Preg check log - uses existing quick birth framework and gestation calc based on species taxonomy. beta release

3 Likes

@tool172 this is great! I just went through the repo, and it looks great. I’m hoping to install and use it soon. I’m wondering if there’s any desire to include a coefficient of inbreeding prior to the actual breeding. I have already built some stuff that does the lineage display and COI calculations. I think COI can fit into both lineage and breeding planning, but I don’t know if it should be some separate piece that’s composed across the two or included in each separate module.

My system also stores all of the off-farm animals in farmOS so I can track as animals come and go and try to get optimal pairings. I would like to be able to know which Rams or which straws (for goats) should go with which ewes or does before I actually do the breeding. I can do that in my current system, but I would rather contribute it so it is easy for others if it would be valuable to others.

1 Like

Hey Daniel,

So far I know breeding works for goats and sheep. The ai side im finishing up now for cattle Cidr cycles I plan to make optional to enable. It needs some tweaking on the cidr planning logs for shots and preg check per cycle.

I honestly haven’t thought about it to that detail. I run a small beef cattle operation that will max out at 25 pairs, so I just try to build generic modules that are useful to the main breeding groups. We run 1 bull at a time. Im still making it work for multiple groups for quick field logging.

I’ll research the data you brought up to see about lineage and genetics. Can you provide some insight into how this should be used or presented? I’ll read the topic tonight after work.

Remember this is beta, but hit me up with issues on github and I’ll spin em out while expanding it.

2 Likes

We deal in certain breeds of sheep and goats that have relatively small numbers of good stock, so it can be challenging to track the best match for each pairing. We have to have some amount of line breeding, but we want to avoid a high coefficient of inbreeding. My current system allows me to enter, through Claude Code and the plugin I have built, the lineage of a Ram or straw (we don’t do live cover for goats). This allows us to pick someone who isn’t too closely related or even possibly a parent of one of the females. This is a bigger issue with getting Rams in vs selecting straws. We can get an overall heard COI, a predicted future COI for the herd based on current stock, and a COI for a specific pairing. I think this is the closest fit for this plugin, but it does use lineage to derive the COI, and I can’t remember how farmOS is currently delivering the lineage. I believe I’m walking up the parents for each one on the farm.

The lineage part was more a necessity for COI, but it would also be useful to visualize when selling or to provide buyers.

My wife is the expert in this field, and she mentioned tracking dystocia would be useful for future pregnancies. She also mentioned prolapses, but those aren’t as big of an issue for you. She actually said every animal may have a different set of concerns to worry about. So, this module might benefit from an architecture that treats animals differently but maybe with the same pattern.

I’m a software engineer, and I’m happy to contribute everything. I can also use Claude Code to build it. I’m assuming you’re using some amount of AI in building this, but I don’t know your workflow. I often generate an IDEAS.md first that can be reviewed by others before any code is written.

1 Like

I think a separate farm_reference_animal module for the off farm animals should be made if not. It probably has already been done somewhere like death/archive log.

After reviewing kind of the data side, I would lean towards it’s own module. animal dam is stored in animal, but sire is stored in breeding log reference, you don’t need that to make a breeding log. but you could use the info from a breeding log if that makes sense.

I see it more as a breeding planner with pedigree kind of module if that makes sense for the way FarmOS is layed out currently.

That’s just my thought.