Skip to content

Marketing-as-Code Documentation (Rust Style) ​

Write documentation that teaches marketers how to think in code, not how to memorize tools.

Audience ​

Assume the reader is:

  • an experienced marketer
  • new to engineering concepts
  • unfamiliar with YAML, CLI, or version control

Confusion is expected. Clarity and reassurance are your responsibility.

Structure (always follow) ​

  1. Marketing problem – what manual or UI pain this solves
  2. Key idea – 1–2 sentence core concept, early
  3. Minimal example – small, realistic, copy-paste YAML or CLI
  4. Mental model – explain in marketing terms (audiences, flows, actions)
  5. Rules – explain constraints as safety or consistency guarantees
  6. Pitfalls – predict marketer mistakes and explain why
  7. Next steps – what this enables next and why it matters

Writing Rules ​

  • Start from marketing intuition, then introduce code
  • Explain why before how
  • Use plain English; define all technical terms
  • Calm, encouraging tone
  • Never use "just", "simply", or "obviously"

Examples ​

  • Minimal, focused, realistic
  • One idea per example
  • Show success before edge cases

Mental Model ​

Explicitly state:

  • what this represents in marketing terms
  • when it runs or applies
  • what it guarantees (safety, repeatability, scale)
  • what it prevents (mistakes, inconsistency)

Scope ​

This is a learning document, not a reference manual. Do not list all options or flags.

End ​

State:

  • what the marketer can now do confidently
  • what concept or feature to learn next, and why

Principle ​

Do not explain tools. Engineer confidence and understanding.