Skip to content

Add SDOC language recognition (.sdoc) #7838

@entropicwarrior

Description

@entropicwarrior

Language information

What is SDOC?

SDOC is a documentation format designed for human/AI collaboration. The raw format reads like clean plain text — both humans and AI agents can author and edit it fluently. Rendered, it produces rich documents with collapsible sections, tables, images, math, mermaid diagrams, and syntax-highlighted code blocks.

The defining feature is explicit brace scoping: { } braces mark section boundaries unambiguously. Every document has exactly one valid parse tree. This lets AI agents surgically extract or modify a single section without loading the entire file — a significant efficiency gain over formats like Markdown where section boundaries require heuristics.

Sample

# Project Overview @overview {
    A documentation format where humans and AI agents
    collaborate on the same source files.

    # Features {
        - Explicit brace scoping — no ambiguous boundaries
        - Rich rendering — tables, images, math, diagrams
        - Progressive disclosure — read headings first, load sections on demand
        - Zero-dependency JavaScript parser
    }

    # Status :example {
        {[table auto center]
            Component | Status
            Parser | Complete
            Renderer | Complete
            VS Code Extension | Published
        }
    }
}

Extension uniqueness

The .sdoc extension is not used by any language currently in Linguist. No disambiguation heuristics are needed.

Sample files

Sample files are available in the repository:

Current adoption

SDOC is early in adoption. We have a published npm package (@entropicwarrior/sdoc), a VS Code extension, and are actively growing usage. We understand the usage thresholds for language addition and are happy to revisit when .sdoc files reach sufficient numbers on GitHub. Opening this issue to start the conversation and get feedback on what's needed.

TextMate grammar

A TextMate grammar for syntax highlighting is available at syntaxes/sdoc.tmLanguage.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions