spec_driven_docs/commands/self_manifest.rs
1//! `self-manifest` subcommand: runtime-shape.
2//!
3//! Regenerates the canon's own manifest from its payload; refuses anywhere
4//! else. The generation lives in `services::self_manifest`.
5
6use crate::context::AppContext;
7use crate::error::AppError;
8use crate::output;
9use crate::services::self_manifest::regenerate;
10
11/// Regenerate the canon checkout's instance manifest.
12///
13/// # Errors
14///
15/// [`AppError::Refused`] outside the canon checkout; I/O errors otherwise.
16pub fn run(ctx: &AppContext) -> Result<(), AppError> {
17 output::line(regenerate(&ctx.cwd)?);
18 Ok(())
19}