@xirang-ai/dsh-teamflow 0.1.0 → 0.1.2

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.
package/README.en.md CHANGED
@@ -4,12 +4,12 @@
4
4
 
5
5
  Teamflow (`@xirang-ai/dsh-teamflow`) is a [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) plugin that turns **requirements → high-level design → detailed design → stories → development runs → bug fixes** into a persistent, resumable pipeline. It also adds a team workbench called **Xirang Workbench** to the DSH Web UI.
6
6
 
7
- Version: **`0.1.0`** (first release; see [CHANGELOG.md](CHANGELOG.md)).
7
+ Version: **`0.1.2`** (documents move into the plugin directory; stories and bugs gain discussion sessions; see [CHANGELOG.md](CHANGELOG.md)).
8
8
 
9
- - Data lives in SQLite; documents live in the workspace, so closing a session does not lose progress.
9
+ - Data lives in SQLite; documents live in the plugin directory (default `<dataDir>/docs`), so closing a session does not lose progress.
10
10
  - Five agent presets cover requirements, stories, bugs, development, and detailed design. Each preset controls its own tool boundary.
11
11
  - The workbench provides lists, detail pages, a flow chart, a create page, a read-only session tab, and guarded deletion.
12
- - Nineteen `teamflow_*` tools write interview and development results back to the database and workspace documents.
12
+ - Twenty `teamflow_*` tools write interview and development results back to the database and plugin documents.
13
13
 
14
14
  ## Requirements
15
15
 
@@ -67,10 +67,10 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
67
67
 
68
68
  - **Lists**: four views (open / in progress / ready / completed) across requirements, standalone stories, and bugs.
69
69
  - **Requirement detail**: high-level design, detailed-design file tree, story list, execution flow chart, linked sessions, and a properties panel.
70
- - **Story / bug detail**: body, status, run history, and manual actions such as run, cancel, and complete.
70
+ - **Story / bug detail**: body, status, run history, discussion sessions, and manual actions such as discuss, run, cancel, and complete.
71
71
  - **Three permission tiers**: the **Run** button on a story row, the story page, and the bug page has an arrow menu for **Normal run / Read-only run / Full permission run**. The main button always starts a normal run; the choice is not remembered, so picking full permission once does not carry over. The session starts with the matching sandbox mode and approval policy, and its header shows a short Normal / Read-only / Full badge (sessions started before this feature have no record and show no badge).
72
- - **Create page**: pick a type and workspace to start a session without choosing an agent manually. Files can be attached too: images are checked against the same rules the session composer uses (type, per-file size, count and total taken from `ctx.attachments.imageLimits`, never a second list defined here), other file types carry no extra limits, each picked file can be removed, and the submission sends them as attachments on the new conversation's first message next to the workspace and description. The submit button is held back until uploading finishes so no attachment is lost.
73
- - **Composer type picker**: in an empty session, switch between requirement / story / bug / high-level design / detailed design / story-splitting presets.
72
+ - **Create page**: pick a type and workspace to start a session without choosing an agent manually. Files can be attached too: the attachment card is both a click target and a drop zone, and a drop goes through the same rules as a picker selection (images are checked against the same rules the session composer uses — type, per-file size, count and total taken from `ctx.attachments.imageLimits`, never a second list defined here; other file types carry no extra limits), with a reason for every refused file. Each picked file can be removed, and the submission sends them as attachments on the new conversation's first message next to the workspace and description. The submit button is held back until uploading finishes so no attachment is lost.
73
+ - **Composer type picker**: an empty session switches between requirement / story / bug; a discussion session started from a requirement detail also offers requirement & outline / detailed design / story splitting.
74
74
  - **Session tab**: read-only view of the requirement, story, or bug linked to the current session.
75
75
  - **Delete and clean up**: only records with no active agent run can be deleted. The confirmation shows the impact; deletion is physical and cannot be undone.
76
76
 
@@ -79,14 +79,16 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
79
79
  | Item | Location |
80
80
  | --- | --- |
