Full JSON Schema for the .aispec manifest file, field-by-field reference, capability and permission enums, worked examples, and validation rules.
The .aispec file is a UTF-8 JSON document stored at the root of an .aipkg archive. It describes the package’s identity, metadata, capabilities, targeting, dependencies, and embedded assets. It corresponds to NuGet’s .nuspec but uses JSON instead of XML and contains AI•Pkg-specific fields.
File naming: {id}.aispec — the filename must match the id field inside the manifest.
JSON Schema
{ "$schema": "https://aipkg.org/schemas/aispec/1.0.0", "type": "object", "required": ["schema", "id", "version", "description", "authors", "capabilities"], "additionalProperties": false, "properties": { "schema": { "type": "string", "description": "Schema version URI. Must be 'https://aipkg.org/schemas/aispec/1.0.0'.", "const": "https://aipkg.org/schemas/aispec/1.0.0" }, "id": { "type": "string", "description": "Package identifier. Lowercase, alphanumeric, hyphens and dots only. Must match the filename ({id}.aispec).", "pattern": "^[a-z][a-z0-9\\-\\.]{0,127}$", "maxLength": 128 }, "version": { "type": "string", "description": "Semantic version string. SemVer 2.0.0 format. Pre-release and build metadata supported.", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" }, "description": { "type": "string", "description": "Short description shown in search results. Plain text only. Max 500 characters.", "minLength": 1, "maxLength": 500 }, "authors": { "type": "array", "description": "One or more author names.", "minItems": 1, "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 200 } }, "capabilities": { "type": "array", "description": "What this package provides. At least one required.", "minItems": 1, "items": { "type": "string", "enum": ["skill", "command", "agent", "prompt", "mcp-server", "lsp-server", "config", "hook", "theme"] }, "uniqueItems": true }, "targets": { "type": "array", "description": "APM monikers this package supports. Empty array or omitted means 'ai' (universal).", "items": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" }, "uniqueItems": true, "default": [] }, "title": { "type": "string", "description": "Human-readable display name. Falls back to id if omitted.", "maxLength": 256 }, "summary": { "type": "string", "description": "One-line summary (shorter than description). Used in some UI contexts.", "maxLength": 256 }, "releaseNotes": { "type": "string", "description": "What changed in this version. Markdown supported.", "maxLength": 10000 }, "projectUrl": { "type": "string", "format": "uri" }, "repositoryUrl": { "type": "string", "format": "uri" }, "repositoryType": { "type": "string", "enum": ["git", "svn", "mercurial", "other"] }, "repositoryBranch": { "type": "string" }, "repositoryCommit": { "type": "string" }, "licenseExpression": { "type": "string" }, "licenseFile": { "type": "string" }, "iconFile": { "type": "string", "default": "icon.png" }, "readme": { "type": "string", "default": "README.md" }, "tags": { "type": "array", "description": "Search tags. Lowercase, alphanumeric and hyphens.", "maxItems": 30, "items": { "type": "string", "pattern": "^[a-z0-9\\-]{1,50}$" }, "uniqueItems": true }, "copyright": { "type": "string", "maxLength": 500 }, "language": { "type": "string", "pattern": "^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$" }, "modelCompatibility": { "type": "object", "additionalProperties": false, "properties": { "minimumContextWindow": { "type": "integer", "minimum": 0 }, "requiresToolUse": { "type": "boolean" }, "requiresVision": { "type": "boolean" }, "notes": { "type": "string", "maxLength": 1000 } } }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "filesystem:read", "filesystem:write", "network:outbound", "network:inbound", "process:exec", "clipboard:read", "clipboard:write", "env:read", "env:write", "secrets:read" ] }, "uniqueItems": true }, "mcpServers": { "type": "array", "items": { "type": "object", "required": ["name", "transport"], "additionalProperties": false, "properties": { "name": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" }, "transport": { "type": "string", "enum": ["stdio", "sse", "http", "websocket"] }, "command": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "url": { "type": "string", "format": "uri" }, "env": { "type": "object", "additionalProperties": { "type": "string" } }, "description": { "type": "string", "maxLength": 500 }, "targets": { "type": "array", "items": { "type": "string" } } } } }, "lspServers": { "type": "array", "items": { "type": "object", "required": ["name", "command"], "additionalProperties": false, "properties": { "name": { "type": "string", "pattern": "^[a-z][a-z0-9\\-]{0,63}$" }, "command": { "type": "string", "description": "Executable to launch. May reference a file bundled in lsp/ using {install_path}." }, "args": { "type": "array", "items": { "type": "string" } }, "transport": { "type": "string", "enum": ["stdio"], "default": "stdio", "description": "LSP servers always use stdio per the LSP specification." }, "languages": { "type": "array", "description": "Language identifiers this server handles (e.g. 'python', 'typescript', 'rust'). At least one of languages or filetypes is recommended.", "items": { "type": "string" } }, "filetypes": { "type": "array", "description": "File extensions this server handles (e.g. '.py', '.ts'). Alternative to or combined with languages.", "items": { "type": "string", "pattern": "^\\.[a-zA-Z0-9]+$" } }, "env": { "type": "object", "additionalProperties": { "type": "string" } }, "initializationOptions": { "type": "object", "description": "Passed verbatim to the LSP initialize request as initializationOptions.", "additionalProperties": true }, "settings": { "type": "object", "description": "Workspace-level settings forwarded to the server via workspace/didChangeConfiguration.", "additionalProperties": true }, "description": { "type": "string", "maxLength": 500 }, "targets": { "type": "array", "items": { "type": "string" } } } } }, "hooks": { "type": "array", "description": "Lifecycle hooks this package installs. Each entry declares an event, the path to its script or prompt file within the archive, and optional targeting.", "items": { "type": "object", "required": ["event", "path"], "additionalProperties": false, "properties": { "event": { "type": "string", "description": "The lifecycle event that triggers this hook.", "enum": [ "PreToolUse", "PostToolUse", "Stop", "SubagentStop", "SessionStart", "SessionEnd", "UserPromptSubmit", "PreCompact", "Notification" ] }, "matcher": { "type": "string", "description": "Glob pattern matched against the tool name. Only valid for PreToolUse and PostToolUse. Omit to match all tools." }, "path": { "type": "string", "description": "Archive-relative path to the hook's script or prompt file (e.g. 'shared/hooks/pre-tool-use.md')." }, "type": { "type": "string", "description": "Whether this hook runs as a prompt (sent to the model) or a script (executed as a subprocess).", "enum": ["prompt", "script"], "default": "prompt" }, "description": { "type": "string", "maxLength": 500 }, "targets": { "type": "array", "items": { "type": "string" } } } } }, "dependencies": { "type": "array", "items": { "type": "object", "required": ["id", "version"], "additionalProperties": false, "properties": { "id": { "type": "string" }, "version": { "type": "string" }, "apms": { "type": "array", "items": { "type": "string" } }, "optional": { "type": "boolean", "default": false } } } }, "listed": { "type": "boolean", "default": true }, "deprecated": { "type": "object", "additionalProperties": false, "properties": { "message": { "type": "string", "maxLength": 1000 }, "alternatePackageId": { "type": "string" }, "alternatePackageVersion": { "type": "string" } } } }}
Bundles or configures a Language Server Protocol server
config
Provides configuration files for a platform
hook
Provides one or more lifecycle hooks (declared via hooks[])
theme
Provides UI theme or styling
A package may declare multiple capabilities.
Permission Values
Value
Meaning
filesystem:read
Reads files from the local filesystem
filesystem:write
Writes or modifies files
network:outbound
Makes outbound network calls
network:inbound
Listens for inbound connections
process:exec
Executes subprocesses
clipboard:read
Reads clipboard contents
clipboard:write
Writes to clipboard
env:read
Reads environment variables
env:write
Modifies environment variables
secrets:read
Reads secrets or credentials
Platforms may enforce permissions at install or runtime. Installers must warn users when a package requests sensitive permissions (process:exec, secrets:read, env:write).
lspServers[] Fields
Each entry in lspServers configures one Language Server Protocol server the package installs.
Field
Required
Type
Notes
name
Yes
string
Unique identifier within the package. Lowercase alphanumeric and hyphens.
command
Yes
string
Executable to launch. Use {install_path} to reference bundled files in lsp/.