/**
 * CLEO exit codes — canonical definitions shared across all layers.
 *
 * Ranges: 0 = success, 1-99 = errors, 100+ = special (non-error) states.
 *
 * @epic T4454
 * @task T4456
 * @task T5710
 */
export declare enum ExitCode {
    SUCCESS = 0,
    GENERAL_ERROR = 1,
    INVALID_INPUT = 2,
    FILE_ERROR = 3,
    NOT_FOUND = 4,
    DEPENDENCY_ERROR = 5,
    VALIDATION_ERROR = 6,
    LOCK_TIMEOUT = 7,
    CONFIG_ERROR = 8,
    PARENT_NOT_FOUND = 10,
    DEPTH_EXCEEDED = 11,
    SIBLING_LIMIT = 12,
    INVALID_PARENT_TYPE = 13,
    CIRCULAR_REFERENCE = 14,
    ORPHAN_DETECTED = 15,
    HAS_CHILDREN = 16,
    TASK_COMPLETED = 17,
    CASCADE_FAILED = 18,
    HAS_DEPENDENTS = 19,
    CHECKSUM_MISMATCH = 20,
    CONCURRENT_MODIFICATION = 21,
    ID_COLLISION = 22,
    SESSION_EXISTS = 30,
    SESSION_NOT_FOUND = 31,
    SCOPE_CONFLICT = 32,
    SCOPE_INVALID = 33,
    TASK_NOT_IN_SCOPE = 34,
    TASK_CLAIMED = 35,
    SESSION_REQUIRED = 36,
    SESSION_CLOSE_BLOCKED = 37,
    ACTIVE_TASK_REQUIRED = 38,
    NOTES_REQUIRED = 39,
    VERIFICATION_INIT_FAILED = 40,
    GATE_UPDATE_FAILED = 41,
    INVALID_GATE = 42,
    INVALID_AGENT = 43,
    MAX_ROUNDS_EXCEEDED = 44,
    GATE_DEPENDENCY = 45,
    VERIFICATION_LOCKED = 46,
    ROUND_MISMATCH = 47,
    /**
     * E_AC_LOCKED — Acceptance criteria are locked because the task has
     * advanced into (or past) the implementation pipeline stage.
     *
     * Reframing AC after work has begun is an anti-pattern (the
     * "T-THIN-WRAPPER feature-complete" failure mode where AC was
     * silently rewritten to match what shipped). To override the lock,
     * the operator MUST supply an explicit `--reason "<text>"` which is
     * appended to `.cleo/audit/ac-changes.jsonl`.
     *
     * Locked stages: implementation, validation, testing, release, contribution.
     *
     * @epic T1586 Foundation Lockdown
     * @task T1590 AC-immutability guard
     */
    AC_LOCKED = 48,
    /**
     * E_EPIC_HAS_PENDING_CHILDREN — `cleo complete <epicId>` was called while
     * the epic still has one or more children in `pending` or `active` status.
     *
     * Prevents the T1467+T1603 premature-close bug class: epics may not be
     * marked done while children remain in-flight. Pass `--override-reason`
     * to bypass (audited to `.cleo/audit/premature-close.jsonl`).
     *
     * @epic T1627
     * @task T1632
     */
    EPIC_HAS_PENDING_CHILDREN = 49,
    CONTEXT_WARNING = 50,
    CONTEXT_CAUTION = 51,
    CONTEXT_CRITICAL = 52,
    CONTEXT_EMERGENCY = 53,
    CONTEXT_STALE = 54,
    PROTOCOL_MISSING = 60,
    INVALID_RETURN_MESSAGE = 61,
    MANIFEST_ENTRY_MISSING = 62,
    SPAWN_VALIDATION_FAILED = 63,
    AUTONOMOUS_BOUNDARY = 64,
    HANDOFF_REQUIRED = 65,
    RESUME_FAILED = 66,
    CONCURRENT_SESSION = 67,
    /**
     * E_THIN_AGENT_VIOLATION — A worker or lead agent attempted to spawn another
     * agent, violating the thin-agent inversion-of-control rule (ORC-012).
     * Only orchestrators may spawn subagents; non-orchestrator roles must
     * escalate via the playbook approval gate.
     *
     * @task T889 Orchestration Coherence v3
     * @task T907 Thin-agent enforcement
     */
    THIN_AGENT_VIOLATION = 68,
    /**
     * E_ATOMICITY_VIOLATION — A worker-role spawn was attempted for a task that
     * exceeds the atomicity budget (more than {@link MAX_WORKER_FILES} files) or
     * lacks an explicit file-scope declaration on its acceptance criteria.
     *
     * Workers MUST remain atomic (≤ 3 files with declared AC.files). Violations
     * should be split into child tasks or promoted to a lead role.
     *
     * @task T889 Orchestration Coherence v3
     * @task T894 Atomicity guard (W3-3)
     */
    ATOMICITY_VIOLATION = 69,
    NEXUS_NOT_INITIALIZED = 70,
    NEXUS_PROJECT_NOT_FOUND = 71,
    NEXUS_PERMISSION_DENIED = 72,
    NEXUS_INVALID_SYNTAX = 73,
    NEXUS_SYNC_FAILED = 74,
    NEXUS_REGISTRY_CORRUPT = 75,
    NEXUS_PROJECT_EXISTS = 76,
    NEXUS_QUERY_FAILED = 77,
    NEXUS_GRAPH_ERROR = 78,
    NEXUS_IMPACT_CRITICAL = 79,
    LIFECYCLE_GATE_FAILED = 80,
    AUDIT_MISSING = 81,
    CIRCULAR_VALIDATION = 82,
    LIFECYCLE_TRANSITION_INVALID = 83,
    PROVENANCE_REQUIRED = 84,
    ARTIFACT_TYPE_UNKNOWN = 85,
    ARTIFACT_VALIDATION_FAILED = 86,
    ARTIFACT_BUILD_FAILED = 87,
    ARTIFACT_PUBLISH_FAILED = 88,
    ARTIFACT_ROLLBACK_FAILED = 89,
    PROVENANCE_CONFIG_INVALID = 90,
    SIGNING_KEY_MISSING = 91,
    SIGNATURE_INVALID = 92,
    DIGEST_MISMATCH = 93,
    ATTESTATION_INVALID = 94,
    ADAPTER_NOT_FOUND = 95,
    ADAPTER_INIT_FAILED = 96,
    ADAPTER_HOOK_FAILED = 97,
    ADAPTER_SPAWN_FAILED = 98,
    ADAPTER_INSTALL_FAILED = 99,
    NO_DATA = 100,
    ALREADY_EXISTS = 101,
    NO_CHANGE = 102,
    TESTS_SKIPPED = 103,
    /**
     * E_DUPLICATE_TASK_LIKELY — `cleo add` was rejected because the new task's
     * title and description are semantically very similar (score >= 0.92) to one
     * or more active tasks detected by BRAIN-powered duplicate detection.
     *
     * Pass `--force-duplicate` to bypass; the bypass is audited to
     * `.cleo/audit/duplicate-bypass.jsonl` (ADR-051 pattern).
     *
     * @epic T1627
     * @task T1633
     */
    DUPLICATE_TASK_LIKELY = 105,
    /**
     * E_LAFS_VIOLATION — CLI output did not conform to the LAFS envelope
     * schema. Emitted by the CLI renderer middleware when `zod.parse()` on
     * the emitted envelope fails. This is an INTERNAL failure: CLEO itself
     * produced a malformed envelope.
     *
     * @task Phase 6 — LAFS formalization + schema consolidation
     */
    LAFS_VIOLATION = 104,
    /**
     * E_DECISION_VALIDATOR_FAILED — An ADR-typed decision write was rejected
     * by the LLM conflict-validator hook because the overall confidence score
     * fell below the configured threshold (`decisions.validatorConfidenceThreshold`,
     * default 0.7).
     *
     * The validator checks for collision, contradiction, and supersession-graph
     * integrity before allowing the write to proceed.  Callers should inspect
     * the error message for the specific violation details and either:
     *   (a) revise the decision / rationale to resolve conflicts, or
     *   (b) explicitly supersede the conflicting entry via `supersedes:` param.
     *
     * @task T1828
     */
    DECISION_VALIDATOR_FAILED = 106,
    /**
     * Lead session attempted to end without delegating any work — `delegate_task_count=0`
     * with `tasks_completed > 0`. Leads MUST fan out to Workers (T9230 / ADR-070).
     * @codeName E_LEAD_BYPASS_DETECTED
     * @task T9230
     */
    LEAD_BYPASS_DETECTED = 107,
    /**
     * `cleo complete <tid>` was rejected because one or more acceptance criteria
     * on the task have no `evidence_ac_bindings` rows pointing at them. The
     * coverage gate is the load-bearing IVTR closure piece — every AC the task
     * declared MUST be backed by a `direct`, `satisfies`, or `coverage` binding
     * before completion is allowed.
     *
     * `error.details.unsatisfied` carries the list of offending ACs (each row
     * has `acId`, `alias` (`AC<n>`), and `text`). Recovery options:
     *   1. Add programmatic evidence that resolves the AC via `cleo verify` so
     *      a binding row is written.
     *   2. Pass `--waive-ac "<csv>" --waive-reason "<text>"` on `cleo complete`
     *      to record an audited waiver (`.cleo/audit/ac-waiver.jsonl`).
     *   3. Set `CLEO_OWNER_OVERRIDE=1` + `CLEO_OWNER_OVERRIDE_REASON=<text>` for
     *      a full bypass (logged to `.cleo/audit/force-bypass.jsonl`).
     *
     * @codeName E_AC_COVERAGE_INCOMPLETE
     * @task T10509
     * @saga T10377 (SG-IVTR-AC-BINDING)
     * @adr ADR-079-r4
     */
    AC_COVERAGE_INCOMPLETE = 108,
    /**
     * E_CANCELLED_CHILD_NO_WAIVER — `cleo complete <parentId>` was rejected
     * because the parent has one or more `cancelled` children that have NOT been
     * waived or replaced. A cancelled child represents work that was NOT done;
     * silently treating it as satisfied lets a parent complete as if cancelled
     * work had shipped (PM-Core V2 design-point 4 — agent-trust completion).
     *
     * `error.details.cancelledChildIds` lists the offending children. Recovery:
     *   1. Record an audited waiver for the cancelled children via
     *      `cleo complete <parentId> --waive-cancelled-children "<reason>"`
     *      (logged to `.cleo/audit/cancelled-child-waiver.jsonl`).
     *   2. Re-open and finish the work (the child stops being cancelled).
     *   3. Replace the cancelled work with a new done child and waive the
     *      original, citing the replacement task id in the reason.
     *
     * @codeName E_CANCELLED_CHILD_NO_WAIVER
     * @saga T10538 (PM-Core V2 agent-trust)
     */
    CANCELLED_CHILD_NO_WAIVER = 109
}
/** Dirty version files block `cleo release plan` (R-020). Exit code 13. */
export declare const E_DIRTY_TREE: "E_DIRTY_TREE";
/** Epic referenced by `--epic` has zero children (R-021). Exit code 4. */
export declare const E_EPIC_EMPTY: "E_EPIC_EMPTY";
/** Epic referenced by `--epic` does not exist (R-021). Exit code 10. */
export declare const E_EPIC_NOT_FOUND: "E_EPIC_NOT_FOUND";
/**
 * Leaf-Epic-as-Task ship (`--epic <id>` where the Epic has zero non-cancelled
 * child tasks) was attempted but the Epic itself carries zero ADR-051 evidence
 * atoms. Per ADR-073 the leaf-Epic-as-PR pattern is canonical for atomic ships,
 * but the Epic still needs evidence (commit:sha, files, pr:<num>, etc.) to
 * be promoted into a release. Exit code 83. `error.details.epicId` reports
 * the offending Epic. `error.details.fix` points at `cleo verify`.
 *
 * @task T9838
 */
