The Eglei Tal states explicitly that most poskim hold grinding (טחינה) on Shabbat, like kneading (עימור) and threshing (דישה), applies only to produce of the ground, citing the Trumas HaDeshen for this rule, and noting that reaping is likewise limited to produce of the ground even more clearly so (Eglei Tal, Dash 7:2).
The Mishnah lists grinding among the categories of labor forbidden on Shabbat (Mishnah Shabbat 7:2), and the Gemara in Shabbat develops its scope: Rav Pappa rules that one who chops a beet into small pieces is liable for grinding, and Rav Menashe adds chopping wood chips for sawdust, while Rav Ashi notes that where one is particular about the exact size, the liability shifts to cutting instead (Shabbat 74b:2).
The Rambam codifies this, ruling that one who grinds a measure the size of a dried fig is liable, that grinding spices or herbs in a mortar is included, that cutting detached vegetables is a derivative of grinding, and that sawing wood for its shavings or filing metal is liable from any amount, whereas cutting wood into larger pieces requires enough to cook a fig's volume before liability applies (Mishneh Torah, Sabbath 8:15).
The Shulchan Arukh rules that finely cutting vegetables is liable for grinding, and the Rema extends this to cutting dried figs and carobs for the elderly, but distinguishes bread crumbs for chickens as already ground and therefore not subject to a second grinding, and further distinguishes cutting for immediate eating, which is permitted like selecting food to eat at once (Shulchan Arukh, Orach Chayim 321:12).
The Mishnah Berurah explains that the permission to cut derives precisely from the principle that grinding applies only to produce of the ground, and notes that even authorities who consider an animal halachically akin to produce of the ground would still not forbid this case, since some poskim hold grinding does not even apply to prepared foods at all, while distinguishing a case where cutting is what renders a hard food edible, in which grinding would apply (Mishnah Berurah 321:31-33).
The Arukh HaShulchan refines the practical scope further, explaining that grinding applies only to items normally cut very fine, so that fruits and squash, which are not normally cut that fine, are excluded, while onions and garlic, which are normally cut fine, remain included (Arukh HaShulchan, Orach Chaim 321:6).
The Sfas Emes discusses why chopping a beet is liable for grinding despite not resembling ordinary grinding, since the kernel is not separated from husk, suggesting the liability is derived from the Mishkan model of grinding spices rather than grain, and noting a dispute among Rishonim whether this is true grinding or merely a derivative of it (Sfas Emes al HaShas, Shabbat 74b).
The related passages on salting a radish and preparing fish brine on Shabbat (Shabbat 108b:7) and on milking, curdling, and cheese-making being assigned to other categories of labor such as extracting and building (Shabbat 95a:3) show the broader project of Chazal in classifying food-preparation actions under specific labor categories, paralleling the concern in our sources over what falls under grinding.
Further discussion of produce of the ground as a halachic category appears regarding seeds in perforated versus imperforate pots and their susceptibility to impurity (Shabbat 95b:1-2), the uprooting of a mushroom and the status of plants grown in pots (Shabbat 108a:1), and the Midrash HaGadol's distinction between vegetation that grows without seed and produce that requires seed (Midrash HaGadol).
The Eglei Tal raises a further inquiry into whether the category of produce of the ground, as applied to threshing, depends on the edible item itself being produce of the ground or on the surrounding husk being so, and brings a proof from the Arukh's citation of the Geonim that one who gathers food from its dust is liable for threshing, suggesting the matter may depend on the husk rather than the food (Eglei Tal, Dash 7:21).
Nishmat Shabbat addresses the related question of soaking wheat and barley, ruling that this is treated as a derivative of planting and creates liability for any amount since these are produce of the ground customarily planted in this way (Nishmat Shabbat vol 6:220), and the Sefer HaIttur discusses a parallel category regarding substances in which plants grow versus substances, like desert soil, that support vegetation without producing fruit, with bearing on how the term produce of the ground is defined (Sefer HaIttur 46b).