81
81
  | Database | `$DSH_HOME/xirang-ai/dsh-teamflow/teamflow.sqlite` |
82
- | Requirement / high-level design | `<workspace>/.xirang-ai/dsh-teamflow/requirements/<req>/requirement.md` |
83
- | Detailed design | `<workspace>/.xirang-ai/dsh-teamflow/requirements/<req>/docs/<doc>.md` |
84
- | Story | `<workspace>/.xirang-ai/dsh-teamflow/stories/<story>/story.md` |
85
- | Bug | `<workspace>/.xirang-ai/dsh-teamflow/bugs/<bug>/bug.md` |
82
+ | Document root | `$DSH_HOME/xirang-ai/dsh-teamflow/docs` (override with `docsDir`) |
83
+ | Requirement / high-level design | `<docs>/requirements/<req>/requirement.md` |
84
+ | Detailed design | `<docs>/requirements/<req>/docs/<doc>.md` |
85
+ | Story | `<docs>/stories/<story>/story.md` |
86
+ | Bug | `<docs>/bugs/<bug>/bug.md` |
86
87
 
87
- - The workspace root `.gitignore` gets an `.xirang-ai/` entry automatically, so documents stay out of version control by default.
88
- - The schema version lives in `PRAGMA user_version` and is currently `16`. Migrations run at startup; a database newer than the installed plugin refuses to start.
89
- - Back up `teamflow.sqlite` and `.xirang-ai/dsh-teamflow/` before upgrading or reinstalling.
88
+ - Documents live next to the database, both owned by the plugin: the user's project repository never gets a `.xirang-ai/` directory and its `.gitignore` is never rewritten. Keep the plugin directory when switching workspaces or machines.
89
+ - The schema version lives in `PRAGMA user_version` and is currently `17`. Migrations run at startup; a database newer than the installed plugin refuses to start.
90
+ - Back up `teamflow.sqlite` and `docs/` (or the configured `docsDir`) before upgrading or reinstalling.
91
+ - Older versions stored bodies under the workspace's `.xirang-ai/dsh-teamflow/`. Upgrading neither moves nor reads those documents; move them into the document root by hand if you still need them.
90
92
 
91
93
  ## Configuration
92
94
 
@@ -95,6 +97,7 @@ The bundle config layer provides these defaults:
95
97
  | Field | Type | Default | Description |
96
98
  | --- | --- | --- | --- |
97
99
  | `dataDir` | string | `''` | Data directory; empty means `$DSH_HOME/xirang-ai/dsh-teamflow`. Supports `~`. |
100
+ | `docsDir` | string | `''` | Document root; empty means `<dataDir>/docs`. Accepts absolute paths, paths relative to the working directory, and `~/`. |
98
101
  | `busyTimeoutMs` | number | `5000` | SQLite `busy_timeout` for concurrent writers (0–60000). |
99
102
 
100
103
  To override them, edit the user config layer of the current profile, for example `$DSH_HOME/profiles/web/cordis.patch.yml`:
@@ -104,6 +107,7 @@ To override them, edit the user config layer of the current profile, for example
104
107
  name: "@xirang-ai/dsh-teamflow"
105
108
  config:
106
109
  dataDir: "~/teamflow-data"
110
+ docsDir: "~/teamflow-docs"
107
111
  busyTimeoutMs: 10000
108
112
  ```
109
113
 
@@ -124,7 +128,7 @@ dsh plugin --profile dev add .
124
128
  dsh --profile dev --port 3091 --no-open
125
129
  ```
126
130
 
