claude-coding-flow 1.4.4 → 1.5.0

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.
Files changed (2) hide show
  1. package/bin/flow.js +62 -0
  2. package/package.json +1 -1
package/bin/flow.js CHANGED
@@ -86,6 +86,68 @@ function init() {
86
86
  mkdirp(path.join(CWD, "skills"));
87
87
  mkdirp(path.join(CWD, ".worktree"));
88
88
 
89
+ // 5. Write permissions to .claude/settings.json
90
+ const settingsPath = path.join(CWD, ".claude", "settings.json");
91
+ let settings = {};
92
+ if (fs.existsSync(settingsPath)) {
93
+ try {
94
+ settings = JSON.parse(fs.readFileSync(settingsPath, "utf-8"));
95
+ } catch {}
96
+ }
97
+ if (!settings.permissions) settings.permissions = {};
98
+ if (!settings.permissions.allow) settings.permissions.allow = [];
99
+
100
+ const allowPatterns = [
101
+ // Read-only: git
102
+ "Bash(git rev-parse:*)",
103
+ "Bash(git ls-files:*)",
104
+ "Bash(git diff:*)",
105
+ // Read-only: find (docs, skills, worktree, src)
106
+ "Bash(find docs/ *)",
107
+ "Bash(find skills/ *)",
108
+ "Bash(find .worktree/ *)",
109
+ "Bash(find src/ *)",
110
+ // Read-only: grep
111
+ "Bash(grep -rn * --include=*.java --include=*.kt --include=*.py --include=*.js --include=*.ts --include=*.swift --include=*.dart)",
112
+ // Read-only: python3 one-liners (ID gen, JSON parsing, date)
113
+ "Bash(python3 -c *)",
114
+ // Read-only: ls / cat / test
115
+ "Bash(ls *)",
116
+ "Bash(test -f *)",
117
+ // Write: mkdir / cp for worktree
118
+ "Bash(mkdir -p .worktree/ *)",
119
+ "Bash(cp .worktree/ *)",
120
+ "Bash(cp docs/ .worktree/ *)",
121
+ // Write: rm temp
122
+ "Bash(rm -rf .worktree/code-gen/temp)",
123
+ // Write: date
124
+ "Bash(date *)",
125
+ // Build commands
126
+ "Bash(npm run build:*)",
127
+ "Bash(npx tsc --noEmit)",
128
+ "Bash(cargo check)",
129
+ "Bash(go build ./...)",
130
+ "Bash(make build)",
131
+ "Bash(./gradlew assembleDebug)",
132
+ "Bash(./mvnw compile)",
133
+ ];
134
+
135
+ let added = 0;
136
+ for (const p of allowPatterns) {
137
+ if (!settings.permissions.allow.includes(p)) {
138
+ settings.permissions.allow.push(p);
139
+ added++;
140
+ }
141
+ }
142
+
143
+ if (added > 0) {
144
+ fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
145
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
146
+ console.log(green(` added ${added} permission rules to .claude/settings.json`));
147
+ } else {
148
+ console.log(yellow(" skip (exists): .claude/settings.json permissions"));
149
+ }
150
+
89
151
  console.log(green("\ndone!"));
90
152
  }
91
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-coding-flow",
3
- "version": "1.4.4",
3
+ "version": "1.5.0",
4
4
  "description": "Claude Code skills for requirement analysis, code generation and bug fixing",
5
5
  "bin": {
6
6
  "flow": "bin/flow.js"