From 335cdef0147bbcbaf79de2eca3c47ad751d6feaf Mon Sep 17 00:00:00 2001 From: SJ Lee Date: Fri, 18 Sep 2026 08:50:32 +0900 Subject: [PATCH 1/2] chore: move doc-drift-check.js and bash-runtime.js into tests/tools (#460) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01X9gZYk7FcYSLAZBBe7JXvZ --- CHANGELOG.md | 1 + tests/dev-backlog/github-resilience.acceptance.test.js | 2 +- {skills/dev-backlog/scripts => tests/tools}/bash-runtime.js | 2 +- tests/{dev-backlog => tools}/bash-runtime.test.js | 3 ++- .../dev-backlog/scripts => tests/tools}/doc-drift-check.js | 4 ++-- tests/{dev-backlog => tools}/doc-drift-check.test.js | 5 +++-- 6 files changed, 10 insertions(+), 7 deletions(-) rename {skills/dev-backlog/scripts => tests/tools}/bash-runtime.js (94%) rename tests/{dev-backlog => tools}/bash-runtime.test.js (97%) rename {skills/dev-backlog/scripts => tests/tools}/doc-drift-check.js (96%) rename tests/{dev-backlog => tools}/doc-drift-check.test.js (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 702b0de..8f04721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Each entry links the GitHub issue (the canonical spec) and the merge PR (the shi ### Changed +- **Repo-only helpers leave the shipped bundle** — `doc-drift-check.js` (this repo's lint over its own docs) and `bash-runtime.js` (a test helper that locates bash) moved from `skills/dev-backlog/scripts/` to `tests/tools/` with their tests; no operator script or SKILL.md rail used them. The shipped script inventory is 14 → 12 files. Closes [#460](https://github.com/sungjunlee/dev-backlog/issues/460). - **Doctor advisory checks and dead lib.js readers deleted** — `backlog-doctor.js` drops `in_flight_staleness` (`--stale-days`) and `context_bloat`; both re-derive from `status.sh --json` `age_days` and `wc -l` and nothing consumed them. `lib.js` drops `parseMarkerMonth` and the triage config readers orphaned by #433 (259 lines with tests). The three guard checks and their JSON shapes are unchanged. Closes [#458](https://github.com/sungjunlee/dev-backlog/issues/458). - **status.sh trailing sections deleted** — the Local Files block (counted `tasks/*.md` mirrors by a Backlog.md `status:` field, a format parked at `v0.11.0`), the Relay Runs block (re-derived another tool's run-directory slug and grepped its manifests), and the Past sprints line are gone (54 lines with their smoke fixture); each was one command away and nothing consumed them. Output now ends after the Active Sprint block; `--json` and `--track` are unchanged. Closes [#459](https://github.com/sungjunlee/dev-backlog/issues/459). diff --git a/tests/dev-backlog/github-resilience.acceptance.test.js b/tests/dev-backlog/github-resilience.acceptance.test.js index eb97fca..f746ac0 100644 --- a/tests/dev-backlog/github-resilience.acceptance.test.js +++ b/tests/dev-backlog/github-resilience.acceptance.test.js @@ -21,7 +21,7 @@ const { spawnSync } = require("node:child_process"); const SKILL_SCRIPTS = path.resolve(__dirname, "../../skills/dev-backlog/scripts"); const TEST_FAKES = path.resolve(__dirname, "../fakes"); const TRIAGE_SCRIPTS = path.resolve(__dirname, "../../skills/backlog-triage/scripts"); -const { resolveBashExecutable, toBashArgs } = require(path.join(SKILL_SCRIPTS, "bash-runtime.js")); +const { resolveBashExecutable, toBashArgs } = require(path.resolve(__dirname, "../tools/bash-runtime.js")); const { writeGhFixture } = require(path.join(TEST_FAKES, "fake-gh-fixture.js")); const SCRIPTS_DIR = SKILL_SCRIPTS; diff --git a/skills/dev-backlog/scripts/bash-runtime.js b/tests/tools/bash-runtime.js similarity index 94% rename from skills/dev-backlog/scripts/bash-runtime.js rename to tests/tools/bash-runtime.js index 2b12605..4d0d190 100644 --- a/skills/dev-backlog/scripts/bash-runtime.js +++ b/tests/tools/bash-runtime.js @@ -4,7 +4,7 @@ const fs = require("node:fs"); const path = require("node:path"); const { execFileSync, spawnSync } = require("node:child_process"); -const { toPortablePath } = require("./portable-path.js"); +const { toPortablePath } = require("../../skills/dev-backlog/scripts/portable-path.js"); function resolveBashExecutable({ platform = process.platform, diff --git a/tests/dev-backlog/bash-runtime.test.js b/tests/tools/bash-runtime.test.js similarity index 97% rename from tests/dev-backlog/bash-runtime.test.js rename to tests/tools/bash-runtime.test.js index 8ee9e8d..4d039f3 100644 --- a/tests/dev-backlog/bash-runtime.test.js +++ b/tests/tools/bash-runtime.test.js @@ -3,8 +3,9 @@ const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); +const TOOLS = __dirname; const SKILL_SCRIPTS = path.resolve(__dirname, "../../skills/dev-backlog/scripts"); -const { resolveBashExecutable, toBashArgs } = require(path.join(SKILL_SCRIPTS, "bash-runtime.js")); +const { resolveBashExecutable, toBashArgs } = require(path.join(TOOLS, "bash-runtime.js")); const BASH_ENTRYPOINTS = [ "status.sh", diff --git a/skills/dev-backlog/scripts/doc-drift-check.js b/tests/tools/doc-drift-check.js similarity index 96% rename from skills/dev-backlog/scripts/doc-drift-check.js rename to tests/tools/doc-drift-check.js index 546c901..700db5d 100644 --- a/skills/dev-backlog/scripts/doc-drift-check.js +++ b/tests/tools/doc-drift-check.js @@ -5,7 +5,7 @@ * deleted script (the `progress-sync` gotchas survived their script's * deletion by two weeks before the 2026-08-15 cleanup found them). * - * Usage: ./scripts/doc-drift-check.js [--root PATH] [--json] + * Usage: node tests/tools/doc-drift-check.js [--root PATH] [--json] * * Behavior: * - Doc surface: skills//SKILL.md, skills//references/*.md, @@ -24,7 +24,7 @@ const fs = require("fs"); const path = require("path"); -const { defaultSprintsDir } = require("./execution-root.js"); +const { defaultSprintsDir } = require("../../skills/dev-backlog/scripts/execution-root.js"); const TOKEN_RE = /[A-Za-z0-9_][A-Za-z0-9_.-]*\.(?:js|sh)\b/g; const IGNORED_TOKENS = new Set(["Node.js"]); diff --git a/tests/dev-backlog/doc-drift-check.test.js b/tests/tools/doc-drift-check.test.js similarity index 97% rename from tests/dev-backlog/doc-drift-check.test.js rename to tests/tools/doc-drift-check.test.js index 382d52e..bd4a026 100644 --- a/tests/dev-backlog/doc-drift-check.test.js +++ b/tests/tools/doc-drift-check.test.js @@ -4,6 +4,7 @@ const { spawnSync } = require("child_process"); const fs = require("fs"); const os = require("os"); const path = require("path"); +const TOOLS = __dirname; const SKILL_SCRIPTS = path.resolve(__dirname, "../../skills/dev-backlog/scripts"); const { parseArgs, @@ -11,9 +12,9 @@ const { collectScriptInventory, extractMentions, checkDocDrift, -} = require(path.join(SKILL_SCRIPTS, "doc-drift-check.js")); +} = require(path.join(TOOLS, "doc-drift-check.js")); -const SCRIPT = path.join(SKILL_SCRIPTS, "doc-drift-check.js"); +const SCRIPT = path.join(TOOLS, "doc-drift-check.js"); const REPO_ROOT = path.join(__dirname, "..", ".."); function makeTempDir() { From 602db0da5ed7c4b0642dc38d66d3558cc69a3e1e Mon Sep 17 00:00:00 2001 From: SJ Lee Date: Fri, 18 Sep 2026 08:53:11 +0900 Subject: [PATCH 2/2] test: keep the helper tests under tests/dev-backlog per #460 (Sol review) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01X9gZYk7FcYSLAZBBe7JXvZ --- tests/{tools => dev-backlog}/bash-runtime.test.js | 2 +- tests/{tools => dev-backlog}/doc-drift-check.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename tests/{tools => dev-backlog}/bash-runtime.test.js (97%) rename tests/{tools => dev-backlog}/doc-drift-check.test.js (98%) diff --git a/tests/tools/bash-runtime.test.js b/tests/dev-backlog/bash-runtime.test.js similarity index 97% rename from tests/tools/bash-runtime.test.js rename to tests/dev-backlog/bash-runtime.test.js index 4d039f3..53744ae 100644 --- a/tests/tools/bash-runtime.test.js +++ b/tests/dev-backlog/bash-runtime.test.js @@ -3,7 +3,7 @@ const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); -const TOOLS = __dirname; +const TOOLS = path.resolve(__dirname, "../tools"); const SKILL_SCRIPTS = path.resolve(__dirname, "../../skills/dev-backlog/scripts"); const { resolveBashExecutable, toBashArgs } = require(path.join(TOOLS, "bash-runtime.js")); diff --git a/tests/tools/doc-drift-check.test.js b/tests/dev-backlog/doc-drift-check.test.js similarity index 98% rename from tests/tools/doc-drift-check.test.js rename to tests/dev-backlog/doc-drift-check.test.js index bd4a026..4c7f600 100644 --- a/tests/tools/doc-drift-check.test.js +++ b/tests/dev-backlog/doc-drift-check.test.js @@ -4,7 +4,7 @@ const { spawnSync } = require("child_process"); const fs = require("fs"); const os = require("os"); const path = require("path"); -const TOOLS = __dirname; +const TOOLS = path.resolve(__dirname, "../tools"); const SKILL_SCRIPTS = path.resolve(__dirname, "../../skills/dev-backlog/scripts"); const { parseArgs,