-
Notifications
You must be signed in to change notification settings - Fork 34
Refactor system prompts to file-based approach #8474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Create actions/setup/md/ directory with prompt files - Update setup.sh to copy .md files to /tmp/gh-aw/prompts/ - Modify prompt generation to use cat commands instead of embedded content - Update tests to check for cat commands instead of embedded content - Keep github_context_prompt.md and threat_detection.md embedded (require expressions) - Remove pkg/workflow/prompts/ except for files that need to stay embedded Co-authored-by: pelikhan <[email protected]>
|
@copilot keep working |
The refactoring is complete. All prompt files have been successfully moved from Key changes in commit 49e7687:
The work meets all requirements from the original issue. |
|
@copilot recompile |
All workflow lock files have been recompiled to use the new file-based prompt approach. Instead of embedding prompt content directly in the YAML, workflows now use cat commands to read from /tmp/gh-aw/prompts/ at runtime. Co-authored-by: pelikhan <[email protected]>
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident... |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Smoke Test ResultsLast 2 merged PRs:
Test Results:
Status: PASS
|
|
PRs: Add skip-if-no-match field support as inverse of skip-if-match; [security-fix] Fix incorrect file permissions in add_command.go (Alert #386)
|
Smoke Test Results✅ Playwright MCP: Page title verified (contains "GitHub") Overall Status: ✅ PASS
|
Smoke Test Results - Claude EngineLast 2 Merged PRs:
Test Results:
Overall Status: PASS (5/6 tests passed)
|
|
PR titles: Add skip-if-no-match field support as inverse of skip-if-match; [security-fix] Fix incorrect file permissions in add_command.go (Alert #386)
|
Refactor System Prompts to Markdown Files
This PR refactors the appended system prompts to be stored as .md files under
actions/setup/md/instead of being embedded in the Go binary.Completed
actions/setup/md/directory structure.mdfiles frompkg/workflow/prompts/toactions/setup/md/setup.shto copy.mdfiles fromactions/setup/md/to/tmp/gh-aw/prompts//tmp/gh-aw/prompts/at runtime//go:embeddirectives frompkg/workflow/sh.gofor file-based promptsgithub_context_prompt.mdandthreat_detection.mdembedded (have expressions)Changes Made
Files moved to actions/setup/md/:
xpia_prompt.md- XPIA security warningstemp_folder_prompt.md- Temporary folder instructionsedit_tool_prompt.md- Edit tool accessibilityplaywright_prompt.md- Playwright output directorypr_context_prompt.md- PR branch contextFiles kept embedded (in pkg/workflow/prompts/):
github_context_prompt.md- Contains GitHub Actions expressions requiring compile-time extractionthreat_detection.md- Has custom logic and template processingCode changes:
actions/setup/setup.sh- Added section to copy .md files to/tmp/gh-aw/prompts/pkg/workflow/sh.go- Replaced embedded prompts with file path constants andWritePromptFileToYAML()functionpkg/workflow/prompts.go- Updated to usegenerateStaticPromptStepFromFile()for file-based promptspkg/workflow/prompt_step_helper.go- AddedgenerateStaticPromptStepFromFile()functionBenefits
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.