"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildAgentCommandSurfaces = buildAgentCommandSurfaces;
exports.agentSurface = agentSurface;
exports.mixedAgentSurface = mixedAgentSurface;
exports.requireCallableCommandCapability = requireCallableCommandCapability;
exports.renderAgentCommandExample = renderAgentCommandExample;
exports.renderWriteCapableAgentBoundary = renderWriteCapableAgentBoundary;
exports.renderAgentSurfaceBoundary = renderAgentSurfaceBoundary;
exports.renderMixedAgentSurfaceBoundary = renderMixedAgentSurfaceBoundary;
exports.buildAgentReminderData = buildAgentReminderData;
exports.buildImplementationSummaryCloseoutGuidance = buildImplementationSummaryCloseoutGuidance;
exports.renderImplementationSummaryCloseoutEvidenceList = renderImplementationSummaryCloseoutEvidenceList;
exports.buildReconciliationReadinessGuidance = buildReconciliationReadinessGuidance;
exports.renderReconciliationReadinessCloseoutGuidance = renderReconciliationReadinessCloseoutGuidance;
exports.buildCloseoutEvidenceBoundaryGuidance = buildCloseoutEvidenceBoundaryGuidance;
exports.buildRepositoryMemoryCheckpointGuidance = buildRepositoryMemoryCheckpointGuidance;
// Agent command registration, orientation evidence, guidance, and rendering.
const output_1 = require("../../../lib/output");
const cli_constants_1 = require("../../../lib/config/cli-constants");
const orientation_core_1 = require("./orientation-core");
function buildAgentCommandSurfaces() {
    return [
        agentSurface('Agent orientation', ['agent', 'agent orient', 'agent remind'], 'read'),
        agentSurface('Health orientation', ['doctor'], 'read'),
        agentSurface('Runtime discovery', ['about'], 'read'),
        agentSurface('Planning inventory', ['planning inventory'], 'read'),
        agentSurface('Metadata inventory', ['metadata inventory'], 'read'),
        agentSurface('Spec discovery', ['spec list', 'spec search'], 'read'),
        {
            name: 'Spec index evidence',
            examples: [cli_constants_1.CLI_SPEC_INDEX_PATH],
            behavior: 'read',
            capability: 'read',
            writeCapable: false,
            artifactFamily: 'spec-registry',
            destinationPosture: 'none',
            targetPathPosture: 'none',
            coordinationScope: 'none',
            mutationPosture: 'non-writing',
            boundary: 'File-read evidence for registered spec metadata and traceability only; it does not select work, create planning artifacts, or mutate the spec registry.',
        },
        agentSurface('Planning validation reports', ['validation smoke', 'validation links-check', 'validation rollup'], 'validate'),
        agentSurface('Planning review', ['phase review', 'milestone review'], 'review'),
        agentSurface('Task and summary review', ['task review', 'implementation-summary review', 'reconciliation review'], 'review'),
        agentSurface('Planning artifact writes', ['slice new', 'phase new', 'milestone new', 'task new', 'reconciliation build'], 'write'),
        agentSurface('Metadata writes', ['metadata update', 'manifest update', 'spec update'], 'write'),
        agentSurface('Workspace migration apply', ['workspace migrate'], 'write'),
        mixedAgentSurface('Workspace prompt upgrade', ['workspace upgrade preview'], ['workspace upgrade apply']),
        mixedAgentSurface('Prompt reconciliation', ['prompt reconcile preview'], ['prompt reconcile apply']),
        mixedAgentSurface('Validation checkpoint', ['validation smoke'], ['validation checkpoint']),
        mixedAgentSurface('Release', ['release check'], ['release build', 'release notes']),
        mixedAgentSurface('Metadata validation and update', ['metadata validate-update'], ['metadata update']),
        agentSurface('Prompt and template writes', ['prompt update', 'template update', 'template materialize'], 'write'),
    ];
}
function agentSurface(name, commands, behavior) {
    const entries = commands.map(requireCallableCommandCapability);
    const primary = entries[0];
    return {
        name,
        examples: entries.map(renderAgentCommandExample),
        behavior,
        capability: primary.capability,
        writeCapable: primary.writeCapable,
        artifactFamily: primary.artifactFamily,
        destinationPosture: primary.destinationPosture,
        targetPathPosture: primary.targetPathPosture,
        coordinationScope: primary.coordinationScope,
        mutationPosture: primary.mutationPosture,
        boundary: renderAgentSurfaceBoundary(name, primary),
    };
}
function mixedAgentSurface(name, readCommands, writeCommands) {
    const readEntries = readCommands.map(requireCallableCommandCapability);
    const writeEntries = writeCommands.map(requireCallableCommandCapability);
    const primary = readEntries[0];
    const writeEntry = writeEntries[0];
    return {
        name,
        examples: [...readEntries, ...writeEntries].map(renderAgentCommandExample),
        behavior: 'mixed',
        capability: `${primary.capability}+${writeEntry.capability}`,
        writeCapable: true,
        artifactFamily: `${primary.artifactFamily}+${writeEntry.artifactFamily}`,
        destinationPosture: writeEntry.destinationPosture,
        targetPathPosture: writeEntry.targetPathPosture,
        coordinationScope: writeEntry.coordinationScope,
        mutationPosture: writeEntry.mutationPosture,
        boundary: renderMixedAgentSurfaceBoundary(name, primary, writeEntry),
    };
}
function requireCallableCommandCapability(command) {
    const capability = (0, output_1.getRegisteredCommandDescriptor)(command);
    if (capability === null || capability.availability !== 'callable') {
        throw new Error(`Missing callable command capability registration for '${command}'.`);
    }
    return capability;
}
function renderAgentCommandExample(entry) {
    const examples = {
        'validation smoke': 'day-shift validation smoke --scope planning --artifact <path> --format json',
        'validation links-check': 'day-shift validation links-check --scope planning --artifact <path> --format json',
        'validation rollup': 'day-shift validation rollup --scope planning --artifact <path> --format json',
        'validation checkpoint': 'day-shift validation checkpoint --scope planning',
        'phase review': 'day-shift phase review --phase-overview <path> --format json',
        'milestone review': 'day-shift milestone review --milestone-overview <path> --format json',
        'task review': 'day-shift task review --task-definition <path> --format json',
        'implementation-summary review': 'day-shift implementation-summary review --task-definition <path> --format json',
        'reconciliation review': 'day-shift reconciliation review --milestone-overview <path> --format json',
        'slice new': cli_constants_1.CLI_SOURCE_SPEC_PLANNING_RECOVERY_COMMAND,
        'phase new': 'day-shift phase new --slice-overview <path> --phase-slug <slug>',
        'milestone new': 'day-shift milestone new --phase-overview <path> --milestone-slug <slug>',
        'task new': 'day-shift task new --milestone-overview <path> --task-slug <slug>',
        'reconciliation build': 'day-shift reconciliation build --milestone-overview <path>',
        'metadata update': 'day-shift metadata update --artifact <path> --field <key>=<value>',
        'manifest update': 'day-shift manifest update --manifest <path> --field <key>=<value>',
        'spec update': 'day-shift spec update --spec-id <id> --field <key>=<value>',
        'spec search': 'day-shift spec search <query> --format json',
        'metadata validate-update': 'day-shift metadata validate-update --artifact <path> --field <key>=<value>',
        'workspace migrate': 'day-shift workspace migrate --target-schema-version <version> --dry-run',
        'workspace upgrade preview': 'day-shift workspace upgrade preview --latest-mode materialize --format json',
        'workspace upgrade apply': `day-shift workspace upgrade apply --latest-mode materialize --preview-hash <sha256> --confirm ${cli_constants_1.CLI_WORKSPACE_UPGRADE_CONFIRMATION}`,
        'prompt reconcile preview': 'day-shift prompt reconcile preview --prompt <path> --format json',
        'prompt reconcile apply': 'day-shift prompt reconcile apply --prompt <path> --decision <preserve|replace> --preview-hash <sha256>',
        'release check': 'day-shift release check --format json',
        'release build': 'day-shift release build',
        'release notes': 'day-shift release notes',
        'prompt update': 'day-shift prompt update <options>',
        'template update': 'day-shift template update <options>',
        'template materialize': 'day-shift template materialize <options>',
    };
    const example = examples[entry.command];
    if (example !== undefined) {
        return example;
    }
    const exactExample = entry.examples[0]?.argv.join(' ');
    if (exactExample !== undefined)
        return exactExample;
    return entry.writeCapable ? `day-shift ${entry.command}` : `day-shift ${entry.command} --format json`;
}
function renderWriteCapableAgentBoundary(entry) {
    return `${entry.command} is ${entry.capability} and writeCapable: true for ${entry.artifactFamily}; destination ${entry.destinationPosture}, target ${entry.targetPathPosture}, coordination ${entry.coordinationScope}.`;
}
function renderAgentSurfaceBoundary(name, entry) {
    const boundaries = {
        'Planning inventory': 'Reports observed planning hierarchy and state without selecting work, creating artifacts, advancing status, repairing artifacts, checkpointing validation, or reconciling milestones.',
        'Planning validation reports': 'Validation report commands are evidence-only and findings-oriented; they do not repair links, advance status, checkpoint findings, or authorize later mutation.',
        'Diff and impact validation': 'Reports validation findings for changed scope only; findings remain evidence and do not perform or authorize writes.',
        'Planning review': 'Planning review commands are findings-oriented and read-only; recommendations do not create artifacts, update metadata, or close lifecycle state.',
        'Task and summary review': 'Task, implementation-summary, and reconciliation review commands report evidence gaps only; they do not edit paired artifacts or mark work complete.',
        'Planning artifact writes': 'Planning artifact writes require explicit user intent, the selected applicable parent artifact, declared child scope, and no blocking evidence.',
        'Metadata writes': 'Metadata writes require explicit user intent, explicit intended fields, an applicable metadata family, preservation of unaffected fields, and no blocking parse or safety findings.',
        'Workspace migration apply': 'Migration apply is write-capable and requires explicit user intent plus compatible preview or health evidence before moving workspace assets; do not manually move .day-shift/ assets.',
    };
    const boundary = boundaries[name];
    if (boundary !== undefined) {
        return boundary;
    }
    return entry.writeCapable ? renderWriteCapableAgentBoundary(entry) : entry.noWriteBoundary;
}
function renderMixedAgentSurfaceBoundary(name, readEntry, writeEntry) {
    const boundaries = {
        'Validation checkpoint': 'Validation smoke and links-check are read-only report lanes; validation checkpoint is the explicit write lane for preserving accepted findings as a baseline.',
        Release: 'Release commands include read-only checks and explicit build or artifact-writing surfaces; do not infer release readiness from orientation.',
        'Prompt and template operations': 'Prompt and template inventory or list lanes are read-only; update and materialize lanes are explicit writes that require selected prompt or template artifacts.',
        'Metadata validation and update': 'Metadata validate-update is the read-only safety lane; metadata update is the explicit write lane and must stop on wrong-family, ambiguous, inconsistent, under-specified, lossy, or parse-failure evidence.',
        'Workspace migration': 'Migration preview reports compatibility and planned moves as no-write evidence; migration apply is the explicit write lane and must not be inferred from preview output alone.',
    };
    const boundary = boundaries[name];
    if (boundary !== undefined) {
        return boundary;
    }
    return `${readEntry.command} is ${readEntry.capability} and writeCapable: false; ${writeEntry.command} is ${writeEntry.capability} and writeCapable: true with ${writeEntry.artifactFamily} ${writeEntry.destinationPosture} scope.`;
}
function buildAgentReminderData(orientationData = (0, orientation_core_1.buildAgentOrientationData)()) {
    const requiredRuleCodes = new Set([
        'ORIENT_FIRST',
        'INSPECT_BEFORE_WRITE',
        'USE_JSON_FOR_AGENTS',
        'RESPECT_FINDINGS',
        'DO_NOT_INVENT_STATE',
        'PRESERVE_BOUNDARIES',
    ]);
    const commandBoundaryBehaviors = new Set(['read', 'validate', 'review', 'write']);
    return {
        cli: orientationData.cli,
        reminder: {
            command: 'day-shift agent remind',
            purpose: 'Stop drift, reload repository orientation, and resume only after checking the selected artifact and evidence boundaries.',
            sourceCommand: 'day-shift agent',
        },
        repositoryOrientation: {
            entrypointPath: orientationData.repositoryOrientation.entrypointPath,
            rootDetectionOrder: orientationData.repositoryOrientation.rootDetectionOrder,
        },
        rootContext: orientationData.rootContext,
        driftCorrection: orientationData.driftCorrection,
        requiredRules: orientationData.workflowRules.filter((rule) => requiredRuleCodes.has(rule.code)),
        commandBoundaries: orientationData.commandSurfaces.filter((surface) => commandBoundaryBehaviors.has(surface.behavior)),
        implementationSummaryCloseoutGuidance: orientationData.implementationSummaryCloseoutGuidance,
        reconciliationReadinessGuidance: orientationData.reconciliationReadinessGuidance,
        closeoutEvidenceBoundaryGuidance: orientationData.closeoutEvidenceBoundaryGuidance,
        repositoryMemoryCheckpointGuidance: orientationData.repositoryMemoryCheckpointGuidance,
        closeout: orientationData.closeout,
    };
}
function buildImplementationSummaryCloseoutGuidance() {
    const completionBoundary = 'Record this in the task implementation summary before claiming the task complete or handing it to milestone reconciliation.';
    const sideEffectBoundary = 'day-shift agent only reports this responsibility; it does not create, update, or complete implementation-summary or planning artifacts.';
    return [
        {
            kind: 'changed-paths',
            ruleCode: 'CLOSEOUT_CHANGED_PATHS',
            responsibility: 'Record the repository-relative paths changed by the implementation.',
            implementationSummaryEvidence: 'List expected target paths, actual changed paths, and any path-scope differences that matter for review.',
            completionBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'validation-evidence',
            ruleCode: 'CLOSEOUT_VALIDATION_EVIDENCE',
            responsibility: 'Record validation commands, inspection steps, and results.',
            implementationSummaryEvidence: 'Include passed, failed, skipped, substituted, blocked, or inconclusive validation with enough detail for downstream review.',
            completionBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'deviations',
            ruleCode: 'CLOSEOUT_DEVIATIONS',
            responsibility: 'Record deviations from the task definition, declared target paths, validation plan, or expected scope.',
            implementationSummaryEvidence: 'Explain why the deviation was necessary and whether it changes acceptance, rollback, or review risk.',
            completionBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'discovered-work',
            ruleCode: 'CLOSEOUT_DISCOVERED_WORK',
            responsibility: 'Record discovered work separately from the completed implementation scope.',
            implementationSummaryEvidence: 'Describe newly found work without silently expanding the active task or treating discovery as completed scope.',
            completionBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'follow-up-work',
            ruleCode: 'CLOSEOUT_FOLLOW_UP_WORK',
            responsibility: 'Record follow-up work, deferred checks, residual risks, and the next handoff.',
            implementationSummaryEvidence: 'Identify whether follow-up belongs in later planning, reconciliation review, or a separate explicit user decision.',
            completionBoundary,
            sideEffectBoundary,
        },
    ];
}
function renderImplementationSummaryCloseoutEvidenceList(guidance) {
    const expectedKinds = [
        'changed-paths',
        'validation-evidence',
        'deviations',
        'discovered-work',
        'follow-up-work',
    ];
    if (expectedKinds.every((kind) => guidance.some((entry) => entry.kind === kind))) {
        return 'Record changed paths, validation, deviations, discovered work, and follow-up work.';
    }
    return `Record implementation-summary evidence for ${guidance.map((entry) => entry.kind).join(', ')}.`;
}
function buildReconciliationReadinessGuidance() {
    const taskSummaryGate = 'All relevant task implementation summaries must be completed and non-placeholder before milestone reconciliation is ready.';
    const sideEffectBoundary = 'day-shift agent only reports reconciliation readiness guidance; it does not create, update, complete, or repair reconciliation artifacts.';
    return [
        {
            kind: 'default-rollup',
            ruleCode: 'RECONCILIATION_DEFAULT_ROLLUP',
            readinessState: 'eligible-after-gate',
            instruction: 'Use milestone reconciliation as the default rollup after the task implementation-summary evidence set is complete.',
            taskSummaryGate,
            reconciliationArtifactBoundary: 'A milestone reconciliation artifact becomes actionable rollup work only after the complete task-summary gate is satisfied.',
            sideEffectBoundary,
        },
        {
            kind: 'task-summary-gate',
            ruleCode: 'RECONCILIATION_TASK_SUMMARY_GATE',
            readinessState: 'blocked-before-gate',
            instruction: 'Do not claim milestone reconciliation readiness while any relevant task implementation summary is missing, pending, draft, or placeholder-heavy.',
            taskSummaryGate,
            reconciliationArtifactBoundary: 'Before the gate is satisfied, continue task closeout or implementation-summary review rather than reconciling the milestone.',
            sideEffectBoundary,
        },
        {
            kind: 'placeholder-boundary',
            ruleCode: 'RECONCILIATION_PLACEHOLDER_BOUNDARY',
            readinessState: 'future-review-context',
            instruction: 'Treat pending or placeholder reconciliation artifacts as future review context until completed task summaries make reconciliation eligible.',
            taskSummaryGate,
            reconciliationArtifactBoundary: 'A pending reconciliation placeholder is not itself actionable fix work before all relevant task summaries are complete and non-placeholder.',
            sideEffectBoundary,
        },
    ];
}
function renderReconciliationReadinessCloseoutGuidance(guidance) {
    const defaultRollup = guidance.find((entry) => entry.kind === 'default-rollup');
    const gate = guidance.find((entry) => entry.kind === 'task-summary-gate');
    if (defaultRollup !== undefined && gate !== undefined) {
        return 'Use milestone reconciliation as the default rollup only after all relevant task implementation summaries are complete and non-placeholder.';
    }
    return 'Use milestone reconciliation only after the task implementation-summary readiness gate is satisfied.';
}
function buildCloseoutEvidenceBoundaryGuidance() {
    const sideEffectBoundary = 'day-shift agent only reports closeout evidence-boundary guidance; it does not execute review, validation, repair, refresh, checkpoint, or write-capable commands.';
    return [
        {
            kind: 'review-evidence',
            ruleCode: 'CLOSEOUT_REVIEW_EVIDENCE_ONLY',
            instruction: 'Treat review output as closeout evidence only until a separate write-capable command or explicit user request authorizes mutation.',
            evidenceSources: [
                'day-shift task review --task-definition <path> --format json',
                'day-shift implementation-summary review --task-definition <path> --format json',
                'day-shift reconciliation review --milestone-overview <path> --format json',
                'day-shift milestone review --milestone-overview <path> --format json',
                'day-shift phase review --phase-overview <path> --format json',
            ],
            requiredAction: 'Use review findings to decide whether closeout is blocked, needs explicit acceptance, or is ready for a separately selected next command.',
            writeBoundary: 'Review output does not create, update, repair, complete, or reconcile artifacts.',
            sideEffectBoundary,
        },
        {
            kind: 'validation-evidence',
            ruleCode: 'CLOSEOUT_VALIDATION_EVIDENCE_ONLY',
            instruction: 'Treat validation output as closeout evidence only until a separate write-capable command or explicit user request authorizes mutation.',
            evidenceSources: [
                'day-shift validation smoke --scope planning --artifact <path> --format json',
                'day-shift validation links-check --scope planning --artifact <path> --format json',
                'day-shift validation rollup --scope planning --artifact <path> --format json',
                'day-shift metadata validate-update --artifact <path> --field <key>=<value>',
            ],
            requiredAction: 'Use validation findings as evidence for closeout, blocker routing, or explicit acceptance rather than as repair authority.',
            writeBoundary: 'Validation smoke, links-check, rollup, and validate-update surfaces do not repair artifacts, checkpoint findings, update metadata, or authorize later writes.',
            sideEffectBoundary,
        },
        {
            kind: 'blocking-errors',
            ruleCode: 'CLOSEOUT_ERROR_FINDINGS_BLOCK',
            instruction: 'Treat error findings from review or validation evidence as blocking closeout.',
            evidenceSources: ['review findings with severity error', 'validation findings with severity error'],
            requiredAction: 'Stop until the error is resolved, explicitly routed by a compatible workflow, or addressed through a separately selected write-capable command.',
            writeBoundary: 'An error finding is blocker evidence, not permission to guess or perform a repair.',
            sideEffectBoundary,
        },
        {
            kind: 'warning-review',
            ruleCode: 'CLOSEOUT_WARNING_FINDINGS_REVIEW',
            instruction: 'Treat warning findings from review or validation evidence as requiring review or explicit acceptance before proceeding.',
            evidenceSources: ['review findings with severity warning', 'validation findings with severity warning'],
            requiredAction: 'Capture review evidence or explicit user acceptance before treating warning findings as acceptable residual risk.',
            writeBoundary: 'A warning finding is not cosmetic permission to continue silently and does not authorize mutation.',
            sideEffectBoundary,
        },
        {
            kind: 'separate-write-authorization',
            ruleCode: 'CLOSEOUT_SEPARATE_WRITE_AUTHORIZATION',
            instruction: 'Select a separate write-capable command or get an explicit user request before mutating closeout, planning, metadata, prompt, template, migration, release, checkpoint, or repository-memory artifacts.',
            evidenceSources: [
                'current user request',
                'selected task or milestone workflow',
                'explicit write-capable Day Shift command',
            ],
            requiredAction: 'Name the intended write surface and confirm it matches the selected artifact family before mutation.',
            writeBoundary: 'Implementation-summary, reconciliation, checkpoint, planning, metadata, prompt, template, migration, release, and repository-memory writes remain separate from review and validation evidence.',
            sideEffectBoundary,
        },
    ];
}
function buildRepositoryMemoryCheckpointGuidance() {
    const writeBoundary = 'Repository-memory writes require a separate supported checkpoint command, sync command, or explicit workflow when available.';
    const sideEffectBoundary = 'day-shift agent only reports repository-memory checkpoint guidance; it does not write private model memory, hidden agent state, repository-memory checkpoints, or durable checkpoint artifacts.';
    return [
        {
            kind: 'stable-facts',
            ruleCode: 'MEMORY_STABLE_FACTS',
            checkpointCandidate: 'Stable repository facts that are expected to remain useful for future agents.',
            instruction: 'Checkpoint only durable facts whose source artifact or decision is clear enough for future recovery.',
            repositoryMemoryBoundary: 'Do not checkpoint guesses, transient command output, or implementation observations that still belong in task summaries or reconciliation.',
            writeBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'transitional-state',
            ruleCode: 'MEMORY_TRANSITIONAL_STATE',
            checkpointCandidate: 'Transitional state that explains where current planning or implementation work should resume.',
            instruction: 'Checkpoint transitional state only when it helps future agents resume without inventing status or skipping required artifacts.',
            repositoryMemoryBoundary: 'Keep transitional state tied to explicit planning artifacts, validation evidence, or accepted deferrals.',
            writeBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'artifact-ordering',
            ruleCode: 'MEMORY_ARTIFACT_ORDERING',
            checkpointCandidate: 'Artifact ordering facts such as selected slice, phase, milestone, task order, and reconciliation gates.',
            instruction: 'Checkpoint ordering facts only when they clarify deterministic next actions across planning layers.',
            repositoryMemoryBoundary: 'Do not use repository memory to override the selected artifact, declared task order, or completed task-summary gate.',
            writeBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'intentional-carve-outs',
            ruleCode: 'MEMORY_INTENTIONAL_CARVE_OUTS',
            checkpointCandidate: 'Intentional carve-outs, accepted residual risks, and explicit deferrals recorded in source artifacts.',
            instruction: 'Checkpoint carve-outs only when they are deliberate, source-backed, and useful for avoiding repeated rediscovery.',
            repositoryMemoryBoundary: 'Do not turn unreviewed discovered work into durable repository-memory state.',
            writeBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'separate-checkpoint-command',
            ruleCode: 'MEMORY_SEPARATE_CHECKPOINT_COMMAND',
            checkpointCandidate: 'A checkpoint action selected outside the orientation command.',
            instruction: 'Use a separate supported checkpoint command, sync command, or explicit workflow for repository-memory writes when available.',
            repositoryMemoryBoundary: 'Orientation output is candidate guidance only; it is not a checkpoint artifact and does not prove persistence.',
            writeBoundary,
            sideEffectBoundary,
        },
        {
            kind: 'private-memory-exclusion',
            ruleCode: 'MEMORY_PRIVATE_STATE_EXCLUSION',
            checkpointCandidate: 'Excluded memory surfaces: private model memory, hidden agent memory, and automatic durable repository state.',
            instruction: 'Do not treat orientation output as private model memory mutation, hidden agent-state mutation, or automatic repository-memory persistence.',
            repositoryMemoryBoundary: 'Durable state claims require explicit repository artifacts or supported write commands, not orientation text.',
            writeBoundary,
            sideEffectBoundary,
        },
    ];
}
