sillyspec 3.27.5 → 3.27.6

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 (194) hide show
  1. package/.worktrees/8d2d0392/.claude/skills/sillyspec-archive/SKILL.md +87 -0
  2. package/.worktrees/8d2d0392/.claude/skills/sillyspec-auto/SKILL.md +93 -0
  3. package/.worktrees/8d2d0392/.claude/skills/sillyspec-brainstorm/SKILL.md +114 -0
  4. package/.worktrees/8d2d0392/.claude/skills/sillyspec-commit/SKILL.md +67 -0
  5. package/.worktrees/8d2d0392/.claude/skills/sillyspec-continue/SKILL.md +47 -0
  6. package/.worktrees/8d2d0392/.claude/skills/sillyspec-doctor/SKILL.md +76 -0
  7. package/.worktrees/8d2d0392/.claude/skills/sillyspec-execute/SKILL.md +214 -0
  8. package/.worktrees/8d2d0392/.claude/skills/sillyspec-explore/SKILL.md +102 -0
  9. package/.worktrees/8d2d0392/.claude/skills/sillyspec-export/SKILL.md +57 -0
  10. package/.worktrees/8d2d0392/.claude/skills/sillyspec-init/SKILL.md +177 -0
  11. package/.worktrees/8d2d0392/.claude/skills/sillyspec-knowledge/SKILL.md +270 -0
  12. package/.worktrees/8d2d0392/.claude/skills/sillyspec-plan/SKILL.md +156 -0
  13. package/.worktrees/8d2d0392/.claude/skills/sillyspec-propose/SKILL.md +87 -0
  14. package/.worktrees/8d2d0392/.claude/skills/sillyspec-quick/SKILL.md +116 -0
  15. package/.worktrees/8d2d0392/.claude/skills/sillyspec-resume/SKILL.md +70 -0
  16. package/.worktrees/8d2d0392/.claude/skills/sillyspec-scan/SKILL.md +79 -0
  17. package/.worktrees/8d2d0392/.claude/skills/sillyspec-state/SKILL.md +64 -0
  18. package/.worktrees/8d2d0392/.claude/skills/sillyspec-status/SKILL.md +54 -0
  19. package/.worktrees/8d2d0392/.claude/skills/sillyspec-verify/SKILL.md +87 -0
  20. package/.worktrees/8d2d0392/.claude/skills/sillyspec-workspace/SKILL.md +175 -0
  21. package/.worktrees/8d2d0392/.claude/skills/verify-per-user/SKILL.md +6 -0
  22. package/.worktrees/8d2d0392/.gitattributes +2 -0
  23. package/.worktrees/8d2d0392/.husky/pre-push +20 -0
  24. package/.worktrees/8d2d0392/README.md +203 -0
  25. package/.worktrees/8d2d0392/SKILL.md +91 -0
  26. package/.worktrees/8d2d0392/architecture-analysis.md +448 -0
  27. package/.worktrees/8d2d0392/bin/sillyspec.js +2 -0
  28. package/.worktrees/8d2d0392/eval/README.md +86 -0
  29. package/.worktrees/8d2d0392/eval/eval.config.json +28 -0
  30. package/.worktrees/8d2d0392/eval/lib/adapters/cli.mjs +63 -0
  31. package/.worktrees/8d2d0392/eval/lib/adapters/dryrun.mjs +27 -0
  32. package/.worktrees/8d2d0392/eval/lib/config.mjs +82 -0
  33. package/.worktrees/8d2d0392/eval/lib/db.mjs +76 -0
  34. package/.worktrees/8d2d0392/eval/lib/report.mjs +120 -0
  35. package/.worktrees/8d2d0392/eval/lib/runner.mjs +157 -0
  36. package/.worktrees/8d2d0392/eval/lib/tasks.mjs +73 -0
  37. package/.worktrees/8d2d0392/eval/lib/util.mjs +107 -0
  38. package/.worktrees/8d2d0392/eval/lib/workdir.mjs +30 -0
  39. package/.worktrees/8d2d0392/eval/run.mjs +83 -0
  40. package/.worktrees/8d2d0392/eval/tasks/001-slugify/files/package.json +6 -0
  41. package/.worktrees/8d2d0392/eval/tasks/001-slugify/solution/src/slugify.mjs +26 -0
  42. package/.worktrees/8d2d0392/eval/tasks/001-slugify/task.json +6 -0
  43. package/.worktrees/8d2d0392/eval/tasks/001-slugify/verify.mjs +28 -0
  44. package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/package.json +6 -0
  45. package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/src/dates.mjs +4 -0
  46. package/.worktrees/8d2d0392/eval/tasks/002-each-day/solution/src/dates.mjs +30 -0
  47. package/.worktrees/8d2d0392/eval/tasks/002-each-day/task.json +6 -0
  48. package/.worktrees/8d2d0392/eval/tasks/002-each-day/verify.mjs +31 -0
  49. package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/data/notes.txt +5 -0
  50. package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/package.json +6 -0
  51. package/.worktrees/8d2d0392/eval/tasks/003-word-report/solution/bin/report.mjs +36 -0
  52. package/.worktrees/8d2d0392/eval/tasks/003-word-report/task.json +6 -0
  53. package/.worktrees/8d2d0392/eval/tasks/003-word-report/verify.mjs +38 -0
  54. package/.worktrees/8d2d0392/logo.jpg +0 -0
  55. package/.worktrees/8d2d0392/package-lock.json +977 -0
  56. package/.worktrees/8d2d0392/package.json +41 -0
  57. package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-Bq_Z2hne.js +7446 -0
  58. package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-O2W5RV4z.css +1 -0
  59. package/.worktrees/8d2d0392/packages/dashboard/dist/favicon.jpg +0 -0
  60. package/.worktrees/8d2d0392/packages/dashboard/dist/index.html +16 -0
  61. package/.worktrees/8d2d0392/packages/dashboard/dist/logo.jpg +0 -0
  62. package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-dashboard.html +836 -0
  63. package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-overview.html +256 -0
  64. package/.worktrees/8d2d0392/packages/dashboard/package.json +25 -0
  65. package/.worktrees/8d2d0392/packages/dashboard/server/executor.js +95 -0
  66. package/.worktrees/8d2d0392/packages/dashboard/server/index.js +679 -0
  67. package/.worktrees/8d2d0392/packages/dashboard/server/parser.js +526 -0
  68. package/.worktrees/8d2d0392/packages/dashboard/server/watcher.js +357 -0
  69. package/.worktrees/8d2d0392/src/agent-session-log.js +803 -0
  70. package/.worktrees/8d2d0392/src/change-list.js +290 -0
  71. package/.worktrees/8d2d0392/src/change-risk-profile.js +339 -0
  72. package/.worktrees/8d2d0392/src/check-primitives.js +65 -0
  73. package/.worktrees/8d2d0392/src/classify-change.js +109 -0
  74. package/.worktrees/8d2d0392/src/commit-suggest.js +202 -0
  75. package/.worktrees/8d2d0392/src/config-cat.js +88 -0
  76. package/.worktrees/8d2d0392/src/config-schema.js +328 -0
  77. package/.worktrees/8d2d0392/src/constants.js +97 -0
  78. package/.worktrees/8d2d0392/src/contract-matrix.js +533 -0
  79. package/.worktrees/8d2d0392/src/datetime.js +20 -0
  80. package/.worktrees/8d2d0392/src/db-engine.js +55 -0
  81. package/.worktrees/8d2d0392/src/db.js +381 -0
  82. package/.worktrees/8d2d0392/src/decision-distill.js +517 -0
  83. package/.worktrees/8d2d0392/src/dispatch/backends/local-agent.js +155 -0
  84. package/.worktrees/8d2d0392/src/dispatch/backends/sillyhub-mcp.js +245 -0
  85. package/.worktrees/8d2d0392/src/dispatch/probe.js +246 -0
  86. package/.worktrees/8d2d0392/src/dispatch/strategy.js +121 -0
  87. package/.worktrees/8d2d0392/src/docs-check.js +825 -0
  88. package/.worktrees/8d2d0392/src/docs-debt.js +393 -0
  89. package/.worktrees/8d2d0392/src/docs-gate.js +107 -0
  90. package/.worktrees/8d2d0392/src/doctor-diagnostics.js +1099 -0
  91. package/.worktrees/8d2d0392/src/endpoint-extractor.js +409 -0
  92. package/.worktrees/8d2d0392/src/foreign-declared.js +78 -0
  93. package/.worktrees/8d2d0392/src/fs-atomic.js +73 -0
  94. package/.worktrees/8d2d0392/src/git-helper.js +150 -0
  95. package/.worktrees/8d2d0392/src/hooks/claude-pre-tool-use.cjs +130 -0
  96. package/.worktrees/8d2d0392/src/hooks/worktree-guard.js +892 -0
  97. package/.worktrees/8d2d0392/src/index.js +2854 -0
  98. package/.worktrees/8d2d0392/src/init.js +626 -0
  99. package/.worktrees/8d2d0392/src/knowledge-match.js +231 -0
  100. package/.worktrees/8d2d0392/src/local-detect.js +128 -0
  101. package/.worktrees/8d2d0392/src/local-register.js +104 -0
  102. package/.worktrees/8d2d0392/src/machine-interface.js +543 -0
  103. package/.worktrees/8d2d0392/src/migrate.js +127 -0
  104. package/.worktrees/8d2d0392/src/module-impact.js +166 -0
  105. package/.worktrees/8d2d0392/src/module-resolve.js +222 -0
  106. package/.worktrees/8d2d0392/src/modules.js +580 -0
  107. package/.worktrees/8d2d0392/src/plan-adopt-waves.js +126 -0
  108. package/.worktrees/8d2d0392/src/progress/change-registry.js +336 -0
  109. package/.worktrees/8d2d0392/src/progress/consistency-doctor.js +355 -0
  110. package/.worktrees/8d2d0392/src/progress/shared.js +36 -0
  111. package/.worktrees/8d2d0392/src/progress/stage-machine.js +594 -0
  112. package/.worktrees/8d2d0392/src/progress/step-store.js +265 -0
  113. package/.worktrees/8d2d0392/src/progress.js +1304 -0
  114. package/.worktrees/8d2d0392/src/quick-recommend.js +115 -0
  115. package/.worktrees/8d2d0392/src/quicklog.js +883 -0
  116. package/.worktrees/8d2d0392/src/review-tier.js +77 -0
  117. package/.worktrees/8d2d0392/src/run/command.js +1641 -0
  118. package/.worktrees/8d2d0392/src/run/complete-handlers.js +1552 -0
  119. package/.worktrees/8d2d0392/src/run/complete.js +1259 -0
  120. package/.worktrees/8d2d0392/src/run/concurrent-detect.js +156 -0
  121. package/.worktrees/8d2d0392/src/run/gates.js +1094 -0
  122. package/.worktrees/8d2d0392/src/run/multi-repo-context.js +208 -0
  123. package/.worktrees/8d2d0392/src/run/next.js +128 -0
  124. package/.worktrees/8d2d0392/src/run/prompt.js +843 -0
  125. package/.worktrees/8d2d0392/src/run/quick-audit.js +186 -0
  126. package/.worktrees/8d2d0392/src/run/scan-profile.js +269 -0
  127. package/.worktrees/8d2d0392/src/run/shared.js +1562 -0
  128. package/.worktrees/8d2d0392/src/run/stage.js +587 -0
  129. package/.worktrees/8d2d0392/src/run.js +23 -0
  130. package/.worktrees/8d2d0392/src/scan-diff.js +388 -0
  131. package/.worktrees/8d2d0392/src/scan-postcheck.js +524 -0
  132. package/.worktrees/8d2d0392/src/scan-staleness.js +95 -0
  133. package/.worktrees/8d2d0392/src/setup.js +414 -0
  134. package/.worktrees/8d2d0392/src/sillyhub-mcp/client.js +597 -0
  135. package/.worktrees/8d2d0392/src/sillyhub-mcp/config.js +62 -0
  136. package/.worktrees/8d2d0392/src/spec-dir-typo.js +50 -0
  137. package/.worktrees/8d2d0392/src/spec-sync.js +358 -0
  138. package/.worktrees/8d2d0392/src/stage-contract-engine.js +171 -0
  139. package/.worktrees/8d2d0392/src/stage-contract-spec.js +551 -0
  140. package/.worktrees/8d2d0392/src/stage-contract.js +948 -0
  141. package/.worktrees/8d2d0392/src/stage-review.js +597 -0
  142. package/.worktrees/8d2d0392/src/stages/archive.js +199 -0
  143. package/.worktrees/8d2d0392/src/stages/brainstorm-auto.js +285 -0
  144. package/.worktrees/8d2d0392/src/stages/brainstorm.js +624 -0
  145. package/.worktrees/8d2d0392/src/stages/cmd-existence.js +145 -0
  146. package/.worktrees/8d2d0392/src/stages/doctor.js +540 -0
  147. package/.worktrees/8d2d0392/src/stages/execute.js +1277 -0
  148. package/.worktrees/8d2d0392/src/stages/explore.js +43 -0
  149. package/.worktrees/8d2d0392/src/stages/index.js +29 -0
  150. package/.worktrees/8d2d0392/src/stages/knowledge.js +514 -0
  151. package/.worktrees/8d2d0392/src/stages/plan-postcheck.js +1398 -0
  152. package/.worktrees/8d2d0392/src/stages/plan.js +651 -0
  153. package/.worktrees/8d2d0392/src/stages/quick.js +167 -0
  154. package/.worktrees/8d2d0392/src/stages/scan.js +608 -0
  155. package/.worktrees/8d2d0392/src/stages/status.js +64 -0
  156. package/.worktrees/8d2d0392/src/stages/verify.js +246 -0
  157. package/.worktrees/8d2d0392/src/sync.js +1470 -0
  158. package/.worktrees/8d2d0392/src/task-review.js +1498 -0
  159. package/.worktrees/8d2d0392/src/taskcard-placeholders.js +21 -0
  160. package/.worktrees/8d2d0392/src/taskcard.js +217 -0
  161. package/.worktrees/8d2d0392/src/verify-postcheck.js +1718 -0
  162. package/.worktrees/8d2d0392/src/verify-probes.js +327 -0
  163. package/.worktrees/8d2d0392/src/version.js +19 -0
  164. package/.worktrees/8d2d0392/src/workflow.js +600 -0
  165. package/.worktrees/8d2d0392/src/workspace.js +125 -0
  166. package/.worktrees/8d2d0392/src/worktree-apply.js +1611 -0
  167. package/.worktrees/8d2d0392/src/worktree-deps.js +576 -0
  168. package/.worktrees/8d2d0392/src/worktree.js +1838 -0
  169. package/.worktrees/8d2d0392/templates/claude-instruction.md +23 -0
  170. package/.worktrees/8d2d0392/templates/prompts/taskcard-rules.md +29 -0
  171. package/.worktrees/8d2d0392/templates/prompts/testcase-design.md +12 -0
  172. package/.worktrees/8d2d0392/templates/prompts/verify-probes.md +32 -0
  173. package/.worktrees/8d2d0392/templates/workflows/archive-impact.yaml +79 -0
  174. package/.worktrees/8d2d0392/templates/workflows/scan-docs.yaml +132 -0
  175. package/architecture-analysis.md +448 -0
  176. package/package.json +1 -1
  177. package/src/contract-matrix.js +1 -1
  178. package/src/endpoint-extractor.js +41 -52
  179. package/src/foreign-declared.js +78 -1
  180. package/src/index.js +9 -7
  181. package/src/run/command.js +2 -1
  182. package/src/run/gates.js +17 -0
  183. package/src/run/stage.js +8 -5
  184. package/src/stage-contract-spec.js +1 -1
  185. package/src/stages/brainstorm-auto.js +43 -1
  186. package/src/stages/brainstorm.js +2 -0
  187. package/src/stages/plan.js +8 -4
  188. package/src/stages/verify.js +1 -1
  189. package/src/taskcard.js +33 -0
  190. package/src/verify-probes.js +27 -6
  191. package/src/worktree-apply.js +451 -286
  192. package/src/worktree-deps.js +93 -1
  193. package/src/worktree.js +84 -19
  194. package/templates/prompts/taskcard-rules.md +1 -1
