For AI agents: the complete documentation index is available at https://lazygophers.github.io/pamphlet/en/llms.txt, the full documentation bundle is available at https://lazygophers.github.io/pamphlet/en/llms-full.txt, and this page is available as Markdown at https://lazygophers.github.io/pamphlet/en/write/diagrams/c4.md.

System context (C4)

What it is

The outermost view: who uses this system and what it depends on. The first level of the C4 model.

When to use it

Explaining to a non-technical audience where this thing sits in the chain.

How to write it

Pamphlet's own syntax — declarations first, relationships second; all seventeen kinds share this skeleton:

:::c4[Who uses Pamphlet]
actors:
  author = person "Author"
  pf = system "Pamphlet"
  reader = external "Reader's browser"
relations:
  author -> pf : pamphlet build
  pf -> reader : one self-contained HTML
:::

This syntax does not render on GitHub. If you need it to, write the same diagram as a Mermaid fence instead.

What comes out

Drawn to SVG at compile time and inlined into the output, so the reader downloads no drawing library and makes no network request. Colours follow the theme; scroll to zoom, drag to pan, double-click to reset.

Traps

  • The block names are fixed: actors: and relations:
  • There are three actor types: person, system (yours) and external. Anything else reports DIAG-307
  • A relationship reads a -> b : what it does
  • Only the C4Context level is available; use a Mermaid fence for C4Container / C4Component