finos / finos/morphir-dotnet

Test skill emulation in Cursor

Open
#267 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 Cursor

## Objective

Verify that morphir-dotnet skills (gurus) are accessible and functional in Cursor through documentation-based emulation and custom rules, leveraging Cursor's `.cursorrules` file capabilities.

## Background

Cursor is an AI-powered code editor with enhanced context awareness. Unlike Claude Code's native \`@skill\` support, Cursor can use:
1. **\`.cursorrules\` file** for project-specific AI instructions
2. **Composer mode** for multi-file context
3. **@-mentions** for file/folder references
4. **Documentation indexing** for better context retrieval

## 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**: Cursor editor with morphir-dotnet repository open

## Cursor-Specific Features to Test

### 1. .cursorrules Integration

Create \`.cursorrules\` file referencing skills:

\`\`\`
# morphir-dotnet Project Rules

## Available Expert Skills

This project provides specialized AI skills (gurus) for domain-specific tasks:

1. **QA Tester** (\`.claude/skills/qa-tester/SKILL.md\`)
- Test plan creation, regression testing, E2E validation
- Triggers: "test plan", "qa", "regression", "validate"
- Scripts: smoke-test.fsx, regression-test.fsx, validate-packages.fsx

2. **AOT Guru** (\`.claude/skills/aot-guru/SKILL.md\`)
- Native AOT optimization, trimming diagnostics, size analysis
- Triggers: "aot", "trimming", "optimization", "binary size"
- Scripts: aot-diagnostics.fsx, aot-analyzer.fsx, aot-test-runner.fsx

3. **Release Manager** (\`.claude/skills/release-manager/SKILL.md\`)
- Release preparation, deployment, changelog management
- Triggers: "release", "deploy", "changelog", "version"
- Scripts: prepare-release.fsx, monitor-release.fsx, validate-release.fsx

## Using Skills in Cursor

When a user asks for skill assistance:
1. Read the appropriate SKILL.md file from \`.claude/skills/\`
2. Follow the skill's playbooks, decision trees, and patterns
3. Apply skill-specific best practices
4. Reference automation scripts when applicable

Example: "Use QA Tester to create a test plan" → Read \`.claude/skills/qa-tester/SKILL.md\`, follow Test Plan Development guidance

## Project Standards

- Follow TDD (Red-Green-Refactor)
- Maintain >= 80% test coverage
- CLI logging: stderr only, never stdout
- See AGENTS.md for complete guidance
\`\`\`

**Test**: Verify Cursor applies these rules automatically

### 2. @-Mention File References

**Test**: Using @-mentions to reference skills

User prompts to test:
- "@.claude/skills/qa-tester/SKILL.md Create a test plan for PR #123"
- "@.agents/skills-reference.md What skills are available?"
- "@.claude/skills/aot-guru Show me the AOT decision trees"

## Detailed Test Plan

### Phase 1: .cursorrules Effectiveness

#### Test 1.1: Automatic Skill Recognition
**User Action**: Ask "Help me with testing" (without mentioning skills)

**BDD Scenario**:
\`\`\`gherkin
Feature: Automatic Skill Detection via .cursorrules

Scenario: User asks general testing question
Given Cursor has loaded .cursorrules
And I ask "Help me with testing"
Then Cursor should recognize "testing" relates to QA Tester skill
And Cursor should reference .claude/skills/qa-tester/SKILL.md
And Cursor should apply QA Tester guidance
\`\`\`

**Acceptance Criteria**:
- [ ] Cursor reads .cursorrules
- [ ] Identifies QA Tester as relevant skill
- [ ] Applies skill guidance without explicit prompting

#### Test 1.2: Skill Trigger Words
**User Action**: Use skill trigger words: "I need to prepare a release"

**BDD Scenario**:
\`\`\`gherkin
Feature: Skill Trigger Recognition

Scenario: User uses release-related trigger words
Given .cursorrules defines "release" as Release Manager trigger
When I ask "I need to prepare a release"
Then Cursor should activate Release Manager skill
And Cursor should read .claude/skills/release-manager/SKILL.md
And Cursor should follow release preparation playbook
\`\`\`

**Acceptance Criteria**:
- [ ] Cursor detects trigger word "release"
- [ ] Maps to Release Manager skill
- [ ] Applies release-specific guidance

### Phase 2: @-Mention Direct Access

#### Test 2.1: Direct Skill File Reference
**User Action**: "@.claude/skills/qa-tester/SKILL.md Create test plan for PR #123"

**BDD Scenario**:
\`\`\`gherkin
Feature: Direct Skill File Reference

Scenario: User @-mentions skill file directly
Given PR #123 exists with acceptance criteria
When I use "@.claude/skills/qa-tester/SKILL.md Create test plan for PR #123"
Then Cursor should load the QA Tester SKILL.md content
And Cursor should have full skill context
And Cursor should produce comprehensive test plan
\`\`\`

**Acceptance Criteria**:
- [ ] @-mention loads skill file
- [ ] Cursor applies complete skill guidance
- [ ] Output matches skill templates

#### Test 2.2: Skills Reference Document
**User Action**: "@.agents/skills-reference.md What skills are available?"

**BDD Scenario**:
\`\`\`gherkin
Feature: Skills Reference Access

Scenario: User asks about available skills with @-mention
When I use "@.agents/skills-reference.md What skills are available?"
Then Cursor should load skills-reference.md
And Cursor should list all available skills
And Cursor should provide skill descriptions
And Cursor should reference skill file locations
\`\`\`

**Acceptance Criteria**:
- [ ] skills-reference.md loaded via @-mention
- [ ] All skills listed with descriptions
- [ ] File paths provided

### Phase 3: Composer Mode Multi-File Context

#### Test 3.1: Multi-Skill Workflow
**User Action**: Use Composer to coordinate Release Manager + QA Tester

**BDD Scenario**:
\`\`\`gherkin
Feature: Multi-Skill Coordination in Composer

Scenario: Preparing release with pre-release testing
Given Cursor Composer mode is active
When I add:
| File |
| .claude/skills/release-manager/SKILL.md |
| .claude/skills/qa-tester/SKILL.md |
And I ask "Prepare release 1.0.0 with full QA verification"
Then Cursor should coordinate both skills
And Cursor should follow release preparation playbook
And Cursor should include QA verification steps
\`\`\`

**Acceptance Criteria**:
- [ ] Both skills loaded in Composer
- [ ] Cursor coordinates between skills
- [ ] Workflow includes steps from both

### Phase 4: Automation Script Integration

#### Test 4.1: Script Location Awareness
**User Action**: "@.claude/skills/qa-tester How do I run smoke tests?"

**BDD Scenario**:
\`\`\`gherkin
Feature: Automation Script Discovery

Scenario: User asks about running scripts
When I use "@.claude/skills/qa-tester How do I run smoke tests?"
Then Cursor should reference scripts/ directory
And Cursor should provide command "dotnet fsi .claude/skills/qa-tester/scripts/smoke-test.fsx"
And Cursor should explain script purpose
\`\`\`

**Acceptance Criteria**:
- [ ] Script location identified
- [ ] Correct command provided
- [ ] Script purpose explained

### Phase 5: Decision Tree Navigation

#### Test 5.1: Interactive Decision Tree
**User Action**: Ask "Should I use AOT for my CLI tool?"

**BDD Scenario**:
\`\`\`gherkin
Feature: Decision Tree Application

Scenario: User consults AOT decision tree
Given I ask "Should I use AOT for my CLI tool?"
Then Cursor should read AOT Guru SKILL.md
And Cursor should apply "When to use AOT" decision tree
And Cursor should ask clarifying questions:
| Question |
| Is startup performance critical? |
| Is binary size important? |
| Do you use reflection or dynamic code? |
And Cursor should provide recommendation based on answers
\`\`\`

**Acceptance Criteria**:
- [ ] Decision tree logic applied
- [ ] Clarifying questions asked
- [ ] Recommendation provided

## Implementation Requirements

### 1. Create .cursorrules File

Create \`.cursorrules\` with:
- List of available skills and triggers
- Skill file locations
- Usage patterns
- Project standards reference

### 2. Update AGENTS.md

Add section: **"Using Skills with Cursor"**

\`\`\`markdown
## Using Skills with Cursor

Cursor provides multiple ways to access skill guidance:

### Method 1: .cursorrules (Automatic)
Cursor automatically applies rules from \`.cursorrules\` file.
Skills are triggered by context-aware keywords.

### Method 2: @-Mentions (Direct)
Reference skill files directly:
\`@.claude/skills/qa-tester/SKILL.md Create test plan\`

### Method 3: Composer Mode (Multi-Skill)
Add multiple skill files to Composer for coordinated workflows.

### 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 Cursor-specific section:

\`\`\`markdown
### For Cursor Users

**Method 1: .cursorrules Integration**
Cursor automatically applies skill guidance based on .cursorrules triggers.

**Method 2: Direct @-Mentions**
\`@.claude/skills/{skill-name}/SKILL.md [your request]\`

**Method 3: Composer Mode**
Add skill files to Composer for complex workflows.

**Example Prompts**:
- "Use QA Tester to validate this PR"
- "@.claude/skills/aot-guru Optimize binary size"
- [Composer] Add release-manager + qa-tester: "Prepare release with full testing"
\`\`\`

## Acceptance Criteria

**Functional Requirements**:
- [ ] .cursorrules file created and functional
- [ ] Cursor detects skill triggers automatically
- [ ] @-mentions load skill files correctly
- [ ] Composer mode coordinates multi-skill workflows
- [ ] Scripts referenced accurately
- [ ] Decision trees applied correctly

**Documentation Requirements**:
- [ ] .cursorrules file documented
- [ ] AGENTS.md includes Cursor-specific section
- [ ] skills-reference.md includes Cursor usage guide
- [ ] README references Cursor support

**Quality Requirements**:
- [ ] All BDD scenarios documented
- [ ] Test results captured
- [ ] .cursorrules effectiveness measured
- [ ] Issues/limitations identified

## Deliverables

- [ ] .cursorrules file created and tested
- [ ] Test execution report (pass/fail for each scenario)
- [ ] Cursor interaction screenshots/videos
- [ ] Effectiveness comparison vs manual file reference
- [ ] Documentation updates (AGENTS.md, skills-reference.md)
- [ ] List of identified issues and workarounds

## Success Metrics

- **.cursorrules Activation**: 80%+ automatic skill detection
- **@-Mention Accuracy**: 100% correct skill file loading
- **Composer Coordination**: 90%+ multi-skill workflow success
- **Script Discovery**: 100% correct script commands
- **Decision Trees**: 85%+ accurate logic application

## Related

- #266 - GitHub Copilot 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.