@@ -0,0 +1,256 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dashboard 概览区域原型</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+ body {
14
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
15
+ background: #F5F5F7;
16
+ height: 100vh;
17
+ display: flex;
18
+ flex-direction: column;
19
+ }
20
+ /* 概览区域 - 40% */
21
+ .overview-section {
22
+ height: 40%;
23
+ background: #FFFFFF;
24
+ border-bottom: 2px solid #2A3040;
25
+ padding: 16px 24px;
26
+ display: flex;
27
+ flex-direction: column;
28
+ }
29
+ .section-header {
30
+ display: flex;
31
+ justify-content: space-between;
32
+ align-items: center;
33
+ margin-bottom: 16px;
34
+ }
35
+ .section-title {
36
+ font-size: 18px;
37
+ font-weight: 600;
38
+ color: #1A1A1A;
39
+ }
40
+ .section-actions {
41
+ display: flex;
42
+ gap: 8px;
43
+ }
44
+ .btn {
45
+ padding: 6px 12px;
46
+ border-radius: 6px;
47
+ border: none;
48
+ cursor: pointer;
49
+ font-size: 13px;
50
+ font-weight: 500;
51
+ }
52
+ .btn-primary {
53
+ background: #D97706;
54
+ color: white;
55
+ }
56
+ .btn-secondary {
57
+ background: #E5E7EB;
58
+ color: #374151;
59
+ }
60
+ /* 水平滚动卡片容器 */
61
+ .cards-container {
62
+ flex: 1;
63
+ display: flex;
64
+ gap: 16px;
65
+ overflow-x: auto;
66
+ overflow-y: hidden;
67
+ padding-bottom: 8px;
68
+ }
69
+ .cards-container::-webkit-scrollbar {
70
+ height: 8px;
71
+ }
72
+ .cards-container::-webkit-scrollbar-track {
73
+ background: #F3F4F6;
74
+ border-radius: 4px;
75
+ }
76
+ .cards-container::-webkit-scrollbar-thumb {
77
+ background: #D1D5DB;
78
+ border-radius: 4px;
79
+ }
80
+ /* 项目卡片 */
81
+ .project-card {
82
+ width: 280px;
83
+ height: 120px;
84
+ background: white;
85
+ border: 2px solid #E5E7EB;
86
+ border-radius: 12px;
87
+ padding: 16px;
88
+ display: flex;
89
+ flex-direction: column;
90
+ justify-content: space-between;
91
+ cursor: pointer;
92
+ transition: all 0.2s;
93
+ flex-shrink: 0;
94
+ }
95
+ .project-card:hover {
96
+ border-color: #D97706;
97
+ box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
98
+ }
99
+ .project-card.selected {
100
+ border-color: #D97706;
101
+ box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
102
+ }
103
+ .card-header {
104
+ display: flex;
105
+ justify-content: space-between;
106
+ align-items: flex-start;
107
+ }
108
+ .project-name {
109
+ font-size: 16px;
110
+ font-weight: 600;
111
+ color: #1A1A1A;
112
+ }
113
+ .last-active {
114
+ font-size: 11px;
115
+ color: #9CA3AF;
116
+ }
117
+ .stage-badge {
118
+ display: inline-block;
119
+ padding: 4px 10px;
120
+ border-radius: 12px;
121
+ font-size: 12px;
122
+ font-weight: 500;
123
+ }
124
+ .stage-badge.in-progress {
125
+ background: #DBEAFE;
126
+ color: #1D4ED8;
127
+ }
128
+ .stage-badge.completed {
129
+ background: #D1FAE5;
130
+ color: #047857;
131
+ }
132
+ .stage-badge.pending {
133
+ background: #F3F4F6;
134
+ color: #6B7280;
135
+ }
136
+ .progress-section {
137
+ display: flex;
138
+ align-items: center;
139
+ gap: 8px;
140
+ }
141
+ .progress-bar {
142
+ flex: 1;
143
+ height: 6px;
144
+ background: #E5E7EB;
145
+ border-radius: 3px;
146
+ overflow: hidden;
147
+ }
148
+ .progress-fill {
149
+ height: 100%;
150
+ border-radius: 3px;
151
+ transition: width 0.3s;
152
+ }
153
+ .progress-fill.in-progress { background: #3B82F6; }
154
+ .progress-fill.completed { background: #10B981; }
155
+ .progress-fill.pending { background: #9CA3AF; }
156
+ .progress-text {
157
+ font-size: 12px;
158
+ font-weight: 600;
159
+ color: #374151;
160
+ }
161
+ /* 详情区域 - 60% */
162
+ .detail-section {
163
+ flex: 1;
164
+ background: #FAFAFA;
165
+ padding: 24px;
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ color: #9CA3AF;
170
+ font-size: 14px;
171
+ }
172
+ </style>
173
+ </head>
174
+ <body>
175
+ <!-- 概览区域 -->
176
+ <div class="overview-section">
177
+ <div class="section-header">
178
+ <h1 class="section-title">项目概览</h1>
179
+ <div class="section-actions">
180
+ <button class="btn btn-secondary">刷新</button>
181
+ <button class="btn btn-primary">添加项目</button>
182
+ </div>
183
+ </div>
184
+ <div class="cards-container">
185
+ <!-- 项目卡片 1 - 进行中 -->
186
+ <div class="project-card selected">
187
+ <div class="card-header">
188
+ <span class="project-name">sillyspec</span>
189
+ <span class="last-active">2分钟前</span>
190
+ </div>
191
+ <div>
192
+ <span class="stage-badge in-progress">需求探索</span>
193
+ </div>
194
+ <div class="progress-section">
195
+ <div class="progress-bar">
196
+ <div class="progress-fill in-progress" style="width: 40%"></div>
197
+ </div>
198
+ <span class="progress-text">40%</span>
199
+ </div>
200
+ </div>
201
+ <!-- 项目卡片 2 - 进行中 -->
202
+ <div class="project-card">
203
+ <div class="card-header">
204
+ <span class="project-name">my-blog</span>
205
+ <span class="last-active">15分钟前</span>
206
+ </div>
207
+ <div>
208
+ <span class="stage-badge in-progress">实现计划</span>
209
+ </div>
210
+ <div class="progress-section">
211
+ <div class="progress-bar">
212
+ <div class="progress-fill in-progress" style="width: 75%"></div>
213
+ </div>
214
+ <span class="progress-text">75%</span>
215
+ </div>
216
+ </div>
217
+ <!-- 项目卡片 3 - 已完成 -->
218
+ <div class="project-card">
219
+ <div class="card-header">
220
+ <span class="project-name">user-service</span>
221
+ <span class="last-active">1小时前</span>
222
+ </div>
223
+ <div>
224
+ <span class="stage-badge completed">验证确认</span>
225
+ </div>
226
+ <div class="progress-section">
227
+ <div class="progress-bar">
228
+ <div class="progress-fill completed" style="width: 100%"></div>
229
+ </div>
230
+ <span class="progress-text">100%</span>
231
+ </div>
232
+ </div>
233
+ <!-- 项目卡片 4 - 未开始 -->
234
+ <div class="project-card">
235
+ <div class="card-header">
236
+ <span class="project-name">payment-api</span>
237
+ <span class="last-active">昨天</span>
238
+ </div>
239
+ <div>
240
+ <span class="stage-badge pending">未开始</span>
241
+ </div>
242
+ <div class="progress-section">
243
+ <div class="progress-bar">
244
+ <div class="progress-fill pending" style="width: 0%"></div>
245
+ </div>
246
+ <span class="progress-text">0%</span>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </div>
251
+ <!-- 详情区域 -->
252
+ <div class="detail-section">
253
+ 点击上方卡片查看项目详情
254
+ </div>
255
+ </body>
256
+ </html>
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@sillyspec/dashboard",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "preview": "vite preview"
9
+ },
10
+ "dependencies": {
11
+ "@vicons/ionicons5": "^0.13.0",
12
+ "chokidar": "^4.0",
13
+ "marked": "^17.0.6",
14
+ "naive-ui": "^2.44.1",
15
+ "open": "^10.1",
16
+ "vue": "^3.5",
17
+ "ws": "^8.18"
18
+ },
19
+ "devDependencies": {
20
+ "@tailwindcss/vite": "^4.0",
21
+ "@vitejs/plugin-vue": "^5.2",
22
+ "tailwindcss": "^4.0",
23
+ "vite": "^6.0"
24
+ }
25
+ }
@@ -0,0 +1,95 @@
1
+ import { spawn } from 'child_process'
2
+ import { fileURLToPath } from 'url'
3
+
4
+ // sillyspec CLI 入口(包根/bin/sillyspec.js):dashboard server 随 sillyspec npm 包分发
5
+ // (src/index.js 的 dashboard 分支 import 本目录),该相对位置在源码仓与 npm 包内一致
6
+ // (packages/dashboard/server/ → 包根/bin/)。
7
+ const SILLYSPEC_ENTRY = fileURLToPath(new URL('../../../bin/sillyspec.js', import.meta.url))
8
+
9
+ /**
10
+ * Execute a SillySpec CLI command in the given project directory
11
+ * @param {string} projectPath - Path to the project directory
12
+ * @param {string} command - Command to execute (e.g., 'progress status')
13
+ * @param {function} onOutput - Callback for stdout/stderr output
14
+ * @param {function} onComplete - Callback when command completes
15
+ * @returns {function} Kill function to terminate the process
16
+ */
17
+ export function executeCommand(projectPath, command, onOutput, onComplete) {
18
+ const args = String(command || '').trim().split(/\s+/).filter(Boolean)
19
+ // process.execPath 直接指定解释器跑包内入口:spawn('npx') 在 Windows 无法解析
20
+ // npx.cmd(体检 BUG-11,CLI 执行功能全灭);数组参数无 shell,同时杜绝未来为兼容
21
+ // .cmd 加 shell:true 而引入命令注入(体检 SEC-08)
22
+ const proc = spawn(process.execPath, [SILLYSPEC_ENTRY, ...args], {
23
+ cwd: projectPath,
24
+ env: { ...process.env }
25
+ })
26
+
27
+ proc.stdout.on('data', (data) => {
28
+ const output = data.toString()
29
+ if (onOutput) {
30
+ onOutput({ type: 'stdout', data: output })
31
+ }
32
+ })
33
+
34
+ proc.stderr.on('data', (data) => {
35
+ const output = data.toString()
36
+ if (onOutput) {
37
+ onOutput({ type: 'stderr', data: output })
38
+ }
39
+ })
40
+
41
+ proc.on('close', (code) => {
42
+ if (onComplete) {
43
+ onComplete({ code, signal: null })
44
+ }
45
+ })
46
+
47
+ proc.on('error', (err) => {
48
+ if (onOutput) {
49
+ onOutput({ type: 'error', data: err.message })
50
+ }
51
+ if (onComplete) {
52
+ onComplete({ code: -1, signal: err.signal })
53
+ }
54
+ })
55
+
56
+ // Return kill function
57
+ return () => {
58
+ proc.kill('SIGTERM')
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Execute a next step command (for dashboard automation)
64
+ * @param {string} projectPath - Path to the project directory
65
+ * @param {function} onOutput - Callback for stdout/stderr output
66
+ * @param {function} onComplete - Callback when command completes
67
+ * @returns {function} Kill function to terminate the process
68
+ */
69
+ export function executeNextStep(projectPath, onOutput, onComplete) {
70
+ return executeCommand(projectPath, 'next', onOutput, onComplete)
71
+ }
72
+
73
+ /**
74
+ * Execute a progress status command
75
+ * @param {string} projectPath - Path to the project directory
76
+ * @param {function} onOutput - Callback for stdout/stderr output
77
+ * @param {function} onComplete - Callback when command completes
78
+ * @returns {function} Kill function to terminate the process
79
+ */
80
+ export function executeProgressStatus(projectPath, onOutput, onComplete) {
81
+ return executeCommand(projectPath, 'progress status --json', onOutput, onComplete)
82
+ }
83
+
84
+ /**
85
+ * Execute a reset command for a specific stage
86
+ * @param {string} projectPath - Path to the project directory
87
+ * @param {string} stage - Stage to reset
88
+ * @param {function} onOutput - Callback for stdout/stderr output
89
+ * @param {function} onComplete - Callback when command completes
90
+ * @returns {function} Kill function to terminate the process
91
+ */
92
+ export function executeReset(projectPath, stage, onOutput, onComplete) {
93
+ return executeCommand(projectPath, `progress reset --stage ${stage}`, onOutput, onComplete)
94
+ }
95
+