devlog-tracker 0.33.2 → 0.33.4

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.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  *English | [繁體中文](README.zh-TW.md)*
4
4
 
5
- **Version** 0.33.2
5
+ **Version** 0.33.4
6
6
 
7
7
  Maintains a `.devlog/devlog.md` in your project, turning each conversation round's requests, decisions, and outcomes into a permanent record. A conversation disappears the moment you `/clear` or switch sessions; this file fills that gap so work can pause and resume. Nothing is touched until you explicitly run `/devlog-tracker:start` — installing the plugin alone doesn't create or modify any files.
8
8
 
package/README.zh-TW.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  *[English](README.md) | 繁體中文*
4
4
 
5
- **版本** 0.33.2
5
+ **版本** 0.33.4
6
6
 
7
7
  在專案中維護一份 `.devlog/devlog.md`,把每一輪對話的請求、決策與結果寫成永久紀錄。對話一 `/clear` 或換 session 就沒了;這份檔案取代那個缺口,讓工作可以中斷再接。沒下過 `/devlog-tracker:start` 時,裝著也不會動任何檔案。
8
8
 
@@ -7,7 +7,7 @@ description: 調整 Checkpoint Mode 的沉默門檻——累積多少輪沒寫 #
7
7
 
8
8
  ```bash
9
9
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
10
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/checkpoint-set.sh" <rounds>
10
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/checkpoint-set.sh" <rounds>
11
11
  ```
12
12
 
13
13
  不要自己手改 `.devlog/.checkpoint-state`。
