Configuration Schema
Config File
Section titled “Config File”Repotype configuration is defined in repotype.yaml at your repository root.
version: "1"
defaults: unmatchedFiles: deny
folders: - id: src-structure path: src requiredFolders: [components, utils] pathCase: kebab
files: - id: typescript-source glob: "src/**/*.ts" pathCase: kebab
- id: docs glob: "docs/**/*.md" frontmatter: required: [title]Schema Reference
Section titled “Schema Reference”version
Section titled “version”Type: string (required)
Config version. Currently always "1".
version: "1"extends
Section titled “extends”Type: string[]
Paths to parent configs to inherit from.
extends: ["./profiles/base.yaml"]defaults
Section titled “defaults”Type: object
Default behavior settings.
Properties:
unmatchedFiles:"deny" | "allow"(default:"deny") How to handle files not matching any rule.deny= error,allow= suggestion.
folders
Section titled “folders”Type: FolderRule[]
Folder structure rules.
Properties:
-
id:string(required) Unique identifier for this rule. -
path:string(required) Folder path (can include globs likesrc/*). -
requiredFolders:string[]Subdirectories that must exist. -
allowedFolders:string[]Only these subdirectories are allowed. -
requiredFiles:string[]Files that must exist in this folder. -
allowedFiles:string[]Only these files are allowed (glob patterns). -
pathCase:"kebab" | "camel" | "pascal" | "snake"Naming convention for folder.
Type: FileRule[]
File validation rules.
Properties:
-
id:string(required) Unique identifier for this rule. -
glob:string(required) Glob pattern to match files. -
pathCase:"kebab" | "camel" | "pascal" | "snake"Naming convention for file paths. -
pathPattern:stringRegex pattern for path validation. -
schema:SchemaConfigJSON/YAML schema validation. -
frontmatter:FrontmatterConfigMarkdown frontmatter validation. -
requiredCompanion:CompanionRule[]Required companion files. -
forbidContentPatterns:string[]Block files containing these patterns. -
templateHints:string[]Warn if these placeholders exist.
plugins
Section titled “plugins”Type: Plugin[]
External tool integrations.
Properties:
-
id:string(required) Unique plugin identifier. -
enabled:boolean(default:true) Whether plugin is active. -
install:Command[]Commands to install plugin dependencies. -
validate:CommandCommand to run for validation. -
fix:CommandCommand to run for auto-fix. -
severityOnFailure:"error" | "warning"(default:"error") Severity when plugin fails.
operations
Section titled “operations”Type: object
Git hooks and watcher configuration.
Properties:
-
hooks:HooksConfigGit hooks settings.enabled:boolean(default:false) Enable git hooks.hook:"pre-commit" | "pre-push" | "both"(default:"pre-commit") Which hooks to install.
-
watcher:WatcherConfigFile watcher settings.enabled:boolean(default:false) Enable file watcher.schedule:stringCron schedule for watcher.queueDir:string(default:"sort_queue") Directory for quarantined files.minErrors:number(default:3) Minimum errors before quarantine.logFile:stringPath to watcher log file.
Type Definitions
Section titled “Type Definitions”SchemaConfig
Section titled “SchemaConfig”interface SchemaConfig { kind: "json" | "yaml"; schema: string; // Path to JSON Schema file}FrontmatterConfig
Section titled “FrontmatterConfig”interface FrontmatterConfig { required?: string[]; // Required field names schema?: string; // Path to JSON Schema for frontmatter}CompanionRule
Section titled “CompanionRule”interface CompanionRule { pattern: string; // Glob pattern relative to matched file}Command
Section titled “Command”interface Command { cmd: string; // Shell command to execute}Full Example
Section titled “Full Example”version: "1"
extends: - ./profiles/base.yaml
defaults: unmatchedFiles: deny
folders: - id: src-structure path: src requiredFolders: - components - hooks - utils pathCase: kebab
- id: docs-structure path: docs requiredFiles: - README.md allowedFolders: - guides - reference - api
files: - id: typescript glob: "src/**/*.{ts,tsx}" pathCase: kebab
- id: react-components glob: "src/components/**/*.tsx" requiredCompanion: - pattern: "*.test.tsx"
- id: markdown-docs glob: "docs/**/*.md" frontmatter: required: - title - description schema: schemas/doc.schema.json
- id: package-json glob: "package.json" schema: kind: json schema: schemas/package.schema.json
- id: source-secrets glob: "src/**/*.{ts,js}" forbidContentPatterns: - "sk-[a-zA-Z0-9]{20,}" # OpenAI keys - "ghp_[a-zA-Z0-9]{36}" # GitHub PATs
- id: env-safety glob: ".env*" forbidContentPatterns: - "sk-[a-zA-Z0-9]{20,}" - "npm_[a-zA-Z0-9]{36}"
plugins: - id: eslint enabled: true validate: cmd: "pnpm exec eslint ." fix: cmd: "pnpm exec eslint --fix ." severityOnFailure: error
operations: hooks: enabled: true hook: pre-commit
watcher: enabled: false schedule: "*/15 * * * *" queueDir: sort_queue minErrors: 3