Compare commits

..

9 Commits

Author SHA1 Message Date
Den Delimarsky
926836e0fc Merge pull request #1001 from TCoherence/fix/place-short-name-in-the-right-position
fix: make "short-name" argument to be used correctly for create-new-feature.sh
2025-10-21 19:28:25 -07:00
Den Delimarsky
af88930ffc Merge pull request #1002 from harikrishnan83/local_testing_documentation
docs: add steps for testing template and command changes locally
2025-10-21 19:27:48 -07:00
Den Delimarsky
89f5f9c0b9 Update CONTRIBUTING.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 19:27:38 -07:00
Hari Krishnan
9809b1a4ab docs: add steps for testing template and command changes locally 2025-10-22 07:42:37 +05:30
Hanzhi Yang
7b536b578d update specify to make "short-name" argu for create-new-feature.sh in the right position 2025-10-21 18:54:38 -07:00
Den Delimarsky
9f123e013a Merge pull request #795 from tinesoft/fix/gh-releases
fix: include the latest changelog in the `GitHub Release`'s  body
2025-10-21 16:00:23 -07:00
Den Delimarsky
60bd9dc849 Merge pull request #598 from valdezm/fix/update-agent-context-missing-sections
Fix update-agent-context.sh to handle files without required sections
2025-10-21 15:57:06 -07:00
Tine Kondo
8de5db7a3e fix: include the latest changelog in the GitHub Release's body 2025-10-19 08:10:35 +00:00
Mark
09cf4f6cc4 Fix update-agent-context.sh to handle files without Active Technologies/Recent Changes sections
- Add section detection logic to check if required sections exist
- Automatically append missing sections at end of file if they don't exist
- Preserve existing manually-created content in agent files
- Fix bash syntax errors in grep command handling
- Improve robustness for files that don't follow template structure

This fixes an issue where the script would silently fail to update agent files
like CLAUDE.md that were manually created with different section structures.
2025-09-25 14:43:57 -07:00
4 changed files with 58 additions and 3 deletions

View File

@@ -30,6 +30,10 @@ fi
cat > release_notes.md << EOF cat > release_notes.md << EOF
This is the latest set of releases that you can use with your agent of choice. We recommend using the Specify CLI to scaffold your projects, however you can download these independently and manage them yourself. This is the latest set of releases that you can use with your agent of choice. We recommend using the Specify CLI to scaffold your projects, however you can download these independently and manage them yourself.
## Changelog
$COMMITS
EOF EOF
echo "Generated release notes:" echo "Generated release notes:"

View File

@@ -62,6 +62,28 @@ When working on spec-kit:
3. Test script functionality in the `scripts/` directory 3. Test script functionality in the `scripts/` directory
4. Ensure memory files (`memory/constitution.md`) are updated if major process changes are made 4. Ensure memory files (`memory/constitution.md`) are updated if major process changes are made
### Testing template and command changes locally
Running `uv run specify init` pulls released packages, which wont include your local changes.
To test your templates, commands, and other changes locally, follow these steps:
1. **Create release packages**
Run the following command to generate the local packages:
```
./.github/workflows/scripts/create-release-packages.sh v1.0.0
```
2. **Copy the relevant package to your test project**
```
cp -r .genreleases/sdd-copilot-package-sh/. <path-to-test-project>/
```
3. **Open and test the agent**
Navigate to your test project folder and open the agent to verify your implementation.
## AI contributions in Spec Kit ## AI contributions in Spec Kit
> [!IMPORTANT] > [!IMPORTANT]

View File

@@ -391,12 +391,25 @@ update_existing_agent_file() {
new_change_entry="- $CURRENT_BRANCH: Added $NEW_DB" new_change_entry="- $CURRENT_BRANCH: Added $NEW_DB"
fi fi
# Check if sections exist in the file
local has_active_technologies=0
local has_recent_changes=0
if grep -q "^## Active Technologies" "$target_file" 2>/dev/null; then
has_active_technologies=1
fi
if grep -q "^## Recent Changes" "$target_file" 2>/dev/null; then
has_recent_changes=1
fi
# Process file line by line # Process file line by line
local in_tech_section=false local in_tech_section=false
local in_changes_section=false local in_changes_section=false
local tech_entries_added=false local tech_entries_added=false
local changes_entries_added=false local changes_entries_added=false
local existing_changes_count=0 local existing_changes_count=0
local file_ended=false
while IFS= read -r line || [[ -n "$line" ]]; do while IFS= read -r line || [[ -n "$line" ]]; do
# Handle Active Technologies section # Handle Active Technologies section
@@ -457,6 +470,22 @@ update_existing_agent_file() {
# Post-loop check: if we're still in the Active Technologies section and haven't added new entries # Post-loop check: if we're still in the Active Technologies section and haven't added new entries
if [[ $in_tech_section == true ]] && [[ $tech_entries_added == false ]] && [[ ${#new_tech_entries[@]} -gt 0 ]]; then if [[ $in_tech_section == true ]] && [[ $tech_entries_added == false ]] && [[ ${#new_tech_entries[@]} -gt 0 ]]; then
printf '%s\n' "${new_tech_entries[@]}" >> "$temp_file" printf '%s\n' "${new_tech_entries[@]}" >> "$temp_file"
tech_entries_added=true
fi
# If sections don't exist, add them at the end of the file
if [[ $has_active_technologies -eq 0 ]] && [[ ${#new_tech_entries[@]} -gt 0 ]]; then
echo "" >> "$temp_file"
echo "## Active Technologies" >> "$temp_file"
printf '%s\n' "${new_tech_entries[@]}" >> "$temp_file"
tech_entries_added=true
fi
if [[ $has_recent_changes -eq 0 ]] && [[ -n "$new_change_entry" ]]; then
echo "" >> "$temp_file"
echo "## Recent Changes" >> "$temp_file"
echo "$new_change_entry" >> "$temp_file"
changes_entries_added=true
fi fi
# Move temp file to target atomically # Move temp file to target atomically

View File

@@ -35,9 +35,9 @@ Given that feature description, do this:
**IMPORTANT**: **IMPORTANT**:
- Append the short-name argument to the `{SCRIPT}` command with the 2-4 word short name you created in step 1 - Append the short-name argument to the `{SCRIPT}` command with the 2-4 word short name you created in step 1. Keep the feature description as the final argument.
- Bash: `--short-name "your-generated-short-name"` - Bash example: `--short-name "your-generated-short-name" "Feature description here"`
- PowerShell: `-ShortName "your-generated-short-name"` - PowerShell example: `-ShortName "your-generated-short-name" "Feature description here"`
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot") - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
- You must only ever run this script once - You must only ever run this script once
- The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for - The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for