Anything so complex, you tend to figure out various optimizations (from tooling to timing and beyond) from painful long-term on-the-ground experience. I'd argue "the knowledge of farming" is really that, rather than the simple notion that planting seeds may (or may not) grow new plants.
That ancients "kinda sorta knew" that "planting" (or discarding) a plant's seeds someplace may yield a new growth there, I don't doubt. Of course actual farming needs to yield a maximum of kcals per acre/crop, given the massive amount of labour investment and social disruption required. To maximize this yield over the generations under the given local conditions (weather, soil, crops), isn't that the actual "knowledge of farming", only obtainable by doing the actual toil over the decades and indeed centuries? And when they encountered a new crop, a new soil or a new clime, knowledge for maximizing ROI had to be gained from scratch.