@senomas/pi-git-hat 0.2.3 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/roles/roles.json CHANGED
@@ -1,9 +1,101 @@
1
1
  {
2
+ "default": {
3
+ "pre-tool": [
4
+ { "type": "allow", "regex": "^ls ", "reason": "List directory contents" },
5
+ { "type": "allow", "regex": "^find ", "reason": "Search for files" },
6
+ { "type": "allow", "regex": "^grep ", "reason": "Search text patterns" },
7
+ { "type": "allow", "regex": "^rg ", "reason": "Recursive text search" },
8
+ { "type": "allow", "regex": "^cat ", "reason": "Concatenate/read files" },
9
+ { "type": "allow", "regex": "^head ", "reason": "Output first lines" },
10
+ { "type": "allow", "regex": "^tail ", "reason": "Output last lines" },
11
+ { "type": "allow", "regex": "^wc ", "reason": "Word/line/byte count" },
12
+ { "type": "allow", "regex": "^sort ", "reason": "Sort lines" },
13
+ { "type": "allow", "regex": "^uniq ", "reason": "Filter repeated lines" },
14
+ { "type": "allow", "regex": "^jq ", "reason": "JSON query" },
15
+ { "type": "allow", "regex": "^dirname ", "reason": "Strip path components" },
16
+ { "type": "allow", "regex": "^basename ", "reason": "Strip directory from path" },
17
+ { "type": "allow", "regex": "^pwd$", "reason": "Print working directory" },
18
+ { "type": "allow", "regex": "^echo ", "reason": "Print text" },
19
+ { "type": "allow", "regex": "^printf ", "reason": "Formatted print" },
20
+ { "type": "allow", "regex": "^which ", "reason": "Locate a command" },
21
+ { "type": "allow", "regex": "^whoami$", "reason": "Print current user" },
22
+ { "type": "allow", "regex": "^uname ", "reason": "Print system info" },
23
+ { "type": "allow", "regex": "^hostname$", "reason": "Print host name" },
24
+ { "type": "allow", "regex": "^date ", "reason": "Show date/time" },
25
+ { "type": "allow", "regex": "^env$", "reason": "Print environment" },
26
+ { "type": "allow", "regex": "^true$", "reason": "No-op success" },
27
+ { "type": "allow", "regex": "^false$", "reason": "No-op failure" },
28
+ { "type": "allow", "regex": "^yes ", "reason": "Repeat output" },
29
+ { "type": "allow", "regex": "^time ", "reason": "Time a command" },
30
+ { "type": "allow", "regex": "^seq ", "reason": "Print number sequence" },
31
+ { "type": "allow", "regex": "^sleep ", "reason": "Pause execution" },
32
+ { "type": "allow", "regex": "^read ", "reason": "Read file contents" },
33
+ { "type": "allow", "regex": "^diff ", "reason": "Compare files" }
34
+ ],
35
+ "post-tool": [
36
+ { "type": "confirm", "regex": "^git push\\b", "reason": "Push to remote?" },
37
+ { "type": "confirm", "regex": "^git checkout\\b", "reason": "Switch branches?" },
38
+ { "type": "confirm", "regex": "^git switch\\b", "reason": "Switch branches?" },
39
+ { "type": "allow", "regex": "^git\\b", "reason": "Git commands" }
40
+ ]
41
+ },
2
42
  "roles": {
3
- "planner": { "pattern": "^plan(-|/|$)", "description": "Plan work by creating todo/plan files" },
4
- "implementor": { "pattern": "^(implementor$|feature|feat|impl$|work$)(-|/|$)", "description": "Feature/impl/work branches" },
5
- "reviewer": { "pattern": "^review(-|/|$)", "description": "Review implementations against todos" },
6
- "admin": { "pattern": "^(main|master)$", "description": "Project configuration and docs" },
7
- "researcher": { "pattern": "^research(-|/|$)", "description": "Research topics and document findings" }
43
+ "planner": {
44
+ "pattern": "^plan(-|/|$)",
45
+ "description": "Plan work by creating todo/plan files",
46
+ "tool": [
47
+ { "type": "allow", "regex": "^web_", "reason": "Web search" }
48
+ ],
49
+ "post-tool": [
50
+ { "type": "block", "regex": ".*", "reason": "Reviewer: block." }
51
+ ],
52
+ "writablePaths": [
53
+ { "path": "todo", "extension": "md" },
54
+ { "path": "plan", "extension": "md" },
55
+ { "path": "docs", "extension": "md" }
56
+ ]
57
+ },
58
+ "implementor": {
59
+ "pattern": "^(implementor$|feature|feat|impl$|work$)(-|/|$)",
60
+ "description": "Feature/impl/work branches",
61
+ "tool": [
62
+ ]
63
+ },
64
+ "reviewer": {
65
+ "pattern": "^review(-|/|$)",
66
+ "description": "Review implementations against todos",
67
+ "tool": [
68
+ ],
69
+ "post-tool": [
70
+ { "type": "block", "regex": ".*", "reason": "Reviewer: block." }
71
+ ],
72
+ "writablePaths": [
73
+ { "path": "todo" }
74
+ ]
75
+ },
76
+ "admin": {
77
+ "pattern": "^(main|master)$",
78
+ "description": "Project configuration and docs",
79
+ "tool": [
80
+ ],
81
+ "writablePaths": [
82
+ { "path": ".pi" },
83
+ { "path": "", "extension": "md" }
84
+ ]
85
+ },
86
+ "researcher": {
87
+ "pattern": "^research(-|/|$)",
88
+ "description": "Research topics and document findings",
89
+ "tool": [
90
+ { "type": "allow", "regex": "^web_", "reason": "Web research" }
91
+ ],
92
+ "post-tool": [
93
+ { "type": "block", "regex": ".*", "reason": "Reviewer: block." }
94
+ ],
95
+ "writablePaths": [
96
+ { "path": "docs", "extension": "md" },
97
+ { "path": "", "extension": "md" }
98
+ ]
99
+ }
8
100
  }
9
101
  }