dsh-ai-collab 0.4.4 → 0.6.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.
@@ -78,9 +78,13 @@
78
78
  | 历史补丁(可复现每一步改动) | `.ai\changelog\patches\` |
79
79
  | 日志 / 状态格式与校验 | `.ai\LOG_FORMAT.md`、`.ai\schema\log.schema.json` |
80
80
  | 敏感信息规则 | `.ai\SECURITY.md` |
81
- | 跨项目看板 | `..\.ai\board.md` |
81
+ | 执行计划 / 检查清单 / 风险应对 | `.ai\plan.json`(数据)、`.ai\PLAN.md`(渲染) |
82
+ | 项目文档(对外介绍 / 维护记录) | `.ai\docs\` |
83
+ | 维护脚本 | `.ai\scripts\` |
84
+ | 发布产物 | `.ai\dist\` |
85
+ | 跨项目看板 / 仪表盘 | `..\.ai\board.md`、`..\.ai\dashboard.html` |
82
86
  | 工程内修改历史(对外) | 各工程 `readme.txt` |
83
- | 任务记录清单(默认工作区) | `TASKS.md`(根目录,自动生成) |
87
+ | 任务记录清单(所有项目) | `TASKS.md`(自动生成)、`TASKS.html`(可视化) |
84
88
 
85
89
  ## 7. 多工具入口(严格单文件)
86
90
 
@@ -91,6 +95,16 @@
91
95
  1. **用户级一次性转发**(推荐,项目内零冗余):`~\.claude\CLAUDE.md` 写"若存在 ./AGENTS.md 则遵循";Gemini 在 `~\.gemini\settings.json` 设 `"contextFileName": "AGENTS.md"`。
92
96
  2. **临时落地**:`& .ai\llm.cmd entries -Publish` 生成 4 个转发文件,用完 `& .ai\llm.cmd entries -Remove` 收回。
93
97
  - 转发母版常驻 `.ai\entries\`;改规则只改本文件,`entries -Publish -Force` 会同步。
98
+ ## 8. 纪律清单(自动生成,勿手改)
99
+
100
+ > 全局纪律由 `$DSH_HOME\AGENTS.md` 注入(对所有会话生效);项目纪律的“启用”表示正文已内联在本节,
101
+ > 真正进入当前项目的提示词;“停用”只保留清单行,不生效。
102
+ > 管理入口:DSH 工具 `ai_discipline`(list / add / enable / disable / remove / global-*);
103
+ > 改动后由 `ai-ensure` 重渲染本节。
104
+
105
+ {{DISCIPLINE_TABLE}}
106
+
107
+ {{DISCIPLINE_RULES}}
94
108
  <!-- dsh-ai-collab:generated:end -->
95
109
 
96
110
  <!-- dsh-ai-collab:user:start -->
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0
4
+
5
+ - Plan & task management: new `ai_plan` tool (show / set / done).
6
+ - `.ai/plan.json` stores a structured plan: a goal block, a checklist block, and a risk block.
7
+ Each risk has a severity (red/yellow/green), a mitigation, and an active/resolved flag.
8
+ - `appendRecord` auto-merges active plan risks into `status.json` → `blockers`.
9
+ - `lib/plan.js` renders three files atomically: `PLAN.md` (the plan itself), `TASKS.md` (three
10
+ sections: current plan → checklist → risk log, followed by the reverse-chronological log),
11
+ and `TASKS.html` (self-contained dashboard-style HTML, same visual language as
12
+ `dashboard.html`).
13
+ - `refreshTasks` no longer requires a manual `.ai/tasks-enabled` marker — the file is created
14
+ automatically on first write.
15
+ - Cross-project dashboard: `lib/dashboard.js` generates `F:\MyProject\.ai\dashboard.html` from
16
+ all sibling project statuses. Rows with active blockers are highlighted in red; each project
17
+ gets a sparkline bar of record counts from the last 7 log entries. Run automatically after
18
+ every `ai_log` and `ai_init`.
19
+ - Workspace cleanup: root directory reduced to `AGENTS.md` + `TASKS.md` + `dsh-ai-collab.html`;
20
+ everything else moved into `.ai/docs/`, `.ai/scripts/`, `.ai/dist/`, `.ai/market/`.
21
+ Stray `dsh-ai-collab-0.4.3.zip` deleted.
22
+ - Tests: 39 (14 new for plan I/O, checklist toggling, risk merging, Markdown/HTML rendering,
23
+ project scanning and dashboard generation; all old tests pass).
24
+ - Documentation: `AGENTS.template.md` §6 table now lists `plan.json`/`PLAN.md`, the three
25
+ sub-directories, `dashboard.html` and `TASKS.html`.
26
+
27
+ ## 0.5.0
28
+
29
+ - Disciplines: global modules + project rules.
30
+ - New `ai_discipline` tool: `list/add/enable/disable/remove` for
31
+ `.ai/disciplines/disciplines.json` + `.ai/disciplines/rules/<id>.md`;
32
+ `global-list/global-migrate/global-add/global-enable/global-disable/global-remove`
33
+ for `$DSH_HOME/disciplines/`.
34
+ - `global-migrate` splits an existing `$DSH_HOME/AGENTS.md` into `g0.md … gN.md` + a registry,
35
+ then rewrites `AGENTS.md` as a marker line plus the original text (byte-for-byte, backup
36
+ first). Toggling a module re-renders the injected file, so a disabled section really stops
37
+ being injected.
38
+ - Project rules render into a new **§8** of `AGENTS.md`: a table of global `G*` and project
39
+ `P-*` rows, plus the inline body of every enabled rule. `ai_check` reports drift
40
+ (`on-rule` / `off-rule` / registry unreadable).
41
+ - Cross-session handoff: new `ai_handoff` tool (`read` / `write` / `inherit`) and
42
+ `.ai/SESSION_BOOT.md`, regenerated by `ai_log`, `ai_init` and `autoInit`. It carries the status
43
+ snapshot, the most recent records, the discipline list, and an inheritance prompt for a new
44
+ session. `read` returns the file text itself (generating the file first if it is missing).
45
+ - Concurrency and file protection: `lib/atomic.js` (temp file + `fsync` + rename, retry on
46
+ `EPERM`/`EBUSY`/`EACCES`) and `lib/lock.js` (cross-process lock with stale detection).
47
+ `ai_log` holds `.ai/.log.lock` across the append and status update; `status.json` gains a
48
+ `rev`; `TASKS.md` and `SESSION_BOOT.md` are written atomically. `template/.ai/llm.ps1` gets
49
+ `Write-TextAtomic` + `Enter-ProjectLock`/`Exit-ProjectLock` for `add`, `tasks`, `board` and
50
+ `archive` (archive aborts if the log grew during the copy). `install.ps1` writes `AGENTS.md`
51
+ atomically and backs it up to `.ai/backups/` (last 10) before any change.
52
+ - Tests: 25 (tool contract, config, task rendering, AGENTS.md preservation, atomic/lock,
53
+ discipline registry and §8 drift, handoff).
54
+ - Verified on a real workspace: project rule add/disable/enable/remove, global module
55
+ disable/enable (bytes 5900 → 5671 → 5900), 12 concurrent writers → 12 records with `rev=12`,
56
+ 6 concurrent `llm.ps1 add` calls without loss.
57
+ - Docs: README gains a "What's new in 0.5.0" summary and the discipline/concurrency sections;
58
+ `docs/DETAIL.md` and the visual introduction page are refreshed for 0.5.0.
59
+
3
60
  ## 0.4.4
4
61
 
5
62
  - Docs/legal: add `docs/DISCLAIMER.md` (AS IS, limitation of liability, backup guidance)
package/README.md CHANGED
@@ -11,7 +11,25 @@ The point: any AI tool working in the repo (DSH, Claude Code, Cursor, Copilot, C
11
11
 
12
12
  > **Visual introduction (中文):** <https://ZhuYw3927.github.io/dsh-ai-collab/>
13
13
 
14
- > Status: **0.4.4, experimental**. Published on npm as [`dsh-ai-collab`](https://www.npmjs.com/package/dsh-ai-collab) and listed in the community plugin market — see [Known limitations](#known-limitations).
14
+ > Status: **0.6.0, experimental**. Published on npm as [`dsh-ai-collab`](https://www.npmjs.com/package/dsh-ai-collab) and listed in the community plugin market — see [Known limitations](#known-limitations).
15
+
16
+ ## What's new in 0.6.0
17
+
18
+ - **Plan & task management.** The new `ai_plan` tool (`show`/`set`/`done`) stores a structured plan
19
+ in `.ai/plan.json`: goals, checklists (with done/undone toggles), and risks (each with a
20
+ severity badge, a mitigation, and an active/resolved flag). Active risks are auto-merged into
21
+ `status.json` → `blockers` so they surface in every status readout.
22
+ - **`TASKS.md` is now three-section** (plan → checklist → risks → log) and also rendered as
23
+ **`TASKS.html`**, a self-contained dashboard-style page with status badges and risk colour
24
+ coding. The `.ai/tasks-enabled` marker is no longer needed — `refreshTasks` creates it
25
+ automatically on first use.
26
+ - **Cross-project dashboard**: `F:\MyProject\.ai\dashboard.html` is generated after every
27
+ `ai_log` and `ai_init`. It scans all sibling projects, highlights rows with active blockers in
28
+ red, and renders a sparkline bar of recent record counts per project.
29
+ - **Workspace layout cleaned**: root directory reduced to `AGENTS.md` + `TASKS.md` +
30
+ `dsh-ai-collab.html`; everything else now lives under `.ai/docs/`, `.ai/scripts/`,
31
+ `.ai/dist/` or `.ai/market/`. A stray `dsh-ai-collab-0.4.3.zip` was deleted.
32
+ - Tests: **39** (14 new for plan, checklist, risk merging and HTML rendering; all 25 old tests pass).
15
33
 
16
34
  ## Requirements
17
35
 
@@ -80,10 +98,12 @@ index generated by `scripts/make-market-index.mjs`.
80
98
  | Tool | Does |
81
99
  |---|---|
82
100
  | `ai_status` | Reads `.ai/status.json` + the last N log records (start a session here) |
83
- | `ai_log` | Appends one record to `.ai/log.jsonl`; rejects invalid enums, requires `issue` for `blocked`/`failed`; refreshes `status.json` **and the sibling board** |
84
- | `ai_check` | Validates every record: required fields, enums, timezone, monotonic `ts`, unique `id` |
101
+ | `ai_log` | Appends one record to `.ai/log.jsonl`; rejects invalid enums, requires `issue` for `blocked`/`failed`; refreshes `status.json`, the sibling board, `TASKS.md` and `.ai/SESSION_BOOT.md` |
102
+ | `ai_check` | Validates every record: required fields, enums, timezone, monotonic `ts`, unique `id`; audits the §8 discipline list for drift |
85
103
  | `ai_board` | Read-only roll-up of sibling projects' `.ai/status.json` |
86
104
  | `ai_init` | Ensures the workspace: scaffold if missing, refresh stale `.ai/`/`AGENTS.md`, refresh stale board (idempotent) |
105
+ | `ai_discipline` | Lists, adds, enables, disables and removes project disciplines; migrates/toggles the global discipline modules in `$DSH_HOME` |
106
+ | `ai_handoff` | Reads or rewrites the cross-session handoff packet (`.ai/SESSION_BOOT.md`) and returns an inheritance prompt |
87
107
 
88
108
  ## What `ai_init` creates
89
109
 
@@ -93,7 +113,9 @@ index generated by `scripts/make-market-index.mjs`.
93
113
  └─ .ai\
94
114
  ├─ llm.ps1, llm.cmd ← CLI: status / tail / add / check / entries / archive / board / doctor
95
115
  ├─ log.jsonl ← append-only, UTF-8 no BOM, LF
96
- ├─ status.json ← current state (overwritten)
116
+ ├─ status.json ← current state (overwritten, `rev` increments)
117
+ ├─ SESSION_BOOT.md ← cross-session handoff packet (regenerated on demand)
118
+ ├─ disciplines\ ← project discipline registry + rules\*.md
97
119
  ├─ LOG_FORMAT.md, SECURITY.md, schema\log.schema.json
98
120
  ├─ changelog\ ← version-level docs + patch engine
99
121
  ├─ entries\ ← forwarding-file masters (publish on demand)
@@ -130,7 +152,7 @@ Get-Content "$DSH_HOME\logs\ai-collab-tools.log" -Tail 3 # tools=ai_status,…
130
152
  ```
