Skip to content

Commit 1268580

Browse files
stewartadamCopilotWilliamBerryiii
authored
feat(instructions): provide guidance on using safe commands to reduce interactive prompting (#117)
# Pull Request ## Description Adds instructions to avoid shell redirects and use of 'sed' when possible to avoid unnecessary interactive prompts for command approval during research or debugging. ## Related Issue(s) N/A ## Type of Change Select all that apply: **Code & Documentation:** - [ ] Bug fix (non-breaking change fixing an issue) - [x] New feature (non-breaking change adding functionality) - [ ] Breaking change (fix or feature causing existing functionality to change) - [ ] Documentation update **Infrastructure & Configuration:** - [ ] GitHub Actions workflow - [ ] Linting configuration (markdown, PowerShell, etc.) - [ ] Security configuration - [ ] DevContainer configuration - [ ] Dependency update **AI Artifacts:** - [x] Reviewed contribution with `prompt-builder` chatmode and addressed all feedback - [x] Copilot instructions (`.github/instructions/*.instructions.md`) - [ ] Copilot prompt (`.github/prompts/*.prompt.md`) - [ ] Copilot chatmode (`.github/chatmodes/*.chatmode.md`) > **Note for AI Artifact Contributors**: > > - **Chatmodes**: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation chatmodes likely already exist. Review `.github/chatmodes/` before creating new ones. > - **Model Versions**: Only contributions targeting the **latest Anthropic and OpenAI models** will be accepted. Older model versions (e.g., GPT-3.5, Claude 3) will be rejected. > - See [Chatmodes Not Accepted](../docs/contributing-chatmodes.md#chatmodes-not-accepted) and [Model Version Requirements](../docs/contributing-ai-artifacts-common.md#model-version-requirements). **Other:** - [ ] Script/automation (`.ps1`, `.sh`, `.py`) - [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) **User Request:** `Your implementation is broken, please fix compile errors` <!-- What natural language request would trigger this chatmode/prompt/instruction? --> **Output Artifacts:** N/A <!-- What files/content are created? Show first 10-20 lines as preview --> **Success Indicators:** stderr redirects and 'sed' commands are not used during research or bugfixes. <!-- How does user know it worked correctly? What validation should they perform? --> For detailed contribution requirements, see: - **Common Standards**: [docs/contributing-ai-artifacts-common.md](../docs/contributing-ai-artifacts-common.md) - Shared standards for XML blocks, markdown quality, RFC 2119, validation, and testing - **Chatmodes**: [docs/contributing-chatmodes.md](../docs/contributing-chatmodes.md) - Agent configurations with tools and behavior patterns - **Prompts**: [docs/contributing-prompts.md](../docs/contributing-prompts.md) - Workflow-specific guidance with template variables - **Instructions**: [docs/contributing-instructions.md](../docs/contributing-instructions.md) - Technology-specific standards with glob patterns ## Testing Ran a RPI cycle ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) ### AI Artifact Contributions <!-- If contributing a chatmode, prompt, or instruction, complete these checks --> - [x] Used `prompt-builder` chatmode to review contribution - [x] Addressed all feedback from `prompt-builder` review - [ ] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks The following validation commands must pass before merging: - [x] Markdown linting: `npm run lint:md` - [x] Spell checking: `npm run spell-check` - [x] Frontmatter validation: `npm run lint:frontmatter` - [x] Link validation: `npm run lint:md-links` - [x] PowerShell analysis: `npm run lint:ps` ## Security Considerations <!-- ⚠️ WARNING: Do not commit sensitive information such as API keys, passwords, or personal data --> - [x] This PR does not contain any sensitive or NDA information - [ ] Any new dependencies have been reviewed for security issues - [ ] Security-related scripts follow the principle of least privilege ## Additional Notes <!-- Any additional information that reviewers should know --> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Bill Berry <[email protected]>
1 parent 91eac8a commit 1268580

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/copilot-instructions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ Items in **HIGHEST PRIORITY** sections from attached instructions files override
2424

2525
**Proactive fixes:** Always fix problems and errors you encounter, even if unrelated to the original request. Prefer root-cause, constructive fixes over symptom-only patches.
2626

27-
* Always correct conventions and styling and comments.
28-
2927
**Deleting files and folders:** Use `rm` with the run_in_terminal tool when needing to delete files or folders.
3028

29+
**Prefer safe commands**: Use commands that do not have the potential to mutate files or trigger unnecessary interactive prompts.
30+
31+
* Avoid commands like `sed -n '/pattern/p' file` to print data when non-mutating alternatives like `grep` exist.
32+
* Avoid shell redirects like `2>/dev/null` unless necessary, as they may trigger interactive approval prompts in certain AI assistant environments.
33+
3134
**Edit tools:** Never use `insert_edit_into_file` tool when other edit and file modification tools are available.
3235

3336
### CRITICAL - Required Prompts & Instruction Compliance

0 commit comments

Comments
 (0)