/** * * THE DEFECT. A job's slice list was decided once, at * `peaks job init --slice-list `, and no subcommand could add to it. The * subcommand set was `init / status / rotate-now / subagent-cleanup / checkpoint / * block / continue / resume / progress / handoff / karpathy-cost-check`. Measured * against the committed build on 2026-10-03: * * peaks job add-slice … → error: unknown command 'add-slice' * peaks job checkpoint --slice-id → ok:false code:SLICE_NOT_FOUND * * so a wave that plans its next slice only after the previous one lands — which is * how every split wave here runs — had no truthful way to record what it did. It * either under-reported or opened a new job per slice, and the ledger then recorded * the tooling's limitation instead of the work. * * WHY THIS IS ITS OWN FILE. `src/cli/commands/job-commands.ts` sits over the * 300-line cap the gate already ratchets (828 raw lines, and the repository's * `fileSizeExcessLines` row is held at its ceiling in both directions), so this * slice could not add a subcommand there without moving a gate number — the frozen * work. The command mounts onto the existing `job` parent from here, the way * `api-diff-commands.ts` mounts `peaks scan api-diff`, and reuses the parent * file's session/state resolution rather than re-implementing it. NOTHING about * the `job` command's stored shape changed: same state file, same `slice-NNN` ids, * same `progress.json` mirror, same envelope, no new ledger field. * * WHAT IT PROMISES, and each half is load-bearing: * - **idempotent** — a label already registered on this job is reported as the * slice it already is (`added: false`) and `state.json` is not written. * Re-running the command cannot grow the job. * - **honest** — an empty or whitespace-only label is refused * (`INVALID_SLICE_LABEL`) rather than appended; the mirror is rewritten only when * a slice was actually added, and only if a mirror already exists (a command that * knows nothing about progress does not invent one). * - **followed by the rest of the ledger** — every `total` is `slices.length`, so * `status`, `progress`, `continue` and the mirror move together, and `checkpoint` * takes the new slice by name through the existing D7 label resolution. */ import type { Command } from 'commander'; import { type ProgramIO } from '../cli-helpers.js'; export declare function registerJobAddSliceCommand(program: Command, io: ProgramIO): void;