@winspan/claude-forge 8.53.2 → 8.54.3

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 (390) hide show
  1. package/DEVELOPMENT.md +290 -221
  2. package/README.md +50 -8
  3. package/dist/cli/commands/skills.d.ts.map +1 -1
  4. package/dist/cli/commands/skills.js +7 -3
  5. package/dist/cli/commands/skills.js.map +1 -1
  6. package/dist/cli/init/hook-manager.d.ts +1 -1
  7. package/dist/cli/init/hook-manager.d.ts.map +1 -1
  8. package/dist/cli/init/hook-manager.js +1 -0
  9. package/dist/cli/init/hook-manager.js.map +1 -1
  10. package/dist/core/storage/events.d.ts.map +1 -1
  11. package/dist/core/storage/events.js +0 -1
  12. package/dist/core/storage/events.js.map +1 -1
  13. package/dist/core/storage/maintenance.d.ts +25 -3
  14. package/dist/core/storage/maintenance.d.ts.map +1 -1
  15. package/dist/core/storage/maintenance.js +33 -4
  16. package/dist/core/storage/maintenance.js.map +1 -1
  17. package/dist/core/storage/routing.d.ts +4 -0
  18. package/dist/core/storage/routing.d.ts.map +1 -1
  19. package/dist/core/storage/routing.js +10 -4
  20. package/dist/core/storage/routing.js.map +1 -1
  21. package/dist/core/storage/sessions.d.ts +17 -0
  22. package/dist/core/storage/sessions.d.ts.map +1 -1
  23. package/dist/core/storage/sessions.js +64 -0
  24. package/dist/core/storage/sessions.js.map +1 -1
  25. package/dist/core/storage/skills.d.ts +4 -0
  26. package/dist/core/storage/skills.d.ts.map +1 -1
  27. package/dist/core/storage/skills.js +10 -2
  28. package/dist/core/storage/skills.js.map +1 -1
  29. package/dist/core/storage/sqlite.d.ts +5 -0
  30. package/dist/core/storage/sqlite.d.ts.map +1 -1
  31. package/dist/core/storage/sqlite.js +6 -0
  32. package/dist/core/storage/sqlite.js.map +1 -1
  33. package/dist/core/storage/tasks.d.ts.map +1 -1
  34. package/dist/core/storage/tasks.js +2 -0
  35. package/dist/core/storage/tasks.js.map +1 -1
  36. package/dist/core/types.d.ts +7 -0
  37. package/dist/core/types.d.ts.map +1 -1
  38. package/dist/daemon/index.d.ts.map +1 -1
  39. package/dist/daemon/index.js +19 -4
  40. package/dist/daemon/index.js.map +1 -1
  41. package/dist/skills/registry.d.ts.map +1 -1
  42. package/dist/skills/registry.js +13 -2
  43. package/dist/skills/registry.js.map +1 -1
  44. package/dist/skills/semantic-matcher.d.ts +2 -2
  45. package/dist/skills/semantic-matcher.d.ts.map +1 -1
  46. package/dist/skills/semantic-matcher.js +14 -19
  47. package/dist/skills/semantic-matcher.js.map +1 -1
  48. package/dist/skills/upgrade-engine.d.ts +3 -1
  49. package/dist/skills/upgrade-engine.d.ts.map +1 -1
  50. package/dist/skills/upgrade-engine.js +25 -14
  51. package/dist/skills/upgrade-engine.js.map +1 -1
  52. package/dist/web/analytics/weekly-report.d.ts.map +1 -1
  53. package/dist/web/analytics/weekly-report.js +21 -29
  54. package/dist/web/analytics/weekly-report.js.map +1 -1
  55. package/dist/web/routes/patch.d.ts.map +1 -1
  56. package/dist/web/routes/patch.js +32 -2
  57. package/dist/web/routes/patch.js.map +1 -1
  58. package/dist/web/routes/sessions.d.ts.map +1 -1
  59. package/dist/web/routes/sessions.js +9 -7
  60. package/dist/web/routes/sessions.js.map +1 -1
  61. package/dist/web/routes/trace.d.ts.map +1 -1
  62. package/dist/web/routes/trace.js +2 -3
  63. package/dist/web/routes/trace.js.map +1 -1
  64. package/dist/web/server.d.ts.map +1 -1
  65. package/dist/web/server.js +3 -2
  66. package/dist/web/server.js.map +1 -1
  67. package/package.json +12 -2
  68. package/scripts/postinstall.cjs +21 -0
  69. package/.claude/CLAUDE.md +0 -17
  70. package/.eslintrc.js +0 -23
  71. package/.prettierrc +0 -8
  72. package/ARCHITECTURE_ISSUES.md +0 -249
  73. package/CLAUDE.md +0 -265
  74. package/CLAUDE.md.backup +0 -488
  75. package/docs/concurrent-agents.md +0 -129
  76. package/docs/design/architecture-review-20260516.md +0 -232
  77. package/docs/design/fix-skills-data-and-set-leak-spec-20260516-1300.md +0 -219
  78. package/docs/design/h1-storage-aggregation-spec-20260518-1121.md +0 -299
  79. package/docs/design/h2-getdatabase-encapsulation-spec-20260518-1450.md +0 -191
  80. package/docs/design/h3-fallback-removal-spec-20260518-1245.md +0 -76
  81. package/docs/design/h4-index-dedup-spec-20260518-1230.md +0 -109
  82. package/docs/design/h6-services-migration-spec-20260518-1355.md +0 -82
  83. package/docs/design/hook-failure-queue-spec-20260516-1530.md +0 -204
  84. package/docs/design/l1-swarm-protocol-extract-spec-20260518-1605.md +0 -106
  85. package/docs/design/m10-forge-paths-spec-20260518-1320.md +0 -121
  86. package/docs/design/m2-m3-tool-input-spec-20260518-1425.md +0 -131
  87. package/docs/design/m7-routing-event-association-spec-20260518-1545.md +0 -103
  88. package/docs/design/project-path-gitroot-spec-20260518-1715.md +0 -134
  89. package/docs/design/refactor-phase1-spec-20260515-1600.md +0 -543
  90. package/docs/design/refactor-phase2-spec-20260515-1700.md +0 -424
  91. package/docs/design/skill-ai-upgrade-spec-20260518-1930.md +0 -297
  92. package/docs/design/task-active-gc-spec-20260518-1745.md +0 -146
  93. package/docs/design/tasks-list-filter-pagination-spec-20260518-0930.md +0 -208
  94. package/docs/implementation/daemon-skill-sync-changelog-20260518-2000.md +0 -22
  95. package/docs/implementation/fix-skills-data-and-set-leak-changelog-20260516-1300.md +0 -104
  96. package/docs/implementation/h1-storage-aggregation-changelog-20260518-1121.md +0 -82
  97. package/docs/implementation/h2-final-changelog-20260518-1530.md +0 -61
  98. package/docs/implementation/h2-phase1-safety-net-changelog-20260518-1450.md +0 -70
  99. package/docs/implementation/h2-phase2-operations-changelog-20260518-1450.md +0 -120
  100. package/docs/implementation/h2-phase3-callsites-changelog-20260518-1450.md +0 -71
  101. package/docs/implementation/h3-fallback-removal-changelog-20260518-1245.md +0 -71
  102. package/docs/implementation/h4-index-dedup-changelog-20260518-1230.md +0 -60
  103. package/docs/implementation/h6-services-migration-changelog-20260518-1355.md +0 -46
  104. package/docs/implementation/h7-m9-defaults-changelog-20260518-1300.md +0 -46
  105. package/docs/implementation/hook-failure-queue-changelog-20260516-1530.md +0 -196
  106. package/docs/implementation/hotfix-daemon-event-reject-20260516-1430.md +0 -56
  107. package/docs/implementation/l1-swarm-protocol-extract-changelog-20260518-1605.md +0 -45
  108. package/docs/implementation/l3-l4-daemon-perf-changelog-20260518-1410.md +0 -63
  109. package/docs/implementation/l6-l8-final-cleanup-changelog-20260518-1640.md +0 -38
  110. package/docs/implementation/m1-m4-m5-l7-cleanup-changelog-20260518-1310.md +0 -58
  111. package/docs/implementation/m10-forge-paths-changelog-20260518-1320.md +0 -60
  112. package/docs/implementation/m2-m3-tool-input-changelog-20260518-1425.md +0 -43
  113. package/docs/implementation/m6-m8-naming-shutdown-changelog-20260518-1340.md +0 -56
  114. package/docs/implementation/m7-routing-association-changelog-20260518-1545.md +0 -69
  115. package/docs/implementation/project-path-gitroot-changelog-20260518-1715.md +0 -63
  116. package/docs/implementation/refactor-phase1-changelog-20260515-1630.md +0 -354
  117. package/docs/implementation/refactor-phase2-changelog-20260515-1705.md +0 -421
  118. package/docs/implementation/skill-ai-upgrade-changelog-20260518-1930.md +0 -49
  119. package/docs/implementation/task-active-gc-changelog-20260518-1745.md +0 -35
  120. package/docs/implementation/task-title-summary-changelog-20260518-1130.md +0 -39
  121. package/docs/implementation/tasks-detail-back-loses-filters-changelog-20260518-1100.md +0 -22
  122. package/docs/implementation/tasks-list-filter-pagination-changelog-20260518-0930.md +0 -72
  123. package/docs/implementation/tasks-page-white-screen-hotfix-changelog-20260518-1015.md +0 -56
  124. package/docs/reviews/claudemd-template-sync.md +0 -54
  125. package/docs/reviews/task-title-summary.md +0 -92
  126. package/docs/reviews/tasks-detail-back-loses-filters.md +0 -58
  127. package/docs/reviews/tasks-filter-pagination.md +0 -80
  128. package/docs/reviews/tasks-page-white-screen-hotfix.md +0 -126
  129. package/docs/ruflo-learning-strategy.md +0 -322
  130. package/docs/skills-deduplication-analysis.md +0 -83
  131. package/docs/skills-multiformat-support.md +0 -177
  132. package/docs/skills-third-party.md +0 -183
  133. package/docs/testing/tasks-filter-pagination-test-report.md +0 -86
  134. package/forge +0 -321
  135. package/playwright.config.ts +0 -40
  136. package/scripts/demo-v2.ts +0 -91
  137. package/scripts/dev-daemon.sh +0 -232
  138. package/scripts/dev-web.ts +0 -109
  139. package/scripts/e2e-mcp-link.ts +0 -423
  140. package/scripts/e2e-methodology-quality.ts +0 -253
  141. package/scripts/e2e-routing.ts +0 -456
  142. package/scripts/e2e-user-methodology.ts +0 -326
  143. package/scripts/e2e-web-workflows.ts +0 -299
  144. package/scripts/migrate-legacy-to-dynamic.sql +0 -108
  145. package/scripts/regenerate-execution-docs.ts +0 -116
  146. package/scripts/sync-agent-skills.ts +0 -193
  147. package/scripts/test-hook.sh +0 -71
  148. package/scripts/verify-skill-loading.ts +0 -62
  149. package/src/claudemd/claudemd-generator.ts +0 -568
  150. package/src/claudemd/convention-extractor.ts +0 -69
  151. package/src/claudemd/index.ts +0 -35
  152. package/src/claudemd/persona-manager.ts +0 -88
  153. package/src/claudemd/resume-manager.ts +0 -236
  154. package/src/claudemd/tech-detector.ts +0 -220
  155. package/src/claudemd/templates/swarm-protocol.md +0 -222
  156. package/src/cli/commands/claudemd.ts +0 -84
  157. package/src/cli/commands/config.ts +0 -46
  158. package/src/cli/commands/daemon.ts +0 -310
  159. package/src/cli/commands/executions.ts +0 -115
  160. package/src/cli/commands/init.ts +0 -204
  161. package/src/cli/commands/logs.ts +0 -181
  162. package/src/cli/commands/mcp.ts +0 -242
  163. package/src/cli/commands/menu.ts +0 -357
  164. package/src/cli/commands/skills.ts +0 -328
  165. package/src/cli/commands/stats.ts +0 -73
  166. package/src/cli/commands/status.ts +0 -69
  167. package/src/cli/commands/template.ts +0 -77
  168. package/src/cli/commands/trace.ts +0 -148
  169. package/src/cli/index.ts +0 -42
  170. package/src/cli/init/hook-manager.ts +0 -132
  171. package/src/core/ai/provider.ts +0 -308
  172. package/src/core/ai/types.ts +0 -51
  173. package/src/core/config.ts +0 -124
  174. package/src/core/constants.ts +0 -67
  175. package/src/core/event-fields.ts +0 -32
  176. package/src/core/queue/index.ts +0 -192
  177. package/src/core/storage/base.ts +0 -302
  178. package/src/core/storage/events.ts +0 -434
  179. package/src/core/storage/injections.ts +0 -78
  180. package/src/core/storage/maintenance.ts +0 -59
  181. package/src/core/storage/migrations/002_add_skill_tracking.sql +0 -6
  182. package/src/core/storage/migrations/003_add_skill_invocations.sql +0 -23
  183. package/src/core/storage/performance-indexes.sql +0 -23
  184. package/src/core/storage/routing.ts +0 -322
  185. package/src/core/storage/rows.ts +0 -112
  186. package/src/core/storage/schema.sql +0 -224
  187. package/src/core/storage/sessions.ts +0 -168
  188. package/src/core/storage/skills.ts +0 -233
  189. package/src/core/storage/sqlite.ts +0 -293
  190. package/src/core/storage/tasks.ts +0 -318
  191. package/src/core/storage/token-usage.ts +0 -93
  192. package/src/core/types.ts +0 -181
  193. package/src/core/utils/error-handler.ts +0 -257
  194. package/src/core/utils/forge-resume-block.ts +0 -74
  195. package/src/core/utils/format.ts +0 -69
  196. package/src/core/utils/git.ts +0 -23
  197. package/src/core/utils/logger.ts +0 -134
  198. package/src/core/utils/lru-cache.ts +0 -54
  199. package/src/core/utils/path.ts +0 -19
  200. package/src/core/utils/session.ts +0 -26
  201. package/src/core/utils/time.ts +0 -37
  202. package/src/core/utils/token-tracker.ts +0 -97
  203. package/src/daemon/event-parser.ts +0 -36
  204. package/src/daemon/handlers/history-exporter.ts +0 -117
  205. package/src/daemon/handlers/post-tool-use.ts +0 -54
  206. package/src/daemon/handlers/stop.ts +0 -208
  207. package/src/daemon/handlers/user-prompt.ts +0 -178
  208. package/src/daemon/hook-sync.ts +0 -91
  209. package/src/daemon/index.ts +0 -312
  210. package/src/daemon/launchd/com.claude-forge.daemon.plist.template +0 -47
  211. package/src/daemon/launchd-installer.ts +0 -260
  212. package/src/daemon/lifecycle.ts +0 -128
  213. package/src/daemon/router.ts +0 -40
  214. package/src/daemon/server.ts +0 -196
  215. package/src/daemon/services/task-segmenter.ts +0 -112
  216. package/src/daemon/skill-sync.ts +0 -88
  217. package/src/hooks/hook-lib.sh +0 -118
  218. package/src/hooks/notification.sh +0 -35
  219. package/src/hooks/post-tool-use.sh +0 -61
  220. package/src/hooks/pre-tool-use.sh +0 -63
  221. package/src/hooks/stop.sh +0 -43
  222. package/src/hooks/user-prompt-submit.sh +0 -69
  223. package/src/mcp/server.ts +0 -322
  224. package/src/skills/index.ts +0 -2
  225. package/src/skills/invocation-guard.ts +0 -177
  226. package/src/skills/matcher.ts +0 -148
  227. package/src/skills/official/code-simplifier.md +0 -52
  228. package/src/skills/official/find-skills.md +0 -142
  229. package/src/skills/official/official-api-design.md +0 -30
  230. package/src/skills/official/official-architecture-decision.md +0 -41
  231. package/src/skills/official/official-bmad.md +0 -118
  232. package/src/skills/official/official-db-schema-design.md +0 -34
  233. package/src/skills/official/official-debug.md +0 -25
  234. package/src/skills/official/official-doc-driven.md +0 -31
  235. package/src/skills/official/official-harness-engineering.md +0 -108
  236. package/src/skills/official/official-performance-optimization.md +0 -30
  237. package/src/skills/official/official-pr-review.md +0 -35
  238. package/src/skills/official/official-release-checklist.md +0 -30
  239. package/src/skills/official/official-security-hardening.md +0 -32
  240. package/src/skills/official/official-spec-driven-design.md +0 -31
  241. package/src/skills/official/planning-with-files.md +0 -241
  242. package/src/skills/official/ui-ux-pro-max.md +0 -105
  243. package/src/skills/official/webapp-testing.md +0 -96
  244. package/src/skills/official-skills.ts +0 -89
  245. package/src/skills/registry.ts +0 -355
  246. package/src/skills/semantic-matcher.ts +0 -234
  247. package/src/skills/tools/pipeline-suggest.ts +0 -226
  248. package/src/skills/tools/skill-invoke.ts +0 -168
  249. package/src/skills/tools/skill-list.ts +0 -59
  250. package/src/skills/upgrade-engine.ts +0 -541
  251. package/src/skills/upgrade-prompt.ts +0 -84
  252. package/src/templates/go.yaml +0 -53
  253. package/src/templates/python.yaml +0 -59
  254. package/src/templates/react.yaml +0 -55
  255. package/src/templates/template-manager.ts +0 -170
  256. package/src/web/analytics/anti-pattern-detector.ts +0 -367
  257. package/src/web/analytics/drift-detector.ts +0 -219
  258. package/src/web/analytics/weekly-report.ts +0 -431
  259. package/src/web/auth-middleware.ts +0 -54
  260. package/src/web/routes/_helpers.ts +0 -34
  261. package/src/web/routes/ai.ts +0 -204
  262. package/src/web/routes/auth.ts +0 -22
  263. package/src/web/routes/drift.ts +0 -25
  264. package/src/web/routes/error-handler.ts +0 -120
  265. package/src/web/routes/events.ts +0 -47
  266. package/src/web/routes/insights.ts +0 -43
  267. package/src/web/routes/patch.ts +0 -117
  268. package/src/web/routes/reports.ts +0 -34
  269. package/src/web/routes/rules.ts +0 -76
  270. package/src/web/routes/sessions.ts +0 -250
  271. package/src/web/routes/skill-stats.ts +0 -92
  272. package/src/web/routes/skills.ts +0 -350
  273. package/src/web/routes/static.ts +0 -67
  274. package/src/web/routes/stats.ts +0 -50
  275. package/src/web/routes/status.ts +0 -30
  276. package/src/web/routes/tasks.ts +0 -193
  277. package/src/web/routes/token-usage.ts +0 -20
  278. package/src/web/routes/trace.ts +0 -126
  279. package/src/web/routes/types.ts +0 -57
  280. package/src/web/server.ts +0 -134
  281. package/src/web/ssrf-guard.ts +0 -112
  282. package/src/web/static/index.html +0 -3251
  283. package/src/web/static/vendor/chart.umd.min.js +0 -20
  284. package/tests/e2e/dashboard.spec.ts +0 -205
  285. package/tests/e2e/routing-skill-e2e.test.ts +0 -39
  286. package/tests/helpers/mock-ai.ts +0 -92
  287. package/tests/helpers/mock-storage.ts +0 -159
  288. package/tests/integration/claudemd-generator.test.ts +0 -90
  289. package/tests/integration/queue-replay.integration.test.ts +0 -193
  290. package/tests/integration/tasks-filter.integration.test.ts +0 -154
  291. package/tests/integration/web-analytics.integration.test.ts +0 -133
  292. package/tests/integration/web-stats.integration.test.ts +0 -135
  293. package/tests/integration/web-trace.integration.test.ts +0 -175
  294. package/tests/performance/database.benchmark.ts +0 -161
  295. package/tests/semantic-matcher.test.ts +0 -99
  296. package/tests/skill-matcher.test.ts +0 -110
  297. package/tests/unit/ai-provider-retry.test.ts +0 -194
  298. package/tests/unit/ai-provider-vision.test.ts +0 -224
  299. package/tests/unit/claudemd-generator.test.ts +0 -68
  300. package/tests/unit/cli-mcp.test.ts +0 -141
  301. package/tests/unit/core/forge-paths.test.ts +0 -99
  302. package/tests/unit/daemon/hook-sync.test.ts +0 -71
  303. package/tests/unit/daemon/post-tool-use.test.ts +0 -121
  304. package/tests/unit/daemon/skill-sync.test.ts +0 -75
  305. package/tests/unit/daemon/stop-handler-behavior-summary.test.ts +0 -202
  306. package/tests/unit/daemon/task-segmenter-recover.test.ts +0 -84
  307. package/tests/unit/event-fields.test.ts +0 -88
  308. package/tests/unit/event-parser.test.ts +0 -55
  309. package/tests/unit/handlers.test.ts +0 -171
  310. package/tests/unit/hooks/resolve-project-path.test.ts +0 -122
  311. package/tests/unit/invocation-guard.test.ts +0 -125
  312. package/tests/unit/queue.test.ts +0 -272
  313. package/tests/unit/router.test.ts +0 -138
  314. package/tests/unit/security.test.ts +0 -128
  315. package/tests/unit/skill-invocations-workflow.test.ts +0 -495
  316. package/tests/unit/skill-registry.test.ts +0 -94
  317. package/tests/unit/skills/invocation-guard-ttl.test.ts +0 -211
  318. package/tests/unit/skills/official-skills-loader.test.ts +0 -126
  319. package/tests/unit/skills/registry-multiformat.test.ts +0 -92
  320. package/tests/unit/skills/upgrade-engine-parse.test.ts +0 -138
  321. package/tests/unit/skills/upgrade-engine.test.ts +0 -401
  322. package/tests/unit/skills/upgrade-prompt.test.ts +0 -89
  323. package/tests/unit/socket-server.test.ts +0 -183
  324. package/tests/unit/storage/event-operations-aggregates.test.ts +0 -342
  325. package/tests/unit/storage/migration-idempotent.test.ts +0 -304
  326. package/tests/unit/storage/routing-aggregates.test.ts +0 -276
  327. package/tests/unit/storage/routing.test.ts +0 -117
  328. package/tests/unit/storage/schema-missing.test.ts +0 -81
  329. package/tests/unit/storage/session-operations-aggregates.test.ts +0 -120
  330. package/tests/unit/storage/sessions-aggregate.test.ts +0 -435
  331. package/tests/unit/storage/skill-operations-counts.test.ts +0 -106
  332. package/tests/unit/storage/skills-aggregates.test.ts +0 -104
  333. package/tests/unit/storage/sqlite-refactor-harness.test.ts +0 -314
  334. package/tests/unit/storage/task-operations-counts.test.ts +0 -46
  335. package/tests/unit/storage/tasks-getById.test.ts +0 -343
  336. package/tests/unit/storage/tasks-stale-gc.test.ts +0 -86
  337. package/tests/unit/storage.test.ts +0 -172
  338. package/tests/unit/token-usage.test.ts +0 -144
  339. package/tests/unit/type-guards.test.ts +0 -201
  340. package/tests/unit/utils/format.test.ts +0 -189
  341. package/tests/unit/utils/session.test.ts +0 -89
  342. package/tests/unit/utils/time.test.ts +0 -112
  343. package/tests/unit/web/navigation-back-contract.test.ts +0 -134
  344. package/tests/unit/web/routes-auth.test.ts +0 -93
  345. package/tests/unit/web/routes-events.test.ts +0 -101
  346. package/tests/unit/web/routes-rules.test.ts +0 -182
  347. package/tests/unit/web/routes-sessions.test.ts +0 -181
  348. package/tests/unit/web/routes-skill-stats.test.ts +0 -179
  349. package/tests/unit/web/routes-stats.test.ts +0 -92
  350. package/tests/unit/web/routes-tasks.test.ts +0 -385
  351. package/tests/unit/web/task-title-contract.test.ts +0 -210
  352. package/tests/unit/web/tasks-component-contract.test.ts +0 -179
  353. package/tsconfig.json +0 -22
  354. package/vitest.config.ts +0 -21
  355. package/vitest.integration.config.ts +0 -16
  356. package/web/CLAUDE.md +0 -20
  357. package/web/index.html +0 -13
  358. package/web/package-lock.json +0 -4854
  359. package/web/package.json +0 -35
  360. package/web/postcss.config.js +0 -6
  361. package/web/src/App.tsx +0 -110
  362. package/web/src/components/CodeBlock.tsx +0 -31
  363. package/web/src/components/Confirm.tsx +0 -96
  364. package/web/src/components/Drawer.tsx +0 -60
  365. package/web/src/components/Layout.tsx +0 -145
  366. package/web/src/components/MarkdownRenderer.tsx +0 -77
  367. package/web/src/components/SearchInput.tsx +0 -31
  368. package/web/src/components/SessionDetailContent.tsx +0 -157
  369. package/web/src/components/Toast.tsx +0 -92
  370. package/web/src/index.css +0 -19
  371. package/web/src/main.tsx +0 -31
  372. package/web/src/pages/AIConfig.tsx +0 -233
  373. package/web/src/pages/Dashboard.tsx +0 -572
  374. package/web/src/pages/Events.tsx +0 -271
  375. package/web/src/pages/Reports.tsx +0 -428
  376. package/web/src/pages/SessionDetail.tsx +0 -162
  377. package/web/src/pages/Sessions.tsx +0 -205
  378. package/web/src/pages/Skills.tsx +0 -180
  379. package/web/src/pages/TaskDetail.tsx +0 -515
  380. package/web/src/pages/Tasks.tsx +0 -415
  381. package/web/src/utils/auth.ts +0 -59
  382. package/web/src/utils/export.ts +0 -54
  383. package/web/src/utils/navigation.ts +0 -25
  384. package/web/src/utils/task-title.ts +0 -49
  385. package/web/src/utils/time.ts +0 -13
  386. package/web/tailwind.config.js +0 -11
  387. package/web/tsconfig.json +0 -21
  388. package/web/tsconfig.node.json +0 -10
  389. package/web/vite.config.ts +0 -76
  390. package/winspan-claude-forge-8.43.0.tgz +0 -0
