mustard-claude 2.0.14 → 3.0.2

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 (231) hide show
  1. package/README.md +166 -491
  2. package/dist/cli.js +4 -11
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/init.d.ts +5 -2
  5. package/dist/commands/init.js +211 -337
  6. package/dist/commands/init.js.map +1 -1
  7. package/dist/commands/update.d.ts +4 -4
  8. package/dist/commands/update.js +65 -224
  9. package/dist/commands/update.js.map +1 -1
  10. package/package.json +1 -3
  11. package/templates/CLAUDE.md +22 -25
  12. package/templates/commands/mustard/approve/SKILL.md +58 -0
  13. package/templates/commands/mustard/bugfix/SKILL.md +56 -0
  14. package/templates/commands/mustard/complete/SKILL.md +66 -0
  15. package/templates/commands/mustard/feature/SKILL.md +132 -0
  16. package/templates/commands/mustard/git/SKILL.md +257 -0
  17. package/templates/commands/mustard/knowledge/SKILL.md +112 -0
  18. package/templates/commands/mustard/maint/SKILL.md +70 -0
  19. package/templates/commands/mustard/resume/SKILL.md +124 -0
  20. package/templates/commands/mustard/scan/SKILL.md +352 -0
  21. package/templates/commands/mustard/scan-format/SKILL.md +261 -0
  22. package/templates/commands/mustard/skill/SKILL.md +151 -0
  23. package/templates/commands/mustard/{status.md → status/SKILL.md} +29 -27
  24. package/templates/commands/mustard/task/SKILL.md +203 -0
  25. package/templates/commands/mustard/templates/agent-prompt/SKILL.md +112 -0
  26. package/templates/hooks/__tests__/hooks.test.js +241 -0
  27. package/templates/hooks/auto-format.js +124 -0
  28. package/templates/hooks/bash-safety.js +60 -0
  29. package/templates/hooks/enforce-registry.js +110 -110
  30. package/templates/hooks/file-guard.js +61 -0
  31. package/templates/hooks/guard-verify.js +147 -0
  32. package/templates/hooks/pre-compact.js +119 -0
  33. package/templates/hooks/session-cleanup.js +159 -0
  34. package/templates/hooks/subagent-tracker.js +219 -0
  35. package/templates/pipeline-config.md +68 -0
  36. package/templates/scripts/statusline.js +346 -63
  37. package/templates/scripts/sync-detect.js +776 -46
  38. package/templates/scripts/sync-registry.js +25 -314
  39. package/templates/settings.json +134 -9
  40. package/templates/skills/commit-workflow/SKILL.md +39 -0
  41. package/templates/skills/design-craft/SKILL.md +197 -0
  42. package/templates/skills/design-craft/references/critique.md +67 -0
  43. package/templates/skills/design-craft/references/example.md +86 -0
  44. package/templates/skills/design-craft/references/palettes-catalog.md +85 -0
  45. package/templates/skills/design-craft/references/principles.md +235 -0
  46. package/templates/skills/design-craft/references/styles-catalog.md +93 -0
  47. package/templates/skills/design-craft/references/typography-catalog.md +70 -0
  48. package/templates/skills/design-craft/references/ux-guidelines.md +79 -0
  49. package/templates/skills/design-craft/references/validation.md +48 -0
  50. package/templates/skills/pipeline-execution/SKILL.md +131 -0
  51. package/templates/skills/react-best-practices/SKILL.md +44 -0
  52. package/templates/skills/react-best-practices/references/rules/_sections.md +46 -0
  53. package/templates/skills/react-best-practices/references/rules/_template.md +28 -0
  54. package/templates/skills/react-best-practices/references/rules/advanced-event-handler-refs.md +38 -0
  55. package/templates/skills/react-best-practices/references/rules/advanced-use-latest.md +49 -0
  56. package/templates/skills/react-best-practices/references/rules/async-api-routes.md +38 -0
  57. package/templates/skills/react-best-practices/references/rules/async-defer-await.md +80 -0
  58. package/templates/skills/react-best-practices/references/rules/async-dependencies.md +36 -0
  59. package/templates/skills/react-best-practices/references/rules/async-parallel.md +28 -0
  60. package/templates/skills/react-best-practices/references/rules/async-suspense-boundaries.md +66 -0
  61. package/templates/skills/react-best-practices/references/rules/bundle-barrel-imports.md +59 -0
  62. package/templates/skills/react-best-practices/references/rules/bundle-conditional.md +31 -0
  63. package/templates/skills/react-best-practices/references/rules/bundle-defer-third-party.md +49 -0
  64. package/templates/skills/react-best-practices/references/rules/bundle-dynamic-imports.md +35 -0
  65. package/templates/skills/react-best-practices/references/rules/bundle-preload.md +50 -0
  66. package/templates/skills/react-best-practices/references/rules/client-event-listeners.md +74 -0
  67. package/templates/skills/react-best-practices/references/rules/client-swr-dedup.md +56 -0
  68. package/templates/skills/react-best-practices/references/rules/js-batch-dom-css.md +82 -0
  69. package/templates/skills/react-best-practices/references/rules/js-cache-function-results.md +80 -0
  70. package/templates/skills/react-best-practices/references/rules/js-cache-property-access.md +28 -0
  71. package/templates/skills/react-best-practices/references/rules/js-cache-storage.md +68 -0
  72. package/templates/skills/react-best-practices/references/rules/js-combine-iterations.md +32 -0
  73. package/templates/skills/react-best-practices/references/rules/js-early-exit.md +50 -0
  74. package/templates/skills/react-best-practices/references/rules/js-hoist-regexp.md +43 -0
  75. package/templates/skills/react-best-practices/references/rules/js-index-maps.md +37 -0
  76. package/templates/skills/react-best-practices/references/rules/js-length-check-first.md +49 -0
  77. package/templates/skills/react-best-practices/references/rules/js-min-max-loop.md +82 -0
  78. package/templates/skills/react-best-practices/references/rules/js-set-map-lookups.md +24 -0
  79. package/templates/skills/react-best-practices/references/rules/js-tosorted-immutable.md +57 -0
  80. package/templates/skills/react-best-practices/references/rules/rendering-activity.md +26 -0
  81. package/templates/skills/react-best-practices/references/rules/rendering-animate-svg-wrapper.md +47 -0
  82. package/templates/skills/react-best-practices/references/rules/rendering-conditional-render.md +40 -0
  83. package/templates/skills/react-best-practices/references/rules/rendering-content-visibility.md +38 -0
  84. package/templates/skills/react-best-practices/references/rules/rendering-hoist-jsx.md +44 -0
  85. package/templates/skills/react-best-practices/references/rules/rendering-hydration-no-flicker.md +82 -0
  86. package/templates/skills/react-best-practices/references/rules/rendering-svg-precision.md +28 -0
  87. package/templates/skills/react-best-practices/references/rules/rerender-defer-reads.md +39 -0
  88. package/templates/skills/react-best-practices/references/rules/rerender-dependencies.md +45 -0
  89. package/templates/skills/react-best-practices/references/rules/rerender-derived-state.md +29 -0
  90. package/templates/skills/react-best-practices/references/rules/rerender-lazy-state-init.md +58 -0
  91. package/templates/skills/react-best-practices/references/rules/rerender-memo.md +42 -0
  92. package/templates/skills/react-best-practices/references/rules/rerender-transitions.md +40 -0
  93. package/templates/skills/react-best-practices/references/rules/server-cache-lru.md +37 -0
  94. package/templates/skills/react-best-practices/references/rules/server-cache-react.md +26 -0
  95. package/templates/skills/react-best-practices/references/rules/server-parallel-fetching.md +79 -0
  96. package/templates/skills/react-best-practices/references/rules/server-serialization.md +38 -0
  97. package/templates/skills/senior-architect/SKILL.md +209 -0
  98. package/templates/skills/senior-architect/references/architecture_patterns.md +103 -0
  99. package/templates/skills/senior-architect/references/system_design_workflows.md +103 -0
  100. package/templates/skills/senior-architect/references/tech_decision_guide.md +103 -0
  101. package/templates/skills/senior-architect/scripts/architecture_diagram_generator.py +114 -0
  102. package/templates/skills/senior-architect/scripts/dependency_analyzer.py +114 -0
  103. package/templates/skills/senior-architect/scripts/project_architect.py +114 -0
  104. package/templates/skills/skill-creator/LICENSE.txt +202 -0
  105. package/templates/skills/skill-creator/SKILL.md +485 -0
  106. package/templates/skills/skill-creator/agents/analyzer.md +274 -0
  107. package/templates/skills/skill-creator/agents/comparator.md +202 -0
  108. package/templates/skills/skill-creator/agents/grader.md +223 -0
  109. package/templates/skills/skill-creator/assets/eval_review.html +146 -0
  110. package/templates/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  111. package/templates/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  112. package/templates/skills/skill-creator/references/schemas.md +430 -0
  113. package/templates/skills/skill-creator/scripts/__init__.py +0 -0
  114. package/templates/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  115. package/templates/skills/skill-creator/scripts/generate_report.py +326 -0
  116. package/templates/skills/skill-creator/scripts/improve_description.py +247 -0
  117. package/templates/skills/skill-creator/scripts/package_skill.py +136 -0
  118. package/templates/skills/skill-creator/scripts/quick_validate.py +103 -0
  119. package/templates/skills/skill-creator/scripts/run_eval.py +310 -0
  120. package/templates/skills/skill-creator/scripts/run_loop.py +328 -0
  121. package/templates/skills/skill-creator/scripts/utils.py +47 -0
  122. package/dist/analyzers/llm.d.ts +0 -9
  123. package/dist/analyzers/llm.js +0 -116
  124. package/dist/analyzers/llm.js.map +0 -1
  125. package/dist/analyzers/semantic.d.ts +0 -13
  126. package/dist/analyzers/semantic.js +0 -215
  127. package/dist/analyzers/semantic.js.map +0 -1
  128. package/dist/commands/sync.d.ts +0 -5
  129. package/dist/commands/sync.js +0 -354
  130. package/dist/commands/sync.js.map +0 -1
  131. package/dist/generators/claude-md-llm.d.ts +0 -5
  132. package/dist/generators/claude-md-llm.js +0 -101
  133. package/dist/generators/claude-md-llm.js.map +0 -1
  134. package/dist/generators/claude-md-template.d.ts +0 -5
  135. package/dist/generators/claude-md-template.js +0 -257
  136. package/dist/generators/claude-md-template.js.map +0 -1
  137. package/dist/generators/commands.d.ts +0 -12
  138. package/dist/generators/commands.js +0 -840
  139. package/dist/generators/commands.js.map +0 -1
  140. package/dist/generators/context.d.ts +0 -16
  141. package/dist/generators/context.js +0 -15
  142. package/dist/generators/context.js.map +0 -1
  143. package/dist/generators/hooks.d.ts +0 -5
  144. package/dist/generators/hooks.js +0 -393
  145. package/dist/generators/hooks.js.map +0 -1
  146. package/dist/generators/index.d.ts +0 -11
  147. package/dist/generators/index.js +0 -673
  148. package/dist/generators/index.js.map +0 -1
  149. package/dist/generators/prompts.d.ts +0 -13
  150. package/dist/generators/prompts.js +0 -276
  151. package/dist/generators/prompts.js.map +0 -1
  152. package/dist/generators/registry.d.ts +0 -8
  153. package/dist/generators/registry.js +0 -50
  154. package/dist/generators/registry.js.map +0 -1
  155. package/dist/scanners/dependencies.d.ts +0 -7
  156. package/dist/scanners/dependencies.js +0 -195
  157. package/dist/scanners/dependencies.js.map +0 -1
  158. package/dist/scanners/index.d.ts +0 -6
  159. package/dist/scanners/index.js +0 -37
  160. package/dist/scanners/index.js.map +0 -1
  161. package/dist/scanners/samples.d.ts +0 -8
  162. package/dist/scanners/samples.js +0 -193
  163. package/dist/scanners/samples.js.map +0 -1
  164. package/dist/scanners/stack.d.ts +0 -5
  165. package/dist/scanners/stack.js +0 -294
  166. package/dist/scanners/stack.js.map +0 -1
  167. package/dist/scanners/structure.d.ts +0 -5
  168. package/dist/scanners/structure.js +0 -274
  169. package/dist/scanners/structure.js.map +0 -1
  170. package/dist/services/grepai.d.ts +0 -25
  171. package/dist/services/grepai.js +0 -89
  172. package/dist/services/grepai.js.map +0 -1
  173. package/dist/services/ollama.d.ts +0 -22
  174. package/dist/services/ollama.js +0 -86
  175. package/dist/services/ollama.js.map +0 -1
  176. package/dist/services/package-manager.d.ts +0 -95
  177. package/dist/services/package-manager.js +0 -164
  178. package/dist/services/package-manager.js.map +0 -1
  179. package/dist/types.d.ts +0 -239
  180. package/dist/types.js +0 -5
  181. package/dist/types.js.map +0 -1
  182. package/templates/commands/backend-logs.md +0 -53
  183. package/templates/commands/backend-restart.md +0 -40
  184. package/templates/commands/backend-run.md +0 -64
  185. package/templates/commands/backend-stop.md +0 -34
  186. package/templates/commands/mustard/approve.md +0 -34
  187. package/templates/commands/mustard/bugfix.md +0 -17
  188. package/templates/commands/mustard/commit-push.md +0 -19
  189. package/templates/commands/mustard/commit.md +0 -28
  190. package/templates/commands/mustard/complete.md +0 -29
  191. package/templates/commands/mustard/feature.md +0 -14
  192. package/templates/commands/mustard/install-deps.md +0 -18
  193. package/templates/commands/mustard/merge-main.md +0 -22
  194. package/templates/commands/mustard/report-daily.md +0 -55
  195. package/templates/commands/mustard/report-weekly.md +0 -65
  196. package/templates/commands/mustard/resume.md +0 -28
  197. package/templates/commands/mustard/scan.md +0 -22
  198. package/templates/commands/mustard/sync-context.md +0 -67
  199. package/templates/commands/mustard/sync-registry.md +0 -21
  200. package/templates/commands/mustard/task-analyze.md +0 -55
  201. package/templates/commands/mustard/task-docs.md +0 -55
  202. package/templates/commands/mustard/task-refactor.md +0 -64
  203. package/templates/commands/mustard/task-review.md +0 -56
  204. package/templates/commands/mustard/validate.md +0 -20
  205. package/templates/context/README.md +0 -31
  206. package/templates/context/backend/README.md +0 -20
  207. package/templates/context/backend/backend.core.md +0 -107
  208. package/templates/context/bugfix/README.md +0 -20
  209. package/templates/context/bugfix/bugfix.core.md +0 -149
  210. package/templates/context/database/README.md +0 -20
  211. package/templates/context/database/database.core.md +0 -113
  212. package/templates/context/frontend/README.md +0 -20
  213. package/templates/context/frontend/frontend.core.md +0 -112
  214. package/templates/context/orchestrator/README.md +0 -20
  215. package/templates/context/orchestrator/orchestrator.core.md +0 -300
  216. package/templates/context/review/README.md +0 -20
  217. package/templates/context/review/review.core.md +0 -139
  218. package/templates/core/enforcement.md +0 -35
  219. package/templates/core/pipeline.md +0 -39
  220. package/templates/hooks/enforce-context.js +0 -145
  221. package/templates/hooks/enforce-grepai.js +0 -66
  222. package/templates/hooks/enforce-pipeline.js +0 -61
  223. package/templates/prompts/_index.md +0 -28
  224. package/templates/prompts/backend.md +0 -10
  225. package/templates/prompts/bugfix.md +0 -10
  226. package/templates/prompts/database.md +0 -10
  227. package/templates/prompts/frontend.md +0 -10
  228. package/templates/prompts/orchestrator.md +0 -14
  229. package/templates/prompts/review.md +0 -10
  230. package/templates/scripts/sync-compile.js +0 -268
  231. package/templates/skills/design-principles/SKILL.md +0 -237
