## Summary The JSON output of `scripts/bash/setup-plan.sh` exposes a key named `SPECS_DIR` but populates it with the `$FEATURE_DIR` value (the per-feature subdirectory, e.g. `specs/001-my-feature`) rather than the actual specs root directory (`specs/`). ## Affected file `scripts/bash/setup-plan.sh` ## Bug locations **Line ~71** (jq path): ```bash # Current (wrong): --arg specs_dir "$FEATURE_DIR" # Should be: --arg feature_dir "$FEATURE_DIR" ``` **Line ~73** (jq JSON key): ```bash # Current (wrong): '{FEATURE_SPEC:$feature_spec,IMPL_PLAN:$impl_plan,SPECS_DIR:$specs_dir,BRANCH:$branch}' # Should be: '{FEATURE_SPEC:$feature_spec,IMPL_PLAN:$impl_plan,FEATURE_DIR:$feature_dir,BRANCH:$branch}' ``` **Line ~75** (printf fallback): ```bash # Current (wrong): printf '{"FEATURE_SPEC":"%s","IMPL_PLAN":"%s","SPECS_DIR":"%s","BRANCH":"%s"}\n' # Should be: printf '{"FEATURE_SPEC":"%s","IMPL_PLAN":"%s","FEATURE_DIR":"%s","BRANCH":"%s"}\n' ``` **Line ~81** (text-mode output): ```bash # Current (wrong): echo "SPECS_DIR: $FEATURE_DIR" # Should be: echo "FEATURE_DIR: $FEATURE_DIR" ``` ## Impact Consumers of the JSON output who treat `SPECS_DIR` as the specs root directory will receive the wrong path instead of the feature subdirectory. ## Fix Rename the key from `SPECS_DIR` to `FEATURE_DIR` in all 4 locations listed above.