@@ -1,142 +0,0 @@
1
- ---
2
- name: find-skills
3
- description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
4
- ---
5
-
6
- # Find Skills
7
-
8
- This skill helps you discover and install skills from the open agent skills ecosystem.
9
-
10
- ## When to Use This Skill
11
-
12
- Use this skill when the user:
13
-
14
- - Asks "how do I do X" where X might be a common task with an existing skill
15
- - Says "find a skill for X" or "is there a skill for X"
16
- - Asks "can you do X" where X is a specialized capability
17
- - Expresses interest in extending agent capabilities
18
- - Wants to search for tools, templates, or workflows
19
- - Mentions they wish they had help with a specific domain (design, testing, deployment, etc.)
20
-
21
- ## What is the Skills CLI?
22
-
23
- The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools.
24
-
25
- **Key commands:**
26
-
27
- - `npx skills find [query]` - Search for skills interactively or by keyword
28
- - `npx skills add <package>` - Install a skill from GitHub or other sources
29
- - `npx skills check` - Check for skill updates
30
- - `npx skills update` - Update all installed skills
31
-
32
- **Browse skills at:** https://skills.sh/
33
-
34
- ## How to Help Users Find Skills
35
-
36
- ### Step 1: Understand What They Need
37
-
38
- When a user asks for help with something, identify:
39
-
40
- 1. The domain (e.g., React, testing, design, deployment)
41
- 2. The specific task (e.g., writing tests, creating animations, reviewing PRs)
42
- 3. Whether this is a common enough task that a skill likely exists
43
-
44
- ### Step 2: Check the Leaderboard First
45
-
46
- Before running a CLI search, check the [skills.sh leaderboard](https://skills.sh/) to see if a well-known skill already exists for the domain. The leaderboard ranks skills by total installs, surfacing the most popular and battle-tested options.
47
-
48
- For example, top skills for web development include:
49
- - `vercel-labs/agent-skills` — React, Next.js, web design (100K+ installs each)
50
- - `anthropics/skills` — Frontend design, document processing (100K+ installs)
51
-
52
- ### Step 3: Search for Skills
53
-
54
- If the leaderboard doesn't cover the user's need, run the find command:
55
-
56
- ```bash
57
- npx skills find [query]
58
- ```
59
-
60
- For example:
61
-
62
- - User asks "how do I make my React app faster?" → `npx skills find react performance`
63
- - User asks "can you help me with PR reviews?" → `npx skills find pr review`
64
- - User asks "I need to create a changelog" → `npx skills find changelog`
65
-
66
- ### Step 4: Verify Quality Before Recommending
67
-
68
- **Do not recommend a skill based solely on search results.** Always verify:
69
-
70
- 1. **Install count** — Prefer skills with 1K+ installs. Be cautious with anything under 100.
71
- 2. **Source reputation** — Official sources (`vercel-labs`, `anthropics`, `microsoft`) are more trustworthy than unknown authors.
72
- 3. **GitHub stars** — Check the source repository. A skill from a repo with <100 stars should be treated with skepticism.
73
-
74
- ### Step 5: Present Options to the User
75
-
76
- When you find relevant skills, present them to the user with:
77
-
78
- 1. The skill name and what it does
79
- 2. The install count and source
80
- 3. The install command they can run
81
- 4. A link to learn more at skills.sh
82
-
83
- Example response:
84
-
85
- ```
86
- I found a skill that might help! The "react-best-practices" skill provides
87
- React and Next.js performance optimization guidelines from Vercel Engineering.
88
- (185K installs)
89
-
90
- To install it:
91
- npx skills add vercel-labs/agent-skills@react-best-practices
92
-
93
- Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-practices
94
- ```
95
-
96
- ### Step 6: Offer to Install
97
-
98
- If the user wants to proceed, you can install the skill for them:
99
-
100
- ```bash
101
- npx skills add <owner/repo@skill> -g -y
102
- ```
103
-
104
- The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts.
105
-
106
- ## Common Skill Categories
107
-
108
- When searching, consider these common categories:
109
-
110
- | Category | Example Queries |
111
- | --------------- | ---------------------------------------- |
112
- | Web Development | react, nextjs, typescript, css, tailwind |
113
- | Testing | testing, jest, playwright, e2e |
114
- | DevOps | deploy, docker, kubernetes, ci-cd |
115
- | Documentation | docs, readme, changelog, api-docs |
116
- | Code Quality | review, lint, refactor, best-practices |
117
- | Design | ui, ux, design-system, accessibility |
118
- | Productivity | workflow, automation, git |
119
-
120
- ## Tips for Effective Searches
121
-
122
- 1. **Use specific keywords**: "react testing" is better than just "testing"
123
- 2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd"
124
- 3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills`
125
-
126
- ## When No Skills Are Found
127
-
128
- If no relevant skills exist:
129
-
130
- 1. Acknowledge that no existing skill was found
131
- 2. Offer to help with the task directly using your general capabilities
132
- 3. Suggest the user could create their own skill with `npx skills init`
133
-
134
- Example:
135
-
136
- ```
137
- I searched for skills related to "xyz" but didn't find any matches.
138
- I can still help you with this task directly! Would you like me to proceed?
139
-
140
- If this is something you do often, you could create your own skill:
141
- npx skills init my-xyz-skill
142
- ```
@@ -1,30 +0,0 @@
1
- ---
2
- name: official-api-design
3
- version: 1.0.0
4
- description: "API 设计规范:RESTful/RPC 接口设计最佳实践"
5
- tags: [api, rest, design, backend]
6
- ---
7
-
8
- # API 设计规范
9
-
10
- ## 设计顺序
11
- 1. 先定义资源和操作(不要先想 URL)
12
- 2. 写 OpenAPI/Protobuf 规格
13
- 3. 用 mock 验证调用方能用
14
- 4. 再实现
15
-
16
- ## RESTful 规范
17
- - URL 用名词复数:`/users`,不用动词 `/getUser`
18
- - 用 HTTP 动词表达操作:GET/POST/PUT/PATCH/DELETE
19
- - 错误返回统一结构:`{ code, message, data }`
20
- - 分页用 `?page=1&size=20`,返回 `total`
21
-
22
- ## 版本管理
23
- - URL 版本:`/api/v1/users`(推荐)
24
- - 破坏性变更必须升版本
25
-
26
- ## 通用原则
27
- - 幂等性:PUT/DELETE 必须幂等
28
- - 认证统一走 Authorization header
29
- - 敏感字段不出现在 URL(用 body)
30
- - 响应时间 P99 < 200ms,超时统一 30s
@@ -1,41 +0,0 @@
1
- ---
2
- name: official-architecture-decision
3
- version: 1.0.0
4
- description: "架构决策记录(ADR):结构化记录重要技术决策"
5
- tags: [architecture, adr, design, decision]
6
- ---
7
-
8
- # 架构决策记录(ADR)
9
-
10
- 每个重要的技术决策都应该留下可追溯的记录。
11
-
12
- ## 何时写 ADR
13
- - 技术选型(框架、数据库、消息队列)
14
- - 系统边界划分
15
- - 接口协议选择
16
- - 影响超过 1 个模块的设计决策
17
-
18
- ## ADR 模板
19
-
20
- ```markdown
21
- # ADR-{编号}: {标题}
22
-
23
- ## 状态
24
- Proposed / Accepted / Deprecated
25
-
26
- ## 背景
27
- 为什么需要做这个决策?当前面临什么问题?
28
-
29
- ## 决策
30
- 我们选择做什么?
31
-
32
- ## 备选方案
33
- 考虑过哪些其他方案?为什么没选?
34
-
35
- ## 后果
36
- 这个决策带来什么好处?有什么代价或风险?
37
- ```
38
-
39
- ## 规则
40
- - ADR 一旦 Accepted 不得修改,只能新建 ADR 来废弃或替代
41
- - 存放在项目 `docs/adr/` 目录
@@ -1,118 +0,0 @@
1
- ---
2
- name: official-bmad
3
- version: 1.0.1
4
- description: "BMAD 方法论:四角色敏捷协作指南(完整四阶段流程)"
5
- tags: [bmad, agile, four-role, collaboration]
6
- ---
7
-
8
- # BMAD 方法论(Four-Role Agile)
9
-
10
- BMAD 是一种四角色敏捷协作模式,适用于复杂功能开发和端到端的用户故事实现。
11
-
12
- ## 核心理念
13
-
14
- 通过明确的角色划分和阶段流程,确保需求、设计、实现和评审的质量。
15
-
16
- ## 四个角色
17
-
18
- 1. **Business(业务/产品经理)**:定义需求和验收标准
19
- 2. **Maker(实现者/开发者)**:编写代码和实现功能
20
- 3. **Architect(架构师)**:设计系统结构和接口
21
- 4. **Developer(开发/集成者)**:集成和测试
22
-
23
- ---
24
-
25
- ## 阶段 1:分析(Analyze)
26
-
27
- **角色**:Business + Architect
28
-
29
- **目标**:澄清需求,识别技术约束和依赖。
30
-
31
- **步骤**:
32
- 1. 澄清需求(用户故事、验收标准)
33
- 2. 识别技术约束和依赖
34
- 3. 评估风险和可行性
35
- 4. 定义输入输出和边界条件
36
-
37
- **输出**:需求文档(requirements document)
38
-
39
- **建议**:调用 `researcher` 或 `planner` Agent
40
-
41
- ---
42
-
43
- ## 阶段 2:设计(Design)
44
-
45
- **角色**:Architect + Developer
46
-
47
- **目标**:设计技术方案和模块结构。
48
-
49
- **步骤**:
50
- 1. 设计模块划分和接口
51
- 2. 选择技术栈和工具
52
- 3. 制定实施计划
53
- 4. 设计数据流和架构图
54
- 5. 定义模块间的接口契约
55
-
56
- **输出**:设计文档(design document)
57
-
58
- **建议**:调用 `planner` Agent
59
-
60
- ---
61
-
62
- ## 阶段 3:实现(Implement)
63
-
64
- **角色**:Maker + Developer
65
-
66
- **目标**:按设计编写代码并集成。
67
-
68
- **步骤**:
69
- 1. 按设计编写代码
70
- 2. 编写单元测试
71
- 3. 遵循编码规范
72
- 4. 集成到主分支
73
- 5. 编写清晰、可维护的代码
74
-
75
- **输出**:可运行的代码和测试
76
-
77
- **建议**:调用 `coder` 或 `feature-developer` Agent
78
-
79
- ---
80
-
81
- ## 阶段 4:评审(Review)
82
-
83
- **角色**:全员(Tech Lead 主导)
84
-
85
- **目标**:确保代码质量、安全性和可维护性。
86
-
87
- **步骤**:
88
- 1. Code review(检查代码质量)
89
- 2. 功能验收(Business 验证是否满足需求)
90
- 3. 技术债评估(Architect 审查架构合理性)
91
- 4. 安全性检查
92
- 5. 性能评估
93
-
94
- **输出**:评审报告(review report)
95
-
96
- **建议**:调用 `reviewer` Agent
97
-
98
- ---
99
-
100
- ## 何时使用
101
-
102
- - 跨职能团队协作
103
- - 复杂功能需要多角色参与
104
- - 需要明确的职责划分
105
- - 用户故事级别的完整功能开发
106
- - Sprint 迭代开发
107
- - 端到端(end-to-end)功能实现
108
-
109
- ## 决策规则
110
-
111
- - **简单功能**(complexity: simple):只需实现阶段
112
- - **中等功能**(complexity: moderate):设计 + 实现 + 评审
113
- - **复杂功能**(complexity: complex):完整四阶段流程
114
-
115
- ## 参考
116
-
117
- - BMAD Framework: https://bmad.dev
118
- - Four-Role Agile Development Methodology
@@ -1,34 +0,0 @@
1
- ---
2
- name: official-db-schema-design
3
- version: 1.0.0
4
- description: "数据库 Schema 设计:建模、迁移和演进最佳实践"
5
- tags: [database, schema, sql, migration]
6
- ---
7
-
8
- # 数据库 Schema 设计
9
-
10
- ## 设计原则
11
- - 先建模(ER 图),再建表
12
- - 每张表只表达一个实体
13
- - 外键约束在数据库层面强制
14
-
15
- ## 命名规范
16
- - 表名:snake_case 复数(`user_profiles`)
17
- - 主键:`id`(自增或 UUID)
18
- - 时间戳:`created_at`、`updated_at`(每张表必有)
19
- - 软删除:`deleted_at` nullable
20
-
21
- ## 索引策略
22
- - 外键列必须建索引
23
- - 高频查询的 WHERE 条件列建索引
24
- - 复合索引遵循最左前缀原则
25
-
26
- ## 迁移规范
27
- - 每次变更写迁移文件,不手动改生产库
28
- - 迁移必须可回滚(写 down migration)
29
- - 破坏性变更分三步:加新列 → 双写 → 删旧列
30
-
31
- ## 常见陷阱
32
- - 不用 `ENUM` 类型,用关联表或字符串
33
- - JSON 列只存真正非结构化数据
34
- - 避免 EAV 模式(Entity-Attribute-Value)
@@ -1,25 +0,0 @@
1
- ---
2
- name: official-debug
3
- version: 1.2.0
4
- description: "系统化调试工作流:复现、隔离、修复、验证"
5
- tags: [debug, troubleshooting]
6
- ---
7
-
8
- # 系统化调试
9
-
10
- ## 步骤
11
-
12
- 1. **复现** — 确认 bug 可稳定复现
13
- - 记录:环境、输入、期望行为、实际行为
14
-
15
- 2. **隔离** — 缩小根因范围
16
- - 二分法排查代码路径
17
- - 检查近期变更(`git bisect`)
18
- - 加日志,不要靠猜
19
-
20
- 3. **假设** — 清晰陈述假设再验证,每次只验证一个
21
-
22
- 4. **修复** — 最小化修复,解决根本原因
23
- - 修复前先写一个能复现 bug 的测试
24
-
25
- 5. **验证** — 原始 bug 消失 + 无回归 + 测试通过
@@ -1,31 +0,0 @@
1
- ---
2
- name: official-doc-driven
3
- version: 1.0.0
4
- description: "文档驱动开发:先写文档再写代码,保持文档与代码同步"
5
- tags: [documentation, doc-driven, readme]
6
- ---
7
-
8
- # 文档驱动开发
9
-
10
- ## 核心理念
11
- 如果你无法清晰地写出来,说明你还没想清楚。先写文档,逼自己想清楚再动手。
12
-
13
- ## 步骤
14
-
15
- 1. **写 README 先于代码**
16
- - 描述模块是什么、解决什么问题
17
- - 写出使用示例(即使 API 还不存在)
18
- - 示例写起来别扭 = 设计有问题
19
-
20
- 2. **接口文档先于实现**
21
- - 函数签名 + JSDoc/注释先写
22
- - 参数、返回值、异常都要说明
23
-
24
- 3. **保持同步**
25
- - 代码变更时同步更新文档
26
- - PR 模板加入"文档是否已更新"检查项
27
-
28
- ## 文档层级
29
- - README:模块概述 + 快速开始
30
- - ARCHITECTURE.md:系统设计和关键决策
31
- - 代码注释:解释"为什么",不解释"是什么"
@@ -1,108 +0,0 @@
1
- ---
2
- name: official-harness-engineering
3
- version: 2.0.1
4
- description: "Harness Engineering:为遗留代码建立测试防护网再安全修改(四阶段完整指南)"
5
- tags: [harness, testing, legacy, refactor]
6
- ---
7
-
8
- # Harness Engineering 方法论
9
-
10
- 当需要重构遗留代码(尤其是缺少测试的代码)时,按以下四阶段推进。
11
-
12
- ## 核心理念
13
-
14
- 在修改任何现有代码前,先建立测试防护网(harness),确保改动不破坏现有行为。
15
-
16
- ## 与 TDD 的区别
17
- - TDD 用于新功能开发(先测试后实现)
18
- - Harness Engineering 用于改动现有代码(先理解后保护再修改)
19
-
20
- ---
21
-
22
- ## 阶段 1:理解现有实现(Understand)
23
-
24
- **目标**:深入理解代码的当前行为和依赖关系。
25
-
26
- **步骤**:
27
- 1. 阅读目标代码,识别关键逻辑和边界条件
28
- 2. 绘制依赖关系图(哪些模块依赖这段代码)
29
- 3. 识别潜在的副作用和隐藏依赖
30
- 4. 找到所有入口点和输出点
31
- 5. 记录边界条件和隐含假设
32
-
33
- **输出**:行为文档(behavior document),记录当前实际行为
34
-
35
- **建议**:调用 `researcher` Agent 进行深度分析
36
-
37
- ---
38
-
39
- ## 阶段 2:建立特征测试(Characterize)
40
-
41
- **目标**:为现有行为建立测试"安全网"。
42
-
43
- **步骤**:
44
- 1. 编写特征测试(Characterization Tests)— 记录当前行为,无论对错
45
- 2. 覆盖所有已知的输入输出组合
46
- 3. 覆盖所有主要代码路径
47
- 4. 确保测试全绿(即使代码有 bug,先记录现状)
48
- 5. 目标覆盖率 > 80%
49
-
50
- **关键原则**:
51
- - 测试描述"代码现在做什么",不是"应该做什么"
52
- - 全部通过后才能继续下一阶段
53
-
54
- **建议**:调用 `tester` Agent 编写测试
55
-
56
- ---
57
-
58
- ## 阶段 3:安全重构(Refactor)
59
-
60
- **目标**:在测试保护下进行重构。
61
-
62
- **步骤**:
63
- 1. 小步重构(每次改动后立即运行测试)
64
- 2. 消除重复代码、提取函数、改善命名
65
- 3. 保持测试全绿
66
- 4. 每次只改一处,改完立即运行 harness
67
- 5. 测试失败 = 立即回滚,不要积累未验证的变更
68
-
69
- **重构优先级**:
70
- - 消除重复代码
71
- - 提取函数和模块
72
- - 改善命名和注释
73
- - 简化复杂逻辑
74
-
75
- **建议**:调用 `refactor-specialist` Agent 执行重构
76
-
77
- ---
78
-
79
- ## 阶段 4:验证重构结果(Verify)
80
-
81
- **目标**:确认重构没有破坏功能。
82
-
83
- **步骤**:
84
- 1. 运行完整测试套件
85
- 2. 手动验证关键路径
86
- 3. Code review
87
- 4. 对比原始行为文档,确认行为一致性
88
- 5. 逐步替换:新行为用新测试覆盖,旧 harness 逐步退役
89
-
90
- ---
91
-
92
- ## 何时使用
93
-
94
- - 遗留代码缺少测试
95
- - 代码复杂度高,不敢直接改
96
- - 需要大规模重构但风险高
97
- - 接手不熟悉的代码库
98
- - 修改高风险核心模块
99
-
100
- ## 决策规则
101
-
102
- - **简单重构**(complexity: simple):跳过理解阶段,直接建立特征测试
103
- - **中等重构**(complexity: moderate):完整四阶段流程
104
- - **复杂迁移**(complexity: complex):完整四阶段流程,额外谨慎
105
-
106
- ## 参考
107
-
108
- - Michael Feathers, *Working Effectively with Legacy Code*
@@ -1,30 +0,0 @@
1
- ---
2
- name: official-performance-optimization
3
- version: 1.0.0
4
- description: "性能优化工作流:先度量再优化,数据驱动"
5
- tags: [performance, optimization, profiling]
6
- ---
7
-
8
- # 性能优化
9
-
10
- ## 黄金法则
11
- **永远先度量,再优化。** 没有数据的优化是猜测。
12
-
13
- ## 步骤
14
-
15
- 1. **建立基线** — 用真实数据测量当前性能
16
- - 定义指标:延迟(P50/P95/P99)、吞吐量、内存
17
-
18
- 2. **找瓶颈** — Profile,不要猜
19
- - CPU:火焰图;内存:heap 分析;I/O:慢查询日志
20
-
21
- 3. **优化** — 从收益最大的瓶颈开始
22
- - 算法复杂度 > 减少 I/O > 缓存 > 并发
23
-
24
- 4. **验证** — 对比基线,功能测试全部通过
25
-
26
- ## 常见优化方向(按收益排序)
27
- - 数据库:索引、消除 N+1、连接池
28
- - 缓存:热点数据、计算结果
29
- - 异步化:I/O 密集型操作
30
- - 批处理:替代逐条处理
@@ -1,35 +0,0 @@
1
- ---
2
- name: official-pr-review
3
- version: 1.2.0
4
- description: "结构化 PR 审查:覆盖正确性、安全性和可维护性"
5
- tags: [review, pr, quality]
6
- ---
7
-
8
- # Pull Request 审查
9
-
10
- ## 审查顺序(重要性从高到低)
11
-
12
- ### 1. 正确性
13
- - [ ] 逻辑在所有边界条件下正确
14
- - [ ] 错误处理恰当,异常不被静默吞掉
15
- - [ ] 无竞态条件或并发问题
16
-
17
- ### 2. 安全性
18
- - [ ] 无注入漏洞(SQL、命令、XSS、SSRF)
19
- - [ ] 敏感数据未被日志记录或暴露
20
- - [ ] 权限检查在正确的层级
21
-
22
- ### 3. 性能
23
- - [ ] 无 N+1 查询
24
- - [ ] 大数据量场景有分页或流式处理
25
-
26
- ### 4. 可维护性
27
- - [ ] 代码可读,命名自文档化
28
- - [ ] 单一职责,函数不超过 40 行
29
-
30
- ### 5. 测试
31
- - [ ] 新功能有对应测试
32
- - [ ] 边界条件有测试覆盖
33
-
34
- ## 输出格式
35
- **[BLOCKER|MAJOR|MINOR]** `文件:行号` — 问题 → 建议
@@ -1,30 +0,0 @@
1
- ---
2
- name: official-release-checklist
3
- version: 1.0.0
4
- description: "发布上线清单:从代码冻结到生产验证的完整流程"
5
- tags: [release, deploy, checklist, devops]
6
- ---
7
-
8
- # 发布上线清单
9
-
10
- ## 发布前
11
- - [ ] 所有测试通过(单元、集成、E2E)
12
- - [ ] 代码已 review 并合并到主干
13
- - [ ] 数据库迁移脚本已准备,可回滚
14
- - [ ] 配置变更已确认(环境变量、feature flag)
15
- - [ ] 监控告警已配置
16
- - [ ] 回滚方案已明确
17
-
18
- ## 发布中
19
- - [ ] 灰度/金丝雀发布(先放 5% 流量)
20
- - [ ] 观察关键指标 5 分钟:错误率、P99 延迟
21
-
22
- ## 发布后
23
- - [ ] 生产环境冒烟测试
24
- - [ ] 监控观察 30 分钟
25
- - [ ] 通知相关方
26
-
27
- ## 回滚触发条件
28
- - 错误率上升 > 1%
29
- - P99 延迟上升 > 50%
30
- - 出现 CRITICAL 级别日志
@@ -1,32 +0,0 @@
1
- ---
2
- name: official-security-hardening
3
- version: 1.0.0
4
- description: "安全加固清单:覆盖 OWASP Top 10 和常见安全实践"
5
- tags: [security, owasp, hardening]
6
- ---
7
-
8
- # 安全加固
9
-
10
- ## 输入验证
11
- - 所有外部输入在边界处验证(类型、长度、格式)
12
- - 参数化查询,禁止字符串拼接 SQL
13
- - 文件上传:验证类型、大小、存储路径隔离
14
-
15
- ## 认证与授权
16
- - 密码:bcrypt/argon2 哈希,禁止 MD5/SHA1
17
- - Token:短有效期 + refresh token 机制
18
- - 每个接口显式检查权限,不依赖前端隐藏
19
-
20
- ## 数据保护
21
- - 敏感字段(密码、密钥、PII)不写日志
22
- - HTTPS only,HSTS header
23
- - 密钥走环境变量,不进代码库
24
-
25
- ## 依赖安全
26
- - 定期运行 `npm audit` / `pip audit` / `govulncheck`
27
- - lockfile 提交到仓库
28
-
29
- ## 常见漏洞速查
30
- - XSS:输出时转义,CSP header
31
- - CSRF:SameSite cookie + CSRF token
32
- - SSRF:白名单限制外部请求目标
@@ -1,31 +0,0 @@
1
- ---
2
- name: official-spec-driven-design
3
- version: 1.0.0
4
- description: "SDD:先写规格文档再写代码,需求驱动实现"
5
- tags: [sdd, spec, design, requirements]
6
- ---
7
-
8
- # Spec-Driven Design(规格驱动开发)
9
-
10
- 在写任何代码之前,先把规格写清楚。规格是代码的合同。
11
-
12
- ## 步骤
13
-
14
- 1. **写 SPEC.md**,包含:
15
- - 功能目标(一句话)
16
- - 输入/输出定义(含类型和边界)
17
- - 不做什么(明确排除项)
18
- - 验收标准(可测试的条件列表)
19
-
20
- 2. **评审规格** — 在写代码前确认规格无歧义
21
- - 每条验收标准都能写成测试吗?
22
- - 边界条件是否覆盖?
23
-
24
- 3. **按规格实现** — 代码只做规格里写的事
25
- - 遇到规格未覆盖的情况,先更新规格再写代码
26
-
27
- 4. **验收** — 逐条对照验收标准,全部通过才算完成
28
-
29
- ## 规则
30
- - 规格变更必须先于代码变更
31
- - 实现不得超出规格范围(避免过度设计)