mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 01:06:35 +00:00
Refine coding standards and testing guidelines
- Updated the coding rule descriptions to emphasize readability, meaningful comments, and test verification. - Revised guidelines to clarify the importance of avoiding boilerplate while maintaining readability. - Enhanced the testing rules to set a minimum coverage threshold of 75% for business logic and specified criteria for test scenarios. - Introduced a mechanism for handling skipped tests, categorizing them as legitimate or illegitimate, and outlined resolution steps. These changes aim to improve code quality, maintainability, and testing effectiveness.
This commit is contained in:
@@ -4,21 +4,43 @@ alwaysApply: true
|
||||
---
|
||||
# Sound Notification on Human Input
|
||||
|
||||
Whenever you are about to ask the user a question, request confirmation, present options for a decision, or otherwise pause and wait for human input, you MUST first run the appropriate shell command for the current OS:
|
||||
## Sound commands per OS
|
||||
|
||||
Detect the OS from user system info or `uname -s`:
|
||||
|
||||
- **macOS**: `afplay /System/Library/Sounds/Glass.aiff &`
|
||||
- **Linux**: `paplay /usr/share/sounds/freedesktop/stereo/bell.oga 2>/dev/null || aplay /usr/share/sounds/freedesktop/stereo/bell.oga 2>/dev/null || echo -e '\a' &`
|
||||
- **Windows (PowerShell)**: `[System.Media.SystemSounds]::Exclamation.Play()`
|
||||
|
||||
Detect the OS from the user's system info or by running `uname -s` if unknown.
|
||||
## When to play (play exactly once per trigger)
|
||||
|
||||
This applies to:
|
||||
- Asking clarifying questions
|
||||
- Presenting choices (e.g. via AskQuestion tool)
|
||||
- Requesting approval for destructive actions
|
||||
- Reporting that you are blocked and need guidance
|
||||
- Any situation where the conversation will stall without user response
|
||||
- Completing a task (final answer / deliverable ready for review)
|
||||
Play the sound when your turn will end in one of these states:
|
||||
|
||||
Do NOT play the sound when:
|
||||
- You are in the middle of executing a multi-step task and just providing a status update
|
||||
1. You are about to call the AskQuestion tool — sound BEFORE the AskQuestion call
|
||||
2. Your text ends with a direct question to the user that cannot be answered without their input (e.g., "Which option do you prefer?", "What is the database name?", "Confirm before I push?")
|
||||
3. You are reporting that you are BLOCKED and cannot continue without user input (missing credentials, conflicting requirements, external approval required)
|
||||
4. You have just completed a destructive or irreversible action the user asked to review (commit, push, deploy, data migration, file deletion)
|
||||
|
||||
## When NOT to play
|
||||
|
||||
- You are mid-execution and returning a progress update (the conversation is not stalling)
|
||||
- You are answering a purely informational or factual question and no follow-up is required
|
||||
- You have already played the sound once this turn for the same pause point
|
||||
- Your response only contains text describing what you did or found, with no question, no block, no irreversible action
|
||||
|
||||
## "Trivial" definition
|
||||
|
||||
A response is trivial (no sound) when ALL of the following are true:
|
||||
- No explicit question to the user
|
||||
- No "I am blocked" report
|
||||
- No destructive/irreversible action that needs review
|
||||
|
||||
If any one of those is present, the response is non-trivial — play the sound.
|
||||
|
||||
## Ordering
|
||||
|
||||
The sound command is a normal Shell tool call. Place it:
|
||||
- **Immediately before an AskQuestion tool call** in the same message, or
|
||||
- **As the last Shell call of the turn** if ending with a text-based question, block report, or post-destructive-action review
|
||||
|
||||
Do not play the sound as part of routine command execution — only at the pause points listed under "When to play".
|
||||
|
||||
Reference in New Issue
Block a user