Loading...
Loading...
Coordinates code modernization: OSS replacement and bundle optimization workers
npx skill4agent add levnikolaevich/claude-code-skills ln-830-code-modernization-coordinatorPaths: File paths (,shared/,references/) 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-*
| Aspect | Details |
|---|---|
| Input | Audit report (ln-645 migration plan) OR target module |
| Output | Modernized codebase with verification proof |
| Workers | ln-831 (OSS replacer), ln-832 (bundle optimizer) |
| Check | Required | Action if Missing |
|---|---|---|
| Audit report OR target module | Yes | Block modernization |
| Git clean state | Yes | Block (need clean baseline for revert) |
| Test infrastructure | Yes | Block (workers need tests for keep/discard) |
shared/references/ci_tool_detection.md| Condition | ln-831 | ln-832 |
|---|---|---|
| ln-645 findings present (OSS candidates) | Yes | No |
| JS/TS project with package.json | No | Yes |
| Both conditions | Yes | Yes |
| Target module specified | Yes | No |
| Indicator | Stack | ln-832 Eligible |
|---|---|---|
| package.json + JS/TS files | JS/TS | Yes |
| *.csproj | .NET | No |
| requirements.txt / pyproject.toml | Python | No |
| go.mod | Go | No |
CRITICAL: All delegations use Task tool withandsubagent_type: "general-purpose"— each worker creates its own branch perisolation: "worktree".shared/references/git_worktree_fallback.md
FOR each selected worker:
Task(description: "Modernize via ln-83X",
prompt: "Execute ln-83X-{worker}. Read skill from ln-83X-{worker}/SKILL.md. Context: {delegationContext}",
subagent_type: "general-purpose",
isolation: "worktree")| Field | Type | Description |
|---|---|---|
| projectPath | string | Absolute path to project |
| auditReport | string | Path to codebase_audit.md (if applicable) |
| targetModule | string | Target module path (if applicable) |
| options.runTests | bool | Run tests after modernization |
| Order | Worker | Reason |
|---|---|---|
| 1 | ln-831 (OSS replacer) | May add/remove packages, affecting bundle |
| 2 | ln-832 (bundle optimizer) | Runs AFTER package changes are settled |
| Worker | Branch Pattern | Contents |
|---|---|---|
| ln-831 | | OSS replacements |
| ln-832 | | Bundle optimizations |
| Field | Type | Description |
|---|---|---|
| worker | string | ln-831 or ln-832 |
| status | enum | success, partial, failed |
| branch | string | Worker's result branch name |
| changes_applied | int | Number of kept changes |
| changes_discarded | int | Number of discarded attempts |
| details | object | Worker-specific report |
| Field | Description |
|---|---|
| input_source | Audit report or target module |
| workers_activated | Which workers ran |
| modules_replaced | OSS replacements applied (ln-831) |
| loc_removed | Custom code lines removed (ln-831) |
| bundle_reduction | Bundle size reduction in bytes/% (ln-832) |
| build_verified | PASSED or FAILED |
| per_worker[] | Individual worker reports |
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 | Recovery |
|---|---|
| ln-831 failure | Continue with ln-832 |
| ln-832 failure | Report partial success (ln-831 results valid) |
| Build failure | Revert last worker, re-verify |
| Error | Action |
|---|---|
| No workers activated | Report "no modernization targets found" |
| All workers failed | Report failures, suggest manual review |
| Dirty git state | Block with "commit or stash changes first" |
../ln-831-oss-replacer/SKILL.md../ln-832-bundle-optimizer/SKILL.md../ln-645-open-source-replacer/SKILL.mdshared/references/ci_tool_detection.mdisolation: "worktree"