A guild is an institution that crystallizes tribal knowledge into institutional knowledge. Guilds are the coalescence of atomized technocrats into a political class, and may be compared to industry standards organizations today, e.g. ISO, OSHA, the American Petroleum Institute, and so on. They are distinct from unions and other associations of craftsmen because they are political actors (rather than merely economic) and have selective memberships with very high average competence.
If you’ve ever worked a day in your life, you know that most people operate on a combination of head knowledge (memorized solutions to common problems) and tribal knowledge (the total head knowledge available in the people they can ask for help). Institutional knowledge can be thought of as centralized repositories of “best practices” discovered by craftsmen through trial and error and written down by the more intelligent, conscientious practitioners. Looking up a written solution, understanding it, and applying it correctly are beyond the abilities of most people. However, everyone in a significantly large organization knows there’s a “smart kid” in the engineering department who can translate institutional knowledge into head knowledge, and then communicate it as tribal knowledge.
Monasteries were the first guilds in modern (post-Roman) Western Civilization. (This obviously doesn’t include Byzantium.) The production and retention of institutional knowledge relies on the technology used to record it, the cultural capital to be spent maintaining cloisters of prolific writers and archivists, and the moral capacity of a society to think ahead. Black societies cannot produce technocrats at present because their tribal knowledge doesn’t include the idea of a “guild”. They only understand the neurotic and demagogue archetypes.