Skip to main content

Module schema

Module schema 

Source
Expand description

Intent format specification with versioning, tier filtering, and schema export.

Provides a machine-readable registry of all patchloom operations, their parameters (as JSON Schemas), capability tiers, and examples. External consumers (AI coding agents) use this to build tool schemas and system prompts programmatically.

§Quick start

use patchloom::schema::{self, Tier};

// Check compatibility
assert!(schema::is_compatible_version("1"));

// Get operations for medium-tier models
let ops = schema::operations_for_tier(Tier::Medium);
assert!(!ops.is_empty());

// Generate a system prompt fragment
let prompt = schema::system_prompt_for_tier(Tier::Medium);
assert!(prompt.contains("replace"));

Structs§

OperationExample
A concrete example of invoking an operation.
OperationSchema
Schema for a single patchloom operation.

Enums§

Tier
Model capability tier for operation filtering.

Constants§

INTENT_FORMAT_VERSION
The current intent format version. Consumers check this at startup to detect breaking changes across patchloom releases.

Functions§

is_compatible_version
Check whether a given version string is compatible with this release.
operation_schemas
Return the complete registry of all patchloom operations with schemas.
operations_for_tier
Get operations available at a given capability tier (includes all lower tiers).
plan_write_policy_schema
JSON Schema for plan-level write_policy envelope fields.
system_prompt_for_tier
Generate a system prompt fragment describing available operations at this tier.