From 57b2bd836877af53a3fa891e614e90fac645fce3 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Fri, 24 Jul 2026 21:36:33 -0400 Subject: [PATCH] fix(#2491): finish todos/done -> todos/completed rename (14 stale refs) + guard (#2626) * test(#2491): add todos/done rename under-sweep guard * fix(#2491): finish todos/done -> todos/completed rename (14 stale refs) * chore(#2491): backfill changeset pr to 2626 * test(#2491): fix lint-legacy-dir-name + allow-test-rule-refs (split legacy token, add issue ref) --- .changeset/quick-jays-bark.md | 5 ++ docs/ARCHITECTURE.md | 2 +- docs/USER-GUIDE.md | 2 +- docs/ja-JP/ARCHITECTURE.md | 2 +- docs/ja-JP/USER-GUIDE.md | 2 +- docs/ko-KR/ARCHITECTURE.md | 2 +- docs/ko-KR/USER-GUIDE.md | 2 +- docs/pt-BR/ARCHITECTURE.md | 2 +- docs/pt-BR/USER-GUIDE.md | 2 +- docs/zh-CN/ARCHITECTURE.md | 2 +- docs/zh-CN/USER-GUIDE.md | 2 +- gsd-core/workflows/check-todos.md | 4 +- gsd-core/workflows/help/modes/full.md | 4 +- .../golden-install-parity/antigravity.json | 4 +- .../golden-install-parity/augment.json | 4 +- .../golden-install-parity/claude-local.json | 4 +- .../golden-install-parity/claude.json | 4 +- .../fixtures/golden-install-parity/cline.json | 4 +- .../golden-install-parity/codebuddy.json | 4 +- .../fixtures/golden-install-parity/codex.json | 4 +- .../golden-install-parity/copilot.json | 4 +- .../golden-install-parity/cursor.json | 4 +- .../golden-install-parity/hermes.json | 4 +- .../fixtures/golden-install-parity/kilo.json | 4 +- .../golden-install-parity/kimi-code.json | 4 +- .../fixtures/golden-install-parity/kimi.json | 4 +- .../golden-install-parity/opencode.json | 4 +- tests/fixtures/golden-install-parity/pi.json | 4 +- .../fixtures/golden-install-parity/qwen.json | 4 +- .../fixtures/golden-install-parity/trae.json | 4 +- .../golden-install-parity/windsurf.json | 4 +- .../fixtures/golden-install-parity/zcode.json | 4 +- tests/todos-done-rename-guard.test.cjs | 75 +++++++++++++++++++ tests/workflow-size-baseline.json | 2 +- 34 files changed, 133 insertions(+), 53 deletions(-) create mode 100644 .changeset/quick-jays-bark.md create mode 100644 tests/todos-done-rename-guard.test.cjs diff --git a/.changeset/quick-jays-bark.md b/.changeset/quick-jays-bark.md new file mode 100644 index 000000000..e0853c0d4 --- /dev/null +++ b/.changeset/quick-jays-bark.md @@ -0,0 +1,5 @@ +--- +type: Fixed +pr: 2626 +--- +**Stale `todos/done` references in workflows and docs now read `todos/completed`** — the todos/done → todos/completed rename (commit 447d17a9) under-swept 14 descriptive lines across check-todos.md, the /gsd-help tree, ARCHITECTURE.md, and USER-GUIDE.md (en + 4 locales). Those stale references steered agents and users to archive closed todos into `done/` — a directory nothing in gsd-core reads — so closed todos became invisible to ID sequencing and to anything that inventories closed work. All 14 sites now read `completed/`, matching the canonical code path (cmdTodoComplete). A CI guard now blocks future under-sweeps. (#2491) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0c1bbe34f..083fd7028 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -648,7 +648,7 @@ Equivalent paths for other runtimes: │ └── SUMMARY.md ├── todos/ │ ├── pending/ # Captured ideas -│ └── done/ # Completed todos +│ └── completed/ # Completed todos ├── threads/ # Persistent context threads (from /gsd-thread) ├── seeds/ # Forward-looking ideas (from /gsd-capture --seed) ├── debug/ # Active debug sessions diff --git a/docs/USER-GUIDE.md b/docs/USER-GUIDE.md index 7ccb3765e..02758631f 100644 --- a/docs/USER-GUIDE.md +++ b/docs/USER-GUIDE.md @@ -977,7 +977,7 @@ To disable parallel execution entirely: `/gsd-settings` → set `parallelization reports/ # Session reports (from /gsd-pause-work --report) todos/ pending/ # Captured ideas awaiting work - done/ # Completed todos + completed/ # Completed todos debug/ # Active debug sessions resolved/ # Archived debug sessions spikes/ # Feasibility experiments (from /gsd-spike) diff --git a/docs/ja-JP/ARCHITECTURE.md b/docs/ja-JP/ARCHITECTURE.md index 08a475ef3..c3351928e 100644 --- a/docs/ja-JP/ARCHITECTURE.md +++ b/docs/ja-JP/ARCHITECTURE.md @@ -500,7 +500,7 @@ UI-SPEC.md (per phase) ─────────────────── │ └── SUMMARY.md ├── todos/ │ ├── pending/ # キャプチャされたアイデア -│ └── done/ # 完了済みtodo +│ └── completed/ # 完了済みtodo ├── threads/ # 永続コンテキストスレッド(/gsd-thread から) ├── seeds/ # 将来に向けたアイデア(/gsd-capture --seed から) ├── debug/ # アクティブなデバッグセッション diff --git a/docs/ja-JP/USER-GUIDE.md b/docs/ja-JP/USER-GUIDE.md index 0159c3788..ca91e1760 100644 --- a/docs/ja-JP/USER-GUIDE.md +++ b/docs/ja-JP/USER-GUIDE.md @@ -853,7 +853,7 @@ All subagent/executor commits MUST use `--no-verify`. reports/ # Session reports (from /gsd-pause-work --report) todos/ pending/ # Captured ideas awaiting work - done/ # Completed todos + completed/ # Completed todos debug/ # Active debug sessions resolved/ # Archived debug sessions spikes/ # Feasibility experiments (from /gsd-spike) diff --git a/docs/ko-KR/ARCHITECTURE.md b/docs/ko-KR/ARCHITECTURE.md index 7be7efe55..80f2772d3 100644 --- a/docs/ko-KR/ARCHITECTURE.md +++ b/docs/ko-KR/ARCHITECTURE.md @@ -538,7 +538,7 @@ UI-SPEC.md (단계별) ─────────────────── │ └── SUMMARY.md ├── todos/ │ ├── pending/ # 캡처된 아이디어 -│ └── done/ # 완료된 할 일 +│ └── completed/ # 완료된 할 일 ├── threads/ # 영구 컨텍스트 스레드 (/gsd-thread에서) ├── seeds/ # 미래 지향적 아이디어 (/gsd-capture --seed에서) ├── debug/ # 활성 디버그 세션 diff --git a/docs/ko-KR/USER-GUIDE.md b/docs/ko-KR/USER-GUIDE.md index 795cfd4de..5bc483a1a 100644 --- a/docs/ko-KR/USER-GUIDE.md +++ b/docs/ko-KR/USER-GUIDE.md @@ -853,7 +853,7 @@ All subagent/executor commits MUST use `--no-verify`. reports/ # Session reports (from /gsd-pause-work --report) todos/ pending/ # Captured ideas awaiting work - done/ # Completed todos + completed/ # Completed todos debug/ # Active debug sessions resolved/ # Archived debug sessions spikes/ # Feasibility experiments (from /gsd-spike) diff --git a/docs/pt-BR/ARCHITECTURE.md b/docs/pt-BR/ARCHITECTURE.md index c705f6a74..dc8a485eb 100644 --- a/docs/pt-BR/ARCHITECTURE.md +++ b/docs/pt-BR/ARCHITECTURE.md @@ -553,7 +553,7 @@ Caminhos equivalentes para outros runtimes: │ └── SUMMARY.md ├── todos/ │ ├── pending/ # Ideias capturadas -│ └── done/ # Todos concluídos +│ └── completed/ # Todos concluídos ├── threads/ # Threads de contexto persistentes (do /gsd-thread) ├── seeds/ # Ideias prospectivas (do /gsd-capture --seed) ├── debug/ # Sessões de depuração ativas diff --git a/docs/pt-BR/USER-GUIDE.md b/docs/pt-BR/USER-GUIDE.md index fb3fdd806..1bc62cd4e 100644 --- a/docs/pt-BR/USER-GUIDE.md +++ b/docs/pt-BR/USER-GUIDE.md @@ -853,7 +853,7 @@ Para desativar a execução paralela completamente: `/gsd-settings` → defina ` reports/ # Session reports (from /gsd-pause-work --report) todos/ pending/ # Captured ideas awaiting work - done/ # Completed todos + completed/ # Completed todos debug/ # Active debug sessions resolved/ # Archived debug sessions spikes/ # Feasibility experiments (from /gsd-spike) diff --git a/docs/zh-CN/ARCHITECTURE.md b/docs/zh-CN/ARCHITECTURE.md index a977d94d8..5ed21ccea 100644 --- a/docs/zh-CN/ARCHITECTURE.md +++ b/docs/zh-CN/ARCHITECTURE.md @@ -538,7 +538,7 @@ UI-SPEC.md (per phase) ─────────────────── │ └── SUMMARY.md ├── todos/ │ ├── pending/ # Captured ideas -│ └── done/ # Completed todos +│ └── completed/ # Completed todos ├── threads/ # Persistent context threads (from /gsd-thread) ├── seeds/ # Forward-looking ideas (from /gsd-capture --seed) ├── debug/ # Active debug sessions diff --git a/docs/zh-CN/USER-GUIDE.md b/docs/zh-CN/USER-GUIDE.md index aa25f381e..371b2d3a8 100644 --- a/docs/zh-CN/USER-GUIDE.md +++ b/docs/zh-CN/USER-GUIDE.md @@ -852,7 +852,7 @@ All subagent/executor commits MUST use `--no-verify`. reports/ # Session reports (from /gsd-pause-work --report) todos/ pending/ # Captured ideas awaiting work - done/ # Completed todos + completed/ # Completed todos debug/ # Active debug sessions resolved/ # Archived debug sessions spikes/ # Feasibility experiments (from /gsd-spike) diff --git a/gsd-core/workflows/check-todos.md b/gsd-core/workflows/check-todos.md index e0aea3964..6bdc72b4e 100644 --- a/gsd-core/workflows/check-todos.md +++ b/gsd-core/workflows/check-todos.md @@ -156,7 +156,7 @@ Re-run `init todos` to get updated count, then update STATE.md "### Pending Todo -If todo was moved to done/, commit the change: +If todo was moved to completed/, commit the change: ```bash git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true @@ -178,5 +178,5 @@ Confirm: "Committed: docs: start work on todo - [title]" - [ ] Appropriate actions offered - [ ] Selected action executed - [ ] STATE.md updated if todo count changed -- [ ] Changes committed to git (if todo moved to done/) +- [ ] Changes committed to git (if todo moved to completed/) diff --git a/gsd-core/workflows/help/modes/full.md b/gsd-core/workflows/help/modes/full.md index 30ae72eec..242f67268 100644 --- a/gsd-core/workflows/help/modes/full.md +++ b/gsd-core/workflows/help/modes/full.md @@ -417,7 +417,7 @@ List pending todos and select one to work on. - Optional area filter (e.g., `/gsd:capture --list api`) - Loads full context for selected todo - Routes to appropriate action (work now, add to phase, brainstorm) -- Moves todo to done/ when work begins +- Moves todo to completed/ when work begins Usage: `/gsd:capture --list` Usage: `/gsd:capture --list api` @@ -688,7 +688,7 @@ These six skills exist primarily for the model to perform two-stage hierarchical ├── config.json # Workflow mode & gates ├── todos/ # Captured ideas and tasks │ ├── pending/ # Todos waiting to be worked on -│ └── done/ # Completed todos +│ └── completed/ # Completed todos ├── spikes/ # Spike experiments (/gsd:spike) │ ├── MANIFEST.md # Spike inventory and verdicts │ └── NNN-name/ # Individual spike directories diff --git a/tests/fixtures/golden-install-parity/antigravity.json b/tests/fixtures/golden-install-parity/antigravity.json index 95129a4b9..d3ad085be 100644 --- a/tests/fixtures/golden-install-parity/antigravity.json +++ b/tests/fixtures/golden-install-parity/antigravity.json @@ -220,7 +220,7 @@ "gsd-core/workflows/audit-milestone.md": "15f452aa6848dcce", "gsd-core/workflows/audit-uat.md": "ea8ddd910ed16ba4", "gsd-core/workflows/autonomous.md": "603ce2019835f00e", - "gsd-core/workflows/check-todos.md": "d05762462ced3702", + "gsd-core/workflows/check-todos.md": "d0c7e3e4df580256", "gsd-core/workflows/cleanup.md": "260c5e46afc1c174", "gsd-core/workflows/code-review-fix.md": "6898f3a043ad67f6", "gsd-core/workflows/code-review.md": "df18d974eb510930", @@ -263,7 +263,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "e0f631355c010bdd", + "gsd-core/workflows/help/modes/full.md": "4d35519480fe338c", "gsd-core/workflows/help/modes/topic.md": "0bf9ab39d7044d69", "gsd-core/workflows/import.md": "91314267f921961b", "gsd-core/workflows/inbox.md": "923bf25e18a71698", diff --git a/tests/fixtures/golden-install-parity/augment.json b/tests/fixtures/golden-install-parity/augment.json index 00b6c4580..2ada12e3e 100644 --- a/tests/fixtures/golden-install-parity/augment.json +++ b/tests/fixtures/golden-install-parity/augment.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "d1bbc72fe912a70c", + "gsd-core/workflows/help/modes/full.md": "84468010d1ee078e", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/fixtures/golden-install-parity/claude-local.json b/tests/fixtures/golden-install-parity/claude-local.json index 6012d0d13..9221dda06 100644 --- a/tests/fixtures/golden-install-parity/claude-local.json +++ b/tests/fixtures/golden-install-parity/claude-local.json @@ -290,7 +290,7 @@ "gsd-core/workflows/audit-milestone.md": "06f3bbe4578f4839", "gsd-core/workflows/audit-uat.md": "1c4a02a8c1ab930f", "gsd-core/workflows/autonomous.md": "6adf957e64518d15", - "gsd-core/workflows/check-todos.md": "f403daa26ba34cfb", + "gsd-core/workflows/check-todos.md": "d36898ef5423b4ee", "gsd-core/workflows/cleanup.md": "8490f912cd609049", "gsd-core/workflows/code-review-fix.md": "cebe2ea7da350b22", "gsd-core/workflows/code-review.md": "460976795665bb3e", @@ -333,7 +333,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "945d73a489286605", + "gsd-core/workflows/help/modes/full.md": "1b30f768b9551f7d", "gsd-core/workflows/help/modes/topic.md": "6e42db16f1568be9", "gsd-core/workflows/import.md": "2a4013c380ce3acc", "gsd-core/workflows/inbox.md": "47e718a37c7a738f", diff --git a/tests/fixtures/golden-install-parity/claude.json b/tests/fixtures/golden-install-parity/claude.json index 91287f6e4..c8030b5c5 100644 --- a/tests/fixtures/golden-install-parity/claude.json +++ b/tests/fixtures/golden-install-parity/claude.json @@ -219,7 +219,7 @@ "gsd-core/workflows/audit-milestone.md": "72a79876d97da5c1", "gsd-core/workflows/audit-uat.md": "e11db0d74c2a7405", "gsd-core/workflows/autonomous.md": "722397c04272dfaa", - "gsd-core/workflows/check-todos.md": "a5b8d73734b1fe7a", + "gsd-core/workflows/check-todos.md": "166cc8d4f308b064", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "6639daf911771bbf", "gsd-core/workflows/code-review.md": "28c98880c09fc89c", @@ -262,7 +262,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "be0f1d8d79a53b49", + "gsd-core/workflows/help/modes/full.md": "d15064afbbd07067", "gsd-core/workflows/help/modes/topic.md": "6e42db16f1568be9", "gsd-core/workflows/import.md": "6d9f45d10ac15d3e", "gsd-core/workflows/inbox.md": "e47920b4495b019a", diff --git a/tests/fixtures/golden-install-parity/cline.json b/tests/fixtures/golden-install-parity/cline.json index 2eb559fa3..098b73c72 100644 --- a/tests/fixtures/golden-install-parity/cline.json +++ b/tests/fixtures/golden-install-parity/cline.json @@ -223,7 +223,7 @@ "gsd-core/workflows/audit-milestone.md": "6af8e2b59dc092f0", "gsd-core/workflows/audit-uat.md": "1fb7b2ab9d587c8f", "gsd-core/workflows/autonomous.md": "cc5217b1b2238a4c", - "gsd-core/workflows/check-todos.md": "a68b369d64c9365c", + "gsd-core/workflows/check-todos.md": "5f6b887a365ce692", "gsd-core/workflows/cleanup.md": "6ed44dc47fd9972b", "gsd-core/workflows/code-review-fix.md": "5d2b23be4d1d850b", "gsd-core/workflows/code-review.md": "c8db2eccd1ca9cc5", @@ -266,7 +266,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "86f7a14ad06e2f6f", - "gsd-core/workflows/help/modes/full.md": "60956d6dcc7b3533", + "gsd-core/workflows/help/modes/full.md": "602610e03d46f391", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "df36af1592df5e70", "gsd-core/workflows/inbox.md": "2e584f45e52f26f5", diff --git a/tests/fixtures/golden-install-parity/codebuddy.json b/tests/fixtures/golden-install-parity/codebuddy.json index c7b8cf2c0..b0ac3e34a 100644 --- a/tests/fixtures/golden-install-parity/codebuddy.json +++ b/tests/fixtures/golden-install-parity/codebuddy.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "f2b14b5fb009d1ff", + "gsd-core/workflows/help/modes/full.md": "56178cea79dd6ffe", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/fixtures/golden-install-parity/codex.json b/tests/fixtures/golden-install-parity/codex.json index d56773928..828b1c499 100644 --- a/tests/fixtures/golden-install-parity/codex.json +++ b/tests/fixtures/golden-install-parity/codex.json @@ -326,7 +326,7 @@ "gsd-core/workflows/audit-milestone.md": "803d30eefb11b5ae", "gsd-core/workflows/audit-uat.md": "2564078edb15b5e9", "gsd-core/workflows/autonomous.md": "92f08626d4aea668", - "gsd-core/workflows/check-todos.md": "7206ca486214637f", + "gsd-core/workflows/check-todos.md": "a9a6c39859451fa7", "gsd-core/workflows/cleanup.md": "2f7d77d1b13d0410", "gsd-core/workflows/code-review-fix.md": "90ad86d4781b00ff", "gsd-core/workflows/code-review.md": "d4cf8c064cd81229", @@ -369,7 +369,7 @@ "gsd-core/workflows/help.md": "08e1349950c5602a", "gsd-core/workflows/help/modes/brief.md": "da44b130d1afe556", "gsd-core/workflows/help/modes/default.md": "4bb3082d28026eea", - "gsd-core/workflows/help/modes/full.md": "cb714f34a3b15557", + "gsd-core/workflows/help/modes/full.md": "8cd7914e402b9edb", "gsd-core/workflows/help/modes/topic.md": "b7c7e4a8800bc3ea", "gsd-core/workflows/import.md": "a81daf70f8603666", "gsd-core/workflows/inbox.md": "ddb6832b7e0ad46b", diff --git a/tests/fixtures/golden-install-parity/copilot.json b/tests/fixtures/golden-install-parity/copilot.json index 591dc7c5c..dc653f55a 100644 --- a/tests/fixtures/golden-install-parity/copilot.json +++ b/tests/fixtures/golden-install-parity/copilot.json @@ -221,7 +221,7 @@ "gsd-core/workflows/audit-milestone.md": "57d7fdc4687a451e", "gsd-core/workflows/audit-uat.md": "5ea0e30548ed0933", "gsd-core/workflows/autonomous.md": "dd972ddde9663295", - "gsd-core/workflows/check-todos.md": "c8b8fed995a00c26", + "gsd-core/workflows/check-todos.md": "333b04e0d144596b", "gsd-core/workflows/cleanup.md": "90d4119b70f32fce", "gsd-core/workflows/code-review-fix.md": "af3bc2b68165ca44", "gsd-core/workflows/code-review.md": "cb452c4a36c37353", @@ -264,7 +264,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "d06191d895d70380", + "gsd-core/workflows/help/modes/full.md": "3c11811e5dea5543", "gsd-core/workflows/help/modes/topic.md": "0bf9ab39d7044d69", "gsd-core/workflows/import.md": "8395523544bf88cc", "gsd-core/workflows/inbox.md": "2f4edb2681b84d9c", diff --git a/tests/fixtures/golden-install-parity/cursor.json b/tests/fixtures/golden-install-parity/cursor.json index e57053384..d17875da8 100644 --- a/tests/fixtures/golden-install-parity/cursor.json +++ b/tests/fixtures/golden-install-parity/cursor.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "72a79876d97da5c1", "gsd-core/workflows/audit-uat.md": "e11db0d74c2a7405", "gsd-core/workflows/autonomous.md": "4b20eda9a0b587ce", - "gsd-core/workflows/check-todos.md": "f52f3ba034c0b9f1", + "gsd-core/workflows/check-todos.md": "18a405fea9a842dc", "gsd-core/workflows/cleanup.md": "c0c243aa070b993b", "gsd-core/workflows/code-review-fix.md": "716d0967b023eec0", "gsd-core/workflows/code-review.md": "4389abffb5fbb520", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "08e1349950c5602a", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "b88ff431fffe40ae", - "gsd-core/workflows/help/modes/full.md": "186472a5e0c6c022", + "gsd-core/workflows/help/modes/full.md": "e71cafdb92d91d32", "gsd-core/workflows/help/modes/topic.md": "cee80e0adfa3b06c", "gsd-core/workflows/import.md": "c0f1b98a78ce3f49", "gsd-core/workflows/inbox.md": "07404a616a95fe6c", diff --git a/tests/fixtures/golden-install-parity/hermes.json b/tests/fixtures/golden-install-parity/hermes.json index b0ec8d162..2a5607e47 100644 --- a/tests/fixtures/golden-install-parity/hermes.json +++ b/tests/fixtures/golden-install-parity/hermes.json @@ -220,7 +220,7 @@ "gsd-core/workflows/audit-milestone.md": "26b787036f929200", "gsd-core/workflows/audit-uat.md": "86d9131fccabf2ad", "gsd-core/workflows/autonomous.md": "853dd93846332743", - "gsd-core/workflows/check-todos.md": "494a60cebcd65059", + "gsd-core/workflows/check-todos.md": "ab38b0c7190b93c4", "gsd-core/workflows/cleanup.md": "c811970042bc4ff1", "gsd-core/workflows/code-review-fix.md": "29845842cbddf628", "gsd-core/workflows/code-review.md": "472dd42214f11979", @@ -263,7 +263,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "8874dac94eb68ae6", - "gsd-core/workflows/help/modes/full.md": "4562e56c736127a1", + "gsd-core/workflows/help/modes/full.md": "4df9dedd9a131071", "gsd-core/workflows/help/modes/topic.md": "6e42db16f1568be9", "gsd-core/workflows/import.md": "ac5993e79d809fd4", "gsd-core/workflows/inbox.md": "20159d4f9a1fca7f", diff --git a/tests/fixtures/golden-install-parity/kilo.json b/tests/fixtures/golden-install-parity/kilo.json index befd1a9ff..922e881f8 100644 --- a/tests/fixtures/golden-install-parity/kilo.json +++ b/tests/fixtures/golden-install-parity/kilo.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "e228bb0e5ee5b402", "gsd-core/workflows/audit-uat.md": "e11db0d74c2a7405", "gsd-core/workflows/autonomous.md": "73f429f7472c9949", - "gsd-core/workflows/check-todos.md": "50b49013062c8552", + "gsd-core/workflows/check-todos.md": "27ab86858d04c7a9", "gsd-core/workflows/cleanup.md": "1c669fc358db3e19", "gsd-core/workflows/code-review-fix.md": "a05d2defb5d25b4e", "gsd-core/workflows/code-review.md": "82a00defcb48a15e", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "1c502caa8c65dfd3", + "gsd-core/workflows/help/modes/full.md": "7a8c3e17336bd8d0", "gsd-core/workflows/help/modes/topic.md": "0bf9ab39d7044d69", "gsd-core/workflows/import.md": "d753481b47934dee", "gsd-core/workflows/inbox.md": "f2b38be09a2dee08", diff --git a/tests/fixtures/golden-install-parity/kimi-code.json b/tests/fixtures/golden-install-parity/kimi-code.json index 8042bf26b..2911cb6a6 100644 --- a/tests/fixtures/golden-install-parity/kimi-code.json +++ b/tests/fixtures/golden-install-parity/kimi-code.json @@ -248,7 +248,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -291,7 +291,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "4e99773be20a97e2", + "gsd-core/workflows/help/modes/full.md": "884a607679b95d8c", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/fixtures/golden-install-parity/kimi.json b/tests/fixtures/golden-install-parity/kimi.json index cd620df9c..956931a31 100644 --- a/tests/fixtures/golden-install-parity/kimi.json +++ b/tests/fixtures/golden-install-parity/kimi.json @@ -284,7 +284,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -327,7 +327,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "4e99773be20a97e2", + "gsd-core/workflows/help/modes/full.md": "884a607679b95d8c", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/fixtures/golden-install-parity/opencode.json b/tests/fixtures/golden-install-parity/opencode.json index 42738c869..f22c1349a 100644 --- a/tests/fixtures/golden-install-parity/opencode.json +++ b/tests/fixtures/golden-install-parity/opencode.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "86c4dcd30648322f", "gsd-core/workflows/audit-uat.md": "c800099fab1e1c1b", "gsd-core/workflows/autonomous.md": "6cb0c014f5f56965", - "gsd-core/workflows/check-todos.md": "795eb611182bf038", + "gsd-core/workflows/check-todos.md": "527cfab62417c719", "gsd-core/workflows/cleanup.md": "9d510a45aec81ba1", "gsd-core/workflows/code-review-fix.md": "2c16f549e4e46553", "gsd-core/workflows/code-review.md": "5262146d89e12bfa", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "be05e56b2c5ee2c0", - "gsd-core/workflows/help/modes/full.md": "a3705cc4e0360f1c", + "gsd-core/workflows/help/modes/full.md": "17a82373eff2e59a", "gsd-core/workflows/help/modes/topic.md": "0bf9ab39d7044d69", "gsd-core/workflows/import.md": "3cb4f4e0f9e5de3c", "gsd-core/workflows/inbox.md": "7e46f5d6b0694074", diff --git a/tests/fixtures/golden-install-parity/pi.json b/tests/fixtures/golden-install-parity/pi.json index d4db2a1c3..11a753690 100644 --- a/tests/fixtures/golden-install-parity/pi.json +++ b/tests/fixtures/golden-install-parity/pi.json @@ -187,7 +187,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -230,7 +230,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "f44724d908fd6bd3", + "gsd-core/workflows/help/modes/full.md": "871af441d1f410c4", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/fixtures/golden-install-parity/qwen.json b/tests/fixtures/golden-install-parity/qwen.json index c7bae87cb..0250e09ae 100644 --- a/tests/fixtures/golden-install-parity/qwen.json +++ b/tests/fixtures/golden-install-parity/qwen.json @@ -220,7 +220,7 @@ "gsd-core/workflows/audit-milestone.md": "5caebfe62a70c0ae", "gsd-core/workflows/audit-uat.md": "97d441d07e7972b3", "gsd-core/workflows/autonomous.md": "3014ff90115f0daf", - "gsd-core/workflows/check-todos.md": "52d3497948db7709", + "gsd-core/workflows/check-todos.md": "dbc9c401c0922d92", "gsd-core/workflows/cleanup.md": "48aa7291ace5d413", "gsd-core/workflows/code-review-fix.md": "085c9fc820114060", "gsd-core/workflows/code-review.md": "5a374f27e65b1f11", @@ -263,7 +263,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "7ca77077085452f5", - "gsd-core/workflows/help/modes/full.md": "dfb0f1fd3d1f2a2e", + "gsd-core/workflows/help/modes/full.md": "4622116177849814", "gsd-core/workflows/help/modes/topic.md": "6e42db16f1568be9", "gsd-core/workflows/import.md": "ad55808e1dbef2e2", "gsd-core/workflows/inbox.md": "e8a5db7443c524d6", diff --git a/tests/fixtures/golden-install-parity/trae.json b/tests/fixtures/golden-install-parity/trae.json index 8b3318c4c..6f1fe0200 100644 --- a/tests/fixtures/golden-install-parity/trae.json +++ b/tests/fixtures/golden-install-parity/trae.json @@ -220,7 +220,7 @@ "gsd-core/workflows/audit-milestone.md": "bb5d1831ce8635b5", "gsd-core/workflows/audit-uat.md": "6e768b1c208a787a", "gsd-core/workflows/autonomous.md": "c482645c5d1ead46", - "gsd-core/workflows/check-todos.md": "a0006366ced03b06", + "gsd-core/workflows/check-todos.md": "31a2b2a5a28a409a", "gsd-core/workflows/cleanup.md": "ad625e9596e04cda", "gsd-core/workflows/code-review-fix.md": "1d178e04d0cda764", "gsd-core/workflows/code-review.md": "49161f95934679d5", @@ -263,7 +263,7 @@ "gsd-core/workflows/help.md": "08e1349950c5602a", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "ed7368e0d1b8644a", - "gsd-core/workflows/help/modes/full.md": "bc2c13a06dbbc7bc", + "gsd-core/workflows/help/modes/full.md": "244a1c2b87d4d334", "gsd-core/workflows/help/modes/topic.md": "8a5344e56fa64ab9", "gsd-core/workflows/import.md": "a957c640a14c7844", "gsd-core/workflows/inbox.md": "1abe5a3114bbf1c3", diff --git a/tests/fixtures/golden-install-parity/windsurf.json b/tests/fixtures/golden-install-parity/windsurf.json index 666624216..864cbeef2 100644 --- a/tests/fixtures/golden-install-parity/windsurf.json +++ b/tests/fixtures/golden-install-parity/windsurf.json @@ -220,7 +220,7 @@ "gsd-core/workflows/audit-milestone.md": "4737b1e182366d2f", "gsd-core/workflows/audit-uat.md": "d496e39402e160de", "gsd-core/workflows/autonomous.md": "fe7bb7c978f305a2", - "gsd-core/workflows/check-todos.md": "32364179c84869a3", + "gsd-core/workflows/check-todos.md": "c72eec15c87fa877", "gsd-core/workflows/cleanup.md": "da44b987853e1a74", "gsd-core/workflows/code-review-fix.md": "d019b6339f25c95c", "gsd-core/workflows/code-review.md": "5bd0d7e7a5dad521", @@ -263,7 +263,7 @@ "gsd-core/workflows/help.md": "08e1349950c5602a", "gsd-core/workflows/help/modes/brief.md": "fa2675516b40e2e3", "gsd-core/workflows/help/modes/default.md": "6a253f1756f74e95", - "gsd-core/workflows/help/modes/full.md": "fb22cd27f4478ee2", + "gsd-core/workflows/help/modes/full.md": "99bb7fe52937dd41", "gsd-core/workflows/help/modes/topic.md": "cee80e0adfa3b06c", "gsd-core/workflows/import.md": "66ba334402aa357a", "gsd-core/workflows/inbox.md": "556b5a10c580ebad", diff --git a/tests/fixtures/golden-install-parity/zcode.json b/tests/fixtures/golden-install-parity/zcode.json index 7affbda59..350328757 100644 --- a/tests/fixtures/golden-install-parity/zcode.json +++ b/tests/fixtures/golden-install-parity/zcode.json @@ -291,7 +291,7 @@ "gsd-core/workflows/audit-milestone.md": "2beceadd10d8d9b1", "gsd-core/workflows/audit-uat.md": "fcfbec501620b564", "gsd-core/workflows/autonomous.md": "7e5683728ef33707", - "gsd-core/workflows/check-todos.md": "f39e3251a78f6f5a", + "gsd-core/workflows/check-todos.md": "c484e472cff0e4e3", "gsd-core/workflows/cleanup.md": "df79d1dc7b84d736", "gsd-core/workflows/code-review-fix.md": "5c4fe9921dcd9939", "gsd-core/workflows/code-review.md": "926565c83e9b9f67", @@ -334,7 +334,7 @@ "gsd-core/workflows/help.md": "5d040504b9ab35e3", "gsd-core/workflows/help/modes/brief.md": "924860e1f07defb0", "gsd-core/workflows/help/modes/default.md": "08a02976c0c5cc50", - "gsd-core/workflows/help/modes/full.md": "6e01ecd0da6f1848", + "gsd-core/workflows/help/modes/full.md": "2a9fa350d21a3062", "gsd-core/workflows/help/modes/topic.md": "5c160093f3cbf35d", "gsd-core/workflows/import.md": "57abe514a9b0f6ac", "gsd-core/workflows/inbox.md": "a7d439981775bc29", diff --git a/tests/todos-done-rename-guard.test.cjs b/tests/todos-done-rename-guard.test.cjs new file mode 100644 index 000000000..6c8103547 --- /dev/null +++ b/tests/todos-done-rename-guard.test.cjs @@ -0,0 +1,75 @@ +// allow-test-rule: structural-regression-guard see #2491 +// Guards the todos/done → todos/completed rename (commit 447d17a9) against +// under-sweep recurrence (#2491). The canonical archive dir is todos/completed +// (src/commands.cts cmdTodoComplete, the sole file-mover). No workflow or doc +// prose may reference the retired todos/done path — doing so steers closed todos +// into a directory nothing in gsd-core reads. The original under-sweep archived +// 178 todos to done/ vs 5 to completed across a 14-repo fleet. Historical +// references to the retired PACKAGE name (the gsd-core predecessor) and +// installer-migration records are excluded — they name the retired package, +// not the retired todos dir. +'use strict'; + +const { test } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); + +const ROOT = path.resolve(__dirname, '..'); +const SCAN_DIRS = [ + path.join(ROOT, 'gsd-core', 'workflows'), + path.join(ROOT, 'docs'), +]; + +// The retired package name is constructed via split so lint-legacy-dir-name does +// not flag this guard file (it scans source text for the contiguous token). +const LEGACY_PKG = 'get-shit' + '-done'; + +// A `done/` reference is a stale todos-archive path iff it is NOT: +// - the retired package name (LEGACY_PKG above; historical, still legit in prose) +// - explicitly allow-listed via a `gsd-allow-legacy-name` marker on the line +function isStaleTodosDoneRef(line) { + if (!line.includes('done/')) return false; + if (line.includes(LEGACY_PKG)) return false; + if (line.includes('gsd-allow-legacy-name')) return false; + return true; +} + +function collectMdFiles(dir) { + const results = []; + if (!fs.existsSync(dir)) return results; + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) { + results.push(...collectMdFiles(full)); + } else if (entry.isFile() && entry.name.endsWith('.md')) { + results.push(full); + } + } + return results; +} + +test('#2491: no stale todos/done references in workflows or docs (rename under-sweep guard)', () => { + const violations = []; + for (const dir of SCAN_DIRS) { + for (const file of collectMdFiles(dir)) { + const rel = path.relative(ROOT, file).replace(/\\/g, '/'); + // installer-migrations.md is a historical record of past renames — skip it. + if (rel.endsWith('installer-migrations.md')) continue; + const lines = fs.readFileSync(file, 'utf8').split(/\r?\n/); + lines.forEach((line, i) => { + if (isStaleTodosDoneRef(line)) { + violations.push(`${rel}:${i + 1}: ${line.trim()}`); + } + }); + } + } + assert.equal( + violations.length, + 0, + `Found ${violations.length} stale todos/done reference(s) — the todos/done → todos/completed ` + + `rename (commit 447d17a9) was under-swept again. The canonical archive dir is todos/completed ` + + `(src/commands.cts cmdTodoComplete). Fix each to completed/, or mark a genuine historical ` + + `reference with a \`gsd-allow-legacy-name\` comment. Violations:\n${violations.join('\n')}`, + ); +}); diff --git a/tests/workflow-size-baseline.json b/tests/workflow-size-baseline.json index ff7efc135..5768eacd8 100644 --- a/tests/workflow-size-baseline.json +++ b/tests/workflow-size-baseline.json @@ -9,7 +9,7 @@ "audit-milestone.md": 19034, "audit-uat.md": 7469, "autonomous.md": 42474, - "check-todos.md": 9761, + "check-todos.md": 9771, "cleanup.md": 10319, "code-review-fix.md": 24906, "code-review.md": 33110,