Why the Boundary Matters: A Practical Judgment Model for anydoc

The final question for anydoc is not whether it accepts a long list of file extensions. It is whether its boundary between heterogeneous documents and structured Markdown matches the needs of a real workflow. This conclusion brings together the identity check, format frontends, shared model, renderer, error contract, PDF exception, and integration surfaces so readers can decide what anydoc can reasonably be trusted to do, what it deliberately leaves to them, and how to test the fit against their own corpus.

The operating model is a chain of owned decisions

anydoc’s central value comes from a sequence rather than from one isolated feature. Bytes first need a defensible identity. A frontend then needs to resolve source-specific meaning. A shared model carries the resulting structures and relationships. A Markdown serializer expresses them under one target-language policy. Finally, the caller must interpret success, recovery, and refusal according to the output contract. The chain works because each boundary has a different owner and a different question.

The detector owns the first question: which format family should interpret these bytes? It uses container evidence such as PDF and RTF markers, OLE stream names, and ZIP package identity rather than guessing from document prose. It can give a mislabeled container a chance to reach the right parser, but it does not certify that the content is healthy. CSV illustrates the limit: because plain text has no signature that uniquely identifies it, the caller must supply the missing format information.

That separation has a practical consequence. “Detected as Word” is not the same statement as “converted successfully.” A recognizable container may still be encrypted, malformed, missing a required part, or too large for the fixed safety rules. Keeping identity separate from convertibility means a batch system can record the difference between an ambiguous input and a damaged input instead of treating every failure as the same kind of mystery.

The frontend owns the second question: what does this source mean? It resolves style cascades, numbering, references, and relationships before constructing the model. That is what allows the renderer to receive a resolved style rather than a source-specific inheritance problem, a list with meaningful ordering rather than an unexplained number, and an internal link target rather than a package-specific bookmark encoding. The frontend absorbs the vocabulary of the source so downstream consumers do not have to reopen the original archive.

The shared model owns a third question: which meanings are stable enough to carry across formats? Its blocks and inlines distinguish headings, paragraphs, lists, tables, quotes, code, formulas, links, notes, anchors, images, and checkboxes. Its document can retain notes and embedded assets. This is not a promise to preserve every visual property of an Office application. It is a controlled vocabulary for the structure and relationships that a downstream text workflow can use.

The renderer owns the fourth question: how can those meanings be expressed as safe, readable GFM? It applies one policy to all model-backed inputs. It numbers notes in reference order, maps anchors, preserves link destinations where they resolve, and escapes source text according to whether it sits in a paragraph, heading, table cell, link label, or other Markdown context. Centralization is the source of consistency: a correction to shared rendering behavior can affect every frontend that reaches the model.

The caller owns the final question: is this result sufficient for the intended use? The library can state that a conversion returned complete useful Markdown under its contract, or that a typed error prevented it. It cannot know whether an embedded image’s alt text is enough for a particular dataset, whether a missing optional object matters to a legal record, or whether sending a scanned PDF to hosted OCR is permitted by an organization’s policy. Those judgments remain outside the core because they depend on the workflow rather than on the file format alone.

This chain explains why anydoc is more than a collection of parsers and more than a text formatter. The parser-specific work is valuable because it feeds a common semantic boundary. The common renderer is valuable because it prevents each parser from inventing a different Markdown dialect. The error and resource rules are valuable because they stop the boundary from producing confident-looking output when the system no longer knows that the output is complete.

Fit depends on what the boundary is allowed to lose

A normalization system is useful only if the information it loses is less important than the consistency it creates. anydoc makes several losses visible instead of hiding them behind a generic success string.