Skip to content

Commit b31ca19

Browse files
committed
Update how Copilot prompts are created
1 parent 15917c2 commit b31ca19

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,16 @@ jobs:
9696
name=$(basename "$template" .md)
9797
description=$(awk '/^description:/ {gsub(/^description: *"?/, ""); gsub(/"$/, ""); print; exit}' "$template" | tr -d '\r')
9898
content=$(awk '/^---$/{if(++count==2) start=1; next} start' "$template" | sed "s/{ARGS}/$arg_format/g")
99-
10099
case $ext in
101100
"toml")
102-
{
103-
echo "description = \"$description\""
104-
echo ""
105-
echo "prompt = \"\"\""
106-
echo "$content"
107-
echo "\"\"\""
108-
} > "$output_dir/$name.$ext"
109-
;;
101+
{ echo "description = \"$description\""; echo ""; echo "prompt = \"\"\""; echo "$content"; echo "\"\"\""; } > "$output_dir/$name.$ext" ;;
110102
"md")
111-
echo "$content" > "$output_dir/$name.$ext"
112-
;;
103+
echo "$content" > "$output_dir/$name.$ext" ;;
113104
"prompt.md")
114-
{
115-
echo "# $(echo "$description" | sed 's/\. .*//')"
116-
echo ""
117-
echo "$content"
118-
} > "$output_dir/$name.$ext"
119-
;;
105+
# Preserve original front matter + body with argument substitution for Copilot
106+
# Simply copy the entire template, replacing {ARGS}
107+
# This keeps YAML so tooling can parse metadata
108+
sed "s/{ARGS}/$arg_format/g" "$template" > "$output_dir/$name.$ext" ;;
120109
esac
121110
fi
122111
done

docs/local-development.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,28 @@ git push origin your-feature-branch
6161
uvx --from git+https://github.com/github/spec-kit.git@your-feature-branch specify init demo-branch-test
6262
```
6363

64+
### 4a. Absolute Path uvx (Run From Anywhere)
65+
66+
If you're in another directory, use an absolute path instead of `.`:
67+
68+
```bash
69+
uvx --from /mnt/c/GitHub/spec-kit specify --help
70+
uvx --from /mnt/c/GitHub/spec-kit specify init demo-anywhere --ai copilot --ignore-agent-tools
71+
```
72+
73+
Set an environment variable for convenience:
74+
```bash
75+
export SPEC_KIT_SRC=/mnt/c/GitHub/spec-kit
76+
uvx --from "$SPEC_KIT_SRC" specify init demo-env --ai copilot --ignore-agent-tools
77+
```
78+
79+
(Optional) Define a shell function:
80+
```bash
81+
specify-dev() { uvx --from /mnt/c/GitHub/spec-kit specify "$@"; }
82+
# Then
83+
specify-dev --help
84+
```
85+
6486
## 5. Testing Script Permission Logic
6587

6688
After running an `init`, check that shell scripts are executable on POSIX systems:
@@ -114,7 +136,8 @@ specify init demo --skip-tls --ai gemini --ignore-agent-tools
114136
|--------|---------|
115137
| Run CLI directly | `python -m src.specify_cli --help` |
116138
| Editable install | `uv pip install -e .` then `specify ...` |
117-
| Local uvx run | `uvx --from . specify ...` |
139+
| Local uvx run (repo root) | `uvx --from . specify ...` |
140+
| Local uvx run (abs path) | `uvx --from /mnt/c/GitHub/spec-kit specify ...` |
118141
| Git branch uvx | `uvx --from git+URL@branch specify ...` |
119142
| Build wheel | `uv build` |
120143

0 commit comments

Comments
 (0)