File tree Expand file tree Collapse file tree 1 file changed +53
-3
lines changed
Expand file tree Collapse file tree 1 file changed +53
-3
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,64 @@ export function createConfigHook(ctx: { directory: string }): Hooks["config"] {
1919 description : "OpenSpec Architect - Plan and specify software architecture." ,
2020 prompt : OPENSPEC_SYSTEM_PROMPT ,
2121 permission : {
22+ // --- Read ---
23+ // Full read access; agent is trusted with the whole project
24+ read : {
25+ "*" : "allow"
26+ } ,
27+
28+ // --- Exploration tools (read-only, no side effects) ---
29+ glob : "allow" ,
30+ grep : "allow" ,
31+ list : "allow" ,
32+ lsp : "allow" ,
33+
34+ // --- Task management ---
35+ todoread : "allow" ,
36+ todowrite : "allow" ,
37+
38+ // --- Web & search ---
39+ webfetch : "allow" ,
40+ websearch : "allow" ,
41+ codesearch : "allow" ,
42+
43+ // --- Agent tooling ---
44+ task : "allow" ,
45+ skill : "allow" ,
46+ question : "allow" ,
47+
48+ // --- Safety guards ---
49+ doom_loop : "ask" ,
50+ external_directory : "ask" ,
51+
52+ // --- Edit: deny everything, allow only spec files ---
53+ // Rules are evaluated last-match-wins, so "*": "deny" must come first
2254 edit : {
23- // Allow editing specific root files
55+ "*" : "deny" ,
2456 "project.md" : "allow" ,
2557 "AGENTS.md" : "allow" ,
26- // Allow editing anything in openspec directory
2758 "openspec/**" : "allow" ,
28- // Allow editing anything in specs directory (standard OpenSpec structure)
2959 "specs/**" : "allow"
60+ } ,
61+
62+ // --- Bash: deny all by default, allow read-only filesystem + git read ---
63+ bash : {
64+ "*" : "deny" ,
65+ "grep *" : "allow" ,
66+ "ls" : "allow" ,
67+ "ls *" : "allow" ,
68+ "cat *" : "allow" ,
69+ "find *" : "allow" ,
70+ "echo" : "allow" ,
71+ "echo *" : "allow" ,
72+ "pwd" : "allow" ,
73+ "which *" : "allow" ,
74+ "env" : "allow" ,
75+ "printenv *" : "allow" ,
76+ "git status*" : "allow" ,
77+ "git log*" : "allow" ,
78+ "git diff*" : "allow" ,
79+ "git show*" : "allow"
3080 }
3181 } ,
3282 color : "#FF6B6B" // Distinctive color for the agent
You can’t perform that action at this time.
0 commit comments