Plant Species – System Architecture
Plant Species is the shared botanical reference domain for plants at Yuyo. It supplies taxonomic identity and species-level information to Plant Individuals, harvesting and published reference pages. Cultivars are subordinate records in this domain; they are not an additional group hierarchy. This article describes the inspected implementation as of 7 October 2026.
System Architecture → Plant Architecture → Plant Species. See also Plant Individuals — System Architecture and Animal Species — System Architecture.
Sources and Responsibilities
- Stored domain data:
wp_plant_speciesowns species records.wp_plant_cultivarsowns cultivar records and their species parent. Parts and propagation associations belong to their relationship tables. Harvest measurements belong to harvest records, not species reference weights. - Executable rules: no equivalent of the unified Plant Individual field contract currently exists for Plant Species. Rules are distributed across the Formidable Form 4 configuration and importer, the Agenti Plant Species bridge’s validators and enumerations, processor JSON schemas, cultivar resolver and database constraints. An AI response schema is a processing format, not a complete domain contract.
- Derived/read models: active-species and plant-catalog SQL views resolve active leaves and compatibility references. They are projections of canonical tables, not independently editable master data.
- Generated/published representations: species and cultivar KB posts, SEO metadata and propagation overviews are outputs of publishers. A published page is not the source record for its generated botanical information.
- AI-generated results: processor proposals and enrichment results remain attributable processing results. After validated commit, stored fields are part of the domain record; AI generation alone does not establish botanical identification or measurement authenticity.
- Legacy/compatibility sources: retired species aliases, backup tables, dated planning documents and the legacy textual list of related individuals are not alternative defining sources. Current individual relationships are resolved from stable species/cultivar references.
Model and relationships
wp_plant_cultivars.plant_species_id links a cultivar to its parent. Cultivar subgroup and genome information are metadata, not intermediate entities. The cultivar pilot’s identity may remain provisional. wp_plant_species_cultivar_aliases translates preserved historical species references to their current cultivar identity; it must not produce a second active catalog entry.
wp_species_parts_used associates species or cultivar scope with wp_parts_used. wp_species_propagation_methods associates the corresponding scope with wp_propagation_methods. Scoped keys and cultivar-parent constraints provide part of the integrity boundary; not every logical lookup relationship has a database foreign key. Plant family is currently stored as text. Recipe mappings and harvest records are downstream references rather than species-owned measurements.
Read projections include wp_yuyo_active_species, wp_yuyo_plant_catalog, wp_yuyo_catalog_parts, wp_yuyo_catalog_propagation, wp_yuyo_harvest_catalog_events, wp_yuyo_species_part_rollup and wp_species_parts_used_human. These are SQL views. Consumers must preserve cultivar identity while avoiding duplicate species/cultivar totals.
Create, intake and editing boundaries
New Entry — Plant Species uses Formidable Form 4. The insert-plant-species-from-form4-to-db importer handles its create hook, maps fields and part relationships, and requests KB refresh. This is not evidence of a matching update-hook contract.
agenti-plant-species-bridge exposes authenticated catalog, validate and commit routes under /yuyo-agenti/v1/plants/. Commit records source-based idempotency evidence in wp_yuyo_agenti_plant_audit. The standalone agenti-plant-processor.php produces proposals and can validate and commit them. Telegram submission and processor execution are distinct: the inspected plant submission path saves a draft and notifies review; automatic processor dispatch was not established by this inspection.
Generic administrative table editing is a separate path. Its existence does not mean that it shares typed intake validation or constitutes an equivalent create/update service. A unified update service was not identified.
Media and publication
Form and Agenti paths use WordPress attachments and species photo fields for the featured image and associated images/alternative text. Related video/media identifiers link to wp_youtube_pool; they are not arbitrary WordPress post identifiers. Original assets, attachment metadata and generated article presentation have separate ownership.
create-kb-article-from-plant-species-table refreshes eligible flagged records through the species content generator. Yuyo_Cultivars, implemented in yuyo-plant-individuals/src/Cultivars.php, supplies catalog resolution and cultivar refresh using that generator while retaining established post references. Propagation method pages and their overview have their own publisher.
The species/cultivar publisher owns the generated article body. It does not have the Individual publisher’s reviewed-marker merge protection. Manual edits inside generated species content can therefore be replaced by regeneration. See Updating KB Pages from Database for context, while observing each publisher’s actual ownership model.
Known inconsistencies / technical debt
- Validation and field definitions remain distributed across form, bridge, processor and database paths. This article records that condition; it does not introduce a new contract.
- The plant processor’s “validation only / no commit” header is outdated relative to its actual commit-capable implementation.
- The Form 4 create importer and generic administrative editing do not establish a consistent typed update boundary.
- Legacy reference fields and retired aliases coexist with canonical cultivar resolution. Their compatibility role must remain explicit.
- Older System Architecture and Agenti planning prose describes intended or earlier states. It must not override current executable behavior or approved contracts.
Related documentation and ownership references
Plant Species Entry Guidelines provide operator guidance. Plant Propagation Methods covers the reusable propagation domain. Agenti Roles & Editorial Architecture explains role boundaries, with its dated planning context retained. The repository’s ARCHITECTURE.md, current schema inspection and the components named above provide architecture evidence; dated plans and published summaries are not additional executable field definitions.
Species icons in OFT reference data
The stored defining source for a Species icon is wp_plant_species.plant_emoji. OFT reference capture includes this optional value by stable Species ID. The bundled snapshot is a derived representation; installing an APK does not change the stored icon.
OFT displays the recorded icon beside the Species name. When the stored value is empty or absent, including in older draft snapshots, it shows a neutral seedling (🌱). This fallback is a visual aid, not a botanical identification or a value written to the database. Banana (Species 65) and Cocoa (Species 66) had empty stored icons in the 8 October 2026 snapshot and therefore use the fallback. No separate Cultivar icon model is introduced.
The central executable presentation definition specifies presentation.naming.species_icon_fallback; the existing Dart presentation interpreter supplies the display decoration. Species names, stable IDs, alphabetical ordering and existing draft associations remain unchanged. Regression checks cover recorded, empty and missing icons and phone-width dropdown rendering.
OFT 0.2.11 (build 2017) includes the complete reference snapshot captured on 8 October 2026 at 13:35:41 America/Costa_Rica: 56 Species and 2 Cultivars. It uses the existing package and signing identity for installation over the previous app, retaining local drafts, queued Intakes and device enrollment. Automatic reference updating remains deferred.
The shared online DatabaseReferenceCatalog query has a matching local preparation to include plant_emoji; that server change has not been deployed. This release updates the APK only, with no schema, domain-data or permission change. Detailed implementation documentation: apps/OFT-CLIENT-ARCHITECTURE.md, section “Species icons in reference snapshots”.