package/commands/clean.md CHANGED
@@ -34,7 +34,7 @@ description: 無條件清空 .devlog/devlog.md(含專案摘要與所有 Round
34
34
 
35
35
  ```bash
36
36
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
37
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/clean-devlog.sh" --confirmed
37
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/clean-devlog.sh" --confirmed
38
38
  ```
39
39
  ```
40
40
 
@@ -16,7 +16,7 @@ description: 把 .devlog/devlog.md 裡已完成且較舊的紀錄搬到 devlog.a
16
16
  先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄):
17
17
  ```bash
18
18
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
19
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/compact-devlog.sh"
19
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/compact-devlog.sh"
20
20
  ```
21
21
  檔案不存在時腳本 exit 1:告知沒有東西可壓縮。
22
22
  5. 用 stdout 的 `MOVED` / `REMAINING` / `ARCHIVE` 回報一句話。
package/commands/keep.md CHANGED
@@ -84,7 +84,7 @@ description: 掃描整份 devlog.md,把值得留名的主題段落一次分別
84
84
 
85
85
  ```bash
86
86
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
87
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/keep-move.sh" \
87
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/keep-move.sh" \
88
88
  --from <from> --to <to> --name "<name>" --desc "<這段在做什麼的一句話>"
89
89
  ```
90
90
 
@@ -6,7 +6,7 @@ description: 調整 Lessons Mode 機制性提醒的共用門檻——工作區
6
6
 
7
7
  ```bash
8
8
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
9
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/lessons-drift-set.sh" <次數>
9
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/lessons-drift-set.sh" <次數>
10
10
  ```
11
11
 
12
12
  不要自己手改 `.devlog/.lessons-advisory-state`。
@@ -7,7 +7,7 @@ description: 關閉 Lessons Mode。不會刪除任何已寫的 devlog.lessons.*.
7
7
  1. 先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄):
8
8
  ```bash
9
9
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
10
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/lessons-off.sh"
10
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/lessons-off.sh"
11
11
  ```
12
12
  不要自己刪 `.lessons-enabled`。
13
13
  2. stdout 是 `NOT_ENABLED`:告知 Lessons Mode 本來就沒開,結束。
@@ -7,7 +7,7 @@ description: 開啟 Lessons Mode(開發歷程教訓,預設關閉)。隸屬
7
7
  1. 先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄):
8
8
  ```bash
9
9
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
10
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/lessons-on.sh"
10
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/lessons-on.sh"
11
11
  ```
12
12
  不要自己用手建 `.lessons-enabled`。
13
13
  2. stdout 是 `NOT_ENABLED`:告知這個專案還沒下過 `/devlog-tracker:start`,Lessons Mode 隸屬主開關,沒有 Round/Status 紀錄可判斷「BLOCKED→解開」,請先 `/devlog-tracker:start` 再開這個。
package/commands/pause.md CHANGED
@@ -10,7 +10,7 @@ description: 暫停這個專案的 devlog 強制記錄機制。不會刪除任
10
10
 
11
11
  ```bash
12
12
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
13
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/pause-devlog.sh"
13
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/pause-devlog.sh"
14
14
  ```
15
15
  ```
16
16
  不要自己刪 `.enabled`。
@@ -6,7 +6,7 @@ description: 查看 devlog 統計:Round 數、各 Status、BLOCKED 比例、Ch
6
6
 
7
7
  ```bash
8
8
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
9
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/report-devlog.sh"
9
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/report-devlog.sh"
10
10
  ```
11
11
 
12
12
  使用者要看所有 branch 的合計時加 `--all-branches`。
@@ -10,7 +10,7 @@ description: 調整 Segment Watch 的沉默門檻——同一輪連續多久沒
10
10
 
11
11
  ```bash
12
12
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
13
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/segment-watch-set.sh" <seconds>
13
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/segment-watch-set.sh" <seconds>
14
14
  ```
15
15
  ```
16
16
 
package/commands/span.md CHANGED
@@ -5,9 +5,9 @@ description: 開啟或關閉 Span Mode,讓自動續接的長任務定期記錄
5
5
  先判斷使用者要開啟或關閉:
6
6
 
7
7
  - 使用者明確要求關閉,或 `.devlog/.span-open` 已存在且沒有明確要求重新開啟:
8
- 先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄),設 `PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"`,再跑 `DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/span-close.sh"`,
8
+ 先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄),設 `PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"`,再跑 `DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/span-close.sh"`,
9
9
  再依 SKILL 的 span 收尾規則寫一個**新的 Round**,總結整段 span。
10
10
  - 使用者要求開啟:先把目前 Round 正常寫完,`Status` 設為 `IN_PROGRESS`,再跑
11
- `DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/span-open.sh"`。
11
+ `DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/span-open.sh"`。
12
12
 
13
13
  不要手寫 `.span-open` JSON。腳本 exit 1 時顯示 stderr,停止操作。
package/commands/start.md CHANGED
@@ -7,7 +7,7 @@ description: 啟動這個專案的 devlog 強制記錄機制。之後每一輪
7
7
  1. 先決定 plugin 根目錄(有 `DEVLOG_TRACKER_ROOT` 用它;否則用 `CLAUDE_PLUGIN_ROOT`;兩者都空就用含 `.claude-plugin/plugin.json` 的本 plugin 根目錄):
8
8
  ```bash
9
9
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
10
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/start-devlog.sh"
10
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/start-devlog.sh"
11
11
  ```
12
12
  不要自己用手建 `.enabled` / `.checkpoint-state` / `.segment-state`。
13
13
  2. 若 stdout 有 `GITIGNORE_DEVLOG=no`:鄭重提醒——`.devlog/` 會寫入使用者原文(遮罩只覆蓋常見 token 前綴,不是通用掃密)。**強烈建議**把 `.devlog/` 加進專案 `.gitignore`。問要不要現在加。只有使用者明確說要,才在 `.gitignore` 末尾追加一行 `.devlog/`(檔案不存在就建立)。不要改其他行。若使用者拒絕,再警告一次「之後若不小心 commit,prompt/殘留密鑰可能進版控」,然後繼續步驟 3。
@@ -8,7 +8,7 @@ description: 查看這個專案 devlog 強制記錄是否開著、span / checkpo
8
8
 
9
9
  ```bash
10
10
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
11
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/status-devlog.sh"
11
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/status-devlog.sh"
12
12
  ```
13
13
  ```
14
14
  把 stdout 翻譯成給人看的幾行(含 `LESSONS=yes/no`:Lessons Mode 開關狀態;`LESSONS_ADVISORY=<count>/<threshold>`:Lessons Mode 開著時,機制性訊號(工作區漂移不符、或
@@ -6,7 +6,7 @@ description: 把 devlog 產生成一份離線可開的 HTML 時間軸(.devlog/
6
6
 
7
7
  ```bash
8
8
  PLUGIN_ROOT="${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}"
9
- DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/timeline-devlog.sh"
9
+ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd) 重新推>" bash "${PLUGIN_ROOT}/core/scripts/timeline-devlog.sh"
10
10
  ```
11
11
 
12
12
  使用者要看所有 branch 時加 `--all-branches`;要寫到別的位置時加 `--out <路徑>`。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlog-tracker",
3
- "version": "0.33.2",
3
+ "version": "0.33.4",
4
4
  "description": "npx installer for devlog-tracker's Claude Code, Cursor and Codex adapters.",
5
5
  "bin": {
6
6
  "devlog-tracker": "bin/devlog-tracker.js"
@@ -3,10 +3,7 @@ name: devlog-tracker
3
3
  description: 在專案的 .devlog/devlog.md 維護逐輪對話紀錄。使用者下 /devlog-tracker:start 後 Stop hook 強制每輪寫入;SessionStart 在 startup / resume / compact / fork 注入進度,/clear 不注入;要接續用 /devlog-tracker:continue。當使用者提到「devlog-tracker」「.devlog/devlog.md」「/devlog-tracker:continue」或明確要寫/接續這份紀錄時使用。
4
4
  ---
5
5
 
6
- # Devlog Tracker(簡化版)
7
-
8
- 參考 agfnow/agentflow 的 devlog 基礎協定做的簡化版,只保留「逐輪對話紀錄」這一層,
9
- 不含原版的 10 步驟 SDD pipeline、多模型對抗審查、external worker 外包等進階機制。
6
+ # Devlog Tracker
10
7
 
11
8
  ## Contract
12
9
 
@@ -104,9 +101,7 @@ Claude Code 目前沒有正式、穩定的方式讓 hook 知道「這一輪有
104
101
 
105
102
  1. 使用者送出新訊息時,`UserPromptSubmit` hook(`core/scripts/round-start.sh`)
106
103
  若開關開著,就在 `.devlog/.round-current.md` 寫入這一輪的 skeleton(`### User Input`
