fix(intel): gate layout-detection block on framework-repo check (#3290) (#3299)

* test: gsd-intel-updater layout-detection block must be gated or removed (#3290 RED)

Group A asserts the bare `ls -d .kilo ... || echo unknown` detection invocation
is absent or wrapped in a framework-repo gate (fails RED: currently unconditional).
Group B confirms zero downstream consumers of the verdict (passes GREEN: none exist).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(intel): gate layout-detection block on framework-repo check (#3290)

The "Runtime layout detection" bash block in gsd-intel-updater ran
unconditionally on every project analysed, emitting a noisy:

  Layout detection returned "unknown" — this project is not a GSD-system
  installation (no `.claude/get-shit-done/` or `.kilo/` runtime root).

for every ordinary (non-GSD-framework) user project. Group B audit confirmed
zero downstream consumers of the verdict outside the file itself.

Fix (option A): wrap the detection bash block in a positive framework-repo
gate — `jq -r '.name' package.json == "get-shit-done-cc"` — so it runs
only when analysing the GSD framework's own repo. The layout table (.kilo/*
paths) is retained for kilo-layout coverage (required by bug #2351 regression
test).

Dead-code vintage: byte-identical from v1.21.0 through v1.41.1 per reporter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* changeset: pr=3299 for #3290

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-09 11:39:15 -04:00
committed by GitHub
parent e14ef535aa
commit b3730c979b
3 changed files with 203 additions and 3 deletions

View File

@@ -57,12 +57,20 @@ The /gsd-map-codebase --query command has already confirmed that intel.enabled i
## Project Scope
**Runtime layout detection (do this first):** Check which runtime root exists by running:
<!-- Layout detection: only meaningful when analysing the GSD framework's own repo (#3290). -->
**Runtime layout detection (GSD framework repo only):** If `package.json` `"name"` equals `"get-shit-done-cc"`, this project IS the GSD framework. In that case, detect the runtime root to choose canonical paths:
```bash
ls -d .kilo 2>/dev/null && echo "kilo" || (ls -d .claude/get-shit-done 2>/dev/null && echo "claude") || echo "unknown"
# Only run layout detection when analysing the GSD framework repo itself.
if [[ "$(jq -r '.name // ""' package.json 2>/dev/null)" == "get-shit-done-cc" ]]; then
ls -d .kilo 2>/dev/null && echo "kilo" || (ls -d .claude/get-shit-done 2>/dev/null && echo "claude") || echo "unknown"
fi
```
Use the detected root to resolve all canonical paths below:
For all other projects, skip this step and proceed directly to Step 1.
Use the detected root (when applicable) to resolve all canonical paths below:
| Source type | Standard `.claude` layout | `.kilo` layout |
|-------------|--------------------------|----------------|