package/README.md CHANGED
@@ -16,582 +16,257 @@
16
16
 
17
17
  <p align="center">
18
18
  <img src="https://img.shields.io/badge/Claude_Code-Ready-blueviolet?style=flat-square&logo=anthropic" alt="Claude Code">
19
- <img src="https://img.shields.io/badge/.NET-supported-512BD4?style=flat-square&logo=dotnet" alt=".NET">
20
- <img src="https://img.shields.io/badge/React-supported-61DAFB?style=flat-square&logo=react" alt="React">
21
- <img src="https://img.shields.io/badge/Python-supported-3776AB?style=flat-square&logo=python" alt="Python">
19
+ <img src="https://img.shields.io/badge/Monorepo-supported-green?style=flat-square" alt="Monorepo">
20
+ <img src="https://img.shields.io/badge/Single_Repo-supported-green?style=flat-square" alt="Single Repo">
22
21
  </p>
23
22
 
24
23
  ---
25
24
 
26
25
  ## What is Mustard?
27
26
 
28
- Mustard generates a `.claude/` folder with prompts, commands, and rules for Claude Code:
27
+ Mustard sets up a `.claude/` folder that turns Claude Code into a structured development pipeline:
29
28
 
30
- - **6 specialist prompts** with explicit identity and workflow (`.core.md` files)
31
- - **Modular context** - `README.md` + `{agent}.core.md` per agent
32
- - **Auto-sync scripts** - git-aware context compilation with SHA256 caching
33
- - **Pipeline commands** for features and bugfixes (namespaced: `/mustard:*`)
34
- - **Enforcement hooks** (grepai, pipeline, registry validation)
35
- - **Monorepo support** - auto-detection of subprojects
29
+ - **14 pipeline skills** feature, bugfix, scan, resume, approve, complete, git, maint, task, knowledge, skill, status, scan-format, agent-prompt template
30
+ - **8 enforcement hooks** — bash safety, file guard, registry validation, guard verification, auto-format, pre-compact, session cleanup, subagent tracking
31
+ - **6 bundled skills** — design-craft, react-best-practices, senior-architect, skill-creator, commit-workflow, pipeline-execution
32
+ - **3 sync scripts** subproject detection, entity registry sync, statusline
33
+ - **Monorepo + single repo** works with any project structure
36
34
 
