@skillre/dsh-plugin-work-dashboard 0.0.0-stage → 0.9.0

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 (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +259 -0
  3. package/README.md +371 -2
  4. package/UNINSTALL.md +7 -0
  5. package/compatibility.json +195 -0
  6. package/cordis.patch.yml +24 -0
  7. package/docs/DESIGN-0.3.md +122 -0
  8. package/docs/DETAIL.md +1 -0
  9. package/docs/DETAIL.zh.md +1 -0
  10. package/docs/PLAN-0.7-0.9.md +230 -0
  11. package/docs/preview.svg +254 -0
  12. package/docs/preview.zh.svg +254 -0
  13. package/icon.svg +17 -0
  14. package/lib/blockers.d.ts +45 -0
  15. package/lib/blockers.js +160 -0
  16. package/lib/client/api.d.ts +42 -0
  17. package/lib/client/api.js +45 -0
  18. package/lib/client/contracts.d.ts +94 -0
  19. package/lib/client/contracts.js +21 -0
  20. package/lib/client/css/base.d.ts +31 -0
  21. package/lib/client/css/base.js +461 -0
  22. package/lib/client/css/blockers.d.ts +18 -0
  23. package/lib/client/css/blockers.js +196 -0
  24. package/lib/client/css/charts.d.ts +14 -0
  25. package/lib/client/css/charts.js +191 -0
  26. package/lib/client/css/detail.d.ts +21 -0
  27. package/lib/client/css/detail.js +423 -0
  28. package/lib/client/css/insights.d.ts +27 -0
  29. package/lib/client/css/insights.js +660 -0
  30. package/lib/client/css/overview.d.ts +23 -0
  31. package/lib/client/css/overview.js +327 -0
  32. package/lib/client/css/summary.d.ts +13 -0
  33. package/lib/client/css/summary.js +187 -0
  34. package/lib/client/format.d.ts +57 -0
  35. package/lib/client/format.js +96 -0
  36. package/lib/client/preferences.d.ts +56 -0
  37. package/lib/client/preferences.js +118 -0
  38. package/lib/client/styles.d.ts +17 -0
  39. package/lib/client/styles.js +24 -0
  40. package/lib/client/text.d.ts +32 -0
  41. package/lib/client/text.js +1112 -0
  42. package/lib/client/view-contract.d.ts +118 -0
  43. package/lib/client/view-contract.js +28 -0
  44. package/lib/client.js +6599 -0
  45. package/lib/config.d.ts +61 -0
  46. package/lib/config.js +67 -0
  47. package/lib/form.d.ts +218 -0
  48. package/lib/form.js +1075 -0
  49. package/lib/gap.d.ts +60 -0
  50. package/lib/gap.js +227 -0
  51. package/lib/index.d.ts +40 -0
  52. package/lib/index.js +159 -0
  53. package/lib/repo.d.ts +124 -0
  54. package/lib/repo.js +407 -0
  55. package/lib/risks.d.ts +24 -0
  56. package/lib/risks.js +85 -0
  57. package/lib/skill.d.ts +94 -0
  58. package/lib/skill.js +220 -0
  59. package/lib/store.d.ts +63 -0
  60. package/lib/store.js +505 -0
  61. package/lib/timeline.d.ts +23 -0
  62. package/lib/timeline.js +93 -0
  63. package/lib/transport.d.ts +67 -0
  64. package/lib/transport.js +131 -0
  65. package/lib/types.d.ts +701 -0
  66. package/lib/types.js +78 -0
  67. package/locale/en.json +7 -0
  68. package/locale/zh.json +7 -0
  69. package/package.json +117 -4
  70. package/skills/poc-export/SKILL.md +81 -0
  71. package/skills/poc-export/scripts/export-form.mjs +654 -0
  72. package/skills/poc-ledger/SKILL.md +171 -0
  73. package/skills/poc-submit/SKILL.md +186 -0
package/lib/types.js ADDED
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Wire vocabulary shared by the Host and Client halves of the POC console.
3
+ *
4
+ * Everything here is plain, lossless JSON: the Host owns the repository cache
5
+ * and the YAML parse, the Client owns only view state, and only these shapes
6
+ * cross the Connection RPC boundary. Both halves compile from this file, so the
7
+ * Client bundle carries the same literals without importing Host code.
8
+ *
9
+ * Localized copy is deliberately NOT here: the Host sends stable rule ids and
10
+ * field names, and the Client maps them onto dictionary keys. One dictionary
11
+ * therefore covers both halves, and a new rule never needs a Host release note.
12
+ */
13
+ /** RPC endpoint path under the shared `/api` channel. */
14
+ export const ENDPOINT = 'skillre-work-dashboard/execute';
15
+ /** Sidebar panel id, main panel key, and locale namespace. */
16
+ export const PANEL_ID = 'skillre-work-dashboard';
17
+ export const LOCALE_NAMESPACE = 'skillreWorkDashboard';
18
+ /**
19
+ * Browser-local refresh settings. They are a user preference, not plugin
20
+ * configuration, so they live in `localStorage` and never reach the Host.
21
+ */
22
+ export const REFRESH_INTERVAL_KEY = 'work-dashboard.refreshInterval';
23
+ export const CUSTOM_MINUTES_KEY = 'work-dashboard.customMinutes';
24
+ /** The refresh cadences the settings dialog offers. */
25
+ export const REFRESH_INTERVALS = Object.freeze(['off', '10m', '1h', 'custom']);
26
+ /** Default custom cadence, in minutes, when the user picks `custom` first. */
27
+ export const DEFAULT_CUSTOM_MINUTES = 30;
28
+ /** Bounds of the custom cadence, in minutes. */
29
+ export const CUSTOM_MINUTES_MIN = 1;
30
+ export const CUSTOM_MINUTES_MAX = 1440;
31
+ /** The four stages of a POC plus the closed state. */
32
+ export const STAGES = Object.freeze(['G0', 'G1', 'G2', 'G3', 'G4']);
33
+ /** The four dimensions that must be tracked separately, never merged. */
34
+ export const DIMENSIONS = Object.freeze(['achievement', 'evidence', 'recognition', 'nextMilestone']);
35
+ /**
36
+ * How the overview renders the same project list.
37
+ *
38
+ * One dataset, three readings: `cards` answers "what needs me", `board` answers
39
+ * "where is everything sitting", `table` answers "show me the numbers". Switching
40
+ * never refetches and never drops the active filters.
41
+ */
42
+ export const VIEW_MODES = Object.freeze(['cards', 'board', 'table']);
43
+ /** The overview's sort orders. */
44
+ export const SORT_KEYS = Object.freeze(['attention', 'amount', 'progress', 'stage']);
45
+ /** Browser-local view preference key (search/filters are session-only). */
46
+ export const VIEW_MODE_KEY = 'work-dashboard.viewMode';
47
+ export const SORT_KEY_KEY = 'work-dashboard.sortKey';
48
+ /** Every gap rule id this plugin knows. */
49
+ export const GAP_RULES = Object.freeze([
50
+ 'R1-gate0-missing',
51
+ 'R2-large-amount-no-g0',
52
+ 'R3-g0-passed-no-plan',
53
+ 'R4-criteria-count',
54
+ 'R5-scenarios-count',
55
+ 'R6-risks-overflow',
56
+ 'R7-g2-not-ready',
57
+ 'R8-progress-no-evidence',
58
+ 'R9-evidence-no-recognition',
59
+ 'R10-g3-1-without-g3-2',
60
+ 'R11-no-next-milestone',
61
+ 'R12-stage-stalled',
62
+ ]);
63
+ /**
64
+ * Where a blocker comes from.
65
+ *
66
+ * The five sources are one user-facing idea — "where is this stuck" — but they
67
+ * are NOT the same kind of finding: a gap is a judgement about the ledger's
68
+ * content, while a missing amount is a data-completeness issue. Keeping the
69
+ * source on the row is what lets the UI filter and explain them without the
70
+ * reader having to know which subsystem produced them.
71
+ */
72
+ export const BLOCKER_SOURCES = Object.freeze([
73
+ 'gap',
74
+ 'stalled',
75
+ 'missing-amount',
76
+ 'no-progress',
77
+ 'no-stage-since',
78
+ ]);
package/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Work Dashboard",
4
+ "description": "An operations board plus three bundled POC skills: read the ledger, export a form, submit colleague data as a Draft PR.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "工作看板",
4
+ "description": "侧栏运营看板 + 三个随包安装的 POC 技能:读台账、导出收集表单、把组员数据提交成 Draft PR。",
5
+ "detail": "docs/DETAIL.zh.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,119 @@
1
1
  {
2
2
  "name": "@skillre/dsh-plugin-work-dashboard",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.9.0",
4
+ "description": "工作看板:多模块运营看板,POC 运营为首个模块(四维结果、阶段轨道、缺口清单、风险看板、时间线、导出表单)",
5
+ "icon": "./icon.svg",
6
+ "type": "module",
7
+ "license": "MIT",
8
+ "author": "skillre",
9
+ "engines": {
10
+ "node": "^22.19.0 || >=24.0.0",
11
+ "dsh": ">=0.2.2-rc.1 <0.3.0"
12
+ },
13
+ "packageManager": "npm@11.12.1",
14
+ "main": "lib/index.js",
15
+ "types": "lib/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./cordis.patch.yml": "./cordis.patch.yml",
22
+ "./compatibility.json": "./compatibility.json",
23
+ "./locale/*.json": "./locale/*.json",
24
+ "./package.json": "./package.json",
25
+ "./client": {
26
+ "browser": "./lib/client.js",
27
+ "default": "./lib/client.js"
28
+ }
29
+ },
30
+ "files": [
31
+ "lib/",
32
+ "skills/",
33
+ "cordis.patch.yml",
34
+ "compatibility.json",
35
+ "docs",
36
+ "!docs/PREVIEW.md",
37
+ "!docs/evidence",
38
+ "locale/*.json",
39
+ "icon.svg",
40
+ "README.md",
41
+ "README.en.md",
42
+ "UNINSTALL.md",
43
+ "LICENSE"
44
+ ],
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/skillre/dsh-plugin-work-dashboard.git"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/skillre/dsh-plugin-work-dashboard/issues"
54
+ },
55
+ "homepage": "https://github.com/skillre/dsh-plugin-work-dashboard#readme",
56
+ "keywords": [
57
+ "deepseek-harness",
58
+ "dsh-plugin",
59
+ "cordis",
60
+ "dashboard",
61
+ "work-dashboard",
62
+ "poc",
63
+ "工作看板",
64
+ "运营看板"
65
+ ],
66
+ "dsh": {
67
+ "manifestVersion": 1,
68
+ "bundle": {
69
+ "patch": "./cordis.patch.yml"
70
+ },
71
+ "client": {
72
+ "platform": "web",
73
+ "immediately": true,
74
+ "inject": [
75
+ "@deepseek-ai/dsh-client-ui-renderer",
76
+ "@deepseek-ai/dsh-client-locale",
77
+ "@deepseek-ai/dsh-client-connection"
78
+ ]
79
+ }
80
+ },
81
+ "scripts": {
82
+ "clean": "node scripts/clean.mjs",
83
+ "build": "npm run clean && tsc -p tsconfig.build.json && node scripts/build-client.mjs",
84
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
85
+ "test": "npm run build:client && vitest run",
86
+ "build:client": "node scripts/build-client.mjs",
87
+ "pack:check": "npm run build && publint && npm pack --dry-run --json --ignore-scripts",
88
+ "check": "npm run preview:check && npm run typecheck && npm test && npm run check:lib && npm run pack:check",
89
+ "changeset": "changeset",
90
+ "version": "changeset version",
91
+ "release:prepare": "node scripts/prepare-release.mjs",
92
+ "prepack": "npm run build",
93
+ "test:integration": "node scripts/verify-isolated.mjs",
94
+ "check:lib": "npm run build && node scripts/verify-lib-committed.mjs",
95
+ "preview:check": "node scripts/preview.mjs check"
96
+ },
97
+ "peerDependencies": {
98
+ "@deepseek-ai/cordis": "~4.1.0"
99
+ },
100
+ "devDependencies": {
101
+ "@changesets/cli": "^3.0.2",
102
+ "@deepseek-ai/cordis": "4.1.0",
103
+ "@testing-library/react": "^16.3.3",
104
+ "@types/node": "^24.13.3",
105
+ "@types/react": "~18.3.31",
106
+ "esbuild": "^0.25.0",
107
+ "jsdom": "^25.0.1",
108
+ "publint": "^0.3.24",
109
+ "react": "18.3.1",
110
+ "react-dom": "18.3.1",
111
+ "typescript": "5.9.3",
112
+ "vitest": "^4.1.8"
113
+ },
114
+ "dependencies": {
115
+ "@deepseek-ai/schemastery": "~3.19.0",
116
+ "yaml": "^2.8.0",
117
+ "zod": "^4.6.7"
118
+ }
119
+ }
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: poc-export
3
+ description: 生成 POC 信息收集表单(自包含 HTML),给没有 GitHub 账号的组员填写 v3 台账字段。当用户说「导出表单」「生成表单给组员填」「让某某补一下这个项目的进展」「收集进展记录」时使用。
4
+ ---
5
+
6
+ # 导出 POC 收集表单(v3)
7
+
8
+ 生成一个**自包含 HTML** 文件:组员双击就能填,无需服务器、无需联网、无需 GitHub 账号。
9
+
10
+ ## 怎么生成
11
+
12
+ 用随本 skill 发布的脚本,不要去找外部脚本(旧版的 `~/dsh-test/poc_form.py` 是 v1 生成器,
13
+ 产出的 YAML 台账已经读不了):
14
+
15
+ ```sh
16
+ # 补全模式:给已有项目补字段 / 追加一条进展
17
+ node <skill-dir>/scripts/export-form.mjs \
18
+ --mode fill \
19
+ --poc ~/.dsh/cache/work-dashboard/repo/projects/POC-006.yaml \
20
+ --out /tmp/表单-POC-006.html
21
+
22
+ # 批量:多个项目打包成一个表单
23
+ node <skill-dir>/scripts/export-form.mjs \
24
+ --mode fill \
25
+ --poc "~/.dsh/cache/work-dashboard/repo/projects/*.yaml" \
26
+ --out /tmp/表单-批量.html
27
+
28
+ # 新建模式:从零建一个新项目
29
+ node <skill-dir>/scripts/export-form.mjs --mode new --out /tmp/表单-新建.html
30
+ ```
31
+
32
+ `<skill-dir>` 就是本 skill 所在目录(`skills/poc-export/`),模型可通过
33
+ `resourceBase` 解析相对路径。脚本只读 YAML、只写 HTML,不改台账。
34
+
35
+ ## 表单填什么
36
+
37
+ 按 v3 分组,和台账结构一致:
38
+
39
+ | 区块 | 字段 |
40
+ |---|---|
41
+ | 身份 | 项目名称、体系、主业公司、部门、金额(万元)、项目类型、阶段、状态、负责人、销售、客户技术责任人、业务决策人 |
42
+ | G0 | 客户为什么测、我们为什么测、决策链、测后客户决策、竞争对手 |
43
+ | 计划(G1/G2) | 客户痛点、期望认可、成功指标(2–3)、验证场景(3–5)、我方赢点、风险(≤3)、G1 结论、G2 Ready |
44
+ | 进展(核心) | 日期、类型、目标、范围、实际、完成度、证据(标题+链接+类型)、客户同步对象/反馈/认可、G3-1、G3-2、下一步(目标/负责人/截止) |
45
+ | 结论 | 目标达成、客户认可、我方证据、剩余风险、证明了什么、客户认可了什么、下一步业务动作、Next Milestone(含负责人/截止/状态)、总体结论 |
46
+
47
+ **进展是追加的,不是覆盖的。** 组员填的是一条新进展,提交时追加到 `progress[]` 末尾,
48
+ 不改历史条目——这是 v3 的核心约束。
49
+
50
+ ## 表单内置功能
51
+
52
+ | 功能 | 说明 |
53
+ |---|---|
54
+ | 自动保存 | 停止输入 2 秒后自动存 localStorage;另可随时点【保存】 |
55
+ | 草稿恢复 | 重新打开自动恢复上次未提交内容 |
56
+ | 清空草稿 | 顶部按钮 |
57
+ | 实时缺口提示 | 顶部显示当前填了多少、还缺哪几项必填 |
58
+ | 预览 JSON | 底部按钮,看将交回的结构 |
59
+ | 提交并生成文件 | 下载 `poc-changes-<日期>.json` |
60
+
61
+ 存储键由**项目编号**派生(不是时间戳),所以同一个项目的表单重新生成后仍能找到旧草稿。
62
+
63
+ ## 交给组员时要说清
64
+
65
+ 1. **怎么打开**:双击 HTML,用浏览器打开
66
+ 2. **填哪些**:灰色区域是台账已有信息,只填需要补充的部分
67
+ 3. **不用怕丢**:自动保存,关掉再打开还在
68
+ 4. **填完怎么给你**:点【提交并生成文件】,把下载的 `.json` 用飞书发回
69
+ 5. **填不全没关系**:留空的会被标出来,提交时统一校验
70
+
71
+ ## 注意
72
+
73
+ - 生成的文件只在本地(`/tmp` 或指定位置),**不会自动发给任何人**;需要你自己发给组员。
74
+ - 组员交回的是 `.json`(不是 `.yaml`)。刻意的:JSON 更严格,不容易被手改坏,
75
+ 而且提交前要经过校验。
76
+ - 不要用旧版 `poc_form.py`:它产出 v1 字段,台账读不了。
77
+
78
+ ## 相关 skill
79
+
80
+ - `poc-ledger`:读取分析台账
81
+ - `poc-submit`:把组员交回的 `.json` 校验后提交成 Draft PR