127
- Development rules, official documentation links, and the full verification checklist are in [AGENTS.md](https://github.com/xirang-ai/teamflow/blob/main/AGENTS.md) and [RELEASE.md](RELEASE.md).
131
+ Development rules, official documentation links, and the full verification checklist are in [AGENTS.md](https://github.com/xirang-ai/dsh-teamflow/blob/main/AGENTS.md) and [RELEASE.md](RELEASE.md).
128
132
 
129
133
  ## License
130
134
 
package/README.md CHANGED
@@ -4,12 +4,12 @@
4
4
 
5
5
  Teamflow(`@xirang-ai/dsh-teamflow`)是 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(下称 DSH)的插件:把**需求 → 概要设计 → 详细设计 → 故事拆分 → 研发执行 → 缺陷修复**做成一条可持久化、可断点续跑的流水线,并在 Web 端提供团队工作台「息壤工作台」。
6
6
 
7
- 当前版本:**`0.1.0`**(首版,变更记录见 [CHANGELOG.md](CHANGELOG.md))。
7
+ 当前版本:**`0.1.2`**(文档迁入插件目录,故事与缺陷支持讨论会话,变更记录见 [CHANGELOG.md](CHANGELOG.md))。
8
8
 
9
- - 数据落在 SQLite,文档落在工作区,关掉会话不丢进度。
9
+ - 数据落在 SQLite,文档落在插件目录(默认 `<dataDir>/docs`),关掉会话不丢进度。
10
10
  - 五个 Agent 预设分别负责需求、故事、缺陷、研发和详细设计,工具边界由预设控制。
11
11
  - 工作台提供列表、详情、流程图、创建页、会话内只读页签,以及受控的删除入口。
12
- - 十九个 `teamflow_*` 工具把访谈与研发结果写回数据库和工作区文档。
12
+ - 二十个 `teamflow_*` 工具把访谈与研发结果写回数据库和插件文档。
13
13
 
14
14
  ## 环境要求
15
15
 
@@ -67,10 +67,10 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
67
67
 
68
68
  - **列表**:未完成 / 执行中 / 待开始 / 已完成四个视图;需求、独立故事、缺陷分组展示。
69
69
  - **需求详情**:概设正文、详设文件树、故事列表、执行流程图、关联会话和属性面板。
70
- - **故事 / 缺陷详情**:正文、状态、运行记录,以及执行、取消、完成等人工动作。
70
+ - **故事 / 缺陷详情**:正文、状态、运行记录、讨论会话列表,以及讨论、执行、取消、完成等人工动作。
71
71
  - **三档权限执行**:需求详情的故事行、故事页、缺陷页三处的「执行」按钮右侧带箭头菜单,可选「普通执行 / 仅查看执行 / 完全权限执行」。主按钮直接按「普通执行」启动;默认档不记忆,上一次选「完全权限执行」也不会留到下一次。会话以对应沙箱模式与审批策略启动,会话头部显示「普通 / 仅查看 / 完全权限」短标签(旧会话没有记录,不显示)。
72
- - **创建页**:选类型和工作区后直接开新会话,不需要手动挑 Agent。还可以附带文件:图片按宿主会话上传的同一套规则校验(类型、单张大小、条数与总大小取自 `ctx.attachments.imageLimits`,不在本页另立白名单),其它类型的文件不设额外限制;已选文件可逐个移除,提交时与工作区、描述一起作为第一条消息的附件发进新会话。附件上传完成前提交按钮会拦住,避免丢附件。
73
- - **输入框「创建类型」**:空白会话下可切换需求 / 故事 / 缺陷 / 概要设计 / 详细设计 / 故事拆分预设。
72
+ - **创建页**:选类型和工作区后直接开新会话,不需要手动挑 Agent。还可以附带文件:附件区整块可点击选择,也可以把文件直接拖进附件卡片,拖放与点选走同一套规则(图片按宿主会话上传的同一套规则校验,类型、单张大小、条数与总大小取自 `ctx.attachments.imageLimits`,不在本页另立白名单;其它类型的文件不设额外限制),不合规的文件逐条给出原因;已选文件可逐个移除,提交时与工作区、描述一起作为第一条消息的附件发进新会话。附件上传完成前提交按钮会拦住,避免丢附件。
73
+ - **输入框「创建类型」**:空白会话下可切换需求 / 故事 / 缺陷;从需求详情发起的讨论会话还会显示「需求与概要设计」/「详细设计」/「故事拆分」,用于继续对应的讨论。
74
74
  - **会话页签**:在会话顶部只读查看当前会话关联的需求、故事或缺陷。
75
75
  - **删除与清理**:只允许删除没有 Agent 正在执行的记录;删除前展示影响范围,物理删除不可恢复。
76
76
 
@@ -79,14 +79,16 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
79
79
  | 项 | 位置 |
80
80
  | --- | --- |
81
81
  | 数据库 | `$DSH_HOME/xirang-ai/dsh-teamflow/teamflow.sqlite` |
82
- | 需求 / 概设 | `<workspace>/.xirang-ai/dsh-teamflow/requirements/<req>/requirement.md` |
83
- | 详细设计 | `<workspace>/.xirang-ai/dsh-teamflow/requirements/<req>/docs/<doc>.md` |
84
- | 故事 | `<workspace>/.xirang-ai/dsh-teamflow/stories/<story>/story.md` |
85
- | 缺陷 | `<workspace>/.xirang-ai/dsh-teamflow/bugs/<bug>/bug.md` |
82
+ | 文档根 | `$DSH_HOME/xirang-ai/dsh-teamflow/docs`(可用 `docsDir` 改到别处) |
83
+ | 需求 / 概设 | `<docs>/requirements/<req>/requirement.md` |
84
+ | 详细设计 | `<docs>/requirements/<req>/docs/<doc>.md` |
85
+ | 故事 | `<docs>/stories/<story>/story.md` |
86
+ | 缺陷 | `<docs>/bugs/<bug>/bug.md` |
86
87
 
87
- - 工作区根 `.gitignore` 会自动追加 `.xirang-ai/`,文档默认不进版本库。
88
- - 数据结构版本写在 `PRAGMA user_version`,当前为 `16`;启动时自动迁移,结构版本高于当前插件时拒绝启动。
89
- - 升级或重装前建议备份 `teamflow.sqlite` 与 `.xirang-ai/dsh-teamflow/`。
88
+ - 文档与数据库同根,都归插件目录所有:用户项目仓库里不会出现 `.xirang-ai/`,也不会改写工作区 `.gitignore`。换工作区或换机器时,保留插件目录里的数据库与文档即可。
89
+ - 数据结构版本写在 `PRAGMA user_version`,当前为 `17`;启动时自动迁移,结构版本高于当前插件时拒绝启动。
90
+ - 升级或重装前备份 `teamflow.sqlite` 与 `docs/`(自定义了 `docsDir` 时备份该目录)。
91
+ - 旧版本把正文放在工作区 `.xirang-ai/dsh-teamflow/` 下;升级后这些文档不会被自动搬迁,也不会再按旧路径读取,需要时请手动移入文档根。
90
92
 
91
93
  ## 配置
92
94
 
@@ -95,6 +97,7 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
95
97
  | 字段 | 类型 | 默认 | 说明 |
96
98
  | --- | --- | --- | --- |
97
99
  | `dataDir` | string | `''` | 数据目录;留空表示 `$DSH_HOME/xirang-ai/dsh-teamflow`,支持 `~` |
100
+ | `docsDir` | string | `''` | 文档根;留空表示 `<dataDir>/docs`,支持绝对路径、相对路径与 `~/` |
98
101
  | `busyTimeoutMs` | number | `5000` | SQLite `busy_timeout`,多会话并发写时的等待上限(0–60000) |
99
102
 
100
103
  要覆盖默认值,编辑当前 profile 的用户配置层,例如 `$DSH_HOME/profiles/web/cordis.patch.yml`:
@@ -104,6 +107,7 @@ dsh plugin --profile web remove @xirang-ai/dsh-teamflow
104
107
  name: "@xirang-ai/dsh-teamflow"
105
108
  config:
106
109
  dataDir: "~/teamflow-data"
110
+ docsDir: "~/teamflow-docs"
107
111
  busyTimeoutMs: 10000
108
112
  ```
109
113
 
@@ -124,7 +128,7 @@ dsh plugin --profile dev add .
124
128
  dsh --profile dev --port 3091 --no-open
125
129
  ```
126
130
 
127
- 开发规则、官方文档入口与完整验证清单见 [AGENTS.md](https://github.com/xirang-ai/teamflow/blob/main/AGENTS.md) 和 [RELEASE.md](RELEASE.md)。
131
+ 开发规则、官方文档入口与完整验证清单见 [AGENTS.md](https://github.com/xirang-ai/dsh-teamflow/blob/main/AGENTS.md) 和 [RELEASE.md](RELEASE.md)。
128
132
 
129
133
  ## 许可证
130
134
 
package/RELEASE.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  | 项 | 值 |
11
11
  | --- | --- |
12
- | 目标版本号 | **0.1.0**(用户已确认保持当前 `package.json` 版本) |
12
+ | 目标版本号 | **0.1.2**(用户已确认) |
13
13
  | 发布分支 / commit | 发布时填写 |
14
14
  | 发布日期 | 发布时填写 |
15
15
  | 发布人 | 发布时填写 |
@@ -17,7 +17,7 @@
17
17
  | dist-tag | `latest` |
18
18
 
19
19
  - [ ] 版本号已由开发者明确确认,且 `package.json`、`lib/client.js` banner、README / CHANGELOG 中的版本声明一致。
20
- - [ ] 发布后打 `v<version>` tag,并在 GitHub Release 写清配置、`engines.dsh` 与数据结构版本(当前 schema `16`)。
20
+ - [ ] 发布后打 `v<version>` tag,并在 GitHub Release 写清配置、`engines.dsh` 与数据结构版本(当前 schema `17`)。
21
21
 
22
22
  ## 1. 与 DSH 官方 tag 的兼容性核对
23
23
 
@@ -30,7 +30,7 @@ git ls-remote --tags --refs https://github.com/deepseek-ai/deepseek-harness.git
30
30
  | sort -V
31
31
  ```
32
32
 
33
- 2026-11-10 核对结果:
33
+ 2026-11-11 核对结果:
34
34
 
35
35
  | 项 | 结果 |
36
36
  | --- | --- |
@@ -78,7 +78,7 @@ npm pack --dry-run --json
78
78
 
79
79
  - [ ] 仓库内 `pnpm peers check` 无 `missing peer` / `unmet peer`。
80
80
  - [ ] 干净 profile 里 `pnpm peers check` 对 `@deepseek-ai/dsh-*` 宿主包报 `missing peer` 属预期:这些实例由正在运行的 DSH 提供,不要为了消除警告把它们改成 optional;以真实启动成功为准。
81
- - [ ] `npm pack --dry-run` 的 93 个文件中没有 `src/`、`test/`、`docs/`、`design/`、`.tmp/`、`.devhome/`、`.xirang-ai/`、`*.sqlite*`。
81
+ - [ ] `npm pack --dry-run` 的 95 个文件中没有 `src/`、`test/`、`docs/`、`design/`、`.tmp/`、`.devhome/`、`.xirang-ai/`、`*.sqlite*`。
82
82
  - [ ] `prepublishOnly` 已配置为 `pnpm run verify`,干净 checkout 发布时会先构建。
83
83
 
84
84
  ## 3. 干净 profile 安装与真实启动
@@ -108,7 +108,7 @@ sqlite3 "$DSH_HOME/xirang-ai/dsh-teamflow/teamflow.sqlite" \
108
108
  'PRAGMA user_version; SELECT key, value FROM meta; SELECT key, name FROM roles;'
109
109
  ```
110
110
 
111
- - [ ] `PRAGMA user_version = 16`。
111
+ - [ ] `PRAGMA user_version = 17`。
112
112
  - [ ] `meta.plugin_version` 等于 `package.json` 版本。
113
113
  - [ ] `roles` 含 `product` / `dev`。
114
114
  - [ ] 至少真实调用一次 `teamflow_*` 工具(含一次错误分支)。
@@ -123,9 +123,9 @@ sqlite3 "$DSH_HOME/xirang-ai/dsh-teamflow/teamflow.sqlite" \
123
123
  - [ ] 安装命令使用 `dsh plugin --profile <profile> add ...`,并说明安装后要重启 Host,不能只刷新浏览器。
124
124
  - [ ] Node 版本写 `>=24.9.0`,与 `engines.node` 一致。
125
125
  - [ ] 开发端口统一为 `3091`(与本文件、AGENTS.md §5.1 一致)。
126
- - [ ] README 中的链接均可访问;仓库根的 `docs/` 仅作为提示词一致性报告与快照的测试证据保留,不进入 npm 包。
126
+ - [ ] README 中的链接均可访问;仓库根的 `docs/` 仅作为提示词一致性报告、快照、Demo 走查结论与历次发版检查留痕保留,不进入 npm 包。
127
127
  - [ ] 配置说明指向 **profile 配置层** 的 `id: teamflow` 覆盖,而不是让用户改 `node_modules` 里的包内文件。
128
- - [ ] 版本号、schema 版本、工具数量(当前 19 个)、预设数量(当前 5 个)与实际一致。
128
+ - [ ] 版本号、schema 版本、工具数量(当前 20 个)、预设数量(当前 5 个)与实际一致。
129
129
  - [ ] 本文件已按本次发版更新;AGENTS.md 的阅读路径与文档索引没有死链。
130
130
 
131
131
  ## 5. 代码、敏感信息与数据卫生
@@ -134,7 +134,7 @@ sqlite3 "$DSH_HOME/xirang-ai/dsh-teamflow/teamflow.sqlite" \
134
134
  - [ ] 没有未完成功能、`TODO` / `FIXME` / `HACK` / `XXX`、注释掉的半成品代码、调试日志。
135
135
  - [ ] 没有 smoke / mock / demo / fixture / seed 数据进入 `src/` 或 npm 包(测试临时目录必须在 `tmpdir()` 下创建并清理)。
136
136
  - [ ] 本地 scratch 已删除:`.tmp/`、`.devhome/`、`.xirang-ai/`、`*.sqlite*`、`*.log`、临时截图 / 原型。
137
- - [ ] `design/` 已按维护决定删除;`docs/` 只保留提示词一致性报告与快照,测试依赖它,不得删除,且不进入 npm 包。
137
+ - [ ] `design/` 已按维护决定删除;`docs/` 只保留提示词一致性报告与快照、Demo 走查结论、发版检查留痕,测试依赖其中的快照,不得删除,且不进入 npm 包。
138
138
  - [ ] `lib/` 未提交(由构建生成),但发布包中必须包含最新构建。
139
139
  - [ ] `git status` 干净;`git ls-files` 包含 `package.json`、`cordis.patch.yml`、`src/`、`test/`、`locale/`、`scripts/`,不再只有 README / LICENSE。
140
140
 
@@ -157,7 +157,7 @@ find . -maxdepth 2 \( -name '*.sqlite*' -o -name '.tmp' -o -name '.devhome' -o -
157
157
  - [ ] Agent 人设 / prompt 中的语言与目标用户一致;新增语言时同时补字典、`normalizeLocale` 与测试。
158
158
  - [ ] `pnpm test` 中的 locale 测试通过。
159
159
 
160
- 当前核对(2026-11-10):en / zh 各 332 个键,集合一致、无空值;en 无中文残留;`src/remote` 的错误均走 `translate()`;客户端硬编码中文只出现在注释与验收标准正则中。
160
+ 当前核对(2026-11-11):en / zh 各 336 个键,集合一致、无空值;en 无中文残留;`src/remote` 的错误均走 `translate()`;客户端硬编码中文只出现在注释与验收标准正则中。
161
161
 
162
162
  ## 7. Git、npm 与发布
163
163
 
package/cordis.patch.yml CHANGED
@@ -28,6 +28,8 @@
28
28
  # Settings are the bundle's defaults; a profile patch can override them.
29
29
  config:
30
30
  dataDir: ''
31
+ # Empty keeps the document root at <dataDir>/docs, next to the database.
32
+ docsDir: ''
31
33
  busyTimeoutMs: 5000
32
34
 
33
35
  - id: preset-xirang-requirement