export declare const E_EPIC_EMPTY_LEAF_NO_EVIDENCE: "E_EPIC_EMPTY_LEAF_NO_EVIDENCE";
/** Channel + version scheme are incompatible (R-022). Exit code 6. */
export declare const E_CHANNEL_MISMATCH: "E_CHANNEL_MISMATCH";
/**
 * One or more tasks in the plan are missing required ADR-051 evidence atoms
 * (R-301 / R-310). Exit code 83. `error.details.tasks[]` lists offenders.
 */
export declare const E_EVIDENCE_INSUFFICIENT: "E_EVIDENCE_INSUFFICIENT";
/** Plan file at `.cleo/release/<version>.plan.json` is absent. Exit code 4. */
export declare const E_PLAN_NOT_FOUND: "E_PLAN_NOT_FOUND";
/** Generic release-plan validation failure (e.g. schema). Exit code 6. */
export declare const E_RELEASE_PLAN_INVALID: "E_RELEASE_PLAN_INVALID";
/**
 * `cleo release plan` (or the lint script) encountered a `.changeset/*.md`
 * file whose YAML frontmatter cannot be parsed. Exit code 6 (VALIDATION_ERROR).
 *
 * Replaces the pre-T10105 silent-skip that caused the v2026.5.100 ship to
 * lose v5.100/v5.101/v5.103 CHANGELOG entries when a single changeset had
 * an unquoted colon in `summary:`.
 *
 * @task T10105
 * @epic E-RELEASE-PLAN-CHANGELOG
 * @saga T10099
 */
