moai-adk 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
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.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -8
- moai_adk/cli/commands/init.py +10 -5
- moai_adk/cli/commands/update.py +274 -118
- moai_adk/cli/prompts/init_prompts.py +14 -18
- moai_adk/core/diagnostics/slash_commands.py +1 -1
- moai_adk/core/project/backup_utils.py +1 -0
- moai_adk/core/project/phase_executor.py +3 -1
- moai_adk/core/project/validator.py +3 -2
- moai_adk/core/template/backup.py +11 -3
- moai_adk/core/template/merger.py +16 -3
- moai_adk/core/template/processor.py +22 -3
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +443 -424
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
- moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
- moai_adk/templates/.claude/agents/alfred/project-manager.md +205 -125
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
- moai_adk/templates/.claude/commands/alfred/0-project.md +673 -640
- moai_adk/templates/.claude/commands/alfred/1-plan.md +342 -333
- moai_adk/templates/.claude/commands/alfred/2-run.md +295 -285
- moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -356
- moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
- moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
- moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
- moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +27 -27
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +70 -43
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +141 -141
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +179 -165
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +78 -78
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +90 -90
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +39 -25
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +117 -74
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +131 -134
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +43 -11
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +51 -14
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +46 -10
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +62 -25
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +44 -17
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +44 -14
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +45 -13
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +46 -14
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +48 -8
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +44 -12
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
- moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
- moai_adk/templates/.moai/config.json +9 -6
- moai_adk/templates/.moai/memory/development-guide.md +220 -221
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
- moai_adk/templates/.moai/memory/spec-metadata.md +149 -150
- moai_adk/templates/.moai/project/product.md +90 -90
- moai_adk/templates/.moai/project/structure.md +85 -85
- moai_adk/templates/.moai/project/tech.md +117 -117
- moai_adk/templates/CLAUDE.md +350 -722
- moai_adk-0.4.1.dist-info/METADATA +303 -0
- moai_adk-0.4.1.dist-info/RECORD +152 -0
- moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -31
- moai_adk/templates/.claude/commands/alfred/2-build.md +0 -30
- moai_adk/templates/.claude/skills/scripts/standardize_skills.py +0 -166
- moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +0 -43
- moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
- moai_adk-0.4.0.dist-info/METADATA +0 -1816
- moai_adk-0.4.0.dist-info/RECORD +0 -145
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
"_comment": "MoAI-ADK Full Settings Template - Complete Production Configuration",
|
|
3
3
|
"_usage": "Complete Claude Code settings for MoAI-ADK workflows with hooks and Python-specific permissions",
|
|
4
4
|
"_docs": "https://docs.claude.com/en/docs/claude-code/settings",
|
|
5
|
-
"_moai_workflow": "/alfred:0-project → /alfred:1-
|
|
6
|
-
|
|
5
|
+
"_moai_workflow": "/alfred:0-project → /alfred:1-plan → /alfred:2-run → /alfred:3-sync",
|
|
7
6
|
"permissions": {
|
|
8
7
|
"allow": [
|
|
9
8
|
"Read(**)",
|
|
@@ -72,13 +71,12 @@
|
|
|
72
71
|
"Edit(**/*.secret)"
|
|
73
72
|
]
|
|
74
73
|
},
|
|
75
|
-
|
|
76
74
|
"hooks": {
|
|
77
75
|
"SessionStart": {
|
|
78
76
|
"command": "bash",
|
|
79
77
|
"args": [
|
|
80
78
|
"-c",
|
|
81
|
-
"echo '▶◀ MoAI-ADK Session Started' && echo '' && echo '📊 Git Status:' && git status --short && echo '' && echo '🌿 Branch: '$(git branch --show-current) && echo '' && echo '📋 Recent SPECs:' && ls -1 .moai/specs/ 2>/dev/null | head -3 || echo 'No SPECs yet' && echo '' && echo '💡 Quick Commands:' && echo ' /alfred:1-
|
|
79
|
+
"echo '▶◀ MoAI-ADK Session Started' && echo '' && echo '📊 Git Status:' && git status --short && echo '' && echo '🌿 Branch: '$(git branch --show-current) && echo '' && echo '📋 Recent SPECs:' && ls -1 .moai/specs/ 2>/dev/null | head -3 || echo 'No SPECs yet' && echo '' && echo '💡 Quick Commands:' && echo ' /alfred:1-plan \"feature name\" - SPEC authoring' && echo ' /alfred:2-run SPEC-ID - TDD implementation' && echo ' /alfred:3-sync - documentation sync'"
|
|
82
80
|
]
|
|
83
81
|
},
|
|
84
82
|
"PreToolUse": {
|
|
@@ -89,33 +87,67 @@
|
|
|
89
87
|
]
|
|
90
88
|
}
|
|
91
89
|
},
|
|
92
|
-
|
|
93
90
|
"_moai_adk_integration": {
|
|
94
91
|
"workflow_permissions": {
|
|
95
92
|
"alfred_0_project": {
|
|
96
|
-
"needs": [
|
|
93
|
+
"needs": [
|
|
94
|
+
"Write(.moai/project/**)",
|
|
95
|
+
"Bash(mkdir:.moai/**)",
|
|
96
|
+
"Read(**)",
|
|
97
|
+
"Grep(**)",
|
|
98
|
+
"Glob(**)"
|
|
99
|
+
],
|
|
97
100
|
"rationale": "Project initialization requires writing metadata files"
|
|
98
101
|
},
|
|
99
102
|
"alfred_1_spec": {
|
|
100
|
-
"needs": [
|
|
103
|
+
"needs": [
|
|
104
|
+
"Write(.moai/specs/**)",
|
|
105
|
+
"Bash(git:branch:**)",
|
|
106
|
+
"Bash(gh:pr:create:**)",
|
|
107
|
+
"Read(.moai/project/**)"
|
|
108
|
+
],
|
|
101
109
|
"rationale": "SPEC creation, feature branch, Draft PR"
|
|
102
110
|
},
|
|
103
111
|
"alfred_2_build": {
|
|
104
|
-
"needs": [
|
|
112
|
+
"needs": [
|
|
113
|
+
"Write(tests/**)",
|
|
114
|
+
"Write(src/**)",
|
|
115
|
+
"Edit(**)",
|
|
116
|
+
"Bash(pytest:**)",
|
|
117
|
+
"Bash(mypy:**)",
|
|
118
|
+
"Bash(git:commit:**)"
|
|
119
|
+
],
|
|
105
120
|
"rationale": "TDD implementation with RED → GREEN → REFACTOR commits"
|
|
106
121
|
},
|
|
107
122
|
"alfred_3_sync": {
|
|
108
|
-
"needs": [
|
|
123
|
+
"needs": [
|
|
124
|
+
"Write(docs/**)",
|
|
125
|
+
"Edit(**)",
|
|
126
|
+
"Bash(rg:**)",
|
|
127
|
+
"Bash(gh:pr:**)",
|
|
128
|
+
"Grep(**)",
|
|
129
|
+
"Glob(**)"
|
|
130
|
+
],
|
|
109
131
|
"rationale": "Living Document sync, TAG validation, PR Ready transition"
|
|
110
132
|
}
|
|
111
133
|
},
|
|
112
134
|
"tag_system_permissions": {
|
|
113
|
-
"tag_scanning": [
|
|
114
|
-
|
|
115
|
-
|
|
135
|
+
"tag_scanning": [
|
|
136
|
+
"Grep(**)",
|
|
137
|
+
"Bash(rg:@(SPEC|TEST|CODE|DOC):**)"
|
|
138
|
+
],
|
|
139
|
+
"tag_validation": [
|
|
140
|
+
"Read(.moai/specs/**)",
|
|
141
|
+
"Read(tests/**)",
|
|
142
|
+
"Read(src/**)",
|
|
143
|
+
"Read(docs/**)"
|
|
144
|
+
],
|
|
145
|
+
"tag_reporting": [
|
|
146
|
+
"Write(.moai/reports/**)",
|
|
147
|
+
"Write(docs/**)"
|
|
148
|
+
]
|
|
116
149
|
}
|
|
117
150
|
},
|
|
118
|
-
|
|
119
151
|
"_python_moai_adk_patterns": {
|
|
120
152
|
"testing": {
|
|
121
153
|
"allow": [
|
|
@@ -125,14 +157,14 @@
|
|
|
125
157
|
"Bash(coverage:report)**",
|
|
126
158
|
"Bash(coverage:html)**"
|
|
127
159
|
],
|
|
128
|
-
"rationale": "TRUST
|
|
160
|
+
"rationale": "TRUST Principle - Test First (85% coverage goal)"
|
|
129
161
|
},
|
|
130
162
|
"type_checking": {
|
|
131
163
|
"allow": [
|
|
132
164
|
"Bash(mypy:**)",
|
|
133
165
|
"Bash(mypy:--strict:**)"
|
|
134
166
|
],
|
|
135
|
-
"rationale": "TRUST
|
|
167
|
+
"rationale": "TRUST Principle - Unified (Type Safety)"
|
|
136
168
|
},
|
|
137
169
|
"linting": {
|
|
138
170
|
"allow": [
|
|
@@ -140,7 +172,7 @@
|
|
|
140
172
|
"Bash(ruff:format:**)",
|
|
141
173
|
"Bash(black:**)"
|
|
142
174
|
],
|
|
143
|
-
"rationale": "TRUST
|
|
175
|
+
"rationale": "TRUST Principle - Readable (Code Quality)"
|
|
144
176
|
},
|
|
145
177
|
"package_management": {
|
|
146
178
|
"allow": [
|
|
@@ -154,10 +186,9 @@
|
|
|
154
186
|
"Bash(uv:build)**",
|
|
155
187
|
"Bash(uv:publish)**"
|
|
156
188
|
],
|
|
157
|
-
"rationale": "
|
|
189
|
+
"rationale": "Read operations are allowed, dependency changes require confirmation"
|
|
158
190
|
}
|
|
159
191
|
},
|
|
160
|
-
|
|
161
192
|
"_git_workflow_moai": {
|
|
162
193
|
"safe_read_operations": {
|
|
163
194
|
"allow": [
|
|
@@ -167,7 +198,7 @@
|
|
|
167
198
|
"Bash(git:show:**)",
|
|
168
199
|
"Bash(git:branch:**)"
|
|
169
200
|
],
|
|
170
|
-
"description": "Repository
|
|
201
|
+
"description": "Repository read-only - always allowed"
|
|
171
202
|
},
|
|
172
203
|
"tdd_commit_pattern": {
|
|
173
204
|
"ask": [
|
|
@@ -175,12 +206,12 @@
|
|
|
175
206
|
"Bash(git:commit:**)"
|
|
176
207
|
],
|
|
177
208
|
"example_messages": [
|
|
178
|
-
"🔴 RED: SPEC-AUTH-001 JWT
|
|
179
|
-
"🟢 GREEN: SPEC-AUTH-001 JWT
|
|
180
|
-
"♻️ REFACTOR: SPEC-AUTH-001
|
|
181
|
-
"📝 DOCS: SPEC-AUTH-001
|
|
209
|
+
"🔴 RED: Writing a SPEC-AUTH-001 JWT authentication test",
|
|
210
|
+
"🟢 GREEN: SPEC-AUTH-001 JWT authentication implementation",
|
|
211
|
+
"♻️ REFACTOR: Improve SPEC-AUTH-001 code quality",
|
|
212
|
+
"📝 DOCS: SPEC-AUTH-001 document synchronization"
|
|
182
213
|
],
|
|
183
|
-
"description": "TDD
|
|
214
|
+
"description": "TDD phased commit - requires user confirmation"
|
|
184
215
|
},
|
|
185
216
|
"branch_and_pr": {
|
|
186
217
|
"ask": [
|
|
@@ -190,13 +221,13 @@
|
|
|
190
221
|
"Bash(gh:pr:merge:**)"
|
|
191
222
|
],
|
|
192
223
|
"workflow": [
|
|
193
|
-
"1. feature/SPEC-{ID}
|
|
194
|
-
"2. Draft PR
|
|
195
|
-
"3.
|
|
196
|
-
"4. PR Ready
|
|
197
|
-
"5. PR
|
|
224
|
+
"1. Create feature/SPEC-{ID} branch (git checkout -b)",
|
|
225
|
+
"2. Create Draft PR (gh pr create --draft)",
|
|
226
|
+
"3. Implement and commit TDD",
|
|
227
|
+
"4. Mark PR Ready (gh pr ready)",
|
|
228
|
+
"5. PR merge (gh pr merge --squash)"
|
|
198
229
|
],
|
|
199
|
-
"description": "Git
|
|
230
|
+
"description": "Working with Git branches/PRs - always check"
|
|
200
231
|
},
|
|
201
232
|
"dangerous_operations": {
|
|
202
233
|
"deny": [
|
|
@@ -204,10 +235,9 @@
|
|
|
204
235
|
"Bash(git:reset:--hard)**",
|
|
205
236
|
"Bash(git:clean:-fd)**"
|
|
206
237
|
],
|
|
207
|
-
"description": "
|
|
238
|
+
"description": "Risk of Data Loss - Absolutely Blocked"
|
|
208
239
|
}
|
|
209
240
|
},
|
|
210
|
-
|
|
211
241
|
"_security_hardening": {
|
|
212
242
|
"secrets_protection": {
|
|
213
243
|
"deny": [
|
|
@@ -220,7 +250,7 @@
|
|
|
220
250
|
"Bash(cat:.env)",
|
|
221
251
|
"Bash(cat:**/*.secret)"
|
|
222
252
|
],
|
|
223
|
-
"description": "
|
|
253
|
+
"description": "Block access to confidential information files"
|
|
224
254
|
},
|
|
225
255
|
"system_protection": {
|
|
226
256
|
"deny": [
|
|
@@ -230,7 +260,7 @@
|
|
|
230
260
|
"Bash(dd:**)",
|
|
231
261
|
"Bash(mkfs:**)"
|
|
232
262
|
],
|
|
233
|
-
"description": "
|
|
263
|
+
"description": "System level command blocking"
|
|
234
264
|
},
|
|
235
265
|
"data_loss_prevention": {
|
|
236
266
|
"deny": [
|
|
@@ -238,40 +268,38 @@
|
|
|
238
268
|
"Bash(git:reset:--hard)**",
|
|
239
269
|
"Bash(git:clean:-fd)**"
|
|
240
270
|
],
|
|
241
|
-
"description": "
|
|
271
|
+
"description": "Block commands at risk of data loss"
|
|
242
272
|
}
|
|
243
273
|
},
|
|
244
|
-
|
|
245
274
|
"_hook_implementation_details": {
|
|
246
275
|
"SessionStart": {
|
|
247
|
-
"purpose": "
|
|
276
|
+
"purpose": "Provide project context when starting a MoAI-ADK session",
|
|
248
277
|
"output_sections": [
|
|
249
|
-
"▶◀ MoAI-ADK Session Started -
|
|
250
|
-
"📊 Git Status -
|
|
251
|
-
"🌿 Branch -
|
|
252
|
-
"📋 Recent SPECs -
|
|
253
|
-
"💡 Quick Commands -
|
|
278
|
+
"▶◀ MoAI-ADK Session Started - Shows session start",
|
|
279
|
+
"📊 Git Status - list of changed files (git status --short)",
|
|
280
|
+
"🌿 Branch - Current working branch",
|
|
281
|
+
"📋 Recent SPECs - 3 recently created SPECs",
|
|
282
|
+
"💡 Quick Commands - Frequently used Alfred commands"
|
|
254
283
|
],
|
|
255
|
-
"execution_time": "~200ms (
|
|
256
|
-
"error_handling": "SPEC
|
|
257
|
-
"customization": "
|
|
284
|
+
"execution_time": "~200ms (fast execution)",
|
|
285
|
+
"error_handling": "If there is no SPEC directory, 'No SPECs yet' is displayed.",
|
|
286
|
+
"customization": "Project-specific information can be added (product.md summary, etc.)"
|
|
258
287
|
},
|
|
259
288
|
"PreToolUse": {
|
|
260
|
-
"purpose": "
|
|
289
|
+
"purpose": "Preemptively block risky operations (data loss, security risks)",
|
|
261
290
|
"stdin_format": "JSON: {tool: string, parameters: object}",
|
|
262
291
|
"stdout_format": "JSON: {blocked: boolean, message: string}",
|
|
263
292
|
"blocked_patterns": [
|
|
264
|
-
"rm -rf -
|
|
265
|
-
"git push --force -
|
|
266
|
-
"sudo -
|
|
267
|
-
".env
|
|
293
|
+
"rm -rf - risk of data loss",
|
|
294
|
+
"git push --force - risk of history corruption",
|
|
295
|
+
"sudo - security risk",
|
|
296
|
+
"Accessing .env files - exposing confidential information"
|
|
268
297
|
],
|
|
269
|
-
"implementation": "Python3 inline script (
|
|
270
|
-
"performance": "~50ms (JSON
|
|
271
|
-
"extensibility": "
|
|
298
|
+
"implementation": "Python3 inline script (no external dependencies)",
|
|
299
|
+
"performance": "~50ms (JSON parsing + pattern matching)",
|
|
300
|
+
"extensibility": "Easy to add new blocking patterns"
|
|
272
301
|
}
|
|
273
302
|
},
|
|
274
|
-
|
|
275
303
|
"_testing_and_validation": {
|
|
276
304
|
"permission_tests": {
|
|
277
305
|
"test_allow": [
|
|
@@ -308,7 +336,6 @@
|
|
|
308
336
|
"permission_check": "grep -E '^\\s*(allow|ask|deny):' .claude/settings.json"
|
|
309
337
|
}
|
|
310
338
|
},
|
|
311
|
-
|
|
312
339
|
"_troubleshooting": {
|
|
313
340
|
"hooks_not_running": {
|
|
314
341
|
"symptom": "SessionStart output not visible, PreToolUse not blocking",
|
|
@@ -366,7 +393,6 @@
|
|
|
366
393
|
]
|
|
367
394
|
}
|
|
368
395
|
},
|
|
369
|
-
|
|
370
396
|
"_best_practices": {
|
|
371
397
|
"permission_design": {
|
|
372
398
|
"principles": [
|
|
@@ -424,18 +450,24 @@
|
|
|
424
450
|
]
|
|
425
451
|
}
|
|
426
452
|
},
|
|
427
|
-
|
|
428
453
|
"_moai_adk_specific": {
|
|
429
454
|
"spec_protection": {
|
|
430
|
-
"description": "SPEC
|
|
455
|
+
"description": "SPEC files are important requirements documents - prevent accidental deletion",
|
|
431
456
|
"permissions": {
|
|
432
|
-
"allow": [
|
|
433
|
-
|
|
434
|
-
|
|
457
|
+
"allow": [
|
|
458
|
+
"Read(.moai/specs/**)"
|
|
459
|
+
],
|
|
460
|
+
"ask": [
|
|
461
|
+
"Write(.moai/specs/**)",
|
|
462
|
+
"Edit(.moai/specs/**)"
|
|
463
|
+
],
|
|
464
|
+
"deny": [
|
|
465
|
+
"Bash(rm:.moai/specs/**)"
|
|
466
|
+
]
|
|
435
467
|
}
|
|
436
468
|
},
|
|
437
469
|
"tag_system": {
|
|
438
|
-
"description": "@TAG
|
|
470
|
+
"description": "@TAG Maintain traceability – allow code scanning",
|
|
439
471
|
"permissions": {
|
|
440
472
|
"allow": [
|
|
441
473
|
"Bash(rg:@(SPEC|TEST|CODE|DOC):**)",
|
|
@@ -448,28 +480,42 @@
|
|
|
448
480
|
},
|
|
449
481
|
"trust_principles": {
|
|
450
482
|
"Test_First": {
|
|
451
|
-
"allow": [
|
|
483
|
+
"allow": [
|
|
484
|
+
"Bash(pytest:**)",
|
|
485
|
+
"Bash(coverage:**)"
|
|
486
|
+
],
|
|
452
487
|
"goal": "85% test coverage"
|
|
453
488
|
},
|
|
454
489
|
"Readable": {
|
|
455
|
-
"allow": [
|
|
490
|
+
"allow": [
|
|
491
|
+
"Bash(ruff:**)",
|
|
492
|
+
"Bash(black:**)",
|
|
493
|
+
"Bash(mypy:**)"
|
|
494
|
+
],
|
|
456
495
|
"goal": "Clean, typed code"
|
|
457
496
|
},
|
|
458
497
|
"Unified": {
|
|
459
|
-
"allow": [
|
|
498
|
+
"allow": [
|
|
499
|
+
"Bash(mypy:--strict:**)"
|
|
500
|
+
],
|
|
460
501
|
"goal": "Type safety"
|
|
461
502
|
},
|
|
462
503
|
"Secured": {
|
|
463
|
-
"deny": [
|
|
504
|
+
"deny": [
|
|
505
|
+
"Write(.env)",
|
|
506
|
+
"Bash(cat:.env)"
|
|
507
|
+
],
|
|
464
508
|
"goal": "Secrets protection"
|
|
465
509
|
},
|
|
466
510
|
"Trackable": {
|
|
467
|
-
"allow": [
|
|
511
|
+
"allow": [
|
|
512
|
+
"Bash(rg:@TAG:**)",
|
|
513
|
+
"Grep(@TAG:**)"
|
|
514
|
+
],
|
|
468
515
|
"goal": "Complete traceability"
|
|
469
516
|
}
|
|
470
517
|
}
|
|
471
518
|
},
|
|
472
|
-
|
|
473
519
|
"_performance_considerations": {
|
|
474
520
|
"startup_time": {
|
|
475
521
|
"baseline": "Hooks add ~200-500ms to startup",
|
|
@@ -485,7 +531,6 @@
|
|
|
485
531
|
"optimization": "Use Python (faster than Bash for complex logic)"
|
|
486
532
|
}
|
|
487
533
|
},
|
|
488
|
-
|
|
489
534
|
"_validation_checklist": [
|
|
490
535
|
"✅ Valid JSON syntax (python -m json.tool)",
|
|
491
536
|
"✅ All dangerous operations in 'deny'",
|
|
@@ -503,7 +548,6 @@
|
|
|
503
548
|
"✅ TRUST principles enforced",
|
|
504
549
|
"✅ Team collaboration considered"
|
|
505
550
|
],
|
|
506
|
-
|
|
507
551
|
"_real_world_usage": {
|
|
508
552
|
"team_setup": [
|
|
509
553
|
"1. Commit this settings.json to repository",
|
|
@@ -520,12 +564,11 @@
|
|
|
520
564
|
],
|
|
521
565
|
"ci_cd_integration": [
|
|
522
566
|
"1. CI環境では hooks を無効化 (hooks: null)",
|
|
523
|
-
"2. Permissions
|
|
524
|
-
"3.
|
|
567
|
+
"2. Permissions are more restrictive (deny more operations)",
|
|
568
|
+
"3. Manage secrets with environment variables",
|
|
525
569
|
"4. Test before deploy"
|
|
526
570
|
]
|
|
527
571
|
},
|
|
528
|
-
|
|
529
572
|
"_template_metadata": {
|
|
530
573
|
"template_level": "full",
|
|
531
574
|
"best_for": "MoAI-ADK production workflows, Python projects, team collaboration",
|
|
@@ -549,4 +592,4 @@
|
|
|
549
592
|
"support_level": "Full MoAI-ADK integration support",
|
|
550
593
|
"documentation": "Complete with examples, tests, troubleshooting"
|
|
551
594
|
}
|
|
552
|
-
}
|
|
595
|
+
}
|