@fission-ai/openspec
Version:
AI-native system for spec-driven development
108 lines (85 loc) • 3.35 kB
JavaScript
export function getFeedbackSkillTemplate() {
return {
name: 'feedback',
description: 'Collect and submit user feedback about OpenSpec with context enrichment and anonymization.',
instructions: `Help the user submit feedback about OpenSpec.
**Goal**: Guide the user through collecting, enriching, and submitting feedback while ensuring privacy through anonymization.
**Process**
1. **Gather context from the conversation**
- Review recent conversation history for context
- Identify what task was being performed
- Note what worked well or poorly
- Capture specific friction points or praise
2. **Draft enriched feedback**
- Create a clear, descriptive title (single sentence, no "Feedback:" prefix needed)
- Write a body that includes:
- What the user was trying to do
- What happened (good or bad)
- Relevant context from the conversation
- Any specific suggestions or requests
3. **Anonymize sensitive information**
- Replace file paths with \`<path>\` or generic descriptions
- Replace API keys, tokens, secrets with \`<redacted>\`
- Replace company/organization names with \`<company>\`
- Replace personal names with \`<user>\`
- Replace specific URLs with \`<url>\` unless public/relevant
- Keep technical details that help understand the issue
4. **Present draft for approval**
- Show the complete draft to the user
- Display both title and body clearly
- Ask for explicit approval before submitting
- Allow the user to request modifications
5. **Submit on confirmation**
- Use the \`openspec feedback\` command to submit
- Format: \`openspec feedback "title" --body "body content"\`
- The command will automatically add metadata (version, platform, timestamp)
**Example Draft**
\`\`\`
Title: Error handling in artifact workflow needs improvement
Body:
I was working on creating a new change and encountered an issue with
the artifact workflow. When I tried to continue after creating the
proposal, the system didn't clearly indicate that I needed to complete
the specs first.
Suggestion: Add clearer error messages that explain dependency chains
in the artifact workflow. Something like "Cannot create design.md
because specs are not complete (0/2 done)."
Context: Using the spec-driven schema with <path>/my-project
\`\`\`
**Anonymization Examples**
Before:
\`\`\`
Working on /Users/john/mycompany/auth-service/src/oauth.ts
Failed with API key: sk_live_abc123xyz
Working at Acme Corp
\`\`\`
After:
\`\`\`
Working on <path>/oauth.ts
Failed with API key: <redacted>
Working at <company>
\`\`\`
**Guardrails**
- MUST show complete draft before submitting
- MUST ask for explicit approval
- MUST anonymize sensitive information
- ALLOW user to modify draft before submitting
- DO NOT submit without user confirmation
- DO include relevant technical context
- DO keep conversation-specific insights
**User Confirmation Required**
Always ask:
\`\`\`
Here's the feedback I've drafted:
Title: [title]
Body:
[body]
Does this look good? I can modify it if you'd like, or submit it as-is.
\`\`\`
Only proceed with submission after user confirms.`,
license: 'MIT',
compatibility: 'Requires openspec CLI.',
metadata: { author: 'openspec', version: '1.0' },
};
}
//# sourceMappingURL=feedback.js.map