plano/cli
Spherrrical 5e8d27fd3c fix(skills): honor skills-only orchestrator decisions, dedupe runtime helpers, warn on dropped picks
Addresses the code-review findings on 7f5bf641:

- Honor skills-only decisions: RouteDecision.route_name is now Option<String> and the orchestrator emits a decision when routes is empty but skills is non-empty. The LLM handler falls back to the originally-requested model and still injects activated skill bodies, matching the contract in docs/source/resources/skills.rst.
- Warn on allow-list misses: resolve_for_route now returns a SkillResolution that splits drops into "not allow-listed for this route" vs "not in catalog (hallucinated)". brightstaff logs each bucket so misconfigured routing_preferences[].skills lists become visible instead of vanishing silently.
- Consolidate runtime: common::skills_runtime is now the single source of truth (referenced_skills_catalog, resolve_for_route, resolve_selected_skills, augment_system_prompt_with_skills). brightstaff drops its local re-implementations and calls into common.
- Tests: 11 new tests in common::skills_runtime (catalog union, allow-list intersection, dedup, hallucination handling, XML escaping, body size cap) and 6 new tests in brightstaff::handlers::llm::model_selection cover inject_activated_skills_into_request, including the first-system-message rule and the Parts->Text flatten — both now documented on the function.
- Cap skill body size at 32 KiB with a UTF-8-safe tail-trim + marker so an oversized SKILL.md cannot blow the downstream context window.
- XML-escape skill name and base_dir in the <skill_content> wrapper as defense-in-depth (names are validated upstream, but the wrapper sits inside the system prompt).
- Bound find_project_root at \$HOME plus a 30-parent depth cap so CLI invocations outside HOME no longer walk to /.
2026-05-18 12:39:21 -07:00
..
planoai fix(skills): honor skills-only orchestrator decisions, dedupe runtime helpers, warn on dropped picks 2026-05-18 12:39:21 -07:00
test feat(skills): add Agent Skills support with orchestrator-driven activation 2026-05-13 15:44:16 -07:00
build_cli.sh use uv instead of poetry (#663) 2025-12-26 11:21:42 -08:00
pyproject.toml Bump version to 0.4.22 (#917) 2026-04-24 16:43:19 -07:00
README.md sync CLI templates with demo configs via manifest + CI flow (#764) 2026-02-17 12:59:09 -08:00
uv.lock Bump version to 0.4.22 (#917) 2026-04-24 16:43:19 -07:00

plano CLI - Local Development

This guide will walk you through setting up the plano CLI for local development using uv.

Install uv

First, install the uv package manager. This is required for managing dependencies and running the development version of planoai.

On macOS and Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Setup

  1. Install dependencies

    In the cli directory, run:

    uv sync
    

    This will create a virtual environment in .venv and install all dependencies from pyproject.toml.

  2. Install the CLI tool globally (optional)

    To install planoai as a global tool on your system:

    uv tool install --editable .
    

    This installs planoai globally in editable mode, allowing you to run planoai commands from anywhere while still using the source code from this directory. Any changes you make to the code will be reflected immediately.

  3. Run plano commands

    Use uv run to execute plano commands with the development version:

    uv run planoai build
    

    Or, if you installed globally with uv tool install .:

    planoai build
    

    Note: uv run automatically uses the virtual environment - no activation needed.

Development Workflow

Build plano:

uv run planoai build

View logs:

uv run planoai logs --follow

Run other plano commands:

uv run planoai <command> [options]

CI: Keep CLI templates and demos in sync

The CLI templates in cli/planoai/templates/ are the source of truth for mapped demo config.yaml files.

Use the sync utility to write mapped demo configs from templates:

uv run python -m planoai.template_sync

Optional: Manual Virtual Environment Activation

While uv run handles the virtual environment automatically, you can activate it manually if needed:

source .venv/bin/activate
planoai build  # No need for 'uv run' when activated

Note: For end-user installation instructions, see the Plano documentation.