Config Schema

AI Context Protocol configuration file format (.acp.config.json)

Config Schema

AI Context Protocol configuration file format (.acp.config.json)

Schema URL

https://raw.githubusercontent.com/acp-protocol/acp-spec/main/schemas/v1/config.schema.json

Properties

PropertyTypeRequiredDescription
versionstringNoACP specification version
includearrayNoGlob patterns for files to include
excludearrayNoGlob patterns for files to exclude
error_handlingobjectNoError handling configuration
constraintsobjectNoConstraint configuration
domainsobjectNoDomain patterns for automatic classification
call_graphobjectNoCall graph generation configuration
limitsobjectNoImplementation limits
syncanyNoSync configuration for AI tool integration (can also be in .acp/acp.sync.json)
annotateobjectNoAnnotation generation configuration (RFC-0003)
bridgeobjectNoDocumentation bridging configuration (RFC-0006)
documentationobjectNoDocumentation and style guide configuration (RFC-0002)

Full Schema

{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "$id": "https://acp-protocol.dev/schemas/v1/config.schema.json",
  "title": "ACP Configuration File",
  "description": "AI Context Protocol configuration file format (.acp.config.json)",
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "ACP specification version",
      "pattern": "^\\d+\\.\\d+\\.\\d+",
      "default": "1.0.0"
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Glob patterns for files to include",
      "default": [
        "**/*"
      ]
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Glob patterns for files to exclude",
      "default": [
        "node_modules/**",
        ".git/**",
        "dist/**",
        "build/**",
        "coverage/**",
        "**/*.test.*",
        "**/*.spec.*"
      ]
    },
    "error_handling": {
      "type": "object",
      "description": "Error handling configuration",
      "properties": {
        "strictness": {
          "type": "string",
          "enum": [
            "permissive",
            "strict"
          ],
          "default": "permissive",
          "description": "Error handling strictness mode"
        },
        "max_errors": {
          "type": "integer",
          "minimum": 1,
          "default": 100,
          "description": "Maximum number of errors before aborting (permissive mode only)"
        },
        "auto_correct": {
          "type": "boolean",
          "default": false,
          "description": "Whether to automatically fix common errors"
        }
      }
    },
    "constraints": {
      "type": "object",
      "description": "Constraint configuration",
      "properties": {
        "defaults": {
          "type": "object",
          "description": "Default constraint values",
          "properties": {
            "lock": {
              "type": "string",
              "enum": [
                "frozen",
                "restricted",
                "approval-required",
                "tests-required",
                "docs-required",
                "review-required",
                "normal",
                "experimental"
              ],
              "default": "normal",
              "description": "Default lock level"
            },
            "style": {
              "type": "string",
              "description": "Default style guide"
            },
            "behavior": {
              "type": "string",
              "enum": [
                "conservative",
                "balanced",
                "aggressive"
              ],
              "default": "balanced",
              "description": "Default AI behavior"
            }
          }
        },
        "track_violations": {
          "type": "boolean",
          "default": false,
          "description": "Enable tracking of constraint violations"
        },
        "audit_file": {
          "type": "string",
          "default": ".acp.violations.log",
          "description": "Violation log file path"
        }
      }
    },
    "domains": {
      "type": "object",
      "description": "Domain patterns for automatic classification",
      "additionalProperties": {
        "type": "object",
        "required": [
          "patterns"
        ],
        "properties": {
          "patterns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Glob patterns for this domain"
          }
        }
      }
    },
    "call_graph": {
      "type": "object",
      "description": "Call graph generation configuration",
      "properties": {
        "include_stdlib": {
          "type": "boolean",
          "default": false,
          "description": "Include standard library calls"
        },
        "max_depth": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "default": null,
          "description": "Maximum call depth (null = unlimited)"
        },
        "exclude_patterns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": [],
          "description": "Patterns to exclude from graph"
        }
      }
    },
    "limits": {
      "type": "object",
      "description": "Implementation limits",
      "properties": {
        "max_file_size_mb": {
          "type": "integer",
          "minimum": 1,
          "default": 10,
          "description": "Maximum source file size in MB"
        },
        "max_files": {
          "type": "integer",
          "minimum": 1,
          "default": 100000,
          "description": "Maximum files in project"
        },
        "max_annotations_per_file": {
          "type": "integer",
          "minimum": 1,
          "default": 1000,
          "description": "Maximum annotations per file"
        },
        "max_cache_size_mb": {
          "type": "integer",
          "minimum": 1,
          "default": 100,
          "description": "Maximum cache file size in MB"
        }
      }
    },
    "sync": {
      "oneOf": [
        {
          "$ref": "https://acp-protocol.dev/schemas/v1/sync.schema.json"
        },
        {
          "type": "boolean",
          "description": "Enable/disable sync with default settings"
        }
      ],
      "description": "Sync configuration for AI tool integration (can also be in .acp/acp.sync.json)"
    },
    "annotate": {
      "type": "object",
      "description": "Annotation generation configuration (RFC-0003)",
      "properties": {
        "provenance": {
          "type": "object",
          "description": "Provenance tracking settings",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true,
              "description": "Enable provenance tracking for generated annotations"
            },
            "includeConfidence": {
              "type": "boolean",
              "default": true,
              "description": "Include confidence scores in generated annotations"
            },
            "reviewThreshold": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.8,
              "description": "Confidence threshold below which annotations are flagged for review"
            },
            "minConfidence": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.5,
              "description": "Minimum confidence required to emit an annotation"
            }
          }
        },
        "defaults": {
          "type": "object",
          "description": "Default settings for annotation generation",
          "properties": {
            "markNeedsReview": {
              "type": "boolean",
              "default": false,
              "description": "Mark all generated annotations as needing review"
            },
            "overwriteExisting": {
              "type": "boolean",
              "default": false,
              "description": "Overwrite existing annotations when generating"
            }
          }
        }
      }
    },
    "bridge": {
      "type": "object",
      "description": "Documentation bridging configuration (RFC-0006)",
      "properties": {
        "enabled": {
          "type": "boolean",
          "default": false,
          "description": "Enable documentation bridging during indexing"
        },
        "precedence": {
          "type": "string",
          "enum": [
            "acp-first",
            "native-first",
            "merge"
          ],
          "default": "acp-first",
          "description": "Precedence when both native docs and ACP exist"
        },
        "strictness": {
          "type": "string",
          "enum": [
            "permissive",
            "strict"
          ],
          "default": "permissive",
          "description": "How to handle malformed documentation"
        },
        "jsdoc": {
          "type": "object",
          "description": "JSDoc/TSDoc bridging settings",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true,
              "description": "Enable JSDoc bridging for JavaScript/TypeScript"
            },
            "extractTypes": {
              "type": "boolean",
              "default": true,
              "description": "Extract types from @type, @param {Type}"
            },
            "convertTags": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "param",
                "returns",
                "throws",
                "deprecated",
                "example",
                "see"
              ],
              "description": "JSDoc tags to convert to ACP annotations"
            }
          }
        },
        "python": {
          "type": "object",
          "description": "Python docstring bridging settings",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true,
              "description": "Enable Python docstring bridging"
            },
            "docstringStyle": {
              "type": "string",
              "enum": [
                "auto",
                "google",
                "numpy",
                "sphinx"
              ],
              "default": "auto",
              "description": "Docstring style to parse (auto-detect recommended)"
            },
            "extractTypeHints": {
              "type": "boolean",
              "default": true,
              "description": "Extract type hints from function signatures"
            },
            "convertSections": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "Args",
                "Parameters",
                "Returns",
                "Raises",
                "Example",
                "Yields"
              ],
              "description": "Docstring sections to convert to ACP annotations"
            }
          }
        },
        "rust": {
          "type": "object",
          "description": "Rust doc comment bridging settings",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true,
              "description": "Enable Rust doc comment bridging"
            },
            "convertSections": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "Arguments",
                "Returns",
                "Panics",
                "Errors",
                "Examples",
                "Safety"
              ],
              "description": "Rust doc sections to convert"
            }
          }
        },
        "provenance": {
          "type": "object",
          "description": "Provenance tracking for bridged annotations",
          "properties": {
            "markConverted": {
              "type": "boolean",
              "default": true,
              "description": "Add source: 'converted' to bridged annotations"
            },
            "includeSourceFormat": {
              "type": "boolean",
              "default": true,
              "description": "Include sourceFormat field (jsdoc, docstring:google, etc.)"
            }
          }
        }
      }
    },
    "documentation": {
      "type": "object",
      "description": "Documentation and style guide configuration (RFC-0002)",
      "properties": {
        "approvedSources": {
          "type": "array",
          "description": "Trusted documentation sources for this project",
          "items": {
            "$ref": "#/$defs/approved_source"
          }
        },
        "styleGuides": {
          "type": "object",
          "description": "Custom style guide definitions",
          "additionalProperties": {
            "$ref": "#/$defs/style_guide_definition"
          }
        },
        "defaults": {
          "type": "object",
          "description": "Default documentation settings",
          "properties": {
            "fetchRefs": {
              "type": "boolean",
              "default": false,
              "description": "Default value for @acp:ref-fetch"
            },
            "style": {
              "type": "string",
              "description": "Default style guide for all files"
            }
          }
        },
        "validation": {
          "type": "object",
          "description": "Reference validation settings",
          "properties": {
            "requireApprovedSources": {
              "type": "boolean",
              "default": false,
              "description": "Only allow refs from approvedSources list"
            },
            "warnUnknownStyle": {
              "type": "boolean",
              "default": true,
              "description": "Warn when unknown style guide is referenced"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "approved_source": {
      "type": "object",
      "description": "Approved documentation source definition (RFC-0002)",
      "required": [
        "id",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*$",
          "description": "Unique identifier for this source (used in @acp:ref)"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Base URL for documentation"
        },
        "version": {
          "type": "string",
          "description": "Version of documentation (semver or custom)"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description"
        },
        "sections": {
          "type": "object",
          "description": "Named section shortcuts",
          "additionalProperties": {
            "type": "string",
            "description": "Path relative to base URL"
          }
        },
        "fetchable": {
          "type": "boolean",
          "default": true,
          "description": "Whether AI tools should attempt to fetch this source"
        },
        "lastVerified": {
          "type": "string",
          "format": "date-time",
          "description": "When this source was last verified accessible"
        }
      }
    },
    "style_guide_definition": {
      "type": "object",
      "description": "Custom style guide definition (RFC-0002)",
      "properties": {
        "extends": {
          "type": "string",
          "description": "Base style guide to extend"
        },
        "source": {
          "type": "string",
          "description": "Approved source ID for documentation"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Direct URL to style guide documentation"
        },
        "description": {
          "type": "string",
          "description": "Human-readable description"
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Languages this guide applies to"
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Style rules (key or key=value format)"
        },
        "filePatterns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Glob patterns for auto-applying this guide"
        }
      }
    }
  }
}