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):
# Current (wrong):
--arg specs_dir "$FEATURE_DIR"
# Should be:
--arg feature_dir "$FEATURE_DIR"
Line ~73 (jq JSON key):
# 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):
# 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):
# 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.
Summary
The JSON output of
scripts/bash/setup-plan.shexposes a key namedSPECS_DIRbut populates it with the$FEATURE_DIRvalue (the per-feature subdirectory, e.g.specs/001-my-feature) rather than the actual specs root directory (specs/).Affected file
scripts/bash/setup-plan.shBug locations
Line ~71 (jq path):
Line ~73 (jq JSON key):
Line ~75 (printf fallback):
Line ~81 (text-mode output):
Impact
Consumers of the JSON output who treat
SPECS_DIRas the specs root directory will receive the wrong path instead of the feature subdirectory.Fix
Rename the key from
SPECS_DIRtoFEATURE_DIRin all 4 locations listed above.