131
153
 
132
154
  - A fresh boot line means `apply()` ran in this process.
133
- - A `tools=` line means all five tools registered; `spec` shows where `@deepseek-ai/dsh-tools` was loaded from.
155
+ - A `tools=` line means all eight tools registered; `spec` shows where `@deepseek-ai/dsh-tools` was loaded from.
134
156
  - `load-failed` / `register-failed` lines carry the exact resolution errors.
135
157
 
136
158
  The plugin is mounted from outside `app.asar` (a `link:`/absolute path), so the bare `@deepseek-ai/dsh-tools` specifier is not resolvable; it is loaded from the host's real `app.asar` path instead (see `asarRoots()` in `index.js`). `DSH_HOME` is read from the host environment and may be absent when the app is launched from Explorer — the plugin then falls back to `~/.dsh` (`home=homedir`).
@@ -152,7 +174,33 @@ The plugin is mounted from outside `app.asar` (a `link:`/absolute path), so the
152
174
  - A file **without** the zone markers is treated as project-owned and is never rewritten; the rendered reference goes to `.ai/AGENTS.generated.md`. This includes legacy single-line-marker files, which are frozen.
153
175
  - Explicit migration only:
154
176
  - `-ForceAgents` — rebuild the generated zone and move the whole old file into the user zone (nothing deleted);