export declare const E_CHANGESET_YAML_INVALID: "E_CHANGESET_YAML_INVALID";
/**
 * Release row exists but is not in the status FSM state required by the
 * caller (R-051 — `cleo release open` requires status='planned'). Exit code 6.
 * `error.details.currentStatus` MUST report the actual status; `error.details.expectedStatus`
 * SHOULD list the accepted state(s).
 *
 * @task T9530
 */
export declare const E_INVALID_STATE: "E_INVALID_STATE";
/**
 * `gh auth status` exited non-zero (R-052). The GitHub CLI is either not
 * installed or not authenticated for the active hostname. Exit code 5.
 *
 * @task T9530
 */
export declare const E_GH_NOT_AUTHENTICATED: "E_GH_NOT_AUTHENTICATED";
/**
 * The expected GitHub Actions workflow file is missing under `.github/workflows/`
 * (R-053). Without it, `gh workflow run` would fail with a non-recoverable error.
 * Exit code 4.
 *
 * @task T9530
 */
export declare const E_WORKFLOW_NOT_FOUND: "E_WORKFLOW_NOT_FOUND";
/**
 * E_WRITE_CONTENTION — Persistent SQLITE_BUSY after exhausting application-level
 * retry. Emitted by {@link withWriteRetry} (in `@cleocode/core`'s
 * `store/with-retry.ts`) when a SQLite write transaction fails 4 consecutive
 * attempts with `SQLITE_BUSY: database is locked` despite the engine-level
 * `busy_timeout=30000ms` pragma.
 *
 * **Recovery**: retry the operation after a brief delay (the contended writer
 * usually commits within 1-2 seconds). If the error reoccurs reliably, suspect
 * a long-running writer holding a RESERVED lock — inspect with
 * `sqlite3 .cleo/tasks.db "PRAGMA wal_checkpoint(FULL); SELECT * FROM sqlite_lock;"`.
 *
 * Maps to {@link ExitCode.LOCK_TIMEOUT} (7) at the CLI boundary.
 *
 * @bug gh-391 — parallel `cleo update --add-labels` losing ~50% of writes.
 * @task T9839
 */
