{"id":51975730,"url":"https://github.com/nudgebee/automation-templates","last_synced_at":"2026-07-30T05:01:10.142Z","repository":{"id":366539635,"uuid":"1276638779","full_name":"nudgebee/automation-templates","owner":"nudgebee","description":"System runbook templates synced into Nudgebee runbook-server (source of truth; bundled snapshot is the offline fallback).","archived":false,"fork":false,"pushed_at":"2026-06-22T08:16:03.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-22T10:15:48.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nudgebee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-22T06:51:44.000Z","updated_at":"2026-06-22T08:16:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nudgebee/automation-templates","commit_stats":null,"previous_names":["nudgebee/automation-templates"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nudgebee/automation-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudgebee%2Fautomation-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudgebee%2Fautomation-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudgebee%2Fautomation-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudgebee%2Fautomation-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nudgebee","download_url":"https://codeload.github.com/nudgebee/automation-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nudgebee%2Fautomation-templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36060987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-30T05:01:09.481Z","updated_at":"2026-07-30T05:01:10.137Z","avatar_url":"https://github.com/nudgebee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# automation-templates\n\nSystem runbook templates for [Nudgebee](https://nudgebee.com). Each file under\n`templates/` is one reusable workflow template (approval → remediate → verify, or a\nread-only diagnostic). Nudgebee's `runbook-server` periodically syncs this repo —\npinned to an immutable commit SHA — into the `workflow_templates` table, where\ntenants instantiate them.\n\nThis repo is the source of truth for **system** templates. A vendored snapshot is\nalso embedded in the runbook-server image as an offline/air-gapped fallback.\n\n## Layout\n\n```\ntemplates/\u003cslug\u003e.yaml          # one template per file; file name MUST equal `slug`\nmanifest.yaml                  # generated index [{slug, path, sha256}] — runbook-server verifies each file against this\nschema/template.schema.json    # JSON Schema; CI validates every template\nscripts/gen_manifest.py        # regenerate manifest.yaml (run before committing template changes)\nscripts/validate.py            # local equivalent of the CI validation (schema + workflow semantics)\n```\n\n## Validation layers\n\n`scripts/validate.py` (run in CI on every PR, including fork PRs — no secrets or\nbackend required) checks two things:\n\n1. **Structure** — the JSON Schema in `schema/template.schema.json`: required keys,\n   enums, `slug` == file name, no duplicate slugs.\n2. **Workflow semantics** — the same rules the engine enforces in\n   `runbook-server/internal/model/validation.go` and the task registry: every task\n   `type` is a real engine task type (an unknown/mistyped type is rejected at sync\n   time as `task not found`), `depends_on` resolves to an existing task, no\n   duplicate task ids, no dependency cycles, supported trigger types, and\n   well-formed durations. This is the offline equivalent of `nbctl workflow\n   validate` — it needs no backend, so it gates external contributions too.\n\nWhen the engine registers a new task type, add it to the `TASK_TYPES` set in\n`scripts/validate.py` (its source of truth is `runbook-server`'s task registry).\n\n## Authoring a template\n\n1. Add or edit `templates/\u003cslug\u003e.yaml`. The `slug` field must match the file name\n   and is the immutable key used to upsert/supersede the row — never rename it.\n2. Use block scalars for multi-line commands/messages; keep keys snake_case\n   (`input_ref`, `event_sources`, `depends_on`, …).\n3. Only reference task types the engine supports (e.g. `core.approval`,\n   `cloud.k8s.cli`, `cloud.aws.cli`, `tickets.create`). Unknown task types are\n   rejected at sync time.\n4. Regenerate the manifest and validate:\n   ```bash\n   pip install pyyaml jsonschema\n   python3 scripts/gen_manifest.py\n   python3 scripts/validate.py\n   ```\n5. Open a PR. CI re-runs validation and checks the manifest is current. Merges\n   require review (see `CODEOWNERS`).\n\n## How it's consumed\n\nrunbook-server resolves a configured ref to a commit SHA, downloads the tarball at\nthat SHA, verifies every file's sha256 against `manifest.yaml`, then upserts each\ntemplate idempotently (matched by `slug`). Syncing writes *definitions* only —\nexecution always requires a tenant user to instantiate a template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnudgebee%2Fautomation-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnudgebee%2Fautomation-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnudgebee%2Fautomation-templates/lists"}