From ee9f83929ad88d33077f7b16f3afa2507d4381af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Den=20Delimarsky=20=F0=9F=8C=BA?= <53200638+localden@users.noreply.github.com> Date: Sat, 20 Sep 2025 21:20:43 -0700 Subject: [PATCH] Update contribution guidelines. --- CONTRIBUTING.md | 5 +++++ scripts/bash/update-agent-context.sh | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9853fd110..76023b43c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,11 @@ These are one time installations required to be able to test your changes locall >[!NOTE] >If your pull request introduces a large change that materially impacts the work of the CLI or the rest of the repository (e.g., you're introducing new templates, arguments, or otherwise major changes), make sure that it was **discussed and agreed upon** by the project maintainers. Pull requests with large changes that did not have a prior conversation and agreement will be closed. +>[!IMPORTANT] +>We leverage AI and AI agents for help with this project and value contributions that also use AI to detect issues and improve Spec Kit. However, to help the team focus on important issues and features, we will close issues and PRs that are **low-effort AI-generated changes**. If you are submitting an AI generated issue or pull request, please include **concrete test cases**, **scenarios**, and an outline of the **end-to-end developer experience** with your suggested change. +> +>This means that you need to be supervising the changes and understanding why the change is necessary within the Spec Kit scope. + 1. Fork and clone the repository 1. Configure and install the dependencies: `uv sync` 1. Make sure the CLI works on your machine: `uv run specify --help` diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index 4997158a2..e69e912b8 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -291,15 +291,20 @@ create_new_agent_file() { local language_conventions language_conventions=$(get_language_conventions "$NEW_LANG") - # Perform substitutions with error checking + # Perform substitutions with error checking using safer approach + # Escape special characters for sed by using a different delimiter or escaping + local escaped_lang=$(printf '%s\n' "$NEW_LANG" | sed 's/[[\.*^$()+{}|]/\\&/g') + local escaped_framework=$(printf '%s\n' "$NEW_FRAMEWORK" | sed 's/[[\.*^$()+{}|]/\\&/g') + local escaped_branch=$(printf '%s\n' "$CURRENT_BRANCH" | sed 's/[[\.*^$()+{}|]/\\&/g') + local substitutions=( - "s/\[PROJECT NAME\]/$project_name/" - "s/\[DATE\]/$current_date/" - "s/\[EXTRACTED FROM ALL PLAN.MD FILES\]/- $NEW_LANG + $NEW_FRAMEWORK ($CURRENT_BRANCH)/" + "s|\[PROJECT NAME\]|$project_name|" + "s|\[DATE\]|$current_date|" + "s|\[EXTRACTED FROM ALL PLAN.MD FILES\]|- $escaped_lang + $escaped_framework ($escaped_branch)|" "s|\[ACTUAL STRUCTURE FROM PLANS\]|$project_structure|g" "s|\[ONLY COMMANDS FOR ACTIVE TECHNOLOGIES\]|$commands|" "s|\[LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE\]|$language_conventions|" - "s|\[LAST 3 FEATURES AND WHAT THEY ADDED\]|- $CURRENT_BRANCH: Added $NEW_LANG + $NEW_FRAMEWORK|" + "s|\[LAST 3 FEATURES AND WHAT THEY ADDED\]|- $escaped_branch: Added $escaped_lang + $escaped_framework|" ) for substitution in "${substitutions[@]}"; do