File

File is the default file-kind type assigned to any file registered in a local corpus whose extension is not explicitly mapped to a more specific type in the corpus configuration. It is the defaultMetadata.documentType fallback in the local server config.

Role in the local server

When the local server scans a corpus directory it maps each encountered file extension to a document type via the includeFileExtensions config array. If a file's extension has no explicit mapping, the server falls back to sdg:File and registers the document with:

  • title derived from the filename
  • type assertion sdg:File
  • the configured default label
  • source address pointing at the file on disk

This ensures every file in a scanned folder tree is registered and discoverable, even if it has not yet been assigned a domain-specific type.

Relationship to other file-kind types

  • Markdown Document — the file-kind type for .md files; a more specific subtype of the generic file pattern.
  • Pure File — the type for binary files (PDFs, images, CAD) registered by metadata only; similar in spirit but carries content-hash and MIME-type metadata.
  • Sparqdown Document — the type for .sd files whose source is parsed as Sparqdown.

Future phases

In later phases, the local server may infer a more specific type from a file's MIME type or content signature, narrowing sdg:File to sdg:PureFile or a domain type automatically. For now, sdg:File is a stable, conservative fallback that requires no inference.