Skip to content

Instantly share code, notes, and snippets.

@cristoslc
Last active August 15, 2023 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cristoslc/bd579bcf456dad2d5624fee79730065e to your computer and use it in GitHub Desktop.
Save cristoslc/bd579bcf456dad2d5624fee79730065e to your computer and use it in GitHub Desktop.
LLM Architecture Prompts

OFTEN ASK (every few steps in a conversation; definitely when moving between steps of the process; or any time you're not sure what to do)

Please concisely summarize our purpose, process, progress, and next steps. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Phase 1: Domain Model in Mermaid

Purpose: Help me develop system architecture diagrams.

Process: Using mermaid syntax, develop a DDD Domain Model diagram.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of the Domain-Driven Design process, and how ubiquitous language applies to visual Domain Models in particular.

Phase 1.1: Domain Model Revisions

Purpose: Help me develop system architecture diagrams.

Process:

  1. I will provide an existing Domain Model using mermaid syntax
  2. We will discuss revisions to the model such as adding or removing domain objects and modifying relationships. You will confirm your understanding instead of outputting code.
  3. When requested, you will output the mermaid code.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

To start, please concisely summarize the Domain-Driven Design process, and how ubiquitous language applies to visual Domain Models in particular. Then outline our process for revising the Domain Model.

Phase 1.1 reminder

Please concisely summarize our purpose, process, progress, and next steps. Then let's discuss revisions to the model such as adding or removing domain objects and modifying relationships. You will confirm your understanding instead of outputting code.

Phase 1.3: Sequence diagrams (high-level)

Purpose: Help me develop system architecture diagrams.

Process:

  1. I will provide a Domain Model diagram in mermaid.
  2. You will tell me what workflows you can extrapolate from that.
  3. Using mermaid syntax, we will develop a set of sequence diagrams outlining workflows. All diagrams need a title element stating the workflow they describe. Use the alt/else elements if there are multiple paths available.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of Domain-Driven design, workflows, and sequence diagrams.

Phase 1.3.1: Revise Sequence diagrams (non-container)

Purpose: Help me develop system architecture diagrams.

Process:

  1. I will provide an existing Sequence Diagram in mermaid.
  2. You will confirm your understanding.
  3. Using mermaid syntax, we will modify the sequence diagram.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of sequence diagrams.

Phase 1.4 Sequence Diagrams with Infrastructure

  1. I will provide (in Mermaid syntax) the sequence diagrams describibng user workflows, a DDD Domain Model, and a C4 L2 or L3 diagram.
  2. You will update the sequence diagrams to reflect the infrastucture from the C4 model. All diagrams need a title element stating the workflow they describe. Use the alt/else elements if there are multiple paths available.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of Domain-Driven design, C4 L2 and L3 diagrams, and sequence diagrams.

Phase 1.5: C4 Level 1 Diagram in Mermaid

Purpose: Help me develop system architecture diagrams.

Process:

  1. I will provide a Domain Model diagram in mermaid.
  2. We will discuss the existing application architecture.
  3. Using mermaid syntax, develop a C4 Level 1 System Landscape diagram.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of the C4 model, particularly Level 1 diagrams and the System Landscape diagram.

Phase Two

Purpose: Help me develop system architecture diagrams.

Process:

  1. I will provide a C4 Level 1 diagram in mermaid.
  2. From that, extract the entities, value objects, aggregates, and their relationships
  3. We will then generate a class map (in Mermaid). Classes should not have generic types as properties, properties should be composed only of other classes that appear on the map. Use property names based on the descriptions of relationships between classes on the Domain Model. Use array notation [] on the type when there are plurals. Draw connections that indicate multiplicity in the relationships between classes.
  4. We will then generate an ERD diagram in Mermaid.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Phase Three

Purpose: Help me develop application architecture diagrams for an existing application.

Process:

  1. I will provide a DDD Domain Model diagram.
  2. We will need to discuss how the existing application and model relate in order to generate the diagrams.
  3. We will build a C4 Level 2 diagram using PlantUML or mermaid
  4. We will build a C4 Level 3 diagram using PlantUML or mermaid

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Provide a concise summary of the C4 model, and Level 2 and 3 diagrams in particular.

Phase Four

Purpose: Help me articulate the system architecture.

Process:

  1. I will provide a C4 Level 1 diagram in mermaid.
  2. I will provide a DDD Domain Model in PlantUML.
  3. I will provide a DDD Class Map in PlantUML.
  4. I will provide one or more application architecture diagrams.
  5. You will help me provide an internal wiki page. It should have an introduction for new developers onboarding to the project, an Operational Model section describing the client's primary business activities, and an alphabetized glossary defining all of the domain objects.

Confirm your understanding at each step. Tell me what you're thinking before you do it. Describe your intent and thought process. Do not output any code until we have discussed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment