From f1c7036c330944a5547b73d944edc3e3099a56b1 Mon Sep 17 00:00:00 2001 From: AAsige <168331480+AAsige@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:35:48 +0800 Subject: [PATCH] =?UTF-8?q?maintain=20|=202026-08-07=20=E6=9C=BA=E5=88=B6?= =?UTF-8?q?=E5=9B=BA=E5=8C=96=EF=BC=88frontmatter=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E5=BC=BA=E5=88=B6=20+=20=E6=9C=88=E5=BA=A6?= =?UTF-8?q?=E5=9B=9E=E9=A1=BE=E5=BD=92=E6=A1=A3=E6=8F=90=E9=86=92=EF=BC=89?= =?UTF-8?q?+=2018=20=E9=A1=B5=E8=A1=A5=20last=5Fupdated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/wiki-audit.ps1 | 29 +++++++++++++++++++ wiki/_meta/WIKI-SCHEMA.md | 3 +- wiki/compile.log | 7 +++++ wiki/concepts/商品市场金融化与库存套利.md | 1 + wiki/concepts/商品超级周期与交易商资产化.md | 1 + wiki/concepts/大宗商品交易商与石油市场权力.md | 1 + wiki/concepts/股票市场周期与大势判断.md | 1 + ...铸造铝合金与ADC12产业链、废铝成本及需求.md | 1 + wiki/concepts/阿布量化框架架构.md | 1 + wiki/practices/大宗商品交易政治风险与合规.md | 1 + wiki/practices/技术分析形态与突破确认.md | 1 + wiki/practices/期货基本分析逻辑.md | 1 + wiki/practices/期货量化回测与位移路程比.md | 1 + wiki/practices/股票交易系统与技术分析.md | 1 + wiki/practices/股票交易纪律与资金管理.md | 1 + wiki/practices/股票基本面与筹码选股.md | 1 + .../股票投资要义:周期、筹码与交易纪律.md | 1 + wiki/practices/阿布量化策略开发与回测.md | 1 + ...-is-Harness-Engineering-in-Simple-Terms.md | 1 + wiki/期货研究资料目录.md | 1 + wiki/期货资料来源与证据边界.md | 1 + 21 files changed, 56 insertions(+), 1 deletion(-) diff --git a/tools/wiki-audit.ps1 b/tools/wiki-audit.ps1 index f67f3b3..0bca5d1 100644 --- a/tools/wiki-audit.ps1 +++ b/tools/wiki-audit.ps1 @@ -69,6 +69,28 @@ foreach ($page in $pages) { } $text = [IO.File]::ReadAllText($page.FullName) + + # frontmatter 必填字段(schema 第 3 节:title/type/last_updated/tags/confidence; + # 导航页整体豁免(走导航 frontmatter 约定),raw_sources 另对 query 页豁免) + $fmMatch = [regex]::Match($text, '(?s)^---\r?\n(.*?)\r?\n---') + if ($fmMatch.Success) { + $fmText = $fmMatch.Groups[1].Value + $isNavPage = $page.Name -in @('INDEX.md', 'Glossary.md', 'sources.md', '期货研究资料目录.md', '期货资料来源与证据边界.md') + if (-not $isNavPage) { + foreach ($field in @('title', 'type', 'last_updated', 'tags', 'confidence')) { + if (-not [regex]::IsMatch($fmText, "(?m)^$field\s*:")) { + Add-Warning "missing frontmatter field '$field' in $($page.FullName)" + } + } + } + $isQueryPage = [regex]::IsMatch($fmText, '(?m)^type:\s*query') + if (-not $isQueryPage -and -not $isNavPage) { + if (-not [regex]::IsMatch($fmText, '(?m)^raw_sources\s*:')) { + Add-Warning "missing raw_sources field in $($page.FullName)" + } + } + } + foreach ($match in [regex]::Matches($text, '\[\[([^\]|#]+)(?:#[^\]|]+)?(?:\|[^\]]+)?\]\]')) { $target = $match.Groups[1].Value.Trim() if (-not $byBaseName.ContainsKey($target)) { @@ -137,6 +159,13 @@ if (Test-Path -LiteralPath $State -PathType Leaf) { Add-Error "compile-results.tsv does not exist: $State" } +# 月度回顾页积累提醒(schema 第 7 节时序内容约定:满 3 页应归档最早为历史层) +$reviewPages = @($pages | Where-Object { $_.BaseName -match '20\d{2}年\d{1,2}月市场回顾$' }) +if ($reviewPages.Count -ge 3) { + $reviewNames = ($reviewPages | Sort-Object Name | ForEach-Object { $_.BaseName }) -join '、' + Add-Warning "月度回顾页已积累 $($reviewPages.Count) 页($reviewNames);按 schema 时序内容约定应归档最早页面为历史层(status: historical)并由季度/年度综述承接" +} + $allTextFiles = @(Get-ChildItem -LiteralPath $Root -Recurse -File -Include '*.md', '*.tsv', '*.log' -ErrorAction SilentlyContinue) $deletedSourceRefs = @() foreach ($file in $allTextFiles) { diff --git a/wiki/_meta/WIKI-SCHEMA.md b/wiki/_meta/WIKI-SCHEMA.md index e8a0cd1..3d6bde3 100644 --- a/wiki/_meta/WIKI-SCHEMA.md +++ b/wiki/_meta/WIKI-SCHEMA.md @@ -169,13 +169,14 @@ pwsh -File .\tools\wiki-audit.ps1 必须确认: -- frontmatter 完整; +- frontmatter 完整(必填字段 `title`/`type`/`last_updated`/`tags`/`confidence`,导航页整体豁免;`raw_sources` 对导航页与 `type: query` 页豁免,缺字段报 WARNING); - Wiki 内部链接无断链; - 图片路径存在; - INDEX 覆盖全部内容页; - `raw_sources` 路径存在; - `compile-results.tsv` 可解析、无重复来源行和占位哈希; - 用户主动删除的来源没有活动派生引用; +- 月度回顾页(`20xx年N月市场回顾` 命名)积累满 3 页时审计输出归档 WARNING(按第 7 节时序内容约定归档最早页面为历史层); - `git diff --check` 通过。 超长页面检查默认以 200 行为阈值;经人工确认确实需要保留完整结构的页面,可通过 `tools/wiki-audit.ps1` 的 `$LongPageAllowlist` 白名单豁免。当前白名单包含:`Glossary.md`、`INDEX.md`(唯一总入口与阅读地图,需完整列出全部内容页,2026-08-07 加入)、`concepts/Harness-Engineering-Complete-Guide.md`、`concepts/Meta-Harness.md`、`practices/OpenAI-Codex-Harness-Engineering.md` 和 `queries/What-is-Harness-Engineering-in-Simple-Terms.md`。白名单只抑制超长页面警告,不豁免 frontmatter、链接、图片、来源路径或编译状态检查。 diff --git a/wiki/compile.log b/wiki/compile.log index 9121cfe..3f61ada 100644 --- a/wiki/compile.log +++ b/wiki/compile.log @@ -416,3 +416,10 @@ - D 第二批:62 个 contested 页面逐页信号核验——全部为 A 类(标注完整:均有版本/年份/时点/核验声明,页面定位明确证据边界),B 类(需补标注)0、C 类(可疑)0,维持不变。累计 20 low_confidence + 62 contested 全部核验完成,无页面需升级/降级。 - 顺带修复 frontmatter 合规:23 处。利弗莫尔交易纪律 type=practices→practice;22 个 llm-wiki 初始批次页面补 type(14 concept / 8 practice / 1 query)与 confidence: medium;paddleocr-ocr工具链 sources 键改名 raw_sources 并补 last_updated(初插位置破坏 YAML 结构,已修复并全库 PyYAML 校验通过)。 - 验证:wiki-audit.ps1 normal + strict 双绿(0 ERROR / 0 WARNING);reflect missing_role=0 保持;97 页 frontmatter 全部 YAML 可解析。 + +## [2026-08-07] maintain | 机制固化:frontmatter 字段强制 + 月度回顾归档提醒 + +- wiki-audit.ps1 新增两条硬检查:(1) 非导航页 frontmatter 必填 title/type/last_updated/tags/confidence(导航页整体豁免,raw_sources 另对 type:query 页豁免),缺失报 WARNING;(2) 命名匹配 20xx年N月市场回顾 的页面满 3 页时输出归档 WARNING(按 schema 第 7 节时序内容约定)。 +- 新检查首跑暴露 27 条 WARNING:3 个导航页被误查(已改豁免)+18 页缺 last_updated(已批量补 2026-08-07),修复后 normal+strict 双绿。 +- 临时探针验证(mini wiki):3 个回顾页触发归档提醒且列出名称、缺字段页精确报 2 条缺失、无回顾页误报、normal exit 0 / strict exit 1——行为全部正确。 +- WIKI-SCHEMA.md 第 8 节检查清单同步更新;wiki-compilation-verification 技能已固化两条仓库约定。 diff --git a/wiki/concepts/商品市场金融化与库存套利.md b/wiki/concepts/商品市场金融化与库存套利.md index 0bd57c6..82a2efb 100644 --- a/wiki/concepts/商品市场金融化与库存套利.md +++ b/wiki/concepts/商品市场金融化与库存套利.md @@ -1,5 +1,6 @@ --- title: "商品市场金融化与库存套利" +last_updated: 2026-08-07 source: "raw/期货/00-整体相关/交易的世界-第三章至结论.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/concepts/商品超级周期与交易商资产化.md b/wiki/concepts/商品超级周期与交易商资产化.md index f7c0769..19e5f4b 100644 --- a/wiki/concepts/商品超级周期与交易商资产化.md +++ b/wiki/concepts/商品超级周期与交易商资产化.md @@ -1,5 +1,6 @@ --- title: "商品超级周期与交易商资产化" +last_updated: 2026-08-07 source: "raw/期货/00-整体相关/交易的世界-第三章至结论.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/concepts/大宗商品交易商与石油市场权力.md b/wiki/concepts/大宗商品交易商与石油市场权力.md index bbf9eca..f63bb69 100644 --- a/wiki/concepts/大宗商品交易商与石油市场权力.md +++ b/wiki/concepts/大宗商品交易商与石油市场权力.md @@ -1,5 +1,6 @@ --- title: "大宗商品交易商与石油市场权力" +last_updated: 2026-08-07 source: "raw/期货/00-整体相关/交易的世界-第二章-石油教父.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/concepts/股票市场周期与大势判断.md b/wiki/concepts/股票市场周期与大势判断.md index b3d2e12..6e3fd54 100644 --- a/wiki/concepts/股票市场周期与大势判断.md +++ b/wiki/concepts/股票市场周期与大势判断.md @@ -1,5 +1,6 @@ --- title: "股票市场周期与大势判断:作者体系及验证边界" +last_updated: 2026-08-07 source: "胡斐,《股票投资要义》,经济管理出版社,2015 年 6 月第 1 版" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/concepts/铸造铝合金与ADC12产业链、废铝成本及需求.md b/wiki/concepts/铸造铝合金与ADC12产业链、废铝成本及需求.md index d7e7246..d9915e6 100644 --- a/wiki/concepts/铸造铝合金与ADC12产业链、废铝成本及需求.md +++ b/wiki/concepts/铸造铝合金与ADC12产业链、废铝成本及需求.md @@ -1,5 +1,6 @@ --- title: "铸造铝合金与 ADC12 产业链、废铝成本及需求" +last_updated: 2026-08-07 source: "铝行业研讨学习(周彦希)" created: 2026-08-03 updated: 2026-08-03 diff --git a/wiki/concepts/阿布量化框架架构.md b/wiki/concepts/阿布量化框架架构.md index 8ad2fda..a14b303 100644 --- a/wiki/concepts/阿布量化框架架构.md +++ b/wiki/concepts/阿布量化框架架构.md @@ -1,5 +1,6 @@ --- title: "阿布量化(ABuQuant)框架架构" +last_updated: 2026-08-07 source: "https://github.com/bbfamily/abu (commit d602d847677e4c2b77b0a122df30816ea68b5710)" created: 2026-08-07 updated: 2026-08-07 diff --git a/wiki/practices/大宗商品交易政治风险与合规.md b/wiki/practices/大宗商品交易政治风险与合规.md index 37706e0..5ed4f85 100644 --- a/wiki/practices/大宗商品交易政治风险与合规.md +++ b/wiki/practices/大宗商品交易政治风险与合规.md @@ -1,5 +1,6 @@ --- title: "大宗商品交易政治风险与合规" +last_updated: 2026-08-07 source: "raw/期货/00-整体相关/交易的世界-第三章至结论.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/技术分析形态与突破确认.md b/wiki/practices/技术分析形态与突破确认.md index 9c60202..f5d851e 100644 --- a/wiki/practices/技术分析形态与突破确认.md +++ b/wiki/practices/技术分析形态与突破确认.md @@ -1,5 +1,6 @@ --- title: "技术分析形态与突破确认" +last_updated: 2026-08-07 source: "技术分析图教学材料" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/期货基本分析逻辑.md b/wiki/practices/期货基本分析逻辑.md index dbff670..67f1988 100644 --- a/wiki/practices/期货基本分析逻辑.md +++ b/wiki/practices/期货基本分析逻辑.md @@ -1,5 +1,6 @@ --- title: "期货基本分析逻辑" +last_updated: 2026-08-07 source: "raw/期货/01-基本分析逻辑/期货基本分析逻辑.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/期货量化回测与位移路程比.md b/wiki/practices/期货量化回测与位移路程比.md index b24f2d5..1d30afc 100644 --- a/wiki/practices/期货量化回测与位移路程比.md +++ b/wiki/practices/期货量化回测与位移路程比.md @@ -1,5 +1,6 @@ --- title: "期货量化回测与位移路程比" +last_updated: 2026-08-07 source: "https://github.com/bbfamily/abu (commit d602d847677e4c2b77b0a122df30816ea68b5710)" created: 2026-08-07 updated: 2026-08-07 diff --git a/wiki/practices/股票交易系统与技术分析.md b/wiki/practices/股票交易系统与技术分析.md index 7439da8..303734d 100644 --- a/wiki/practices/股票交易系统与技术分析.md +++ b/wiki/practices/股票交易系统与技术分析.md @@ -1,5 +1,6 @@ --- title: "股票交易系统与技术分析:趋势、MACD和买卖点" +last_updated: 2026-08-07 source: "胡斐,《股票投资要义》,经济管理出版社,2015 年 6 月第 1 版" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/股票交易纪律与资金管理.md b/wiki/practices/股票交易纪律与资金管理.md index 2ea4524..a82c0ad 100644 --- a/wiki/practices/股票交易纪律与资金管理.md +++ b/wiki/practices/股票交易纪律与资金管理.md @@ -1,5 +1,6 @@ --- title: "股票交易纪律与资金管理:从作者经验到可检验流程" +last_updated: 2026-08-07 source: "胡斐,《股票投资要义》,经济管理出版社,2015 年 6 月第 1 版" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/股票基本面与筹码选股.md b/wiki/practices/股票基本面与筹码选股.md index 8bc3e19..6a540b4 100644 --- a/wiki/practices/股票基本面与筹码选股.md +++ b/wiki/practices/股票基本面与筹码选股.md @@ -1,5 +1,6 @@ --- title: "股票基本面与筹码选股:作者框架和可观测指标" +last_updated: 2026-08-07 source: "胡斐,《股票投资要义》,经济管理出版社,2015 年 6 月第 1 版" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/股票投资要义:周期、筹码与交易纪律.md b/wiki/practices/股票投资要义:周期、筹码与交易纪律.md index 2efd373..1096994 100644 --- a/wiki/practices/股票投资要义:周期、筹码与交易纪律.md +++ b/wiki/practices/股票投资要义:周期、筹码与交易纪律.md @@ -1,5 +1,6 @@ --- title: "《股票投资要义》:周期、筹码与交易纪律" +last_updated: 2026-08-07 source: "胡斐,《股票投资要义》,经济管理出版社,2015 年 6 月第 1 版" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/practices/阿布量化策略开发与回测.md b/wiki/practices/阿布量化策略开发与回测.md index 663ff71..cb39251 100644 --- a/wiki/practices/阿布量化策略开发与回测.md +++ b/wiki/practices/阿布量化策略开发与回测.md @@ -1,5 +1,6 @@ --- title: "阿布量化策略开发与回测" +last_updated: 2026-08-07 source: "https://github.com/bbfamily/abu (commit d602d847677e4c2b77b0a122df30816ea68b5710)" created: 2026-08-07 updated: 2026-08-07 diff --git a/wiki/queries/What-is-Harness-Engineering-in-Simple-Terms.md b/wiki/queries/What-is-Harness-Engineering-in-Simple-Terms.md index 3d33bab..7f86ae9 100644 --- a/wiki/queries/What-is-Harness-Engineering-in-Simple-Terms.md +++ b/wiki/queries/What-is-Harness-Engineering-in-Simple-Terms.md @@ -1,5 +1,6 @@ --- title: "用通俗易懂的方式理解 Harness 工程" +last_updated: 2026-08-07 type: query confidence: medium source: "WikiLLM Q&A" diff --git a/wiki/期货研究资料目录.md b/wiki/期货研究资料目录.md index 8cd74b5..8ab1599 100644 --- a/wiki/期货研究资料目录.md +++ b/wiki/期货研究资料目录.md @@ -1,5 +1,6 @@ --- title: "期货研究资料目录" +last_updated: 2026-08-07 source: "raw/期货/README.md" created: 2026-08-02 updated: 2026-08-02 diff --git a/wiki/期货资料来源与证据边界.md b/wiki/期货资料来源与证据边界.md index 8796ec8..7ca64e6 100644 --- a/wiki/期货资料来源与证据边界.md +++ b/wiki/期货资料来源与证据边界.md @@ -1,5 +1,6 @@ --- title: "期货资料来源与证据边界" +last_updated: 2026-08-07 source: "期货研究资料目录迁移与来源登记" created: 2026-08-02 updated: 2026-08-02