devlog-tracker 0.25.1 → 0.29.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.md +131 -151
- package/README.zh-TW.md +235 -0
- package/claude/hooks.json +75 -0
- package/cli/agents-md.js +15 -8
- package/cli/agents-md.test.js +21 -1
- 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 +6 -18
- 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 +21 -5
- package/commands/lessons-drift.md +4 -4
- 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/search.md +22 -0
- package/commands/segment-watch.md +3 -3
- package/commands/span.md +2 -2
- package/commands/start.md +3 -3
- package/commands/status.md +5 -4
- 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 +2 -1
- package/{hooks → core}/scripts/close-open-round.sh +1 -1
- package/{hooks → core}/scripts/compact-devlog.sh +1 -1
- package/{hooks → core}/scripts/devlog-lock.sh +17 -1
- package/{hooks → core}/scripts/devlog-path.sh +15 -8
- package/{hooks → core}/scripts/enforce-devlog.sh +26 -1
- package/core/scripts/handoff-file.sh +106 -0
- package/{hooks → core}/scripts/keep-move.sh +1 -1
- package/{hooks → core}/scripts/kept-list.sh +1 -1
- package/core/scripts/lessons-advisory-state.sh +51 -0
- package/{hooks → core}/scripts/lessons-append.sh +18 -2
- package/core/scripts/lessons-drift-set.sh +46 -0
- package/{hooks → core}/scripts/lessons-off.sh +1 -1
- package/{hooks → core}/scripts/lessons-on.sh +9 -4
- 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 +52 -17
- package/{hooks → core}/scripts/run-tests.sh +1 -1
- package/core/scripts/search-devlog.sh +63 -0
- 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 +8 -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 +5 -5
- package/{hooks → core}/scripts/tests/test-clean-devlog.sh +12 -0
- package/core/scripts/tests/test-cli-init-e2e.sh +68 -0
- package/core/scripts/tests/test-devlog-lock.sh +76 -0
- package/{hooks → core}/scripts/tests/test-devlog-path.sh +44 -0
- package/{hooks → core}/scripts/tests/test-enforce-devlog-files.sh +11 -0
- package/core/scripts/tests/test-enforce-devlog-session-handoff.sh +178 -0
- package/{hooks → core}/scripts/tests/test-enforce-devlog-workspace.sh +35 -0
- package/{hooks → core}/scripts/tests/test-enforce-devlog.sh +174 -0
- package/core/scripts/tests/test-handoff-file.sh +98 -0
- package/core/scripts/tests/test-lessons-advisory-state.sh +55 -0
- package/{hooks → core}/scripts/tests/test-lessons-append.sh +18 -0
- package/{hooks → core}/scripts/tests/test-lessons-drift-set.sh +14 -5
- package/{hooks → core}/scripts/tests/test-lessons-on-off.sh +16 -6
- package/core/scripts/tests/test-project-dir.sh +30 -0
- package/{hooks → core}/scripts/tests/test-round-start.sh +247 -13
- package/core/scripts/tests/test-search-devlog.sh +126 -0
- package/{hooks → core}/scripts/tests/test-session-start-devlog.sh +61 -2
- package/{hooks → core}/scripts/tests/test-status-span.sh +3 -3
- 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 +5 -4
- package/skills/devlog-tracker/SKILL.md +90 -22
- package/skills/devlog-tracker/references/checkpoint-mode.md +21 -6
- package/skills/devlog-tracker/references/contract.md +83 -0
- package/skills/devlog-tracker/references/lessons-mode.md +33 -9
- package/skills/devlog-tracker/references/reply-fold.md +1 -1
- package/hooks/scripts/lessons-drift-set.sh +0 -42
- package/hooks/scripts/tests/test-cli-init-e2e.sh +0 -38
- package/hooks/scripts/tests/test-devlog-lock.sh +0 -37
- /package/{hooks → core}/scripts/detect-pending-question.sh +0 -0
- /package/{hooks → core}/scripts/devlog-md.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-close-open-round.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-compact-devlog.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-devlog-md.sh +0 -0
- /package/{hooks → core}/scripts/tests/test-enforce-devlog-handoff-order.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-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-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-workspace-snapshot.sh +0 -0
|
@@ -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/.agents/skills/devlog-start/SKILL.md" ] && echo "PASS: Codex start skill written" || { echo "FAIL: no Codex start skill"; 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
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -uo pipefail
|
|
3
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
4
|
-
. "$SCRIPT_DIR/devlog-lock.sh"
|
|
5
|
-
TMP="$(mktemp -d)"
|
|
6
|
-
trap 'rm -rf "$TMP"' EXIT
|
|
7
|
-
DEVLOG_DIR="$TMP/.devlog"
|
|
8
|
-
mkdir -p "$DEVLOG_DIR"
|
|
9
|
-
FAIL=0
|
|
10
|
-
|
|
11
|
-
devlog_lock_acquire
|
|
12
|
-
[ "${LOCK_HELD:-0}" -eq 1 ] && [ -d "$DEVLOG_DIR/.lock" ] \
|
|
13
|
-
&& echo "PASS: acquired" || { echo "FAIL: acquire"; FAIL=1; }
|
|
14
|
-
mkdir "$DEVLOG_DIR/.lock" >/dev/null 2>&1
|
|
15
|
-
[ "$?" -ne 0 ] && echo "PASS: second mkdir excluded" || { echo "FAIL: duplicate mkdir"; FAIL=1; }
|
|
16
|
-
devlog_lock_release
|
|
17
|
-
devlog_lock_acquire
|
|
18
|
-
[ "${LOCK_HELD:-0}" -eq 1 ] && echo "PASS: reacquired after release" || { echo "FAIL: reacquire"; FAIL=1; }
|
|
19
|
-
devlog_lock_release
|
|
20
|
-
|
|
21
|
-
mkdir "$DEVLOG_DIR/.lock"
|
|
22
|
-
START="$(date +%s)"
|
|
23
|
-
devlog_lock_acquire
|
|
24
|
-
END="$(date +%s)"
|
|
25
|
-
ELAPSED=$((END - START))
|
|
26
|
-
[ "${LOCK_HELD:-0}" -eq 0 ] && [ "$ELAPSED" -ge 2 ] && [ "$ELAPSED" -le 3 ] \
|
|
27
|
-
&& echo "PASS: contention fails open" || { echo "FAIL: contention held=$LOCK_HELD elapsed=$ELAPSED"; FAIL=1; }
|
|
28
|
-
rmdir "$DEVLOG_DIR/.lock"
|
|
29
|
-
|
|
30
|
-
MIN_PATH="$TMP/min-path"
|
|
31
|
-
mkdir "$MIN_PATH"
|
|
32
|
-
ln -s "$(command -v bash)" "$MIN_PATH/bash"
|
|
33
|
-
HELD="$(PATH="$MIN_PATH" bash -c '. "$1"; DEVLOG_DIR="$2"; devlog_lock_acquire; echo "${LOCK_HELD:-0}"' _ "$SCRIPT_DIR/devlog-lock.sh" "$DEVLOG_DIR")"
|
|
34
|
-
[ "$HELD" = "0" ] && echo "PASS: missing lock tools fails open" || { echo "FAIL: restricted path held=$HELD"; FAIL=1; }
|
|
35
|
-
|
|
36
|
-
if [ "$FAIL" -eq 0 ]; then echo "All checks passed."; exit 0
|
|
37
|
-
else echo "Some checks FAILED."; exit 1; 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
|