"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.discoverAdrs = discoverAdrs;
const adrLoader_1 = require("./adr/adrLoader");
async function discoverAdrs(workspaceRoot) {
    const records = await (0, adrLoader_1.loadArchitectureDecisionRecords)(workspaceRoot);
    return records
        .map((record) => ({
        id: record.adrId,
        title: record.title.trim().length > 0 ? record.title : record.fileName,
        filePath: record.filePath,
    }))
        .sort((left, right) => left.id.localeCompare(right.id));
}
//# sourceMappingURL=discoverAdrs.js.map