Classify

From norrietaylor/distillery · View interactive version

Classify is an AI agent skill from the GitHub repository norrietaylor/distillery. Classify knowledge entries by type and manage the manual review queue

How to use this skill

Skill file

<!-- Trigger phrases: classify, classify entry, review queue, triage inbox, /classify [entry_id|--inbox|--batch|--review] -->

Classify — Manual Classification & Review Queue

Classify runs the classification engine on knowledge entries and lets you triage the review queue for low-confidence predictions.

When to Use

Process

Step 1: Check MCP

See CONVENTIONS.md — skip if already confirmed this conversation.

Step 2: Dispatch to Mode

| Invocation | Mode |

|------------|------|

| /classify <entry_id> | Classify by ID |

| /classify --inbox | Batch inbox classification (alias for --batch --entry-type inbox) |

| /classify --batch <filters> | Batch classification with composable filters |

| /classify --review | Review queue triage |

| /classify (no args) | Show help |

Optional flags (all modes):

| Flag | Parameter | Description |

|------|-----------|-------------|

| --project | <name> | Filter by project name |

Batch filter flags (--batch mode only):

| Flag | Parameter | Description |

|------|-----------|-------------|

| --source | <source> | Filter by entry source (e.g. claude-code, manual, import, inference, external) |

| --entry-type | <type> | Filter by entry type (e.g. inbox, github, feed, session, etc.) |

| --author | <name> | Filter by author name |

| --tag-prefix | <prefix> | Filter by tag namespace prefix (e.g. project/billing) |

| --project | <name> | Filter by project name |

| --unclassified | (none) | Filter to entries with no tags and verification=unverified |

Filters are composable with AND semantics. At least one filter is required when using --batch (reject bare --batch with no filters).


Mode A: Classify by ID

Step A1: Retrieve and Classify

  1. Call distillery_get to retrieve the entry. If not found, tell the user to check the ID or use /recall.
  2. Analyse the content and determine:
  1. Call distillery_classify with those values.

Step A2: Display Result

Show entry ID, type, confidence (as <n%> (<level>)), status, reasoning, and suggested tags. For reclassifications, show old and new classification side-by-side. If confidence is below threshold, note the entry was sent to the review queue.


Mode B: Batch Inbox Classification

--inbox is a convenience alias for --batch --entry-type inbox. It follows the same process as Mode B2 below with entry_type="inbox" pre-set.

Step B1: List Inbox Entries

Call distillery_list(entry_type="inbox", limit=50, output_mode="full", content_max_length=300). If --project was specified, also pass project=<name>. If empty, tell the user and stop.

Step B2: Classify Each Entry

For each entry (max 50), compute classification as in Mode A and call distillery_classify. Track counts: classified (active), review (pending_review), errors.

Step B3: Display Batch Summary

## Batch Classification Complete

| Entry ID | Preview | Type | Confidence | Status |
|----------|---------|------|------------|--------|
| <id>     | <first 60 chars>... | <type> | <n%> (<level>) | <active|review|error> |

Total: <N> processed — <classified> active, <review> review, <errors> errors

If any sent to review, suggest /classify --review.


Mode B2: Batch Classification with Filters

Step B2-1: Validate Filters

  1. At least one filter flag must be present. If the user passed bare --batch with no filters, display an error: "At least one filter is required for --batch mode. See /classify for available filters." and stop.
  2. Build the distillery_list arguments from the provided filters:

| Flag | distillery_list parameter |

|------|----------------------------|

| --source | source=<value> |

| --entry-type | entry_type=<value> |

| --author | author=<value> |

| --tag-prefix | tag_prefix=<value> |

| --project | project=<value> |

| --unclassified | verification="unverified" (the empty-tags constraint is checked post-fetch in Step B2-2) |

Step B2-2: List Matching Entries

Call distillery_list with the composed filters, plus limit=50, output_mode="full", content_max_length=300. If empty, tell the user no entries matched the filters and stop.

If --unclassified was specified, additionally filter the returned entries to only those with tags=[] (empty tags list). This is a post-fetch filter since the store does not support empty-tag queries directly.

Step B2-3: Classify Each Entry

For each entry (max 50), compute classification as in Mode A and call distillery_classify. Track counts: classified (active), review (pending_review), errors.

Step B2-4: Display Batch Summary

Use the same summary table format as Mode B Step B3.


Mode C: Review Queue Triage

Step C1: Fetch the Review Queue

Call distillery_list(status="pending_review", output_mode="review", limit=20). If --project was specified, also pass project=<name>. If empty, tell the user and stop.

Step C2: Determine Reviewer

Determine reviewer per CONVENTIONS.md author resolution.

Step C3: Triage Each Entry

For each entry, display: ID, type, confidence, author, date, reasoning, and a 200-char content preview. Prompt for action:

| Key | Action | MCP Call |

|-----|--------|----------|

| a | Approve — keep classification, set active | distillery_resolve_review(action="approve") |

| r | Reclassify — prompt for new type, validate against valid types (re-prompt once if invalid) | distillery_resolve_review(action="reclassify", new_entry_type=...) |

| x | Archive — remove from knowledge base | distillery_resolve_review(action="archive") |

| s | Skip — leave in queue | No MCP call |

Always pass the reviewer name when calling distillery_resolve_review.

Step C4: Display Triage Summary

## Review Queue Summary

Entries reviewed: <total>
- Approved: <n>  |  Reclassified: <n>  |  Archived: <n>  |  Skipped: <n>

Mode D: Show Help (No Arguments)

Read references/modes.md for the help text to display.


Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.