test(#1975): consolidate 51 CLI + scripts-tooling regression tests into module suites

Fold 51 issue-named CLI black-box + scripts-tooling regression files into their
canonical module suites (runtime-launcher-parity, worktree-safety, install-*, managed-hooks,
read-guard, capability-registry, etc.), plus a NEW slash-command-namespace.test.cjs grouping
the 4 slash/colon-namespace-leak invariant suites that had no canonical owner. Verbatim
block-scoped describe wrappers; 427 subtests conserved 1:1.

Host-env pre-check (per B2): no CLI-receiving host sets a redirecting GSD_WORKSTREAM/GSD_PROJECT
value. One folded suite (bug-3668 runtime resolver) creates an extension-less PATH gsd-tools
stub + bash -c; co-locating it with the host's chmodSync tripped local/no-unguarded-nonportable-exec,
so it's now Windows-guarded (skip on win32) matching the host suite's own bash -c guard.

Regenerates regression-name allowlist (222->182), ratchets file-count allowlist (graphify 7->6,
docs entry removed), makes 26 relocated allow-test-rule exemptions issue-ref-compliant (ADR-456;
prunes stale ids). Repoints 13 tests/ references across CONTEXT.md, COMMANDS.md/FEATURES.md
(EN + ja/ko/pt/zh) and ADR-0002. lint:ci green.

Part of epic #1969. Closes #1975.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-07-03 02:47:56 -04:00
parent 3b38b361bb
commit 6d072435d0
92 changed files with 22496 additions and 12036 deletions

View File

@@ -1718,7 +1718,7 @@ A lint gate enforces the budget:
npm run lint:descriptions
```
The check is also run as part of `npm test` via `tests/enh-2789-description-budget.test.cjs`.
The check is also run as part of `npm test` via `tests/skill-frontmatter-contract.test.cjs`.
---

View File

@@ -1834,7 +1834,7 @@ Test suite that scans all agent, workflow, and command files for embedded inject
- REQ-CTXRED-01: System MUST truncate oversized markdown artifacts to fit within context budgets
- REQ-CTXRED-02: System MUST order prompts for cache-friendly assembly (stable prefixes first)
- REQ-CTXRED-03: Reduction MUST preserve essential information (headings, requirements, task structure)
- REQ-CTXRED-04: Skill `description:` fields MUST be ≤ 100 chars; enforced by `npm run lint:descriptions` (see `scripts/lint-descriptions.cjs` and `tests/enh-2789-description-budget.test.cjs`)
- REQ-CTXRED-04: Skill `description:` fields MUST be ≤ 100 chars; enforced by `npm run lint:descriptions` (see `scripts/lint-descriptions.cjs` and `tests/skill-frontmatter-contract.test.cjs`)
**Process:**
1. **Measure** — Calculate total prompt size for the workflow

View File

@@ -18,7 +18,7 @@ The command file contract defines what makes a valid `commands/gsd/*.md`:
## Context
Before this ADR, the command contract was enforced inconsistently:
- `tests/enh-2790-skill-consolidation.test.cjs` checked existence and frontmatter of specific post-consolidation commands
- `tests/skill-frontmatter-contract.test.cjs` (folds former `enh-2790-skill-consolidation`, consolidation epic #1969) checked existence and frontmatter of specific post-consolidation commands
- `tests/docs-update.test.cjs` (folds former `bug-3135-capture-backlog-workflow`, consolidation epic #1969) checked `execution_context` @-ref resolution (added 2026-05-05)
- No test checked `allowed-tools` validity, `name:` convention, or `description:` non-emptiness across all commands simultaneously

View File

@@ -1509,7 +1509,7 @@ GSD Discord コミュニティに参加するには、GSD README 内のリンク
npm run lint:descriptions
```
このチェックは `tests/enh-2789-description-budget.test.cjs` を介して `npm test` の一部としても実行されます。
このチェックは `tests/skill-frontmatter-contract.test.cjs` を介して `npm test` の一部としても実行されます。
---

View File

@@ -1762,7 +1762,7 @@ Claude が GSD ワークフローコンテキスト外でファイル編集を
- REQ-CTXRED-01: システムはコンテキスト予算内に収まるよう、大きすぎる Markdown アーティファクトを切り詰めなければならない
- REQ-CTXRED-02: キャッシュフレンドリーなアセンブリのためにプロンプトを順序付けなければならない(安定したプレフィックスを先頭に)
- REQ-CTXRED-03: 削減は必須情報(見出し、要件、タスク構造)を保持しなければならない
- REQ-CTXRED-04: スキルの `description:` フィールドは ≤ 100 文字でなければならない;`npm run lint:descriptions` で強制(`scripts/lint-descriptions.cjs` と `tests/enh-2789-description-budget.test.cjs` 参照)
- REQ-CTXRED-04: スキルの `description:` フィールドは ≤ 100 文字でなければならない;`npm run lint:descriptions` で強制(`scripts/lint-descriptions.cjs` と `tests/skill-frontmatter-contract.test.cjs` 参照)
**プロセス:**
1. **計測** — ワークフローの総プロンプトサイズを計算

View File

@@ -1517,7 +1517,7 @@ GSD Discord 커뮤니티에 참여하려면 GSD README의 링크를 방문하거
npm run lint:descriptions
```
이 검사는 `tests/enh-2789-description-budget.test.cjs`를 통해 `npm test`의 일부로도 실행됩니다.
이 검사는 `tests/skill-frontmatter-contract.test.cjs`를 통해 `npm test`의 일부로도 실행됩니다.
---

View File

@@ -1514,7 +1514,7 @@ Um portão de lint impõe o orçamento:
npm run lint:descriptions
```
A verificação também é executada como parte de `npm test` via `tests/enh-2789-description-budget.test.cjs`.
A verificação também é executada como parte de `npm test` via `tests/skill-frontmatter-contract.test.cjs`.
---

View File

@@ -1509,7 +1509,7 @@ node gsd-tools.cjs state planned-phase --phase 3 --plans 2
npm run lint:descriptions
```
该检查也作为 `npm test` 的一部分通过 `tests/enh-2789-description-budget.test.cjs` 运行。
该检查也作为 `npm test` 的一部分通过 `tests/skill-frontmatter-contract.test.cjs` 运行。
---

View File

@@ -1778,7 +1778,7 @@ PreToolUse 钩子,检测 Claude 在 GSD 工作流上下文之外尝试文件
- REQ-CTXRED-01:系统必须截断超大 Markdown 构件以适应上下文预算
- REQ-CTXRED-02:系统必须为缓存友好的组装对提示进行排序(稳定的前缀优先)
- REQ-CTXRED-03:压缩必须保留必要信息(标题、需求、任务结构)
- REQ-CTXRED-04:技能 `description:` 字段必须 ≤ 100 个字符;由 `npm run lint:descriptions` 强制执行(参见 `scripts/lint-descriptions.cjs` 和 `tests/enh-2789-description-budget.test.cjs`)
- REQ-CTXRED-04:技能 `description:` 字段必须 ≤ 100 个字符;由 `npm run lint:descriptions` 强制执行(参见 `scripts/lint-descriptions.cjs` 和 `tests/skill-frontmatter-contract.test.cjs`)
**流程:**
1. **测量** — 计算工作流的总提示大小