/kibana-docs-release-tools:migration-plannerfrom kibana-docs-release-tools
Plan and execute large-scale migrations in Kibana by analyzing scope, estimating effort, generating phased rollout plans, tracking progress, and producing stakeholder reports.
Ships in kibana-docs-release-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Plan and execute large-scale migrations in Kibana: Cypress→Scout, FTR→Scout, API versioning, package migrations. Analyze scope, estimate effort, generate phased rollout plans, track progress, and generate stakeholder reports.
interface CypressToScoutMigration {
// Analysis
findCypressTests: () => CypressTestFile[];
assessComplexity: (file: CypressTestFile) => ComplexityScore;
identifyCustomCommands: () => CustomCommand[];
// Planning
generatePhases: () => MigrationPhase[];
estimateEffort: () => EffortEstimate;
createConversionGuide: () => ConversionPattern[];
// Execution
convertTest: (file: CypressTestFile) => ScoutTest;
validateConversion: (scoutTest: ScoutTest) => ValidationResult;
trackProgress: () => ProgressReport;
}
Scope Analysis Steps:
find . -name "*.cy.ts" -o -name "*.cy.js"cypress/support/.should(), .invoke())Conversion Patterns:
| Cypress | Scout | Complexity |
|---|---|---|
cy.visit() | page.goto() | Low |
cy.get().click() | page.click() | Low |
cy.intercept() | page.route() | Medium |
| Custom commands | Helper functions | High |
interface FTRToScoutMigration {
// Analysis
findFTRTests: () => FTRTestFile[];
analyzeServices: (file: FTRTestFile) => ServiceDependency[];
identifyPageObjects: () => PageObject[];
// Planning
mapServicesToScout: () => ServiceMapping[];
generateFixtureStrategy: () => FixtureStrategy;
planDataSetupMigration: () => DataSetupPlan;
// Execution
convertTest: (file: FTRTestFile) => ScoutTest;
migratePageObjects: (po: PageObject) => ScoutHelper;
trackProgress: () => ProgressReport;
}
Scope Analysis Steps:
find . -name "ftr_configs.js" -o -name "config.ts"page_objects/Service Mapping:
| FTR Service | Scout Equivalent | Notes |
|---|---|---|
esArchiver | scoutPowerBar.loadEsArchive() | Direct mapping |
kibanaServer.uiSettings | page.request.put() | API calls |
browser.clickByCssSelector() | page.click() | Playwright API |
retry.try() | expect().toPass() | Playwright auto-retry |
interface APIVersioningMigration {
// Analysis
findUnversionedAPIs: () => APIRoute[];
identifyBreakingChanges: (route: APIRoute) => BreakingChange[];
analyzeClientUsage: (route: APIRoute) => ClientUsage[];
// Planning
generateVersioningStrategy: () => VersioningStrategy;
planBackwardCompatibility: () => CompatibilityPlan;
createDeprecationTimeline: () => DeprecationPlan;
// Execution
versionAPI: (route: APIRoute) => VersionedAPI;
updateClients: (clients: ClientUsage[]) => ClientUpdate[];
trackAdoption: () => AdoptionReport;
}
Scope Analysis Steps:
grep -r "router.get\|router.post" x-pack/version: "2023-10-31")interface PackageMigration {
// Analysis
findTargetCode: () => CodeFile[];
analyzeImports: (file: CodeFile) => ImportDependency[];
checkCircularDeps: () => CircularDependency[];
// Planning
designPackageStructure: () => PackageStructure;
planImportUpdates: () => ImportUpdate[];
generateBuildConfig: () => BuildConfig;
// Execution
createPackage: (structure: PackageStructure) => Package;
moveFiles: (files: CodeFile[]) => MoveResult;
updateImports: (updates: ImportUpdate[]) => UpdateResult;
validateBuild: () => BuildResult;
}
# Run analysis tools
# Cypress example:
echo "Analyzing Cypress tests..."
find x-pack -name "*.cy.ts" | wc -l
grep -r "cy.intercept" x-pack | wc -l
find x-pack -path "*/cypress/support/*" -name "*.ts"
# Generate scope report
cat > migration-scope.md <<EOF
# Cypress → Scout Migration Scope
## Summary
- Total Cypress tests: X files
- Custom commands: Y files
- Network intercepts: Z usages
- Estimated complexity: High/Medium/Low
## Files by Complexity
### High (custom commands, complex assertions)
- path/to/test1.cy.ts
- path/to/test2.cy.ts
### Medium (network mocking, async)
- path/to/test3.cy.ts
### Low (simple click/type)
- path/to/test4.cy.ts
EOF
# Migration Plan: Cypress → Scout
## Objectives
- Migrate X Cypress tests to Scout
- Improve test reliability (reduce flakiness by Y%)
- Reduce test execution time by Z%
## Phases
### Phase 1: Low-Risk Tests (Week 1-2)
**Target:** 10 simple tests
**Criteria:** No custom commands, no network mocking
**Files:**
- x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/_root_profile.cy.ts
- ...
**Success Metrics:**
- All tests pass in CI
- No increase in execution time
- Team trained on Scout patterns
### Phase 2: Medium-Risk Tests (Week 3-4)
**Target:** 15 tests with network mocking
**Criteria:** Uses cy.intercept(), moderate assertions
**Prerequisites:** Phase 1 complete, Scout helpers created
### Phase 3: High-Risk Tests (Week 5-6)
**Target:** 5 complex tests
**Criteria:** Custom commands, complex page interactions
**Prerequisites:** Custom command migration complete
## Risk Mitigation
- Run both Cypress and Scout tests in parallel initially
- Create conversion guide for team
- Pair programming for complex conversions
- Weekly sync on blockers
## Rollback Plan
- Keep Cypress tests until Scout tests stable (2 weeks)
- Revert Scout test if CI red > 24 hours
- Document known issues
# Convert one test at a time
# Example: Cypress → Scout conversion
# Before (Cypress):
# describe('Discover', () => {
# it('should display data', () => {
# cy.visit('/app/discover');
# cy.get('[data-test-subj="hits-counter"]').should('contain', '14,005');
# });
# });
# After (Scout):
# import { expect, test } from '@playwright/test';
# import { createScoutInstance } from '@kbn/scout';
#
# test.describe('Discover', () => {
# test('should display data', async ({ page }) => {
# const scout = await createScoutInstance(page);
# await scout.common.navigateTo('discover');
# await expect(page.getByTestId('hits-counter')).toContainText('14,005');
# });
# });
# Validate conversion
node scripts/scout run-tests --config x-pack/test/scout_functional/apps/discover/config.ts
# Generate progress report
cat > migration-progress.md <<EOF
# Migration Progress Report
**Date:** $(date +%Y-%m-%d)
**Sprint:** Sprint 23
## Summary
- **Completed:** 15/30 tests (50%)
- **In Progress:** 5 tests
- **Blocked:** 2 tests (custom command issue #12345)
- **Remaining:** 8 tests
## Velocity
- **Current sprint:** 10 tests
- **Previous sprint:** 8 tests
- **Trend:** ↑ 25%
- **ETA:** 2 sprints (April 15)
## Blockers
1. **Custom command `cy.loginAs()`**: No Scout equivalent
- **Owner:** @username
- **Status:** PR #67890 in review
- **Impact:** Blocks 5 tests
## Next Sprint Plan
- Complete Phase 2 (medium-risk tests)
- Resolve blocker #1
- Start Phase 3 (high-risk tests)
EOF
# Executive Summary: Cypress → Scout Migration
## Status: On Track ✅
### Key Metrics
- **Progress:** 50% complete (15/30 tests)
- **Timeline:** On track for Q2 completion
- **Risk Level:** Low (1 blocker, mitigation in place)
### Business Impact
- **Test Reliability:** +15% pass rate (Scout auto-retry)
- **CI Time:** -20% (parallel execution)
- **Developer Experience:** Improved debugging (Playwright Inspector)
### Next Milestones
- **April 1:** Phase 2 complete (25/30 tests)
- **April 15:** Phase 3 complete (30/30 tests)
- **April 22:** Cypress suite removal
### Risks & Mitigation
- **Risk:** Custom command migration complexity
- **Mitigation:** Dedicated pair programming sessions, helper library created
### Recommendations
- Continue current pace
- Add 1 more engineer for Phase 3 (complex tests)
- Plan retrospective for knowledge sharing
@kibana-precommit-checks# Before committing converted Scout tests
@kibana-precommit-checks --scope=scout
@buildkite-ci-debugger# Debug Scout test failures during migration
@buildkite-ci-debugger --build <url> --focus scout
@qa-browser-verification# Verify converted tests in real browsers
@qa-browser-verification --suite migration-phase-2
@deep-dive# Research best practices for complex conversions
@deep-dive "Playwright advanced patterns for Scout tests"
User: "plan migration from Cypress to Scout for Security Solution"
Agent Actions:
x-pack/solutions/security/Output: security-cypress-to-scout-plan.md with:
User: "track migration progress for API versioning"
Agent Actions:
Output: api-versioning-progress.md with:
User: "create RFC for migrating alerting utilities to shared package"
Agent Actions:
@kbn/alerting-utils)Output: rfc-alerting-utils-package.md with:
# Find migration candidates
find x-pack -name "*.cy.ts" -o -name "*.cy.js"
find . -name "ftr_configs.js" -o -name "config.ts"
grep -r "router.versioned" x-pack | grep -v "version:"
# Complexity analysis
grep -r "cy.intercept\|cy.route" x-pack | wc -l
grep -r "getService\|getPageObjects" x-pack | wc -l
grep -r "await retry.try" x-pack | wc -l
# Dependency analysis
node scripts/check_circular_deps.js
# Count conversions
find x-pack -name "*.scout.ts" | wc -l
git log --since="1 month ago" --oneline --grep="cypress.*scout" | wc -l
# Test pass rate
node scripts/scout run-tests --config <config> --reporter json > results.json
jq '.stats.passes, .stats.failures' results.json
# CI analysis
curl -s "https://api.buildkite.com/v2/organizations/elastic/pipelines/kibana/builds" \
| jq '[.[] | select(.commit_id == "<sha>")] | .[0].state'
# Generate markdown reports
cat > report.md <<EOF
# Migration Progress: $(date +%Y-%m-%d)
$(find x-pack -name "*.scout.ts" | wc -l) tests converted
$(grep -r "TODO.*cypress" x-pack | wc -l) blockers remaining
EOF
# Create burndown data
echo "Sprint,Completed,Remaining" > burndown.csv
echo "1,10,40" >> burndown.csv
echo "2,25,25" >> burndown.csv
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub patrykkopycinski/patryks-treadmill-claude-plugins --plugin kibana-docs-release-tools3 skills in this plugin
/doc-generatorGenerate high-quality technical documentation from code: API docs from Kibana versioned routes, architecture diagrams (Mermaid) from code structure, user guides from Scout E2E tests, README updates based on package changes, and changelogs from git commits. Use when asked to "generate API docs", "create architecture diagram", "update README", "generate changelog", or "document this".
/release-notes-generatorGenerate comprehensive release notes from git commits and PRs between releases, categorizing features, bug fixes, breaking changes, and deprecations.Other plugins' skills for the same job