app-design-thinking
Design the app mechanism and build pipeline for the produced app — the app-phase analog of [[schema-design]]. Use this skill whenever the knowledge phases are…
Turn raw input materials (PDFs, DOCX, mixed docs) into structured markdown for the rest of John's pipeline. Use whenever the project's `.john/input/` has unparsed files, when a phase needs to read source documents, or when the user mentions parsing/OCR/ingestion. Teaches a
$ npx -y skills add kitchen-engineer42/joharnessburg --skill parsing --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/parsingContext preview
The summary Claude sees to decide when to auto-load this skill.
Turn raw input materials (PDFs, DOCX, mixed docs) into structured markdown for the rest of John's pipeline. Use whenever the project's `.john/input/` has unparsed files, when a phase needs to read source documents, or when the user mentions parsing/OCR/ingestion. Teaches a
name: parsing
description: Turn raw input materials (PDFs, DOCX, mixed docs) into structured markdown for the rest of John's pipeline. Use whenever the project's `.john/input/` has unparsed files, when a phase needs to read source documents, or when the user mentions parsing/OCR/ingestion. Teaches a probe-first capability ladder — agent-native reading → markitdown in-process → ppx when present — and when to escalate because results aren't good enough for the job, not just absent; fails loud with install hints when dependencies are missing.
metadata:
triggers:
- parse documents
- parse PDFs
- ingest input
- OCR
- parse the corpus
- convert to markdown
- invoke the parser
- which parserThe first useful thing John does on any project: read the user's raw input materials and produce structured markdown the rest of the pipeline can consume. This skill teaches a **capability ladder** — probe what you have, start at the cheapest rung that works, and escalate when the output isn't good enough for the job.
Before parsing anything, take stock of two things and write the result into PLAN.md's parse-phase notes:
1. **The corpus**: file types, counts, sizes, and structure. Is it native-PDF or scanned? Office formats? A folder tree of small files? One 2,000-page monster? A quick inventory (`ls -R` + reading the first KB of representative files) tells you which rungs you'll need. 2. **The environment**: which rungs are available. markitdown is in-process (`pip install markitdown`); ppx is usable only if `$JOHN_PPX_CLIENT_URL` is set and `/readyz` returns HTTP 200 with `status: "ready"`, service identity, and capabilities. `/healthz` is liveness only. Probe, don't assume — a missing rung changes routing, and discovering that mid-fan-out wastes a phase.
Echo what you found ("32 PDFs (~8 scanned), 5 DOCX, ppx reachable at :8501") before routing. Cheap self-check: if the inventory is wrong, every downstream decision is wrong.
Three rungs, cheapest first. The default path for a fresh `git clone` of John (no servers running) is rungs 0–1 — **never block on rung 2 being absent**.
One narrow specialist sits outside the ladder: **Chinese government regulation HTML** (`*.gov.cn` pages with `<div id="UCAP-CONTENT">` / `TRS_Editor` containers) → `parse_govcn_html.py`; markitdown can't parse the nested container layout. See `references/gov-cn-html.md`.
When the corpus is mixed (most real ones), route **per file**, not per batch. You're good at making this call per file; trust it.
A rung can succeed and still be the wrong rung. The escalation test is not "did I get output?" but "**is the output good enough for what downstream phases need from it?**"
Concrete case: a doc-verification project whose rules require extracting entities from complex tables and charts. Agent-native reading (or a text-layer parse) may read the running prose perfectly and *fail completely* on table structure — silently, producing markdown that looks fine. ppx is built for exactly that. If downstream knowledge depends on tables, figures, or layout, that *requirement* — not a visible error — sends PDFs to Tier 2.
So before settling routing, ask: what does the knowledge schema need from these documents? Prose-only → low rungs are fine. Structured regions (tables, charts, forms, multi-column layouts) → route those files to ppx, and if ppx isn't available, tell the user what quality they're giving up rather than silently shipping degraded parses.
The same logic applies *within* Tier 2's backends: `--backend default` (OCR + layout + pymupdf) handles ~80% of real PDFs; escalate to `--backend paddle` (better Chinese, dense layouts) or the VLM backends (`deepseek`, `glm` — visual structure understanding) only after observing inadequate results, and ask the user before spending credits on VLM passes. Conversely, never OCR a PDF whose text layer is extractable — it costs more and loses fidelity.
**Quality fallback in the other direction**: if a 50 MB image-heavy DOCX produces a few KB of markdown, markitdown stripped too much — convert to PDF (LibreOffice headless, OS print-to-PDF) and route to ppx.
Real user input can be arbitrarily messy: junk exports, half-corrupt scans, formats nothing handles. The job is **triage, never silent dropping**:
1. Separate the cleanly-parseable from the questionable at probe time. 2. Parse the clean set first — don't hold the whole corpus hostage to the worst file. 3. For the rest: two strikes per file (one parse attempt + one fallback), then surface to the user in the parse-phase Log section of PLAN.md with the file path, the error, what was tried,
中文版: README_ZH.md John turns unstructured source material into a working knowledge-dense app. It keeps knowledge engineering and app building in one durable run, coordinates large per-entry fan-outs, and leaves auditable events and checkpoints on disk.
Design the app mechanism and build pipeline for the produced app — the app-phase analog of [[schema-design]]. Use this skill whenever the knowledge phases are…
Bundle a finished John workspace from Codex. Use when the user wants to archive, package, hand off, or preserve a John project, or wants the Claude command…
Break parsed markdown into a tree of progressively-disclosed chunks for downstream extraction. Use this skill whenever a phase needs to work on per-chunk…
Apply deterministic quality checks to the code John produces — catch the 80% of issues (leaked API keys, hardcoded prod URLs, broken imports, missing…
Generate John's process scorecard, auditor manifests, and shareable run report from a Codex project using John's provider-neutral scripts. Use when the user…
Activate a Hamster-built or otherwise applied John template for Codex in the current project. Use when a merged template plugin already exists, when the user…