Chapter 28 of 32

Appendix 12: Machine Coding: Pre-Prompt Checklist

Concepts

WHAT YOU NEED TO KNOW

CLARIFY BEFORE BUILDING

Defining the application before asking for code gives the AI complete working context. Clear upstream thinking prevents confused downstream generation.

DATA DESIGN COMES FIRST

Core tables, data flow, storage, retrieval, and updates shape everything else. An application without an explicit data model accumulates accidental complexity.

TECHNICAL FOUNDATIONS LIMIT CHOICE

Interface type, language, framework, ORM strategy, and schema management narrow implementation space. Early constraints eliminate entire classes of rework.

CONFIGURATION PROTECTS SECRETS

Environment files and wrapper classes separate secrets from logic. Explicit configuration planning avoids hardcoded credentials and brittle setup.

INTELLIGENCE LAYER NEEDS DECISION

Model choice and local-versus-API hosting determine cost, privacy, and capability. Embedding and generation requirements should be named before coding starts.

data → foundations → config
  → intelligence → input → output

SEARCH SHAPES ARCHITECTURE

Vector search plans, embedding models, and dimension expectations affect storage and retrieval design. Similarity infrastructure cannot be bolted on thoughtlessly.

INPUT DEFINES SCOPE

Accepted formats and single-versus-batch processing set interface boundaries. Knowing what enters the system determines parsing, validation, and scale.

OUTPUT DEFINES DONE

Console, file, or database destinations plus result tracking decide what finished means. Observable outputs make machine-built work testable and reviewable.

CHECKLIST PREVENTS REWORK

Walking data, foundations, config, intelligence, search, input, and output before prompting catches gaps early. An hour of clarity saves many hours of repair.

Explain this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Apply this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Pre-Prompt Checklist: Define Your App Before the AI Builds It

Use this checklist to clarify your thinking before engaging the AI in coding your tool or app.


    flowchart TD
    Start([💡 App Idea]) --> A[🧱 Data Design<br>Tables, flow, storage]
    A --> B[🛠️ Technical Foundations<br>CLI/Web, language, framework]
    B --> C[🔐 Configuration & Secrets<br>.env, config wrapper]
    C --> D[🧠 Intelligence Layer<br>Models, local/API]
    D --> E[📦 Embeddings & Search<br>Vector search, embedding model]
    E --> F[📥 Input Handling<br>Format, batch support]
    F --> G[📤 Output Handling<br>Console, file, DB]
    G --> H([✅ Ready to Prompt AI])

    style Start fill:#e1f5fe,stroke:#333
    style A fill:#fff3e0,stroke:#333
    style B fill:#e8f5e9,stroke:#333
    style C fill:#fce4ec,stroke:#333
    style D fill:#f3e5f5,stroke:#333
    style E fill:#fff9c4,stroke:#333
    style F fill:#e0f7fa,stroke:#333
    style G fill:#c8e6c9,stroke:#333
    style H fill:#4caf50,stroke:#333,color:#fff
  

🧱 Data Design

  • Have you defined your core tables or data structure?
  • Do you know how your data flows through the app — from input to output?
  • Have you considered how you’ll store, retrieve, and update records?

🛠️ Technical Foundations

  • Will this be a CLI, Web App, or something else?
  • What’s your preferred language and framework (e.g., Python + FastAPI)?
  • Are you using an ORM (e.g., SQLAlchemy), or sticking with dataclasses + raw SQL?
  • Will you manage schema with migrations, a .sql file, or something else?

🔐 Configuration & Secrets

  • Do you want to use a .env file for secrets and environment variables?
  • Is there a configuration wrapper class you plan to use?

🧠 Intelligence Layer

  • Which model(s) will power your AI interactions? (e.g., qwen:2.5, mxbai-embed-large)
  • Will you use local models (e.g., Ollama) or API-based models?
  • Do you plan to use vector search (e.g., pgvector)?
  • Have you chosen an embedding model, and do you know the expected dimension size?

📥 Input Handling

  • What is the input format for your app? (e.g., Markdown file, CLI args, JSON payload)
  • Do you want to support batch processing, or just single sessions?

📤 Output Handling

  • What should your app output? (e.g., print to console, write to file, store in DB)
  • Do you need to track results in a database or results log?