Skip to content

The Manifest

METHODS.toml is the package manifest — the identity card and dependency declaration for a package. It is a TOML file at the root of the package directory.

A First Look

[package]
name          = "nda_analyzer"
address       = "github.com/acme/legal-tools"
display_name  = "Nda Analyzer"
version       = "0.3.0"
description   = "Legal document analysis and contract review methods."
authors       = ["ACME Legal Tech <legal@acme.com>"]
license       = "MIT"
mthds_version = ">=1.0.0"
main_pipe     = "analyze_nda"

[exports.legal]
pipes = ["classify_document"]

[exports.legal.contracts]
pipes = ["extract_clause", "analyze_nda", "compare_contracts"]

[exports.scoring]
pipes = ["compute_weighted_score"]

This manifest declares a method called nda_analyzer hosted at github.com/acme/legal-tools, version 0.3.0. It exports specific pipes from three domains and designates analyze_nda as its main entry point.

The [package] Section

The [package] section defines the package's identity:

Field Required Description
name Yes The name of the method. Must be snake_case (matching [a-z][a-z0-9_]*), 2-25 characters. The package directory name must match the name field exactly.
address Yes Globally unique identifier. Must follow the hostname/path pattern (e.g., github.com/org/repo).
display_name No Human-friendly label for CLI output and registry listings. Cosmetic only — never used as an identifier. Max 128 characters.
version Yes Semantic version (MAJOR.MINOR.PATCH, with optional pre-release and build metadata).
description Yes Human-readable summary of the package's purpose. Must not be empty.
authors No List of author identifiers (e.g., "Name <email>"). Default: empty list.
license No SPDX license identifier (e.g., "MIT", "Apache-2.0").
mthds_version No MTHDS standard version constraint. The current standard version is 1.0.0.
main_pipe No The package's entry-point pipe. Must reference a pipe declared in the [exports] section. See Main Pipe below.

Package Addresses

The address is the globally unique identifier for a package. It doubles as the fetch location for distribution (see Distribution).

Addresses follow a hostname/path pattern:

github.com/acme/legal-tools
github.com/mthds/document-processing
gitlab.com/company/internal-methods

The address must start with a hostname (containing at least one dot), followed by a /, followed by one or more path segments.

Invalid addresses:

legal-tools               # No hostname
acme/legal-tools          # No dot in hostname

Version Format

The version field must conform to Semantic Versioning 2.0.0:

MAJOR.MINOR.PATCH[-pre-release][+build-metadata]

Examples: 1.0.0, 0.3.0, 2.1.3-beta.1, 1.0.0-rc.1+build.42

Main Pipe

The main_pipe field designates the package's primary entry point — the pipe that runs when a user invokes the package by slug or address:

mthds run method nda_analyzer
mthds run method github.com/acme/legal-tools

Both commands above execute the pipe referenced by main_pipe.

The value is a snake_case pipe code that must match a pipe declared in the [exports] section:

main_pipe = "analyze_nda"

Validation rules:

  • The value MUST be a valid snake_case pipe code (matching [a-z][a-z0-9_]*).
  • The referenced pipe must be declared in the [exports] section. A manifest that sets main_pipe to a pipe not present in exports is invalid.
  • The field is optional. Packages without a main_pipe can still be used as libraries — consumers import specific pipes by their qualified names.

The [dependencies] Section

Not yet implemented. Dependencies between packages are planned but not yet supported.

Dependencies are covered in detail on the Dependencies page.

The [exports] Section

Exports are covered in detail on the Exports & Visibility page.

See Also