Skip to content

Conversation

@avi-alpert
Copy link
Contributor

Problem

The system prompt for saved prompts and workspace rules is too vague, users reporting they are sometimes ignored entirely.

Solution

Add system prompt for saved prompt and workspace rules to improve quality of responses


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@avi-alpert avi-alpert requested review from a team as code owners March 18, 2025 19:10
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

if (prompt.filePath.endsWith(promptFileExtension)) {
if (prompt.relativePath.startsWith(path.join('.amazonq', 'rules'))) {
return 'rule'
} else if (prompt.filePath.startsWith(getUserPromptsDirectory())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition seems fragile. Was prompt.filePath and getUserPromptsDirectory() normalized? Better to use isInDirectory or similar.

export function isInDirectory(d: string, p: string): boolean {

@avi-alpert avi-alpert force-pushed the aalpert/system-prompts-rules branch from 9d2ee26 to 5ef5cc7 Compare March 18, 2025 20:04
@justinmk3 justinmk3 merged commit 9f2fde8 into aws:master Mar 18, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants