os-optimizer-kr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

볼트 최적화기 (한국어판)

Vault 优化器(韩语版)

⚠️ 이 블록은 영어 원본을 한국어 볼트용으로 감싸는 마스터 오버라이드입니다. 아래 본문·references의 어떤 영어 지시와 충돌하더라도 이 블록이 우선합니다. 프레임워크의 판단 로직·정규식·구조는 그대로 따르되, 아래 두 가지만 한국어 기준으로 바꿉니다: (1) 사용자에게 보이는 출력 언어, (2) 언어 종속적 수치·치환 규칙.
⚠️ 此块是以韩语 Vault 为目标包装英文原版的主覆盖项。即使下方正文或 references 中有任何英文指令发生冲突,也以本块为准。框架的判断逻辑、正则表达式和结构保持不变,但只将以下两项改为以韩语为准:(1) 用户可见输出的语言;(2) 语言相关的数值和替换规则。

오버라이드 0 — 출력 언어: 무조건 한국어

覆盖项 0——输出语言:无条件使用韩语

references 파일들은 영어로 쓰여 있습니다. 이건 에이전트(클로드)가 읽는 지시층이라 그대로 둡니다. 하지만 사용자가 실제로 보는 모든 출력은 예외 없이 한국어입니다:
  • Step 0/1/1.5의 안내 문구, 발견 요약 블록, 분류 표
  • 프레임워크 진행 라인(예: "F1 … → 22건 발견")
  • 모든
    AskUserQuestion
    walk 질문과 선택지
  • 각 finding의
    reasoning
    ·
    action
    ·
    excerpt
    설명(원문 인용 excerpt는 원본 유지, 그에 대한 설명은 한국어)
  • HTML 리포트의 모든 라벨·헤더·설명(한국어 템플릿 사용 — 아래 오버라이드 4)
  • 최종 요약 블록
finding의
reasoning
은 "규칙을 다시 말하기"가 아니라 이 파일의 이 맥락에서 왜 문제인지를 한국어로 구체적으로 씁니다. 존댓말을 기본으로 합니다.
references 文件以英文撰写。这是供 Agent(Claude)读取的指令层,因此保持原样。但用户实际看到的所有输出无一例外都使用韩语:
  • Step 0/1/1.5 的提示语、发现摘要块、分类表
  • 框架进度行(例如:“F1 … → 发现 22 项”)
  • 所有
    AskUserQuestion
    walk 问题与选项
  • 每个 finding 的
    reasoning
    、
    action
    、
    excerpt
    说明(原始引文 excerpt 保持原文,对应说明使用韩语)
  • HTML 报告中的所有标签、标题和说明(使用韩语模板——见覆盖项 4)
  • 最终摘要块
finding 的
reasoning
不是“再次复述规则”,而是要用韩语具体说明为什么该问题在此文件的此上下文中构成问题。默认使用敬语。

오버라이드 1 — 토큰 추정 공식 (가장 중요한 한국어 조정)

覆盖项 1——Token 估算公式(最重要的韩语调整)

영어 pass 파일들은 토큰을
bytes/4
또는
chars/4
로 추정합니다. 이 공식은 한국어를 심하게 과소평가합니다. 한글은 글자당 토큰 밀도가 영어보다 높기 때문입니다. references의 모든
bytes/4
·
chars/4
·
tokens ≈ bytes/4
표현은 아래 공식으로 대체합니다:
한글_글자수 = 유니코드 Hangul(음절 AC00–D7A3, 자모 1100–11FF, 3130–318F) 개수
그외_글자수 = 공백 제외 나머지 글자수 (영문·숫자·기호·코드)

추정_토큰 ≈ (한글_글자수 × 1.5) + (그외_글자수 × 0.25)
  • 계수
    1.5
    (한글)와
    0.25
    (그 외)는 근사치이며 토크나이저·내용 구성에 따라 변합니다. 안전을 위해 살짝 과대 추정하는 방향으로 잡았습니다(예산 초과를 놓치는 것보다 일찍 경고하는 게 낫다)
  • 토큰 예산 수치 자체는 바꾸지 않습니다. 예산(F4 자동로드 ~3K, daily 2K, F5 파일당 권장 ~2.5K / 하드 25K)은 언어 중립적 목표입니다. 바뀌는 건 오직 "이 파일이 몇 토큰인가"를 세는 방법뿐입니다
  • 결과: 영어 공식으로는 예산 안에 들어 보이던 한국어 파일이 실제로는 초과인 경우를 정확히 잡아냅니다. 리포트의 "절감 토큰" 수치도 한국어 기준으로 맞습니다
英文 pass 文件使用
bytes/4
或
chars/4
估算 Token。该公式会严重低估韩语,因为韩语字符的 Token 密度高于英语。references 中所有
bytes/4
、
chars/4
、
tokens ≈ bytes/4
表达均替换为以下公式:
한글_글자수 = 유니코드 Hangul(음절 AC00–D7A3, 자모 1100–11FF, 3130–318F) 개수
그외_글자수 = 공백 제외 나머지 글자수 (영문·숫자·기호·코드)

추정_토큰 ≈ (한글_글자수 × 1.5) + (그외_글자수 × 0.25)
  • 系数
    1.5
    (韩语)和
    0.25
    (其他字符)是近似值,会因 tokenizer 和内容构成而变化。为确保安全,估算值略偏保守,即宁可提前预警,也不要漏掉预算超限。
  • **Token 预算数值本身不变。**预算(F4 自动加载约 3K、daily 2K、F5 每文件建议约 2.5K/硬限制 25K)属于语言中立目标。唯一改变的是“此文件有多少 Token”的计算方式。
  • 结果:使用英文公式时看似处于预算内的韩语文件,现在可以准确识别出实际已超限的情况。报告中的“节省 Token”数值也会按韩语标准计算。

오버라이드 2 — 파일 크기 예산: 바이트가 아니라 토큰으로

覆盖项 2——文件大小预算:按 Token 而非字节判断

F5(Anthropic Memory)와 G7.4는 "권장 <10KB", "sparse <200B", "bloated >8KB"처럼 바이트 기준을 씁니다. 한글은 UTF-8에서 글자당 3바이트라 바이트 수가 오해를 부릅니다(한글 3,333자 = 10KB지만 토큰은 ~5,000). 한국어 볼트에서는:
  • F5 파일당 권장 예산을 바이트가 아니라 토큰으로 판정합니다: 오버라이드 1 공식으로 추정한 토큰이 권장 ~2,500토큰 초과 → warn, 하드 25,000토큰(또는 100KB) 초과 → fail. 바이트(KB)는 참고용 보조 지표로만 리포트에 병기
  • G7.4 README 밀도: "sparse"·"bloated" 판정도 바이트가 아니라 토큰/내용 충실도로 봅니다. 한글 README는 같은 정보량이라도 바이트가 크니 8KB 기준을 그대로 쓰면 멀쩡한 문서가 bloated로 잘못 잡힙니다. sparse는 "개요·상태·다음 단계 중 빠진 게 있는가", bloated는 "한 파일에 분리돼야 할 하위 주제가 여럿인가"로 판정(바이트는 참고만)
F5(Anthropic Memory)和 G7.4 使用“建议 <10KB”“sparse <200B”“bloated >8KB”等字节标准。韩语在 UTF-8 中每个字符占 3 字节,因此字节数容易造成误解(韩语 3,333 字等于 10KB,但 Token 约为 5,000)。在韩语 Vault 中:
  • F5 每文件建议预算改为按 Token 而非字节判断:使用覆盖项 1 的公式估算后,超过建议值约 2,500 Token → warn,超过硬限制 25,000 Token(或 100KB)→ fail。字节数(KB)仅作为辅助参考指标并列显示在报告中。
  • G7.4 README 密度:“sparse”和“bloated”的判断也改为依据 Token/内容充实度,而非字节数。韩语 README 即使信息量相同,字节数也会更大;如果继续使用 8KB 标准,就可能把正常文档误判为 bloated。sparse 的判断依据是“概述、状态、下一步中是否缺少内容”,bloated 的判断依据是“单文件中是否包含多个应拆分出的子主题”(字节数仅供参考)。

오버라이드 3 — em대시(G7.1) & 한국어 문체 위생(G7.5 신설)

覆盖项 3——em dash(G7.1)与韩语文体卫生(新增 G7.5)

G7.1 치환은 한국어 문장부호 기준으로 바꿉니다. 한국어 AI 글쓰기도 영어에서 옮겨온 em대시(—)를 남용하므로 탐지는 유지하되, 치환은 영어식 콜론/세미콜론이 아니라 한국어 자연스러움을 따릅니다:
  • 두 절을 잇고 뒤 절이 앞을 부연 → 마침표로 문장 분리, 또는 "즉,"·"곧"·쉼표로 연결 (콜론
    :
    은 한국어 산문에서 어색하니 지양)
  • 삽입구 설정 → 쉼표(
    , … ,
    ) 또는 괄호(
    ( )
    )
  • 절 끝에서 마침표 역할 → 마침표(
    . 
    )로 문장 분리
  • 숫자·날짜 범위의 엔대시(
    100–200
    ,
    2026–2027
    )는 유지(위반 아님)
  • 인용문 안의 대시는 원문 보존
G7.5 — 한국어 AI 문체 냄새 (신설, severity: warn, fixable: 사용자 opt-in). 한국어 콘텐츠 노트(role: note/context/decision/meeting)에서 아래 번역체·AI체 신호를 후보로 잡고, 맥락을 읽어 진짜 군더더기일 때만 finding을 냅니다(진짜 필요한 표현은 제외):
  • 문장 끝 "~것입니다"·"~할 수 있습니다"의 기계적 반복(한 문단 3회 이상)
  • 상투적 마무리어 뭉침: "종합적으로"·"결론적으로"·"요컨대"·"정리하자면"의 남발
  • 접속어 스태킹: "또한"·"게다가"·"뿐만 아니라"의 연속 사용
  • 강조어 인플레이션: "매우"·"굉장히"·"정말"·"너무"의 습관적 삽입
  • 번역체 조사구 남발: "~에 대해"·"~을 통해"·"~에 있어서"·"~와 관련하여"
  • 3개 병렬(rule of three)이 기계적으로 반복되는 문장
reasoning은 "이 문장이 왜 번역체이고 어떻게 고치면 자연스러운지"를 구체적으로 씁니다. CLAUDE.md·SKILL.md·.claude/rules·프론트매터·코드·URL·위키링크는 G7.5 대상에서 제외합니다(지시층·보호구역). 점수에는 G7의 일부로 반영(warn 가중치)
**G7.1 的替换改为依据韩语句法。**韩语 AI 写作中经常沿用从英语引入的 em dash,因此继续检测,但替换时不采用英语式冒号或分号,而应符合韩语的自然表达:
  • 连接两个分句且后半句对前半句进行补充 → 用句号拆句,或使用“即”“ soon soon”、逗号连接(冒号
    :
    在韩语散文中显得生硬,应避免)
  • 插入补充说明 → 使用逗号(
    , … ,
    )或括号(
    ( )
    )
  • 位于句末并承担句号作用 → 使用句号(
    . 
    )拆句
  • 数字或日期范围中的 en dash(
    100–200
    、
    2026–2027
    )保持不变(不构成违规)
  • 引文中的破折号保持原文
**G7.5——韩语 AI 文体气味(新增,severity: warn,fixable: 用户选择加入)。**在韩语内容笔记(role: note/context/decision/meeting)中,将以下翻译腔或 AI 腔信号作为候选项;只有结合上下文判断确属冗余时,才生成 finding(排除确有必要的表达):
  • 机械重复句尾“~것입니다”“~할 수 있습니다”(同一段落中出现 3 次以上)
  • 滥用套话式结语:“종합적으로”“결론적으로”“요컨대”“정리하자면”
  • 连用连接词:“또한”“게다가”“뿐만 아니라”
  • 习惯性插入强调词:“매우”“굉장히”“정말”“너무”
  • 滥用翻译腔结构:“~에 대해”“~을 통해”“~에 있어서”“~와 관련하여”
  • 机械性重复三个并列项的句式
reasoning 必须具体说明“为什么该句具有翻译腔,以及如何修改才能更自然”。CLAUDE.md、SKILL.md、.claude/rules、frontmatter、代码、URL 和 Wiki 链接不纳入 G7.5 检查范围(指令层与保护区)。该检查计入 G7 的部分得分(warn 权重)。

오버라이드 4 — HTML 리포트: 한국어 템플릿 사용

覆盖项 4——HTML 报告:使用韩语模板

Step 6에서 리포트를 만들 때
references/report-template.html
등은 이미 한국어 라벨로 번역돼 있습니다. 그대로 사용하고, 치환하는 값(reasoning·action·excerpt 설명)도 한국어로 채웁니다. Step 6.4의 최종 요약 블록도 한국어로 출력합니다(형식은 오버라이드 5).
在 Step 6 创建报告时,
references/report-template.html
等文件已翻译为韩语标签。直接使用,并使用韩语填充替换值(reasoning、action、excerpt 说明)。Step 6.4 的最终摘要块也使用韩语输出(格式见覆盖项 5)。

오버라이드 5 — 한국어 출력 문자열 (원본 영어 블록 대체)

覆盖项 5——韩语输出字符串(替换原版英文块)

본문에 나오는 아래 사용자 대면 문자열은 한국어로 출력합니다. 원본 영어 code block이 보이면 같은 정보를 한국어로 바꿔 냅니다:
  • Step 0 시작 안내: "9개 프레임워크로 볼트를 감사합니다. 먼저 폴더 구조를 파악하고(Step 1.5 — 폴더 이름을 가정하지 않습니다), 이후 모든 수정안을 항목별로 함께 검토합니다. 각 단계는 작업(task)으로 표시됩니다."
  • 볼트 아님 판정: "마크다운 볼트로 보이지 않습니다 — .md 파일이나 CLAUDE.md를 찾지 못했습니다. 볼트 루트로 이동한 뒤 다시 실행해 주세요."
  • 프레임워크 진행 라인: "F1 Anthropic CLAUDE.md — CLAUDE.md 14개 읽고 후보 312건 판단 → 22건 발견 (fail 5 · warn 17)" 형식
  • 최종 요약(Step 6.4 Part 3):
    ✅ 최적화 실행 완료 — 이번에 바뀐 내용입니다:
    리포트: {결정폴더}/{YYYY-MM-DD}-vault-audit.html
    JSON 원본: {결정폴더}/{YYYY-MM-DD}-vault-audit-findings.json
    점수(F1–G7): {전} → {후} ({부호}{델타}) — "{해석_전}" → "{해석_후}"
    파일 {N}개 감사 · 수정 {적용수}건 적용 · 기계적 실패 {실패수}건 (사유는 리포트 참고)
    em대시: {전} → {후} · 프론트매터 완결: {전}% → {후}% · 폴더 인덱스 커버리지: {전}% → {후}%
    절감 토큰: {절감}(에이전트 로드 {비율}% 감소) · 주 {세션}회 기준 연 ~{연간절감} 토큰 절약
    선택-walk 모드면 "계획 저장 {n}건 · 거절 {n}건" 줄을 덧붙입니다
正文中以下面向用户的字符串应使用韩语输出。如果出现原版英文代码块,则用相同信息生成韩语版本:
  • Step 0 开始提示:“9 个框架将对 Vault 进行审计。首先识别文件夹结构(Step 1.5——不预设文件夹名称),之后逐项共同审查所有修复方案。每个阶段都会显示为任务(task)。”
  • 判定不是 Vault:“看起来不是 Markdown Vault——未找到 .md 文件或 CLAUDE.md。请切换到 Vault 根目录后重新运行。”
  • 框架进度行:“F1 Anthropic CLAUDE.md——读取 14 个 CLAUDE.md,判断 312 个候选项 → 发现 22 项(fail 5 · warn 17)”格式
  • 最终摘要(Step 6.4 Part 3):
    ✅ 최적화 실행 완료 — 이번에 바뀐 내용입니다:
    리포트: {결정폴더}/{YYYY-MM-DD}-vault-audit.html
    JSON 원본: {결정폴더}/{YYYY-MM-DD}-vault-audit-findings.json
    점수(F1–G7): {전} → {후} ({부호}{델타}) — "{해석_전}" → "{해석_후}"
    파일 {N}개 감사 · 수정 {적용수}건 적용 · 기계적 실패 {실패수}건 (사유는 리포트 참고)
    em대시: {전} → {후} · 프론트매터 완결: {전}% → {후}% · 폴더 인덱스 커버리지: {전}% → {후}%
    절감 토큰: {절감}(에이전트 로드 {비율}% 감소) · 주 {세션}회 기준 연 ~{연간절감} 토큰 절약
    如果处于选择式 walk 模式,再添加“计划保存 {n} 项 · 拒绝 {n} 项”这一行。

오버라이드 6 — 점수 해석 표 (한국어)

覆盖项 6——得分解释表(韩语)

점수해석
90–100잘 다듬어짐. 월 1회 감사 권장
70–89드리프트 감지됨. 상위 발견 항목부터 처리
50–69비대화가 성능을 해치는 중
<50볼트 부패. 대대적 정리 필요

得分解释
90–100维护良好。建议每月审计一次
70–89已检测到漂移。请优先处理高优先级发现项
50–69膨胀正在损害性能
<50Vault 已腐化。需要大规模整理

Vault Optimizer (영어 원본 지시층 — 출력은 한국어)

Vault Optimizer(英文原版指令层——输出为韩语)

아래 본문은 영어 원본 지시입니다. 로직·구조·정규식은 그대로 따르되, 사용자에게 보이는 모든 출력은 상단 오버라이드 0에 따라 한국어로 냅니다.
Apply 9 frameworks to every markdown file in the vault. For each framework, read its pass-implementation file, run every check, log findings, walk the user through fixes per item, apply (or save to a plan). Save one comprehensive HTML report grouped by framework. Do not inline the HTML in chat — only the saved path and a one-paragraph summary.
以下正文为英文原版指令。逻辑、结构和正则表达式保持不变,但所有用户可见输出均按照上方覆盖项 0 使用韩语。
对 Vault 中每个 Markdown 文件应用 9 个框架。对于每个框架,读取其 pass 实现文件、运行所有检查、记录 finding、逐项引导用户进行修复,并应用修复或保存到计划。生成一份按框架分组的综合 HTML 报告。不要在聊天中内联 HTML——只提供保存路径和一段简短摘要。

Operating philosophy — read carefully, this is what makes this skill different