155
- - `-ResetAgents` — discard old content and write the template (destructive, explicit).
177
+ - `-ResetAgents` — discard old content and write the template (destructive, explicit; the old file is backed up to `.ai/backups/` first).
178
+
179
+ ## Disciplines: global modules and project rules
180
+
181
+ ### Global (`$DSH_HOME`)
182
+
183
+ - `$DSH_HOME/AGENTS.md` stays the file DSH injects into every session. `ai_discipline` with
184
+ `action:"global-migrate"` splits it into `$DSH_HOME/disciplines/g0.md … gN.md` plus
185
+ `$DSH_HOME/disciplines/disciplines.json`, then rewrites `AGENTS.md` as **one marker line + the
186
+ original text, byte-for-byte**. Nothing is deleted; a timestamped copy is written first.
187
+ - `global-list` / `global-enable` / `global-disable` / `global-add` / `global-remove` manage the
188
+ modules. Every change re-renders `AGENTS.md` from the enabled modules only.
189
+ - Disabling a global module is real: the text disappears from the injected file. It cannot be
190
+ overridden per project, because DSH injects the global file unconditionally.
191
+
192
+ ### Project (`.ai/disciplines/`)
193
+
194
+ - Registry: `.ai/disciplines/disciplines.json`; rule bodies: `.ai/disciplines/rules/<id>.md`.
195
+ - `ai_discipline action:"add" | "enable" | "disable" | "remove"` edits the registry and re-renders
196
+ the workspace. Section **§8** of `AGENTS.md` (generated zone) lists every global module (G0…,
197
+ read-only) and every project rule (P-…). The body of each **enabled** project rule is inlined
198
+ into §8, so it is part of the prompt of the project; a disabled rule keeps only its table row.
199
+ - `ai_check` audits §8 against the registry and reports drift: an enabled rule whose body is
200
+ missing, a disabled rule still inlined, or a registry that cannot be read.
201
+ - Raw format is intentionally plain: any human can edit the registry or the rule files; the next
202
+ `ai-ensure` / `install.ps1` render will pick them up.
203
+
156
204
  ## Safety
