Commit bc5004f
authored
feat(prompt-builder): enhance prompt engineering instructions and validation protocols (#155)
# feat(prompt-builder): enhance prompt engineering instructions and
validation protocols
Rewrites the prompt-builder chatmode with a streamlined, protocol-based
structure. The update consolidates verbose guidance into concise role
definitions and a clear five-step workflow, improving actionability and
reducing document length by approximately 30%.
## Description
- **feat**(_chatmode_): Restructure document with explicit role
definitions for Prompt Builder and Prompt Tester personas, replacing
scattered guidance with dedicated protocol sections
- **feat**(_chatmode_): Implement five-step workflow (Analyze, Research,
Draft, Validate, Deliver) that replaces the previous multi-section
approach with numbered, sequential guidance
- **feat**(_tools_): Update frontmatter tools list to use new naming
conventions (`execute/runInTerminal`, `read/readFile`,
`bicep-(experimental)/*`, etc.) replacing legacy tool names
- **feat**(_validation_): Add explicit Prompt Tester activation criteria
defining when validation is automatic versus skipped
- **feat**(_authoring_): Introduce prompt authoring patterns section
documenting preferred natural language style and patterns to avoid (ALL
CAPS, modal verbs, negation-heavy phrasing)
- **refactor**(_examples_): Consolidate XML-style block guidance with
canonical tag prefixes (`example-*`, `schema-*`, `important-*`,
`reference-*`, `conventions-*`, `template-*`)
- **refactor**(_formatting_): Streamline response formatting guidance
removing structured checklist requirements in favor of conversational
integration
- **docs**(_workflow_): Add concrete workflow example demonstrating the
complete Prompt Builder-Prompt Tester cycle with Azure Functions Python
scenario
- **chore**(_cleanup_): Remove RFC 2119 keywords section and verbose
"Sample user prompts" guidance in favor of inline patterns
## Related Issue(s)
*No related issues identified in commits or branch name*
## 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:**
- [ ] Reviewed contribution with `prompt-builder` chatmode and addressed
all feedback
- [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [x] 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:**
"Create instructions for writing Azure Functions in Python" or "Improve
the existing terraform.instructions.md to match current patterns"
**Execution Flow:**
1. Prompt Builder analyzes the request and gathers context from
workspace files
2. Research phase uses microsoft-docs, github_repo, and context7 tools
to fetch authoritative sources
3. Draft phase creates or updates instruction files with XML-style
blocks and minimal snippets
4. Prompt Tester activates automatically, executing the prompt with a
realistic scenario
5. Iteration continues up to three cycles until quality bar is met
6. Final delivery includes improvements summary and validation outcomes
**Output Artifacts:**
- New or updated instruction/prompt files in `.github/instructions/` or
`.github/prompts/`
- Files include XML-style blocks with kebab-case tags
- Reference sources linked rather than copied inline
**Success Indicators:**
- Prompt Tester reports "pass" recommendation
- Instructions can be followed without guessing intent
- Examples work as written and match repository conventions
## Testing
- Validated chatmode structure follows frontmatter schema requirements
- Confirmed tools list uses current naming conventions
## 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
- [ ] Used `prompt-builder` chatmode to review contribution
- [ ] 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:
- [ ] Markdown linting: `npm run lint:md`
- [ ] Spell checking: `npm run spell-check`
- [ ] Frontmatter validation: `npm run lint:frontmatter`
- [ ] Link validation: `npm run lint:md-links`
- [ ] PowerShell analysis: `npm run lint:ps`
## Security Considerations
- [x] This PR does not contain any sensitive or NDA information
- [x] Any new dependencies have been reviewed for security issues
- [x] Security-related scripts follow the principle of least privilege
## Additional Notes
The rewrite transforms verbose, command-heavy instructions into natural
language that describes behavior. This aligns with modern prompt
engineering practices where descriptive patterns outperform imperative
directives.
🔧 - Generated by Copilot1 parent 843982c commit bc5004f
1 file changed
Lines changed: 220 additions & 360 deletions
0 commit comments