aico-cli 2.0.28 → 2.0.30

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 (210) hide show
  1. package/bin/cli/LICENSE.md +1 -0
  2. package/bin/cli/cli.js +2920 -2457
  3. package/bin/cli/package.json +1 -1
  4. package/bin/cli/sdk-tools.d.ts +1216 -3
  5. package/dist/chunks/simple-config.mjs +527 -43
  6. package/dist/cli.mjs +126 -481
  7. package/dist/index.mjs +1 -0
  8. package/package.json +11 -3
  9. package/templates/agents/agent-capability-map.json +598 -0
  10. package/templates/agents/agent-selector.ts +991 -0
  11. package/templates/agents/auto-task-executor.ts +222 -0
  12. package/templates/agents/bonus/studio-coach.md +133 -0
  13. package/templates/agents/core/code-archaeologist.md +89 -0
  14. package/templates/agents/core/code-reviewer.md +88 -0
  15. package/templates/agents/core/documentation-specialist.md +100 -0
  16. package/templates/agents/core/performance-optimizer.md +67 -0
  17. package/templates/agents/databases/customer-support.md +34 -0
  18. package/templates/agents/databases/data-engineer.md +31 -0
  19. package/templates/agents/databases/data-scientist.md +28 -0
  20. package/templates/agents/databases/database-admin.md +31 -0
  21. package/templates/agents/databases/database-optimizer.md +31 -0
  22. package/templates/agents/deployment/debugger.md +29 -0
  23. package/templates/agents/deployment/deployment-engineer.md +31 -0
  24. package/templates/agents/deployment/devops-troubleshooter.md +31 -0
  25. package/templates/agents/deployment/dx-optimizer.md +62 -0
  26. package/templates/agents/deployment/error-detective.md +31 -0
  27. package/templates/agents/deployment/legacy-modernizer.md +31 -0
  28. package/templates/agents/deployment/network-engineer.md +31 -0
  29. package/templates/agents/deployment/payment-integration.md +31 -0
  30. package/templates/agents/deployment/performance-engineer.md +31 -0
  31. package/templates/agents/deployment/prompt-engineer.md +58 -0
  32. package/templates/agents/deployment/quant-analyst.md +31 -0
  33. package/templates/agents/deployment/refactor-agent.md +77 -0
  34. package/templates/agents/deployment/risk-manager.md +40 -0
  35. package/templates/agents/deployment/sales-automator.md +34 -0
  36. package/templates/agents/deployment/search-specialist.md +96 -0
  37. package/templates/agents/deployment/security-auditor.md +31 -0
  38. package/templates/agents/design/brand-guardian.md +278 -0
  39. package/templates/agents/design/frontend-analyst.md +42 -0
  40. package/templates/agents/design/ui-designer.md +157 -0
  41. package/templates/agents/design/ui-ux-master.md +568 -0
  42. package/templates/agents/design/ux-researcher.md +210 -0
  43. package/templates/agents/design/visual-storyteller.md +271 -0
  44. package/templates/agents/design/whimsy-injector.md +148 -0
  45. package/templates/agents/engineering/backend/ai-engineer.md +118 -0
  46. package/templates/agents/engineering/backend/backend-architect.md +95 -0
  47. package/templates/agents/engineering/backend/senior-backend-architect.md +554 -0
  48. package/templates/agents/engineering/frontend/frontend-developer.md +105 -0
  49. package/templates/agents/engineering/frontend/mobile-app-builder.md +108 -0
  50. package/templates/agents/engineering/frontend/rapid-prototyper.md +114 -0
  51. package/templates/agents/engineering/frontend/senior-frontend-architect.md +573 -0
  52. package/templates/agents/engineering/middlend/api-documenter.md +31 -0
  53. package/templates/agents/engineering/middlend/architect-review.md +41 -0
  54. package/templates/agents/engineering/middlend/cloud-architect.md +31 -0
  55. package/templates/agents/engineering/middlend/code-reviewer.md +28 -0
  56. package/templates/agents/engineering/middlend/devops-automator.md +118 -0
  57. package/templates/agents/marketing/app-store-optimizer.md +180 -0
  58. package/templates/agents/marketing/business-analyst.md +34 -0
  59. package/templates/agents/marketing/content-creator.md +209 -0
  60. package/templates/agents/marketing/growth-hacker.md +218 -0
  61. package/templates/agents/marketing/instagram-curator.md +154 -0
  62. package/templates/agents/marketing/reddit-community-builder.md +197 -0
  63. package/templates/agents/marketing/tiktok-strategist.md +151 -0
  64. package/templates/agents/marketing/twitter-engager.md +175 -0
  65. package/templates/agents/orchestrators/context-manager.md +63 -0
  66. package/templates/agents/orchestrators/project-analyst.md +66 -0
  67. package/templates/agents/orchestrators/team-configurator.md +52 -0
  68. package/templates/agents/orchestrators/tech-lead-orchestrator.md +103 -0
  69. package/templates/agents/product/feedback-synthesizer.md +174 -0
  70. package/templates/agents/product/sprint-prioritizer.md +128 -0
  71. package/templates/agents/product/trend-researcher.md +133 -0
  72. package/templates/agents/project-management/experiment-tracker.md +165 -0
  73. package/templates/agents/project-management/project-shipper.md +190 -0
  74. package/templates/agents/project-management/studio-producer.md +203 -0
  75. package/templates/agents/specialist/spec-analyst.md +228 -0
  76. package/templates/agents/specialist/spec-architect.md +375 -0
  77. package/templates/agents/specialist/spec-developer.md +544 -0
  78. package/templates/agents/specialist/spec-orchestrator.md +465 -0
  79. package/templates/agents/specialist/spec-planner.md +497 -0
  80. package/templates/agents/specialist/spec-reviewer.md +487 -0
  81. package/templates/agents/specialist/spec-task-reviewer.md +50 -0
  82. package/templates/agents/specialist/spec-tester.md +652 -0
  83. package/templates/agents/specialist/spec-validator.md +441 -0
  84. package/templates/agents/specialized/C++/cpp-pro.md +37 -0
  85. package/templates/agents/specialized/Golang/golang-pro.md +31 -0
  86. package/templates/agents/specialized/JavaScript/javascript-pro.md +34 -0
  87. package/templates/agents/specialized/Python/python-pro.md +31 -0
  88. package/templates/agents/specialized/databases/sql-pro.md +34 -0
  89. package/templates/agents/specialized/django/django-api-developer.md +804 -0
  90. package/templates/agents/specialized/django/django-backend-expert.md +875 -0
  91. package/templates/agents/specialized/django/django-orm-expert.md +828 -0
  92. package/templates/agents/specialized/laravel/laravel-backend-expert.md +174 -0
  93. package/templates/agents/specialized/laravel/laravel-eloquent-expert.md +75 -0
  94. package/templates/agents/specialized/rails/rails-activerecord-expert.md +690 -0
  95. package/templates/agents/specialized/rails/rails-api-developer.md +943 -0
  96. package/templates/agents/specialized/rails/rails-backend-expert.md +876 -0
  97. package/templates/agents/specialized/react/react-component-architect.md +41 -0
  98. package/templates/agents/specialized/react/react-nextjs-expert.md +141 -0
  99. package/templates/agents/specialized/vue/vue-component-architect.md +98 -0
  100. package/templates/agents/specialized/vue/vue-nuxt-expert.md +720 -0
  101. package/templates/agents/specialized/vue/vue-state-manager.md +33 -0
  102. package/templates/agents/studio-operations/analytics-reporter.md +204 -0
  103. package/templates/agents/studio-operations/finance-tracker.md +293 -0
  104. package/templates/agents/studio-operations/infrastructure-maintainer.md +219 -0
  105. package/templates/agents/studio-operations/legal-compliance-checker.md +259 -0
  106. package/templates/agents/studio-operations/support-responder.md +166 -0
  107. package/templates/agents/task-execution-agent.ts +160 -0
  108. package/templates/agents/testing/api-tester.md +214 -0
  109. package/templates/agents/testing/integration-test-fixer.md +52 -0
  110. package/templates/agents/testing/performance-benchmarker.md +277 -0
  111. package/templates/agents/testing/test-automator.md +31 -0
  112. package/templates/agents/testing/test-results-analyzer.md +273 -0
  113. package/templates/agents/testing/test-writer-fixer.md +129 -0
  114. package/templates/agents/testing/tool-evaluator.md +184 -0
  115. package/templates/agents/testing/workflow-optimizer.md +239 -0
  116. package/templates/agents/universal/api-architect.md +84 -0
  117. package/templates/agents/universal/backend-developer.md +95 -0
  118. package/templates/agents/universal/frontend-developer.md +66 -0
  119. package/templates/agents/universal/tailwind-css-expert.md +84 -0
  120. package/templates/cursor.md +20 -14
  121. package/templates/hooks/claude-code-hooks.json +13 -9
  122. package/templates/hooks/hook-wrapper.ts +173 -0
  123. package/templates/hooks/install-hooks.ts +201 -0
  124. package/templates/hooks/scripts/Notification/desktop-notifier.ts +268 -0
  125. package/templates/hooks/scripts/Notification/notification.ts +28 -0
  126. package/templates/hooks/scripts/PostToolUse/code-formatter.ts +182 -0
  127. package/templates/hooks/scripts/PostToolUse/post-tool-use.ts +27 -0
  128. package/templates/hooks/scripts/PreToolUse/command-logger.ts +107 -0
  129. package/templates/hooks/scripts/PreToolUse/file-protection.ts +109 -0
  130. package/templates/hooks/scripts/PreToolUse/pre-tool-use.ts +42 -0
  131. package/templates/hooks/scripts/Stop/session-summary.ts +150 -0
  132. package/templates/hooks/scripts/Stop/stop.ts +17 -0
  133. package/templates/hooks/scripts/UserPromptSubmit/input-notifier.ts +139 -0
  134. package/templates/hooks/scripts/UserPromptSubmit/user-prompt-submit.ts +16 -0
  135. package/templates/hooks/test-hook.ts +171 -0
  136. package/templates/hooks/tsconfig.json +27 -0
  137. package/templates/hooks/utils/execution-utils.ts +176 -0
  138. package/templates/hooks/utils/file-utils.ts +256 -0
  139. package/templates/hooks/utils/hook-utils.ts +86 -0
  140. package/templates/hooks/utils/index.ts +42 -0
  141. package/templates/personality.md +19 -14
  142. package/templates/settings.json +27 -4
  143. package/dist/chunks/run-command.mjs +0 -48
  144. package/templates/agents/base/frontend-designer.md +0 -193
  145. package/templates/commands/base//344/270/223/345/256/266/347/273/204/345/210/206/346/236/220/346/231/272/350/203/275/344/275/223.md +0 -82
  146. package/templates/hooks/scripts/Notification/bash/desktop-notifier.sh +0 -63
  147. package/templates/hooks/scripts/Notification/powershell/desktop-notifier.ps1 +0 -67
  148. package/templates/hooks/scripts/PostToolUse/bash/code-formatter.sh +0 -73
  149. package/templates/hooks/scripts/PostToolUse/powershell/code-formatter.ps1 +0 -90
  150. package/templates/hooks/scripts/PreToolUse/bash/command-logger.sh +0 -38
  151. package/templates/hooks/scripts/PreToolUse/bash/file-protection.sh +0 -55
  152. package/templates/hooks/scripts/PreToolUse/powershell/command-logger.ps1 +0 -34
  153. package/templates/hooks/scripts/PreToolUse/powershell/file-protection.ps1 +0 -46
  154. package/templates/hooks/scripts/Stop/bash/session-summary.sh +0 -83
  155. package/templates/hooks/scripts/Stop/powershell/session-summary.ps1 +0 -125
  156. package/templates/hooks/scripts/UserPromptSubmit/bash/input-notifier.sh +0 -58
  157. package/templates/hooks/scripts/UserPromptSubmit/powershell/input-notifier.ps1 +0 -85
  158. package/templates/skills/slack-gif-creator/LICENSE.txt +0 -202
  159. package/templates/skills/slack-gif-creator/SKILL.md +0 -646
  160. package/templates/skills/slack-gif-creator/core/color_palettes.py +0 -302
  161. package/templates/skills/slack-gif-creator/core/easing.py +0 -230
  162. package/templates/skills/slack-gif-creator/core/frame_composer.py +0 -469
  163. package/templates/skills/slack-gif-creator/core/gif_builder.py +0 -246
  164. package/templates/skills/slack-gif-creator/core/typography.py +0 -357
  165. package/templates/skills/slack-gif-creator/core/validators.py +0 -264
  166. package/templates/skills/slack-gif-creator/core/visual_effects.py +0 -494
  167. package/templates/skills/slack-gif-creator/requirements.txt +0 -4
  168. package/templates/skills/slack-gif-creator/templates/bounce.py +0 -106
  169. package/templates/skills/slack-gif-creator/templates/explode.py +0 -331
  170. package/templates/skills/slack-gif-creator/templates/fade.py +0 -329
  171. package/templates/skills/slack-gif-creator/templates/flip.py +0 -291
  172. package/templates/skills/slack-gif-creator/templates/kaleidoscope.py +0 -211
  173. package/templates/skills/slack-gif-creator/templates/morph.py +0 -329
  174. package/templates/skills/slack-gif-creator/templates/move.py +0 -293
  175. package/templates/skills/slack-gif-creator/templates/pulse.py +0 -268
  176. package/templates/skills/slack-gif-creator/templates/shake.py +0 -127
  177. package/templates/skills/slack-gif-creator/templates/slide.py +0 -291
  178. package/templates/skills/slack-gif-creator/templates/spin.py +0 -269
  179. package/templates/skills/slack-gif-creator/templates/wiggle.py +0 -300
  180. package/templates/skills/slack-gif-creator/templates/zoom.py +0 -312
  181. package/templates/skills/swimlane-diagram/README.md +0 -373
  182. package/templates/skills/swimlane-diagram/SKILL.md +0 -242
  183. package/templates/skills/swimlane-diagram/examples.md +0 -405
  184. package/templates/skills/swimlane-diagram/generators.mjs +0 -258
  185. package/templates/skills/swimlane-diagram/package.json +0 -126
  186. package/templates/skills/swimlane-diagram/reference.md +0 -368
  187. package/templates/skills/swimlane-diagram/swimlane-diagram.mjs +0 -215
  188. package/templates/skills/swimlane-diagram/swimlane-diagram.test.mjs +0 -358
  189. package/templates/skills/swimlane-diagram/validators.mjs +0 -291
  190. package/templates/skills/theme-factory/LICENSE.txt +0 -202
  191. package/templates/skills/theme-factory/SKILL.md +0 -59
  192. package/templates/skills/theme-factory/theme-showcase.pdf +0 -0
  193. package/templates/skills/theme-factory/themes/arctic-frost.md +0 -19
  194. package/templates/skills/theme-factory/themes/botanical-garden.md +0 -19
  195. package/templates/skills/theme-factory/themes/desert-rose.md +0 -19
  196. package/templates/skills/theme-factory/themes/forest-canopy.md +0 -19
  197. package/templates/skills/theme-factory/themes/golden-hour.md +0 -19
  198. package/templates/skills/theme-factory/themes/midnight-galaxy.md +0 -19
  199. package/templates/skills/theme-factory/themes/modern-minimalist.md +0 -19
  200. package/templates/skills/theme-factory/themes/ocean-depths.md +0 -19
  201. package/templates/skills/theme-factory/themes/sunset-boulevard.md +0 -19
  202. package/templates/skills/theme-factory/themes/tech-innovation.md +0 -19
  203. /package/templates/agents/{code//346/240/271/346/234/254/345/216/237/345/233/240/345/210/206/346/236/220/345/270/210.md" → core/root-cause-analyst.md} +0 -0
  204. /package/templates/agents/{code//346/212/200/346/234/257/346/226/207/346/241/243/345/267/245/347/250/213/345/270/210.md" → core/technical-writer.md} +0 -0
  205. /package/templates/agents/{code//346/200/247/350/203/275/345/210/206/346/236/220/344/270/223/345/256/266.md" → deployment/performance-analyst.md} +0 -0
  206. /package/templates/agents/{code//345/256/211/345/205/250/346/274/217/346/264/236/350/257/206/345/210/253/344/270/223/345/256/266.md" → deployment/security-engineer.md} +0 -0
  207. /package/templates/agents/{code//347/263/273/347/273/237/346/236/266/346/236/204/345/270/210.md" → engineering/middlend/architect.md} +0 -0
  208. /package/templates/agents/{code/python/345/274/200/345/217/221/344/270/223/345/256/266.md" → specialized/Python/python-expert.md} +0 -0
  209. /package/templates/agents/{code//350/264/250/351/207/217/350/257/204/344/274/260/345/267/245/347/250/213/345/270/210.md" → testing/quality-engineer.md} +0 -0
  210. /package/templates/agents/{base → universal}/panel-experts.md +0 -0
@@ -1,258 +0,0 @@
1
- /**
2
- * 泳道图生成器 - 生成器模块
3
- *
4
- * 负责生成Mermaid语法的用户旅程图和时序图
5
- */
6
-
7
- /**
8
- * 生成用户旅程图
9
- * @param {Object} options - 生成选项
10
- * @param {string} options.title - 图表标题
11
- * @param {Array} options.sections - 阶段数据
12
- * @param {string} options.theme - 主题样式
13
- * @returns {string} Mermaid用户旅程图语法
14
- */
15
- export function generateJourneyDiagram(options) {
16
- const { title, sections, theme = 'default' } = options;
17
-
18
- let mermaidCode = `journey\n`;
19
-
20
- // 添加标题
21
- if (title) {
22
- mermaidCode += ` title ${title}\n`;
23
- }
24
-
25
- // 添加阶段和步骤
26
- sections.forEach(section => {
27
- mermaidCode += ` section ${section.name}\n`;
28
-
29
- section.steps.forEach(step => {
30
- const score = Math.min(5, Math.max(1, step.score || 3));
31
- const actor = step.actor || '用户';
32
- mermaidCode += ` ${step.description}: ${score}: ${actor}\n`;
33
- });
34
- });
35
-
36
- return mermaidCode;
37
- }
38
-
39
- /**
40
- * 生成时序图
41
- * @param {Object} options - 生成选项
42
- * @param {string} options.title - 图表标题
43
- * @param {Array} options.participants - 参与者列表
44
- * @param {Array} options.interactions - 交互数据
45
- * @param {string} options.theme - 主题样式
46
- * @returns {string} Mermaid时序图语法
47
- */
48
- export function generateSequenceDiagram(options) {
49
- const { title, participants = [], interactions, theme = 'default' } = options;
50
-
51
- let mermaidCode = `sequenceDiagram\n`;
52
-
53
- // 添加参与者(去重)
54
- const uniqueParticipants = [...new Set(participants)];
55
- uniqueParticipants.forEach(participant => {
56
- mermaidCode += ` participant ${participant}\n`;
57
- });
58
-
59
- // 添加交互
60
- interactions.forEach(interaction => {
61
- const arrow = interaction.type === 'async' ? '-->>' : '->>';
62
- mermaidCode += ` ${interaction.from}${arrow}${interaction.to}: ${interaction.message}\n`;
63
- });
64
-
65
- return mermaidCode;
66
- }
67
-
68
- /**
69
- * 生成带激活状态的时序图
70
- * @param {Object} options - 生成选项
71
- * @param {Array} options.activations - 激活状态数据
72
- * @returns {string} 带激活状态的时序图语法
73
- */
74
- export function generateSequenceDiagramWithActivations(options) {
75
- const { participants, interactions, activations = [] } = options;
76
-
77
- let mermaidCode = generateSequenceDiagram({ participants, interactions });
78
-
79
- // 添加激活状态
80
- activations.forEach(activation => {
81
- if (activation.activate) {
82
- mermaidCode += ` activate ${activation.participant}\n`;
83
- }
84
- if (activation.deactivate) {
85
- mermaidCode += ` deactivate ${activation.participant}\n`;
86
- }
87
- });
88
-
89
- return mermaidCode;
90
- }
91
-
92
- /**
93
- * 生成带条件分支的时序图
94
- * @param {Object} options - 生成选项
95
- * @param {Array} options.conditions - 条件分支数据
96
- * @returns {string} 带条件分支的时序图语法
97
- */
98
- export function generateSequenceDiagramWithConditions(options) {
99
- const { participants, interactions, conditions = [] } = options;
100
-
101
- let mermaidCode = generateSequenceDiagram({ participants, interactions });
102
-
103
- // 添加条件分支
104
- conditions.forEach(condition => {
105
- mermaidCode += ` ${condition.type} ${condition.condition}\n`;
106
- condition.interactions.forEach(interaction => {
107
- const arrow = interaction.type === 'async' ? '-->>' : '->>';
108
- mermaidCode += ` ${interaction.from}${arrow}${interaction.to}: ${interaction.message}\n`;
109
- });
110
- mermaidCode += ` end\n`;
111
- });
112
-
113
- return mermaidCode;
114
- }
115
-
116
- /**
117
- * 生成带循环的时序图
118
- * @param {Object} options - 生成选项
119
- * @param {Array} options.loops - 循环数据
120
- * @returns {string} 带循环的时序图语法
121
- */
122
- export function generateSequenceDiagramWithLoops(options) {
123
- const { participants, interactions, loops = [] } = options;
124
-
125
- let mermaidCode = generateSequenceDiagram({ participants, interactions });
126
-
127
- // 添加循环
128
- loops.forEach(loop => {
129
- mermaidCode += ` loop ${loop.condition}\n`;
130
- loop.interactions.forEach(interaction => {
131
- const arrow = interaction.type === 'async' ? '-->>' : '->>';
132
- mermaidCode += ` ${interaction.from}${arrow}${interaction.to}: ${interaction.message}\n`;
133
- });
134
- mermaidCode += ` end\n`;
135
- });
136
-
137
- return mermaidCode;
138
- }
139
-
140
- /**
141
- * 生成带注释的泳道图
142
- * @param {string} mermaidCode - 原始Mermaid代码
143
- * @param {Array} notes - 注释数据
144
- * @returns {string} 带注释的Mermaid代码
145
- */
146
- export function addNotesToDiagram(mermaidCode, notes) {
147
- let result = mermaidCode;
148
-
149
- notes.forEach(note => {
150
- result += `\n note ${note.position} of ${note.participant}: ${note.content}`;
151
- });
152
-
153
- return result;
154
- }
155
-
156
- /**
157
- * 生成高级用户旅程图(带情感曲线分析)
158
- * @param {Object} options - 生成选项
159
- * @param {Array} options.emotionAnalysis - 情感分析数据
160
- * @returns {string} 带情感分析的旅程图语法
161
- */
162
- export function generateJourneyDiagramWithEmotionAnalysis(options) {
163
- const { title, sections, emotionAnalysis = [] } = options;
164
-
165
- let mermaidCode = generateJourneyDiagram({ title, sections });
166
-
167
- // 添加情感分析注释
168
- emotionAnalysis.forEach(analysis => {
169
- mermaidCode += `\n %% 情感分析: ${analysis.section} - ${analysis.emotion}`;
170
- mermaidCode += `\n %% 建议: ${analysis.suggestion}`;
171
- });
172
-
173
- return mermaidCode;
174
- }
175
-
176
- /**
177
- * 生成多角色用户旅程图
178
- * @param {Object} options - 生成选项
179
- * @param {Array} options.roles - 角色数据
180
- * @returns {string} 多角色旅程图语法
181
- */
182
- export function generateMultiRoleJourneyDiagram(options) {
183
- const { title, sections, roles = [] } = options;
184
-
185
- let mermaidCode = generateJourneyDiagram({ title, sections });
186
-
187
- // 添加角色信息
188
- if (roles.length > 0) {
189
- mermaidCode += `\n %% 参与角色: ${roles.join(', ')}`;
190
- }
191
-
192
- return mermaidCode;
193
- }
194
-
195
- /**
196
- * 生成并行处理的时序图
197
- * @param {Object} options - 生成选项
198
- * @param {Array} options.parallelBlocks - 并行块数据
199
- * @returns {string} 并行时序图语法
200
- */
201
- export function generateParallelSequenceDiagram(options) {
202
- const { participants, interactions, parallelBlocks = [] } = options;
203
-
204
- let mermaidCode = generateSequenceDiagram({ participants, interactions });
205
-
206
- // 添加并行处理块
207
- parallelBlocks.forEach(block => {
208
- mermaidCode += `\n par 并行处理\n`;
209
- block.threads.forEach((thread, index) => {
210
- if (index > 0) {
211
- mermaidCode += ` and\n`;
212
- }
213
- thread.interactions.forEach(interaction => {
214
- const arrow = interaction.type === 'async' ? '-->>' : '->>';
215
- mermaidCode += ` ${interaction.from}${arrow}${interaction.to}: ${interaction.message}\n`;
216
- });
217
- });
218
- mermaidCode += ` end\n`;
219
- });
220
-
221
- return mermaidCode;
222
- }
223
-
224
- /**
225
- * 美化Mermaid代码格式
226
- * @param {string} code - 原始代码
227
- * @returns {string} 美化后的代码
228
- */
229
- export function formatMermaidCode(code) {
230
- return code
231
- .split('\n')
232
- .map(line => {
233
- // 统一缩进
234
- if (line.startsWith(' ')) {
235
- return line;
236
- } else if (line.startsWith(' ')) {
237
- return ' ' + line.substring(2);
238
- } else {
239
- return ' ' + line;
240
- }
241
- })
242
- .join('\n')
243
- .trim();
244
- }
245
-
246
- /**
247
- * 生成器工具函数集合
248
- */
249
- export const generators = {
250
- journey: generateJourneyDiagram,
251
- sequence: generateSequenceDiagram,
252
- sequenceWithActivations: generateSequenceDiagramWithActivations,
253
- sequenceWithConditions: generateSequenceDiagramWithConditions,
254
- sequenceWithLoops: generateSequenceDiagramWithLoops,
255
- parallelSequence: generateParallelSequenceDiagram,
256
- journeyWithEmotion: generateJourneyDiagramWithEmotionAnalysis,
257
- multiRoleJourney: generateMultiRoleJourneyDiagram
258
- };
@@ -1,126 +0,0 @@
1
- {
2
- "name": "swimlane-diagram-skill",
3
- "version": "1.0.0",
4
- "description": "专业生成系统架构和业务流程的泳道图技能",
5
- "type": "module",
6
- "main": "swimlane-diagram.mjs",
7
- "exports": {
8
- ".": "./swimlane-diagram.mjs",
9
- "./validators": "./validators.mjs",
10
- "./generators": "./generators.mjs",
11
- "./test": "./swimlane-diagram.test.mjs"
12
- },
13
- "scripts": {
14
- "test": "node swimlane-diagram.test.mjs",
15
- "test:dev": "node --watch swimlane-diagram.test.mjs",
16
- "test:coverage": "node --experimental-vm-modules --experimental-wasm-modules swimlane-diagram.test.mjs",
17
- "lint": "echo '代码检查通过(当前无lint配置)'",
18
- "build": "echo '构建完成(无需构建步骤)'",
19
- "preview": "node -e \"import('./swimlane-diagram.mjs').then(m => console.log('预览功能可用'))\"",
20
- "validate": "node -e \"import('./validators.mjs').then(m => console.log('验证器模块加载成功'))\""
21
- },
22
- "keywords": [
23
- "mermaid",
24
- "diagram",
25
- "swimlane",
26
- "journey",
27
- "sequence",
28
- "visualization",
29
- "flowchart",
30
- "architecture",
31
- "business-process",
32
- "user-journey",
33
- "sequence-diagram"
34
- ],
35
- "author": {
36
- "name": "AICO CLI Team",
37
- "email": "team@aico-cli.org",
38
- "url": "https://github.com/aico-cli"
39
- },
40
- "license": "MIT",
41
- "repository": {
42
- "type": "git",
43
- "url": "https://github.com/aico-cli/templates/skills/swimlane-diagram"
44
- },
45
- "bugs": {
46
- "url": "https://github.com/aico-cli/templates/issues"
47
- },
48
- "homepage": "https://github.com/aico-cli/templates/skills/swimlane-diagram#readme",
49
- "engines": {
50
- "node": ">=16.0.0"
51
- },
52
- "dependencies": {},
53
- "devDependencies": {},
54
- "peerDependencies": {},
55
- "files": [
56
- "*.mjs",
57
- "*.md",
58
- "package.json"
59
- ],
60
- "skill": {
61
- "name": "泳道图生成器",
62
- "description": "专业生成系统架构和业务流程的泳道图",
63
- "version": "1.0.0",
64
- "type": "visualization",
65
- "tags": ["mermaid", "diagram", "architecture"],
66
- "entry": "swimlane-diagram.mjs",
67
- "allowedTools": ["Read", "Write", "Edit", "Glob", "Grep"],
68
- "examples": [
69
- {
70
- "name": "用户旅程图",
71
- "description": "生成用户在不同阶段的体验流程",
72
- "file": "examples.md#用户旅程图"
73
- },
74
- {
75
- "name": "时序图",
76
- "description": "展示系统间的交互关系和消息传递",
77
- "file": "examples.md#时序图"
78
- }
79
- ],
80
- "config": {
81
- "theme": "default",
82
- "autoValidate": true,
83
- "maxParticipants": 10,
84
- "maxSections": 8
85
- }
86
- },
87
- "mermaid": {
88
- "version": "^10.0.0",
89
- "supportedTypes": ["journey", "sequenceDiagram"],
90
- "features": [
91
- "用户旅程图生成",
92
- "时序图生成",
93
- "激活状态管理",
94
- "条件分支支持",
95
- "并行处理",
96
- "多角色协作"
97
- ]
98
- },
99
- "cli": {
100
- "commands": [
101
- {
102
- "name": "generate",
103
- "description": "生成泳道图",
104
- "usage": "node swimlane-diagram.mjs --type <type> --title <title> [options]",
105
- "options": {
106
- "--type": "图表类型 (journey|sequence)",
107
- "--title": "图表标题",
108
- "--data": "图表数据文件路径",
109
- "--output": "输出文件路径",
110
- "--preview": "生成预览HTML"
111
- }
112
- }
113
- ]
114
- },
115
- "compatibility": {
116
- "platforms": ["node", "browser"],
117
- "runtimes": ["esm", "commonjs"],
118
- "environments": ["cli", "web", "desktop"]
119
- },
120
- "quality": {
121
- "testCoverage": "high",
122
- "codeQuality": "production-ready",
123
- "documentation": "comprehensive",
124
- "examples": "extensive"
125
- }
126
- }