Docs style guide (enterprise internal)¶
This page defines the quality bar and structure for PenguiFlow documentation.
Scope tiers¶
PenguiFlow docs are organized into tiers so “quality” is measurable:
- Tier A (Curated / MkDocs nav): enterprise-grade internal docs. These pages must be decision-ready and operational.
- Tier B (Canonical internal guides): long-form references used to extract and curate Tier A. Must remain accurate and maintainable.
- Tier C (Draft notes): RFCs/proposals. Useful for contributors; may be incomplete and are not part of the curated site.
The curated site intentionally does not include all repository docs.
Required structure for Tier A pages¶
Every Tier A page must include these sections (short is fine, missing is not):
- What it is / when to use it
- Non-goals / boundaries
- Contract surface (APIs / schemas / config knobs)
- Operational defaults (safe defaults + when to change)
- Failure modes & recovery
- Observability (what to emit; what to alert on)
- Security / multi-tenancy notes
- Runnable example(s) (or link to
examples/) - Troubleshooting checklist
Writing conventions¶
Audience and tone¶
- Write for production engineers and platform teams.
- Prefer concrete, testable statements (“Join is skipped if any branch fails”) over aspirations.
- Avoid “hand-wavy” language: “can”, “maybe”, “should” without a reason.
Canonical pointers¶
If a Tier B doc contains information that is canonically documented elsewhere:
- Add a “Canonical pages” block at the top linking to Tier A pages.
- Keep Tier B accurate, but defer operational guidance to Tier A.
Code snippets¶
- Snippets must be either:
- runnable (copy/paste; includes imports), or
- explicitly marked as pseudocode.
- Prefer examples that match the repo’s actual API:
- use
Node(...).to(...)andcreate(...)adjacency tuples, - avoid fictional APIs like
flow.node(...)unless it exists. - Include at least one negative path per major doc set (e.g. invalid args, join injection errors, missing env vars).
Diagrams¶
Use Mermaid diagrams for system flows, but keep them simple:
flowchart LR
O["Orchestrator"] --> P["ReactPlanner"]
P --> T["Tools"]
P --> F["PlannerFinish / PlannerPause"]
Admonitions¶
Use MkDocs Material admonitions to signal risk:
!!! notefor important behavior!!! tipfor best practices!!! warningfor foot-guns
Content ownership¶
Prefer ownership by subsystem:
docs/planner/**: planner maintainersdocs/tools/**: ToolNode/integrations maintainersdocs/core/**: runtime maintainersdocs/deployment/**anddocs/observability/**: platform/ops maintainers