157
205
 
158
206
  - The log is **append-only**; corrections are new records (`action:"correction"`), never edits.
@@ -162,6 +210,24 @@ The plugin is mounted from outside `app.asar` (a `link:`/absolute path), so the
162
210
  - **Task lists are rendered inside the plugin** (`lib/tasks.js`); the plugin never executes a
163
211
  workspace-provided `.ai/llm.ps1`, so cloning a hostile repository and logging cannot run its code.
164
212
 
213
+ ## Concurrency and file protection
214
+
215
+ - `lib/atomic.js` writes to a same-directory temp file, `fsync`s and renames (retries on
216
+ `EPERM`/`EBUSY`/`EACCES`), so a reader never sees a half-written `status.json`, `TASKS.md` or
217
+ `SESSION_BOOT.md`.
218
+ - `lib/lock.js` is a cross-process lock (`openSync(path, 'wx')`), stale after 30 s, 15 s timeout.
219
+ `ai_log` holds `.ai/.log.lock` across the append **and** the status update; `status.json`
220
+ carries a `rev` that increments on each write.
221
+ - `TASKS.md` refresh holds `.ai/.tasks.lock`; `SESSION_BOOT.md` is written atomically.
222
+ - `template/.ai/llm.ps1` mirrors this in PowerShell: `Write-TextAtomic` (temp + `File.Replace`),
223
+ `Enter-ProjectLock` / `Exit-ProjectLock` around `add`, `tasks`, `board` and `archive`; `archive`
224
+ aborts if the log grew while it was copying.
225
+ - `install.ps1` writes `AGENTS.md` atomically and backs it up to
226
+ `.ai/backups/AGENTS.<stamp>.md` (last 10) before any change.
227
+ - Boundaries: this is **cooperative** locking between this plugin and `.ai/llm.cmd`, not an
228
+ OS-level guarantee. Editors that ignore the lock can still race. `initScript` is trusted
229
+ configuration — never point it at untrusted code.
230
+
165
231
  ## Uninstall
