| name | classifier-extractor |
| description | Extract structured entities from source code using Pydantic schemas and Instructor-powered LLM extraction. The Classify phase of the Graftline.
|
| version | 0.1.0 |
| author | Jero (LATTICE / MARPA Design Studios) |
| triggers | ["classify this code","extract entities","run the classifier","what's in this file","/classify"] |
| tools | ["Read","Glob","Grep","Bash"] |
Classifier Extractor
USE WHEN the user wants to extract structured metadata from source files, run entity extraction, classify code components, or understand what a codebase contains.
What It Does
Runs the Classify phase of the Graftline — extracting structured entities from source code:
- AST Parsing — Extract functions, classes, imports, decorators via Python AST
- Schema Extraction — Identify Pydantic models, dataclasses, TypedDicts
- API Discovery — Find FastAPI/Flask routes, endpoint definitions
- Dependency Mapping — Trace import graphs and external dependencies
- LLM Extraction — Use Instructor patterns for semantic entities AST cannot capture
Usage
/classify backend/**/*.py
/classify app/api/routes.py
classify this codebase
Entity Types
| Entity | Source | Fields |
|---|
| Function | AST | name, args, return type, docstring, decorators |
| Class | AST | name, bases, methods, attributes |
| Import | AST | module, names, alias |
| Route | Pattern match | method, path, handler, auth |
| Model | AST + LLM | name, fields, validators, relationships |
| Config | LLM | key, value, source, sensitivity |
Output
Structured JSON with all extracted entities, suitable for documentation generation and validation.