Skip to main content

/devops-infra-scaffold

Generate CI/CD workflows, Dockerfiles, and deployment configs from tech.md — you can't ship what you can't deploy.


Overview

Generates production-ready infrastructure files from tech stack context: CI/CD pipelines (GitHub Actions / GitLab CI), multi-stage Dockerfiles, docker-compose for local development, environment configuration, and deployment platform configs. Supports Node.js/TypeScript, PHP, and Go stacks.


Usage

/devops-infra-scaffold
/devops-infra-scaffold [tech.md]
ArgumentRequiredDescription
tech.mdNoPath to tech stack definition
backend-scaffoldNoPath to backend scaffold output
frontend-scaffoldNoPath to frontend scaffold output
detect-devNoPath to detect-dev output for security scanning

When run without arguments, launches an interactive wizard.


What It Produces

Files at $JAAN_OUTPUTS_DIR/devops/infra-scaffold/{id}-{slug}/:

FileContent
{id}-{slug}.mdInfrastructure guide with architecture decisions
.github/workflows/ci.yml or .gitlab-ci.ymlCI/CD pipeline
ci/health-check.ymlHealth monitoring workflow (15-min cron, GitHub Actions only)
ci/secret-rotation-reminder.ymlQuarterly secret rotation reminder (GitHub Actions only)
ci/quality-pipeline.ymlQuality pipeline with Spectral lint, oasdiff breaking changes, mutation testing, and Schemathesis fuzz stages
Dockerfile + Dockerfile.frontendMulti-stage Docker builds
docker-compose.ymlLocal development stack
.env.exampleEnvironment variable template
config/next.config.standalone.tsNext.js standalone config (if Next.js detected)
deploy/Platform-specific deployment configs
{id}-{slug}-readme.mdSetup + deployment instructions

What It Asks

QuestionWhenWhy
CI/CD platformNot in tech.mdGitHub Actions / GitLab CI
Deployment targetNot in tech.mdVercel / Railway / Fly.io / AWS ECS
Docker strategyAlwaysSingle / multi-service / monorepo
Environment tiersAlwaysdev / staging / production

Multi-Stack Support

StackCI/CDDockerDeployment
Node.js / TypeScriptGitHub Actions / GitLab CIMulti-stage AlpineVercel / Railway / Fly.io
PHPGitLab CIphp-fpm + nginxAWS ECS / Railway
GoGitHub Actions / GitLab CIScratch / distrolessFly.io / AWS ECS

Workflow Chain

/dev-project-assemble + /sec-audit-remediate --> /devops-infra-scaffold

Example

Input:

/devops-infra-scaffold

Output:

jaan-to/outputs/devops/infra-scaffold/01-my-app-infra/
├── 01-my-app-infra.md
├── .github/workflows/ci.yml
├── Dockerfile
├── Dockerfile.frontend
├── docker-compose.yml
├── .env.example
├── deploy/
│ └── fly.toml
└── 01-my-app-infra-readme.md

CI Quality Pipeline Stages

When an OpenAPI contract is detected (from backend-api-contract output or project files), the generated CI pipeline includes four additional quality stages:

StageToolPurpose
Spectral LintSpectralValidates OpenAPI spec against style rules and best practices
Breaking ChangesoasdiffDetects breaking API changes between branches
Mutation TestingStrykerJS / Infection / go-mutestingVerifies test suite effectiveness via code mutation
Fuzz TestingSchemathesisProperty-based fuzz testing of API endpoints against the contract

These stages run in parallel after the standard build/test stages. Each stage is opt-in via ci_quality_stages in jaan-to/config/settings.yaml.


Tips

  • Set up $JAAN_CONTEXT_DIR/tech.md for automatic stack detection
  • Run after /dev-project-assemble to match the project structure
  • Include /detect-dev output for security scanning in CI
  • Review generated secrets and environment variables before deploying
  • Configure endpoint repository variables (API_URL, WEB_URL) after copying health-check workflow
  • Review secret rotation checklist against actual project secrets
  • Verify Next.js output: 'standalone' matches Dockerfile expectations


Technical Details

  • Logical Name: devops-infra-scaffold
  • Command: /devops-infra-scaffold
  • Role: devops
  • Output: $JAAN_OUTPUTS_DIR/devops/infra-scaffold/{id}-{slug}/