Skip to content

feat(workspace): ship runbook init template and frontmatter schema #325

Description

@amelia751

Context

UC-6 (Runbooks) needs an init template so users can kiwifs init --template runbook to scaffold a runbook workspace. See UC-6 wiki page for full context.

What to implement

  1. Create .kiwi/templates/runbook/ directory under internal/workspace/templates/ with:

    • SCHEMA.md defining the runbook structure and frontmatter conventions
    • .kiwi/schemas/runbook.json validating required fields (trigger, severity, owner, services)
    • index.md — table of contents
    • example-high-cpu.md — example runbook following the 7-section format:
      1. Trigger / when to use
      2. Diagnosis (commands in fenced code blocks with expected output)
      3. Mitigation steps (ordered, idempotent)
      4. Verification (concrete success criteria)
      5. Rollback
      6. RTO and data loss expectations
      7. Escalation path
  2. Register the template in cmd/init.go so kiwifs init --template runbook works.

Relevant code

  • internal/workspace/templates/knowledge/ — existing template to follow as pattern
  • internal/workspace/templates/wiki/ — another template example
  • cmd/init.go — template registration

Acceptance criteria

  • kiwifs init --template runbook creates the scaffold
  • Example runbook has all 7 sections with fenced code blocks for commands
  • JSON Schema validates required frontmatter fields
  • kiwifs check passes on the generated scaffold

Difficulty: Beginner · Area: Markdown + Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions