feat: Enhance AI prompting capabilities with new guidelines and templates for GitHub Copilot
This commit is contained in:
@@ -33,4 +33,5 @@ Behavior rules:
|
||||
- Do not over-promote uncertain information. Keep uncertain items in the daily log.
|
||||
- When drafting communication, preserve technical meaning and improve clarity in natural US English.
|
||||
- When answering Swift/iOS programming questions, use the project-local iOS skills and `ai/context/ios/`.
|
||||
- When generating prompts for GitHub Copilot or another AI, use `ai/context/process/ai-to-ai-prompting.md` and the `copilot-prompt-engineering` skill.
|
||||
- If the answer depends on current Apple APIs or Xcode/iOS behavior, verify with official Apple or Swift documentation before presenting it as current best practice.
|
||||
|
||||
41
.opencode/commands/copilot-prompt.md
Normal file
41
.opencode/commands/copilot-prompt.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
description: Generate a high-quality prompt for GitHub Copilot on the Fidelity development machine
|
||||
---
|
||||
|
||||
Generate a prompt that the user can send to GitHub Copilot or another AI assistant on the Fidelity development machine.
|
||||
|
||||
Read:
|
||||
|
||||
@prompts/copilot-prompt.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/process/ai-to-ai-prompting.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/ios/index.md
|
||||
@ai/context/ios/project-swift-guidance.md
|
||||
@ai/context/systems/index.md
|
||||
@ai/context/workstreams/index.md
|
||||
@ai/work-items/index.md
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
|
||||
Detailed active work item files, if available:
|
||||
|
||||
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
|
||||
|
||||
User request:
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
Instructions:
|
||||
|
||||
- Use the `copilot-prompt-engineering` skill if available.
|
||||
- Generate a self-contained prompt for the target AI.
|
||||
- Include only context relevant to the request.
|
||||
- Include Jira ID/title when the task maps to an active work item.
|
||||
- Tell Copilot what to inspect before making assumptions.
|
||||
- Include constraints, non-goals, expected output, and validation.
|
||||
- If the user asks for implementation help but the write scope is unclear, generate an investigation/plan prompt rather than a code-change prompt.
|
||||
- Do not mention this workspace unless explaining that the target AI will not have access to it.
|
||||
|
||||
Return only the final prompt unless the user explicitly asks for commentary.
|
||||
@@ -16,6 +16,7 @@ Use these files as the baseline context:
|
||||
@ai/context/systems/index.md
|
||||
@ai/context/workstreams/index.md
|
||||
@ai/context/process/communication.md
|
||||
@ai/context/process/ai-to-ai-prompting.md
|
||||
@ai/context/process/jira-story-rules.md
|
||||
@ai/context/people/manager.md
|
||||
@ai/context/people/index.md
|
||||
|
||||
@@ -22,6 +22,7 @@ export const FidelityCompaction = async ({ directory }) => {
|
||||
"ai/context/systems/index.md",
|
||||
"ai/context/workstreams/index.md",
|
||||
"ai/context/process/communication.md",
|
||||
"ai/context/process/ai-to-ai-prompting.md",
|
||||
"ai/context/people/manager.md",
|
||||
"ai/context/people/index.md",
|
||||
"ai/work-items/index.md",
|
||||
|
||||
43
.opencode/skills/copilot-prompt-engineering/SKILL.md
Normal file
43
.opencode/skills/copilot-prompt-engineering/SKILL.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
name: copilot-prompt-engineering
|
||||
description: Create high-quality prompts for GitHub Copilot or another AI running on the Fidelity development machine, using this workspace's context without assuming the target AI has access to it.
|
||||
compatibility: opencode
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
Use this skill when the user wants a prompt for another AI assistant, GitHub Copilot, or the Fidelity development machine.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify the target task type:
|
||||
- investigation
|
||||
- implementation plan
|
||||
- code change
|
||||
- review
|
||||
- test strategy
|
||||
- story/PR drafting
|
||||
2. Pull only the relevant context:
|
||||
- `ai/work-items/` for ticket-specific context
|
||||
- `ai/context/systems/` for component context
|
||||
- `ai/context/workstreams/` for recurring constraints
|
||||
- `ai/context/ios/` for Swift/iOS guidance
|
||||
3. Make the prompt self-contained.
|
||||
4. Tell the target AI what to inspect before acting.
|
||||
5. State constraints, non-goals, and validation expectations.
|
||||
|
||||
## Fidelity Prompting Rules
|
||||
|
||||
- Include Jira ID and approved title when available.
|
||||
- For REST work, say REST is behind a feature flag and GraphQL is fallback unless confirmed otherwise.
|
||||
- For XFlow work, say behavior may depend on entry point, auth state, backend config, and consumer integration.
|
||||
- For AO/Discourse issues, say external report vs regression must be separated.
|
||||
- For SwiftUI/XFlow work, mention lifecycle, modal presentation, UIKit bridge, feature flag, and Fid4 validation if relevant.
|
||||
|
||||
## Output Rules
|
||||
|
||||
- Return only the prompt unless the user asks for explanation.
|
||||
- Keep the prompt concise but complete.
|
||||
- Prefer sections over paragraphs.
|
||||
- Do not invent file paths unless the workspace context explicitly names them.
|
||||
- If exact files are unknown, ask Copilot to locate them first.
|
||||
Reference in New Issue
Block a user