Add custom prompt configuration for Issue Responder#22
Merged
Conversation
- Add PromptConfig class to load custom prompts from .sugar/prompts/issue_responder.json - Support persona (role, goal, expertise), instructions, guidelines, constraints - Modify IssueResponderProfile to load and use custom prompts - Add example configuration in examples/issue_responder_prompt.json - Add 24 tests for prompt config (96% coverage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to customize Issue Responder behavior per-project using a JSON configuration file.
New file location:
.sugar/prompts/issue_responder.jsonFeatures
Example Configuration
{ "name": "my-project-responder", "description": "Custom issue responder for my project", "persona": { "role": "Senior Developer", "goal": "Help users resolve issues quickly", "expertise": ["Python", "TypeScript", "REST APIs"] }, "instructions": "You are a helpful assistant for this project...", "guidelines": [ "Always search the codebase before responding", "Include relevant file paths" ], "constraints": [ "Never share API keys or secrets", "Don't promise release dates" ] }Changes
sugar/config/prompt_config.py- New config loader withPromptConfigandPersonaConfigclassessugar/profiles/issue_responder.py- Load and use custom promptsexamples/issue_responder_prompt.json- Example configurationtests/test_prompt_config.py- 24 tests (96% coverage)docs/issue-responder.md- Full documentation for custom promptsREADME.md- Updated with custom prompt featureHow It Works
.sugar/prompts/issue_responder.jsonexists, it's loaded