# Model Autopilot — one step at a time. Agents read this file every turn when enabled.
# You change models in your IDE's model picker; the agent cannot switch for you.
#
# TO START: enterprise-skills autopilot on   (or: cost-autopilot on)
# TO STOP:  enterprise-skills autopilot off
# IDE MAP:  enterprise-skills autopilot ides --ide cursor

schema_version: "1.1.0"
enabled: true
mode: slice_build

# Active IDE (auto-detected at install time; override with --ide on autopilot commands)
# Supported: cursor | vscode | claude | windsurf | jetbrains | neovim | xcode | cli
ide: cursor

# Vendor-agnostic families. Each IDE maps these to its actual picker labels in
# @enterprise-skills/core src/ide-model-map.ts (run `enterprise-skills autopilot ides`
# to see the labels for your IDE).
model_labels:
  strategy: "general reasoning / policy — pick the IDE's strongest GPT/Gemini option"
  architecture: "design & review — pick the IDE's strongest Opus/Premium option"
  implementation: "multi-file code & tests — pick the IDE's strongest Sonnet/Codex option"
  fast: "polish & tiny edits only — Composer / Cascade / Auto / Haiku"

current_step_id: A1-design

steps:
  A1-design:
    required_model: architecture
    title: "Slice A — design tier adapter gate"
    agent_may: design_only
    next_step_id: A2-build
    handoff: |
      Implement Slice A from the design above only.
      - getAllowedAdapters(tier) from packaging/TIER_DEFINITIONS.yaml
      - Filter init/onboard/adapt targets; adapt uses loadSkillsByTier
      - license status shows allowed adapters
      - Tests for tier × disallowed --ide
      Run npm run build and workspace tests. Stop when green. List files changed.

  A2-build:
    required_model: implementation
    title: "Slice A — implement"
    agent_may: code_and_test
    next_step_id: A3-polish
    handoff: |
      Mechanical pass only for Slice A: help text, duplicate tests, small doc fixes.
      Do not change allowlist logic. Run tests after edits.

  A3-polish:
    required_model: fast
    title: "Slice A — polish"
    agent_may: mechanical_only
    next_step_id: A4-review
    handoff: |
      Review Slice A for tier bypass holes only. List critical issues; no large refactors.

  A4-review:
    required_model: architecture
    title: "Slice A — review"
    agent_may: review_only
    next_step_id: B1-build
    handoff: |
      Implement Slice B-lite: PROJECT_PROFILE rendered_adapters + primary_adapter,
      init --refresh (clean + render pinned adapters only). Tests required.

  B1-build:
    required_model: implementation
    title: "Slice B — pins + refresh"
    agent_may: code_and_test
    next_step_id: B2-polish
    handoff: |
      If b_include_doctor is true, design enterprise-skills doctor first (drift rules, output, fix commands).
      Otherwise skip to B1-build handoff from autopilot file.

  B2-polish:
    required_model: fast
    title: "Slice B — polish"
    agent_may: mechanical_only
    next_step_id: C1-policy
    handoff: |
      Slice C policy ONLY — no code. Output a decisions table:
      project-initiator on free? project-manager on free? adapter lists per tier.
      Exact TIER_DEFINITIONS.yaml edits + 3 sentences for customers.

  C1-policy:
    required_model: strategy
    title: "Slice C — tier policy"
    agent_may: policy_only
    next_step_id: C2-build
    handoff: |
      Implement Slice C from MODEL_AUTOPILOT step C1 decisions pasted below.
      Onboard uses same init target + tier filter as init. Do not reopen policy.

  C2-build:
    required_model: implementation
    title: "Slice C — implement parity"
    agent_may: code_and_test
    next_step_id: D1-contract
    handoff: |
      Slice D design ONLY: validate-key JSON example, license.json v2 fields,
      seat conflict CLI messages, telemetry fields. No implementation.

  D1-contract:
    required_model: architecture
    title: "Slice D — API contract"
    agent_may: design_only
    next_step_id: D2-build
    handoff: |
      Implement Slice D from the frozen contract pasted below. Do not change the contract.

  D2-build:
    required_model: implementation
    title: "Slice D — implement CLI"
    agent_may: code_and_test
    next_step_id: D3-security
    handoff: |
      Security review Slice D only: key logging, telemetry PII, seat bypass, offline grace.

  D3-security:
    required_model: opus
    title: "Slice D — security review"
    agent_may: review_only
    next_step_id: done
    handoff: |
      All slices complete. Set MODEL_AUTOPILOT enabled: false. Run full test suite and update VERSION_MANIFEST if needed.

# Optional: set true before B1 if you want doctor in scope (inserts B0-design in agent instructions)
b_include_doctor: false

customer_simple:
  current_step_id: daily-impl
  steps:
    daily-plan:
      required_model: strategy
      title: "Plan before a large change"
      next_step_id: daily-impl
      handoff: |
        Implement the plan above only. Match repo conventions. Run tests.

    daily-impl:
      required_model: implementation
      title: "Build and fix"
      next_step_id: daily-done
      handoff: |
        Quick review of the diff for bugs and missed tests only.

    daily-done:
      required_model: fast
      title: "Mechanical cleanup"
      next_step_id: daily-plan
      handoff: |
        Start next task with a short Opus plan, or stay on Sonnet for tiny edits.