export declare const E_WRITE_CONTENTION: "E_WRITE_CONTENTION";
/**
 * E_INVALID_SEVERITY_VALUE — `--severity` was passed a value that is not one
 * of the canonical {@link TASK_SEVERITIES} members (`P0|P1|P2|P3`).
 *
 * Returned by the `cleo add` and `cleo update` CLI commands at the dispatch
 * boundary BEFORE the request reaches the database. Replaces the previous
 * late-stage failure mode where SQLite surfaced a cryptic
 * `CHECK constraint failed: severity` error after the write attempt.
 *
 * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
 *
 * @task T10341
 * @epic T10327
 * @saga T10326
 */
export declare const E_INVALID_SEVERITY_VALUE: "E_INVALID_SEVERITY_VALUE";
/**
 * E_INVALID_PIPELINE_STAGE — `--pipeline-stage` was passed a value that
 * either (a) is not a recognised stage name in the canonical RCASD-IVTR+C
 * pipeline (`research|consensus|architecture_decision|specification|`
 * `decomposition|implementation|validation|testing|release|contribution|`
 * `cancelled`), or (b) would move the task BACKWARD relative to its
 * current stage. Pipeline stages are forward-only.
 *
 * Returned by the `cleo update` CLI command at the dispatch boundary BEFORE
 * the request reaches the database. Replaces the previous late-stage
 * failure mode where SQLite surfaced a cryptic
 * `CHECK constraint failed: pipeline_stage` error or the core engine threw
 * an opaque {@link CleoError} after a partial round-trip.
 *
 * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
 *
 * @task T10341
 * @epic T10327
 * @saga T10326
 */
