feat(cli): init stops scaffolding omnigraph.yaml; cluster init replaces it (RFC-008 stage 3)

omnigraph init no longer writes a legacy config into cwd (the source of
the earlier test-pollution bug, and a scaffold for a deprecated file);
the scaffolder is deleted. omnigraph cluster init scaffolds the
replacement: a minimal valid cluster.yaml (version: 1, optional
metadata.name / storage:, a commented graphs example), refusing to
overwrite. The scaffold validates clean via cluster validate in the e2e.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
aaltshuler 2026-06-11 23:34:04 +03:00
parent cd1f175396
commit 5ba9656666
5 changed files with 103 additions and 65 deletions

View file

@ -345,6 +345,23 @@ pub(crate) enum Command {
#[derive(Debug, Subcommand)]
pub(crate) enum ClusterCommand {
/// Scaffold a minimal cluster.yaml in the config directory (refuses
/// if one exists). The cluster checkout replaces the legacy
/// omnigraph.yaml scaffold (RFC-008 stage 3).
Init {
/// Directory to scaffold into (default: .)
#[arg(long, default_value = ".")]
config: PathBuf,
/// Optional deployment label (metadata.name)
#[arg(long)]
name: Option<String>,
/// Optional storage root URI (s3://bucket/prefix); omit for the
/// config-dir layout
#[arg(long)]
storage: Option<String>,
#[arg(long)]
json: bool,
},
/// Validate cluster.yaml and referenced schemas, queries, and policy files.
Validate {
/// Cluster config directory containing cluster.yaml.