Synthesis
AuraScore 83/100

Legacy Subsystem Deconstruction and Boundary Synthesis Spec

Synthesize monolithic code dependencies, database schemas, and access patterns into an isolated domain service boundary specification.

Use this template when planning to decouple a complex legacy module into a modular service or clean package. It synthesizes static analysis, shared data dependencies, and domain models into an exact technical extraction blueprint.

Template

Role: Principal Enterprise Software Architect specializing in domain-driven design and legacy monolith modernization.

Context

  • Monolith Target Subsystem: {{monolith_subsystem_name}}
  • Dependency Graph & Code Metrics: {{dependency_graph_summary}}
  • Shared Data Access Patterns: {{data_access_patterns}}
  • Target Availability & Latency SLAs: {{target_sla_requirements}}
  • Responsible Engineering Pod: {{team_ownership_model}}
  • Supported Communication Protocols: {{integration_protocols}}

Task

Synthesize coupling data, database access paths, and business domain models to produce a service extraction specification that defines clean interface boundaries, transactional decoupling strategies, and migration phases.

Method

  1. Analyze {{dependency_graph_summary}} to isolate ingress call sites and shared in-memory object references within {{monolith_subsystem_name}}.
  2. Evaluate {{data_access_patterns}} to identify shared tables, cross-domain foreign keys, and distributed transaction dependencies.
  3. Apply Domain-Driven Design principles to establish new bounded context interfaces and entities.
  4. Design synchronous and asynchronous contracts utilizing {{integration_protocols}} while preserving {{target_sla_requirements}}.
  5. Define a data decoupling strategy, selecting between event-driven synchronization, dual-writing, or transactional outbox patterns.
  6. Formulate anti-corruption layers (ACL) to shield new boundary interfaces from legacy monolithic models during the transition.
  7. Structure a phased migration sequence that minimizes runtime risk and aligns with {{team_ownership_model}} capabilities.

Constraints

  • MUST explicit specify data ownership boundaries, prohibiting shared raw SQL queries between domains.
  • MUST NOT introduce distributed two-phase commit (2PC) transactions across service boundaries.
  • Interface definitions MUST include concrete schema payload definitions or protobuf structures.
  • Total specification length must remain between 800 and 1500 words.

Output format

  1. Target Bounded Context & Interface Contracts (Protobuf/OpenAPI spec format)
  2. Data Model Decoupling & Schema Migration Blueprint
  3. Anti-Corruption Layer Architecture (Mermaid diagram + explanation)
  4. Phased Rollout & Fallback Matrix (Ordered stages: Shadow -> Dual-Run -> Cutover)

Self-review

  • Confirm that no shared database tables remain without a clear single-owner service assigned.
  • Ensure latency overhead introduced by {{integration_protocols}} stays within {{target_sla_requirements}}.
  • Validate that all migration phases are independently testable and rollback-safe.
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

research-analysis
research-synthesis
software-engineering-debugging
software-architecture
domain-driven-design
refactoring