@zenuml/core 3.47.9 → 3.48.1

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 (205) hide show
  1. package/dist/cli/zenuml.mjs +13529 -0
  2. package/dist/cli/zenuml.mjs.map +1 -0
  3. package/dist/cloud-icons-eHuugVSv.js.map +1 -0
  4. package/dist/zenuml.esm.mjs +2153 -2156
  5. package/dist/zenuml.esm.mjs.map +1 -0
  6. package/dist/zenuml.js +82 -82
  7. package/dist/zenuml.js.map +1 -0
  8. package/package.json +18 -5
  9. package/.agents/skills/babysit-pr/SKILL.md +0 -223
  10. package/.agents/skills/babysit-pr/agents/openai.yaml +0 -7
  11. package/.agents/skills/dia-scoring/SKILL.md +0 -139
  12. package/.agents/skills/dia-scoring/agents/openai.yaml +0 -7
  13. package/.agents/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  14. package/.agents/skills/land-pr/SKILL.md +0 -120
  15. package/.agents/skills/propagate-core-release/SKILL.md +0 -205
  16. package/.agents/skills/propagate-core-release/agents/openai.yaml +0 -7
  17. package/.agents/skills/propagate-core-release/references/downstreams.md +0 -42
  18. package/.agents/skills/ship-branch/SKILL.md +0 -105
  19. package/.agents/skills/submit-branch/SKILL.md +0 -76
  20. package/.agents/skills/validate-branch/SKILL.md +0 -72
  21. package/.claude/commands/README.md +0 -162
  22. package/.claude/commands/analyze.md +0 -101
  23. package/.claude/commands/clarify.md +0 -158
  24. package/.claude/commands/code-review.md +0 -322
  25. package/.claude/commands/constitution.md +0 -73
  26. package/.claude/commands/create-docs.md +0 -309
  27. package/.claude/commands/full-context.md +0 -121
  28. package/.claude/commands/gemini-consult.md +0 -164
  29. package/.claude/commands/handoff.md +0 -146
  30. package/.claude/commands/implement.md +0 -56
  31. package/.claude/commands/plan.md +0 -43
  32. package/.claude/commands/refactor.md +0 -188
  33. package/.claude/commands/specify.md +0 -21
  34. package/.claude/commands/tasks.md +0 -62
  35. package/.claude/commands/update-docs.md +0 -314
  36. package/.claude/hooks/README.md +0 -270
  37. package/.claude/hooks/config/sensitive-patterns.json +0 -86
  38. package/.claude/hooks/gemini-context-injector.sh +0 -129
  39. package/.claude/hooks/mcp-security-scan.sh +0 -147
  40. package/.claude/hooks/notify.sh +0 -103
  41. package/.claude/hooks/setup/hook-setup.md +0 -96
  42. package/.claude/hooks/setup/settings.json.template +0 -63
  43. package/.claude/hooks/sounds/complete.wav +0 -0
  44. package/.claude/hooks/sounds/input-needed.wav +0 -0
  45. package/.claude/hooks/subagent-context-injector.sh +0 -65
  46. package/.claude/skills/babysit-pr/SKILL.md +0 -223
  47. package/.claude/skills/babysit-pr/agents/openai.yaml +0 -7
  48. package/.claude/skills/dia-scoring/SKILL.md +0 -139
  49. package/.claude/skills/dia-scoring/agents/openai.yaml +0 -7
  50. package/.claude/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  51. package/.claude/skills/emoji-eval/SKILL.md +0 -187
  52. package/.claude/skills/land-pr/SKILL.md +0 -120
  53. package/.claude/skills/propagate-core-release/SKILL.md +0 -205
  54. package/.claude/skills/propagate-core-release/agents/openai.yaml +0 -7
  55. package/.claude/skills/propagate-core-release/references/downstreams.md +0 -42
  56. package/.claude/skills/ship-branch/SKILL.md +0 -105
  57. package/.claude/skills/submit-branch/SKILL.md +0 -76
  58. package/.claude/skills/validate-branch/SKILL.md +0 -72
  59. package/.claude/skills/zenuml-ux-research/SKILL.md +0 -183
  60. package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +0 -261
  61. package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +0 -56
  62. package/.claude/skills/zenuml-ux-research/references/report-template.md +0 -89
  63. package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +0 -37
  64. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +0 -36
  65. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +0 -31
  66. package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +0 -33
  67. package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +0 -35
  68. package/.devcontainer/devcontainer.json +0 -21
  69. package/.dockerignore +0 -19
  70. package/.eslintrc.js +0 -39
  71. package/.git-blame-ignore-revs +0 -6
  72. package/.kiro/hooks/README.md +0 -38
  73. package/.kiro/hooks/session-sound-notification.js +0 -44
  74. package/.kiro/hooks/session-sound-notification.json +0 -23
  75. package/.mcp.json.example +0 -17
  76. package/.nvmrc +0 -1
  77. package/.prettierignore +0 -4
  78. package/.prettierrc +0 -1
  79. package/.specify/memory/constitution.md +0 -33
  80. package/.specify/scripts/bash/check-prerequisites.sh +0 -166
  81. package/.specify/scripts/bash/common.sh +0 -113
  82. package/.specify/scripts/bash/create-new-feature.sh +0 -97
  83. package/.specify/scripts/bash/setup-plan.sh +0 -60
  84. package/.specify/scripts/bash/update-agent-context.sh +0 -728
  85. package/.specify/templates/agent-file-template.md +0 -23
  86. package/.specify/templates/plan-template.md +0 -219
  87. package/.specify/templates/spec-template.md +0 -116
  88. package/.specify/templates/tasks-template.md +0 -127
  89. package/.storybook/main.ts +0 -25
  90. package/.storybook/preview.ts +0 -29
  91. package/.watchmanconfig +0 -3
  92. package/AGENTS.md +0 -26
  93. package/CLAUDE.md +0 -124
  94. package/DEPLOYMENT.md +0 -62
  95. package/Dockerfile +0 -36
  96. package/IMPLEMENTATION_PLAN.md +0 -163
  97. package/Integration/vanilla-js/index.html +0 -42
  98. package/MCP-ASSISTANT-RULES.md +0 -85
  99. package/README_CN.md +0 -15
  100. package/TUTORIAL.md +0 -116
  101. package/antlr/antlr-4.11.1-complete.jar +0 -0
  102. package/bun.lock +0 -1544
  103. package/bunfig.toml +0 -52
  104. package/docs/UNICODE_SUPPORT.md +0 -179
  105. package/docs/ai-context/deployment-infrastructure.md +0 -21
  106. package/docs/ai-context/docs-overview.md +0 -89
  107. package/docs/ai-context/handoff.md +0 -174
  108. package/docs/ai-context/project-structure.md +0 -160
  109. package/docs/ai-context/system-integration.md +0 -21
  110. package/docs/asciidoc/contributor.adoc +0 -54
  111. package/docs/asciidoc/create-my-own-theme.adoc +0 -149
  112. package/docs/asciidoc/images/creation-component.png +0 -0
  113. package/docs/asciidoc/images/creation-rtl.png +0 -0
  114. package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
  115. package/docs/asciidoc/images/occurrence.png +0 -0
  116. package/docs/asciidoc/images/return-message-conflict.png +0 -0
  117. package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
  118. package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
  119. package/docs/asciidoc/images/vertical-alignment.svg +0 -1
  120. package/docs/asciidoc/images/vertically-aligning.png +0 -0
  121. package/docs/asciidoc/index.adoc +0 -277
  122. package/docs/asciidoc/theme-debug-web-app.png +0 -0
  123. package/docs/asciidoc/tutorial.adoc +0 -22
  124. package/docs/asciidoc/user-css.png +0 -0
  125. package/docs/async-vs-sync-parser-rules.md +0 -81
  126. package/docs/divider-parser-allow-spaces.md +0 -38
  127. package/docs/highlighting-messages.md +0 -52
  128. package/docs/images/editor-sample.png +0 -0
  129. package/docs/inherited-vs-provided-from.md +0 -64
  130. package/docs/parser/Assignment.md +0 -8
  131. package/docs/parser/PARSER_IMPROVEMENTS_CC.md +0 -425
  132. package/docs/parser/grammar_review_gemini.md +0 -116
  133. package/docs/participants-function.md +0 -25
  134. package/docs/responsive-participant-margin.md +0 -52
  135. package/docs/starter.md +0 -9
  136. package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +0 -698
  137. package/docs/superpowers/plans/2026-03-30-emoji-support.md +0 -1220
  138. package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +0 -206
  139. package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +0 -1992
  140. package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +0 -1452
  141. package/docs/ux-research/.gitkeep +0 -0
  142. package/docs/ux-research/2026-04-15-rename-participant.md +0 -156
  143. package/docs/ux-research/2026-04-18-insert-participant.md +0 -151
  144. package/docs/width-translate-and-offsets.md +0 -62
  145. package/docs/xss.md +0 -59
  146. package/e2e/data/compare-cases.js +0 -1090
  147. package/e2e/data/diff-algorithm.js +0 -199
  148. package/e2e/fixtures/create-message.html +0 -26
  149. package/e2e/fixtures/editable-label.html +0 -35
  150. package/e2e/fixtures/editable-span.html +0 -122
  151. package/e2e/fixtures/empty-diagram.html +0 -23
  152. package/e2e/fixtures/fixture.html +0 -31
  153. package/e2e/fixtures/insert-participant.html +0 -23
  154. package/e2e/fixtures/reorder-cross-fragment.html +0 -31
  155. package/e2e/fixtures/reorder-fragment.html +0 -29
  156. package/e2e/fixtures/reorder-message.html +0 -27
  157. package/e2e/fixtures/svg-test.html +0 -21
  158. package/e2e/fixtures/type-switch.html +0 -29
  159. package/e2e/tools/canonical-history.html +0 -908
  160. package/e2e/tools/compare-case.html +0 -371
  161. package/e2e/tools/compare.html +0 -35
  162. package/e2e/tools/native-diff-ext/background.js +0 -60
  163. package/e2e/tools/native-diff-ext/bridge.js +0 -26
  164. package/e2e/tools/native-diff-ext/content.js +0 -194
  165. package/e2e/tools/svg-preview.html +0 -56
  166. package/embed.html +0 -193
  167. package/eslint.config.mjs +0 -35
  168. package/firebase-debug.log +0 -108
  169. package/iframe-container-demo/diagram.html +0 -124
  170. package/iframe-container-demo/host.html +0 -817
  171. package/index.html +0 -771
  172. package/mermaid-zenuml-async-spa-auth.png +0 -0
  173. package/mermaid-zenuml-async-spa-auth.snapshot.md +0 -96
  174. package/newsletter/unicode-support-announcement.md +0 -134
  175. package/playground/creation.html +0 -53
  176. package/playground/message.html +0 -63
  177. package/playwright.config.ts +0 -40
  178. package/renderer.html +0 -366
  179. package/scripts/analyze-compare-case/collect-data.mjs +0 -1134
  180. package/scripts/analyze-compare-case/config.mjs +0 -102
  181. package/scripts/analyze-compare-case/geometry.mjs +0 -101
  182. package/scripts/analyze-compare-case/native-diff.mjs +0 -224
  183. package/scripts/analyze-compare-case/output.mjs +0 -74
  184. package/scripts/analyze-compare-case/panel-diff.mjs +0 -114
  185. package/scripts/analyze-compare-case/report.mjs +0 -162
  186. package/scripts/analyze-compare-case/residual-scopes.mjs +0 -347
  187. package/scripts/analyze-compare-case/scoring.mjs +0 -829
  188. package/scripts/analyze-compare-case.mjs +0 -149
  189. package/scripts/bump-version.js +0 -117
  190. package/scripts/snapshot-dual.js +0 -173
  191. package/scripts/update-snapshots.js +0 -70
  192. package/skills/dia-scoring/SKILL.md +0 -129
  193. package/skills/dia-scoring/agents/openai.yaml +0 -7
  194. package/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  195. package/tailwind.config.js +0 -126
  196. package/test-compression.html +0 -274
  197. package/test-mermaid-zenuml.html +0 -57
  198. package/test-setup.ts +0 -124
  199. package/test-url-params.html +0 -192
  200. package/tsconfig.app.json +0 -31
  201. package/tsconfig.node.json +0 -24
  202. package/tsconfig.test.json +0 -9
  203. package/vite.config.lib.ts +0 -93
  204. package/vite.config.ts +0 -84
  205. package/wrangler.toml +0 -18
