---
name: export-json
description: 'File-type spec: JSON export (.json). Used by the KB ingest pipeline to classify + extract + render.'
title: JSON export
category: file-types
status: active
author: system
metadata:
  priority: 0
---
## What this skill is

One entry in the **File-Type Registry** ([kb/file_types.py](../../../../server/src/agntspace/kb/file_types.py), shipped 2026-04-24). Declares how files of this type flow through the three ingest layers:

1. **Classify** — which extensions / MIME types / magic bytes match, what `prompt_focus` the LLM uses, what `source_type` label the wiki page frontmatter carries.
2. **Extract** — which registered Python extractor pulls content from the file (see `extractor:` below).
3. **Render** — how the extracted content is surfaced in the wiki + canvas.

The actual strategy lives in [config/file-type.yaml](config/file-type.yaml) — edit it to customise. The registry reloads on next KB service init; for changes without a server restart, use the evolution loop.

## Why this exists as a skill (not just Python)

Rule 12 — strategy lives in skills, never in code. The Python bundled default ([file_types_defaults.py](../../../../server/src/agntspace/kb/file_types_defaults.py)) is a degraded-mode fallback so the pipeline is never empty on first boot. The YAML here is the canonical source, and your vault's copy at `system/skills/file-types/export-json/config/file-type.yaml` overrides both (overwrite=True — user vault wins).

## Extending

- Want a different extraction strategy for this file type? Change the `extractor:` field to another registered extractor id (`text_utf8`, `pdf_pdfplumber`, `vision_llm`, `csv_tabular`, `json_pretty`, `vtt_srt`, `html_parser`, `docx_python_docx`, `epub_markitdown`, `audio_whisper`, `video_ffmpeg_vision` — plus any plugin-registered extractors).
- Want to tune the LLM's focus? Edit `prompt_focus:`. It propagates to the classify prompt in the next KB service init.
- Want to change how the file is filed under `library/`? That's the **library layout** concern (thematic / type-date / flat) — see KB-level SCHEMA.md, NOT this file.