docs(notes): archive low-value decision records

This commit is contained in:
Tianyi Cui
2026-07-26 23:06:00 +08:00
parent 7c038f275d
commit 37140bf823
281 changed files with 1033 additions and 707 deletions

View File

@@ -9,7 +9,7 @@ import { existsSync, readFileSync } from 'node:fs'
import { dirname, relative, resolve } from 'node:path'
import type { Nodes } from 'mdast'
import { parseMarkdown, visitMarkdown } from './markdown.ts'
import { uniqueRepoFiles } from './repo-files.ts'
import { isArchivedAgentNotePath, uniqueRepoFiles } from './repo-files.ts'
const root = resolve(import.meta.dirname, '..')
@@ -95,7 +95,8 @@ function findViolations(absPath: string): Violation[] {
return out
}
const files = uniqueRepoFiles(root, PATTERNS)
// Archived notes remain valid link targets, but their historical outbound links are frozen.
const files = uniqueRepoFiles(root, PATTERNS, isArchivedAgentNotePath)
const all = files.flatMap(file => findViolations(file.abs))
const checked = files.length