Skip to content
Back to articles
DevOps14分

Designing Golden Paths: Backstage Templates, Cookiecutter, Nx Plugins for Opinionated Scaffolding

柴田 美月Staff Developer Experience Engineer
2026-04-2114分
Golden PathScaffoldingBackstageCookiecutterNxDevOps

Golden Paths Are the Most Powerful Lever for Encoding Culture

A few years after "Golden Path" became standard terminology in the Platform Engineering community, we have reached a point in 2026 where an organization's engineering culture is essentially legible from the templates it provides. The concept, first articulated by Spotify, uses the metaphor of a "paved road" — follow it and you reach your destination without getting lost. The goal is to eliminate the fatigue of technology choice and reduce decision-making overhead so developers can focus on the problems that actually matter.

What makes a Golden Path categorically different from a conventional template is that it carries strong opinions. The language, the testing framework, the CI pipeline, the observability stack, the secret management approach — all of it is provided in the form that the organization has committed to. This is not mere boilerplate elimination. It is the platform team's operating environment, presented as a product, front-end first.

Backstage Software Templates: The Power of Parameters and Actions

Backstage Software Templates are provided by the Scaffolder plugin. You describe a sequence of parameters and actions in a `template.yaml` file. Parameters are defined with JSON Schema and the UI is generated automatically. Actions are composed from pre-built steps — `fetch:template`, `publish:github`, `catalog:register`, `github:actions:dispatch` — and can be extended with custom Actions written in TypeScript.

A minimal template looks like this:

```yaml apiVersion: scaffolder.backstage.io/v1beta3 kind: Template metadata: name: nodejs-microservice title: Node.js Microservice (Golden Path) spec: owner: platform-team type: service parameters: - title: Service Info properties: name: { type: string, pattern: "^[a-z][a-z0-9-]+$" } owner: { type: string, ui:field: OwnerPicker } tier: { type: string, enum: [tier1, tier2, tier3] } steps: - id: fetch action: fetch:template input: url: ./skeleton values: { name: ${{ parameters.name }} } - id: publish action: publish:github input: repoUrl: github.com?owner=acme&repo=${{ parameters.name }} - id: provision-secrets action: vault:provision input: path: services/${{ parameters.name }} - id: register action: catalog:register input: repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} ```

Building out a library of templates in this pattern is the standard approach, but in practice the debate over what to standardize consumes roughly 70% of the effort. The technical writing takes about 30 minutes to learn.

Cookiecutter: Lightweight and Highly Portable

For organizations that haven't adopted Backstage, or for use cases that need to work outside an IDP, Cookiecutter is the go-to choice. It's a Python tool that processes Jinja2 templates and has been around since 2013. In 2026 it remains very much alive, especially for seeding GitHub organization templates or being invoked via CI.

Cookiecutter's strengths are its simplicity — any GitHub repository becomes a template — and the clarity of its `cookiecutter.json` input prompts. Pre- and post-generation hooks (`hooks/pre_gen_project.py`, `hooks/post_gen_project.py`) let you enforce strict rules: always run `git init` and configure pre-commit after generation, or abort if the service name matches a blocklist.

Cookiecutter alone, however, cannot handle the post-generation steps of a full Golden Path — creating the GitHub repository, registering secrets, registering in a catalog. Those require the equivalent of Backstage Actions to be built separately. In practice: if Backstage already exists, integrate with it; if not, use Cookiecutter as a bridge until it does.

Nx Plugins: Golden Paths for the Monorepo Era

In organizations where monorepo culture has taken hold, Nx is a compelling choice. Nx Plugin generators — invoked as `nx g @acme/workspace:microservice my-service` — add new modules to an existing monorepo rather than scaffolding standalone repositories, which creates a different set of properties: shared libraries and build/CI configuration are reusable by default; tasks, tags, and dependencies are typed in `project.json`; and `nx affected` ensures only impacted projects are built and tested.

The scaffolding code for an Nx Plugin generator is TypeScript using the `@nx/devkit` `Tree` API for file generation and workspace updates. This is more programmable than Backstage Templates — conditional logic and dynamic generation come naturally — but the value diminishes in organizations not already committed to a monorepo.

CI Integration: Templates That Are Born with CI

Half of a Golden Path's value lives in CI integration. The standard configurations in 2026 are GitHub Actions reusable workflows, GitLab CI includes, CircleCI orbs, or Tekton Pipelines ClusterTasks. What all of them have in common is hiding CI implementation details from template consumers.

The goal is for the `.github/workflows/ci.yml` generated by the template to be just a few lines:

```yaml name: CI on: [push, pull_request] jobs: build: uses: acme/workflows/.github/workflows/nodejs-tier1.yml@v2 with: service_name: ${{ github.event.repository.name }} secrets: inherit ```

The actual `nodejs-tier1.yml` packages everything: lint, type check, unit tests, SAST (Semgrep or CodeQL), SBOM generation (Syft), container image build, Cosign signing, SLSA provenance generation, and ArgoCD manifest update PR creation. The consumer doesn't need to know any of this.

Secret Auto-Provisioning: Zero-Touch Is the Only Acceptable Answer

The most common way for a Golden Path to become a hollow formality is manual secret setup. If the template can create the repository but DATABASE_URL and AWS credentials still require a human to file a ticket, the scaffolding benefit disappears into process friction.

The recommended 2026 approach is HashiCorp Vault or AWS Secrets Manager combined with the Kubernetes External Secrets Operator. A Backstage Action creates a dedicated Vault path (`kv/services/${name}`) and attaches a policy; the GitHub Actions side authenticates to Vault via OIDC. The database is provisioned by Crossplane or Terraform Cloud as IaC, and the connection string lands in Vault automatically. The developer just references `vault:kv/services/my-service` in their Kubernetes manifests.

Embedding Opinions: Calibrating Enforcement vs. Choice

What determines whether a Golden Path succeeds is not technology — it is where you draw the line between "this is required" and "this is your call." Items appropriate to enforce are those where inconsistency breaks operations: security requirements (SAST, SBOM, signing), log format, metrics export method, health check endpoints. Items to leave to team discretion are those in the product domain: database schema, API design, domain-specific library choices.

In practice, a "recommended plus exception request" structure works well. Tier 1 services require Platform Review Board approval for any technology choices outside the template; Tier 2 requires notification only; Tier 3 is unrestricted. Making deviations visible through a Scorecard surfaces non-compliance naturally.

Contract Design: Bridging Product Managers and Engineers

A Golden Path cannot be built by a platform team in isolation. It requires a Contract Design process involving both product managers and engineers. The specific items that should be agreed on: the SLOs guaranteed by the template (build time, time to first deployment), the deprecation window for template changes, the notification process for breaking changes, support channels and response SLAs, KPIs for tracking adoption (adoption rate, satisfaction, pain points), and the criteria for retiring a template.

Documenting these as a "Platform Product Spec" and reviewing it quarterly is the established best practice in 2026.

A Golden Path is not a one-time artifact. Language version updates, vulnerability patches, and new organizational policies keep it continuously evolving. Whether a platform team internalize this — whether they treat the Golden Path as a living product — is what determines the maturity of a Platform Engineering implementation.

Let's solve your technical challenges together.

KGA IT Solutions delivers AI, cloud, and DevOps expertise to address your specific challenges.

Contact Us