操作原则——请仔细阅读,这是本 Skill 的独特之处

  1. Every finding ships a concrete fix. No flag-only. No "warn and forget." No manual-review pile. When the user runs apply-mode, every finding becomes either an applied edit, a saved migration step in a dated reorg plan, or (only if the user explicitly declines this finding in walk) a recorded decline. Nothing lingers as an open warning across runs.
  2. Severity is informational, not gating.
    fail
    /
    warn
    /
    info
    describes how load-bearing the issue is; it does not gate whether a fix is offered. Every check produces fixes.
  3. Walk per item, user picks the target. Bulk-apply is reserved for purely mechanical fixes (em dashes, duplicate H1). Anything semantic — wikilink repointing, merges, routing rewrites, Plot.md generation, reorganizations — is walk-only with the user confirming the destination/winner/wording per item.
  4. Two modes for every fix: apply now (executes in this run) or save to plan (writes the change as a checklist step into
    Intelligence/decisions/{date}-reorg.md
    for staged execution). User picks per finding for high-blast-radius items. Smaller fixes default to apply-now.
  5. Visible progress, never silent. Step 0.5 creates one TaskCreate entry per stage and per framework; tasks update
    in_progress
    →
    completed
    as the run unfolds. The user watches the audit walk through the vault rather than waiting for one big report at the end.
  6. Read and reason, don't just match. Every framework's triggers surface candidates; every finding requires the agent to read context, judge alignment with the user's stated world, and produce reasoning specific to the case. No paraphrased rule restatements as "reasoning."
  7. Discover structure, never assume folder names. Vaults vary. One user's curated layer is
    Context/
    ; another's is
    About/
    ,
    Me/
    , frontmatter on root, or scattered across topic folders. The optimizer runs Step 1.5 (role discovery) before any framework, and every framework references roles (context-equivalent, decisions-equivalent, daily-equivalent, folder-index convention…) discovered from content — never hardcoded names. If a role is missing, it surfaces as a finding with a proposed fix ("you have no decisions-equivalent folder; here's a recommendation"), not as a silent assumption. Static path references in pass files are always abstractions; the agent resolves them through the role registry at run time.
  1. **每个 finding 都必须附带具体修复方案。**不能只标记问题,不能“警告后遗忘”,也不能留下待人工审查的积压项。用户运行 apply 模式时,每个 finding 都必须变为:已应用的编辑、写入带日期 reorg 计划中的迁移步骤,或者(仅当用户在 walk 中明确拒绝该项时)记录为拒绝决定。任何问题都不得作为未处理的警告跨运行保留。
  2. 严重级别仅用于说明,不作为处理门槛。
    fail
    /
    warn
    /
    info
    描述问题的影响程度,并不决定是否提供修复。每个检查项都必须产生修复方案。
  3. **逐项 walk,由用户选择目标。**批量应用仅限纯机械性修复(em dash、重复 H1)。所有语义型修复——Wiki 链接重定向、合并、路由重写、生成 Plot.md、重组——只能通过 walk 执行,并由用户逐项确认目标、保留项或措辞。
  4. **每项修复提供两种模式:**立即应用(在本次运行中执行)或保存到计划(将变更作为检查清单步骤写入
    Intelligence/decisions/{date}-reorg.md
    ,以便分阶段执行)。对于影响范围较大的项目,由用户逐项选择;较小的修复默认立即应用。
  5. **进度始终可见,不得静默运行。**Step 0.5 为每个阶段和框架创建一个 TaskCreate 条目;随着运行推进,任务从
    in_progress
    更新为
    completed
    。用户可以实时观察审计过程,无需等到最后才看到一份大报告。
  6. **阅读并推理,不要只做匹配。**每个框架的触发器负责发现候选项;每个 finding 都要求 Agent 阅读上下文、判断其是否与用户描述的世界一致,并给出针对具体案例的 reasoning。不得把规则的转述式复述作为“reasoning”。
  7. 发现结构,绝不预设文件夹名称。Vault 的结构各不相同。一个用户的策展层可能是
    Context/
    ,另一个则可能是
    About/
    、
    Me/
    、根目录 frontmatter,或分散在多个主题文件夹中。优化器必须在任何框架运行前执行 Step 1.5(角色发现),且每个框架都引用从内容中发现的
    角色
    (context-equivalent、decisions-equivalent、daily-equivalent、folder-index convention 等),绝不硬编码名称。如果缺少某个角色,应将其作为 finding 提出并附上建议修复(例如“你没有 decisions-equivalent 文件夹;建议如下”),而不能默默假设。pass 文件中的静态路径引用始终只是抽象概念;Agent 在运行时通过角色注册表解析这些路径。

Frameworks

框架

#FrameworkReference (the why)Pass file (the how)Applies to
F1Anthropic CLAUDE.md
references/anthropic-claude-md.md
references/passes-anthropic-claude-md.md
every
CLAUDE.md
F2Karpathy LLM Wiki
references/karpathy-llm-wiki.md
references/passes-karpathy-wiki.md
wiki content notes
F3Caveman compression
references/caveman-compression.md
references/passes-caveman.md
instruction-layer files
F4Chroma context rot
references/chroma-context-rot.md
references/passes-chroma-context-rot.md
every
.md
F5Anthropic Memory
references/anthropic-managed-memory.md
references/passes-anthropic-memory.md
every
.md
F6Progressive Disclosure
references/progressive-disclosure.md
references/passes-progressive-disclosure.md
every
SKILL.md
G7General Hygiene(project rules + practitioner notes)
references/passes-general-hygiene.md
every
.md
F8Reflection (Anthropic Dreams)
references/anthropic-dreams.md
references/passes-reflection.md
curated layer (
Context/
,
Projects/
,
Intelligence/decisions/
,
Resources/
); reads recent
Daily/
+
Intelligence/meetings/
as evidence
F9Architecture & Discoverability
references/anthropic-architecture.md
references/passes-architecture.md
whole vault — root CLAUDE.md, routing, every folder's
Plot.md
, the navigation chain end-to-end
When running a check, read the pass-implementation file and follow its regex / heuristic / finding format exactly. Don't paraphrase. Cite the framework reference in every finding.
#框架Reference(原理)Pass 文件(实现方式)适用范围
F1Anthropic CLAUDE.md
references/anthropic-claude-md.md
references/passes-anthropic-claude-md.md
所有
CLAUDE.md
F2Karpathy LLM Wiki
references/karpathy-llm-wiki.md
references/passes-karpathy-wiki.md
Wiki 内容笔记
F3Caveman compression
references/caveman-compression.md
references/passes-caveman.md
指令层文件
F4Chroma context rot
references/chroma-context-rot.md
references/passes-chroma-context-rot.md
所有
.md
F5Anthropic Memory
references/anthropic-managed-memory.md
references/passes-anthropic-memory.md
所有
.md
F6Progressive Disclosure
references/progressive-disclosure.md
references/passes-progressive-disclosure.md
所有
SKILL.md
G7General Hygiene(项目规则+实践者笔记)
references/passes-general-hygiene.md
所有
.md
F8Reflection(Anthropic Dreams)
references/anthropic-dreams.md
references/passes-reflection.md
策展层(
Context/
、
Projects/
、
Intelligence/decisions/
、
Resources/
);读取最近的
Daily/
和
Intelligence/meetings/
作为证据
F9Architecture & Discoverability
references/anthropic-architecture.md
references/passes-architecture.md
整个 Vault——根目录 CLAUDE.md、路由、每个文件夹的 Plot.md、端到端导航链
运行检查时,**读取 pass 实现文件,并严格遵循其中的正则表达式/启发式规则/finding 格式。**不得转述。每条 finding 都必须引用对应框架 reference。

Flow

流程

  1. Verify the cwd looks like a vault — light check (Step 0)
  2. Create the visible task list — TaskCreate one task per stage + framework (Step 0.5)
  3. Discover & classify every
    .md
    file
    — only technical skips (Step 1)
  4. Iterate frameworks F1 → F9, applying each framework's lens with agent judgment; F8 = cross-vault synthesis, F9 = whole-vault structural reasoning + discoverability walk (Step 2)
  5. Aggregate findings + write the architectural read paragraph (Steps 3 and 3.5)
  6. Walk every finding through apply-now / save-to-plan — no skip option for fixes; every finding becomes an applied edit, a saved migration step, or an explicit per-item user decline (Step 4)
  7. Apply approved fixes (Step 5)
  8. Render HTML dashboard, save, open in browser, emit as artifact (Step 6)

  1. 验证当前工作目录看起来像 Vault——轻量检查(Step 0)
  2. 创建可见任务列表——通过 TaskCreate 为每个阶段和框架创建一个任务(Step 0.5)
  3. 发现并分类每个
    .md
    文件
    ——只排除技术性文件(Step 1)
  4. 按顺序迭代框架 F1 → F9,结合 Agent 判断应用每个框架的视角;F8 执行跨 Vault 综合分析,F9 执行整体结构推理与可发现性 walk(Step 2)
  5. 汇总 finding 并撰写架构解读段落(Step 3 和 3.5)
  6. 逐项 walk 所有 finding,选择立即应用/保存到计划——不允许跳过修复;每条 finding 最终必须为已应用、已保存到计划、明确拒绝或执行失败(Step 4)
  7. 应用已批准的修复(Step 5)
  8. 渲染 HTML 仪表板、保存、在浏览器中打开并作为 artifact 输出(Step 6)

Step 0 — Verify the cwd looks like a vault

Step 0——验证当前工作目录看起来像 Vault

Don't require any specific folder layout. Check (any one is sufficient):
bash
test -f CLAUDE.md || test -f claude.md
[ "$(find . -maxdepth 4 -name 'CLAUDE.md' | head -1)" ]
[ "$(find . -maxdepth 1 -name '*.md' | wc -l)" -gt 0 ]
If none are true → stop:
마크다운 볼트로 보이지 않습니다 —
.md
파일이나
CLAUDE.md
를 찾지 못했습니다. 볼트 루트로
cd
한 뒤 다시 실행해 주세요.
Otherwise tell the user one line (한국어로 출력):
9개 프레임워크로 볼트를 감사합니다. 먼저 폴더 구조를 파악하고(Step 1.5 — 폴더 이름을 가정하지 않습니다), 이후 모든 수정안을 항목별로 함께 검토합니다. 각 단계는 작업(task)으로 표시됩니다.
Proceed into Step 0.5.

不要求任何特定文件夹布局。以下任意一项满足即可:
bash
test -f CLAUDE.md || test -f claude.md
[ "$(find . -maxdepth 4 -name 'CLAUDE.md' | head -1)" ]
[ "$(find . -maxdepth 1 -name '*.md' | wc -l)" -gt 0 ]
如果均不满足 → 停止:
看起来不是 Markdown Vault——未找到
.md
文件或
CLAUDE.md
。请
cd
到 Vault 根目录后重新运行。
否则向用户显示一行(使用韩语输出):
9 个框架将对 Vault 进行审计。首先识别文件夹结构(Step 1.5——不预设文件夹名称),之后逐项共同审查所有修复方案。每个阶段都会显示为任务(task)。
继续进入 Step 0.5。

Step 0.5 — Create the visible task list (TaskCreate)

Step 0.5——创建可见任务列表(TaskCreate)

This is mandatory. People running this skill on their second brain need to see what's happening — silent is unacceptable for a long-running vault audit.
Create one task per stage + one task per framework, in order. Use TaskCreate with explicit short titles. The user watches them tick through.
[ ] .md 파일 발견 및 분류 (Step 1)
[ ] 역할 발견 — 의미 기반 폴더/파일 분류, 이름 하드코딩 없음 (Step 1.5)
[ ] F1 Anthropic CLAUDE.md — CLAUDE.md 읽고 후보 판단
[ ] F2 Karpathy 위키 — 위키링크·고아 노트·스키마
[ ] F3 Caveman — 지시층 파일 압축
[ ] F4 Chroma Context Rot — 길이·방해요소·위치
[ ] F5 Anthropic Memory — 파일 크기·이름·인덱스
[ ] F6 Progressive Disclosure — SKILL.md 계층화
[ ] G7 위생 — em대시·프론트매터·H1·한국어 문체
[ ] F8 Reflection — 파일 간 종합 클러스터링·판단
[ ] F9 아키텍처 — 라우팅 진위·Plot.md 존재·탐색성 워크
[ ] 발견 집계 + 아키텍처 읽기 (Step 3 / 3.5)
[ ] 모든 발견을 적용/계획저장으로 워크 (Step 4)
[ ] 승인된 수정 적용 (Step 5)
[ ] 대시보드 렌더링 + 열기 (Step 6)
Mark
in_progress
when entering a stage;
completed
when leaving it. For long frameworks (F2, F8, F9) emit a sub-update mid-run via TaskUpdate or a single chat line so the user knows progress.
Skipping the task list to "save time" defeats the purpose of this skill. The visible task list is non-optional.

这是强制步骤。运行此 Skill 管理第二大脑的用户必须能够看到正在执行的内容;对于长时间的 Vault 审计,静默运行不可接受。
按顺序为每个阶段和每个框架创建一个任务。使用 TaskCreate 并提供明确、简短的标题,让用户看到任务逐一推进。
[ ] .md 파일 발견 및 분류 (Step 1)
[ ] 역할 발견 — 의미 기반 폴더/파일 분류, 이름 하드코딩 없음 (Step 1.5)
[ ] F1 Anthropic CLAUDE.md — CLAUDE.md 읽고 후보 판단
[ ] F2 Karpathy 위키 — 위키링크·고아 노트·스키마
[ ] F3 Caveman — 지시층 파일 압축
[ ] F4 Chroma Context Rot — 길이·방해요소·위치
[ ] F5 Anthropic Memory — 파일 크기·이름·인덱스
[ ] F6 Progressive Disclosure — SKILL.md 계층화
[ ] G7 위생 — em대시·프론트매터·H1·한국어 문체
[ ] F8 Reflection — 파일 간 종합 클러스터링·판단
[ ] F9 아키텍처 — 라우팅 진위·Plot.md 존재·탐색성 워크
[ ] 발견 집계 + 아키텍처 읽기 (Step 3 / 3.5)
[ ] 모든 발견을 적용/계획저장으로 워크 (Step 4)
[ ] 승인된 수정 적용 (Step 5)
[ ] 대시보드 렌더링 + 열기 (Step 6)
进入某阶段时标记为
in_progress
;离开时标记为
completed
。对于耗时较长的框架(F2、F8、F9),可通过 TaskUpdate 或一条聊天消息发出中途更新,让用户了解进度。
为了“节省时间”而跳过任务列表违背了本 Skill 的目的。可见任务列表不可省略。

Step 1 — Discover & classify every
.md
file

Step 1——发现并分类每个
.md
文件

1.1 — Universal glob (every file audited)

1.1——通用 glob(审计每个文件)

bash
find . -name '*.md' \
  -not -path '*/.git/*' \
  -not -path '*/.obsidian/*' \
  -not -path '*/.trash/*' \
  -not -path '*/.claude/worktrees/*' \
  -not -path '*/node_modules/*' \
  -not -path '*/dist/*' \
  -not -path '*/build/*'
No role-based skips. No "templates skipped", no "Daily skipped", no "Onboarding skipped". Every
.md
outside the technical skip list above gets audited against every framework rule that applies to its role. Classification routes the right rules to the right files; classification does NOT exclude files.
bash
find . -name '*.md' \
  -not -path '*/.git/*' \
  -not -path '*/.obsidian/*' \
  -not -path '*/.trash/*' \
  -not -path '*/.claude/worktrees/*' \
  -not -path '*/node_modules/*' \
  -not -path '*/dist/*' \
  -not -path '*/build/*'
**不按角色跳过文件。**不得跳过“模板”“Daily”“Onboarding”等内容。除上述技术性排除列表外,每个
.md
文件都应根据适用于其角色的所有框架规则接受审计。分类用于将正确规则路由到正确文件;分类本身不会排除文件。

1.2 — Classify each file by role (first match wins) — hints only

1.2——按角色分类每个文件(首个匹配优先)——仅作为提示

The patterns below are hints that bias the role registry built in Step 1.5. They're not authoritative — Step 1.5 reads sample content to confirm role assignments. A file matching
\d{4}-\d{2}-\d{2}\.md
outside any daily-shaped folder will not be classified
daily
if Step 1.5 finds no daily role; it'll be a regular note.
For backwards compatibility with vaults that do use the conventional names, the patterns still apply; for vaults that don't, Step 1.5 takes over.
RoleDetection
root-claude
./CLAUDE.md
or
./claude.md
(cwd root only)
folder-claude
any other
CLAUDE.md
/
claude.md
in subfolders
claude-rules
files inside
.claude/rules/
skill
SKILL.md
files (anywhere)
index
index.md
(case-insensitive)
readme
README.md
(case-insensitive)
daily
matches
\d{4}-\d{2}-\d{2}\.md
inside any
Daily/
meeting
inside
*meetings*/
or filename matches
\d{4}-\d{2}-\d{2} - .+\.md
outside
Daily/
transcript
inside
*transcripts*/
or files >100KB
decision
inside
*decisions*/
template
inside
*templates*/
or filename ends
-template.md
context
inside any
Context/
(case-insensitive)
note
everything else
Build the classification map:
json
{
  "root_claude": "./CLAUDE.md",
  "folder_claudes": [...],
  "claude_rules": [...],
  "skills": [...],
  "indexes": [...],
  "readmes": [...],
  "dailies": [...],
  "meetings": [...],
  "transcripts": [...],
  "decisions": [...],
  "templates": [...],
  "context_files": [...],
  "notes": [...],
  "by_folder": {...},
  "stats": {"total_files": N, "total_bytes": B, "folders": F}
}
以下模式只是提示,用于影响 Step 1.5 构建的角色注册表,不具有权威性。Step 1.5 会读取样本内容以确认角色分配。如果某个位于 daily 形态文件夹之外的文件匹配
\d{4}-\d{2}-\d{2}\.md
,但 Step 1.5 未发现 daily 角色,则该文件会被分类为普通 note。
为了兼容确实使用常规名称的 Vault,这些模式仍然适用;对于不使用常规名称的 Vault,则由 Step 1.5 接管。
角色检测方式
root-claude
./CLAUDE.md
或
./claude.md
(仅限当前工作目录根目录)
folder-claude
子文件夹中的其他
CLAUDE.md
/
claude.md
claude-rules
.claude/rules/
内的文件
skill
任意位置的
SKILL.md
文件
index
index.md
(不区分大小写)
readme
README.md
(不区分大小写)
daily
任意
Daily/
内匹配
\d{4}-\d{2}-\d{2}\.md
的文件
meeting
位于
*meetings*/
内,或位于
Daily/
外且文件名匹配
\d{4}-\d{2}-\d{2} - .+\.md
transcript
位于
*transcripts*/
内,或文件大于 100KB
decision
位于
*decisions*/
内
template
位于
*templates*/
内,或文件名以
-template.md
结尾
context
位于任意
Context/
内(不区分大小写)
note
其他所有文件
构建分类映射:
json
{
  "root_claude": "./CLAUDE.md",
  "folder_claudes": [...],
  "claude_rules": [...],
  "skills": [...],
  "indexes": [...],
  "readmes": [...],
  "dailies": [...],
  "meetings": [...],
  "transcripts": [...],
  "decisions": [...],
  "templates": [...],
  "context_files": [...],
  "notes": [...],
  "by_folder": {...},
  "stats": {
    "total_files": N,
    "total_bytes": B,
    "folders": F
  }
}

1.3 — Build supporting indexes (used by F2/F4)

1.3——构建辅助索引(供 F2/F4 使用)

