Prepend built-in prompts to user prompt in unified creation step with system tags and validation#10469
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot wrap builtin prompts in "system" xml tags |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 16b560f. Built-in prompts are now wrapped in cat << 'PROMPT_EOF' > "$GH_AW_PROMPT"
<system>
PROMPT_EOF
# Built-in prompts: temp_folder, cache memory, repo memory, safe-outputs, github-context
cat "/opt/gh-aw/prompts/temp_folder_prompt.md" >> "$GH_AW_PROMPT"
cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
## Cache Folder Available
...
</system>
PROMPT_EOF
# User prompt follows after </system> tag
cat << 'PROMPT_EOF' >> "$GH_AW_PROMPT"
# User Task
...The system tags clearly delineate built-in context from user instructions. |
|
@copilot add a comprehensive test suite for this feature |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 62afc84. Added comprehensive test suite with 20 tests: Unit Tests (16):
Integration Tests (4):
All tests verify:
Coverage: 100% of built-in prompt types, comprehensive edge cases, complete integration testing. |
|
@copilot add a step that does a sanity check that expressions have been properly rendered and placeholders are gone. Store as file in actions/setup |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit c3438af. Added sanity check step that validates placeholders are properly substituted. New validation step added after interpolation but before print:
Validation script (
Example output: If placeholders found: Test suite included with 4 test cases covering valid prompts, unreplaced placeholders, missing files, and GitHub expressions. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
@copilot review error Reference: https://github.com/githubnext/gh-aw/actions/runs/21099476671/job/60681596148#step:22:1 |
Smoke Test ResultsLast 2 merged PRs:
Test Results:
Status: PASS
|
|
GitHub MCP (last 2 merged PRs): ✅ Increase timeout for daily-team-evolution-insights workflow; ✅ Consolidate integer parsing logic to eliminate duplication
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall Status: PASS (4/5 core tests passed) cc: @pelikhan
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit 3d0f5ea. The validation error was caused by undefined environment variables being converted to the literal string Root cause: When a GitHub expression like Impact: Handlebars templates evaluated Fix: // Convert undefined/null to empty string to avoid leaving "undefined" or "null" in the output
const safeValue = (value === undefined || value === null) ? "" : value;
content = content.split(placeholder).join(safeValue);Result: Empty values now make handlebars conditionals falsy, properly removing unavailable context blocks. Added 3 test cases covering undefined, null, and mixed scenarios. |
|
@copilot add fuzz test for templates and value states |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 9b735c4. Added comprehensive fuzz test harness for template substitution and value states. Test harness (
27 comprehensive tests:
Key validations:
All 27 tests pass. The harness can be used with Go fuzz testing via stdin/stdout JSON interface. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️ |
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Status: PARTIAL PASS (4/5 tests) cc @pelikhan
|
|
✅ GitHub MCP: Increase timeout for daily-team-evolution-insights workflow; Consolidate integer parsing logic to eliminate duplication
|
Smoke Test Results (Claude)PRs: #10482, #10481 Status: FAIL (Go unavailable)
|
Plan: Prepend Built-in Prompts to User Prompt
Understanding the Problem
Implementation Tasks
<system>XML tagsTesting Tasks
Bug Fixes
__GH_AW_GITHUB_WORKSPACE__) now included in substitution stepValidation
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset
(system)tags. Adds placeholder validation, merges built-in and user environment variables for interpolation, and introduces tests covering ordering, interpolation, and validation. This is an internal tooling and behavior change (tests/validation) and does not modify public CLI APIs.