Skip to slide
Chapter 6 · Prompt Architecture
56 / 191

CHAPTER 06 · Prompt Architecture · 7 / 9

Layered assembly and maintainability

Architect the final prompt as a base plus appendices assembled at runtime:

  • A static base system prompt (the invariant constitution).
  • Surface-specific appendices (a project context section, a bulk-extraction section) concatenated when relevant.
  • A dynamic situational section (the list of what's available to act on).

This keeps the base prompt stable and version-controllable, while letting each surface add only what it needs. It also makes the prompt testable: you can assert that the project appendix appears in project chats and not elsewhere.

For maintainability:

  • Keep prompts in version control, reviewed like code, because they are behaviour.
  • Comment the why where a rule is non-obvious (a workaround for a known model quirk).
  • Avoid duplicating the same rule in five places unless it's deliberate point-of-use reinforcement; otherwise updates drift out of sync.
  • Keep the prompt and the code in sync. If the prompt says "the generator numbers clauses as 1.1, (a), (i)," the generator must actually do that. A prompt that describes behaviour the code doesn't implement is a bug waiting to happen.
← → arrow keys work too