{
    "$schema": "http://json-schema.org/schema",
    "title": "Validate Code Executor",
    "description": "Combined validation for new methods, modified methods, and file sizes. Configure via targetDefaults in nx.json for runtime options (no cache issues).",
    "type": "object",
    "properties": {
        "methodMaxLimit": {
            "type": "object",
            "description": "Configuration for method line limit validation",
            "properties": {
                "limit": {
                    "type": "number",
                    "description": "Maximum lines allowed for methods",
                    "default": 80
                },
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. NEW_METHODS: only new methods in diff. NEW_AND_MODIFIED_METHODS: new methods + methods with changes. MODIFIED_FILES: all methods in modified files.",
                    "default": "NEW_AND_MODIFIED_METHODS"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch (like old STRICT mode).",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip modified-method validation (new methods still enforced). When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "fileMaxLimit": {
            "type": "object",
            "description": "Configuration for file line limit validation",
            "properties": {
                "limit": {
                    "type": "number",
                    "description": "Maximum lines for modified files",
                    "default": 900
                },
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_FILES: all code in modified files.",
                    "default": "MODIFIED_FILES"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch (like old STRICT mode).",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip modified-file validation. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "requireReturnType": {
            "type": "object",
            "description": "Configuration for return type validation",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip return type validation. NEW_METHODS: only new methods in diff. NEW_AND_MODIFIED_METHODS: new methods + methods with changes. MODIFIED_FILES: all methods in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noInlineTypeLiterals": {
            "type": "object",
            "description": "Configuration for no-inline-types validation",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. NEW_METHODS: only new methods. NEW_AND_MODIFIED_METHODS: new + modified methods. MODIFIED_FILES: all in modified files. Disallows inline type literals like { x: number } - use named types instead.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noAnyUnknown": {
            "type": "object",
            "description": "Configuration for no-any-unknown validation",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only changed lines in diff. MODIFIED_FILES: all in modified files. Disallows `any` and `unknown` TypeScript keywords.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noImplicitAny": {
            "type": "object",
            "description": "Configuration for no-implicit-any validation (TS7006/7005/7018/etc via the TypeScript compiler).",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only implicit-any on changed lines. MODIFIED_FILES: all implicit-any in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether // webpieces-disable no-implicit-any comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "validateDtos": {
            "type": "object",
            "description": "Validate DTO fields match Prisma Dbo model fields. Prevents AI from inventing field names.",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CLASS: only validate Dto classes with changed lines. MODIFIED_FILES: validate all Dtos in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether @deprecated field exemption works. When false, all fields must match.",
                    "default": true
                },
                "prismaSchemaPath": {
                    "type": "string",
                    "description": "Relative path from workspace root to schema.prisma"
                },
                "dtoSourcePaths": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Array of directories (relative to workspace root) containing Dto files"
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip DTO validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "prismaConverter": {
            "type": "object",
            "description": "Validate Prisma converter methods follow scalable patterns: correct Dbo parameter, no async, no standalone functions, Dto creation only in converter directories.",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. NEW_AND_MODIFIED_METHODS: validate new/modified methods in converters + changed lines in non-converters. MODIFIED_FILES: validate all methods in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "schemaPath": {
                    "type": "string",
                    "description": "Relative path from workspace root to schema.prisma"
                },
                "convertersPaths": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Array of directories (relative to workspace root) containing converter files"
                },
                "enforcePaths": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Array of directory prefixes (relative to workspace root) to scope validation to. When set, only files under these paths are checked. When empty/omitted, all changed files are checked."
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip prisma-converter validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noDestructure": {
            "type": "object",
            "description": "Validate no destructuring patterns are used. Destructuring hurts code traceability.",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only changed lines in diff. MODIFIED_FILES: all in modified files. Disallows destructuring patterns.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "catchErrorPattern": {
            "type": "object",
            "description": "Validate catch blocks follow standardized pattern: catch (err: unknown) { const error = toError(err); }",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only catch blocks on changed lines. MODIFIED_FILES: all catch blocks in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noUnmanagedExceptions": {
            "type": "object",
            "description": "Validate try/catch blocks are not used outside chokepoints. Exceptions should bubble to filters/globalErrorHandlers.",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only changed lines in diff. MODIFIED_FILES: all in modified files. Disallows try/catch blocks.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                }
            }
        },
        "noDirectApiInResolver": {
            "type": "object",
            "description": "Validate resolvers use services (not APIs) and components subscribe to service observables (not route.snapshot.data).",
            "properties": {
                "mode": {
                    "type": "string",
                    "description": "OFF: skip validation. MODIFIED_CODE: only changed lines in diff. NEW_AND_MODIFIED_METHODS: violations in new/modified method/route scopes. MODIFIED_FILES: all in modified files.",
                    "default": "OFF"
                },
                "disableAllowed": {
                    "type": "boolean",
                    "description": "Whether disable comments work. When false, no escape hatch.",
                    "default": true
                },
                "ignoreModifiedUntilEpoch": {
                    "type": "number",
                    "description": "Epoch seconds. Until this time, skip validation entirely. When expired, normal mode resumes. Omit when not needed."
                },
                "enforcePaths": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Array of directory prefixes (relative to workspace root) to scope validation to. When set, only files under these paths are checked. When empty/omitted, all changed files are checked."
                }
            }
        }
    },
    "required": []
}
