Skip to content

SLT.BETA.021 – Config wizard: emit CI workflows and rulesets #83

@flyingrobots

Description

@flyingrobots

[SLT.BETA.021] Config wizard: emit CI workflows and rulesets

Overview

Extend the configuration wizard to emit ready-to-use CI workflows and branch rulesets tailored to the selected hosting provider, reducing manual setup time and misconfiguration risk.

References & Assets

  • Figma / Design: N/A
  • Product Spec (Notion / Confluence): N/A
  • Related Issues / PRs: SLT.BETA.019, SLT.BETA.020
  • Feature Flags / Experiments: N/A
  • Other Assets: docs/hosting/matrix.md

User Story

As a DevOps engineer,
I want the config wizard to output CI/ruleset files automatically, so that Shiplog enforcement is consistent across hosts without manual copy/paste.

Acceptance Criteria

  • Wizard accepts flags to emit workflows and ruleset JSON for GitHub, GitLab, and Bitbucket
  • Dry-run mode shows output paths without writing files
  • Safe overwrite prompt guards existing files
  • Docs updated with usage guidance and examples
  • Tests verify generated files contain expected markers

Definition of Done

Wizard emits host-specific CI/ruleset scaffolding, documentation is updated, and tests cover emission and dry-run behavior.

Scope

In-Scope

  • CLI flag design and emission logic
  • Templates for GitHub, GitLab, Bitbucket
  • Documentation and tests

Out-of-Scope

  • Support for additional hosts beyond MVP list
  • Automated PR creation for emitted files

Deliverables

  • Est. Lines of Code: ~220
  • Est. Blast Radius: scripts/config, docs/hosting, tests

Implementation Details

High-Level Approach

Add emission flags to git shiplog config, maintain templates per host, and integrate with existing dry-run infrastructure while ensuring safe writes.

Affected Areas

  • scripts/config
  • docs/features/config.md
  • docs/hosting/*.md
  • tests/config_wizard.bats

Implementation Steps

  • Finalize CLI flag design
  • Implement template renderer with host-specific content
  • Add dry-run preview and overwrite guard
  • Update docs and README examples
  • Add tests for emission success and dry-run output

Test Plan

Happy Path

  • git shiplog config --emit-ci github writes GitHub workflow template
  • --emit-ruleset outputs JSON with namespace guidance

Edge Cases

  • Existing files trigger prompt and safe abort
  • Dry-run mode prints file contents without writes

Failure Cases

  • Unknown host results in clear error message

Monitoring & Success Metrics

  • Wizard reports emitted files and target host in summary

QA Sign-off Matrix

Environment Surface Owner Status Notes
Local Docker CLI TBD Pending Covered via make test

Requirements

Hard Requirements

  • Generated workflows/rulesets must match documented enforcement strategy per host

Soft Requirements

  • Templates are easily extensible for future hosts

Runtime Requirements

  • No additional runtime dependencies beyond existing CLI stack

Dependencies & Approvals

  • Docs review for hosting guidance
  • Security check for generated rulesets

Production Notes

Priority: 3 / 5

Improves onboarding for Beta; dependent on hosting guidance.

Complexity: 3 / 5

Requires template management and CLI UX updates.

Estimate: 18 - 24 hours

Includes templates, CLI plumbing, docs, and tests.

Risk & Rollback

  • Primary Risks: Generated files drift from docs; accidental overwrites
  • Mitigations: Template unit tests; safe overwrite prompts
  • Rollback / Kill Switch: Disable emission flags via feature gate

Additional Notes

Depends on SLT.ALPHA.023 changes landing in main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions