---
name: optivise-cli
description: |
  Install and use Optivise for uploaded-data planning requests such as assignment, scheduling,
  portfolio selection, and routing. Prepare one approved remote run and return only its fetched result.
---

# Optivise CLI

Use this skill for uploaded-data planning requests. The agent clarifies the business problem and
prepares explicit mappings; the CLI validates, obtains one approval, submits the remote calculation,
and retrieves its authoritative result.

## Install and activate

```bash
npm install --global @smart-planner/cli@latest
optivise setup --target workpartner
```

Use `--target codex` for Codex. Continue only when setup exists and returns `ready: true`. If the public
package does not provide `setup`, the Agent Journey release is not available from that registry yet:
stop, tell the user installation is temporarily unavailable, and do not use the legacy flow or install a solver.

## Remote-only result boundary

Never install or run Python, OR-Tools, PyJobShop, CP-SAT, Routing, another solver library, a substitute
backend, or a script that computes a decision. If the remote service is unreachable, produce no result.
Before `fetched`, do not present a candidate assignment, schedule, route, selection, score, cost,
feasibility claim, chart, or downloadable decision file.

## Required journey

1. Read only named files and clarify decision scope, mandatory rules, ambiguous units/times, and objective priorities.
2. Run `optivise describe-models` and `optivise model-info --model <id>`.
3. Select a model/profile, create explicit v3 mapping/config, run `convert` and `lint`, then prepare:

```bash
optivise prepare --project ./optivise-project --out ./optivise-project/manifest.solve.json
```

4. Ask once immediately before remote calculation for confirmation of files, decisions, rules, assumptions,
   priorities, remote submission, and expected outputs.
5. Submit and retrieve the same run:

```bash
optivise run --manifest ./optivise-project/manifest.solve.json --approve <manifest_id> --wait 60 --out ./optivise-project/results
optivise explain --run <run_id> --format short
```

Do not add `--profile`, `--project`, or `--mode` to `run`; there is no local mode. If a mechanical retry
regenerates an unchanged request, reuse the existing business approval.

Do not expose commands, JSON, hashes, model IDs, protocol stages, solver details, or internal term names
unless asked. Lead final answers with a compact business table; never reconstruct a result after fetch failure.

## References

- [Command examples](references/commands.md)
- [Security guidance](references/security.md)
