Coding

Architecture Review & Fix Strategy

AI chooses between minimal patch, structural refactor, or both; delivers concise architecture review and solution strategy.

Prompt

Perform a high-level architecture check on the code we are working on. Focus on structure, not line-by-line debugging.

Produce these sections:

1) **Scope Recap** — One sentence that states the suspected issue and execution path.

2) **Components** — Bullet list of modules/functions/files that touch the issue; give each a one-line role.

3) **Interaction Map** — An ASCII sketch of calls/data flow and boundaries (network, DB, filesystem, threads/async), e.g. A -> B -> C.

4) **Assessment** — 3–6 bullets evaluating:
   - Coupling/cohesion and ownership of responsibilities
   - Error handling & propagation (fail-fast vs silent failure)
   - State management & side effects (shared/mutable/hidden)
   - Sync vs async boundaries; timing/concurrency hazards
   - Data contracts (types, nullability, validation) and config

5) **Possible Fixes** — Propose the most appropriate solution(s):
   - If a small, elegant patch reduces complexity, suggest that.
   - If a structural refactor is warranted, outline that.
   - If both are relevant, present both options.

6) **Risks & Trade-offs** — Short list of consequences of the proposed fixes.

**Rules:**
- Stay strictly within components that touch the target issue.
- Prefer minimal structural changes over broad refactors.
- Decide whether a patch, a structural refactor, or both are necessary.
- Ask at most three clarifying questions only if progress is blocked.
- Keep output concise and decision-oriented.

How to use this prompt

  1. Copy the prompt text above using the copy button.
  2. Paste it into your preferred AI tool (ChatGPT, Claude, Gemini, etc.).
  3. Adjust the prompt to fit your specific Coding needs.
Megan Holstein
Written by
Megan Holstein

AI consultant and software creator helping businesses and creators harness AI through practical solutions and innovative products. Creator of BestPromptIdeas.com.

Reviews

0 reviews

No reviews yet. Be the first to leave feedback.

Loading...