IndexBuilt fromUsed by
vault_filename_index
every
.md
basename, lowercased, with and without extension
F2.2, F2.4
inbound_link_index
grep across vault for `[[name(|]
routing_table
root CLAUDE.md routing/knowledge-routing sectionF2.6
top_level_entries
find . -maxdepth 1
F2.6
headers_index
per-file H2/H3 list with line numbers + byte sizesF3.6, F5.2
protected_zones_map
per-file map of code/URL/path/frontmatter/wikilink spansF3.x, G7.1
索引构建来源使用方
vault_filename_index
每个
.md
的 basename,转换为小写,并同时保留含扩展名和不含扩展名的形式
F2.2、F2.4
inbound_link_index
在整个 Vault 中 grep `[[name(|]
routing_table
根目录 CLAUDE.md 中的 routing/knowledge-routing 章节F2.6
top_level_entries
find . -maxdepth 1
F2.6
headers_index
每个文件的 H2/H3 列表、行号和字节大小F3.6、F5.2
protected_zones_map
每个文件中代码、URL、路径、frontmatter 和 Wiki 链接区段映射F3.x、G7.1

1.4 — Show classification summary in chat (one block, before any framework runs)

1.4——在聊天中显示分类摘要(一个块,在任何框架运行前)

markdown
undefined
markdown
undefined

📋 Discovery — {N} markdown files across {F} folders, {B-formatted} total

📋 Discovery — {N} markdown files across {F} folders, {B-formatted} total

RoleCount
Root CLAUDE.md1
Folder CLAUDE.mds{n}
Skills (SKILL.md){n}
.claude/rules{n}
Indexes / READMEs{n}
Context files{n}
Notes{n}
Dailies{n}
Meetings{n}
Transcripts{n}
Decisions{n}
Templates{n}
Framework targets (every file in scope is audited):
  • F1 Anthropic CLAUDE.md → {n} CLAUDE.md files
  • F2 Karpathy Wiki → {n} content notes (notes + context + decision + meeting + index + readme) + 1 schema doc check
  • F3 Caveman → {n} instruction-layer files (CLAUDE.md + SKILL.md + .claude/rules + skill references)
  • F4 Chroma Context Rot → {N} files (every
    .md
    )
  • F5 Anthropic Memory → {N} files (every
    .md
    )
  • F6 Progressive Disclosure → {n} skills
  • G7 General Hygiene → {N} files
  • F8 Reflection → {n} files in discovered curated-layer roles + {n} files in discovered session-layer roles ({window} window) for cross-vault synthesis
  • F9 Architecture → routing table ({n} entries), {n} folders for index presence + freshness against the discovered convention, full navigation graph for discoverability, vault-specific orientation built from the discovered identity-layer
Running role discovery (Step 1.5) now…

---
RoleCount
Root CLAUDE.md1
Folder CLAUDE.mds{n}
Skills (SKILL.md){n}
.claude/rules{n}
Indexes / READMEs{n}
Context files{n}
Notes{n}
Dailies{n}
Meetings{n}
Transcripts{n}
Decisions{n}
Templates{n}
Framework targets (every file in scope is audited):
  • F1 Anthropic CLAUDE.md → {n} CLAUDE.md files
  • F2 Karpathy Wiki → {n} content notes (notes + context + decision + meeting + index + readme) + 1 schema doc check
  • F3 Caveman → {n} instruction-layer files (CLAUDE.md + SKILL.md + .claude/rules + skill references)
  • F4 Chroma Context Rot → {N} files (every
    .md
    )
  • F5 Anthropic Memory → {N} files (every
    .md
    )
  • F6 Progressive Disclosure → {n} skills
  • G7 General Hygiene → {N} files
  • F8 Reflection → {n} files in discovered curated-layer roles + {n} files in discovered session-layer roles ({window} window) for cross-vault synthesis
  • F9 Architecture → routing table ({n} entries), {n} folders for index presence + freshness against the discovered convention, full navigation graph for discoverability, vault-specific orientation built from the discovered identity-layer
Running role discovery (Step 1.5) now…

---

Step 1.5 — Role discovery (semantic, not name-based)

Step 1.5——角色发现(基于语义,而非名称)

This step replaces every hardcoded assumption about folder/file names. The pass files reference roles (
context
,
projects
,
decisions
,
daily
,
meetings
,
transcripts
,
resources
,
skills
,
archive
,
identity
,
folder_index_convention
). Step 1.5 discovers what folder/file in this vault plays each role — or records that the role is absent.
**此步骤取代所有对文件夹/文件名称的硬编码假设。**pass 文件引用的是角色(
context
、
projects
、
decisions
、
daily
、
meetings
、
transcripts
、
resources
、
skills
、
archive
、
identity
、
folder_index_convention
)。Step 1.5 负责发现此 Vault 中承担各角色的文件夹/文件,或记录该角色缺失。

1.5.1 — How discovery works

1.5.1——发现过程

For each abstract role, the agent does the following — in order — until something resolves:
  1. Read folder names + Plot/README/index/CLAUDE files at the top level, then top-2-deep. Build a candidate list: which folders look like they could play this role based on name + their own description?
  2. Read 3–5 sample files per candidate folder. Does the content match the role's purpose?
  3. Score and pick. Highest-confidence candidate wins. If no candidate clears medium confidence → role is
    missing
    .
The agent does not privilege a specific folder name.
Context/
,
About/
,
Me/
,
Personal/
,
Identity/
, or a frontmatter section on root CLAUDE.md can all play the
identity
role. The agent decides by reading.
对于每个抽象角色,Agent 按以下顺序执行,直至找到对应项:
  1. **读取顶层及向下两层深度的文件夹名称,以及 Plot/README/index/CLAUDE 文件。**构建候选列表:哪些文件夹的名称及其自身描述看起来可能承担该角色?
  2. **每个候选文件夹读取 3~5 个样本文件。**内容是否与该角色的用途相符?
  3. **评分并选择。**置信度最高的候选获胜。如果没有候选达到中等置信度,则角色为
    missing
    。
Agent 不偏向任何特定文件夹名称。
Context/
、
About/
、
Me/
、
Personal/
、
Identity/
,甚至根目录 CLAUDE.md 中的某个 frontmatter 区域,都可以承担
identity
角色。Agent 通过阅读作出判断。

1.5.2 — Standard roles (patterns the agent recognizes)

1.5.2——标准角色(Agent 可识别的模式)

These are patterns, not an exhaustive taxonomy. Every folder/file gets classified — these standard roles match the common shapes; anything that doesn't match becomes a custom role (Step 1.5.3).
Standard roleDefault layerWhat it isHow to recognize it
identity
curatedFiles describing the user/operator (who they are, what they do, voice, preferences)First-person bio content; mentions of role/title; voice or style guidelines
context
curatedFolder(s) holding canonical knowledge about the user's world (business, strategy, brand, team, stakeholders) — broader than identityDeclarative present-tense facts about the operating environment; named entities (company, products, key people)
projects
curatedActive or recent work unitsFolder names matching projects mentioned in identity/context; per-folder index describing scope, status, deadlines
decisions
curatedPersistent decision recordsFiles with date prefixes containing decision language ("decided", "chose", "going with")
daily
sessionPer-day journals or logsFilenames matching
YYYY-MM-DD\.md
; folder organized by date hierarchy
meetings
sessionMeeting notesFilenames with date + person/topic; content with attendee lists, action items
transcripts
sessionRaw call/voice transcripts>100KB files with monologue/dialogue formatting
resources
curatedReference library (prompts, frameworks, swipe files, templates)Reusable assets, not project-specific; often nested by category
skills
curatedSkill / SOP / playbook content the user owns
SKILL.md
files, or markdown describing repeatable processes/playbooks
archive
archiveIntentionally deactivated contentFolder named archive/old/deprecated/_archive, or files marked archived in frontmatter
folder_index_convention
(meta)The user's chosen per-folder index file nameMost-frequent filename across folders that functions as an index (
Plot.md
,
README.md
,
index.md
,
_index.md
,
CLAUDE.md
, etc.)
这些是模式,并非穷尽式分类法。每个文件夹/文件都必须分类;匹配标准角色的内容按常见形态处理,其余内容归为自定义角色(Step 1.5.3)。
标准角色默认层级含义识别方式
identity
curated描述用户/操作者的文件(用户是谁、做什么、语气、偏好)第一人称个人介绍;提及角色或职位;语气/风格指南
context
curated保存用户世界的权威知识的文件夹(业务、战略、品牌、团队、利益相关者),范围比 identity 更广关于运营环境的现在时事实;命名实体(公司、产品、关键人员)
projects
curated当前或近期的工作单元文件夹名称与 identity/context 中提到的项目匹配;每个文件夹的索引描述范围、状态、截止日期
decisions
curated持久化决策记录带日期前缀且包含决策语言的文件(“decided”“chose”“going with”)
daily
session每日日志或记录文件名匹配
YYYY-MM-DD\.md
;文件夹按日期层级组织
meetings
session会议笔记文件名包含日期+人员/主题;内容包含参与者列表、行动项
transcripts
session原始通话/语音记录大于 100KB,包含独白/对话格式
resources
curated参考资料库(提示词、框架、模板、素材)可复用资产,不属于特定项目;通常按类别嵌套
skills
curated用户拥有的 Skill/SOP/Playbook 内容
SKILL.md
文件,或描述可重复流程/Playbook 的 Markdown
archive
archive故意停用的内容文件夹名为 archive/old/deprecated/_archive,或 frontmatter 标记为 archived
folder_index_convention
(meta)用户选择的每文件夹索引文件名跨文件夹最常见且具有索引功能的文件名(
Plot.md
、
README.md
、
index.md
、
_index.md
、
CLAUDE.md
等)

1.5.3 — Custom roles (every other folder)

1.5.3——自定义角色(其他所有文件夹)

After standard-role discovery, every remaining top-level folder and every meaningful subfolder must be classified, not ignored. For each unclassified folder:
  1. Read the folder's index file (under the discovered convention) if present.
  2. Sample 3–5 files in the folder. Read first 1500 chars + headers.
  3. Read the parent folder's index (if any) to see how this folder is described upstream.
  4. Assign a custom role:
    • name
      — a slug derived from the folder name plus content (e.g.,
      Building/
      with prototype-build content → role name
      building
      ;
      Garden/
      with idea-incubation content →
      garden
      ).
    • layer
      — one of
      curated
      (canonical, durable),
      session
      (ephemeral, time-stamped),
      archive
      (deactivated),
      meta
      (tooling, system files),
      unknown
      (agent could not confidently classify).
    • purpose
      — 1-line description of what the folder holds.
    • is_standard: false
      .
    • confidence: high | medium | low
      .
If the agent cannot confidently assign a layer (confidence low) → emit an F9.0 finding asking the user to clarify the folder's purpose during walk. The answer persists in the registry going forward.
Custom roles are first-class. F8, F9, and the per-finding fixers operate on roles by layer, not by membership in the standard-role list. A custom
building
role with
layer: curated
participates in F8's curated-layer synthesis exactly like the standard
context
role.
完成标准角色发现后,**每个尚未分类的顶层文件夹和每个有意义的子文件夹都必须分类,不得忽略。**对于每个未分类文件夹:
  1. 如果存在索引文件,则按照已发现的约定读取该文件。
  2. 从该文件夹采样 3~5 个文件。读取前 1500 个字符和标题。
  3. 读取父文件夹的索引(如果存在),了解上游如何描述该文件夹。
  4. 分配自定义角色:
    • name
      ——根据文件夹名称和内容生成的 slug,例如
      Building/
      包含原型构建内容 → 角色名为
      building
      ;
      Garden/
      包含创意孵化内容 → 角色名为
      garden
      。
    • layer
      ——
      curated
      (权威、持久)、
      session
      (临时、带时间戳)、
      archive
      (已停用)、
      meta
      (工具与系统文件)或
      unknown
      (Agent 无法有把握地分类)。
    • purpose
      ——用一行描述该文件夹保存的内容。
    • is_standard: false
      。
    • confidence: high | medium | low
      。
如果 Agent 无法有把握地分配层级(置信度低),则生成 F9.0 finding,要求用户在 walk 中说明文件夹用途。回答会持续保存在角色注册表中。
**自定义角色属于一等角色。**F8、F9 和各 finding 修复器依据层级而非标准角色列表中的成员资格进行操作。例如,自定义
building
角色的
layer: curated
,则它会像
Context/
一样参与 F8 的策展层综合分析。

1.5.4 — Output: the role registry

1.5.4——输出:角色注册表

Build this once, cache for the rest of the run, and persist to
.claude/vault-roles.json
at end of Step 1.5 so future runs start from confirmed assignments instead of re-prompting:
json
{
  "vault_root": "./",
  "discovered_at": "2026-05-08T14:23:00Z",
  "folder_index_convention": {
    "name": "README.md",
    "confidence": "high",
    "evidence": "23 of 31 non-trivial folders have README.md",
    "coverage": 0.74
  },
  "roles": [
    {"name": "identity",  "path": "./About/me.md", "kind": "file",   "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Operator bio + voice"},
    {"name": "context",   "path": "./Knowledge/",  "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Org/strategy/brand canonical knowledge"},
    {"name": "projects",  "path": "./Work/",       "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Active and recent work units"},
    {"name": "daily",     "path": "./Journal/",    "kind": "folder", "layer": "session", "is_standard": true,  "confidence": "medium", "purpose": "Per-day journal entries"},
    {"name": "resources", "path": "./Library/",    "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Prompts, frameworks, templates"},
    {"name": "archive",   "path": "./_archive/",   "kind": "folder", "layer": "archive", "is_standard": true,  "confidence": "high",   "purpose": "Deactivated content"},
    {"name": "building",  "path": "./Building/",   "kind": "folder", "layer": "curated", "is_standard": false, "confidence": "high",   "purpose": "Active prototype builds and experiments"},
    {"name": "garden",    "path": "./Garden/",     "kind": "folder", "layer": "curated", "is_standard": false, "confidence": "medium", "purpose": "Long-form essays in slow incubation"},
    {"name": "inbox",     "path": "./Inbox/",      "kind": "folder", "layer": "session", "is_standard": false, "confidence": "high",   "purpose": "Unprocessed capture; aged out into Garden or Resources"}
  ],
  "missing_standard_roles": ["decisions", "meetings", "transcripts"],
  "low_confidence_roles": ["garden"],
  "unconfirmed_custom_roles": []
}
构建一次,在本次运行余下阶段中缓存,并在 Step 1.5 结束时持久化到
.claude/vault-roles.json
,使后续运行可以从已确认的分配开始,而不是重新提问:
json
{
  "vault_root": "./",
  "discovered_at": "2026-05-08T14:23:00Z",
  "folder_index_convention": {
    "name": "README.md",
    "confidence": "high",
    "evidence": "23 of 31 non-trivial folders have README.md",
    "coverage": 0.74
  },
  "roles": [
    {"name": "identity",  "path": "./About/me.md", "kind": "file",   "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Operator bio + voice"},
    {"name": "context",   "path": "./Knowledge/",  "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Org/strategy/brand canonical knowledge"},
    {"name": "projects",  "path": "./Work/",       "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Active and recent work units"},
    {"name": "daily",     "path": "./Journal/",    "kind": "folder", "layer": "session", "is_standard": true,  "confidence": "medium", "purpose": "Per-day journal entries"},
    {"name": "resources", "path": "./Library/",    "kind": "folder", "layer": "curated", "is_standard": true,  "confidence": "high",   "purpose": "Prompts, frameworks, templates"},
    {"name": "archive",   "path": "./_archive/",   "kind": "folder", "layer": "archive", "is_standard": true,  "confidence": "high",   "purpose": "Deactivated content"},
    {"name": "building",  "path": "./Building/",   "kind": "folder", "layer": "curated", "is_standard": false, "confidence": "high",   "purpose": "Active prototype builds and experiments"},
    {"name": "garden",    "path": "./Garden/",     "kind": "folder", "layer": "curated", "is_standard": false, "confidence": "medium", "purpose": "Long-form essays in slow incubation"},
    {"name": "inbox",     "path": "./Inbox/",      "kind": "folder", "layer": "session", "is_standard": false, "confidence": "high",   "purpose": "Unprocessed capture; aged out into Garden or Resources"}
  ],
  "missing_standard_roles": ["decisions", "meetings", "transcripts"],
  "low_confidence_roles": ["garden"],
  "unconfirmed_custom_roles": []
}

1.5.5 — Show the discovery summary in chat (one block)

1.5.5——在聊天中显示发现摘要(一个块)

Frame this as "here's the structure I see in your vault" — not "here's what's missing from a checklist." The user's structure is the source of truth; the BenAI standard taxonomy is just one of the lenses the agent uses to recognize patterns.
markdown
undefined
将其表述为“以下是我在您的 Vault 中看到的结构”,而不是“以下是检查表中缺少的内容”。用户的结构才是事实来源;BenAI 标准分类法只是 Agent 用于识别模式的一种视角。
markdown
undefined

🔍 Your vault structure — {N_folders} folders classified

🔍 Your vault structure — {N_folders} folders classified

FolderRoleLayerPurposeConfidence
./About/me.mdidentitycuratedOperator bio + voicehigh
./Knowledge/contextcuratedOrg/strategy/brandhigh
./Work/projectscuratedActive and recent workhigh
./Journal/dailysessionPer-day journalmedium
./Library/resourcescuratedPrompts, frameworks, templateshigh
./_archive/archivearchiveDeactivated contenthigh
./Building/building (custom)curatedActive prototype buildshigh
./Garden/garden (custom)curatedLong-form essays in slow incubationmedium
./Inbox/inbox (custom)sessionUnprocessed capturehigh
Folder-index convention I detected: README.md (74% coverage)
I'll audit this structure as it stands. F9.0 may suggest specific structural improvements where I see concrete evidence they'd help your vault (not just because BenAI uses them) — you'll review each suggestion in walk. Confirmed assignments persist to
.claude/vault-roles.json
.
Running F1 now…

The summary frames *what the user has* first. F9.0 findings about gaps appear later in the walk, with reasoning grounded in observed problems — not as a deficiency table at discovery time.
FolderRoleLayerPurposeConfidence
./About/me.mdidentitycuratedOperator bio + voicehigh
./Knowledge/contextcuratedOrg/strategy/brandhigh
./Work/projectscuratedActive and recent workhigh
./Journal/dailysessionPer-day journalmedium
./Library/resourcescuratedPrompts, frameworks, templateshigh
./_archive/archivearchiveDeactivated contenthigh
./Building/building (custom)curatedActive prototype buildshigh
./Garden/garden (custom)curatedLong-form essays in slow incubationmedium
./Inbox/inbox (custom)sessionUnprocessed capturehigh
Folder-index convention I detected: README.md (74% coverage)
I'll audit this structure as it stands. F9.0 may suggest specific structural improvements where I see concrete evidence they'd help your vault (not just because BenAI uses them) — you'll review each suggestion in walk. Confirmed assignments persist to
.claude/vault-roles.json
.
Running F1 now…

摘要应首先呈现“用户拥有什么”。F9.0 关于缺失项的 finding 会在后续 walk 中出现,其 reasoning 必须建立在已观察到的问题上,而不能在发现阶段将其呈现为缺陷表。

1.5.6 — Hard rules for downstream frameworks

1.5.6——下游框架的硬性规则

  • Frameworks reference roles by layer, not by name. F8's curated layer = every role with
    layer == 'curated'
    (standard or custom). F8's session layer = every role with
    layer == 'session'
    . F9 walks every folder regardless of role membership.
  • Custom roles participate in every framework that operates on their layer. If
    building
    is
    layer: curated
    , F8 looks at
    Building/
    for merge candidates, contradictions, themes, and promotions exactly like
    Context/
    .
  • Missing roles never block a framework. If
    decisions
    is missing, F8 proceeds without it; F9.0 produces a finding suggesting the user create one (or assign the role to an existing custom folder).
  • The folder-index convention is what F9.2 enforces — not Plot.md by default. If the user's vault uses README.md, F9.2 generates/refreshes README.md. If no convention exists, F9.0 proposes adopting one.
  • Persisted registry is read at the start of Step 1.5. If
    .claude/vault-roles.json
    exists from a prior run, the agent loads it as the baseline and only re-classifies new folders or folders the user flagged for re-review. Confirmed assignments don't re-prompt every run.
  • No framework hardcodes folder paths or file names. Examples in pass files are illustrative; runtime resolves through the registry.

  • **框架依据层级而非名称引用角色。**F8 的 curated layer=所有
    layer == 'curated'
    的角色(标准或自定义)。F8 的 session layer=所有
    layer == 'session'
    的角色。F9 遍历每个文件夹,不考虑角色成员资格。
  • **自定义角色参与所有 operates on their layer 的框架。**如果
    building
    的
    layer: curated
    ,F8 就会像处理
    Context/
    一样,在
    Building/
    中寻找合并候选、矛盾、主题和提升机会。
  • **缺失角色不会阻止框架运行。**如果缺少
    decisions
    ,F8 继续运行;F9.0 会生成建议用户创建该文件夹(或将现有自定义文件夹指定为对应角色)的 finding。
  • F9.2 强制执行的是已发现的文件夹索引约定,而不是默认使用 Plot.md。如果用户的 Vault 使用 README.md,F9.2 就生成/刷新 README.md。如果不存在约定,F9.0 会建议采用一种约定。
  • **Step 1.5 开始时读取已持久化的注册表。**如果存在先前运行生成的
    .claude/vault-roles.json
    ,Agent 将其作为基线加载,只重新分类新文件夹或用户标记为需要重新审查的文件夹。已确认的分配不会在每次运行时重新提问。
  • **任何框架都不得硬编码文件夹路径或文件名。**pass 文件中的示例仅作说明;运行时通过注册表解析。

Step 2 — Iterate frameworks F1 → F9 with judgment

Step 2——结合判断迭代框架 F1 → F9

This is not a regex pass. For each framework, read its pass-implementation file, then apply every check it defines to the files in that framework's scope. Triggers in the pass files surface candidates; the agent reads context and judges each candidate before producing a finding. Every finding includes
reasoning
specific to the case.
Why: a regex match on
\bjust\b
flags "just run X" (where "just" is doing real work — contrasting with running multiple) the same as "It's just a quick check" (where it's filler). Only an agent reading the line in context can tell which is which. The same applies to "be careful" (sometimes a closing reminder, sometimes a vague platitude),
IMPORTANT:
(sometimes earned, sometimes inflation),
voice.md
+
brand.md
(sometimes overlapping, sometimes intentionally separated), and most other framework signals.
**这不是简单的正则扫描。**对于每个框架,先读取其 pass 实现文件,再将该框架定义的所有检查应用到其范围内的文件。pass 文件中的触发器负责发现候选项;Agent 阅读上下文并判断每个候选项,然后才生成 finding。每条 finding 的
reasoning
必须针对具体案例。
原因:正则匹配
\bjust\b
会将“just run X”(这里 just 实际表达与运行多个选项的对比)和“It's just a quick check”(这里 just 只是填充词)视为同一问题。只有阅读上下文的 Agent 才能区分二者。同样的道理适用于“be careful”(有时是结尾提醒,有时只是空泛套话)、
IMPORTANT:
(有时确有价值,有时只是强调过度)、
voice.md
+
brand.md
(有时重叠,有时是有意分离),以及大多数其他框架信号。

2.1 — For each framework F1, F2, F3, F4, F5, F6, G7, F8, F9 (in this order)

2.1——依次处理每个框架 F1、F2、F3、F4、F5、F6、G7、F8、F9

F8 runs second-to-last (cross-file synthesis). F9 runs last because it consumes the structural picture F1–G7 produced and operates on the largest blast radius (whole-vault structural reasoning, Plot.md generation, reorg proposals). Running them last keeps fix application ordered smallest-to-largest in Step 5.
Update the TaskCreate task for the current framework to
in_progress
before starting it;
completed
when its findings are logged. Mid-framework sub-updates allowed for long runs (F2, F8, F9).
For each framework:
  1. Read the pass-implementation file for that framework (e.g.,
    references/passes-anthropic-claude-md.md
    for F1). Cache it for the duration of the framework run.
  2. Determine the file scope from the table at the top of this SKILL.md (e.g., F1 = every CLAUDE.md; F6 = every SKILL.md; F4/F5/G7 = every
    .md
    ).
  3. For each check in the pass file:
    • Apply the trigger heuristic (regex / metric / structural pattern) to surface candidates fast. Some checks have no trigger — the file itself is the candidate.
    • For each candidate, read the surrounding 5–15 lines with the
      Read
      tool, then apply the agent-judgment criteria the pass file lists. Read other files (linked targets, sibling clusters, the file's index) when judgment requires it.
    • Decide: does this case actually violate the framework rule in this file's specific context? Or is it a false positive (the pass file lists common ones to skip)?
    • If real → produce a finding. If not → drop it; the trigger was a candidate, not a verdict.
    • Every finding includes a
      reasoning
      field
      (1–2 sentences specific to this case, not a generic restatement of the rule).
  4. Run the framework's vault-wide checks (using indexes from Step 1.3): orphan detection, dead wikilinks, distractor pairs, schema compliance, etc. — see each pass file's "vault-wide" sections.
  5. Emit one progress line when the framework completes:
    F1 Anthropic CLAUDE.md — read 14 CLAUDE.md files, judged 312 candidates → 22 findings (5 fail · 17 warn)
    The
    judged
    count vs
    findings
    count is a sanity check: if they're roughly equal, the run was lazy (regex candidates became findings without judgment); if
    judged
    ≫
    findings
    , judgment is filtering false positives — that's the intended behavior.
F8 倒数第二个运行(跨文件综合分析)。F9 最后运行,因为它会消费 F1~G7 产生的结构信息,并作用于影响范围最大的整体 Vault 结构推理(Plot.md 生成、重组提案)。最后运行可确保 Step 5 按从最小到最大的顺序应用修复。
**开始当前框架前,将对应的 TaskCreate 任务更新为
in_progress
;记录完 finding 后更新为
completed
。**耗时较长的运行允许进行中途更新(F2、F8、F9)。
对于每个框架:
  1. **读取该框架的 pass 实现文件。**例如,F1 对应
    references/passes-anthropic-claude-md.md
    。在该框架运行期间缓存此文件。
  2. **根据本 SKILL.md 顶部的表格确定文件范围。**例如,F1=每个 CLAUDE.md;F6=每个 SKILL.md;F4/F5/G7=每个
    .md
    。
  3. 对于 pass 文件中的每项检查:
    • 应用触发启发式规则(正则表达式/指标/结构模式),快速发现候选项。有些检查没有触发器,此时整个文件就是候选项。
    • 对每个候选项,使用
      Read
      工具读取周边 5~15 行,然后应用 pass 文件列出的 Agent 判断标准。需要时读取其他文件(链接目标、同级簇、文件索引)。
    • 判断:该案例是否确实在此文件的特定上下文中违反框架规则?还是属于误报(pass 文件会列出应跳过的常见情况)?
    • 如果属实 → 生成 finding。如果不属实 → 丢弃;触发器只提供候选项,而不是结论。
    • 每条 finding 都包含
      reasoning
      字段
      (1~2 个针对具体案例的句子,而不是对规则的泛化复述)。
  4. 运行该框架的全局检查(使用 Step 1.3 中的索引):孤儿检测、无效 Wiki 链接、干扰项配对、schema 合规性等——参见各 pass 文件的“vault-wide”章节。
  5. 框架完成时输出一条进度行:
    F1 Anthropic CLAUDE.md——读取 14 个 CLAUDE.md,判断 312 个候选项 → 发现 22 项(5 fail · 17 warn)
    judged
    数量与
    findings
    数量的对比是一项合理性检查:如果两者大致相等,说明运行过程偷懒了(正则候选项未经判断便直接变成 finding);如果
    judged
    远大于
    findings
    ,则说明判断过程过滤了误报,这正是预期行为。

2.2 — Reasoning sanity gate (per framework)

2.2——Reasoning 合理性门槛(每个框架)

After completing each framework's run, sample 5 random findings (or all findings if < 5). Read each one's
reasoning
field. If > 40% of sampled reasonings are paraphrases of the rule rather than case-specific judgment ("This file uses too many em dashes" — paraphrase; "These em dashes appear in callout headers where the writer was substituting for colons; replacing with colons preserves the cadence" — judgment), stop and re-run that framework with deeper reads.
This is a hard gate. The skill's value is judgment, not regex. Shipping a framework's findings without enforcing this gate is a bug.
完成每个框架后,随机抽取 5 条 finding(不足 5 条则全部抽取),逐一阅读其
reasoning
字段。如果抽样中有超过 40% 的 reasoning 只是对规则进行转述,而不是针对案例作出判断(例如“这个文件使用了过多 em dash”属于转述;“这些 em dash 出现在 callout 标题中,作者用它们代替冒号;改用冒号可以保留原有节奏”属于判断),则停止并以更深入的阅读重新运行该框架。
这是硬性门槛。本 Skill 的价值在于判断,而不是正则。未经此门槛检查就输出框架 finding 属于缺陷。

2.3 — Finding schema (every framework, every path)

2.3——Finding schema(每个框架、每条路径)

json
{
  "framework": "F1",
  "check_id": "F1.2",
  "check_name": "Specificity heuristic",
  "path": "./Projects/foo/CLAUDE.md",
  "line": 42,
  "severity": "warn",
  "excerpt": "Be careful with auth",
  "reasoning": "This rule sits in the top half of a CLAUDE.md that's otherwise a routing index — there's no specific auth boundary, file path, or function named anywhere else. As a primary rule it falls into the 35%-compliance bucket; either anchor it to a specific path/function or remove it.",
  "action": "Either delete or rewrite as 'All /api/admin/* routes must call requireAdmin() from src/auth/middleware.ts'.",
  "fixable": false,
  "fixed": false,
  "citation": "anthropic-claude-md.md → Specificity beats vagueness"
}
The
reasoning
field is mandatory. Every finding has it.
Every finding ships a fix. The pass file always emits
fixable: true
. Old
fixable: false
"manual review" findings are gone — checks that historically went flag-only (F1.x, F4.x, F5.x) now ship walk-only fix proposals like every other framework.
The
fix_status
field is set by Step 5 after the user walks each finding. Possible values:
  • applied
    → fix executed this run (green FIXED pill)
  • saved_to_plan
    → fix written into
    Intelligence/decisions/{date}-reorg.md
    for staged execution (blue SAVED pill)
  • declined
    → user explicitly chose not to fix this item in walk (grey DECLINED pill)
  • failed
    → fix attempted but failed safety check (red FAILED pill, with
    failure_reason
    )
There is no "skipped" or "deferred" state. Either the fix was applied, saved as a planned step, declined explicitly per-item, or failed mechanically. Open warnings do not survive the run.

json
{
  "framework": "F1",
  "check_id": "F1.2",
  "check_name": "Specificity heuristic",
  "path": "./Projects/foo/CLAUDE.md",
  "line": 42,
  "severity": "warn",
  "excerpt": "Be careful with auth",
  "reasoning": "This rule sits in the top half of a CLAUDE.md that's otherwise a routing index — there's no specific auth boundary, file path, or function named anywhere else. As a primary rule it falls into the 35%-compliance bucket; either anchor it to a specific path/function or remove it.",
  "action": "Either delete or rewrite as 'All /api/admin/* routes must call requireAdmin() from src/auth/middleware.ts'.",
  "fixable": false,
  "fixed": false,
  "citation": "anthropic-claude-md.md → Specificity beats vagueness"
}
reasoning
字段是必填项。每条 finding 都必须包含该字段。
**每条 finding 都必须附带修复方案。**pass 文件始终输出
fixable: true
。旧版
fixable: false
的“人工审查”finding 已取消——过去仅作标记的检查项(如 F1.x、F4.x、F5.x)现在与所有其他检查项一样,提供 walk-only 修复提案。
fix_status
字段由 Step 5 在用户 walk 每条 finding 后设置。可能值如下:
  • applied
    → 修复已在本次运行中执行(绿色 FIXED 标签)
  • saved_to_plan
    → 修复已写入
    Intelligence/decisions/{date}-reorg.md
    ,供后续分阶段执行(蓝色 SAVED 标签)
  • declined
    → 用户在 walk 中明确选择不修复此项(灰色 DECLINED 标签)
  • failed
    → 已尝试修复,但安全检查失败(红色 FAILED 标签,并附
    failure_reason
    )
不存在“skipped”或“deferred”状态。修复要么已应用、要么已保存为计划步骤、要么被明确拒绝、要么执行失败。未处理的警告不得在运行结束后继续保留。

Step 3 — Aggregate findings + compute score

Step 3——汇总 finding 并计算得分

For each framework F1–F8, count: total findings, severity breakdown (fail/warn/info), fixable count, files touched.
对于每个框架 F1~F8,统计:finding 总数、严重级别分布(fail/warn/info)、可修复数量、涉及文件数。

Score formula (framework-weighted)

得分公式(按框架加权)

For each framework F1..G7:
  deduction = (fail_count × 5) + (warn_count × 1)
  capped_deduction = min(deduction, 25)
score = max(0, 100 - sum(capped_deduction for F1..G7))
F8 and F9 do not affect the score. F8 surfaces synthesis opportunities; F9 surfaces structural/discoverability changes. Both are optimization opportunities, not lint failures — counting them would conflate "vault hygiene" with "vault could be reorganized." Track F8 in an "Insights surfaced / applied" tile and F9 in an "Architecture changes / proposed / applied / saved-to-plan" tile.
ScoreInterpretation
90–100잘 다듬어짐. 월 1회 감사 권장
70–89드리프트 감지됨. 상위 발견 항목부터 처리
50–69비대화가 성능을 해치는 중
<50볼트 부패. 대대적 정리 필요
After scoring, do not render a long markdown summary in chat. Emit one short block:
✅ 9개 프레임워크 모두 적용 완료.

| 프레임워크 | 파일 | 체크 | 발견 | Fail | Warn | 제안된 수정 |
|---|---:|---:|---:|---:|---:|---:|
| F1 Anthropic CLAUDE.md | … | … | … | … | … | … |
| F2 Karpathy Wiki | … | … | … | … | … | … |
| F3 Caveman | … | … | … | … | … | … |
| F4 Chroma Context Rot | … | … | … | … | … | … |
| F5 Anthropic Memory | … | … | … | … | … | … |
| F6 Progressive Disclosure | … | … | … | … | … | … |
| G7 Hygiene | … | … | … | … | … | … |
| F8 Reflection | … | … | … | … | … | … |
| F9 Architecture | … | … | … | … | … | … |
| **TOTAL** | … | … | … | … | … | … |

Score: {score_before}/100 (F8 + F9 not scored). Walking the architectural read next…

For each framework F1..G7:
  deduction = (fail_count × 5) + (warn_count × 1)
  capped_deduction = min(deduction, 25)
score = max(0, 100 - sum(capped_deduction for F1..G7))
**F8 和 F9 不影响得分。**F8 提供综合洞察机会;F9 提供结构/可发现性变更。二者属于优化机会,而非 lint 失败;将其计入会混淆“Vault 卫生”和“Vault 可以进一步重组”这两个概念。在“已提出/已应用的洞察”指标卡中跟踪 F8,在“架构变更/已提出/已应用/已保存到计划”指标卡中跟踪 F9。
得分解释
90–100维护良好。建议每月审计一次
70–89已检测到漂移。请优先处理高优先级发现项
50–69膨胀正在损害性能
<50Vault 已腐化。需要大规模整理
完成评分后,**不要在聊天中渲染冗长的 Markdown 摘要。**只输出一个简短块:
✅ 9개 프레임워크 모두 적용 완료.

| 프레임워크 | 파일 | 체크 | 발견 | Fail | Warn | 제안된 수정 |
|---|---:|---:|---:|---:|---:|---:|
| F1 Anthropic CLAUDE.md | … | … | … | … | … | … |
| F2 Karpathy Wiki | … | … | … | … | … | … |
| F3 Caveman | … | … | … | … | … | … |
| F4 Chroma Context Rot | … | … | … | … | … | … |
| F5 Anthropic Memory | … | … | … | … | … | … |
| F6 Progressive Disclosure | … | … | … | … | … | … |
| G7 Hygiene | … | … | … | … | … | … |
| F8 Reflection | … | … | … | … | … | … |
| F9 Architecture | … | … | … | … | … | … |
| **TOTAL** | … | … | … | … | … | … |

Score: {score_before}/100 (F8 + F9 not scored). Walking the architectural read next…

Step 3.5 — Architectural read (the synthesis paragraph)

Step 3.5——架构解读(综合段落)

Before walking fixes, write a short architectural read of the vault — top 1–3 things wrong with the structure as a whole, with reasoning grounded in
Context/
. This is the layer the user explicitly asked for: the agent demonstrating it understood what the vault means, not just what it failed.
Format:
markdown
undefined
在 walk 修复之前,用一段简短内容解读整个 Vault 的架构——指出整体结构上最主要的 1~3 个问题,并结合
Context/
说明推理。这正是用户明确要求的层次:Agent 证明自己理解了这个 Vault 的含义,而不只是列举失败项。
格式:
markdown
undefined

Architectural read

Architectural read

{1–3 short paragraphs. Each paragraph: one structural observation, why it matters for this user's world (cite Context/), the F9 finding(s) that surfaced it, the proposed direction.}

This paragraph also goes verbatim into the HTML dashboard (above the framework rows) so it's the first thing the user sees when they open the report. Keep it under 250 words total — synthesis, not a recap of findings.

If the agent cannot identify a structural observation worth surfacing (the vault is well-organized): write one sentence saying so, citing the F9 metrics that justify the assessment. Don't pad.

---
{1–3 short paragraphs. Each paragraph: one structural observation, why it matters for this user's world (cite Context/), the F9 finding(s) that surfaced it, the proposed direction.}

该段落也会原样写入 HTML 仪表板(位于框架行之前),因此用户打开报告后首先看到它。总长度控制在 250 词以内——用于综合分析,而不是复述 finding。

如果 Agent 无法识别出值得呈现的结构观察(即 Vault 组织良好),则写一句话说明这一点,并引用支持该判断的 F9 指标。不要填充废话。

---

Step 4 — Walk every finding through apply-now / save-to-plan

Step 4——逐项 walk 所有 finding,选择立即应用/保存到计划

Every finding ships a fix proposal. Step 4 walks the user through them. There is no "skip this framework," no "flag only," no "fix later." Each finding ends in one of four explicit states:
applied
,
saved_to_plan
,
declined
, or
failed
.
**每条 finding 都附带修复提案。**Step 4 逐项引导用户审查这些 finding。不存在“跳过整个框架”“仅标记”或“以后再修复”。每条 finding 最终必须处于以下四种明确状态之一:
applied
、
saved_to_plan
、
declined
或
failed
。

4.1 — One opening AskUserQuestion (the apply gate)

4.1——一个开始时的 AskUserQuestion(应用门槛)

Before walking, fire one
AskUserQuestion
:
"Audit complete: {N_total} findings across 9 frameworks ({fail} fail · {warn} warn · {info} info). Every finding has a proposed fix. Pick mode:"
Options:
  1. Bulk-apply (apply everything, no escapes) — every finding gets applied. Walk prompts only fire where the agent genuinely needs the user to pick a target/wording (e.g., "merge target: A or B?"). All else applies without per-item confirmation. The only valid non-applied state is
    failed
    (mechanical: OS lock, file conflict, dependency missing). No
    saved_to_plan
    , no
    declined
    . Use this when you've said "apply everything."
  2. Selective walk — fire a per-finding prompt for every fix; user picks apply / save-to-plan / decline per item. Use when reviewing carefully or for a first run on a new vault.
  3. Save everything to plan — write all proposed fixes as checklist steps into the discovered decisions-equivalent folder; no edits applied this run.
  4. Cancel — abort before any fixes.
Option 1 is the default. The user picks 2 only when they want item-by-item gating. The user's prior instruction "apply everything" maps to Option 1, not Option 2.
开始 walk 前,触发一次
AskUserQuestion
:
“审计完成:9 个框架中共有 {N_total} 条 finding({fail} fail · {warn} warn · {info} info)。每条 finding 都有建议修复方案。请选择模式:”
选项:
  1. 批量应用(全部应用,不提供排除项)——应用所有 finding。只有当 Agent 确实需要用户选择目标/措辞时,才触发 walk 提示,例如“合并目标:A 还是 B?”。其余内容直接应用。唯一允许的非 applied 状态是
    failed
    (机械性原因:OS 锁定、文件冲突、依赖缺失)。不允许
    saved_to_plan
    或
    declined
    。当用户表示“全部应用”时使用此模式。
  2. 选择性 walk——为每项修复触发逐项提示;用户逐项选择应用/保存到计划/拒绝。适合谨慎审查或首次运行新 Vault。
  3. 全部保存到计划——将所有建议修复作为检查清单步骤写入发现的 decisions-equivalent 文件夹;本次运行不应用编辑。
  4. 取消——在应用任何修复前中止。
默认选项为 1。只有用户希望逐项控制时才选择 2。用户此前的指令“全部应用”对应选项 1,而不是选项 2。

4.1.1 — Bulk-apply mode rules (Option 1)

4.1.1——批量应用模式规则(选项 1)

Hard rules when this mode is active:
  • No
    saved_to_plan
    outcomes.
    That state is removed from the available
    fix_status
    set.
  • No
    declined
    outcomes.
    Same.
  • The agent does not unilaterally decide a finding is "test fixture," "the user probably didn't want this," "too complex to apply mechanically," or "judgment-required-per-section" and route it to anything other than applied/failed. If applying a fix mechanically would damage content, the agent attempts the safest mechanical version (e.g., split a 222KB file at H2 boundaries with a
    <!-- automated split, review headings -->
    marker; mark the split as
    applied
    with
    applied_with_caveat: true
    ).
  • Walk prompts fire only when the agent genuinely cannot pick a target without the user. Example: F8.2 merge with three plausible canonical targets — fire the prompt. Example: G7.1 em-dash substitution — apply without prompting; the agent's per-occurrence reasoning already chose the substitution.
  • Mechanical failures are still recorded as
    failed
    with
    failure_reason
    (OS-locked file, missing parent directory, file conflict, framework-safety check rolled back the fix). Failed fixes are reported in the dashboard with their reason — they're not silently skipped.
  • The agent must not pre-classify findings as "skip in bulk-apply mode." Every finding is in scope. If applying a daystar/ test-fixture fix damages a deliberate test pattern, the user can revert that file specifically — but the agent doesn't make that call.
此模式生效时必须遵守以下硬性规则:
  • **不允许出现
    saved_to_plan
    状态。**该状态从可用
    fix_status
    集合中移除。
  • **不允许出现
    declined
    状态。**同上。
  • **Agent 不得自行判断某个 finding 是“测试夹具”“用户可能不需要”“过于复杂而不能机械应用”“某一部分需要判断”,并因此将其路由到 applied/failed 之外的状态。**如果机械应用修复会损坏内容,Agent 应尝试最安全的机械版本,例如在 H2 边界拆分 222KB 文件,并加入
    <!-- automated split, review headings -->
    标记;将拆分标记为
    applied
    ,并设置
    applied_with_caveat: true
    。
  • **仅当 Agent 确实无法自行选择目标时才触发 walk 提示。**例如,F8.2 合并有三个同样合理的规范目标时触发提示。G7.1 em dash 替换无需提示即可应用;Agent 在每处 finding 的 reasoning 中已经选择好替换方式。
  • 机械性失败仍记录为
    failed
    ,并提供
    failure_reason
    (OS 锁定文件、父目录缺失、文件冲突、框架安全检查回滚修复)。失败的修复会在仪表板中报告原因,不得静默跳过。
  • **Agent 不得预先将 finding 分类为“在批量应用模式下跳过”。**所有 finding 都在范围内。如果应用某个 daystar/测试夹具修复会破坏有意设计的测试模式,用户可以单独回滚该文件,但 Agent 不能替用户作出该决定。

4.2 — Per-finding walk loop

4.2——逐项 finding walk 循环

Order: F1 → F2 → F3 → F4 → F5 → F6 → G7 → F8 → F9. Within F8/F9, smallest blast radius first (per pass file).
For each finding:
  1. Show the finding compactly in chat: path, severity, 1-line excerpt, the proposed fix's
    proposed_edit
    or migration step.
  2. Fire AskUserQuestion with the per-finding-type sub-prompt:
Finding typeSub-prompt options
Mechanical (G7.1 em dashes, G7.3/F1.10 duplicate H1)Apply now / Decline this item / Apply all remaining of this type without asking
Wikilink repoint (F2.2)Apply with target [X] / Pick a different target / Decline
Cross-ref add (F2.4)Apply / Edit linked-file list / Decline
Caveman substitution (F3.1–F3.4 per file)Apply all in this file / Walk substitutions in this file / Decline this file
Skill-vault dedup (F6.11)Apply / Decline
CLAUDE.md edit (F1.x)Apply drafted edit / Edit text first then apply / Save to plan / Decline
Memory split / rename (F5.1, F5.3)Apply with proposed split-points or filename / Edit then apply / Save to plan / Decline
Context-rot reorg (F4.3, F4.4, F4.6, F4.7)Apply drafted reorder / Edit text / Save to plan / Decline
Reflection — contradiction (F8.1)Winner: [A] / [B] / [neither — defer to a third source] → Apply rewrite to loser / Edit text / Decline
Reflection — merge (F8.2)Canonical: [A] / [B] / [C] → Confirm merge + redirect + archive / Save to plan / Decline
Reflection — stale (F8.3)Apply rewrite / Edit text / Decline
Reflection — theme (F8.4)Create at [proposed path] / Pick a different path / Edit content first / Decline
Reflection — promotion (F8.5)Destination: [proposed] / [pick other] → Apply append + leave wikilink stub / Decline
Routing rewrite (F9.1)Apply drafted entry / Edit text / Decline
Plot.md generation (F9.2)Apply drafted Plot.md / Edit Purpose line + descriptions first / Decline
Discoverability fix (F9.3)Add to Plot.md / Add routing entry / Move file / Archive / Decline
Misplaced file (F9.4)Move to [proposed folder] / Pick different folder / Broaden current folder's Plot.md instead / Decline
Folder duplication (F9.5)Merge into [A] / Merge into [B] / Clarify Plot.md purposes on both / Save to plan / Decline
Reorg proposal (F9.6)Apply now (walk migration steps) / Save to plan (write to {date}-reorg.md) / Decline
Orientation gap (F9.7)Apply drafted CLAUDE.md edit / Edit text first / Save to plan / Decline
Every option reaches a terminal state for this finding. There is no "skip" option that leaves the finding open. "Decline" is recorded as an explicit user decision and shown in the report — it's a decision, not a deferral.
  1. Update the finding's
    fix_status
    (
    applied
    /
    saved_to_plan
    /
    declined
    ) and any
    per_item_target
    chosen by the user.
  2. TaskUpdate the current framework's task with a
    {i}/{N}
    progress note every 10 findings.
顺序:F1 → F2 → F3 → F4 → F5 → F6 → G7 → F8 → F9。在 F8/F9 内部,先处理影响范围最小的事项(按 pass 文件要求)。
对于每条 finding:
  1. **在聊天中紧凑显示 finding:**路径、严重级别、单行 excerpt,以及建议修复的
    proposed_edit
    或迁移步骤。
  2. 触发
    AskUserQuestion
    ,根据 finding 类型显示相应子提示:
Finding 类型子提示选项
机械型(G7.1 em dash、G7.3/F1.10 重复 H1)立即应用/拒绝此项/应用此类所有剩余项且不再询问
Wiki 链接重定向(F2.2)使用目标 [X] 应用/选择其他目标/拒绝
添加交叉引用(F2.4)应用/编辑链接文件列表/拒绝
Caveman 替换(F3.1~F3.4,按文件)应用此文件中的全部替换/逐步 walk 此文件中的替换/拒绝此文件
Skill Vault 去重(F6.11)应用/拒绝
CLAUDE.md 编辑(F1.x)应用草拟编辑/先编辑文本再应用/保存到计划/拒绝
Memory 拆分/重命名(F5.1、F5.3)使用建议拆分点或文件名应用/编辑后应用/保存到计划/拒绝
Context rot 重组(F4.3、F4.4、F4.6、F4.7)应用草拟重排/编辑文本/保存到计划/拒绝
Reflection——矛盾(F8.1)保留项:[A]/[B]/[两者都不是——推迟到第三来源] → 应用对落败项的重写/编辑文本/拒绝
Reflection——合并(F8.2)规范项:[A]/[B]/[C] → 确认合并+重定向+归档/保存到计划/拒绝
Reflection——过期(F8.3)应用重写/编辑文本/拒绝
Reflection——主题(F8.4)在 [建议路径] 创建/选择其他路径/先编辑内容/拒绝
Reflection——提升(F8.5)目标:[建议项]/[选择其他项] → 应用追加内容并保留 Wiki 链接存根/拒绝
路由重写(F9.1)应用草拟条目/编辑文本/拒绝
Plot.md 生成(F9.2)应用草拟 Plot.md/先编辑 Purpose 行和描述/拒绝
可发现性修复(F9.3)添加到 Plot.md/添加路由条目/移动文件/归档/拒绝
文件位置错误(F9.4)移至 [建议文件夹]/选择其他文件夹/改为扩充当前文件夹的 Plot.md/拒绝
文件夹重复(F9.5)合并到 [A]/合并到 [B]/澄清两个 Plot.md 的用途/保存到计划/拒绝
重组提案(F9.6)立即应用(逐步 walk 迁移步骤)/保存到计划(写入 {date}-reorg.md)/拒绝
导航缺口(F9.7)应用草拟 CLAUDE.md 编辑/先编辑文本/保存到计划/拒绝
每个选项都会让该 finding 进入一个终态。不存在会让 finding 保持未处理状态的“跳过”选项。“拒绝”会记录为用户的明确决定并显示在报告中;它是决定,不是延期处理。
  1. 更新 finding 的
    fix_status
    (
    applied
    /
    saved_to_plan
    /
    declined
    )以及用户选择的任何
    per_item_target
    。
  2. 每处理 10 条 finding,使用
    TaskUpdate
    更新当前框架任务的进度,注明
    {i}/{N}
    。

4.3 — Save-to-plan file format

4.3——保存到计划的文件格式

Save-to-plan path resolution (uses the role registry):
  1. If
    roles.decisions.path
    is set → save under
    {decisions.path}/{YYYY-MM-DD}-reorg.md
    .
  2. Else if any folder matches
    *decisions*/
    ,
    *logs*/
    ,
    *records*/
    (case-insensitive) → use that.
  3. Else create
    audits/
    at vault root and save there. Note the missing decisions role to F9.0 — the user gets a fix proposal to formalize a decisions-equivalent folder.
When findings are routed to save-to-plan, append checklist entries to the resolved path:
markdown
---
status: pending
type: reorg-plan
tags: [optimizer, plan]
date: 2026-05-08
source: os-optimizer run 2026-05-08T14:23:00Z
---
保存到计划的路径解析(使用角色注册表):
  1. 如果设置了
    roles.decisions.path
    → 保存到
    {decisions.path}/{YYYY-MM-DD}-reorg.md
    。
  2. 否则,如果存在匹配
    *decisions*/
    、
    *logs*/
    、
    *records*/
    的文件夹(不区分大小写)→ 使用该文件夹。
  3. 否则,在 Vault 根目录创建
    audits/
    并保存在其中。同时向 F9.0 记录缺少 decisions 角色的情况,让用户收到正式建立 decisions-equivalent 文件夹的修复提案。
当 finding 被路由到保存到计划时,向解析后的路径追加检查清单条目:
markdown
---
status: pending
type: reorg-plan
tags: [optimizer, plan]
date: 2026-05-08
source: os-optimizer run 2026-05-08T14:23:00Z
---

Vault reorg plan — 2026-05-08

Vault reorg plan — 2026-05-08

Generated by os-optimizer. Each item is a fix proposal saved for staged execution. Walk them when ready.
Generated by os-optimizer. Each item is a fix proposal saved for staged execution. Walk them when ready.

F9.6 Reorg proposals

F9.6 Reorg proposals

  • Merge
    Notes/
    into
    Resources/notes/
    — F9.5 finding cluster: both folders hold scratch with 38% file-name overlap. Migration:
    • Move 12 files from
      Notes/
      to
      Resources/notes/
      .
    • Redirect 4 inbound wikilinks.
    • Update root CLAUDE.md routing entry to remove
      Notes/
      .
    • Delete empty
      Notes/
      directory.
    • Reasoning:
      Resources/notes/
      Plot.md states it holds reference notes;
      Notes/
      Plot.md states the same. Per
      Context/me.md
      , the user's stated convention is one resource library — keeping two is structural drift.
  • Merge
    Notes/
    into
    Resources/notes/
    — F9.5 finding cluster: both folders hold scratch with 38% file-name overlap. Migration:
    • Move 12 files from
      Notes/
      to
      Resources/notes/
      .
    • Redirect 4 inbound wikilinks.
    • Update root CLAUDE.md routing entry to remove
      Notes/
      .
    • Delete empty
      Notes/
      directory.
    • Reasoning:
      Resources/notes/
      Plot.md states it holds reference notes;
      Notes/
      Plot.md states the same. Per
      Context/me.md
      , the user's stated convention is one resource library — keeping two is structural drift.

F8.2 Merge candidates

F8.2 Merge candidates

  • Merge
    Notes/2026-q1-strategy.md
    and
    Projects/positioning/research/strategy-thoughts.md
    into
    Context/strategy.md
    — F8.2 finding. Steps: …
(continues per saved finding)

The plan file is itself audited next run — F1/G7 conventions apply.
  • Merge
    Notes/2026-q1-strategy.md
    and
    Projects/positioning/research/strategy-thoughts.md
    into
    Context/strategy.md
    — F8.2 finding. Steps: …
(continues per saved finding)

计划文件本身会在下次运行时接受审计——适用 F1/G7 约定。

4.4 — Failure to walk

4.4——未能 walk 的处理

If the agent skips a finding (forgets to fire its sub-prompt, batches multiple findings into one prompt, or treats "no answer" as decline) — that's a bug. Walk every finding individually. The visible task list catches this: if a framework's task moves to
completed
while findings remain unwalked, the verification step in 5.7 will flag it.

如果 Agent 跳过某条 finding(忘记触发子提示、把多条 finding 合并成一次提示,或把“无响应”视为拒绝),则属于缺陷。必须逐项 walk 每条 finding。可见任务列表能够捕获此问题:如果某个框架的任务在仍有 finding 未 walk 时被移动到
completed
,Step 5.7 的验证步骤会将其标记出来。

Step 5 — Apply approved fixes (set
fix_status
per finding)

Step 5——应用已批准的修复(逐条设置
fix_status
)

Apply in this order (smallest blast radius first). For every finding, set
fix_status
to
applied
,
saved_to_plan
,
declined
, or
failed
based on what happened in Step 4 + this step. The HTML render uses
fix_status
directly.
Save-to-plan items are written to
Intelligence/decisions/{date}-reorg.md
in Step 4.3 — this step (5) only handles the items the user picked "apply now" for. (In Bulk-apply mode there are no save-to-plan items.)
按此顺序应用(先处理影响范围最小的事项)。对于每条 finding,根据 Step 4 和本步骤中的实际结果,将
fix_status
设置为
applied
、
saved_to_plan
、
declined
或
failed
。HTML 渲染直接使用
fix_status
。
保存到计划的项目已在 Step 4.3 写入
Intelligence/decisions/{date}-reorg.md
——本步骤(5)仅处理用户在 Step 4 中选择“立即应用”的项目。(批量应用模式中不存在保存到计划的项目。)

5.0 — Capture BEFORE metrics (mandatory, before any fix lands)

5.0——捕获 BEFORE 指标(强制,在任何修复落盘前执行)

Before applying any fix, snapshot per-role and per-framework metrics into the
before_metrics
cache. These are what the dashboard's before/after columns render against.
Per-role metrics (one row per role in the registry, plus a TOTAL row):
  • file_count
  • total_chars
    (sum of body bytes, post-frontmatter)
  • total_tokens_est
    (한국어 공식:
    (한글글자수 × 1.5) + (그외글자수 × 0.25)
    — 오버라이드 1.
    chars/4
    아님)
  • em_dash_count
    (G7.1 trigger output)
  • frontmatter_complete_pct
    (files with
    status:
    + ≥2
    tags:
    / total)
  • wikilink_orphan_count
    (no inbound wikilink)
  • index_coverage_pct
    (folders with the discovered folder-index file / non-trivial folder count)
  • findings_open
    (count of findings touching files in this role)
Per-framework metrics (F1–F9 + TOTAL):
  • findings_count
  • fail_count
    ,
    warn_count
    ,
    info_count
  • applied_count
    (starts at 0)
  • failed_count
    (starts at 0)
  • score_contribution
    (per the Step 3 formula; F8/F9 always 0)
Cache these. Apply fixes (5.1–5.8). Then run 5.9.
应用任何修复前,将每个角色和每个框架的指标快照写入
before_metrics
缓存。这些指标用于仪表板 BEFORE/AFTER 列的渲染。
每个角色的指标(角色注册表中的每个角色一行,外加 TOTAL 行):
  • file_count
  • total_chars
    (frontmatter 之后的正文 body 字节数总和)
  • total_tokens_est
    (韩语公式:
    (한글글자수 × 1.5) + (그외글자수 × 0.25)
    ——覆盖项 1。不是
    chars/4
    )
  • em_dash_count
    (G7.1 触发结果)
  • frontmatter_complete_pct
    (包含
    status:
    和至少 2 个
    tags:
    的文件占比)
  • wikilink_orphan_count
    (没有入站 Wiki 链接)
  • index_coverage_pct
    (拥有已发现文件夹索引文件的文件夹数/非空文件夹数)
  • findings_open
    (涉及此角色文件的 finding 数量)
每个框架的指标(F1~F9+TOTAL):
  • findings_count
  • fail_count
    、
    warn_count
    、
    info_count
  • applied_count
    (初始为 0)
  • failed_count
    (初始为 0)
  • score_contribution
    (按 Step 3 公式计算;F8/F9 始终为 0)
缓存这些指标。应用修复(5.1~5.8)后运行 5.9。

5.1 — Em dashes (G7.1)

5.1——Em dash(G7.1)

  • For each
    applied
    finding: replace
    —
    →
    . 
    ,
    –
    →
    , 
    in stripped body only.
  • Re-strip protected zones after; if any code/URL/wikilink was touched → revert that file's change AND set
    fix_status: failed
    with
    failure_reason
    .
  • Use
    Edit
    with
    replace_all: true
    per file.
  • Set
    fix_status: applied
    on every G7.1 finding whose file was successfully fixed.
  • 对于每条状态为
    applied
    的 finding:仅在剥离保护区后的正文中,将
    —
    替换为
    . 
    ,将
    –
    替换为
    , 
    。
  • 重新剥离保护区;如果任何代码/URL/Wiki 链接被修改 → 回滚该文件的变更,并将
    fix_status
    设置为
    failed
    ,同时提供
    failure_reason
    。
  • 对每个文件使用
    Edit
    并设置
    replace_all: true
    。
  • 对每个成功修复的 G7.1 finding,将
    fix_status
    设置为
    applied
    。

5.2 — Duplicate H1 (G7.3 / F1.10)

5.2——重复 H1(G7.3/F1.10)

  • Remove the H1 line and any blank line immediately following.
  • Use
    Edit
    . Set
    fix_status: applied
    .
  • 删除 H1 行及其后紧邻的空行。
  • 使用
    Edit
    。将
    fix_status
    设置为
    applied
    。

5.3 — Wikilink fixes (F2.2)

5.3——Wiki 链接修复(F2.2)

  • For each finding the user approved (bulk = top-1 suggestion, walk = chosen target): replace
    [[Old Target]]
    with the picked replacement.
  • Preserve surrounding text byte-for-byte.
  • Mark
    fixed: true
    per finding fixed;
    fixed: false
    for any skipped or low-confidence ones the user said no to.
  • 对于用户已批准的 finding(批量模式=采用排名第一的建议;walk 模式=采用用户选择的目标):将
    [[Old Target]]
    替换为选定的替代项。
  • 逐字节保留周边文本。
  • 对已修复的 finding 标记
    fixed: true
    ;对用户拒绝或选择低置信度建议的 finding 标记
    fixed: false
    。

5.4 — Skill-vault rewrites (F6.11)

5.4——Skill Vault 重写(F6.11)

  • Update SKILL.md to read the vault
    Context/
    path instead of the duplicate ref.
  • Grep the rest of the skill folder for the duplicate ref filename.
  • If still referenced → surface conflict, skip deletion, set
    fix_status: failed
    .
  • Otherwise →
    rm
    the duplicate, set
    fix_status: applied
    .
  • 更新 SKILL.md,使其读取 Vault 的
    Context/
    路径,而不是重复的 reference。
  • 在 Skill 文件夹的其余内容中 grep 重复 reference 的文件名。
  • 如果仍然被引用 → 呈现冲突,不删除,并将
    fix_status
    设置为
    failed
    。
  • 否则 → 执行
    rm
    删除重复文件,并将
    fix_status
    设置为
    applied
    。

5.5 — Caveman substitutions (F3.1, F3.2, F3.3, F3.4) — only if user opted in per file

5.5——Caveman 替换(F3.1、F3.2、F3.3、F3.4)——仅当用户按文件选择加入时执行

  • Apply substitution table from
    references/passes-caveman.md
    to the stripped body.
  • Re-strip protected zones; if any was modified → abort the fix on that file, report, set
    fix_status: failed
    for that file's findings.
  • Mark
    fixed: true
    on every F3.x finding for files the agent successfully substituted.
  • 将
    references/passes-caveman.md
    中的替换表应用到剥离保护区后的正文。
  • 重新剥离保护区;如果任何保护区被修改 → 中止该文件的修复、报告情况,并将该文件相关 finding 的
    fix_status
    设置为
    failed
    。
  • 对 Agent 成功完成替换的每个 F3.x finding,标记
    fixed: true
    。

5.6 — Reflection fixes (F8.1, F8.3, F8.2, F8.4, F8.5) — walk-only, per-item user-confirmed targets

5.6——Reflection 修复(F8.1、F8.3、F8.2、F8.4、F8.5)——仅 walk,并逐项确认目标

Apply F8 fixes last (largest blast radius). Order within F8 is smallest-to-largest:
  1. F8.1 contradictions — for each approved finding: rewrite the loser file. Either replace contradicted line with
    See [[Winner]] for current state.
    (defer mode) or delete the line entirely (drop mode); the user picks per item in Step 4. Use
    Edit
    . Set
    fix_status: applied
    .
  2. F8.3 stale entries — for each approved finding: rewrite the curated entry with the new state. Append
    ## History
    section with the prior wording if it has decision context (per pass file rule). Add wikilink to superseding source. Set
    fix_status: applied
    .
  3. F8.2 merge candidates — for each approved cluster:
    • Concatenate unique sections from sources into the canonical target (skip duplicate paragraphs).
    • Re-check size against F5 budget. If merged file > 10KB → abort the merge, set
      fix_status: failed
      , surface as flag-only with the abort reason in
      reasoning_post
      .
    • Grep the vault for
      [[SourceName]]
      and
      [[SourceName|alias]]
      patterns; replace each with
      [[CanonicalName|alias]]
      (or
      [[CanonicalName]]
      ).
    • Verify zero new dead wikilinks (run F2.2 trigger on every file touched). If any new dead link surfaced → roll back this finding's fix, set
      fix_status: failed
      .
    • Move source files to
      Intelligence/archive/{YYYY-MM-DD}-merged/
      . Use
      Bash mv
      .
    • Set
      fix_status: applied
      .
  4. F8.4 emergent themes — for each approved finding:
    • Create the new file at the user-chosen path (default
      Context/{theme-slug}.md
      or
      Resources/{theme-slug}-MOC.md
      ).
    • Frontmatter must include
      status:
      ,
      tags:
      ,
      type:
      ,
      date:
      (G7.2 compliance) and contain no em dashes (G7.1).
    • Body: 1-line definition, 3–5 key points, wikilinks back to every source note in the cluster.
    • Set
      fix_status: applied
      .
  5. F8.5 promotions — for each approved finding:
    • Append the durable content to the chosen destination (
      Context/
      ,
      Resources/
      , or
      Intelligence/decisions/
      ).
    • In the source file, replace the original lines with
      See [[Target#section]]
      .
    • Set
      fix_status: applied
      .
Cross-framework safety check after every F8 fix:
  • Re-strip protected zones on every file written. If any code/URL/wikilink/path/frontmatter was modified outside the intended edit → roll back, set
    fix_status: failed
    .
  • If the touched file targets a CLAUDE.md or claude.md → abort (this should have been caught in Step 4 as flag-only, but defense in depth).
  • If the touched file's size now exceeds F5's 10KB recommended budget → record the violation in
    reasoning_post
    ; the next audit run will surface it as F5 flag-only (don't roll back, but log).
最后应用 F8 修复(影响范围最大)。F8 内部按从最小到最大的顺序执行:
  1. F8.1 矛盾——对于每条已批准的 finding:重写落败文件。可以将矛盾行替换为
    See [[Winner]] for current state.
    (defer 模式),也可以彻底删除该行(drop 模式);用户在 Step 4 中逐项选择。使用
    Edit
    。将
    fix_status
    设置为
    applied
    。
  2. F8.3 过期条目——对于每条已批准的 finding:使用新状态重写策展条目。如果旧措辞包含决策上下文(按 pass 文件规则),则追加
    ## History
    章节保存旧措辞。添加指向替代来源的 Wiki 链接。将
    fix_status
    设置为
    applied
    。
  3. F8.2 合并候选——对于每条已批准的簇:
    • 将来源中的唯一章节拼接至规范目标(跳过重复段落)。
    • **重新检查文件大小是否符合 F5 预算。**如果合并后的文件大于 10KB → 中止合并,将
      fix_status
      设置为
      failed
      ,以仅标记形式呈现,并在
      reasoning_post
      中说明中止原因。
    • 在整个 Vault 中 grep
      [[SourceName]]
      和
      [[SourceName|alias]]
      模式;将每处替换为
      [[CanonicalName|alias]]
      (或
      [[CanonicalName]]
      )。
    • 验证没有产生新的无效 Wiki 链接(在每个涉及的文件上运行 F2.2 触发器)。如果出现新的无效链接 → 回滚该 finding 的修复,将
      fix_status
      设置为
      failed
      。
    • 将来源文件移至
      Intelligence/archive/{YYYY-MM-DD}-merged/
      。使用
      Bash mv
      。
    • 将
      fix_status
      设置为
      applied
      。
  4. F8.4 新兴主题——对于每条已批准的 finding:
    • 在用户选择的路径创建新文件(默认
      Context/{theme-slug}.md
      或
      Resources/{theme-slug}-MOC.md
      )。
    • Frontmatter 必须包含
      status:
      、
      tags:
      、
      type:
      、
      date:
      (符合 G7.2),且正文不得包含 em dash(符合 G7.1)。
    • 正文:1 行定义、3~5 个要点,以及指回簇中每个来源笔记的 Wiki 链接。
    • 将
      fix_status
      设置为
      applied
      。
  5. F8.5 提升——对于每条已批准的 finding:
    • 将持久内容追加到选定目标(
      Context/
      、
      Resources/
      或
      Intelligence/decisions/
      )。
    • 在来源文件中,将原始行替换为
      See [[Target#section]]
      。
    • 将
      fix_status
      设置为
      applied
      。
每次 F8 修复后的跨框架安全检查:
  • 重新剥离每个已写入文件的保护区。如果计划外的代码/URL/Wiki 链接/路径/frontmatter 被修改 → 回滚,将
    fix_status
    设置为
    failed
    。
  • 如果涉及的文件目标是 CLAUDE.md 或 claude.md → 中止(正常情况下 Step 4 应已将其作为仅标记项捕获,但此处进行纵深防御)。
  • 如果涉及文件的大小现在超过 F5 建议的 10KB 预算 → 在
    reasoning_post
    中记录该违规情况;下一次审计会将其作为 F5 仅标记项呈现(无需回滚,但必须记录)。

5.7 — Architecture fixes (F9.1, F9.2, F9.3, F9.4, F9.5, F9.6, F9.7) — walk-only, per-item user-confirmed targets

5.7——架构修复(F9.1、F9.2、F9.3、F9.4、F9.5、F9.6、F9.7)——仅 walk,并逐项确认目标

Apply F9 fixes after F8. Order: smallest blast radius first.
  1. F9.1 routing rewrites — for each
    applied
    finding:
    Edit
    the root CLAUDE.md routing table with the user-confirmed line(s). Per-item only; no batch rewrites. This is the single legitimate path for editing a CLAUDE.md (per-item user approval).
  2. F9.2 Plot.md generation / regeneration — for each
    applied
    finding:
    • If missing:
      Write
      the agent-drafted Plot.md (user already confirmed Purpose + child descriptions in walk).
    • If stale:
      Edit
      to update the Children list; preserve any user edits to Purpose if not deprecated.
    • Verify size ≤ 8KB; verify G7.1 (no em dashes) and G7.2 (frontmatter complete).
  3. F9.3 discoverability fixes — for each
    applied
    finding, apply the user-chosen repair:
    • "Add to Plot.md" →
      Edit
      the parent Plot.md.
    • "Add routing entry" →
      Edit
      root CLAUDE.md routing.
    • "Move file" →
      Bash mv
      ; redirect inbound wikilinks (same as F8.2 mechanic).
    • "Archive" →
      Bash mv
      to
      Intelligence/archive/
      .
  4. F9.4 misplaced files —
    Bash mv
    to user-chosen folder. Update source folder's Plot.md (remove child) and target folder's Plot.md (add child). Redirect inbound wikilinks.
  5. F9.5 folder duplication — for "merge into" findings: walk through file moves one at a time (each is its own
    applied
    micro-step). For "clarify Plot.md purposes" findings:
    Edit
    both Plot.mds.
  6. F9.6 reorg proposals — only here if the user picked "apply now"; save-to-plan ones are already in the dated reorg file. For apply-now: walk each migration step in the proposal as its own micro-finding (move X, rename Y, update routing entry Z), each confirmed individually before execution.
  7. F9.7 orientation gap —
    Edit
    root CLAUDE.md with the agent-drafted section the user confirmed. Per-item only.
Cross-framework safety check after every F9 fix:
  • Re-run F2.2 trigger on every file touched. If new dead wikilinks appeared → roll back that fix, set
    fix_status: failed
    .
  • Re-check root CLAUDE.md size against F1.1 budget after F9.1 / F9.7 edits. Over budget → record in
    failure_reason
    ; the next audit run will flag F1.1.
  • Plot.md writes must pass G7.1 + G7.2 + F5 (≤ 8KB) by construction; if any check fails → roll back,
    fix_status: failed
    .
在 F8 之后应用 F9 修复。顺序:从影响范围最小的事项开始。
  1. F9.1 路由重写——对于每条
    applied
    finding:使用用户确认的行编辑根目录 CLAUDE.md 的路由表。必须逐项操作,不得批量编辑。只有 F9.1 属于合法修改 CLAUDE.md 的路径(需用户逐项批准)。
  2. F9.2 Plot.md 生成/重新生成——对于每条
    applied
    finding:
    • 如果缺失:使用
      Write
      写入 Agent 草拟的 Plot.md(用户已在 walk 中确认 Purpose 和子项描述)。
    • 如果过期:使用
      Edit
      更新 Children 列表;如果用户的 Purpose 编辑未失效,则予以保留。
    • 验证大小 ≤ 8KB;验证符合 G7.1(无 em dash)和 G7.2(frontmatter 完整)。
  3. F9.3 可发现性修复——对于每条
    applied
    finding,应用用户选择的修复方式:
    • “添加到 Plot.md” → 使用
      Edit
      编辑父级 Plot.md。
    • “添加路由条目” → 使用
      Edit
      编辑根目录 CLAUDE.md 路由。
    • “移动文件” → 使用
      Bash mv
      ;按与 F8.2 相同的方式重定向入站 Wiki 链接。
    • “归档” → 使用
      Bash mv
      移至
      Intelligence/archive/
      。
  4. F9.4 文件位置错误——使用
    Bash mv
    将文件移至用户选择的文件夹。更新来源文件夹的 Plot.md(删除子项)和目标文件夹的 Plot.md(添加子项)。重定向入站 Wiki 链接。
  5. F9.5 文件夹重复——对于“合并到”finding:逐个 walk 文件移动,每一步都作为独立的
    applied
    微步骤。对于“澄清 Plot.md 用途”finding:使用
    Edit
    编辑两个 Plot.md。
  6. F9.6 重组提案——仅当用户选择“立即应用”时在此处理;保存到计划的项目已写入带日期的 reorg 文件。对于立即应用:将提案中的每个迁移步骤作为独立微 finding 进行 walk(移动 X、重命名 Y、更新路由条目 Z),并在执行前逐项确认。
  7. F9.7 导航缺口——使用用户确认的草拟章节编辑根目录 CLAUDE.md。必须逐项操作。
每次 F9 修复后的跨框架安全检查:
  • 对每个涉及的文件重新运行 F2.2 触发器。如果出现新的无效 Wiki 链接 → 回滚该修复,将
    fix_status
    设置为
    failed
    。
  • 在 F9.1/F9.7 编辑后,重新检查根目录 CLAUDE.md 的大小是否符合 F1.1 预算。超限时将其记录在
    failure_reason
    中;下一次审计会将其标记为 F1.1。
  • Plot.md 写入必须按构造满足 G7.1+G7.2+F5(≤ 8KB);如果任何检查失败 → 回滚,将
    fix_status
    设置为
    failed
    。

5.8 — Generic per-item fix runner (F1.x, F4.x, F5.x — previously flag-only)

5.8——通用逐项修复运行器(F1.x、F4.x、F5.x——过去仅为标记项)

For findings whose checks historically didn't have a specialized fix procedure (most of F1, F4, F5), the runner is generic:
  1. Read the file.
  2. Apply the agent-drafted
    proposed_edit
    from the finding (the user already confirmed or edited it in Step 4.2).
  3. Re-strip protected zones; if any code/URL/path/frontmatter outside the intended edit was modified → roll back,
    fix_status: failed
    .
  4. If the file is a CLAUDE.md → only proceed if
    applied
    came through walk-with-explicit-confirmation (Step 4.2). Never bulk-apply CLAUDE.md edits via this runner.
  5. Set
    fix_status: applied
    on success.
This runner handles, e.g.:
  • F1.2 vague rule rewrite or deletion
  • F1.5 platitude deletion
  • F1.7 reorder for position effect
  • F4.3 critical-info reorder
  • F4.4 lead-in preamble removal
  • F5.1 file split (split file at agent-suggested headers; user confirmed split-points in walk)
  • F5.3 filename rename via
    Bash mv
    + inbound wikilink redirect
The fix sub-procedure can vary per finding type — what stays constant is: read → apply confirmed edit → safety check → status. The pass file's per-check guidance still constrains what the agent drafts.
对于过去没有专用修复流程的检查项 finding(大多数 F1、F4、F5),通用运行器如下:
  1. 读取文件。
  2. 应用 finding 中的 Agent 草拟
    proposed_edit
    (用户已在 Step 4.2 中确认或编辑)。
  3. 重新剥离保护区;如果计划外的代码/URL/路径/frontmatter 被修改 → 回滚,将
    fix_status
    设置为
    failed
    。
  4. 如果文件是 CLAUDE.md → 仅当
    applied
    来自带有明确确认的 walk 时才可继续(Step 4.2)。绝不能通过此运行器批量应用 CLAUDE.md 编辑。
  5. 成功后,将
    fix_status
    设置为
    applied
    。
此运行器可处理例如:
  • F1.2 模糊规则重写或删除
  • F1.5 套话删除
  • F1.7 为位置效应而重排
  • F4.3 关键信息重排
  • F4.4 删除引导性前言
  • F5.1 文件拆分(按 Agent 建议的标题拆分文件;用户已确认拆分点)
  • F5.3 使用
    Bash mv
    重命名文件+重定向入站 Wiki 链接
修复子流程可以因 finding 类型而异;不变的是:读取 → 应用已确认编辑 → 安全检查 → 设置状态。pass 文件中各检查项的具体指导仍约束 Agent 草拟内容。

5.9 — Capture AFTER metrics (mandatory, after every fix)

5.9——捕获 AFTER 指标(强制,在所有修复完成后执行)

After Step 5.1–5.8 finish, re-measure the same metrics captured in 5.0. This is the source of truth for the dashboard's AFTER columns and the recomputed score. Skipping this step is the bug that produced the 46/100 BEFORE-only render — never skip it.
Re-measure:
  • Per-role metrics (re-run the same probes from 5.0 — files may have been split, em dashes stripped, frontmatter added).
  • Per-framework metrics (recount findings against the current vault state — many findings should now resolve to zero because their underlying issue was fixed).
  • Recompute the score using the formula in Step 3, against the re-measured findings count. This is
    {{SCORE_AFTER}}
    . Do not reuse the BEFORE score.
  • Compute deltas:
    tokens_saved_per_role
    ,
    em_dashes_removed
    ,
    frontmatter_pct_delta
    ,
    findings_resolved_per_framework
    .
If the re-measurement shows a finding category whose count increased (e.g., a fix accidentally added new orphans), surface that as a regression-warning row in the dashboard — the fix succeeded mechanically but produced a downstream issue.
The re-measurement should take seconds, not minutes — same probes as Step 1 + the framework triggers, but only on files touched by Step 5 plus the small global counts (em dashes vault-wide, frontmatter coverage). Cache for Step 6.
Step 5.1~5.8 完成后,重新测量 Step 5.0 中捕获的相同指标。这是仪表板 AFTER 列和重新计算得分的唯一事实来源。跳过此步骤正是曾产生 46/100、仅显示 BEFORE 数据的渲染缺陷——绝不能跳过。
重新测量:
  • 每个角色的指标(重新运行 5.0 中相同的探针——文件可能已拆分、em dash 已移除、已添加 frontmatter)。
  • 每个框架的指标(根据当前 Vault 状态重新统计 finding——许多 finding 的底层问题修复后应归零)。
  • **使用 Step 3 公式,根据重新测得的 finding 数量重新计算得分。**这是
    {{SCORE_AFTER}}
    。不得复用 BEFORE 得分。
  • 计算差值:
    tokens_saved_per_role
    、
    em_dashes_removed
    、
    frontmatter_pct_delta
    、
    findings_resolved_per_framework
    。
如果重新测量显示某类 finding 数量反而增加(例如某项修复意外产生新的孤儿节点),则在仪表板中将其呈现为回归警告行——即修复在机械层面成功,但产生了后续问题。
重新测量应当只需数秒,而不是数分钟——使用与 Step 1 相同的探针和框架触发器,但只检查 Step 5 涉及的文件以及少量全局计数(整个 Vault 的 em dash、frontmatter 覆盖率)。为 Step 6 缓存结果。

5.10 — Verify fix-status totals add up

5.10——验证 fix_status 总数一致

After applying:
  • total_applied
    = findings with
    fix_status: applied
    .
  • total_saved_to_plan
    = findings with
    fix_status: saved_to_plan
    .
  • total_declined
    = findings with
    fix_status: declined
    .
  • total_failed
    = findings with
    fix_status: failed
    .
These four should equal
total_findings
. No
null
or unset
fix_status
is permitted
— every finding hit Step 4 and was walked. If any finding has unset
fix_status
after Step 5, the orchestrator skipped a walk; halt and surface the bug to the user before rendering. (HTML still renders correctly from per-finding flags but the skipped finding signals a Step 4.4 bug.)
应用完成后:
  • total_applied
    =
    fix_status: applied
    的 finding 数量。
  • total_saved_to_plan
    =
    fix_status: saved_to_plan
    的 finding 数量。
  • total_declined
    =
    fix_status: declined
    的 finding 数量。
  • total_failed
    =
    fix_status: failed
    的 finding 数量。
这四项之和应等于
total_findings
。**不允许存在
null
或未设置的
fix_status
——每条 finding 都必须经过 Step 4 并完成 walk。**如果应用后仍有 finding 未设置
fix_status
,说明 orchestrator 跳过了 walk;此时必须在渲染前停止并向用户指出该缺陷。(HTML 仍可根据逐条 finding 标志正确渲染,但未处理的 finding 表明 Step 4.4 存在缺陷。)

Failure handling

失败处理

If any fix fails (file missing, edit conflict, ambiguous match, protected-zone violation) → stop, report which item failed, ask the user how to proceed. Never silently skip a failure.
如果任何修复失败(文件缺失、编辑冲突、匹配不明确、违反保护区)→ 停止,报告具体失败项,并询问用户如何继续。绝不能静默跳过失败。

Always preserve

始终保留

  • Files in technical skip list (
    .git
    ,
    .obsidian
    ,
    .trash
    ,
    node_modules
    ,
    dist
    ,
    build
    ).
  • Code fences, inline code, URLs, file paths, frontmatter keys, wikilinks, table delimiters, headings, dates, version numbers.

  • 技术性排除列表中的文件(
    .git
    、
    .obsidian
    、
    .trash
    、
    node_modules
    、
    dist
    、
    build
    )。
  • 代码围栏、行内代码、URL、文件路径、frontmatter 键、Wiki 链接、表格分隔符、标题、日期、版本号。

Step 6 — Render, save, open, and surface the HTML

Step 6——渲染、保存、打开并输出 HTML

6.1 — Compute per-framework metrics

6.1——计算每个框架的指标

Snapshot before/after per framework:
VariableSource
{{F1_FILES}}
,
{{F1_CHECKS}}
,
{{F1_FINDINGS_BEFORE}}
,
{{F1_FINDINGS_AFTER}}
,
{{F1_FAIL_BEFORE}}
,
{{F1_FAIL_AFTER}}
,
{{F1_WARN_BEFORE}}
,
{{F1_WARN_AFTER}}
,
{{F1_INFO_BEFORE}}
,
{{F1_INFO_AFTER}}
,
{{F1_APPLIED}}
,
{{F1_FAILED}}
,
{{F1_DETAILS}}
F1 bucket — every count has a before/after pair so the dashboard can show the delta
same for F2, F3, F4, F5, F6, G7, F8, F9each bucket
{{ARCHITECTURAL_READ}}
Step 3.5 paragraph, rendered above the framework rows
{{F8_INSIGHTS_SURFACED}}
,
{{F8_INSIGHTS_APPLIED}}
F8-only — drives the "Insights surfaced / applied" tile
{{F9_PROPOSALS}}
,
{{F9_APPLIED}}
,
{{F9_FAILED}}
F9-only — drives the "Architecture changes" tile (in bulk-apply mode there's no Saved/Declined column)
{{ROLE_METRICS_TABLE}}
per-role before/after table (Step 6.1.5)
{{FRAMEWORK_METRICS_TABLE}}
per-framework before/after table (Step 6.1.5)
{{REORG_PLAN_PATH}}
path to the saved reorg plan if any saved-to-plan items exist (selective walk only); empty in bulk-apply mode
{{TOTAL_FIXABLE}}
count of all findings with
fixable: true
{{TOTAL_FIXED}}
count of all findings with
fixed: true
{{TOTAL_FIXABLE_NOT_FIXED}}
count of findings with
fixable: true && fixed: false
(skipped/denied)
{{TOTAL_BEFORE}}
,
{{TOTAL_AFTER}}
,
{{TOTAL_SAVED}}
,
{{TOTAL_PCT}}
sum across all frameworks
{{SCORE_BEFORE}}
,
{{SCORE_AFTER}}
,
{{SCORE_DELTA}}
,
{{SCORE_DELTA_SIGN}}
scoring formula before & after
{{SESSION_BEFORE}}
,
{{SESSION_AFTER}}
,
{{SESSION_PCT}}
root CLAUDE.md token count before & after
{{ANNUAL_SAVINGS}}
{{TOTAL_SAVED}} × SESSIONS_PER_WEEK × WEEKS_PER_YEAR
, K/M suffix
{{SESSIONS_PER_WEEK}}
(default 50)
user override if specified
{{WEEKS_PER_YEAR}}
(default 50)
—
{{FILES_SCANNED}}
,
{{FOLDERS_COVERED}}
from Step 1
{{ORG_NAME}}
Context/business.md
or
Context/organization.md
title or
name:
frontmatter; fallback cwd folder name
{{DATE}}
,
{{TIMESTAMP}}
today (YYYY-MM-DD) and ISO UTC
For each framework's
{{Fx_DETAILS}}
: render the findings list as HTML (severity pills, paths, excerpts, actions, framework citation). Cap at top-25 findings per framework — if more, append "and N more flagged in {decisions-folder}/{date}-vault-audit-findings.json".
Format integers with thousands separators. Format percentages to one decimal.
快照每个框架的 BEFORE/AFTER 指标:
变量来源
{{F1_FILES}}
、
{{F1_CHECKS}}
、
{{F1_FINDINGS_BEFORE}}
、
{{F1_FINDINGS_AFTER}}
、
{{F1_FAIL_BEFORE}}
、
{{F1_FAIL_AFTER}}
、
{{F1_WARN_BEFORE}}
、
{{F1_WARN_AFTER}}
、
{{F1_INFO_BEFORE}}
、
{{F1_INFO_AFTER}}
、
{{F1_APPLIED}}
、
{{F1_FAILED}}
、
{{F1_DETAILS}}
F1 指标桶——每个数量都有 BEFORE/AFTER 对,用于仪表板显示差值
F2、F3、F4、F5、F6、G7、F8、F9 同上各指标桶
{{ARCHITECTURAL_READ}}
Step 3.5 段落,在框架行上方渲染
{{F8_INSIGHTS_SURFACED}}
、
{{F8_INSIGHTS_APPLIED}}
仅 F8——驱动“已提出/已应用的洞察”指标卡
{{F9_PROPOSALS}}
、
{{F9_APPLIED}}
、
{{F9_FAILED}}
仅 F9——驱动“架构变更”指标卡(批量应用模式下没有 Saved/Declined 列)
{{ROLE_METRICS_TABLE}}
每个角色的 BEFORE/AFTER 表(Step 6.1.5)
{{FRAMEWORK_METRICS_TABLE}}
每个框架的 BEFORE/AFTER 表(Step 6.1.5)
{{REORG_PLAN_PATH}}
如果存在保存到计划的项目,则指向已保存 reorg 计划的路径(仅选择性 walk 模式);批量应用模式下为空
{{TOTAL_FIXABLE}}
所有
fixable: true
的 finding 数量
{{TOTAL_FIXED}}
所有
fixed: true
的 finding 数量
{{TOTAL_FIXABLE_NOT_FIXED}}
fixable: true && fixed: false
的 finding 数量(跳过/拒绝)
{{TOTAL_BEFORE}}
、
{{TOTAL_AFTER}}
、
{{TOTAL_SAVED}}
、
{{TOTAL_PCT}}
所有框架的总和
{{SCORE_BEFORE}}
、
{{SCORE_AFTER}}
、
{{SCORE_DELTA}}
、
{{SCORE_DELTA_SIGN}}
前后得分及差值
{{SESSION_BEFORE}}
、
{{SESSION_AFTER}}
、
{{SESSION_PCT}}
根目录 CLAUDE.md 前后 Token 数
{{ANNUAL_SAVINGS}}
{{TOTAL_SAVED}} × SESSIONS_PER_WEEK × WEEKS_PER_YEAR
,使用 K/M 后缀
{{SESSIONS_PER_WEEK}}
(默认 50)
如果用户指定,则使用用户值
{{WEEKS_PER_YEAR}}
(默认 50)
—
{{FILES_SCANNED}}
、
{{FOLDERS_COVERED}}
来自 Step 1
{{ORG_NAME}}
Context/business.md
或
Context/organization.md
的标题,或
name:
frontmatter;回退为当前工作目录文件夹名
{{DATE}}
、
{{TIMESTAMP}}
当天日期(YYYY-MM-DD)和 UTC ISO 时间戳
对于每个框架的
{{Fx_DETAILS}}
:将 finding 列表渲染为 HTML(严重级别标签、路径、excerpt、action、框架引用)。每个框架最多显示前 25 条 finding——如果更多,则追加“and N more flagged in {decisions-folder}/{date}-vault-audit-findings.json”。
整数使用千位分隔符。百分比保留一位小数。

6.1.5 — Per-role and per-framework before/after tables

6.1.5——每个角色和框架的 BEFORE/AFTER 表

These two tables are the dashboard's headline evidence that the run changed the vault, not just described it. Render both above the framework detail sections (between the architectural read and the framework rows).
Per-role table (
{{ROLE_METRICS_TABLE}}
) — one row per role in the registry plus a TOTAL row:
RoleFilesTokens before → afterEm dashes before → afterFrontmatter complete before → afterIndex coverage before → afterFindings open before → after
identity64,200 → 4,150 (-50)12 → 0 (-12)17% → 100% (+83pp)—6 → 0
context1012,400 → 11,890 (-510)23 → 0 (-23)80% → 100% (+20pp)100% → 100%5 → 0
projects148,200 → 8,200 (0)0 → 071% → 100% (+29pp)0% → 100% (+100pp)4 → 0
daily241145,000 → 145,000 (0)18 → 095% → 100%—18 → 0
meetings611412,000 → 412,00089 → 092% → 100%—89 → 0
(etc.)
TOTAL1,7102.1M → 1.9M (-200K)289 → 067% → 100%12% → 100%502 → 12
Style each delta cell with green for improvements, red for regressions, gray for unchanged. Em dash + frontmatter columns drop "before → after" when both are 0.
Per-framework table (
{{FRAMEWORK_METRICS_TABLE}}
) — one row per framework F1–F9 plus TOTAL:
FrameworkFindings before → afterFail before → afterWarn before → afterInfo before → afterAppliedFailed
F1 Anthropic CLAUDE.md9 → 02 → 06 → 01 → 090
F2 Karpathy Wiki4 → 01 → 02 → 01 → 040
F3 Caveman2 → 01 → 01 → 00 → 020
F4 Chroma1 → 00 → 01 → 00 → 010
F5 Memory3 → 12 → 01 → 10 → 021
F6 Progressive Disclosure3 → 01 → 02 → 00 → 030
G7 Hygiene3 → 01 → 01 → 01 → 030
F8 Reflection4 → 01 → 02 → 01 → 040
F9 Architecture5 → 01 → 01 → 03 → 050
TOTAL34 → 19 → 017 → 18 → 0331
Score row, separately, with before → after rendered prominently:
점수(F1–G7): 46 → 97 (+51) · "볼트 부패" → "잘 다듬어짐"
These tables are the difference between "here's what we need to do" (which is what saved-to-plan/declined would have been) and "here's what was done" (which is what bulk-apply mode produces). The dashboard frames the run retrospectively.
这两张表是仪表板最重要的证据,用于证明本次运行实际改变了 Vault,而不只是描述问题。将它们渲染在框架详情区上方(位于架构解读与框架行之间)。
每个角色的表(
{{ROLE_METRICS_TABLE}}
)——注册表中每个角色一行,外加 TOTAL 行:
RoleFilesTokens before → afterEm dashes before → afterFrontmatter complete before → afterIndex coverage before → afterFindings open before → after
identity64,200 → 4,150 (-50)12 → 0 (-12)17% → 100% (+83pp)—6 → 0
context1012,400 → 11,890 (-510)23 → 0 (-23)80% → 100% (+20pp)100% → 100%5 → 0
projects148,200 → 8,200 (0)0 → 071% → 100% (+29pp)0% → 100% (+100pp)4 → 0
daily241145,000 → 145,000 (0)18 → 095% → 100%—18 → 0
meetings611412,000 → 412,00089 → 092% → 100%—89 → 0
(etc.)
TOTAL1,7102.1M → 1.9M (-200K)289 → 067% → 100%12% → 100%502 → 12
每个差值单元格的样式:改善使用绿色,回归使用红色,未变化使用灰色。如果 em dash 和 frontmatter 两列的 BEFORE/AFTER 都为 0,则不显示“before → after”。
每个框架的表(
{{FRAMEWORK_METRICS_TABLE}}
)——F1~F9 每个框架一行,外加 TOTAL:
FrameworkFindings before → afterFail before → afterWarn before → afterInfo before → afterAppliedFailed
F1 Anthropic CLAUDE.md9 → 02 → 06 → 01 → 090
F2 Karpathy Wiki4 → 01 → 02 → 01 → 040
F3 Caveman2 → 01 → 01 → 00 → 020
F4 Chroma1 → 00 → 01 → 00 → 010
F5 Memory3 → 12 → 01 → 10 → 021
F6 Progressive Disclosure3 → 01 → 02 → 00 → 030
G7 Hygiene3 → 01 → 02 → 01 → 030
F8 Reflection4 → 01 → 02 → 01 → 040
F9 Architecture5 → 01 → 02 → 03 → 050
TOTAL34 → 19 → 017 → 18 → 0331
得分行单独醒目显示:
점수(F1–G7): 46 → 97 (+51) · "볼트 부패" → "잘 다듬어짐"
这两张表体现了“我们需要做什么”和“实际已经完成什么”之间的区别——前者属于保存到计划/拒绝模式,后者属于批量应用模式。仪表板从回顾的角度呈现本次运行。

6.2 — Build the HTML

6.2——构建 HTML

Templates (read once, substitute many times):
FileUsed as
references/report-template.html
main shell
references/report-row-template.html
one row per framework in the summary table
references/report-section-template.html
one detail section per framework
references/report-finding-template.html
one card per finding inside a detail section
Steps:
  1. Read all four templates.
  2. For each framework F1..F9:
    • Render one row from
      report-row-template.html
      with the framework's metrics → append to
      {{ROWS}}
      accumulator.
    • For each finding (cap at top-25 per framework, ranked: fixed first, then fail before warn, then by check ID): render one card from
      report-finding-template.html
      → append to that section's
      {{FINDINGS_HTML}}
      . HTML-escape
      EXCERPT
      ,
      REASONING
      , and
      ACTION
      (
      <
      ,
      >
      ,
      &
      ,
      "
      ). The
      REASONING
      field is mandatory — if the finding has no reasoning text, the skill is bugged; fail loudly.
    • Compute
      {{STATUS_PILL}}
      per finding from
      fix_status
      :
      • applied
        →
        <span class="pill fixed">이번 실행 적용</span>
      • saved_to_plan
        →
        <span class="pill saved">계획 저장</span>
        (links to
        {{REORG_PLAN_PATH}}
        )
      • declined
        →
        <span class="pill declined">거절</span>
      • failed
        →
        <span class="pill failed">실패</span>
        (with
        failure_reason
        shown inline)
    • If 0 findings: leave
      {{FINDINGS_HTML}}
      empty and substitute
      {{CLEAN_STATE}}
      with
      <div class="clean">✅ 모든 체크 통과. 이 프레임워크에서 발견된 문제 없음.</div>
      .
    • If total findings > 25: substitute
      {{MORE_NOTE}}
      with
      <p class="more">…외 {N}건이 {YYYY-MM-DD}-vault-audit-findings.json에 기록됨.</p>
      . Otherwise leave empty.
    • Render the section from
      report-section-template.html
      → append to
      {{DETAILS}}
      accumulator.
  3. Substitute
    {{ROWS}}
    and
    {{DETAILS}}
    in the main template.
  4. Substitute every other
    {{PLACEHOLDER}}
    (header stats, score, session impact, etc.).
  5. Sanity pass: scan the rendered HTML for any leftover
    {{...}}
    or
    {{ }}
    . If any remain → fail loudly, never save a half-rendered file.
The
{{FRAMEWORK_WHY}}
for each section comes from the matching framework reference's "Core thesis" — one short paragraph max. Fixed strings:
  • F1: "Anthropic 가이드: CLAUDE.md는 pruning 테스트를 통과하는, 가장 작고 구체적인 지시 집합으로 유지한다. 구체적 규칙은 약 89% 준수율, 모호한 규칙은 약 35%에 그친다."
  • F2: "Karpathy의 LLM 위키: 지식은 한 번 컴파일해 최신 상태로 유지한다. Lint가 끊긴 링크·고아 노트·모순·누락된 상호참조·소화되지 않은 원본을 잡아낸다."
  • F3: "Caveman 압축: 모든 토큰이 주의력을 두고 경쟁한다. 에이전트가 읽는 지시층에서 군더더기·헤징·인사치레·장황한 접속어를 걷어낸다."
  • F4: "Chroma context rot: 모든 모델은 길이가 늘수록 성능이 저하되고, 방해 요소가 해를 끼치며, 위치가 중요하다. 핵심 규칙을 앞에 두고 자동 로드 예산을 빡빡하게 유지한다."
  • F5: "Anthropic Memory: 파일당 ≤100KB / ~25K 토큰(권장 ~2,500토큰, 한국어는 토큰 기준). 초점 잡힌 여러 파일이 하나의 거대 파일보다 낫다. 에이전트는 이름으로 탐색한다."
  • F6: "Progressive Disclosure: 컨텍스트 창은 공공재다. 스킬 메타데이터는 항상, 본문은 관련 시, references는 필요 시 로드한다. references는 한 홉 깊이로 유지한다."
  • G7: "프로젝트 규칙 + 현장 노트: em대시 규율, 프론트매터 준수, 파일명과 중복되는 H1 금지, README 위생. 한국어판은 한국어 문장부호 치환과 번역체·AI 문체 냄새(G7.5)까지 점검한다."
  • F8: "Reflection(Anthropic Dreams 착안): 파일별 lint로는 모순·중복·오래된 가정·떠오르는 주제를 볼 수 없다. 큐레이션 레이어와 최근 세션을 함께 읽어 이를 드러내고, 사용자가 항목별로 승인하는 구체적 수정안을 제안한다."
  • F9: "아키텍처 & 탐색성: 동료 클로드가 실제로 걷는 경로(루트 CLAUDE.md → 라우팅 → 폴더 Plot.md → 파일)를 따라간다. 라우팅 항목이 폴더 현실과 맞는지, 모든 폴더에 최신 Plot.md가 있는지, 모든 파일이 3홉 이내로 도달 가능한지, CLAUDE.md가 이 사용자의 세계를 실제로 안내하는지 검증한다."
模板(读取一次,替换多次):
文件用途
references/report-template.html
主框架
references/report-row-template.html
摘要表中的每个框架一行
references/report-section-template.html
每个框架的详情区一段
references/report-finding-template.html
详情区中每条 finding 对应一张卡片
步骤:
  1. 读取全部四个模板。
  2. 对每个框架 F1~F9:
    • 使用该框架的指标从
      report-row-template.html
      渲染一行 → 追加到
      {{ROWS}}
      累加器。
    • 对于每条 finding(每个框架最多前 25 条,排序方式:已修复优先,然后 fail 优先于 warn,最后按 check ID 排序):从
      report-finding-template.html
      渲染一张卡片 → 追加到对应区段的
      {{FINDINGS_HTML}}
      。必须对
      EXCERPT
      、
      REASONING
      和
      ACTION
      进行 HTML 转义(
      <
      、
      >
      、
      &
      、
      "
      )。
      REASONING
      字段为必填项——如果 finding 没有 reasoning 文本,说明 Skill 存在缺陷;必须明确失败。
    • 根据
      fix_status
      计算每条 finding 的
      {{STATUS_PILL}}
      :
      • applied
        →
        <span class="pill fixed">이번 실행 적용</span>
      • saved_to_plan
        →
        <span class="pill saved">계획 저장</span>
        (链接到
        {{REORG_PLAN_PATH}}
        )
      • declined
        →
        <span class="pill declined">거절</span>
      • failed
        →
        <span class="pill failed">실패</span>
        (内联显示
        failure_reason
        )
    • 如果 finding 数为 0:保持
      {{FINDINGS_HTML}}
      为空,并将
      {{CLEAN_STATE}}
      替换为
      <div class="clean">✅ 모든 체크 통과. 이 프레임워크에서 발견된 문제 없음.</div>
      。
    • 如果 finding 总数大于 25:将
      {{MORE_NOTE}}
      替换为
      <p class="more">…외 {N}건이 {YYYY-MM-DD}-vault-audit-findings.json에 기록됨.</p>
      。否则保持为空。
    • 从
      report-section-template.html
      渲染区段 → 追加到
      {{DETAILS}}
      累加器。
  3. 将
    {{ROWS}}
    和
    {{DETAILS}}
    替换到主模板中。
  4. 替换所有其他
    {{PLACEHOLDER}}
    (标题统计、得分、会话影响等)。
  5. **合理性检查:**扫描渲染后的 HTML,确认不存在残留的
    {{...}}
    或
    {{ }}
    。如果仍有残留 → 明确失败,绝不保存半渲染文件。
每个区段的
{{FRAMEWORK_WHY}}
来自对应框架 reference 的“Core thesis”——最多一段短文。固定字符串如下:
  • F1:“Anthropic 指南:CLAUDE.md 应保持为能够通过 pruning test 的最小且具体的指令集合。具体规则的遵守率约为 89%,模糊规则则只有约 35%。”
  • F2:“Karpathy 的 LLM Wiki:知识只需编译一次并保持最新。Lint 会发现断裂链接、孤儿笔记、矛盾、缺失的交叉引用以及未消化的原始资料。”
  • F3:“Caveman 压缩:每一个 Token 都在争夺注意力。清除 Agent 读取的指令层中的冗余、含糊措辞、寒暄和冗长连接词。”
  • F4:“Chroma context rot:所有模型都会随着内容变长而性能下降,分心因素会造成危害,位置非常重要。将核心规则放在前面,并严格控制自动加载预算。”
  • F5:“Anthropic Memory:每文件 ≤100KB/约 25K Token(建议约 2,500 Token,韩语按 Token 判断)。多个聚焦明确的小文件优于一个巨大的文件。Agent 通过名称进行探索。”
  • F6:“Progressive Disclosure:上下文窗口是一种公共资源。始终加载 Skill 元数据,仅在相关时加载正文,仅在需要时加载 references。references 保持一层嵌套深度。”
  • G7:“项目规则+实践笔记:em dash 纪律、frontmatter 合规、禁止与文件名重复的 H1、README 卫生。韩语版还会检查韩语句法替换,以及翻译腔和 AI 文体气味(G7.5)。”
  • F8:“Reflection(受 Anthropic Dreams 启发):逐文件 lint 无法发现矛盾、重复、过时假设和浮现主题。共同阅读策展层与近期会话,将其显现出来,并提出由用户逐项批准的具体修复方案。”
  • F9:“架构与可发现性:沿着同事 Claude 实际采取的路径(根目录 CLAUDE.md → 路由 → 文件夹 Plot.md → 文件)进行检查。验证路由条目是否符合文件夹实际情况、每个文件夹是否都有最新 Plot.md、所有文件是否都能在 3 跳以内到达,以及 CLAUDE.md 是否真正引导用户了解其世界。”

6.3 — Save (uses the role registry, not hardcoded paths)

6.3——保存(使用角色注册表,不硬编码路径)

Pick the save folder via the role registry:
  1. roles.decisions.path
    is set → save there.
  2. Else
    roles.archive.path
    is set + writable → save there.
  3. Else create
    audits/
    at vault root and save there. Note the missing role to F9.0.
Save HTML to
{decisions-folder}/{YYYY-MM-DD}-vault-audit.html
. Save the raw findings JSON to
{decisions-folder}/{YYYY-MM-DD}-vault-audit-findings.json
(so users can mine the full list).
Read the HTML back to confirm content present (not just file present). On mismatch → retry once → fail loudly.
通过角色注册表选择保存文件夹:
  1. 如果设置了
    roles.decisions.path
    → 保存在那里。
  2. 否则,如果
    roles.archive.path
    已设置且可写 → 保存在那里。
  3. 否则,在 Vault 根目录创建
    audits/
    并保存在那里。同时向 F9.0 记录缺少相应角色的情况。
将 HTML 保存为
{decisions-folder}/{YYYY-MM-DD}-vault-audit.html
。
将原始 finding JSON 保存为
{decisions-folder}/{YYYY-MM-DD}-vault-audit-findings.json
,以便用户进一步分析完整列表。
重新读取 HTML,确认其中包含预期内容(而不只是确认文件存在)。如果不匹配 → 重试一次,然后明确失败。

6.4 — Open + render + summarize (final response, in this order)

6.4——打开、渲染并汇总(最终响应,按此顺序)

Part 1 — open in browser.
Bash
:
open "{path}"
(macOS) /
xdg-open
(Linux) /
start
(Windows).
Part 2 — emit the full saved HTML inside an
html
code fence.
Runtimes with artifact support (claude.ai, Claude Desktop) render it as a side panel; CLI shows it as a code block (browser already opened in Part 1). This is the only place HTML appears in chat — don't dump fragments mid-run, don't paste it twice, don't wrap commentary around it.
Part 3 — summary (after the HTML, no commentary in between):
✅ Optimizer run complete — here's what changed:
Report: {decisions-folder}/{YYYY-MM-DD}-vault-audit.html
JSON sidecar: {decisions-folder}/{YYYY-MM-DD}-vault-audit-findings.json
Score (F1–G7): {score_before} → {score_after} ({delta_sign}{delta}) — "{interpretation_before}" → "{interpretation_after}"
{N} files audited · {applied_total} fixes applied · {failed_total} mechanical failures (see report for reasons)
Em dashes: {em_before} → {em_after} (-{em_delta}) · Frontmatter coverage: {fm_pct_before} → {fm_pct_after} (+{fm_pct_delta}pp) · Folder-index coverage: {idx_pct_before} → {idx_pct_after} (+{idx_pct_delta}pp)
Tokens saved: {tokens_saved} ({tokens_pct_saved}% reduction in agent-load) · ~{annual_savings} tokens/year saved at {sessions}/week
The summary frames the run retrospectively — what was done, what changed. In bulk-apply mode, "saved-to-plan" and "declined" lines are absent; only
applied
and
failed
exist. In selective-walk mode, append the saved-to-plan and declined counts as additional lines.
Stop. Do not propose follow-up actions.

Part 1——在浏览器中打开。
Bash
:
open "{path}"
(macOS)/
xdg-open
(Linux)/
start
(Windows)。
**Part 2——在
html
代码围栏中输出完整的已保存 HTML。**支持 artifact 的运行时(claude.ai、Claude Desktop)会将其渲染为侧边面板;CLI 会显示为代码块(浏览器已在 Part 1 中打开)。这是聊天中唯一出现 HTML 的位置——运行中不要输出片段,不要重复粘贴,也不要在其间添加评论。
Part 3——摘要(位于 HTML 之后,中间不得插入评论):
✅ Optimizer run complete — here's what changed:
Report: {decisions-folder}/{YYYY-MM-DD}-vault-audit.html
JSON sidecar: {decisions-folder}/{YYYY-MM-DD}-vault-audit-findings.json
Score (F1–G7): {score_before} → {score_after} ({delta_sign}{delta}) — "{interpretation_before}" → "{interpretation_after}"
{N} files audited · {applied_total} fixes applied · {failed_total} mechanical failures (see report for reasons)
Em dashes: {em_before} → {em_after} (-{em_delta}) · Frontmatter coverage: {fm_pct_before} → {fm_pct_after} (+{fm_pct_delta}pp) · Folder-index coverage: {idx_pct_before} → {idx_pct_after} (+{idx_pct_delta}pp)
Tokens saved: {tokens_saved} ({tokens_pct_saved}% reduction in agent-load) · ~{annual_savings} tokens/year saved at {sessions}/week
摘要从回顾角度呈现本次运行——已经做了什么、发生了哪些变化。在批量应用模式下,不出现“saved-to-plan”和“declined”信息,只存在
applied
和
failed
。在选择性 walk 模式下,追加保存到计划和拒绝的计数。
停止。不要提出后续操作建议。

Rules — what to never do

Rules——绝不能做的事

  • Never assume a folder or file by name. Always resolve through the role registry built in Step 1.5.
    Context/
    ,
    Projects/
    ,
    Daily/
    ,
    Plot.md
    ,
    me.md
    , etc. are examples in the documentation; the runtime resolves abstract roles to whatever the user actually has.
  • Never ignore a folder because it doesn't fit a standard role. Every folder is classified — standard or custom — with a layer. Custom roles (
    Building/
    ,
    Garden/
    , anything user-specific) are first-class participants in every framework that operates on their layer. Skipping them defeats the discovery pass.
  • Never treat the role registry as ephemeral. Persist confirmed assignments to
    .claude/vault-roles.json
    at end of Step 1.5 so future runs start from the user's confirmed view of their vault, not from a fresh re-classification that re-prompts everything.
  • Never propose a structural change purely because BenAI uses that convention. F9.0 tier-2 findings (functional improvements suggesting BenAI conventions) must cite specific evidence in this vault that the convention would resolve a real problem. F9.6 reorg proposals must cite the user's own stated folder purposes. "BenAI does X" is not a valid justification anywhere in the optimizer. The BenAI taxonomy is a recognition lens and an optional reference — never a target shape the user must conform to.
  • Never drop a tier-2 finding when the user has a custom role already serving the function. If
    Lab/
    (custom curated) is already playing the projects role, no F9.0 tier-2 finding fires for "you should add a projects folder." Function over name.
  • Never unilaterally decide a finding is "test fixture," "user probably didn't want this," "judgment-required-per-section," or any other agent-invented reason to route a finding to anything other than
    applied
    /
    failed
    in bulk-apply mode. The user said apply everything; that means everything. If applying is mechanically dangerous, attempt the safest mechanical version (e.g., split a 222KB file at H2 boundaries with an automated-split marker, mark
    applied_with_caveat: true
    ). The only valid escape is mechanical failure with a recorded
    failure_reason
    .
  • Never render the dashboard with the BEFORE score. Step 5.9 is mandatory: re-measure after fixes, recompute score, populate
    {{SCORE_AFTER}}
    and the per-role/per-framework after columns. A dashboard that shows only BEFORE-state numbers is a bug.
  • Never frame the final summary as "what we need to do" in bulk-apply mode. The summary is retrospective: what changed, how much, what failed mechanically and why. Save-to-plan / declined / "for later" framings belong only to selective-walk mode.
  • Never apply a change the user didn't approve via
    AskUserQuestion
    walk in Step 4.
  • Never auto-rewrite a CLAUDE.md without per-item user confirmation. F1.x edits, F9.1 routing rewrites, and F9.7 orientation additions are walk-only — the user reviews and confirms each drafted edit before it lands.
  • Never delete a file before grepping for references.
  • Never modify files in the technical skip list (
    .git
    ,
    .obsidian
    ,
    .trash
    ,
    node_modules
    ,
    dist
    ,
    build
    ).
  • Never apply substitutions inside protected zones (code, URLs, paths, frontmatter, wikilinks, headings, table delimiters, dates).
  • Never skip a file because of its role. The classification routes rules; it never excludes files.
  • Never skip a framework. F1–F9 all run every audit.
  • Never leave a finding open. Every finding ends Step 5 with
    fix_status
    set to
    applied
    ,
    saved_to_plan
    ,
    declined
    , or
    failed
    . Unset is a bug.
  • Never bulk-apply semantic fixes (F2.2 wikilinks, F2.4 cross-refs, F8.x reflection, F9.1–F9.7 architecture). Every semantic fix walks per item with the user confirming target/winner/destination/wording.
  • Never let F8 or F9 modify a SKILL.md or anything in
    .claude/rules/
    . F8's scope is the curated layer; F9's scope excludes SKILL.md and
    .claude/rules/
    .
  • Never complete an F8.2 merge or F9.5 folder merge without verifying (a) merged file size against F5's per-file budget and (b) zero new dead wikilinks. Failing either rolls back and sets
    fix_status: failed
    .
  • Never generate a Plot.md that exceeds 8KB or has em dashes. If a folder's children list would push Plot.md over budget, route to F9.6 reorg proposal (split the folder) instead.
  • Never delete a merge source. F8.2 / F9.5 archive sources to
    Intelligence/archive/{date}-merged/
    .
  • Never score F8 or F9 into the health score. Both surface optimization opportunities, not lint failures; the score covers F1–G7 only.
  • Never paraphrase a framework rule when surfacing a finding. Read the relevant pass-implementation file when running its checks; cite the framework in the finding. The Step 2.2 sanity gate enforces this.
  • Never run silently. Step 0.5 creates the visible task list; every framework's task transitions
    in_progress
    →
    completed
    as the run unfolds. Skipping the task list defeats the skill.
  • Never ship a half-rendered template. If any
    {{placeholder}}
    survives → fail.
  • Never dump partial HTML mid-run. The full HTML appears once, at the end (Step 6.4 Part 2). Don't paste HTML twice; don't paste partial fragments while findings are being collected.

  • 绝不根据文件夹或文件名称进行假设。始终通过 Step 1.5 构建的角色注册表解析。
    Context/
    、
    Projects/
    、
    Daily/
    、
    Plot.md
    、
    me.md
    等仅为文档示例;运行时将抽象角色解析为用户实际拥有的结构。
  • 绝不忽略不符合标准角色的文件夹。每个文件夹都必须分类——无论标准角色还是自定义角色,并带有层级。自定义角色(
    Building/
    、
    Garden/
    或任何用户特有结构)都是 operates on their layer 的框架中的一等角色。跳过它们会破坏发现流程。
  • 绝不将角色注册表视为临时数据。在 Step 1.5 结束时,将已确认的分配持久化到
    .claude/vault-roles.json
    ,使后续运行从用户已经确认的 Vault 视图开始,而不是重新分类并重复提问。
  • 绝不仅因为 BenAI 使用某种约定就提出结构变更建议。F9.0 第二层 finding(建议采用 BenAI 约定的功能性改进)必须引用此 Vault 中能够证明该约定可解决真实问题的具体证据。F9.6 重组提案必须引用用户自己陈述的文件夹用途。“BenAI 采用 X”不能作为优化器中任何位置的正当理由。BenAI 分类法是一种识别视角和可选参考,绝不是用户必须遵循的目标形态。
  • 绝不在用户已有自定义角色承担相同功能时丢弃第二层 finding。如果
    Lab/
    (自定义 curated 角色)已经承担 projects 角色,就不会产生“你应该增加 projects 文件夹”的 F9.0 第二层 finding。功能优先于名称。
  • 绝不在批量应用模式下,自行以“测试夹具”“用户可能不需要”“某一部分需要判断”或其他 Agent 自行发明的原因,将 finding 路由到
    applied
    /
    failed
    之外的状态。用户表示全部应用,就意味着全部应用。如果机械应用会损坏内容,应尝试最安全的机械版本,例如在 H2 边界拆分 222KB 文件,并加入自动拆分标记,同时将状态标记为
    applied_with_caveat: true
    。唯一允许的例外是机械失败,并记录
    failure_reason
    。
  • 绝不使用 BEFORE 得分渲染仪表板。Step 5.9 是强制步骤:修复后重新测量、重新计算得分,并填充
    {{SCORE_AFTER}}
    和每个角色/框架的 AFTER 列。只显示 BEFORE 数据的仪表板属于缺陷。
  • 绝不在批量应用模式下将最终摘要表述为“我们需要做什么”。摘要应从回顾角度说明:发生了什么变化、变化了多少、哪些内容发生机械失败以及失败原因。保存到计划/拒绝/以后再处理的表述仅适用于选择性 walk 模式。
  • 绝不应用用户未在 Step 4 的
    AskUserQuestion
    walk 中批准的变更。
  • 绝不在未经逐项用户确认的情况下自动重写 CLAUDE.md。F1.x 编辑、F9.1 路由重写和 F9.7 导航补充均为 walk-only——用户必须先审查并确认每项草拟编辑,然后才能落盘。
  • 绝不在 grep 引用之前删除文件。
  • 绝不修改技术性排除列表中的文件(
    .git
    、
    .obsidian
    、
    .trash
    、
    node_modules
    、
    dist
    、
    build
    )。
  • 绝不在保护区(代码、URL、路径、frontmatter、Wiki 链接、标题、表格分隔符、日期)内应用替换。
  • 绝不因文件角色而跳过文件。分类用于路由规则,而不是排除文件。
  • 绝不跳过框架。每次审计都运行 F1~F9。
  • 绝不让 finding 保持未处理状态。每条 finding 都在 Step 5 结束时将
    fix_status
    设置为
    applied
    、
    saved_to_plan
    、
    declined
    或
    failed
    。未设置属于缺陷。
  • 绝不批量应用语义型修复(F2.2 Wiki 链接、F2.4 交叉引用、F8.x Reflection、F9.1~F9.7 架构)。所有语义型修复必须逐项 walk,由用户确认目标、保留项、目标位置或措辞。
  • 绝不让 F8 或 F9 修改 SKILL.md 或
    .claude/rules/
    中的任何内容。F8 的范围是策展层;F9 的范围排除 SKILL.md 和
    .claude/rules/
    。
  • 绝不在未验证以下两项的情况下完成 F8.2 合并或 F9.5 文件夹合并:(a) 合并文件大小符合 F5 每文件预算;(b) 没有新的无效 Wiki 链接。任一检查失败都应回滚,并将
    fix_status
    设置为
    failed
    。
  • 绝不生成大于 8KB 或包含 em dash 的 Plot.md。如果文件夹的子项列表会导致 Plot.md 超预算,应将其路由到 F9.6 重组提案(拆分文件夹),而不是继续生成。
  • 绝不删除合并来源。F8.2/F9.5 将来源归档到
    Intelligence/archive/{date}-merged/
    。
  • 绝不将 F8 或 F9 计入健康得分。两者只呈现优化机会,不属于 lint 失败;得分仅覆盖 F1~G7。
  • 绝不在呈现 finding 时转述框架规则。运行检查时必须读取相关 pass 实现文件,并在 finding 中引用框架。Step 2.2 合理性门槛负责强制执行。
  • 绝不静默运行。Step 0.5 创建可见任务列表;每个框架的任务在运行过程中从
    in_progress
    转为
    completed
    。跳过任务列表违背了本 Skill 的目的。
  • 绝不输出半渲染模板。如果仍有任何
    {{placeholder}}
    残留 → 失败。
  • 绝不在运行中输出部分 HTML。完整 HTML 只在最后出现一次(Step 6.4 Part 2)。不要粘贴两次 HTML,也不要在收集 finding 的过程中粘贴部分片段。

Why this skill exists

本 Skill 的存在原因

Eight frameworks plus practitioner field notes converge on one conclusion: vaults rot without active maintenance. Karpathy calls it lint. Anthropic calls it the pruning test + the memory budget. Chroma calls it context rot. Caveman calls it token discipline. Progressive disclosure calls it layering. Anthropic Dreams calls it reflection — read the curated layer alongside recent sessions and surface what per-file lint can't see. F9 adds architecture & discoverability: walk the actual co-worker-Claude path, verify routing matches folder reality, ensure every folder has a current Plot.md, and confirm every file is reachable from the root in ≤ 3 hops. The audit encodes every auditable signal as a discrete check, applies them all on every run, walks every finding through apply-now / save-to-plan / declined, and saves a categorized HTML dashboard with the agent's architectural read at the top.
Run weekly while the vault is growing. Monthly once stable. Each run appends a dated dashboard so the user can watch the score climb.
For the deep rules behind each pass, read the relevant
references/{framework}.md
and
references/passes-{framework}.md
. Each is complete on its own — TOC, full rules, exact regex, finding format, source URLs.
八个框架与实践者现场笔记最终得出同一个结论:如果不积极维护,Vault 就会腐化。Karpathy 将其称为 lint。Anthropic 将其称为 pruning test+memory budget。Chroma 将其称为 context rot。Caveman 将其称为 token discipline。Progressive Disclosure 将其称为 layering。Anthropic Dreams 将其称为 reflection——将策展层与近期会话一同阅读,显现逐文件 lint 无法发现的内容。F9 增加 architecture & discoverability:沿着同事 Claude 的实际路径行走,验证路由是否符合文件夹实际情况,确保每个文件夹都有最新 Plot.md,并确认所有文件都能从根目录在不超过 3 跳内到达。该审计将每种可审计信号编码为独立检查,每次运行全部应用,逐项 walk 每条 finding 并选择立即应用/保存到计划/拒绝,同时保存一份分类 HTML 仪表板,并在顶部展示 Agent 的架构解读。
当 Vault 仍在增长时每周运行;稳定后每月运行一次。每次运行都会追加一份带日期的仪表板,让用户能够看到得分逐步提高。
如需了解每个 pass 的深入规则,请阅读对应的
references/{framework}.md
和
references/passes-{framework}.md
。每个文件均可独立阅读,包含目录、完整规则、精确正则表达式、finding 格式和来源 URL。