refactor: research - move domain to repository root

This commit is contained in:
tradecatlabs
2026-07-09 04:01:30 +08:00
parent 16f5e03c78
commit 0858b7a3cf
260 changed files with 968 additions and 306 deletions
+1 -1
View File
@@ -12,6 +12,6 @@
- `check-ai-citation.py``llms.txt``assets/ai-citation/llms-full.txt` 与 AI 引用语料路径和锚点检查脚本。
- `check-external-resources.py`:本地外部资源注册表字段、分类统计、ID 与链接形态检查脚本。
- `check-research-raw.py`:研究域 raw 原始事实层、Git 工作树、来源清单和核心材料文件检查脚本。
- `fetch-research-raw.py`:按 `docs/research/*/domain.yml` 拉取 GitHub 研究对象的 raw 原始事实层和 `repository/` 工作树。
- `fetch-research-raw.py`:按 `research/*/domain.yml` 拉取 GitHub 研究对象的 raw 原始事实层和 `repository/` 工作树。
- `check-wiki.py`GitHub Wiki 独立仓库本地 checkout 的页面覆盖、内链和旧口径检查脚本。
- `sync-doc-toc.py`:兼容旧线性 README 的细粒度目录生成脚本;当前拆分结构下通常无变更。
+1 -1
View File
@@ -19,7 +19,7 @@ AI_MARKDOWN_DIR = Path("assets/ai-citation")
PATH_PATTERN = re.compile(
r"(?<![\w./-])("
r"(?:README|AGENTS)\.md"
r"|(?:docs|assets|skills|prompts|metadata|scripts|tools)/[^\s`,。;:、)]+"
r"|(?:docs|research|assets|skills|prompts|metadata|scripts|tools)/[^\s`,。;:、)]+"
r"|[A-Za-z0-9_.-]+\.(?:md|txt|yml)"
r"|llms\.txt"
r")"
+5 -6
View File
@@ -22,7 +22,7 @@ REQUIRED_DIRS = [
Path("docs/getting-started"),
Path("docs/philosophy"),
Path("docs/references"),
Path("docs/research"),
Path("research"),
Path("docs/workflow"),
Path("metadata"),
Path("prompts"),
@@ -77,11 +77,10 @@ def should_skip(directory: Path) -> bool:
def is_research_repository_snapshot(rel: Path) -> bool:
parts = rel.parts
return (
len(parts) >= 5
and parts[0] == "docs"
and parts[1] == "research"
and parts[3] == "raw"
and parts[4] == "repository"
len(parts) >= 4
and parts[0] == "research"
and parts[2] == "raw"
and parts[3] == "repository"
)
+5 -6
View File
@@ -62,11 +62,10 @@ def should_skip(path: Path) -> bool:
def is_research_repository_snapshot(rel: Path) -> bool:
parts = rel.parts
return (
len(parts) >= 5
and parts[0] == "docs"
and parts[1] == "research"
and parts[3] == "raw"
and parts[4] == "repository"
len(parts) >= 4
and parts[0] == "research"
and parts[2] == "raw"
and parts[3] == "repository"
)
@@ -243,7 +242,7 @@ def main() -> int:
readme_paths = {Path("docs/README.md")}
for fields in taxonomy_sections().values():
entry = fields.get("entry", "")
if entry.startswith("docs/") and entry.endswith("/README.md"):
if entry.endswith("/README.md"):
readme_paths.add(Path(entry))
for rel_path in sorted(readme_paths):
+4 -5
View File
@@ -109,11 +109,10 @@ def should_skip(path: Path) -> bool:
def is_research_repository_snapshot(rel: Path) -> bool:
parts = rel.parts
return (
len(parts) >= 5
and parts[0] == "docs"
and parts[1] == "research"
and parts[3] == "raw"
and parts[4] == "repository"
len(parts) >= 4
and parts[0] == "research"
and parts[2] == "raw"
and parts[3] == "repository"
)
+4 -5
View File
@@ -55,11 +55,10 @@ def should_skip(path: Path) -> bool:
def is_research_repository_snapshot(rel: Path) -> bool:
parts = rel.parts
return (
len(parts) >= 5
and parts[0] == "docs"
and parts[1] == "research"
and parts[3] == "raw"
and parts[4] == "repository"
len(parts) >= 4
and parts[0] == "research"
and parts[2] == "raw"
and parts[3] == "repository"
)
+1 -1
View File
@@ -10,7 +10,7 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
RESEARCH_DIR = ROOT / "docs" / "research"
RESEARCH_DIR = ROOT / "research"
REQUIRED_RAW_FILES = [
"README.md",
"AGENTS.md",
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Fetch raw GitHub facts for docs/research repository domains."""
"""Fetch raw GitHub facts for research repository domains."""
from __future__ import annotations
@@ -13,7 +13,7 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
RESEARCH_DIR = ROOT / "docs" / "research"
RESEARCH_DIR = ROOT / "research"
REPO_VIEW_FIELDS = [
"nameWithOwner",