166
232
 
167
233
  1. Remove `dsh-ai-collab` from `dsh.profile.bundles` (or set `enabled: false` on its row) and restart.
@@ -170,16 +236,21 @@ The plugin is mounted from outside `app.asar` (a `link:`/absolute path), so the
170
236
 
171
237
  ## Global discipline (user level)
172
238
 
173
- The bundle ships tools and workspace scaffolding, not a user-level instruction file. To get
174
- the mandatory "step 0" behaviour in every session, copy
175
- [`AGENTS.global.template.md`](AGENTS.global.template.md) to `$DSH_HOME/AGENTS.md`
176
- (or merge it into your existing one). It contains only cross-project discipline — no project facts.
239
+ The bundle ships tools and workspace scaffolding, not a user-level instruction file. Two ways to
240
+ get the mandatory "step 0" behaviour in every session:
241
+
242
+ - **Fresh machine**: copy [`AGENTS.global.template.md`](AGENTS.global.template.md) to
243
+ `$DSH_HOME/AGENTS.md`.
244
+ - **Existing `AGENTS.md`**: call `ai_discipline` with `action:"global-migrate"`. It backs up the
245
+ file, splits it into `$DSH_HOME/disciplines/gN.md` + `disciplines.json`, and rewrites
246
+ `AGENTS.md` as a single marker plus the original text (byte-for-byte). Then use
247
+ `global-disable` / `global-enable` to switch individual sections off or on.
177
248
 
178
249
  ## Development
179
250
 
