import chalk from "chalk";
import { printBanner, info } from "../shared/ui.js";

export async function addCommand(_opts: { force?: boolean } = {}): Promise<void> {
  printBanner(true);
  // Wave 7: the integrity-manifest preflight that previously gated `add` was
  // removed along with the integrity subsystem. The command is still a
  // placeholder advertising the community-pack roadmap; when the body is
  // wired up, drift gating should reuse `computeAdapterDrift` from
  // `status.ts` instead of the deleted `verifyIntegrity` helper.

  // C8-D1-M8 (D1-SA1.3.1, P1): `hatch3r add` is advertised in `--help` as a
  // community-pack installer that is not yet shipped. Exiting with code 2
  // (usage error per Bash/sysexits) misrepresents a valid invocation as user
  // misuse and trips CI pipelines that probe the subcommand. Return cleanly
  // (exit 0) with an informational notice plus a roadmap pointer — this
  // satisfies P1 actionable-error guidance (the user has an action: track
  // the repo's releases / discussions) without pretending the feature is
  // done.
  //
  // Sources re-verified 2026-04-20:
  //   - https://tldp.org/LDP/abs/html/exitcodes.html (exit 2 = Bash misuse)
  //   - https://man.freebsd.org/cgi/man.cgi?query=sysexits (EX_OK = 0)
  console.log();
  info("Community pack installation is coming in a future hatch3r release.");
  console.log(chalk.dim("  Track progress: https://github.com/hatch3r/hatch3r/releases"));
  console.log(chalk.dim("  Discuss packs:  https://github.com/hatch3r/hatch3r/discussions"));
  console.log();
}
