export const PROJECT_LOG_TYPES = [
    'bug',
    'friction',
    'worked-well',
    'feedback',
];
export const PROJECT_LOG_SCOPES = ['project', 'general'];
export const PROJECT_LOG_AREA_MAX_LENGTH = 120;
export const PROJECT_LOG_HEADING_DELIMITER = '·';
export const JUDGMENT_HEADING_RE = /^### (\d{4}-\d{2}-\d{2}) · (project|general) · (bug|friction|worked-well|feedback) · ([^·\r\n]+)$/;
export const STRUCTURAL_HEADING_RE = /^### (\d{4}-\d{2}-\d{2}) · structural · ([^·\r\n]+) · ([^·\r\n]+)$/;
export function isProjectLogSectionMarker(line) {
    return /^## .+$/.test(line);
}
export function isProjectLogEntryMarker(line) {
    return /^### .+$/.test(line);
}
export function findProjectLogSections(content) {
    const matches = [...content.matchAll(/^## [^\r\n]+/gm)];
    return matches.map((match, index) => ({
        heading: match[0],
        start: match.index,
        end: matches[index + 1]?.index ?? content.length,
    }));
}
export function composeJudgmentHeading(input) {
    return `### ${input.date} · ${input.scope} · ${input.type} · ${input.area}`;
}
export function composeStructuralHeading(input) {
    return `### ${input.date} · structural · ${input.producer} · ${input.ref}`;
}