@@ -1,322 +0,0 @@
1
- # /code-review
2
-
3
- *Performs focused multi-agent code review that surfaces only critical, high-impact findings for solo developers using AI tools.*
4
-
5
- ## Core Philosophy
6
-
7
- This command prioritizes **needle-moving discoveries** over exhaustive lists. Every finding must demonstrate significant impact on:
8
- - System reliability & stability
9
- - Security vulnerabilities with real exploitation risk
10
- - Performance bottlenecks affecting user experience
11
- - Architectural decisions blocking future scalability
12
- - Critical technical debt threatening maintainability
13
-
14
- ### 🚨 Critical Findings Only
15
- Issues that could cause production failures, security breaches, or severe user impact within 48 hours.
16
-
17
- ### 🔥 High-Value Improvements
18
- Changes that unlock new capabilities, remove significant constraints, or improve metrics by >25%.
19
-
20
- ### ❌ Excluded from Reports
21
- Minor style issues, micro-optimizations (<10%), theoretical best practices, edge cases affecting <1% of users.
22
-
23
-
24
- ## Auto-Loaded Project Context:
25
- @/CLAUDE.md
26
- @/docs/ai-context/project-structure.md
27
- @/docs/ai-context/docs-overview.md
28
-
29
-
30
- ## Command Execution
31
-
32
- User provided context: "$ARGUMENTS"
33
-
34
- ### Step 1: Understand User Intent & Gather Context
35
-
36
- #### Parse the Request
37
- Analyze the natural language input to determine:
38
- 1. **What to review**: Parse file paths, component names, feature descriptions, or commit references
39
- 2. **Review focus**: Identify any specific concerns mentioned (security, performance, etc.)
40
- 3. **Scope inference**: Intelligently determine the breadth of review needed
41
-
42
- Examples of intent parsing:
43
- - "the authentication flow" → Find all files related to auth across the codebase
44
- - "voice pipeline implementation" → Locate voice processing components
45
- - "recent changes" → Parse git history for relevant commits
46
- - "the API routes" → Identify all API endpoint files
47
-
48
- #### Read Relevant Documentation
49
- Before allocating agents, **read the documentation** to understand:
50
- 1. Use `/docs/ai-context/docs-overview.md` to identify relevant docs
51
- 2. Read documentation related to the code being reviewed:
52
- - Architecture docs for subsystem understanding
53
- - API documentation for integration points
54
- - Security guidelines for sensitive areas
55
- - Performance considerations for critical paths
56
- 3. Build a mental model of risks, constraints, and priorities
57
-
58
- This context ensures intelligent agent allocation based on actual project knowledge.
59
-
60
- ### Step 2: Define Mandatory Coverage Areas
61
-
62
- Every code review MUST analyze these core areas, with depth determined by scope:
63
-
64
- #### 🎯 Mandatory Coverage Areas:
65
-
66
- 1. **Critical Path Analysis**
67
- - User-facing functionality that could break
68
- - Data integrity and state management
69
- - Error handling and recovery mechanisms
70
-
71
- 2. **Security Surface**
72
- - Input validation and sanitization
73
- - Authentication/authorization flows
74
- - Data exposure and API security
75
-
76
- 3. **Performance Impact**
77
- - Real-time processing bottlenecks
78
- - Resource consumption (memory, CPU)
79
- - Scalability constraints
80
-
81
- 4. **Integration Points**
82
- - API contracts and boundaries
83
- - Service dependencies
84
- - External system interactions
85
-
86
- #### 📊 Dynamic Agent Allocation:
87
-
88
- Based on review scope, allocate agents proportionally:
89
-
90
- **Small to medium Scope (small set of files or small feature)**
91
- - 2-3 agents covering mandatory areas
92
- - Each agent handles 1-2 coverage areas
93
- - Focus on highest-risk aspects
94
-
95
- **Large Scope (many files, major feature or subsystem)**
96
- - 4-6 agents with specialized focus
97
- - Each mandatory area gets dedicated coverage
98
- - Additional agents for cross-cutting concerns
99
-
100
- ### Step 3: Dynamic Agent Generation
101
-
102
- Based on scope analysis and mandatory coverage areas, dynamically create specialized agents:
103
-
104
- #### Agent Generation Strategy:
105
-
106
- **With your documentation knowledge from Step 1, think deeply** about optimal agent allocation:
107
- - Leverage your understanding of the project architecture and risks
108
- - Consider the specific documentation you read about this subsystem
109
- - Apply insights about critical paths and security considerations
110
- - Use documented boundaries and integration points to partition work
111
- - Factor in any performance or scalability concerns from the docs
112
-
113
- Use your understanding of the project to intuitively determine:
114
- 1. **How many agents are needed** - Let the code's complexity and criticality guide you
115
- 2. **How to partition the work** - Follow natural architectural boundaries
116
- 3. **Which specializations matter most** - Focus agents where risk is highest
117
-
118
- **Generate Specialized Agents**
119
-
120
- For each allocated agent, create a focused role:
121
-
122
- **Example for 6-agent allocation:**
123
- - Agent 1: Critical_Path_Validator (user flows + error handling)
124
- - Agent 2: Security_Scanner (input validation + auth)
125
- - Agent 3: API_Security_Auditor (data exposure + boundaries)
126
- - Agent 4: Performance_Profiler (bottlenecks + resource usage)
127
- - Agent 5: Scalability_Analyst (constraints + growth paths)
128
- - Agent 6: Integration_Verifier (dependencies + contracts)
129
-
130
- **Example for 3-agent allocation:**
131
- - Agent 1: Security_Performance_Analyst (security + performance areas)
132
- - Agent 2: Critical_Path_Guardian (functionality + integrations)
133
- - Agent 3: Risk_Quality_Assessor (technical debt + code quality)
134
-
135
- #### Dynamic Focus Areas:
136
-
137
- Each agent receives specialized instructions based on:
138
- - **File characteristics**: API endpoints → security focus
139
- - **Code patterns**: Loops/algorithms → performance focus
140
- - **Dependencies**: External services → integration focus
141
- - **User touchpoints**: UI/voice → critical path focus
142
-
143
- ### Step 4: Execute Dynamic Multi-Agent Review
144
-
145
- **Before launching agents, pause and think deeply:**
146
- - What are the real risks in this code?
147
- - Which areas could cause the most damage if they fail?
148
- - Where would a solo developer need the most help?
149
-
150
- Generate and launch agents based on your thoughtful analysis:
151
-
152
- ```
153
- For each dynamically generated agent:
154
- Task: "As [Agent_Role], analyze [assigned_coverage_areas] in [target_scope].
155
-
156
- MANDATORY COVERAGE CHECKLIST:
157
- ☐ Critical Path: [assigned aspects]
158
- ☐ Security: [assigned aspects]
159
- ☐ Performance: [assigned aspects]
160
- ☐ Integration: [assigned aspects]
161
-
162
- HIGH-IMPACT REVIEW MANDATE:
163
- Focus ONLY on findings that significantly move the needle for a solo developer.
164
-
165
- Review workflow:
166
- 1. Review auto-loaded project context (CLAUDE.md, project-structure.md, docs-overview.md)
167
- 2. Analyze your assigned coverage areas with deep focus
168
- 3. For complex issues, use:
169
- - mcp__gemini__consult_gemini for architectural analysis
170
- - mcp__context7__get-library-docs for framework best practices
171
- 4. Cross-reference with other coverage areas for systemic issues
172
- 5. Document ONLY high-impact findings:
173
-
174
- ## [Coverage_Area] Analysis by [Agent_Role]
175
-
176
- ### 🚨 Critical Issues (Production Risk)
177
- - Issue: [description]
178
- - Location: [file:line_number]
179
- - Impact: [quantified - downtime hours, users affected, data at risk]
180
- - Fix: [specific code snippet]
181
- - Consequence if ignored: [what happens in 48 hours]
182
-
183
- ### 🎯 Strategic Improvements (Capability Unlocks)
184
- - Limitation: [what's currently blocked]
185
- - Solution: [architectural change or implementation]
186
- - Unlocks: [new capability or scale]
187
- - ROI: [effort hours vs benefit quantified]
188
-
189
- ### ⚡ Quick Wins (Optional)
190
- - Only include if <2 hours for >20% improvement
191
- - Must show measurable impact
192
-
193
- REMEMBER: Every finding must pass the 'so what?' test for a solo developer."
194
- ```
195
-
196
- #### Parallel Execution Strategy:
197
-
198
- **Launch all agents simultaneously** for maximum efficiency
199
-
200
-
201
- ### Step 5: Synthesize Findings with Maximum Analysis Power
202
-
203
- After all sub-agents complete their analysis:
204
-
205
- **ultrathink**
206
-
207
- Activate maximum cognitive capabilities to:
208
-
209
- 1. **Filter for Impact**
210
- - Discard all low-priority findings
211
- - Quantify real-world impact of each issue
212
- - Focus on production risks and capability unlocks
213
-
214
- 2. **Deep Pattern Analysis**
215
- - Identify systemic issues vs isolated problems
216
- - Find root causes across agent reports
217
- - Detect subtle security vulnerabilities
218
-
219
- 3. **Strategic Prioritization**
220
- - Calculate ROI for each improvement
221
- - Consider solo developer constraints
222
- - Create actionable fix sequence
223
- ```markdown
224
- # Code Review Summary
225
-
226
- **Reviewed**: [scope description]
227
- **Date**: [current date]
228
- **Overall Quality Score**: [A-F grade with justification]
229
-
230
- ## Key Metrics
231
- - Security Risk Level: [Critical/High/Medium/Low]
232
- - Performance Impact: [description]
233
- - Technical Debt: [assessment]
234
- - Test Coverage: [if applicable]
235
- ```
236
-
237
- ### Step 6: Present Comprehensive Review
238
-
239
- Structure the final output as:
240
-
241
- ```markdown
242
- # 🔍 Code Review Report
243
-
244
- ## Executive Summary
245
- [High-level findings and overall assessment]
246
-
247
- ## 🚨 Production Risks (Fix Within 48 Hours)
248
- [Only issues that could cause downtime, data loss, or security breaches]
249
-
250
- ## 🎯 Strategic Improvements (High ROI)
251
- [Only changes that unlock capabilities or improve metrics >25%]
252
-
253
- ## ⚡ Quick Wins (Optional)
254
- [Only if <2 hours effort for significant improvement]
255
-
256
- ## Detailed Analysis
257
-
258
- ### Security Assessment
259
- [Detailed security findings from Security_Auditor]
260
-
261
- ### Performance Analysis
262
- [Detailed performance findings from Performance_Analyzer]
263
-
264
- ### Architecture Review
265
- [Detailed architecture findings from Architecture_Validator]
266
-
267
- ### Code Quality Evaluation
268
- [Detailed quality findings from Quality_Inspector]
269
-
270
- [Additional sections based on sub-agents used]
271
-
272
- ## Action Plan
273
- 1. Critical fixes preventing production failures
274
- 2. High-ROI improvements unlocking capabilities
275
-
276
- ## Impact Matrix
277
- | Issue | User Impact | Effort | ROI |
278
- |-------|-------------|--------|-----|
279
- | [Only high-impact issues with quantified metrics] |
280
- ```
281
-
282
- ### Step 7: Interactive Follow-up
283
-
284
- After presenting the review, offer interactive follow-ups. For example:
285
- - "Would you like me to fix any of the critical issues?"
286
- - "Should I create a detailed refactoring plan for any component?"
287
- - "Do you want me to generate tests for uncovered code?"
288
- - "Should I create GitHub issues for tracking these improvements?"
289
-
290
- ## Implementation Notes
291
-
292
- 1. **Use parallel Task execution** for all sub-agents to minimize review time
293
- 2. **Include file:line_number references** for easy navigation
294
- 3. **Balance criticism with recognition** of good practices
295
- 4. **Provide actionable fixes**, not just problem identification
296
- 5. **Consider project phase** and priorities when recommending changes
297
- 6. **Use MCP servers** for specialized analysis when beneficial
298
- 7. **Keep security findings sensitive** - don't expose vulnerabilities publicly
299
-
300
- ## Error Handling
301
-
302
- ### Coverage Verification
303
-
304
- Before presenting results, verify complete coverage:
305
-
306
- ```
307
- ☑ Critical Path Analysis: [Covered by agents X, Y]
308
- ☑ Security Surface: [Covered by agents Y, Z]
309
- ☑ Performance Impact: [Covered by agents X, Z]
310
- ☑ Integration Points: [Covered by agents W, X]
311
- ```
312
-
313
- If any area lacks coverage, deploy additional focused agents.
314
-
315
- ## Error Handling
316
-
317
- If issues occur during review:
318
- - **Ambiguous input**: Use search tools to find relevant files before asking for clarification
319
- - **File not found**: Search for similar names or components across the codebase
320
- - **Large scope detected**: Dynamically scale agents based on calculated complexity
321
- - **No files found**: Provide helpful suggestions based on project structure
322
- - **Coverage gaps**: Deploy supplementary agents for missed areas
@@ -1,73 +0,0 @@
1
- ---
2
- description: Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
3
- ---
4
-
5
- The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
6
-
7
- User input:
8
-
9
- $ARGUMENTS
10
-
11
- You are updating the project constitution at `.specify/memory/constitution.md`. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. `[PROJECT_NAME]`, `[PRINCIPLE_1_NAME]`). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
12
-
13
- Follow this execution flow:
14
-
15
- 1. Load the existing constitution template at `.specify/memory/constitution.md`.
16
- - Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
17
- **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
18
-
19
- 2. Collect/derive values for placeholders:
20
- - If user input (conversation) supplies a value, use it.
21
- - Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
22
- - For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
23
- - `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
24
- * MAJOR: Backward incompatible governance/principle removals or redefinitions.
25
- * MINOR: New principle/section added or materially expanded guidance.
26
- * PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
27
- - If version bump type ambiguous, propose reasoning before finalizing.
28
-
29
- 3. Draft the updated constitution content:
30
- - Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
31
- - Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
32
- - Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
33
- - Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
34
-
35
- 4. Consistency propagation checklist (convert prior checklist into active validations):
36
- - Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
37
- - Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
38
- - Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
39
- - Read each command file in `.specify/templates/commands/*.md` (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
40
- - Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.
41
-
42
- 5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
43
- - Version change: old → new
44
- - List of modified principles (old title → new title if renamed)
45
- - Added sections
46
- - Removed sections
47
- - Templates requiring updates (✅ updated / ⚠ pending) with file paths
48
- - Follow-up TODOs if any placeholders intentionally deferred.
49
-
50
- 6. Validation before final output:
51
- - No remaining unexplained bracket tokens.
52
- - Version line matches report.
53
- - Dates ISO format YYYY-MM-DD.
54
- - Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
55
-
56
- 7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
57
-
58
- 8. Output a final summary to the user with:
59
- - New version and bump rationale.
60
- - Any files flagged for manual follow-up.
61
- - Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
62
-
63
- Formatting & Style Requirements:
64
- - Use Markdown headings exactly as in the template (do not demote/promote levels).
65
- - Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
66
- - Keep a single blank line between sections.
67
- - Avoid trailing whitespace.
68
-
69
- If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
70
-
71
- If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.
72
-
73
- Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.