devlog-tracker 0.25.0 → 0.27.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.
- package/README.md +43 -71
- package/claude/hooks.json +75 -0
- package/cli/agents-md.js +18 -12
- package/cli/agents-md.test.js +37 -9
- package/cli/init.js +6 -4
- package/cli/init.test.js +5 -4
- package/cli/merge-hooks.js +5 -2
- package/cli/merge-hooks.test.js +52 -0
- package/cli/platforms/claude.js +55 -0
- package/cli/platforms/claude.test.js +178 -0
- package/cli/platforms/codex.js +21 -14
- package/cli/skills-from-commands.js +32 -0
- package/cli/skills-from-commands.test.js +51 -0
- package/cli/vendor.js +8 -1
- package/cli/vendor.test.js +24 -5
- package/codex/hooks/on-pre-tool.sh +3 -3
- package/codex/hooks/on-session-end.sh +2 -2
- package/codex/hooks/on-session-start.sh +2 -2
- package/codex/hooks/on-stop.sh +3 -3
- package/codex/hooks/on-user-prompt-submit.sh +2 -2
- package/codex/hooks/test-adapters.sh +2 -2
- package/commands/checkpoint.md +2 -2
- package/commands/clean.md +3 -3
- package/commands/compact.md +3 -3
- package/commands/continue.md +4 -4
- package/commands/keep.md +3 -3
- package/commands/lessons-drift.md +2 -2
- package/commands/lessons-off.md +3 -3
- package/commands/lessons-on.md +3 -3
- package/commands/lessons.md +3 -3
- package/commands/overview.md +3 -3
- package/commands/pause.md +3 -3
- package/commands/resume.md +3 -3
- package/commands/segment-watch.md +3 -3
- package/commands/span.md +2 -2
- package/commands/start.md +3 -3
- package/commands/status.md +3 -3
- package/{hooks → core}/scripts/await-open.sh +1 -1
- package/{hooks → core}/scripts/checkpoint-set.sh +1 -1
- package/{hooks → core}/scripts/clean-devlog.sh +1 -1
- package/{hooks → core}/scripts/close-open-round.sh +1 -1
- package/{hooks → core}/scripts/compact-devlog.sh +1 -1
- package/{hooks → core}/scripts/enforce-devlog.sh +1 -1
- package/{hooks → core}/scripts/keep-move.sh +1 -1
- package/{hooks → core}/scripts/kept-list.sh +1 -1
- package/{hooks → core}/scripts/lessons-append.sh +2 -2
- package/{hooks → core}/scripts/lessons-drift-set.sh +1 -1
- package/{hooks → core}/scripts/lessons-off.sh +1 -1
- package/{hooks → core}/scripts/lessons-on.sh +1 -1
- package/{hooks → core}/scripts/lessons-read.sh +1 -1
- package/{hooks → core}/scripts/on-tool-failure.sh +1 -1
- package/{hooks → core}/scripts/pause-devlog.sh +1 -1
- package/core/scripts/project-dir.sh +19 -0
- package/{hooks → core}/scripts/resume-devlog.sh +1 -1
- package/{hooks → core}/scripts/round-start.sh +1 -1
- package/{hooks → core}/scripts/run-tests.sh +1 -1
- package/{hooks → core}/scripts/segment-watch-set.sh +1 -1
- package/{hooks → core}/scripts/segment-watch.sh +1 -1
- package/{hooks → core}/scripts/session-start-devlog.sh +1 -1
- package/{hooks → core}/scripts/span-close.sh +1 -1
- package/{hooks → core}/scripts/span-open.sh +1 -1
- package/{hooks → core}/scripts/start-devlog.sh +1 -1
- package/{hooks → core}/scripts/status-devlog.sh +1 -1
- package/core/scripts/tests/test-cli-init-e2e.sh +68 -0
- package/core/scripts/tests/test-project-dir.sh +30 -0
- package/{hooks → core}/scripts/tests/test-session-start-devlog.sh +2 -2
- package/{hooks → core}/scripts/workspace-snapshot.sh +2 -2
- package/cursor/hooks/on-pre-tool.sh +2 -2
- package/cursor/hooks/on-session-end.sh +2 -2
- package/cursor/hooks/on-session-start.sh +2 -2
- package/cursor/hooks/on-stop.sh +2 -2
- package/cursor/hooks/on-submit-prompt.sh +2 -2
- package/cursor/hooks/on-tool-failure.sh +2 -2
- package/package.json +4 -3
- package/skills/devlog-tracker/SKILL.md +9 -9
- package/skills/devlog-tracker/references/lessons-mode.md +1 -1
- package/skills/devlog-tracker/references/reply-fold.md +1 -1
- package/hooks/scripts/tests/test-cli-init-e2e.sh +0 -38
- /package/{hooks → core}/scripts/detect-pending-question.sh +0 -0
- /package/{hooks → core}/scripts/devlog-lock.sh +0 -0
- /package/{hooks → core}/scripts/devlog-md.sh +0 -0
- /package/{hooks → core}/scripts/devlog-path.sh +0 -0
- /package/{hooks → core}/scripts/files-snapshot.sh +0 -0
- /package/{hooks → core}/scripts/json-field.sh +0 -0
- /package/{hooks → core}/scripts/on-session-end.sh +0 -0
- /package/{hooks → core}/scripts/on-stop-failure.sh +0 -0
- /package/{hooks → core}/scripts/redact-prompt.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-await-open.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-branch-scoped-integration.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-checkpoint-set.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-clean-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-close-open-round.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-compact-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-devlog-lock.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-devlog-md.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-devlog-path.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-enforce-devlog-files.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-enforce-devlog-handoff-order.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-enforce-devlog-workspace.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-enforce-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-files-snapshot.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-json-field.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-keep-move.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-kept-list.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-lessons-append.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-lessons-drift-set.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-lessons-on-off.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-lessons-read.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-on-interrupt.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-redact-prompt.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-resume-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-round-start.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-segment-watch-set.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-segment-watch.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-start-pause-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-status-span.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-workspace-snapshot.sh +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
set -uo pipefail
|
|
3
3
|
_src="${BASH_SOURCE[0]}"
|
|
4
4
|
SCRIPT_DIR="$(cd "${_src%/*}" && pwd)"
|
|
5
|
-
PLUGIN_SCRIPTS="$(cd "$SCRIPT_DIR/../../
|
|
5
|
+
PLUGIN_SCRIPTS="$(cd "$SCRIPT_DIR/../../core/scripts" && pwd)"
|
|
6
6
|
INPUT="$(cat 2>/dev/null || true)"
|
|
7
7
|
ROOT="$(printf '%s' "$INPUT" | bash "$SCRIPT_DIR/project-dir.sh")"
|
|
8
|
-
export
|
|
8
|
+
export DEVLOG_PROJECT_DIR="$ROOT"
|
|
9
9
|
PROMPT=""
|
|
10
10
|
SESSION_ID=""
|
|
11
11
|
if command -v jq >/dev/null 2>&1; then
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
set -uo pipefail
|
|
3
3
|
_src="${BASH_SOURCE[0]}"
|
|
4
4
|
SCRIPT_DIR="$(cd "${_src%/*}" && pwd)"
|
|
5
|
-
PLUGIN_SCRIPTS="$(cd "$SCRIPT_DIR/../../
|
|
5
|
+
PLUGIN_SCRIPTS="$(cd "$SCRIPT_DIR/../../core/scripts" && pwd)"
|
|
6
6
|
INPUT="$(cat 2>/dev/null || true)"
|
|
7
7
|
ROOT="$(printf '%s' "$INPUT" | bash "$SCRIPT_DIR/project-dir.sh")"
|
|
8
|
-
export
|
|
8
|
+
export DEVLOG_PROJECT_DIR="$ROOT"
|
|
9
9
|
if command -v jq >/dev/null 2>&1; then
|
|
10
10
|
IS_INTERRUPT="$(printf '%s' "$INPUT" | jq -r '.is_interrupt // .tool_result.is_interrupt // false' 2>/dev/null || echo false)"
|
|
11
11
|
else
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devlog-tracker",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "npx installer for
|
|
3
|
+
"version": "0.27.0",
|
|
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"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
10
10
|
"cli",
|
|
11
|
-
"
|
|
11
|
+
"core/scripts",
|
|
12
|
+
"claude/hooks.json",
|
|
12
13
|
"codex/hooks",
|
|
13
14
|
"cursor/hooks",
|
|
14
15
|
"skills",
|
|
@@ -83,7 +83,7 @@ Claude Code 目前沒有正式、穩定的方式讓 hook 知道「這一輪有
|
|
|
83
83
|
|
|
84
84
|
開關啟動之後,才會進入下面這套強制流程:
|
|
85
85
|
|
|
86
|
-
1. 使用者送出新訊息時,`UserPromptSubmit` hook(`
|
|
86
|
+
1. 使用者送出新訊息時,`UserPromptSubmit` hook(`core/scripts/round-start.sh`)
|
|
87
87
|
若開關開著,就在 `.devlog/.round-current.md` 寫入這一輪的 skeleton(`### User Input`
|
|
88
88
|
+ `Status: IN_PROGRESS`),並寫 `.devlog/.round-open`。`.turn-start` 雜湊是
|
|
89
89
|
**寫完 skeleton 之後**才對 `.round-current.md` 拍的,所以 Stop 仍能判斷 Claude
|
|
@@ -93,7 +93,7 @@ Claude Code 目前沒有正式、穩定的方式讓 hook 知道「這一輪有
|
|
|
93
93
|
把 Status 改成 `DONE` / `IN_PROGRESS` / `BLOCKED`。這一輪還開著的時候,編輯的對象
|
|
94
94
|
是 `.devlog/.round-current.md`,不是 `devlog.md`——這一輪還沒併回去之前,
|
|
95
95
|
`devlog.md` 完全看不到它。
|
|
96
|
-
3. `Stop` hook(`
|
|
96
|
+
3. `Stop` hook(`core/scripts/enforce-devlog.sh`)若雜湊沒變、或最後一個 Round
|
|
97
97
|
缺少 `### Summary` / `### Reply` / `### Handoff`,就用 exit code 2 擋下來。通過則刪掉
|
|
98
98
|
`.round-open`,並把 `.round-current.md` 的內容併回 `devlog.md` 尾端、清空
|
|
99
99
|
`.round-current.md`(設計見 `docs/design/round-current-split.md`)。
|
|
@@ -130,7 +130,7 @@ Claude 主動宣告「接下來會有一串自動續接」時才放寬,且用
|
|
|
130
130
|
|
|
131
131
|
## 自動接續與 `/clear`
|
|
132
132
|
|
|
133
|
-
這個 plugin 內建一個 SessionStart hook(`
|
|
133
|
+
這個 plugin 內建一個 SessionStart hook(`claude/hooks.json` + `core/scripts/session-start-devlog.sh`),
|
|
134
134
|
matcher 設為 `startup|resume|clear|compact|fork`。**開新 session、resume、`/compact`、`/fork`**
|
|
135
135
|
時會自動讀檔注入;**`/clear` 不會注入**——對話清空就是空的。
|
|
136
136
|
|
|
@@ -228,7 +228,7 @@ Round 編號:讀取檔案中最後一個 `## Round <N>`,本輪用 N+1;檔
|
|
|
228
228
|
`現況` 幾乎每輪都該有。`工作區`、`完成條件` 與 `下一步` 在 `IN_PROGRESS`/`BLOCKED` 必寫;`DONE` 且沒有後續就整節省略——
|
|
229
229
|
但 `DONE` 若 `檔案` 有內容(宣稱動過/commit 過檔案),`工作區` 一樣必寫且會被 Stop hook 機器核對,
|
|
230
230
|
避免「已 commit 完成」卻其實沒 commit 這種宣稱跟實際不符沒人發現。
|
|
231
|
-
`完成條件` 要寫到下一輪能對照判斷「可否 DONE」(例如「`bash
|
|
231
|
+
`完成條件` 要寫到下一輪能對照判斷「可否 DONE」(例如「`bash core/scripts/tests/test-foo.sh` 全過」),
|
|
232
232
|
不要只寫「功能完成」。`下一步` 要具體到下一輪打開就能做(路徑/反引號指令/skill 名),寫「繼續完成」不算完成;
|
|
233
233
|
`IN_PROGRESS` 時 Stop 會做輕量可執行檢查(見下)。`BLOCKED` 的 `現況` 或 `下一步` 必須寫「缺什麼、出現長怎樣」。
|
|
234
234
|
- **`工作區` 是收尾當下的 git 快照,給下一輪核對用。** 寫之前跑 `git status --short`、`git rev-parse --abbrev-ref HEAD`、`git rev-parse --short HEAD`,照輸出寫。`abbrev-ref` 為 `HEAD` 時用 detached 格式;`rev-parse --short HEAD` 失敗但 `git symbolic-ref --short HEAD` 抓得到分支名(尚無 commit,例如剛 `git init`)用 unborn 格式;兩者都失敗才是非 git。髒檔是整棵樹的未提交,不必跟「檔案」那輪 delta 相同。格式:
|
|
@@ -239,9 +239,9 @@ Round 編號:讀取檔案中最後一個 `## Round <N>`,本輪用 N+1;檔
|
|
|
239
239
|
- detached 有未提交:第一行 `HEAD detached @ a1b2c3d`,第二行 `未提交:src/a.ts, hooks/foo.sh`
|
|
240
240
|
- unborn(尚無 commit)乾淨:`main @ (尚無 commit),工作樹乾淨`(一行)
|
|
241
241
|
- unborn(尚無 commit)有未提交:第一行 `main @ (尚無 commit)`,第二行 `未提交:src/a.ts, hooks/foo.sh`
|
|
242
|
-
(七種格式的機器生產者只有 `
|
|
242
|
+
(七種格式的機器生產者只有 `core/scripts/workspace-snapshot.sh`。寫入照上面手寫;Stop 用同一 function 核對。改格式時改 SKILL 與該腳本,不要在 continue.md 再抄一份。)
|
|
243
243
|
`INTERRUPTED` stub 不寫這一節。`IN_PROGRESS`/`BLOCKED` 收尾時,Stop hook 會自己算一次
|
|
244
|
-
即時 git 快照,跟這一節逐字比對,不符就擋下來並印出正確內容(`
|
|
244
|
+
即時 git 快照,跟這一節逐字比對,不符就擋下來並印出正確內容(`core/scripts/workspace-snapshot.sh`,
|
|
245
245
|
docs/design/devlog-as-ssot-assessment.md Phase 1);`DONE` 若「檔案」有內容一樣核對——只有
|
|
246
246
|
沒動檔的 `DONE` 與 `INTERRUPTED` 不受影響。
|
|
247
247
|
接手跑 `workspace-snapshot.sh`(`PLUGIN_ROOT` 同其他指令),stdout 就是要對的快照,不要手編(continue/fallback 見 `commands/continue.md` 步驟 5;resume 只做 5.1–5.2,等確認才做下一步)。腳本找不到才退回上面七種格式手編。
|
|
@@ -253,7 +253,7 @@ Round 編號:讀取檔案中最後一個 `## Round <N>`,本輪用 N+1;檔
|
|
|
253
253
|
涵蓋所有髒檔——跨輪殘留、還沒 commit 的舊檔案不算這輪漏列)。Rename 一律回報成
|
|
254
254
|
刪除+新增,不是第四類。`.devlog/` 路徑不算進比對。看不懂的行(沒有照這個格式寫)會被擋下來,
|
|
255
255
|
不是 fail-open——這是 Claude 該產生的格式,不是可有可無的宣告。細節見
|
|
256
|
-
`docs/design/files-verify.md`(`
|
|
256
|
+
`docs/design/files-verify.md`(`core/scripts/files-snapshot.sh`)。
|
|
257
257
|
- Handoff 只寫已發生的事;未來式只允許出現在「下一步」與「完成條件」。
|
|
258
258
|
- `Status` 只寫 `DONE`、`IN_PROGRESS`、`BLOCKED`、`INTERRUPTED` 其中一個,不要在下面再附「接下來要做什麼」
|
|
259
259
|
(那句搬進 Handoff 的「下一步」)。`IN_PROGRESS` = 還能做;`BLOCKED` = 缺外部輸入;
|
|
@@ -322,7 +322,7 @@ Reply Fold 讓它折進同一個 Round。
|
|
|
322
322
|
|
|
323
323
|
**提問前**(純文字跨 turn;結束 turn 之前):先用 Edit 在 `### Summary` 之前插入一段
|
|
324
324
|
`### 段落(Claude 提問)` 記下問題原文,再跑
|
|
325
|
-
`${CLAUDE_PLUGIN_ROOT}/
|
|
325
|
+
`${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT}}/core/scripts/await-open.sh` 標記「下一則訊息大概是在
|
|
326
326
|
回答這個 Round」。使用者回答時 `round-start.sh` 會自動折成對應段落,不用手動
|
|
327
327
|
處理。連續多輪一問一答(例如 grilling)時不必每題重寫 Summary/Reply/Handoff/
|
|
328
328
|
Status,只有整場問答真正結束才收尾一次。
|
|
@@ -386,7 +386,7 @@ Handoff。核對用 `commands/continue.md` 步驟 5.1–5.2(不要跟著做 5.
|
|
|
386
386
|
## 跨檔總覽:`/devlog-tracker:overview`
|
|
387
387
|
|
|
388
388
|
純讀取,不核對工作區、不等確認(跟 `/devlog-tracker:lessons` 一樣的唯讀風格)。用
|
|
389
|
-
`
|
|
389
|
+
`core/scripts/kept-list.sh` 解析 `## Kept 索引` 取出所有 `devlog.<name>.md` 檔名(含存在性
|
|
390
390
|
檢查,磁碟上被手動刪掉的 ghost row 只提一句,不嘗試修復),讀完所有存在的檔案後在對話裡
|
|
391
391
|
產出兩塊:跨主題敘事總覽,以及一節「可能該進 `CLAUDE.md` 的規範候選」(挑得出來才輸出,
|
|
392
392
|
格式貼近 `CLAUDE.md` 條列寫法方便複製)。不寫入任何檔案,包含 `CLAUDE.md` 本身。步驟見
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
**寫法**:跑(`PLUGIN_ROOT` 同其他指令):
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
23
|
+
DEVLOG_PROJECT_DIR="$(pwd)" bash "${PLUGIN_ROOT}/core/scripts/lessons-append.sh" \
|
|
24
24
|
--topic "<主題 kebab-case slug,跟 keep 的 <name> 同一套正規化規則>" \
|
|
25
25
|
--text "<自由散文,一段就好:卡在哪、怎麼解開、下次怎麼避免>"
|
|
26
26
|
```
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
3. 用 Bash 執行:
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
|
|
55
|
+
DEVLOG_PROJECT_DIR="$(pwd)" bash "${DEVLOG_TRACKER_ROOT:-${CLAUDE_PLUGIN_ROOT}}/core/scripts/await-open.sh"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
這會寫入 `.devlog/.awaiting-reply`,記住「下一則訊息大概是在回答這個
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -uo pipefail
|
|
3
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
4
|
-
REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
5
|
-
TMP="$(mktemp -d)"
|
|
6
|
-
trap 'rm -rf "$TMP"' EXIT
|
|
7
|
-
FAIL=0
|
|
8
|
-
|
|
9
|
-
command -v node >/dev/null 2>&1 || { echo "SKIP: node not installed"; exit 0; }
|
|
10
|
-
|
|
11
|
-
PROJECT="$TMP/project"
|
|
12
|
-
mkdir -p "$PROJECT"
|
|
13
|
-
|
|
14
|
-
cd "$PROJECT" || exit 1
|
|
15
|
-
NODE_BIN="$(command -v node)"
|
|
16
|
-
"$NODE_BIN" "$REPO_ROOT/bin/devlog-tracker.js" init --codex --cursor >/dev/null 2>"$TMP/stderr" \
|
|
17
|
-
|| { echo "FAIL: init exited non-zero"; cat "$TMP/stderr"; FAIL=1; }
|
|
18
|
-
|
|
19
|
-
[ -f "$PROJECT/.devlog-tracker/VERSION" ] && echo "PASS: vendored VERSION exists" || { echo "FAIL: no VERSION"; FAIL=1; }
|
|
20
|
-
[ -f "$PROJECT/.devlog-tracker/env.sh" ] && echo "PASS: vendored env.sh exists" || { echo "FAIL: no env.sh"; FAIL=1; }
|
|
21
|
-
[ -f "$PROJECT/.codex/hooks.json" ] && echo "PASS: .codex/hooks.json written" || { echo "FAIL: no .codex/hooks.json"; FAIL=1; }
|
|
22
|
-
[ -f "$PROJECT/.codex/prompts/devlog-start.md" ] && echo "PASS: Codex start prompt written" || { echo "FAIL: no Codex start prompt"; FAIL=1; }
|
|
23
|
-
[ -f "$PROJECT/.cursor/hooks.json" ] && echo "PASS: .cursor/hooks.json written" || { echo "FAIL: no .cursor/hooks.json"; FAIL=1; }
|
|
24
|
-
|
|
25
|
-
# re-running must not duplicate entries
|
|
26
|
-
COUNT_BEFORE=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$PROJECT/.codex/hooks.json')).hooks.Stop.length)")
|
|
27
|
-
"$NODE_BIN" "$REPO_ROOT/bin/devlog-tracker.js" init --codex --cursor >/dev/null 2>"$TMP/stderr" \
|
|
28
|
-
|| { echo "FAIL: second init exited non-zero"; cat "$TMP/stderr"; FAIL=1; }
|
|
29
|
-
COUNT_AFTER=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$PROJECT/.codex/hooks.json')).hooks.Stop.length)")
|
|
30
|
-
if [ "$COUNT_BEFORE" = "$COUNT_AFTER" ]; then
|
|
31
|
-
echo "PASS: re-running init does not duplicate hook entries"
|
|
32
|
-
else
|
|
33
|
-
echo "FAIL: hook entries duplicated ($COUNT_BEFORE -> $COUNT_AFTER)"; FAIL=1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
if [ "$FAIL" -eq 0 ]; then echo "All checks passed."; exit 0
|
|
37
|
-
else echo "Some checks FAILED."; exit 1
|
|
38
|
-
fi
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|