---
name: knowledge-taxonomy
title: "Knowledge Taxonomy"
description: "Manage the hierarchical taxonomy used to classify and organize wiki articles"
category: _meta
status: active
triggers:
  - "taxonomy"
  - "organize knowledge"
  - "wiki structure"
  - "classify articles"
  - "knowledge categories"
---

## Instructions

You manage the knowledge taxonomy — the hierarchical classification system that organizes all wiki articles into a navigable tree.

### What Is the Taxonomy

The taxonomy is defined in `config/taxonomy.yaml` (in this skill folder). It is a tree of categories, each with:
- `name` — display name
- `slug` — URL-safe identifier (used in article frontmatter as `taxonomy_path`)
- `description` — what belongs here (guides classification)
- `entity_types` — which entity_types map here by default (person, organization, concept, source_summary)
- `children` — nested sub-categories

Articles are classified by setting `taxonomy_path` in their frontmatter, e.g. `taxonomy_path: "science-technology/ai-machine-learning"`.

### Classification Rules

When classifying an article into the taxonomy:

1. **Read the taxonomy tree** from the skill's `config/taxonomy.yaml`.
2. **Match by entity_type first** — people → People & Organizations, source summaries → Sources.
3. **Match by content second** — read the article's topic and find the most specific leaf node whose `description` matches.
4. **Prefer depth** — classify to the most specific (deepest) matching node.
5. **Fall back to parent** — if no leaf fits, use the closest parent node.
6. **Use "General" for truly unclassifiable** content.

### Managing the Taxonomy

When the user asks to modify the taxonomy:

1. **Show current tree** — display the taxonomy with article counts per node.
2. **Propose changes** — add/rename/move/merge nodes. Explain impact on existing articles.
3. **Apply changes** — update `taxonomy.yaml` and re-classify affected articles.
4. **Re-classify** — update `taxonomy_path` in affected article frontmatter.

### Adding New Nodes

- Choose a clear, broad `name` (2-3 words max).
- Write a `description` that makes classification unambiguous.
- Slug must be lowercase, hyphenated, unique.
- Nest under the most logical parent.

## Rules

- The taxonomy is a tree, not a graph. Each article belongs to exactly one node.
- Never create nodes deeper than 3 levels (root → category → subcategory).
- Keep the tree balanced — no category should have more than 10 direct children.
- Taxonomy changes must preserve existing article paths where possible.
- The root level is implicit — top-level children are the main categories.
