"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TRACE_LINK_FINDING_TAXONOMY = exports.TRACE_LINK_FINDING_IDS = void 0;
exports.TRACE_LINK_FINDING_IDS = [
    "LINKS_REQUIRED_TARGET_MISSING",
    "LINKS_TASK_PENDING_CREATION",
    "LINKS_RETIRED_TARGET",
    "LINKS_DELETED_TARGET",
    "LINKS_MIGRATION_AVAILABLE",
    "LINKS_MALFORMED_DISPOSITION_STORAGE",
    "LINKS_REQUIRED_FIELD_MISSING",
    "LINKS_MALFORMED_LOCAL_VALUE",
    "LINKS_STALE_EXPLICIT_LINK",
    "LINKS_UNSUPPORTED_REFERENCE",
    "LINKS_OUT_OF_HIERARCHY"
];
exports.TRACE_LINK_FINDING_TAXONOMY = [
    {
        id: "LINKS_REQUIRED_TARGET_MISSING",
        summary: "Required trace-link target is missing.",
        defaultLevel: "error",
        blockingReason: "broken-traceability",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the required trace field and the missing local target path.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus"],
        recovery: [
            "Restore the missing local artifact or update the explicit trace field in a separate write operation.",
            "Rerun the read-only links check after the artifact or metadata decision is complete."
        ]
    },
    {
        id: "LINKS_TASK_PENDING_CREATION",
        summary: "Declared Structured task is pending creation.",
        defaultLevel: "warning",
        advisoryReason: "weak-evidence",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the Structured overview declaration and its projected numbered task path.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus", "taskId", "sequence", "orderedTaskRootName", "recommendedCommand"],
        recovery: [
            "Run the reported day-shift work task create command with the task's complete JSON contract.",
            "Rerun the read-only links check after the canonical numbered task pair is created."
        ]
    },
    {
        id: "LINKS_RETIRED_TARGET",
        summary: "Trace-link target is retired by recorded disposition evidence.",
        defaultLevel: "warning",
        advisoryReason: "weak-evidence",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the retired local target path and the disposition storage.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus", "dispositionStatus", "dispositionStoragePath"],
        recovery: [
            "Keep the retirement evidence visible as advisory validation evidence.",
            "Restore the target or update the disposition through a separate write command only if the retirement evidence is wrong."
        ]
    },
    {
        id: "LINKS_DELETED_TARGET",
        summary: "Trace-link target is deleted by recorded disposition evidence.",
        defaultLevel: "warning",
        advisoryReason: "weak-evidence",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the deleted local target path and the disposition storage.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus", "dispositionStatus", "dispositionStoragePath"],
        recovery: [
            "Keep the deletion evidence visible as advisory validation evidence.",
            "Restore the target or update the disposition through a separate write command only if the deletion evidence is wrong."
        ]
    },
    {
        id: "LINKS_MIGRATION_AVAILABLE",
        summary: "Trace-link target has a recorded migrated replacement.",
        defaultLevel: "warning",
        advisoryReason: "impact-question",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the old target path, the disposition storage, and the migrated replacement target.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus", "dispositionStatus", "replacementTarget", "recommendedCommand"],
        recovery: [
            "Preview the migrated replacement with the recommended command before applying changes.",
            "Apply migrated-link updates only through the separate write-capable disposition apply command."
        ]
    },
    {
        id: "LINKS_MALFORMED_DISPOSITION_STORAGE",
        summary: "Trace-link disposition storage is malformed.",
        defaultLevel: "error",
        blockingReason: "invalid-command-input",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the malformed trace-link disposition storage file.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue"],
        recovery: [
            "Correct the malformed disposition storage through a separate explicit write operation.",
            "Rerun the read-only links check after the storage issue is resolved."
        ]
    },
    {
        id: "LINKS_REQUIRED_FIELD_MISSING",
        summary: "Required trace-link field is missing.",
        defaultLevel: "error",
        blockingReason: "broken-traceability",
        affectedPathRoles: ["finding-location"],
        artifactReferenceExpectation: "Reference the artifact missing a required supported trace field.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field"],
        recovery: [
            "Add the missing required trace field through an explicit metadata update or correct the artifact family classification.",
            "Rerun the read-only links check after the metadata decision is complete."
        ]
    },
    {
        id: "LINKS_MALFORMED_LOCAL_VALUE",
        summary: "Local trace-link value is malformed.",
        defaultLevel: "error",
        blockingReason: "invalid-command-input",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the malformed local trace value.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus"],
        recovery: [
            "Correct the malformed repository-relative trace value in a separate metadata update.",
            "Rerun the read-only links check after the explicit correction is complete."
        ]
    },
    {
        id: "LINKS_STALE_EXPLICIT_LINK",
        summary: "Explicit trace link is stale.",
        defaultLevel: "error",
        blockingReason: "broken-traceability",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the stale explicit field and the stale target path.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "expectedPath", "hierarchyStatus"],
        recovery: [
            "Review the stale explicit link and update metadata only through a separate authorized write operation.",
            "Rerun the read-only links check after the metadata decision is complete."
        ]
    },
    {
        id: "LINKS_UNSUPPORTED_REFERENCE",
        summary: "Trace reference is unsupported by local links-check coverage.",
        defaultLevel: "warning",
        advisoryReason: "impact-question",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the unsupported local or external reference.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "resolutionStatus"],
        recovery: [
            "Review whether the reference should remain evidence-only or be represented through a supported local trace field in future planning.",
            "Do not fetch remote providers, mutate metadata, or generate artifacts from this advisory finding."
        ]
    },
    {
        id: "LINKS_OUT_OF_HIERARCHY",
        summary: "Trace link target is outside the expected artifact hierarchy.",
        defaultLevel: "error",
        blockingReason: "broken-traceability",
        affectedPathRoles: ["trace-link"],
        artifactReferenceExpectation: "Reference the artifact containing the explicit field and the out-of-hierarchy local target path.",
        evidenceCategory: "links-check",
        evidenceDetails: ["taxonomyId", "relationship", "field", "traceValue", "expectedPath", "hierarchyStatus"],
        recovery: [
            "Review the explicit parent or paired-artifact link and correct it only through a separate authorized metadata update.",
            "Rerun the read-only links check after the hierarchy decision is complete."
        ]
    }
];