export declare const E_INVALID_PIPELINE_STAGE: "E_INVALID_PIPELINE_STAGE";
/**
 * E_AC_COVERAGE_INCOMPLETE — `cleo complete <tid>` was rejected because at
 * least one acceptance criterion on the task has no `evidence_ac_bindings`
 * row. The coverage gate is the load-bearing IVTR closure piece — every AC
 * the task declared MUST be backed by a binding (`direct`, `satisfies`, or
 * `coverage`) before completion is allowed.
 *
 * `error.details.unsatisfied` carries the offending ACs (each entry has
 * `acId`, `alias`, and `text`). Recovery options live on the {@link ExitCode.AC_COVERAGE_INCOMPLETE}
 * JSDoc.
 *
 * Maps to {@link ExitCode.AC_COVERAGE_INCOMPLETE} (108) at the CLI boundary.
 *
 * @task T10509
 * @saga T10377 (SG-IVTR-AC-BINDING)
 * @adr ADR-079-r4
 */
export declare const E_AC_COVERAGE_INCOMPLETE: "E_AC_COVERAGE_INCOMPLETE";
/**
 * E_CWD_WALKUP_FORBIDDEN — `getCleoDirAbsolute(cwd)` was called while
 * `CLEO_PATHS_STRICT=1` is set. The caller MUST migrate to
 * `resolveProjectByCwd(cwd)` + `resolveCanonicalCleoDir(projectId)`
 * instead of relying on CWD-walk-up path resolution.
 *
 * This is the enforcement mechanism for the T10297 migration — once all
 * callers are migrated, the strict gate will be made the default and
 * `getCleoDirAbsolute` will be removed entirely.
 *
 * `error.details.fix` carries the exact migration commands.
 *
 * Maps to {@link ExitCode.CONFIG_ERROR} (8) at the CLI boundary.
 *
 * @task T11022
 * @epic T10296
 * @saga T10295
 */
export declare const E_CWD_WALKUP_FORBIDDEN: "E_CWD_WALKUP_FORBIDDEN";
/** Check if an exit code represents an error (1-99). */
export declare function isErrorCode(code: ExitCode): boolean;
/** Check if an exit code represents success (0 or 100+). */
export declare function isSuccessCode(code: ExitCode): boolean;
/** Check if an exit code indicates no change (idempotent operation). */
export declare function isNoChangeCode(code: ExitCode): boolean;
/** Check if an exit code is recoverable (retry may succeed). */
export declare function isRecoverableCode(code: ExitCode): boolean;
/** Human-readable name for an exit code. */
export declare function getExitCodeName(code: ExitCode): string;
//# sourceMappingURL=exit-codes.d.ts.map