-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.conclaude.yaml
More file actions
159 lines (148 loc) · 4.68 KB
/
.conclaude.yaml
File metadata and controls
159 lines (148 loc) · 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# yaml-language-server: $schema=https://github.com/connerohnesorge/conclaude/releases/latest/download/conclaude-schema.json
# Conclaude Configuration Template
#
# This is a minimal example configuration file.
# For full documentation of all options, run: conclaude config --docs
# Or see the generated documentation from `cargo doc --open`
# Stop hook - runs when Claude is about to stop
stop:
commands: []
# Example:
# - run: "npm test"
# showStdout: true
# showStderr: true
# showCommand: true # Show "Executing command X/Y: npm test" (default: true)
# message: "Tests failed"
# maxOutputLines: 100
# timeout: 300
infinite: false
infiniteMessage: "continue working on the task"
# Subagent stop hook - runs when subagents finish
subagentStop:
commands: {}
# Example:
# coder:
# - run: "npm run lint"
# showStdout: true
# showCommand: true # Show "Executing command X/Y: npm run lint" (default: true)
# message: "Linting failed"
# test*:
# - run: "npm test"
# showStderr: true
# showCommand: false # Hide the "Executing command..." line
# Pre-tool-use hook - file protection and tool validation
preToolUse:
# Prevent files at repository root
preventRootAdditions: true
# Custom message for root additions block (supports {file_path} and {tool} placeholders)
# Example: "Files must go in src/. Cannot create {file_path} using {tool}."
preventRootAdditionsMessage: null
# Protected files (glob patterns)
uneditableFiles:
- ".conclaude.yml"
- ".conclaude.yaml"
# Examples:
# - "*.lock"
# - pattern: ".env*"
# message: "Environment files contain secrets"
#
# Agent-specific protection examples (blocks specific subagents):
# - pattern: "spectr/changes/**/tasks.jsonc"
# message: "Task files managed by orchestrator"
# agent: "coder" # Only blocks coder subagent
#
# - pattern: "src/**/*.test.ts"
# message: "Test files managed by tester agent"
# agent: "code*" # Blocks coder, coder-v2, etc.
#
# - pattern: "docs/**"
# agent: "*" # Blocks all agents (same as omitting agent field)
# Prevent editing git-ignored files
preventUpdateGitIgnored: false
# Tool usage rules
toolUsageValidation: []
# Example:
# - tool: "Write"
# pattern: "**/*.js"
# action: "allow"
# - tool: "Bash"
# commandPattern: "git push --force*"
# action: "block"
# message: "Force push not allowed"
#
# Agent-scoped rules (only apply to specific agents):
# - tool: "Bash"
# pattern: ""
# commandPattern: "rm -rf *"
# action: "block"
# agent: "coder"
# message: "Coder agent cannot run destructive rm commands"
# - tool: "Write"
# pattern: "**/*.test.ts"
# action: "block"
# agent: "coder"
# message: "Coder agent should not modify test files"
# - tool: "*"
# pattern: "src/**"
# action: "block"
# agent: "test*"
# message: "Test agents cannot modify source files"
#
# Agent pattern examples:
# - agent: "coder" # Exact match - only "coder" subagent
# - agent: "test*" # Glob pattern - matches "tester", "test-runner"
# - agent: "*" # Wildcard - matches all agents (default if omitted)
# Directories where additions are prevented
preventAdditions: []
# Example: ["dist", "build"]
# System notifications
notifications:
enabled: false
hooks: [] # ["*"] for all, or ["Stop", "PreToolUse"]
showErrors: false
showSuccess: false
showSystemEvents: true
# Permission request hook - auto-approve/deny tools
# Uncomment to enable:
#
# permissionRequest:
# default: deny # "allow" or "deny"
# allow:
# - "Read"
# - "Glob"
# - "Grep"
# - "Edit"
# - "Write"
# deny:
# - "BashOutput"
# - "KillShell"
# User prompt submit hook - context injection based on prompt patterns
# Automatically prepends context when prompts match patterns
# Uncomment to enable:
#
# userPromptSubmit:
# contextRules:
# # Pattern-based context injection
# - pattern: "sidebar"
# prompt: |
# Make sure to read @.claude/contexts/sidebar.md before proceeding.
#
# # Multiple patterns with regex alternation
# - pattern: "auth|login|authentication"
# prompt: |
# Review the authentication patterns in @.claude/contexts/auth.md
#
# # Case-insensitive matching (using regex flag)
# - pattern: "(?i)database|sql|query"
# prompt: |
# Follow the database conventions in @.claude/contexts/database.md
#
# # Disable a rule temporarily
# - pattern: "test"
# prompt: "Run tests before proceeding"
# enabled: false
#
# # Explicit case-insensitive flag
# - pattern: "api"
# prompt: "Check API documentation first"
# caseInsensitive: true