37
- ## What's New in v3.0
35
+ ## How It Works
38
36
 
39
- ### Breaking Changes
37
+ 1. `mustard init` copies the `.claude/` structure into your project
38
+ 2. Inside Claude Code, run `/scan` to analyze your codebase
39
+ 3. `/scan` generates guards, recipes, patterns, agents, and skills specific to your project
40
+ 4. Use `/feature`, `/bugfix`, `/task` to work through structured pipelines
40
41
 
41
- - **Namespaced commands**: All commands now use `mustard:` prefix
42
- - `/feature` → `/mustard:feature`
43
- - `/bugfix` → `/mustard:bugfix`
44
- - `/commit` → `/mustard:commit`
45
- - etc.
46
-
47
- ### Removed Features
48
-
49
- - **Agent Teams** (`/feature-team`, `/bugfix-team`) - experimental feature discontinued
50
- - **Checkpoint** (`/checkpoint`) - replaced by Context Reset
51
- - **Compile Context** (`/compile-context`) - now automatic via hooks
52
-
53
- ### New Architecture
54
-
55
- - **Modular context**: `patterns.md` → `README.md` + `{agent}.core.md`
56
- - **Explicit agent identity**: Each specialist has defined responsibilities and return format
57
- - **Auto-sync scripts**: `sync-detect.js`, `sync-compile.js`, `sync-registry.js`
58
- - **Simplified templates**: 90% reduction in template size (externalized to compiled context)
59
- - **Hook modernization**: `UserPromptSubmit` → `PreToolUse` with `Skill` matcher
60
-
61
- ### New Features
62
-
63
- - **Backend operational commands**: `backend-run`, `backend-stop`, `backend-restart`, `backend-logs`
64
- - **Design Principles skill**: Jony Ive-level UI guidelines
65
- - **Entity Registry v3.1**: Includes `_patterns` and `_enums`
42
+ The CLI is a **one-time setup tool**. All intelligence lives in the skills and hooks inside `.claude/`.
66
43
 