107
- + `Status: IN_PROGRESS`),並寫 `.devlog/.round-open`。`.turn-start` 雜湊是
108
- **寫完 skeleton 之後**才對 `.round-current.md` 拍的,所以 Stop 仍能判斷 Claude
109
- 有沒有再補收尾。
104
+ + `Status: IN_PROGRESS`),並寫 `.devlog/.round-open`。
110
105
  2. Claude 編輯**同一個** Round:不要再 append 一個新的 `## Round`。不要改 User Input
111
106
  (除非裡面是 hook 的 `(無 prompt)` 占位)。補上 `### Summary` / `### Reply` / `### Handoff`,
112
107
  把 Status 改成 `DONE` / `IN_PROGRESS` / `BLOCKED`。這一輪還開著的時候,編輯的對象
@@ -123,21 +118,14 @@ Claude Code 目前沒有正式、穩定的方式讓 hook 知道「這一輪有
123
118
  這個事件上。
124
119
 
125
120
  需要誠實說明的邊界:User Input 在送出當下就已經在 `.devlog/.round-current.md`
126
- (收尾成功或被判定中斷後才會併回 `devlog.md`)。正常結束時 Stop 仍保證有 Summary / Handoff。
121
+ (收尾成功或被判定中斷後才會併回 `devlog.md`)。正常結束時 Stop 仍保證有 Summary / Reply / Handoff。
127
122
  意外中斷會把同一塊標成 `INTERRUPTED`(process 被殺、或 mid-turn 取消時,Status 通常要等
128
123
  **下一則訊息**或**下次 SessionStart(startup / resume / clear / fork)**才補上)。
129
124
  `PostToolUseFailure` 的 `is_interrupt` 若有觸發,只是 best-effort 的額外路徑,不能當成 Esc
130
125
  會立刻蓋章。中間沒寫成 `### 段落` 的過程仍會丟——Segment Watch 只在還有下一個工具呼叫時催促。
131
126
 
