POLYTONE — the AI-native programming language

Guide

Packages & the registry

A package is a directory of modules described by one manifest — vendored flat, resolved local → vendor/ → stdlib, and published through a gate.

polytone.pkg
format: package
version: 2
name: poster-tools
pkg-version: 0.1.0
summary: A poster look built on imaging-extras
deps:
    imaging-extras 0.1.0
modules:
    posterize

ptc vendor copies a package's modules into vendor/ next to your entry file; given a registry URL it resolves deps: transitively (cycles and conflicts are teaching errors) and records everything in vendor/vendor.lock:

terminal
ptc vendor ../imaging-extras

Before a package meets the registry, ptc pack runs the publishing gate (Sprint 50): strict manifest, fmt --check over every module, a /// doc on every pub item, and every test green — at least one test required, so an untested package cannot pass:

terminal
ptc pack examples/packages/poster-tools