67
44
  ## Installation
68
45
 
69
46
  ### Prerequisites
70
47
 
71
48
  - **Node.js** >= 18.0.0
72
- - **Package Manager**: npm, pnpm, yarn, or bun
73
-
74
- ### Install Mustard
75
49
 
76
- #### Option 1: Global Installation
50
+ ### Install
77
51
 
78
52
  ```bash
79
- # npm
53
+ # Global
80
54
  npm install -g mustard-claude
81
55
 
82
- # pnpm
83
- pnpm add -g mustard-claude
84
-
85
- # yarn
86
- yarn global add mustard-claude
87
-
88
- # bun
89
- bun add -g mustard-claude
90
- ```
91
-
92
- #### Option 2: Run Without Installing
93
-
94
- ```bash
95
- # npx (npm)
56
+ # Or run without installing
96
57
  npx mustard-claude init
97
-
98
- # pnpx (pnpm)
99
- pnpx mustard-claude init
100
-
101
- # yarn dlx
102
- yarn dlx mustard-claude init
103
-
104
- # bunx
105
- bunx mustard-claude init
106
- ```
107
-
108
- ---
109
-
110
- ## Optional Dependencies
111
-
112
- Mustard works without these tools, but they enhance functionality:
113
-
114
- | Tool | Purpose | Required |
115
- |------|---------|----------|
116
- | [Ollama](https://ollama.com) | LLM analysis + grepai embeddings | No |
117
- | [grepai](https://github.com/yoanbernabeu/grepai) | Semantic code search | No |
118
- | [Memory MCP](https://github.com/doobidoo/mcp-memory-service) | Pipeline persistence | No |
119
-
120
- ### 1. Ollama Installation
121
-
122
- Ollama provides local LLM capabilities. Required if you want:
123
-
124
- - Personalized CLAUDE.md generation (`mustard init --ollama`)
125
- - grepai semantic embeddings
126
-
127
- #### macOS
128
-
129
- Download and install from: [ollama.com/download/Ollama.dmg](https://ollama.com/download/Ollama.dmg)
130
-
131
- #### Windows
132
-
133
- Download and install from: [ollama.com/download/OllamaSetup.exe](https://ollama.com/download/OllamaSetup.exe)
134
-
135
- #### Linux
136
-
137
- ```bash
138
- curl -fsSL https://ollama.com/install.sh | sh
139
- ```
140
-
141
- #### Docker
142
-
143
- **CPU-only:**
144
-
145
- ```bash
146
- docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
147
- ```
148
-
149
- **With NVIDIA GPU:**
150
-
151
- ```bash
152
- # Install NVIDIA Container Toolkit first
153
- sudo apt-get install -y nvidia-container-toolkit
154
- sudo nvidia-ctk runtime configure --runtime=docker
155
- sudo systemctl restart docker
156
-
157
- # Run with GPU support
158
- docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
159
- ```
160
-
161
- **With AMD GPU:**
162
-
163
- ```bash
164
- docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm
165
- ```
166
-
167
- #### Pull Required Models
168
-
169
- ```bash
170
- # For Mustard LLM analysis
171
- ollama pull llama3.2
172
-
173
- # For grepai embeddings (required if using grepai)
174
- ollama pull nomic-embed-text
175
- ```
176
-
177
- #### Verify Ollama Installation
178
-
179
- ```bash
180
- ollama list
181
- # Should show downloaded models
182
- ```
183
-
184
- ---
185
-
186
- ### 2. grepai Installation
187
-
188
- grepai provides semantic code search. **Requires Ollama** for embeddings.
189
-
190
- #### macOS (Homebrew)
191
-
192
- ```bash
193
- brew install yoanbernabeu/tap/grepai
194
- ```
195
-
196
- #### Linux/macOS (Script)
197
-
198
- ```bash
199
- curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh
200
58
  ```
201
59
 
202
- #### Windows (PowerShell)
203
-
204
- ```powershell
205
- irm https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.ps1 | iex
206
- ```
207
-
208
- #### Setup grepai in Your Project
60
+ ### Initialize a Project
209
61
 
210
62
  ```bash
211
- cd your-project
212
-
213
- # Initialize (creates .grepai folder)
214
- grepai init
215
-
216
- # Start the indexing daemon (keeps index up-to-date)
217
- grepai watch
218
-
219
- # Test semantic search
220
- grepai search "authentication flow"
221
-
222
- # Trace function calls
223
- grepai trace callers "Login"
63
+ cd my-project
64
+ mustard init
224
65
  ```
225
66
 
226
- ---
227
-
228
- ### 3. Memory MCP Installation
229
-
230
- Memory MCP provides persistent memory for Claude across sessions.
231
-
232
- #### Install via pip
67
+ That's it. Open Claude Code and run `/scan`.
233
68
 
234
- ```bash
235
- pip install mcp-memory-service
236
- ```
69
+ ## CLI Commands
237
70
 
238
- #### Quick Setup (Claude Desktop)
239
-
240
- ```bash
241
- python -m mcp_memory_service.scripts.installation.install --quick
242
71
  ```
243
-
244
- #### Manual Configuration
245
-
246
- Add to Claude Desktop config:
247
-
248
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
249
- - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
250
- - **Linux:** `~/.config/Claude/claude_desktop_config.json`
251
-
252
- ```json
253
- {
254
- "mcpServers": {
255
- "memory": {
256
- "command": "memory",
257
- "args": ["server"]
258
- }
259
- }
260
- }
72
+ mustard init [options] Copy .claude/ structure into current project
73
+ mustard update [options] Update Mustard core files (preserves user customizations)
74
+ mustard auto-update Check npm for newer version and install
261
75
  ```
262
76
 
263
- Restart Claude Desktop after configuration.
77
+ ### `mustard init`
264
78
 
265
- ---
79
+ | Option | Description |
80
+ |--------|-------------|
81
+ | `-f, --force` | Overwrite existing `.claude/` without backup |
82
+ | `-y, --yes` | Skip confirmation prompts (merge mode: skip existing files) |
266
83
 
267
- ## Verify Installation
84
+ **Behavior:**
85
+ - If `.claude/` doesn't exist → copies all templates
86
+ - If `.claude/` exists → asks: backup & overwrite, merge (skip existing), or cancel
87
+ - Merge mode preserves all existing files and only adds new ones
268
88
 
269
- After installing dependencies, verify your setup:
89
+ ### `mustard update`
270
90
 
271
- ```bash
272
- # Check Node.js version
273
- node --version
274
-
275
- # Check Ollama (optional)
276
- ollama list
91
+ | Option | Description |
92
+ |--------|-------------|
93
+ | `-f, --force` | Skip backup and confirmation |
277
94
 
278
- # Check grepai (optional)
279
- grepai --version
280
-
281
- # Initialize Mustard
282
- cd your-project
283
- mustard init --ollama # Use --ollama flag to enable LLM analysis
284
- ```
95
+ **Recreates** (from latest templates):
96
+ - `commands/mustard/` — pipeline skills
97
+ - `hooks/` — enforcement hooks
98
+ - `skills/` — bundled skills
99
+ - `scripts/` — sync scripts
100
+ - `settings.json` hook configuration
285
101
 
286
- ## System Requirements
102
+ **Preserves** (user customizations):
103
+ - `CLAUDE.md` — orchestrator rules (populated by `/scan`)
104
+ - `pipeline-config.md` — agent dispatch config (populated by `/scan`)
105
+ - `entity-registry.json` — entity map (populated by sync-registry)
106
+ - `commands/*.md` — user commands outside `mustard/`
107
+ - `docs/`, `agent-memory/`, `spec/`, `plans/`
287
108
 
288
- | Component | Minimum | Recommended |
289
- |-----------|---------|-------------|
290
- | RAM | 8 GB | 16 GB |
291
- | Storage | 10 GB | 20 GB |
292
- | Node.js | 18.0.0 | 20+ |
109
+ ## What Gets Installed
293
110
 
294
- ### RAM for Ollama Models
295
-
296
- | Model Size | RAM Required |
297
- |------------|--------------|
298
- | 7B params | 8 GB |
299
- | 13B params | 16 GB |
300
- | 33B params | 32 GB |
301
-
302
- ---
303
-
304
- ## Quick Start
305
-
306
- ```bash
307
- cd my-project
308
- mustard init
309
111
  ```
310
-
311
- The CLI will:
312
-
313
- 1. Detect stacks (React, .NET, Python, etc.)
314
- 2. Analyze code with Ollama (optional)
315
- 3. Generate `.claude/` structure with modular context
316
-
317
- ## Context Architecture
318
-
319
- Each agent has **modular context** with explicit identity:
320
-
321
- ```text
322
- .claude/context/
323
- ├── shared/ # All agents load this
324
- ├── backend/
325
- │ ├── README.md # Extensibility guide
326
- └── backend.core.md # Identity + Responsibilities + Workflow
327
- ├── frontend/
328
- │ ├── README.md
329
- │ └── frontend.core.md
330
- ├── database/
331
- │ ├── README.md
332
- └── database.core.md
333
- ├── bugfix/
334
- │ ├── README.md
335
- └── bugfix.core.md
336
- ├── review/
337
- │ ├── README.md
338
- └── review.core.md
339
- └── orchestrator/
340
- ├── README.md
341
- └── orchestrator.core.md
342
- ```
343
-
344
- ### `.core.md` Structure
345
-
346
- Each specialist has explicit sections:
347
-
348
- | Section | Purpose |
349
- |---------|---------|
350
- | **Identity** | "You are the Backend Specialist" |
351
- | **Responsibilities** | What the agent implements/doesn't implement |
352
- | **Prerequisites** | Validations before accepting work |
353
- | **Checklist** | Step-by-step workflow |
354
- | **Return Format** | Standardized response format |
355
- | **Naming Conventions** | PascalCase, snake_case, kebab-case rules |
356
- | **Rules** | Explicit DO/DO NOT |
357
-
358
- ### How Context Works
359
-
360
- 1. User invokes `/mustard:feature` or `/mustard:bugfix`
361
- 2. `sync-detect.js` discovers subprojects (monorepo)
362
- 3. `sync-compile.js` compiles contexts with SHA256 caching
363
- 4. Agent receives compiled `{agent}.context.md`
364
- 5. Skip recompilation if content hash unchanged
365
-
366
- ## Commands
367
-
368
- ### CLI Commands
369
-
370
- ```bash
371
- mustard init [options]
372
-
373
- Options:
374
- -f, --force Overwrite existing .claude/
375
- -y, --yes Skip confirmations
376
- --no-ollama Skip LLM analysis
377
- --no-grepai Skip semantic analysis
378
- -v, --verbose Detailed output
112
+ .claude/
113
+ ├── CLAUDE.md # Orchestrator rules (template)
114
+ ├── pipeline-config.md # Agent dispatch config (template)
115
+ ├── settings.json # Hooks + permissions + statusline
116
+ ├── entity-registry.json # Empty skeleton (populated by /scan)
117
+ ├── commands/mustard/ # Pipeline skills
118
+ │ ├── feature/SKILL.md # /feature — feature pipeline
119
+ │ ├── bugfix/SKILL.md # /bugfix — bug fix pipeline
120
+ │ ├── approve/SKILL.md # /approve — approve spec
121
+ │ ├── complete/SKILL.md # /complete finalize pipeline
122
+ │ ├── resume/SKILL.md # /resume — resume pipeline
123
+ │ ├── scan/SKILL.md # /scan — analyze codebase
124
+ │ ├── scan-format/SKILL.md # /scan agent format rules
125
+ ├── git/SKILL.md # /git commit, push, merge, deploy
126
+ ├── maint/SKILL.md # /maint — deps, validate, sync
127
+ │ ├── task/SKILL.md # /task delegated analysis/review
128
+ ├── knowledge/SKILL.md # /knowledge notes, audit, reports
129
+ ├── skill/SKILL.md # /skill — manage skills
130
+ │ ├── status/SKILL.md # /status — project status
131
+ │ └── templates/agent-prompt/SKILL.md # Agent prompt template
132
+ ├── hooks/ # Enforcement hooks
133
+ │ ├── bash-safety.js # Blocks dangerous commands
134
+ ├── file-guard.js # Blocks sensitive file access
135
+ ├── enforce-registry.js # Blocks pipeline if no registry
136
+ │ ├── guard-verify.js # Validates architectural rules
137
+ ├── auto-format.js # Auto-formats on write
138
+ ├── pre-compact.js # Saves state before compaction
139
+ │ ├── session-cleanup.js # Cleans up on session end
140
+ ├── subagent-tracker.js # Tracks agent lifecycle
141
+ └── __tests__/hooks.test.js # Hook tests
142
+ ├── scripts/
143
+ │ ├── sync-detect.js # Detects subprojects + roles
144
+ │ ├── sync-registry.js # Generates entity-registry.json
145
+ │ └── statusline.js # Claude Code statusline
146
+ └── skills/ # Bundled skills
147
+ ├── design-craft/ # UI design methodology
148
+ ├── react-best-practices/ # React/Next.js optimization (40+ rules)
149
+ ├── senior-architect/ # System architecture patterns
150
+ ├── skill-creator/ # Create and optimize skills
151
+ ├── commit-workflow/ # Git commit strategy
152
+ └── pipeline-execution/ # Pipeline orchestration
379
153
  ```
380
154
 
381
- ```bash
382
- mustard update [options]
383
-
384
- Options:
385
- -f, --force Skip backup
386
- --include-claude-md Also update CLAUDE.md
387
- ```
155
+ ## Pipeline Commands (inside Claude Code)
388
156
 
389
- ### Pipeline Commands
157
+ ### Core Pipeline
390
158
 
391
159
  | Command | Description |
392
160
  |---------|-------------|
393
- | `/mustard:feature <name>` | Start feature pipeline |
394
- | `/mustard:bugfix <error>` | Start bugfix pipeline |
395
- | `/mustard:approve` | Approve spec |
396
- | `/mustard:complete` | Finalize pipeline |
397
- | `/mustard:resume` | Resume active pipeline |
161
+ | `/scan` | Analyze codebase generates guards, recipes, agents, skills |
162
+ | `/feature <name>` | Start feature pipeline (ANALYZE → PLAN → EXECUTE → CLOSE) |
163
+ | `/bugfix <error>` | Autonomous bug fix (diagnose → fix → validate) |
164
+ | `/approve` | Approve spec for implementation |
165
+ | `/resume` | Resume interrupted pipeline |
166
+ | `/complete` | Finalize or cancel pipeline |
398
167
 
399
- ### Task Commands (L0 Delegation)
168
+ ### Operations
400
169
 
401
170
  | Command | Description |
402
171
  |---------|-------------|
403
- | `/mustard:task-analyze` | Code analysis via Task(Explore) |
404
- | `/mustard:task-review` | Code review via Task(general-purpose) |
405
- | `/mustard:task-refactor` | Refactoring via Task(Plan) Task(general-purpose) |
406
- | `/mustard:task-docs` | Documentation via Task(general-purpose) |
172
+ | `/git <action>` | commit, push, merge, deploy (handles monorepo) |
173
+ | `/maint <action>` | deps, validate, sync |
174
+ | `/status` | Git + pipeline + build + registry status |
407
175
 
408
- ### Git Commands
176
+ ### Analysis & Delegation
409
177
 
410
178
  | Command | Description |
411
179
  |---------|-------------|
412
- | `/mustard:commit` | Simple commit |
413
- | `/mustard:commit-push` | Commit and push |
414
- | `/mustard:merge-main` | Merge to main |
180
+ | `/task analyze <scope>` | Code exploration (Explore agent) |
181
+ | `/task audit <domain> <scope>` | Quality audit (copy, design, a11y, i18n, api-contract) |
182
+ | `/task compare <criteria>` | Cross-subproject comparison |
183
+ | `/task review <scope>` | Code review (SOLID, security, perf) |
184
+ | `/task refactor <scope>` | Plan + approve + implement refactoring |
185
+ | `/task docs <scope>` | Documentation generation |
415
186
 
416
- ### Sync Commands
187
+ ### Knowledge
417
188
 
418
189
  | Command | Description |
419
190
  |---------|-------------|
420
- | `/mustard:sync-registry` | Update entity registry |
421
- | `/mustard:sync-context` | Compile agent contexts |
422
- | `/mustard:validate` | Build + type-check |
423
- | `/mustard:status` | Project status |
191
+ | `/knowledge notes [target]` | Manage project observations |
192
+ | `/knowledge audit` | Audit memory for duplicates |
193
+ | `/knowledge report daily/weekly` | Progress reports from git data |
424
194
 
425
- ## Structure
195
+ ### Skills
426
196
 
427
- ```text
428
- .claude/
429
- ├── CLAUDE.md # Minimal orchestrator rules
430
- ├── prompts/ # Stub prompts (reference .core.md)
431
- │ ├── orchestrator.md
432
- │ ├── backend.md
433
- │ ├── frontend.md
434
- │ ├── database.md
435
- │ ├── bugfix.md
436
- │ └── review.md
437
- ├── context/ # Modular context (editable)
438
- │ ├── shared/
439
- │ ├── backend/
440
- │ │ ├── README.md
441
- │ │ └── backend.core.md
442
- │ ├── frontend/
443
- │ ├── database/
444
- │ ├── bugfix/
445
- │ ├── review/
446
- │ └── orchestrator/
447
- ├── commands/mustard/ # Pipeline commands
448
- ├── scripts/ # Sync scripts
449
- │ ├── sync-detect.js
450
- │ ├── sync-compile.js
451
- │ └── sync-registry.js
452
- ├── core/ # Enforcement rules
453
- ├── hooks/ # JavaScript hooks
454
- └── entity-registry.json # Entity mappings v3.1
455
- ```
456
-
457
- ## Prompts (Agents)
458
-
459
- Claude Code only accepts 4 `subagent_type` values: `Explore`, `Plan`, `general-purpose`, `Bash`.
197
+ | Command | Description |
198
+ |---------|-------------|
199
+ | `/skill list` | List installed skills |
200
+ | `/skill install <source>` | Install from local path or GitHub |
201
+ | `/skill create <name>` | Create new skill via skill-creator |
202
+ | `/skill optimize <name>` | Optimize skill triggering |
460
203
 
461
- Mustard "agents" are prompts loaded into `Task(general-purpose)`:
204
+ ## How `/scan` Works
462
205
 
463
- | Prompt | Model | Context |
464
- |--------|-------|---------|
465
- | orchestrator | opus | orchestrator.core.md |
466
- | backend | opus | backend.core.md |
467
- | frontend | opus | frontend.core.md |
468
- | database | opus | database.core.md |
469
- | bugfix | opus | bugfix.core.md |
470
- | review | opus | review.core.md |
206
+ `/scan` is the most important command. It runs inside Claude Code and:
471
207
 
472
- ## Sync Scripts
208
+ 1. **Detects subprojects** — reads git submodules or scans for `CLAUDE.md` files
209
+ 2. **Incremental detection** — compares source hashes to skip unchanged subprojects
210
+ 3. **Launches analysis agents** — one per subproject, in parallel
211
+ 4. **Generates per-subproject**:
212
+ - `{subproject}/CLAUDE.md` — stack, commands, guards
213
+ - `{subproject}/.claude/commands/` — guards, recipes, patterns, modules
214
+ - `{subproject}/.claude/skills/` — granular pattern skills
215
+ - `.claude/agents/{subproject}-impl.md` — implementation agent
216
+ - `.claude/agents/{subproject}-explorer.md` — read-only explorer
217
+ 5. **Updates root files** — `CLAUDE.md`, `pipeline-config.md`, `entity-registry.json`
473
218
 
474
- ### sync-detect.js
219
+ After `/scan`, the pipeline commands (`/feature`, `/bugfix`) have full context to dispatch specialized agents.
475
220
 
476
- Auto-discovers subprojects in monorepos:
221
+ ## Pipeline Flow
477
222
 
478
- ```javascript
479
- // Detection patterns
480
- "backend": [/.NET/, /dotnet/, /FastEndpoints/]
481
- "frontend": [/React/, /Next\.js/, /Vue/]
482
- "database": [/Drizzle/, /Prisma/, /PostgreSQL/]
483
223
  ```
484
-
485
- ### sync-compile.js
486
-
487
- Compiles contexts with git-aware caching:
488
-
489
- 1. Copies subproject commands to `context/{agent}/cmd-{file}`
490
- 2. Concatenates `.md` files `{agent}.context.md`
491
- 3. Computes SHA256 hash
492
- 4. Skips if hash unchanged
493
-
494
- ### sync-registry.js
495
-
496
- Generates `entity-registry.json` v3.1:
497
-
498
- - Scans Drizzle schemas (`pgTable`, `pgEnum`)
499
- - Scans .NET entities (`DbSet`, `class T`)
500
- - Detects relationships and patterns
501
- - Outputs `_patterns`, `_enums`, entity refs/subs
502
-
503
- ## Enforcement Hooks
504
-
505
- | Hook | Matcher | Behavior |
506
- |------|---------|----------|
507
- | `enforce-registry.js` | `Skill` | **BLOCKS** if registry missing |
508
- | `enforce-context.js` | `Skill` | **WARNS** (advisory) |
509
- | `enforce-grepai.js` | `Grep/Glob` | **BLOCKS** search without path |
510
- | `enforce-pipeline.js` | `Edit/Write` | **REMINDS** about pipeline |
511
-
512
- ### Pre-Pipeline Validation
513
-
514
- ```text
515
- User: /mustard:feature add-login
516
-
517
-
518
- enforce-registry.js
519
- - Registry exists? (BLOCK if not)
520
- - Version >= 3.x? (BLOCK if not)
521
-
522
-
523
- enforce-context.js
524
- - Contexts compiled? (WARN if not)
525
-
526
-
527
- Pipeline starts...
224
+ /feature <name>
225
+
226
+
227
+ ANALYZE read registry + pipeline-config, determine layers
228
+
229
+
230
+ PLAN create spec with tasks per agent (Light: inline, Full: /approve)
231
+
232
+
233
+ EXECUTE — dispatch agents per wave (DB+Backend ∥, Frontend after)
234
+
235
+
236
+ REVIEW mandatory review per subproject (SOLID, patterns, i18n, ...)
237
+
238
+
239
+ CLOSE sync registry, move spec, cleanup state
528
240
  ```
529
241
 
530
- ## Migration from v2.x
531
-
532
- 1. **Update command invocations**:
533
- ```bash
534
- # Before
535
- /feature add-login
536
-
537
- # After
538
- /mustard:feature add-login
539
- ```
540
-
541
- 2. **Regenerate registry**:
542
- ```bash
543
- /mustard:sync-registry --force
544
- ```
242
+ **Light scope** (≤5 files, known pattern): ANALYZE → EXECUTE → CLOSE in one session.
243
+ **Full scope** (3+ layers, new entity): ANALYZE → PLAN → `/approve` → new session → `/resume` → CLOSE.
545
244
 
546
- 3. **Recompile contexts**:
547
- ```bash
548
- /mustard:sync-context
549
- ```
245
+ ## Supported Projects
550
246
 
551
- 4. **Note removed features**:
552
- - Agent Teams (`/feature-team`, `/bugfix-team`) - removed
553
- - Checkpoint (`/checkpoint`) - use Context Reset instead
247
+ Mustard is **framework-agnostic**. The CLI just copies templates. `/scan` handles detection:
554
248
 
555
- ## Supported Stacks
556
-
557
- | Language | Frameworks |
558
- |----------|------------|
559
- | TypeScript/JS | React, Next.js, Node, Express |
560
- | C# | .NET, ASP.NET Core, FastEndpoints |
561
- | Python | FastAPI, Django, Flask |
562
- | Java | Spring Boot |
563
- | Go | Gin, Echo |
564
- | Rust | Actix, Axum |
565
- | ORMs | Drizzle, Prisma, TypeORM |
566
-
567
- ## Optional Dependencies
568
-
569
- | Tool | Purpose |
249
+ | Type | Examples |
570
250
  |------|---------|
571
- | **Ollama** | LLM-generated CLAUDE.md |
572
- | **grepai** | Semantic code search |
573
- | **Memory MCP** | Pipeline persistence |
574
-
575
- Without these, the CLI uses default templates.
251
+ | **Backend** | .NET, Node.js (Express/Fastify), Python (FastAPI/Django), Go, Rust, Java |
252
+ | **Frontend** | React, Next.js, Vue, Nuxt, Svelte, Angular |
253
+ | **Mobile** | Flutter/Dart |
254
+ | **Database** | Drizzle, Prisma, EF Core, TypeORM |
255
+ | **Monorepo** | Any combination of the above |
256
+ | **Single repo** | Any single project |
576
257
 
577
258
  ## Development
578
259
 
579
260
  ```bash
261
+ git clone https://github.com/Competi/mustard.git
262
+ cd mustard
580
263
  npm install
581
264
  npm run build
582
- npm test
583
265
 
584
- # Run locally without installing
266
+ # Test locally
585
267
  node bin/mustard.js init
586
268
  ```
587
269
 
588
- ## Publishing
589
-
590
- ```bash
591
- npm version patch # or minor/major
592
- npm publish
593
- ```
594
-
595
270
  ## License
596
271
 
597
272
  MIT