feat: canonical taxonomy — categories and tags for ingestion

This commit is contained in:
2026-04-18 16:44:32 +02:00
parent 44b1eac0ba
commit b2a725a646
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/**
* Canonical category values for globalItems.category.
* These are the only valid values the ingestion agent should use.
*/
export const CATEGORIES = [
"bags", // bikepacking bags, dry bags, stuff sacks
"shelters", // tents, bivys, tarps, hammocks
"sleep", // sleeping bags, quilts, pads, pillows
"cooking", // stoves, cookware, mugs, utensils
"lighting", // headlamps, bike lights, lanterns
"water", // filters, bottles, bladders
"electronics", // power banks, solar panels, GPS, bike computers
"tools", // multi-tools, pumps, repair kits, locks
"clothing", // jackets, base layers, gloves, shoes
"navigation", // GPS devices, maps, compasses
"bikes", // complete bikes
"components", // drivetrain, brakes, wheels, handlebars, saddles, stems
] as const;
export type Category = (typeof CATEGORIES)[number];

31
scripts/taxonomy/tags.ts Normal file
View File

@@ -0,0 +1,31 @@
/**
* Canonical tags for globalItems.
* Mirrors the seed tags in src/db/seed-global-items.ts.
* The agent should only use tags from this list.
*/
export const TAGS = [
// Activity
"bikepacking", "cycling", "hiking", "backpacking", "camping", "climbing",
"mountaineering", "road-cycling", "gravel", "running", "trail-running",
// Bag subtypes
"handlebar-bag", "framebag", "saddlebag", "top-tube-bag", "stem-bag",
"fork-bag", "feed-bag", "dry-bag", "stuff-sack", "bike-bag",
// Shelter subtypes
"tent", "bivy", "tarp", "hammock",
// Sleep subtypes
"sleeping-bag", "sleeping-pad", "quilt", "pillow",
// Cooking subtypes
"stove", "cookware", "mug", "utensils",
// Water subtypes
"water-filter", "water-bottle",
// Lighting subtypes
"headlamp", "bike-light", "lantern",
// Electronics subtypes
"gps", "bike-computer", "power-bank", "solar-panel",
// Tools subtypes
"multi-tool", "pump", "repair-kit", "lock",
// Clothing subtypes
"rain-jacket", "base-layer", "gloves", "shoe",
] as const;
export type Tag = (typeof TAGS)[number];