132
- ### 兩個穩健性設計(參考 agfnow/agentflow 的 stop-hook.js)
133
-
134
- - **loop guard**:`enforce-devlog.sh` 一開始會讀 stdin 的 `stop_hook_active` 欄位——這是
135
- Claude Code 官方標準欄位,代表「這輪已經被本支 hook 擋下來一次、Claude 正在重跑」,
136
- 此時直接放行,不會一直卡住同一輪。Claude Code 本身也有連續擋 8 次的上限保護,這是多
137
- 一層保險。
138
- - **fail-open**:三支 hook 腳本都不用 `set -e`,每一步可能失敗的地方(讀不到檔案、雜湊
139
- 算不出來)都明確接住、失敗就直接放行。這些腳本的職責是「檢查」,不該因為自己的臭蟲
140
- 就意外把使用者的 session 卡死。
127
+ hook 本身出錯時一律放行(fail-open),同一輪被 Stop 擋過一次後重跑也會放行(loop guard);
128
+ 設計說明見 `core/scripts/enforce-devlog.sh` 開頭註解。
141
129
 
142
130
  ## 自動接續與 `/clear`
143
131
 
@@ -149,8 +137,8 @@ matcher 設為 `startup|resume|clear|compact|fork`。**開新 session、resume
149
137
 
150
138
  1. 若目前分支的 `.devlog/handoff.md`(或 `handoff.<branch>.md`)非空,先注入這份 Session Handoff 快照
151
139
  2. 再讀取 `.devlog/devlog.md`,注入最後一個 `## Checkpoint`(若有)、最後一個 `## Kept 索引`(若有;不是具名檔內容)、最後一個 `## Lessons 索引`(若有),加上最近 2 輪的 Summary / Handoff / Status(沒有 Summary 的 skeleton 才帶 User Input)
152
- 3. 印到 stdout,Claude Code 會把這段文字當成這次 session 的 additionalContext 自動注入
153
- 4. Claude 收到這段 context 後,開場就已經知道目前進度
140
+
141
+ 這段摘要會出現在 session 開頭的 context 裡。
154
142
 
155
143
  `/clear` 時 hook 仍可能把殘留的開著 Round 標成 `INTERRUPTED`,但 stdout 什麼都不印。
156
144
  之後只有使用者下 `/devlog-tracker:continue`,或明確說「continue」「接續」「繼續上一題」時,
@@ -50,7 +50,7 @@
50
50
  | Hard:上一輪工作區漂移擋工具 | PreToolUse(continue 同 session) | `SKILL.md`「接續」;`commands/continue.md` |
51
51
  | Hard:Segment Watch 逾時先補段落 | PreToolUse | `references/round-segments.md` |
52
52
  | Soft:Checkpoint/Lessons 建議 | hook 提示,不強制寫入本身 | `references/checkpoint-mode.md`/`lessons-mode.md` |
53
- | fail-open/loop guard | hook 穩健性 | `SKILL.md`「兩個穩健性設計」 |
53
+ | fail-open/loop guard | hook 穩健性 | `core/scripts/enforce-devlog.sh` 開頭註解 |
54
54
 
55
55
  ## Transformation
56
56
 
@@ -58,7 +58,7 @@ DEVLOG_PROJECT_DIR="<專案根目錄絕對路徑,不要用 $(pwd)>" bash "${DE
58
58
  這會寫入 `.devlog/.awaiting-reply`,記住「下一則訊息大概是在回答這個
59
59
  Round」。不需要使用者下任何指令,也不用手寫這個 JSON。
60
60
 
61
- 上面第 2 步已經讓這一輪正常收尾(Summary/Handoff/Status 都有效),所以
61
+ 上面第 2 步已經讓這一輪正常收尾(Summary/Reply/Handoff/Status 都有效),所以
62
62
  這個 turn 結束時它會照一般流程併回 `.devlog/devlog.md`。也就是說,**提問
63
63
  出去、答案還沒進來的這段期間**(使用者可能過很久才回覆),這一輪確實已經
64
64
  完整躺在 `devlog.md` 的歷史裡,不是懸在 `.devlog/.round-current.md` 裡假裝