plugin/skills/architecture-evolve/SKILL.md
Use this skill when migrating between technologies (REST → gRPC, monolith → microservices, on-prem → cloud, framework upgrade), executing a major redesign driven by tech debt or scale, or a strategic platform shift (database engine, message bus, identity provider, observability vendor) — including when the user describes a "from X to Y" move without saying "evolve" or "migration" — to plan and document architecture migration and evolution — an ADR for the migration decision, target-state ARCHITECTURE.md, a phased migration plan (strangler fig, expand-contract, branch by abstraction), fitness functions, and a rollback strategy. Not for new feature design — use `/architecture-design` instead.
npx skillsauth add avav25/ai-assets architecture-evolveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Plan and document an architecture migration. Produces an ADR explaining the decision, a target-state ARCHITECTURE.md, a phased migration plan, fitness functions to enforce the transition, and a rollback strategy.
/architecture-design/architecture-analyze/plan)/migrateExtract: From → To (current technology / pattern → target), Why (driver: tech debt, scale, cost, compliance, strategic), Scope (system-wide, single service, single module), Constraints (timeline, compatibility, downtime budget), Stakeholders.
Confirm a baseline exists (or run /architecture-analyze first). Migration without a documented current state is high-risk — the second-order effects are invisible. If no baseline → refuse and surface: "Run /architecture-analyze first to establish baseline."
Agent(solution-architect). NFRs for the target state, with delta vs current:
| Category | Current | Target | Delta | |---|---|---|---| | Availability | 99.5% | 99.95% | +0.45 % (10× fewer outage minutes) | | Latency p95 | 800 ms | 200 ms | −75 % | | Cost / month | $X | $Y | varies | | Scalability | … | … | … |
Migration only makes sense if the delta justifies the cost. Present target NFRs to the user — if the user accepts a current → target step that NFRs alone do not justify, document the strategic rationale explicitly.
Agent(solution-architect). Architecture Decision Record:
Agent(system-architect). Produce:
ARCHITECTURE.md to reflect target state (in a sibling ARCHITECTURE-TARGET.md until migration completes — keeps the live doc accurate)Pick a migration pattern fit for the situation:
| Pattern | When to use | Key risk | |---|---|---| | Strangler fig | Replacing a monolith feature-by-feature; new system grows around the old | Edge cases stuck in the old system long-term | | Expand-contract | Schema migrations; add new shape, dual-write, switch reads, remove old | Dual-write divergence; backfill correctness | | Branch by abstraction | Refactoring inside a single codebase; abstract behind interface, swap impl | Interface drift; long-lived branches | | Parallel run | High-risk cutovers; both systems run side-by-side, results compared | 2× cost; result-divergence triage |
Phase structure (typical):
| Phase | Goal | Exit criteria | Rollback | |---|---|---|---| | 0 | Baseline + observability parity | Telemetry on both systems matches | Skip — no production change | | 1 | Stand up new system, no traffic | New system passes synthetic checks | Tear down, no traffic was routed | | 2 | Shadow traffic / read-only | Result divergence < 0.1 % | Stop shadow, no user impact | | 3 | 1 % canary | Error rate ≤ baseline, latency within SLO | Route back to old (instant) | | 4 | 10 % → 50 % → 100 % | Error rate ≤ baseline at each step | Route back to old | | 5 | Decommission old | All traffic on new for 2 weeks | N/A — old removed |
For schema migrations, use expand-contract semantics — never break-then-fix.
Automated architectural checks that enforce the transition:
| Fitness function | What it checks | Where it runs | |---|---|---| | Coupling check | No imports from new → old after phase N | CI on PR | | Dependency drift | New system stays on target tech versions | CI / dependabot | | Latency budget | p95 of new system ≤ target | Production observability + alert | | Result parity | Shadow-traffic divergence < threshold | Phase 2 dashboard | | Coverage parity | New system test coverage ≥ old's | CI |
Fitness functions catch regression early — without them, the migration drifts off-target invisibly.
For each phase, document:
A migration without explicit rollback per phase is a one-way door. Reject the plan if rollback is missing for any phase that touches production.
Per-phase estimates to feed /plan:
| Phase | Tasks | Complexity | Roles | Dependencies |
|---|---|---|---|---|
| 0 | Observability parity | M | @sre-engineer, @devops-engineer | none |
| 1 | Stand up new system | L | @<stack>-engineer, @devops-engineer | phase 0 |
| ... | ... | ... | ... | ... |
Present: migration ADR, target-state diagrams, phased plan + rollback per phase, fitness functions, total cost estimate, total timeline. Wait for user approval. The user may request changes — common ones: longer canary, additional shadow phase, smaller initial scope.
After approval, save:
docs/adr/ADR-NNN-migrate-[from]-to-[to].mddocs/architecture/ARCHITECTURE-TARGET.md (becomes live ARCHITECTURE.md at end of migration)docs/architecture/migrations/[migration-name]/PLAN.mddocs/architecture/migrations/[migration-name]/ROLLBACK.mddocs/architecture/migrations/[migration-name]/FITNESS.mdRun /plan for each phase. Phases run as separate /develop cycles to keep blast radius small.
/architecture-analyze (current state baseline), strategic initiative/plan (per-phase decomposition), /develop (per-phase execution)Agent(solution-architect) (ADR), Agent(system-architect) (target state), plus Agent(cloud-architect) / Agent(devops-architect) for infra/pipeline-touching migrations${CLAUDE_PLUGIN_ROOT}/output-styles/design-pack.md${CLAUDE_PLUGIN_ROOT}/skills/architecture/assets/ — adr-template.md, c4-mermaid-template.md, nfr-template.md, tech-debt-register-template.md/migrate (library/schema-level migrations with RALF rollback gate; smaller scope than architecture-level evolution)@owasp-coverage (security during dual-run), @observability-methods (fitness functions for telemetry parity), @supply-chain-security (target-state SBOM/SLSA)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.