nWave-ai/nWave / nWave/skills/nw-ab-migrate-monolith
nw-ab-migrate-monolith
VerifiedPROCEDURE — migrate one legacy monolithic agent to a lean core plus routed skills. Trigger: an existing agent has measured size, embedded-configuration, duplication, aggressive-language, or multi-responsibility debt. Composes agent validation and requested skill optimization.
nw-ab-migrate-monolith (PROCEDURE)
Kind: PROCEDURE | One job: migrate one existing agent monolith | One trigger: a legacy agent has measured size, embedded-configuration, duplication, aggressive-language, or multi-responsibility debt.
Deterministic workflow
Run these steps in order:
- Baseline — Measure the agent's lines, words, bytes, responsibilities, monolith debt, and existing behavioral projections. Stop: baseline is red, the target is not an agent, or a textual pin cannot be preserved.
- Extract configuration — Move semantic configuration into frontmatter while preserving
name,model,tools,maxTurns,skills, and public behavior. Stop: a field cannot be represented without behavior change. - Map — Reuse existing skills first. Map each original rule to one owner: lean agent core, one existing skill, or one extracted skill. Define disjoint, exhaustive triggers for extracted skills. Stop: an owner overlaps, a trigger gaps/overlaps, or public fan-out is missing.
- Simplify — Preserve the agent name, public contract, tool surface, model, and
maxTurns; retain only routing and global invariants in the core. Remove duplication and route distinct-trigger knowledge/procedures. Safety by construction first (frontmatter tool surface, typed grammar); hooks last resort with a recorded reason (GDP-0). Prefer remove, relax, route, or construct over a new check. Stop: preservation would change behavior or require added ceremony. - De-escalate language — Replace aggressive language with direct calm language; retain
MUSTonly for skill-loading instructions. Stop: a required textual pin cannot be preserved. - Optimize referenced skills — For each referenced skill selected for optimization, invoke
nw-ab-optimize-skill. Continue agent migration when it returnsNOT_ELIGIBLE. Stop: a preservation risk, or a worsened resident cost without an explicit decision. - Validate once — Batch the planned edits, run existing agent validation once through
nw-ab-validate-spec, and execute the existing behavioral projections. Do not create validators or tests. Stop: validation or a projection is red. - Handoff — Report ownership map, trigger partition, before/after measurements, executed projections, independent-review-needed, and residual
INDETERMINATE. Stop: any required fact remains unmeasured.
Composition
| Kind | Skill | Use |
|---|---|---|
| PROCEDURE | nw-ab-validate-spec | Step 7, agent validation only |
| PROCEDURE | nw-ab-optimize-skill | Step 6, for a referenced skill selected for optimization |
| KNOWLEDGE | nw-ab-house-style | Steps 2, 4, and 5; preserve lean core and literal protections |
Boundaries
- Input is one existing agent; skill optimization remains the composed procedure's job.
nw-ab-validate-specvalidates the agent result only.- Existing behavioral projections are evidence, never permission to change behavior.
- No public command, agent, or artifact is created by migration.
Success criteria
- Agent name, public contract, model, tools, and
maxTurnspreserved. - Every original rule has exactly one owner; extracted triggers are disjoint and exhaustive.
- Referenced skills are optimized only through
nw-ab-optimize-skillwhen eligible. - Existing validation runs once after batched edits; existing behavioral projections remain green.
- Terminal handoff contains measurements, ownership, trigger partition, review need, and residual
INDETERMINATE.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |