Skip to main content

agentstatedeveloper_cli/commands/
bootstrap.rs

1//! Paste-to-your-agent bootstrap (suite-onboarding t-006).
2//!
3//! Prints a block the user drops into whatever coding agent they're already in;
4//! the agent then installs, indexes, and connects ASD itself — and is pointed
5//! at CTXone for the team layer. The lowest-friction install path, rendered
6//! from ASD's single [`crate::commands::skill::asd_skill_spec`] via the shared
7//! engine.
8
9use anyhow::Result;
10use clap::Args;
11
12#[derive(Debug, Args)]
13pub struct BootstrapArgs {}
14
15pub fn run(_args: BootstrapArgs) -> Result<()> {
16    match crate::skillgen::render_bootstrap(&crate::commands::skill::asd_skill_spec()) {
17        Some(block) => print!("{block}"),
18        None => println!("No bootstrap steps are defined."),
19    }
20    Ok(())
21}
22
23#[cfg(test)]
24mod tests {
25    use crate::commands::skill::asd_skill_spec;
26
27    #[test]
28    fn asd_bootstrap_renders_real_steps() {
29        let block = crate::skillgen::render_bootstrap(&asd_skill_spec())
30            .expect("ASD declares bootstrap steps");
31        assert!(block.contains("asd index ."));
32        assert!(block.contains("asd mcp install"));
33        assert!(block.contains("CTXone"), "dual: points at the team layer");
34        // Every step the agent is told to run is a real command surface.
35        assert!(block.contains("brew install asd"));
36    }
37}