export { assertValidChangeId } from "./change-utils.js"; interface ChangePhaseSignals { hasProposal?: boolean; hasPlan?: boolean; hasTasksCheckboxes?: boolean; hasHandoff?: boolean; hasPatches?: boolean; hasEvidence?: boolean; reviewReady?: boolean; finishReady?: boolean; } /** * Infer the canonical 6-value change phase (CHANGE_PHASES) from blockers, * task progress and structural signals. Mirrors the workflow-state plugin's * estimation so CLI and injected agree. * * Priority: intake → planning → in-progress → finished → review → ready-for-dev. * * @param {string[]} blockersStrict * @param {{ unchecked: number }} tasks * @param {ChangePhaseSignals} [signals] */ export declare function inferChangePhase(blockersStrict: string[], tasks: any, signals?: ChangePhaseSignals): "review" | "intake" | "planning" | "ready-for-dev" | "in-progress" | "finished"; export declare function computeChangeStatus(gitRoot: string, changeId: string, options?: { writeMeta?: boolean; }): Promise<{ governance: { warning: string; phase: string; currentStage: string; recommendedStage: string; rationale: string; ruleId: string; source: string; }; ok: boolean; changeId: string; dir: string; phase: string; context: { worktree: string; branch: any; branchMatchesChange: boolean; source: string; warning: string; currentWorktree: string; currentBranch: any; changeWorktree: string; }; metaState: string; reqId: string; probId: string; bindings: { contractRow: string; planFile: string; evidencePaths: string[]; }; scopeGate: { checked: boolean; ready: boolean; status: string; source: string; lastRunAt: string; errors: number; warnings: number; }; evidence: { entries: { rel: string; abs: string; exists: boolean; kind: string; isAbsolute: boolean; }[]; counts: { total: number; exists: number; missing: number; tmp: number; persistent: number; other: number; absolute: number; }; missing: string[]; }; collaboration: { dirs: Record; counts: Record; }; reviewSignals: { persistentCount: number; tmpFallbackExists: boolean; tmpFallbackCount: number; tmpFallbackPath: string; tmpFallbackPaths: string[]; effectiveCount: number; source: string; }; reviewGates: { source: any; specVersion: any; version: any; gates: { id: any; name: any; stage: any; focus: any; next: any; ready: boolean; status: string; primaryPath: string; fallbackPath: string; foundPath: string; }[]; specReview: { id: any; name: any; stage: any; focus: any; next: any; ready: boolean; status: string; primaryPath: string; fallbackPath: string; foundPath: string; } | null; qualityReview: { id: any; name: any; stage: any; focus: any; next: any; ready: boolean; status: string; primaryPath: string; fallbackPath: string; foundPath: string; } | null; verifyBeforeComplete: { id: any; name: any; stage: any; focus: any; next: any; ready: boolean; status: string; primaryPath: string; fallbackPath: string; foundPath: string; } | null; validateStamp: { id: string; name: string; ready: boolean; status: string; dir: string; foundPath: string; }; summary: { gateCount: number; gateReadyCount: number; genericReviewOnly: boolean; dualReviewPending: boolean; dualReviewReady: boolean; dualReviewMissingIds: any[]; dualReviewMissingCount: number; finishGateReady: boolean; finishGateMissingIds: string[]; finishGateMissingCount: number; }; }; git: { clean: boolean; total: number; staged: number; unstaged: number; untracked: number; conflicted: number; }; repo: { submodules: number; }; lifecycle: { metricsState: string; latestEventType: string; eventCounts: Record; evidenceRuns: number; finishRuns: number; finishCleanupPendingReason: string; finishState: string; finishStateReason: string; finishStateEventType: string; archiveRuns: number; strictValidatePass: boolean; strictScopeValidateRuns: any; strictScopeValidatePass: boolean; strictScopeValidateAt: string; strictScopeValidateErrors: number; strictScopeValidateWarnings: number; }; tasks: { total: number; done: number; unchecked: number; hasCheckboxes: boolean; totalAll: number; doneAll: number; uncheckedAll: number; optionalTotal: number; optionalUnchecked: number; naCount: number; }; baselineLabel: string; baselineAt: string; driftFiles: string[]; blockersStrict: string[]; blockersArchive: string[]; terminatedReuse: { kind: string; message: string; } | null; hints: { planVerify: string; dev: string; }; }>; export declare function validateChangeArtifacts(gitRoot: string, changeId: string, options: any): Promise<{ ok: boolean; changeId: string; strict: boolean; allowTruthDrift: boolean; exitCode: any; errors: string[]; warnings: string[]; groups: Record; raw: string; }>; export declare function changeListCommand(): Promise; export declare function changeManifestCommand(): Promise; /** * aiws change templates which */ export declare function changeTemplatesWhichCommand(): Promise; /** * aiws change templates init */ export declare function changeTemplatesInitCommand(): Promise; /** * aiws change new * * @param {{ changeId: string, title?: string, noDesign: boolean }} options */ export declare function changeNewCommand(options: any): Promise; /** * aiws change start * * @param {{ changeId: string, title?: string, noDesign: boolean, enableHooks: boolean, noSwitch: boolean, forceSwitch: boolean, allowDirty?: boolean }} options */ export declare function changeStartCommand(options: any): Promise; /** * aiws change finish * @param {{ changeId?: string, into?: string, base?: string, push?: boolean, remote?: string, autoPushSubmodules?: boolean, gateTier?: "strict" | "light" | "quick", auto?: boolean, afterArchive?: (archivedDir: string) => Promise }} options */ export declare function changeFinishCommand(options: any): Promise; /** * aiws change status * * @param {{ changeId?: string }} options */ export declare function changeStatusCommand(options: any): Promise; /** * aiws change next * * @param {{ changeId?: string }} options */ export declare function changeNextCommand(options: any): Promise; /** * @param {string} gitRoot * @param {string} changeId */ export declare function computeChangeNextAdvice(gitRoot: string, changeId: string): Promise<{ changeId: string; branch: string; inferredChangeId: string; phase: unknown; governance: unknown; scopeGate: unknown; blockersStrict: unknown; evidence: { persistent?: number; } | null; collaboration: Record | null; actions: string[]; prohibitions: string[]; recommended: string[]; }>; /** * aiws change state * * @param {{ changeId?: string, write: boolean }} options */ export declare function changeStateCommand(options: any): Promise; /** * aiws metrics summary * * @param {{ since?: string }} options */ export declare function metricsSummaryCommand(options: any): Promise; /** * aiws change evidence * * @param {{ changeId?: string, noValidate: boolean, allowFail: boolean }} options */ export declare function changeEvidenceCommand(options: any): Promise; /** * aiws change validate * * @param {{ changeId?: string, strict: boolean, allowTruthDrift: boolean, checkEvidence: boolean, checkScope: boolean, allowFinishedUnarchived?: boolean }} options */ export declare function changeValidateCommand(options: any): Promise; /** * aiws change sync * * @param {{ changeId?: string }} options */ export declare function changeSyncCommand(options: any): Promise; /** * aiws change archive * * @param {{ changeId?: string, datePrefix?: string, force: boolean }} options */ export declare function changeArchiveCommand(options: any): Promise;