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 = ">=8.0.1"
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 manifest is the identity — the directory holding the package may carry any name.
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 8.0.1.
main_pipe No The package's entry-point pipe. Auto-exported by virtue of being main_pipe. See Main Pipe below.
exclude No Patterns, in .gitignore syntax, naming files to keep out of the package's method tree. See Exclude below.

Package Addresses

The address is the globally unique identifier for a package. It doubles as the fetch location for distribution (see Distribution). In a repository hosting several packages, the packages share the repository's address and each one's full address is address + "/" + name (see Distribution: Locating a Package Inside a Clone).

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 name 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:

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 is auto-exported — it is part of the package's public surface by virtue of being main_pipe, whether or not it also appears in [exports].
  • The field is optional. Packages without a main_pipe can still be used as libraries — consumers import specific pipes by their qualified names.

Exclude

Every file in the package's folder travels with the package, except dotfiles, a few defaults such as __pycache__/, Python virtual environments and other packages nested inside the folder, and whatever the folder's own .gitignore files ignore (see Package Structure: Method Files). The exclude field keeps more files out of the package without keeping them out of git, such as sample data you keep in the repository but no run needs:

[package]
name    = "invoice_letters"
address = "github.com/acme/invoice-letters"
version = "1.0.0"
exclude = ["samples/", "*.psd"]

Each entry is one pattern written as it would be in a .gitignore file, read from the package's root. See Specification: Exclude for the exact rules.

The [dependencies] Section

Dependencies are covered in detail on the Dependencies page.

The [exports] Section

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

See Also