| name | generate-from-spec |
| description | Use when you need a custom taxonomy generated from a spec — product categories, evaluation types, content classifications, domain-specific enumerations. |
Generate Taxonomy from Spec
Build a custom taxonomy from a user's natural-language or structured specification. Elicit the domain, scope, schema, and generate a structured, reviewed taxonomy ready for load or export.
When to use
- "Create a taxonomy of LLM evaluation types"
- "I need product categories for [domain]"
- "Generate a content classification scheme for…"
- "Build me a list of [entity types] with [fields]"
Inputs to gather
- Domain/purpose: What is this taxonomy for? (e.g., "types of software testing", "product categories for an e-commerce site")
- Expected size: How many entries? (rough order of magnitude)
- Fields per entry: What columns? (e.g., code, label, description, parent_code, metadata JSON)
- Hierarchy? Flat or parent/child tree? (defer to
hierarchical-taxonomies if complex)
- Required exhaustiveness: Complete/canonical list vs. representative sample?
Procedure
- Elicit and confirm the spec: Ask clarifying questions about domain, scope, fields. Write a brief spec block to show the user you understand the requirement.
- Generate the taxonomy:
- For small sets (≤50 entries): Write directly as a structured list (dict of code → label, description, optional parent_code).
- For larger or specialized sets (>50 entries, domain-specific): Suggest spawning a research subagent or conducting web research to ensure comprehensive coverage; do not guess.
- Assign stable codes: Use snake_case slugs derived from the label (e.g., "Instruction Following" →
instruction_following), or suggest numeric IDs if the user prefers. Ensure codes are URL-safe and unique.
- Structure the output:
- Write to
data/<name>/<name>.csv with columns: code (PK), label, description, source (how the entry was generated/sourced), generated_at (ISO 8601 timestamp).
- Also write
data/<name>/<name>.json (array of objects, same fields).
- Include deterministic ordering: alphabetical by code, or by user-specified priority.
- Provide review guidance: Print the generated list for the user to review before load. Highlight any entries that seem uncertain or out-of-scope. Never auto-load without explicit approval.
Output / side effects
- CSV + JSON in
data/<name>/ with full taxonomy and metadata.
- User review checkpoint before any downstream load.
Safety / constraints
- No auto-load: Always require explicit user approval before writing to a database.
- Sourcing: Document the source for each entry (user-specified, web research, inference).
- Reversible: Generated taxonomies are non-binding until loaded; user can discard or edit them freely.