You are acting as a senior software architect performing a deep, evidence-based architectural review of this software product/codebase.
The review must be grounded in what you can actually observe in the repository. Do not invent requirements, architecture, user needs, constraints, or business goals. Clearly distinguish:
- Observed fact — directly evidenced by the code/repository/configuration.
- Inference — a reasonable conclusion from evidence.
- Unknown — information that cannot be established from the repository.
- Recommendation — a proposed improvement.
Determine whether the current architecture is intentionally designed to achieve its purpose, or whether important parts of the architecture appear to have emerged accidentally from implementation choices.
Assess whether the system:
- Minimizes likely cumulative lifetime cost while satisfying required runtime behavior.
- Provides enough architectural structure to condense and organize the problem domain and reduce cognitive load.
- Provides useful guidance and orientation to developers and other stakeholders without unnecessarily constraining them.
- Improves the experience of the people who build, operate, maintain, and use the system.
- Makes architectural decisions based on context and explicit trade-offs, rather than personal preference, fashion, historical habit, or whatever an AI/library/framework happened to suggest.
The architectural review must follow the principle:
Every decision has its price. No decision is for free.
And evaluate every significant architectural choice in its actual context, because:
A decision can only be evaluated with respect to its context.
Do not label decisions simply "right" or "wrong." Assess whether they are suitable or unsuitable for this product's context, and explain the trade-offs.
Create a result of each below point in their respective file, separated. Proceed one by one, not parallelly.
You can write temporary work-files if some discovery is better persisted/reused thru sessions - try to hold the context together without exhausting it.
Before judging the architecture, reconstruct as much of the problem space as the repository allows.
Identify and document:
- What the product appears to do.
- Major user types and stakeholders.
- Core business capabilities/use cases.
- Functional requirements that are visible from the code/product.
- Explicit and implicit quality requirements.
- Business constraints.
- Organizational constraints.
- Technical constraints.
- Infrastructure/environment constraints.
- Security and compliance constraints visible in the repository.
- Performance expectations and bottlenecks.
- Availability/reliability expectations.
- Scalability expectations.
- Data lifecycle requirements.
- Integration requirements.
- Deployment/release constraints.
- Operational constraints.
- Major short-term risks.
- Major long-term risks.
- Likely sources of future change.
- Areas where requirements appear ambiguous, contradictory, undocumented, or missing.
Treat this as a discovery exercise, not an excuse to assume requirements.
Explicitly call out missing information that prevents a confident architectural judgment.
Create a "Known / Inferred / Unknown" section.
Assess both development-time and runtime quality attributes.
At minimum investigate:
- Understandability
- Maintainability
- Evolvability/changeability
- Portability
- Testability
- Buildability
- Deployability
- Operability
- Observability
- Reliability
- Availability
- Recoverability
- Fault tolerance
- Scalability
- Performance/time behavior
- Resource utilization
- Security
- Accessibility
- Usability
- Interoperability
- Installability
Do not mechanically score every attribute if it is irrelevant. Tailor the review to the product.
For each important quality attribute:
- State what the product appears to require.
- Show the architectural mechanisms used to satisfy it.
- Identify evidence that the mechanism actually works.
- Identify weaknesses or contradictions.
- Identify trade-offs introduced by the chosen design.
- State what should be measured or tested where the repository does not provide enough evidence.
Remember that development-time qualities largely affect cost of change, while runtime qualities constrain whether the solution is acceptable in operation.
For every applicable anti-pattern below, determine whether there is evidence of it.
Look for architecture that is effectively a by-product of coding/refactoring rather than explicit high-level design.
Check for:
- Important architectural decisions missing.
- Architecture encoded only implicitly in code.
- Cross-cutting runtime qualities not explicitly designed.
- Local optimizations creating system-level problems.
- Architectural consequences that appear accidental.
Distinguish good incremental architecture from architecture that is simply undecided.
Look for:
- Excessively detailed architecture fixed before sufficient feedback.
- Complex abstractions that do not correspond to current needs.
- Architecture attempting to cover hypothetical future requirements.
- Large frameworks or infrastructure introduced before evidence justified them.
- Design decisions that are unusually expensive to change.
Assess whether the system sits at a sensible balance between:
- delaying decisions until more information exists, and
- making important decisions early enough to keep change affordable.
Look for technologies, frameworks, patterns, platforms, cloud services, AI components, or architectural styles that appear to have been selected because they are fashionable rather than because the product needs them.
For each suspicious technology choice ask:
- What problem does it solve?
- What evidence shows the problem exists?
- What alternatives were possible?
- What complexity does it introduce?
- What operational burden does it introduce?
- What long-term cost does it introduce?
- What skills does it require?
- What happens if the technology is removed?
Look for evidence that one technology, paradigm, framework, database, cloud platform, language, or architectural style dominates decisions regardless of context.
Identify places where another solution may have been simpler or more suitable.
Look for reusable patterns being imposed where the local problem does not justify them.
Pay special attention to:
- Generic abstractions
- Universal service layers
- Excessive framework conventions
- "Everything must go through X" designs
- Standardized patterns that increase complexity without clear value
Look for old practices, infrastructure, dependencies, patterns, or constraints that appear to persist mainly because "this is how it has always been done."
Do not assume something is obsolete merely because it is old. Determine whether it remains justified by current context.
This is particularly important.
Look for signs that implementation decisions may have been produced by coding assistants, generated code, copy/paste patterns, or isolated examples without system-level architectural reasoning.
Check for:
- Unnecessary libraries/frameworks.
- Duplicate ways of solving the same problem.
- Over-engineered local solutions.
- Partial fits.
- Boilerplate or abstractions with no clear purpose.
- Dependency proliferation.
- Security or operational consequences not considered.
- APIs/components chosen without regard to the overall architecture.
For suspicious areas, explain the architectural consequence, not merely that the code "looks AI-generated."
Determine whether the architecture appears disconnected from implementation reality.
Look for:
- Architecture documents that do not match the code.
- Planned components that do not exist.
- Components in code that are missing from architecture documentation.
- Architectural constraints developers cannot realistically follow.
- Designs that look clean conceptually but create implementation or operational pain.
Check whether architectural decisions are actually reflected in the running system.
Look for too little architectural guidance.
Identify important decisions left to individual developers that should probably be standardized, especially where inconsistency affects:
- Security
- Reliability
- Data consistency
- Observability
- Performance
- Integration
- Deployment
- Maintainability
- Operational behavior
Look for unnecessary architectural constraints on low-level implementation details.
Identify places where the architecture dictates details that developers could safely decide themselves.
Look for the combination of:
- Missing essential guidance, AND
- Excessive guidance on minor implementation details.
This should be explicitly assessed.
Do not make personal accusations. Instead look for structural symptoms:
- Decisions defended as authority rather than evidence.
- "Because architecture says so" without rationale.
- Centralized decision-making without meaningful stakeholder input.
- Technology choices apparently optimized for prestige.
- Architecture that increases influence/control rather than product value.
Report only evidence-based observations.
Evaluate whether the architecture appears to optimize total lifetime cost, not simply initial implementation effort.
Consider, where applicable:
- Development cost
- Test cost
- Deployment cost
- Infrastructure cost
- Cloud/usage cost
- Operations cost
- Maintenance cost
- License/subscription cost
- Support cost
- Administration cost
- Training cost
- Migration cost
- Incident/outage cost
- Performance-related cost
- Security/compliance cost
- Cost of future change
- Cost of architectural lock-in
- Lost revenue or user impact resulting from architectural limitations
For every major architectural choice, identify significant cost categories it improves and worsens.
Do not optimize purely for:
- lowest initial coding effort,
- lowest infrastructure cost,
- lowest complexity,
- highest performance,
- or easiest development.
Assess the cumulative lifetime picture.
Identify the parts of the system most likely to be expensive to modify.
Look for:
- Tight coupling
- High change propagation
- Shared mutable state
- Large dependency surfaces
- Hard-coded integrations
- Database coupling
- Cross-cutting assumptions
- Distributed transactions
- Inconsistent abstractions
- Poor module boundaries
- Duplication that will drift
- Central components with excessive responsibility
- External vendor lock-in
Then determine whether these choices are actually justified by the likely future change patterns.
Do not claim that something has a high cost of change merely because it "looks ugly." Tie the finding to plausible changes and dependencies.
Treat architecture as a mechanism for compression, structure, guidance, and orientation between the problem domain and solution domain.
Assess whether a competent developer can reasonably understand:
- The major system boundaries.
- Major responsibilities.
- Important data flows.
- Important runtime flows.
- Major dependencies.
- Important architectural constraints.
- Key decisions and their rationale.
- Where important behavior belongs.
- Which decisions are intentionally standardized.
- Which decisions are deliberately left to implementation teams.
Check for cognitive overload caused by:
- Excessive abstractions.
- Excessive indirection.
- Too many frameworks.
- Too many architectural concepts.
- Duplicate patterns.
- Inconsistent naming.
- Scattered responsibilities.
- Overly complex diagrams.
- Architecture documentation that is incomplete or obsolete.
Also check the opposite problem: whether developers are forced to reconstruct important architectural decisions from code because too little guidance exists.
A good architecture should make important work easier to reason about, not merely easier to govern.
Assess how architectural decisions affect:
- Cognitive load
- Local complexity
- Debugging difficulty
- Delivery friction
- Repetitive work
- Confidence in making changes
- Ability to understand the system
- Deployment complexity
- Observability
- Troubleshooting
- Recovery
- Operational burden
- On-call risk
- Reliability
- Performance
- Accessibility
- Usability
- Predictability
- Failure behavior
Identify additional affected groups based on the product.
Look for architecture that technically works but imposes unnecessary human cost.
Also identify architecture that improves human outcomes and explain why.
Review the actual engineering work against all four activities.
Determine whether the team appears to understand:
- Task
- Functionality
- Quality requirements
- Time
- Budget/cost
- Organizational constraints
- Technical constraints
- Business constraints
- Short-term risks
- Long-term risks
- Lifecycle considerations
Determine whether architectural work appears to consider multiple viable options, rather than immediately settling on one design.
For major decisions:
- Identify the chosen option.
- Identify plausible alternatives.
- Explain why alternatives were rejected, if evidence exists.
- Identify whether important alternatives appear never to have been considered.
For each major decision, evaluate:
- Runtime quality
- Lifetime cost
- Cost of change
- Cognitive load
- Developer impact
- Operational impact
- User impact
- Business impact
- Security
- Scalability
- Complexity
- Reversibility
- Lock-in
The goal is not to find "the best" option in every dimension. Determine whether the selected option is the most suitable overall option for this context.
Assess whether architecture communicates enough useful context to the people who must make decisions and implement the system.
Look at:
- Documentation
- Decision records
- Diagrams
- Code structure
- Constraints
- Examples
- Tests as executable guidance
- CI/CD checks
- Architectural fitness functions
- Developer experience
Determine whether architecture is being used to support people rather than primarily to control them.
Compare stated/planned architecture with actual implementation.
Find:
- Architecture/documentation drift.
- Dead architectural concepts.
- Undocumented architectural behavior.
- Components that violate intended boundaries.
- Dependency direction violations.
- Unexpected coupling.
- Runtime flows inconsistent with conceptual architecture.
- Architectural rules that are not enforced or observable.
Where possible, cite concrete files, modules, classes, services, configuration, dependency declarations, database structures, or deployment definitions.
Build a table with one row per significant decision.
Use this structure:
| Decision | Evidence | Problem/Need | Alternatives | Key trade-offs | Positive effects | Negative effects | Context fit | Confidence | Recommendation |
|---|
Examples include:
- Modularization strategy
- Service boundaries
- Database choice
- Messaging/eventing
- Caching
- API design
- Authentication/authorization
- Data ownership
- Deployment model
- Cloud/platform choices
- Framework choices
- AI/LLM integration
- Observability
- Resilience
- Testing strategy
- Build/release strategy
- Dependency strategy
Do not create artificial decisions when evidence is weak.
Identify architectural debt that creates meaningful future cost or risk.
For each item:
- What is the problem?
- Why does it matter?
- What future changes become harder?
- What runtime risk exists?
- What human cost exists?
- What is the likely cost of leaving it?
- What is the likely cost of fixing it?
- Is remediation urgent, important, or optional?
Separate:
- Critical architectural problems
- Significant architectural weaknesses
- Moderate improvement opportunities
- Benign imperfections that should not be over-engineered
Do not recommend refactoring merely for aesthetic reasons.
Because modern coding agents can strongly influence implementation, explicitly investigate whether AI-assisted development could have introduced architectural problems.
Look for:
- Dependency proliferation
- Redundant libraries
- Generated abstractions
- Inconsistent coding patterns
- Multiple competing implementations
- Local optimizations without system context
- Weak security boundaries
- Missing runtime quality considerations
- Architecture emerging from prompts rather than deliberate decisions
At the same time, identify places where AI could safely and usefully support the architecture work, such as:
- Documentation
- Codebase analysis
- Dependency analysis
- Architecture-to-code consistency checks
- Trade-off analysis
- Finding overlooked alternatives
- Test generation
- Identifying affected components during changes
Do not assume AI is inherently bad or inherently good. Evaluate actual evidence.
Create a prioritized list using:
Severity × likelihood × blast radius × difficulty of remediation
For each high-priority risk provide:
- Finding
- Evidence
- Why it matters
- Affected quality attributes
- Affected stakeholders
- Likely consequences
- Recommended action
- Suggested order of implementation
Do not recommend a giant rewrite by default.
Create three horizons:
Problems that should be addressed now because they create significant risk, cost, or instability.
Architectural improvements that materially improve cost, quality, cognitive load, or maintainability.
Strategic changes that are worthwhile if/when the product's evolution justifies them.
For each recommendation state:
- Expected benefit
- Main downside/cost
- Dependencies/prerequisites
- Reversibility
- Evidence supporting the recommendation
Before finalizing the review, actively try to disprove your major conclusions.
For each major criticism ask:
- Could this design be justified by a requirement I have not discovered?
- Could the apparent complexity be necessary?
- Could the apparent duplication be deliberate isolation?
- Could the technology choice make sense because of an external constraint?
- Am I judging a context I do not understand?
- Am I recommending a fashionable architecture rather than a contextually suitable one?
Downgrade or mark findings as uncertain where the evidence is insufficient.
Return the review in this exact high-level structure:
-
Executive Summary
-
Product and Problem-Space Understanding
-
Known / Inferred / Unknown
-
Current Architecture Reconstruction
-
Quality Attribute Assessment
-
Architectural Anti-Pattern Assessment
-
Economic Purpose Assessment
-
Cognitive Purpose Assessment
-
Humane Purpose Assessment
-
4E Assessment
- Examine
- Explore
- Evaluate
- Execute
-
Major Architectural Decisions and Trade-offs
-
Architecture-to-Code Consistency
-
Architectural Debt
-
AI-Driven Architecture Risks
-
Top Risks
-
Prioritized Remediation Roadmap
-
Open Questions / Missing Evidence
-
Overall Architectural Assessment
Every significant finding must include concrete evidence.
Prefer:
- File paths
- Module/package names
- Class/function names
- Configuration entries
- Dependency declarations
- Database/schema definitions
- API definitions
- Infrastructure/deployment definitions
- Tests
- Metrics/logging/tracing configuration
- Existing documentation
Do not make generic statements such as "the architecture is tightly coupled" without identifying exactly where and how.
When evidence is unavailable, explicitly say:
"Insufficient evidence in the repository."
Do not silently fill the gap with assumptions.
Be rigorous and skeptical, but fair.
Do not optimize for finding as many problems as possible.
The goal is to determine whether the architecture is purposeful, context-sensitive, economical over its lifetime, cognitively useful, humane, and supported by deliberate architectural reasoning.
Prefer a smaller number of high-confidence findings over a long list of superficial observations.
Most importantly:
Do not review the code as a collection of individual files. Review it as a system operating in a real business and human context.
And do not confuse "technically possible" with "architecturally suitable."
Begin by inspecting the entire repository and reconstructing the current system before making architectural judgments.