180
251
  ```powershell
181
252
  npm run check # node --check index.js + lib/*.js
182
- npm test # 19 tests: tool contract, config, task rendering, AGENTS.md preservation
253
+ npm test # 39 tests: tool contract, config, task rendering, AGENTS.md preservation, atomic/lock/discipline/handoff/plan
183
254
  npm pack --dry-run
184
255
  ```
185
256
 
@@ -191,6 +262,13 @@ npm pack --dry-run
191
262
  return `unsupported-platform` instead of failing silently.
192
263
  - Config values are normalised in-process (no schemastery `Config` yet); invalid values produce warnings in `$DSH_HOME/logs/ai-collab-config.log`.
193
264
  - A legacy `AGENTS.md` without zone markers is frozen by design; migrate explicitly with `-ForceAgents` or `-ResetAgents`.
265
+ - Global discipline toggles rewrite `$DSH_HOME/AGENTS.md`. They only work after `global-migrate`
266
+ has produced the marker + `disciplines/` directory; `global-enable` of a missing module is
267
+ rejected. A global module cannot be disabled for one project only — DSH injects the file
268
+ unconditionally.
269
+ - Section §8 of a project `AGENTS.md` is refreshed by `ai-ensure` / `install.ps1`; a rule added
270
+ while no render runs appears after the next `ai_init`, `ai_discipline` change, or session start.
271
+ - The locking is cooperative (plugin + `.ai/llm.cmd`); external editors are not blocked.
194
272
  - The forwarding files for Claude Code / Gemini CLI are only masters under `.ai/entries/`; publish them with `.ai\llm.cmd entries -Publish` when a tool needs auto-discovery.
195
273
  - Publishing is not automated yet — see `PUBLISH.md`.
196
274
 
package/docs/DETAIL.md CHANGED
@@ -14,18 +14,34 @@ files that any tool can read: `AGENTS.md` for facts, `.ai/log.jsonl` for history
14
14
 
15
15
  | Capability | Detail |
16
16
  |---|---|
17
- | Five tools | `ai_status`, `ai_log`, `ai_check`, `ai_board`, `ai_init` |
17
+ | Eight tools | `ai_status`, `ai_log`, `ai_check`, `ai_board`, `ai_init`, `ai_discipline`, `ai_handoff`, `ai_plan` |
18
18
  | Auto-adoption | On `session/created` (`autoInit: true`) run `ai-ensure` in non-temp directories: scaffold when missing, upgrade when the template changed, refresh the board when stale |
