/** * Slice 2 — `peaks solo [--fast] ` (peaks-solo fast mode). * * The `peaks-solo` SKILL orchestrates an LLM-side workflow: * load-memory -> standards-preflight -> rd-cycle -> qa-cycle -> emit-txt * * The CLI surface here is intentionally narrow: it builds a SoloPlan and * runs it via `runSoloFast`. Fast mode skips memory full-load, standards * preflight, and the QA repair loop. Round-trip KPI: ≤ 30s. * * No new service layer — the orchestrator is the in-file `runSoloFast` * function. Hooks are injected so tests can mock at the boundary. * * v2.11.0 Group F (Tier 9) — D5 / D7 additions: * - `peaks solo should-pause --step --mode ` (D5) * - `peaks solo post-compact-detect --project ` (D7) */ import type { Command } from 'commander'; import { type ProgramIO } from '../cli-helpers.js'; export type SoloStepKind = 'memory' | 'preflight' | 'rd' | 'qa' | 'emit'; export interface SoloStep { readonly id: 'load-memory' | 'standards-preflight' | 'rd-cycle' | 'qa-cycle' | 'emit-txt'; readonly kind: SoloStepKind; readonly skipped: boolean; /** QA-only: when true, qa hook retries on failure up to N rounds. */ readonly repairLoop?: boolean; } export interface SoloPlan { readonly sessionId: string; readonly steps: readonly SoloStep[]; } export interface SoloHooks { readonly memory: (ctx: { sessionId: string; }) => Promise; readonly preflight: (ctx: { sessionId: string; }) => Promise; readonly rd: (ctx: { sessionId: string; }) => Promise; readonly qa: (ctx: { sessionId: string; repairLoop: boolean; }) => Promise; readonly emit: (ctx: { sessionId: string; }) => Promise; } export interface SoloRunResult { readonly sessionId: string; readonly ok: boolean; readonly steps: readonly SoloStep[]; readonly skipped: readonly string[]; readonly elapsedMs: number; } /** * Build a SoloPlan. `fast=true` marks memory + preflight as skipped and * disables the QA repair loop. Step order is fixed; emit-txt always last. */ export declare function buildSoloPlan(opts: { sessionId: string; fast: boolean; }): SoloPlan; /** * Run the SoloPlan. Skipped steps do NOT invoke their hook; emit-txt is * always invoked last. Returns timing + skipped ids for KPI measurement. */ export declare function runSoloFast(opts: { sessionId: string; plan: SoloPlan; hooks: SoloHooks; }): Promise; /** * Register the `peaks solo [--fast] ` command. The actual * LLM-side orchestration is driven by the SKILL.md (LLM-side), so this * CLI command is a thin surface that builds the plan and emits a JSON * envelope for downstream tooling. */ export declare function registerSoloCommands(program: Command, io: ProgramIO): void;