From 9f8bcfa3a644207252840c29489694d4f2764f43 Mon Sep 17 00:00:00 2001 From: sim Date: Thu, 13 Aug 2026 02:28:56 -0400 Subject: [PATCH] docs(#3309): disclose hardcoded-slash-command fidelity reduction consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit root-existence.cts (E002, E003) and phase-structure.cts (W009) hardcode a canonical hyphen-form slash command in their ADVISE remedy, same as config-validation.cts's already-disclosed W016 — forced by §8.1 rule 1 (a Rule's check(snapshot) cannot call the runtime-resolved slash() formatter, which needs cwd). Only config-validation.cts's own header disclosed this tradeoff; the other two sites had it happen without recording it in their own file. Adds the same disclosure to both, matching the established convention. No behavior change. --- src/health-diagnostic-rules/phase-structure.cts | 10 ++++++++++ src/health-diagnostic-rules/root-existence.cts | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/health-diagnostic-rules/phase-structure.cts b/src/health-diagnostic-rules/phase-structure.cts index 43937141d..5f441f5b4 100644 --- a/src/health-diagnostic-rules/phase-structure.cts +++ b/src/health-diagnostic-rules/phase-structure.cts @@ -31,6 +31,16 @@ * `verificationStatus`) — a disclosed fidelity reduction, not a silent * reproduction of the original six-way label. * + * W009's original message interpolates `${slash('plan-phase')}` + * (`verify.cts:1982`, ``Re-run ${slash('plan-phase')} with --research to + * regenerate``), a per-project runtime-resolved value (`formatGsdSlash`, + * `src/runtime-slash.cts`) this rule's `(snapshot) => Diagnostic[]` + * signature has no access to. Hardcodes the canonical `/gsd-plan-phase` + * hyphen form instead, mirroring the sibling "config.json validation" + * group's W016 rule (`src/health-diagnostic-rules/config-validation.cts`), + * which hardcodes `/gsd-ai-integration-phase` the same way for the + * identical reason. + * * Design: .gsd/phase/refactor-3309-health-diagnostic-rule-table/40-design.md * * ADR-457 build-at-publish: source in diff --git a/src/health-diagnostic-rules/root-existence.cts b/src/health-diagnostic-rules/root-existence.cts index 5e6f93dbe..518feb82d 100644 --- a/src/health-diagnostic-rules/root-existence.cts +++ b/src/health-diagnostic-rules/root-existence.cts @@ -10,6 +10,18 @@ * Ported behavior-preserving from `cmdValidateHealth` * (`src/verify.cts:1681-1705`), the exact call sites for E002/E003/E004/W001. * + * E002's original message interpolates `${slash('new-project')}` + * (`verify.cts:1682`, ``Run ${slash('new-project')} to create``) and E003's + * interpolates `${slash('new-milestone')}` (`verify.cts:1694`, ``Run + * ${slash('new-milestone')} to create roadmap``) — both per-project + * runtime-resolved values (`formatGsdSlash`, `src/runtime-slash.cts`) this + * rule's `(snapshot) => Diagnostic[]` signature has no access to (§8.1 rule + * 1 forbids ambient I/O, including `cwd`, inside `check`). Hardcodes the + * canonical `/gsd-new-project`/`/gsd-new-milestone` hyphen form instead, + * mirroring the sibling "config.json validation" group's W016 rule + * (`src/health-diagnostic-rules/config-validation.cts`), which hardcodes + * `/gsd-ai-integration-phase` the same way for the identical reason. + * * Design: .gsd/phase/refactor-3309-health-diagnostic-rule-table/40-design.md * * ADR-457 build-at-publish: source in src/health-diagnostic-rules/root-existence.cts,