19
- | Zoned `AGENTS.md` | A `generated` zone (routing, permissions, commands) replaced on upgrade, and a `user` zone (project facts, sampling data, analysis methods, decisions) preserved byte-for-byte |
20
- | Protected files | An `AGENTS.md` without zone markers is treated as project-owned and never rewritten; the rendered reference goes to `.ai/AGENTS.generated.md` |
21
- | Task list | When `.ai/tasks-enabled` exists, `ai_log` and `ai-ensure` refresh `TASKS.md` at the workspace root |
22
- | Cross-project board | When a sibling `.ai/board.md` exists, the board is refreshed after a record is written |
19
+ | Zoned `AGENTS.md` | A `generated` zone (routing, permissions, commands, §8 discipline list) replaced on upgrade, and a `user` zone (project facts, sampling data, analysis methods, decisions) preserved byte-for-byte |
20
+ | Disciplines | Global modules in `$DSH_HOME/disciplines/` (migrate/toggle via `ai_discipline`) and project rules in `.ai/disciplines/`; enabled project rules are inlined into §8, disabled ones only listed |
21
+ | Handoff | `.ai/SESSION_BOOT.md` carries status, recent records, disciplines and an inheritance prompt; regenerated by `ai_log` / `ai_init` / `autoInit` |
22
+ | Protected files | An `AGENTS.md` without zone markers is treated as project-owned and never rewritten; the rendered reference goes to `.ai/AGENTS.generated.md`; rewrites are atomic and backed up |
23
+ | Task list | `.ai/log.jsonl` drives a three-section `TASKS.md` (plan → checklist → risks → log) and a self-contained `TASKS.html` dashboard; `refreshTasks` auto-creates `.ai/tasks-enabled` on first write |
24
+ | Cross-project board | When a sibling `.ai/board.md` exists, the board is refreshed after a record is written; `dashboard.html` scans all projects with red-highlighted blocker rows |
25
+ | Plan & risk tracking | `.ai/plan.json` stores goals, checklists and risks; active risks merge into `status.json` → `blockers` on every `ai_log`; managed via `ai_plan` (show / set / done) |
26
+ | Concurrency | `lib/lock.js` cross-process lock + `lib/atomic.js` temp/fsync/rename; `status.json` has a `rev`; PowerShell `llm.ps1` mirrors both |
27
+
28
+ ## What's new in 0.6.0
29
+
30
+ | Change | Effect |
31
+ |---|---|
32
+ | `ai_plan` tool | Stores structured plans in `.ai/plan.json`: goals, checklists (with done/undone toggles), risks (severity-badged, each with mitigation and active/resolved). `show` / `set` (upsert any block) / `done` (toggle checklist items) |
33
+ | `TASKS.md` → three-section + `TASKS.html` | Plan, checklist and risk blocks precede the reverse-chronological log; a parallel `TASKS.html` renders the same data as a self-contained dashboard page with status badges |
34
+ | Cross-project `dashboard.html` | Scans sibling projects, highlights rows with active blockers in red, adds a sparkline bar from the last 7 record counts |
35
+ | Risk → blocker auto-merge | Every `ai_log` merges active plan risks into `status.json` → `blockers`, so they surface in `ai_status` |
36
+ | `.tasks-enabled` auto-created | `refreshTasks` creates the marker on first write; no manual step needed |
37
+ | `AGENTS.template.md` §6 updated | Lists `plan.json`/`PLAN.md`, `.ai/docs`/`.ai/scripts`/`.ai/dist`, `dashboard.html` and `TASKS.html` |
38
+ | Tests: 39 | 14 new (plan I/O, checklist toggling, risk merging, Markdown & HTML rendering, project scanning, dashboard generation) |
23
39
 
24
40
  ## Install
25
41
 
26
42
  - **Plugin Manager (recommended):** Plugins → Add plugin → select this package directory.
27
43
  - **CLI:** `dsh plugin --profile <profile> add <package path or npm name>`
28
- - Restart DSH once; every session in the profile then exposes the five tools.
44
+ - Restart DSH once; every session in the profile then exposes the eight tools.
29
45
 
30
46
  ## Configuration
31
47
 
@@ -43,14 +59,22 @@ Values are normalised and invalid values are reported as warnings in
43
59
  ```
44
60
  <project root>
45
61
  ├─ AGENTS.md generated zone + user zone
46
- ├─ TASKS.md optional task list
62
+ ├─ TASKS.md three-section (plan → checklist → risks → log)
63
+ ├─ TASKS.html self-contained dashboard-style task view
47
64
  └─ .ai/
48
65
  ├─ llm.ps1 / llm.cmd status / tail / add / check / board / doctor / tasks
49
66
  ├─ log.jsonl append-only, UTF-8 without BOM, LF
50
- ├─ status.json current-state snapshot (overwritten)
67
+ ├─ status.json current-state snapshot (overwritten, `rev` increments)
68
+ ├─ plan.json structured plan: goals, checklists, risks
69
+ ├─ PLAN.md rendered plan
70
+ ├─ SESSION_BOOT.md cross-session handoff packet
71
+ ├─ disciplines/ project discipline registry + rules/
51
72
  ├─ LOG_FORMAT.md / SECURITY.md / schema/log.schema.json
52
73
  ├─ changelog/ version-level notes and patches
53
74
  ├─ entries/ forwarding masters for Claude Code / Gemini CLI
75
+ ├─ docs/ project documents (external intro / maintenance notes)
76
+ ├─ scripts/ maintenance scripts
77
+ ├─ dist/ release artifacts
54
78
  └─ _archive/
55
79
  ```
