This repository has been archived on 2026-09-16. You can view files and clone it, but cannot push or open issues or pull requests.
typst_reporter/docs/examples.md

3.8 KiB

Examples and boilerplate

Copy one of these files into reports/, rename it, and replace the example values. Both examples use only fields supported by the current renderer.

Minimal report

id: "REP-2026-001"
organization: "Example Organization"
theme: default
title: "Short report title"
subtitle: "Optional context"
report_type: briefing
status: open
severity: info

metadata:
  Date: "2026-09-05"
  Author: "Your Name"

summary: >
  State the situation, its impact, and the most important next step.  

actions:
  - title: "First next step"
    status: pending
    text: >
      Describe the action and its expected result.      

closing: >
  Record the current state or handoff point.  

Save it as reports/my-report.yaml, then run:

./render.sh reports/my-report.yaml

Complete technical report

id: "INC-2026-001"
organization: "Example Organization"
theme: cic
title: "Service Interruption Investigation"
subtitle: "Incident analysis and shift handoff"
report_type: technical
status: open
severity: high

metadata:
  Date: "2026-09-05"
  Author: "Your Name"
  Service: "Example API"
  Environment: "Production"
  Owner: "Operations"

summary: >
  The API is available but intermittently slow. Database connection exhaustion
  is the strongest current lead. No permanent data loss has been observed.  

timeline:
  - time: "09:15"
    event: "Alert received"
    notes: "Latency exceeded the five-second threshold."
  - time: "09:22"
    event: "Initial mitigation"
    notes: "One unhealthy application instance was removed from rotation."

findings:
  - title: "Connection pool saturation"
    severity: high
    status: confirmed
    evidence: >
      Pool utilization remained at 100 percent during each latency spike.      
    assessment: >
      Requests are waiting for database connections. Query duration and pool
      sizing both need review.      
  - title: "No evidence of data loss"
    severity: info
    status: confirmed
    evidence: >
      Record counts and replication checks are consistent across nodes.      
    assessment: >
      Continue monitoring, but recovery work can prioritize availability.      

sections:
  - title: "Operational precautions"
    content:
      - type: bullets
        items:
          - "Avoid schema changes during diagnosis."
          - "Record exact timestamps for new latency spikes."
      - type: callout
        title: "Escalation condition"
        kind: critical
        text: "Escalate immediately if replication lag exceeds five minutes."

  - title: "Diagnostic procedure"
    content:
      - type: steps
        items:
          - "Capture application and database metrics."
          - "Correlate slow requests with query duration."
          - "Test a pool-size adjustment in staging."
      - type: subsection
        title: "Useful command"
        content:
          - type: code
            text: "systemctl status example-api"

actions_title: "Next-shift plan"
actions:
  - title: "Capture a diagnostic bundle"
    status: pending
    text: "Collect logs and metrics covering the next occurrence."
    commands:
      - "journalctl -u example-api --since '1 hour ago'"
  - title: "Validate mitigation in staging"
    status: pending
    text: "Load-test the proposed connection-pool configuration."

closing: >
  Service is operational with intermittent degradation. The next priority is
  to capture a complete occurrence and validate the pool adjustment in staging.  

Windows command example

Single quotes are convenient for Windows paths because backslashes remain literal:

actions:
  - title: "Repair Windows components"
    status: pending
    commands:
      - "DISM /Online /Cleanup-Image /RestoreHealth"
      - "sfc /scannow"
      - 'type C:\Windows\Logs\CBS\CBS.log'

See Writing reports for the field reference and Advanced setup for customization and automation.