finos / finos/morphir-dotnet

Test skill emulation in JetBrains AI Assistant

Open
#269 0 comments 0 reactions 0 assignees View on GitHub
documentation enhancement
Dominant language
F#
Stars
14
Forks
12
PR merge metrics
No merged PRs in 30d

Description

# Test: Skill Emulation in JetBrains AI Assistant

## Objective

Verify that morphir-dotnet skills (gurus) are accessible and functional in JetBrains AI Assistant (Rider, IntelliJ IDEA, etc.) through documentation-based emulation and custom prompts.

## Background

JetBrains AI Assistant integrates AI capabilities into JetBrains IDEs with:
1. **AI chat** for code-related questions
2. **Context actions** for inline code assistance
3. **Custom prompts** (user-defined AI templates)
4. **Project context awareness**
5. **Documentation indexing**

## Test Scope

**Skills to Test**:
- QA Tester (\`.claude/skills/qa-tester/\`)
- AOT Guru (\`.claude/skills/aot-guru/\`)
- Release Manager (\`.claude/skills/release-manager/\`)

**Test Environment**:
- **IDE**: Rider (preferred for .NET) or IntelliJ IDEA
- **Plugin**: JetBrains AI Assistant enabled
- **Repository**: morphir-dotnet cloned and opened

## JetBrains AI-Specific Features to Test

### 1. Custom Prompts for Skills

JetBrains AI allows creating custom prompts. Test creating skill-specific prompts.

#### Test 1.1: QA Tester Custom Prompt
**Setup**: Create custom prompt "QA Tester - Create Test Plan"

**Prompt Definition**:
\`\`\`
Name: QA Tester - Create Test Plan
Description: Create comprehensive test plan using QA Tester skill
Prompt:
Read the file .claude/skills/qa-tester/SKILL.md and apply the "Test Plan Development" guidance to create a comprehensive test plan for $SELECTION. Include:
1. Happy path scenarios
2. Edge cases
3. Error conditions
4. Integration points
5. Regression risks
Organize by priority (Critical, High, Medium, Low) and provide test execution scripts.
\`\`\`

**BDD Scenario**:
\`\`\`gherkin
Feature: Custom QA Tester Prompt

Scenario: User invokes QA Tester custom prompt on PR description
Given custom prompt "QA Tester - Create Test Plan" is configured
And I select PR #123 description text
When I invoke the custom prompt
Then AI should read .claude/skills/qa-tester/SKILL.md
And AI should apply Test Plan Development guidance
And AI should produce test plan with all required elements
\`\`\`

**Acceptance Criteria**:
- [ ] Custom prompt created successfully
- [ ] Skill file referenced in prompt
- [ ] Test plan matches skill template
- [ ] All required elements included

#### Test 1.2: AOT Guru Custom Prompts
**Setup**: Create multiple AOT Guru prompts

**Prompt 1: "AOT Guru - Analyze Code"**
\`\`\`
Read .claude/skills/aot-guru/SKILL.md and analyze $SELECTION for AOT compatibility. Identify:
1. Reflection usage
2. Dynamic code generation
3. Trimming incompatibilities
4. Suggest AOT-friendly alternatives
\`\`\`

**Prompt 2: "AOT Guru - Optimize Size"**
\`\`\`
Read .claude/skills/aot-guru/SKILL.md and suggest size optimizations for $SELECTION based on the "Size Optimization Analysis" section.
\`\`\`

**BDD Scenario**:
\`\`\`gherkin
Feature: Multiple AOT Guru Custom Prompts

Scenario: User analyzes code for AOT compatibility
Given custom prompt "AOT Guru - Analyze Code" exists
And I select code with reflection usage
When I invoke the custom prompt
Then AI should identify reflection patterns
And AI should suggest source generators
And AI should reference AOT-ready patterns from SKILL.md
\`\`\`

**Acceptance Criteria**:
- [ ] Multiple prompts for same skill
- [ ] Each targets specific skill section
- [ ] Recommendations follow skill guidance

### 2. AI Chat with Project Context

#### Test 2.1: Skill Discovery via Chat
**User Action**: Ask in chat "What testing expertise is available in this project?"

**BDD Scenario**:
\`\`\`gherkin
Feature: Skill Discovery in AI Chat

Scenario: User asks about available expertise
Given JetBrains AI chat is open
And Project is indexed
When I ask "What testing expertise is available in this project?"
Then AI should search project for skill-related files
And AI should discover .agents/skills-reference.md
And AI should list:
| Skill |
| QA Tester |
| AOT Guru |
| Release Manager |
And AI should provide file paths for each
\`\`\`

**Acceptance Criteria**:
- [ ] Project search discovers skills
- [ ] All skills listed
- [ ] File paths provided

#### Test 2.2: Multi-Turn Skill Interaction
**User Action**: Chat conversation using skill guidance

**BDD Scenario**:
\`\`\`gherkin
Feature: Multi-Turn Skill Chat

Scenario: User has extended conversation about skill
Given AI chat is active
When I ask "Tell me about the Release Manager skill"
Then AI should read .claude/skills/release-manager/SKILL.md
And AI should summarize capabilities
When I ask "What scripts does it provide?"
Then AI should reference scripts/ directory
And AI should list:
| Script |
| prepare-release.fsx |
| monitor-release.fsx |
| validate-release.fsx |
When I ask "How do I run prepare-release.fsx?"
Then AI should provide command "dotnet fsi .claude/skills/release-manager/scripts/prepare-release.fsx"
\`\`\`

**Acceptance Criteria**:
- [ ] Context maintained across turns
- [ ] Skill details correctly extracted
- [ ] Script commands accurate

### 3. Context Actions for Skill Application

#### Test 3.1: "Explain with Skill Context" Action
**User Action**: Select code, invoke context action "Explain Code"

**BDD Scenario**:
\`\`\`gherkin
Feature: Code Explanation with Skill Context

Scenario: User explains AOT-specific code
Given I select code with [RequiresUnreferencedCode] attribute
When I invoke "Explain Code" context action
Then AI should recognize AOT-related code
And AI may reference .claude/skills/aot-guru/SKILL.md
And Explanation should mention:
| Concept |
| Trimming compatibility |
| Reflection warning suppression |
| AOT Guru guidance on alternatives |
\`\`\`

**Acceptance Criteria** (exploratory):
- [ ] Test if context actions can reference skills
- [ ] Document whether skill context improves explanations

### 4. Documentation Integration

#### Test 4.1: Quick Documentation Access
**User Action**: Place cursor on skill file, press F1 (Quick Documentation)

**BDD Scenario**:
\`\`\`gherkin
Feature: Quick Documentation for Skills

Scenario: User views skill documentation
Given SKILL.md file is open
When I press F1 for Quick Documentation
Then JetBrains should display rendered markdown
And Documentation should include:
| Section |
| Skill description |
| Primary responsibilities |
| Core competencies |
| Playbooks |
\`\`\`

**Acceptance Criteria**:
- [ ] Markdown rendered correctly
- [ ] All sections accessible
- [ ] Navigation works within doc

### 5. Automation Script Integration

#### Test 5.1: Running F# Scripts from IDE
**User Action**: Right-click on smoke-test.fsx, run with AI assistance

**BDD Scenario**:
\`\`\`gherkin
Feature: F# Script Execution Assistance

Scenario: User wants to run skill script
Given I navigate to .claude/skills/qa-tester/scripts/smoke-test.fsx
When I ask AI "How do I run this script?"
Then AI should provide command "dotnet fsi smoke-test.fsx"
And AI should explain script purpose
And AI should mention expected output
\`\`\`

**Acceptance Criteria**:
- [ ] Script execution method provided
- [ ] Purpose explained
- [ ] Expected output described

#### Test 5.2: Script Output Interpretation
**User Action**: Run script, ask AI to explain output

**BDD Scenario**:
\`\`\`gherkin
Feature: Script Output Analysis

Scenario: User runs smoke test and gets output
Given I ran smoke-test.fsx
And Output contains test results
When I paste output into AI chat and ask "Interpret this"
Then AI should analyze test results
And AI should identify passed/failed tests
And AI should reference QA Tester skill for context
\`\`\`

**Acceptance Criteria**:
- [ ] Output correctly interpreted
- [ ] Test status identified
- [ ] Skill context applied

## Implementation Requirements

### 1. Create Custom Prompt Library

Document recommended custom prompts in \`.jetbrains/prompts/\`:

**qa-tester-test-plan.prompt**:
\`\`\`
Read .claude/skills/qa-tester/SKILL.md and create comprehensive test plan for $SELECTION following Test Plan Development guidance.
\`\`\`

**aot-guru-analyze.prompt**:
\`\`\`
Read .claude/skills/aot-guru/SKILL.md and analyze $SELECTION for AOT compatibility, identifying reflection and suggesting alternatives.
\`\`\`

**release-manager-prepare.prompt**:
\`\`\`
Read .claude/skills/release-manager/SKILL.md and guide me through release preparation following the Standard Release Playbook.
\`\`\`

### 2. Update AGENTS.md

Add section: **"Using Skills with JetBrains AI Assistant"**

\`\`\`markdown
## Using Skills with JetBrains AI Assistant

### Method 1: Custom Prompts (Recommended)
Create custom prompts that reference skill files:

1. Open Settings → Tools → AI Assistant → Custom Prompts
2. Create prompt: "Read .claude/skills/[skill]/SKILL.md and [instruction]"
3. Invoke on selected text

**Example Prompts**: See \`.jetbrains/prompts/\` for templates

### Method 2: AI Chat
Ask: "Use [skill-name] to [task]"
Example: "Use QA Tester skill to create test plan for this PR"

### Method 3: Context Actions
AI may reference skills when explaining code or suggesting improvements.

### Running Scripts
F# scripts in \`.claude/skills/*/scripts/\` can be run via terminal:
\`dotnet fsi [script-path]\`

### Skill Locations
- **Skills Reference**: \`.agents/skills-reference.md\`
- **QA Tester**: \`.claude/skills/qa-tester/SKILL.md\`
- **AOT Guru**: \`.claude/skills/aot-guru/SKILL.md\`
- **Release Manager**: \`.claude/skills/release-manager/SKILL.md\`
\`\`\`

### 3. Update skills-reference.md

Add JetBrains-specific section:

\`\`\`markdown
### For JetBrains AI Assistant Users

**Custom Prompts (Best Method)**:
Create custom prompts referencing skill files.
See \`.jetbrains/prompts/\` for templates.

**AI Chat**:
Ask: "Use [skill] to [task]"
Example: "Use QA Tester to validate PR #123"

**Quick Access**:
- F1 on SKILL.md for documentation
- AI chat for multi-turn guidance
- Context actions for code-specific help

**Scripts**:
Run directly: \`dotnet fsi .claude/skills/{skill}/scripts/{script}.fsx\`
\`\`\`

## Acceptance Criteria

**Functional Requirements**:
- [ ] Custom prompts created and functional
- [ ] AI chat discovers skills
- [ ] Multi-turn conversations maintain context
- [ ] Context actions reference skills (if possible)
- [ ] Documentation accessible via F1
- [ ] Script execution guidance works

**Documentation Requirements**:
- [ ] Custom prompt templates created
- [ ] AGENTS.md includes JetBrains section
- [ ] skills-reference.md includes JetBrains usage
- [ ] .jetbrains/ directory with prompt templates

**Quality Requirements**:
- [ ] All BDD scenarios documented
- [ ] Test results with screenshots
- [ ] Custom prompt effectiveness measured
- [ ] Issues/limitations identified

## Deliverables

- [ ] Custom prompt library in .jetbrains/prompts/
- [ ] Test execution report (pass/fail for each scenario)
- [ ] JetBrains AI interaction screenshots
- [ ] Custom prompt effectiveness analysis
- [ ] Documentation updates (AGENTS.md, skills-reference.md)
- [ ] Comparison with other platforms

## Success Metrics

- **Custom Prompts**: 95%+ accurate skill application
- **Chat Discovery**: 90%+ skill discovery rate
- **Multi-Turn**: 85%+ context retention
- **Script Guidance**: 100%+ correct commands
- **Documentation Access**: 100%+ markdown rendering

## Related

- #266 - GitHub Copilot skill testing
- #267 - Cursor skill testing
- #268 - Windsurf skill testing
- Skills: qa-tester, aot-guru, release-manager

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.