56
80
 
@@ -68,6 +92,9 @@ A record is one JSON object per line:
68
92
  - Adoption writes only into the workspace, never into system or temp directories.
69
93
  - The plugin performs no network requests and stores no credentials.
70
94
  - Task rendering runs inside the plugin; it never executes a workspace-provided script.
95
+ - Writes are atomic (temp + `fsync` + rename) and record/status updates take `.ai/.log.lock`;
96
+ PowerShell `llm.ps1` uses the same lock protocol. This is cooperative, not an OS guarantee.
97
+ - `install.ps1` backs up `AGENTS.md` to `.ai/backups/` (last 10) before changing it.
71
98
 
72
99
  ## Compatibility
73
100
 
@@ -83,6 +110,9 @@ A record is one JSON object per line:
83
110
  - The bundle declares no display icon fallback for hosts older than the locale/meta support.
84
111
  - A legacy `AGENTS.md` without zone markers is frozen by design; migrate explicitly with
85
112
  `install.ps1 -ForceAgents` (moves old content into the user zone) or `-ResetAgents`.
113
+ - Global discipline toggles require a prior `ai_discipline global-migrate`; they rewrite
114
+ `$DSH_HOME/AGENTS.md`, and a global module cannot be disabled for a single project.
115
+ - §8 of a project `AGENTS.md` refreshes on the next `ai-ensure` / `install.ps1` render.
86
116
 
87
117
  ## License
88
118
 
package/docs/MARKET.md CHANGED
@@ -1,9 +1,17 @@
1
- # Market release checklist
1
+ # Market release checklist
2
2
 
3
- Published as `dsh-ai-collab@0.4.4`. The remaining steps take it to the
3
+ Published as `dsh-ai-collab@0.5.0`. The remaining steps take it to the
4
4
  community plugin market (`dshmarket` / awesome-dsh-plugin) and, optionally, a self-hosted
5
5
  format-1 index.
6
6
 
7
+ ## Release log
8
+
9
+ | Version | npm | Git tag | Market entry PR |
10
+ |---|---|---|---|
11
+ | `0.5.0` (2026-11-23) | published | `v0.5.0` | #18120 — description refresh for disciplines / handoff / safe writes (open) |
12
+ | `0.4.4` (2026-11-20) | published | `v0.4.4` | #17234 — intro-page link in description (merged) |
13
+ | `0.4.3` (2026-11-17) | published | `v0.4.3` | #16419 — first listing (merged) |
14
+
7
15
  ## 0. Preconditions (already satisfied)
8
16
 
9
17
  | Item | Status |
@@ -12,8 +20,8 @@ format-1 index.
12
20
  | No build scripts, no native modules | yes (nothing to compile on install) |
13
21
  | Package manifest complete | `engines.dsh`, `os`, `exports` (locale/icon), `files` whitelist |
14
22
  | Display metadata | `locale/en.json`, `locale/zh.json`, `icon.svg`, `docs/DETAIL.md` |
15
- | Tests | `npm test` (19 cases) |
16
- | npm name `dsh-ai-collab` | free at the time of writing (HTTP 404) |
23
+ | Tests | `npm test` (25 cases) |
24
+ | npm name `dsh-ai-collab` | taken by this package |
17
25
  | Local-only data | none: paths, hostnames and project names in examples are placeholders |
18
26
 
19
27
  Still missing (needs the maintainer's accounts):
@@ -28,7 +36,7 @@ Still missing (needs the maintainer's accounts):
28
36
  cd <package-dir>
29
37
  npm run check
30
38
  npm test
31
- npm pack --dry-run # inspect the file list (30 files)
39
+ npm pack --dry-run # inspect the file list (37 files)
32
40
  npm publish --access public --registry https://registry.npmjs.org
33
41
  npm view dsh-ai-collab version
34
42
  ```