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)
- Marketing problem – what manual or UI pain this solves
- Key idea – 1–2 sentence core concept, early
- Minimal example – small, realistic, copy-paste YAML or CLI
- Mental model – explain in marketing terms (audiences, flows, actions)
- Rules – explain constraints as safety or consistency guarantees
- Pitfalls – predict marketer mistakes and explain why
- 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.