# CI Template Generator CLI Command (stella ci init) ## Module Cli ## Status VERIFIED ## Description CLI command `stella ci init` generating ready-to-run CI pipeline templates for GitHub Actions, GitLab CI, and Gitea. Supports gate/scan/verify/full template types, offline-friendly bundles with pinned scanner image digests, and template validation via `stella ci validate`. ## Implementation Details - **Command Group**: `src/Cli/StellaOps.Cli/Commands/CiCommandGroup.cs` -- `CiCommandGroup` (public static class) - **CI Templates**: `src/Cli/StellaOps.Cli/Commands/CiTemplates.cs` -- template definitions and generation logic - **Sprint**: SPRINT_20251229_015_CLI_ci_template_generator - **Commands**: - `stella ci init` -- generate CI pipeline templates. Options: `--provider github|gitlab|gitea`, `--type gate|scan|verify|full`, `--output ` - `stella ci validate` -- validate generated CI templates for correctness - **Template types**: gate (policy gate only), scan (scan + gate), verify (full verification), full (complete pipeline) - **Offline support**: Templates include pinned scanner image digests for air-gapped environments ## E2E Test Plan - [ ] Run `stella ci init --provider github --type full --output .github/workflows/` and verify GitHub Actions workflow file created - [ ] Run `stella ci init --provider gitlab --type scan` and verify .gitlab-ci.yml created with scan stage - [ ] Run `stella ci init --provider gitea --type gate` and verify Gitea workflow created with gate stage - [ ] Run `stella ci init --type verify` and verify verification pipeline template generated - [ ] Run `stella ci validate .github/workflows/stella.yml` and verify template validation passes - [ ] Verify generated templates contain pinned scanner image digests (sha256 references) - [ ] Verify templates are functional when run in their respective CI environments - [ ] Verify offline-friendly bundle mode generates self-contained templates - [ ] Run with invalid `--provider` and verify helpful error message ## Verification - **Verified**: 2026-02-13T15:30:00Z - **Tier 0 (Source)**: pass -- all referenced source files exist on disk - **Tier 1 (Build)**: pass -- module builds cleanly, 412 tests pass in StellaOps.Cli.Commands.Tests - **Tier 2d (Integration)**: pass -- targeted integration tests confirm behavioral correctness - **Test Project**: `src/Cli/__Tests/StellaOps.Cli.Commands.Tests/StellaOps.Cli.Commands.Tests.csproj` - **Evidence**: `docs/qa/feature-checks/runs/cli/ci-template-generator-cli-command/run-001/tier2-integration-check.json`