ln-830-code-modernization-coordinator

Coordinates code modernization: OSS replacement and bundle optimization workers

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ln-830-code-modernization-coordinator" with this command: npx skills add levnikolaevich/claude-code-skills/levnikolaevich-claude-code-skills-ln-830-code-modernization-coordinator

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

ln-830-code-modernization-coordinator

Type: L2 Domain Coordinator Category: 8XX Optimization

Coordinates code modernization by delegating to L3 workers: ln-831 (OSS replacer) and ln-832 (bundle optimizer). Executes migration plans from 6XX audit findings.


Overview

AspectDetails
InputAudit report (ln-645 migration plan) OR target module
OutputModernized codebase with verification proof
Workersln-831 (OSS replacer), ln-832 (bundle optimizer)

Workflow

Phases: Pre-flight → Analyze Input → Delegate → Collect → Verify → Report


Phase 0: Pre-flight Checks

CheckRequiredAction if Missing
Audit report OR target moduleYesBlock modernization
Git clean stateYesBlock (need clean baseline for revert)
Test infrastructureYesBlock (workers need tests for keep/discard)

MANDATORY READ: Load shared/references/ci_tool_detection.md for test/build detection.


Phase 1: Analyze Input

Worker Selection

Conditionln-831ln-832
ln-645 findings present (OSS candidates)YesNo
JS/TS project with package.jsonNoYes
Both conditionsYesYes
Target module specifiedYesNo

Stack Detection

IndicatorStackln-832 Eligible
package.json + JS/TS filesJS/TSYes
*.csproj.NETNo
requirements.txt / pyproject.tomlPythonNo
go.modGoNo

Phase 2: Delegate to Workers

CRITICAL: All delegations use Agent tool with subagent_type: "general-purpose" and isolation: "worktree" — each worker creates its own branch per shared/references/git_worktree_fallback.md.

Delegation Protocol

FOR each selected worker:
  Agent(description: "Modernize via ln-83X",
       prompt: "Execute modernization worker.

Step 1: Invoke worker:
  Skill(skill: \"ln-83X-{worker}\")

CONTEXT:
{delegationContext}",
       subagent_type: "general-purpose",
       isolation: "worktree")

Delegation Context

FieldTypeDescription
projectPathstringAbsolute path to project
auditReportstringPath to codebase_audit.md (if applicable)
targetModulestringTarget module path (if applicable)
options.runTestsboolRun tests after modernization

Execution Order

OrderWorkerReason
1ln-831 (OSS replacer)May add/remove packages, affecting bundle
2ln-832 (bundle optimizer)Runs AFTER package changes are settled

Rules:

  • Workers run sequentially — ln-831 package changes affect ln-832 baseline.
  • Dependent workers share branch: ln-832 launches in ln-831's branch so it sees OSS replacement changes.

Phase 3: Collect Results

Each worker produces an isolated branch. Coordinator aggregates branch reports.

Worker Branches

WorkerBranch PatternContents
ln-831modernize/ln-831-{module}-{ts}OSS replacements
ln-832modernize/ln-832-bundle-{ts}Bundle optimizations

Result Schema

FieldTypeDescription
workerstringln-831 or ln-832
statusenumsuccess, partial, failed
branchstringWorker's result branch name
changes_appliedintNumber of kept changes
changes_discardedintNumber of discarded attempts
detailsobjectWorker-specific report

Phase 4: Aggregate Reports

Each worker verified independently in its branch (tests, build run by worker itself). Coordinator does NOT rerun verification or revert worker changes.

On Failure

  1. Branch with failing tests logged as "failed" in report
  2. User reviews failed branch independently

Phase 5: Report Summary

Report Schema

FieldDescription
input_sourceAudit report or target module
workers_activatedWhich workers ran
modules_replacedOSS replacements applied (ln-831)
loc_removedCustom code lines removed (ln-831)
bundle_reductionBundle size reduction in bytes/% (ln-832)
build_verifiedPASSED or FAILED
per_worker[]Individual worker reports

Configuration

Options:
  # Input
  audit_report: "docs/project/codebase_audit.md"
  target_module: ""

  # Workers
  enable_oss_replacer: true
  enable_bundle_optimizer: true

  # Verification
  run_tests: true
  run_build: true

  # Safety
  revert_on_build_failure: true

Error Handling

Recoverable Errors

ErrorRecovery
ln-831 failureContinue with ln-832
ln-832 failureReport partial success (ln-831 results valid)
Build failureRevert last worker, re-verify

Fatal Errors

ErrorAction
No workers activatedReport "no modernization targets found"
All workers failedReport failures, suggest manual review
Dirty git stateBlock with "commit or stash changes first"

References

  • ../ln-831-oss-replacer/SKILL.md
  • ../ln-832-bundle-optimizer/SKILL.md
  • ../ln-645-open-source-replacer/SKILL.md (audit companion)
  • shared/references/ci_tool_detection.md

Definition of Done

  • Input analyzed (audit report or target module)
  • Appropriate workers selected based on input and stack
  • Workers delegated with worktree isolation (isolation: "worktree", ln-831 before ln-832)
  • Each worker produces isolated branch, pushed to remote
  • Coordinator report aggregates per-worker results (branch, changes, status)

Phase 6: Meta-Analysis

MANDATORY READ: Load shared/references/meta_analysis_protocol.md

Skill type: optimization-coordinator. Run after all phases complete. Output to chat using the optimization-coordinator format.


Version: 1.0.0 Last Updated: 2026-03-08

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

ln-782-test-runner

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ln-140-test-docs-creator

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ln-150-presentation-creator

No summary provided by upstream source.

Repository SourceNeeds Review