Skip to main content

SUMD - Structured Unified Markdown Descriptor for AI-aware project documentation

Project description

SUMD

AI Cost Tracking

AI Cost AI Model

This project uses AI-generated code. Total cost: $3.0000 with 20 AI commits.

Generated on 2026-04-18 using openrouter/qwen/qwen3-coder-next


SUMD is a semantic project descriptor format in Markdown that defines intent, structure, execution entry points, and mental model of a system for both humans and LLMs.

What is SUMD?

SUMD (Structured Unified Markdown Descriptor) is a lightweight structured markdown format for AI-aware project descriptions. It serves as a single source of truth for project documentation, optimized for both human readability and LLM context injection.

Purpose

  • Project descriptor: Defines API, CLI, workflows, endpoints, and system architecture
  • AI-optimized: Structured for LLM consumption and automation tools
  • Lightweight manifest: Bridges the gap between README, spec, and configuration files
  • Context injection: Provides structured context for AI agents and tools

Use Cases

  • Project documentation and specification
  • Input for LLM context injection
  • CI/CD workflow descriptions
  • API and CLI mapping
  • Structural project manifest

Installation

pip install sumd

Usage

CLI Commands

# Scan a workspace — auto-generate SUMD.md for every project found
sumd scan .                     # skip projects that already have SUMD.md
sumd scan . --fix               # overwrite existing SUMD.md
sumd scan . --fix --no-raw      # convert sources to structured Markdown instead of raw code blocks
sumd scan . --fix --analyze     # also run analysis tools (code2llm, redup, vallm)
sumd scan . --fix --analyze --tools code2llm,redup  # only selected tools

# Lint / validate SUMD files
sumd lint SUMD.md               # validate a single file
sumd lint --workspace .         # validate all SUMD.md files in the workspace
sumd lint --workspace . --json  # output JSON results

# Generate project/map.toon.yaml (static code map — without code2llm)
sumd map ./my-project             # write to project/map.toon.yaml
sumd map ./my-project --force     # overwrite existing
sumd map ./my-project --stdout    # print to stdout

# Generate testql scenario scaffolds from OpenAPI spec
sumd scaffold ./my-project                  # all scenarios (api + smoke)
sumd scaffold ./my-project --type smoke     # only smoke tests
sumd scaffold ./my-project --type crud      # per-resource CRUD scenarios
sumd scaffold ./my-project --force          # overwrite existing files

# Run analysis tools on a single project
sumd analyze ./my-project                    # run all tools
sumd analyze ./my-project --tools code2llm   # only code2llm
sumd analyze ./my-project --force            # reinstall tools

Python API

from sumd import parse, parse_file
from sumd.parser import validate_sumd_file

# Parse SUMD from string
document = parse(content)

# Parse SUMD from file
document = parse_file("SUMD.md")

# Validate SUMD file (markdown structure + codeblock format)
result = validate_sumd_file(Path("SUMD.md"))
# result = {"source": "SUMD.md", "markdown": [...], "codeblocks": [...], "ok": True}
if not result["ok"]:
    for issue in result["markdown"] + result["codeblocks"]:
        print(issue)

What is Embedded in SUMD.md?

SUMD auto-embeds the following sources from a project (when present):

Source Contents markpact kind
pyproject.toml metadata, deps, entry points parsed
Taskfile.yml all tasks as raw YAML markpact:file
openapi.yaml full OpenAPI spec (endpoints as sections) markpact:file
testql-scenarios/** all .testql.toon.yaml scenario files markpact:file
app.doql.less / .css DOQL styling markpact:file
pyqual.yaml quality pipeline config markpact:file
goal.yaml project intent rendered
.env.example env variables list listed
Dockerfile containerisation listed
docker-compose.*.yml services listed
src/**/*.py modules module list listed
project/analysis.toon.yaml static code analysis (CC, pipelines) markpact:file
project/project.toon.yaml project topology markpact:file
project/evolution.toon.yaml commit evolution markpact:file
project/map.toon.yaml module inventory, function signatures, CC metrics markpact:file
project/duplication.toon.yaml code duplication report markpact:file
project/validation.toon.yaml vallm validation results markpact:file
project/compact_flow.mmd compact call flow diagram markpact:file
project/calls.mmd full call graph markpact:file
project/flow.mmd execution flow markpact:file
project/context.md architecture analysis (code2llm) inline markdown
project/README.md analysis readme inline markdown
project/prompt.txt code2llm prompt used markpact:file

Not embedded: *.png (binary images), index.html (generated visualisation), refactor-progress.txt, testql-scenarios/ inside project/.

project/map.toon.yaml is generated by sumd map (built-in, no extra deps). Other project/ files are generated by sumd analyze (invokes code2llm, redup, vallm).

Ecosystem Architecture

SUMD is part of a three-layer system:

┌─────────────────────────────────────────────────────────────┐
│                     SUMD (opis)                              │
│              Structured Unified Markdown Descriptor          │
│         Project description, intent, architecture            │
└─────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────┐
│                    DOQL (wykonanie)                          │
│              Declarative Object Query Language               │
│              Data manipulation and execution                 │
└─────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────┐
│                  Taskfile (runtime)                          │
│              Task runner and workflow execution              │
│              Automation and orchestration                   │
└─────────────────────────────────────────────────────────────┘
  • SUMD → opis (description): Defines what the system is and how it should work
  • DOQL → wykonanie (execution): Provides the language to manipulate and execute operations
  • Taskfile → runtime: Manages the actual execution of workflows and tasks

License

Licensed under Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sumd-0.1.24.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sumd-0.1.24-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file sumd-0.1.24.tar.gz.

File metadata

  • Download URL: sumd-0.1.24.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sumd-0.1.24.tar.gz
Algorithm Hash digest
SHA256 4fe94a36ec3c245ee062ddd70c85362c1d91757c45fc8fe95305802d031360ab
MD5 1059fdd6f8ce9161f90ceca2ae8b3c99
BLAKE2b-256 2463acb223a2969a4e2127da6d0b305c48435262ee385521b4e01da9ddf1df29

See more details on using hashes here.

File details

Details for the file sumd-0.1.24-py3-none-any.whl.

File metadata

  • Download URL: sumd-0.1.24-py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sumd-0.1.24-py3-none-any.whl
Algorithm Hash digest
SHA256 6b9679a92cffd9de3b46d92966c1d12d1bef7c8845f2dd682f27e78a9fbf033b
MD5 12a7f0108a20560a9fb4aaf80dbd9ca6
BLAKE2b-256 29da2b4606a5c8f9ffcd5efcf8ae02b33b1d6c0d13214c36a3acfb50c6e9fd28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page