move: source_type: Default streichen, unclassified als sichtbares Fach, layout: fuer source (schliesst #66)
Files changed: - CHANGES.md - VERSION - instructions/dev/corpus-policy.md - instructions/wiki-ingest/SKILL.md - kb/index.md - kb/log.md - kb/sources/COLLECTION.md - kb/sources/INDEX.md - kb/sources/Source - AMD Powermanagement CPU.md - kb/sources/Source - Arch Linux Cheat Sheet.md - kb/sources/Source - Conversation - AGENTS.md Skill Restructuring Session 2026-08-04.md - kb/sources/Source - Conversation - Auto Mode and Tool Choice Session 2026-08-31.md - kb/sources/Source - Conversation - Comma Bug Budget Refund and Lint Report Path Session 2026-08-31.md - kb/sources/Source - Conversation - ENVIRONMENT.md as an Optional Third Session-Level File Session 2026-08-31.md - kb/sources/Source - Conversation - Gate Counting and Measured Calibration Session 2026-08-31.md - kb/sources/Source - Conversation - Hardening the Test Suite Against Silent Environment Dependencies Session 2026-08-31.md - kb/sources/Source - Conversation - Issue Triage Labels and TODO Retirement Session 2026-08-31.md - kb/sources/Source - Conversation - Nightly Drift-Check Workflow and doctor's Bootstrap Gap Session 2026-08-31.md - kb/sources/Source - Conversation - Two Round-Trip Defects Found by an Ingest Session 2026-08-31.md - kb/sources/Source - Conversation - Versioning CI-CD and Content Migration Session 2026-08-30.md - kb/sources/Source - Conversation - Write-Once Frontmatter Fields and touch --set Session 2026-08-31.md - kb/sources/Source - Copilot Skill Restructure Instructions.md - kb/sources/Source - Docker Cheatsheet.md - kb/sources/Source - Gitea Issue 41 - Issue Management and Label Scheme 2026-09-02.md - kb/sources/Source - Gitea Issues 62-63 - status-incoming Label Introduction 2026-09-04.md - kb/sources/Source - LLM Improvements Codex Analysis.md - kb/sources/Source - LLM Improvements Production Agent Gaps 2026.md - kb/sources/Source - LLM Improvements Sonnet Analysis.md - kb/sources/Source - LLM Wiki Pattern.md - kb/sources/Source - LLM Wiki v2.md - kb/sources/Source - MCP Read Server Implementation Session 2026-09-02.md - kb/sources/Source - Private-Instance Merge Correction and Issue 30 Session 2026-09-01.md - kb/sources/Source - Public Release, Corpus Purge and History Squash Session 2026-09-01.md - kb/sources/Source - Publish-Remote Gate and Issue Triage Session 2026-09-01.md - kb/sources/Source - Version Part Nomenclature and Breaking Change Gate Session 2026-09-02.md - kb/sources/Source - Wine.md - kb/sources/Source - qmd - GitHub Repository.md - kb/sources/analyses/Source - Copilot Skill Restructure Instructions.md - kb/sources/analyses/Source - LLM Improvements Codex Analysis.md - kb/sources/analyses/Source - LLM Improvements Production Agent Gaps 2026.md - kb/sources/analyses/Source - LLM Improvements Sonnet Analysis.md - kb/sources/articles/Source - AMD Powermanagement CPU.md - kb/sources/articles/Source - LLM Wiki Pattern.md - kb/sources/articles/Source - LLM Wiki v2.md - kb/sources/documents/Source - qmd - GitHub Repository.md - kb/sources/notes/Source - Arch Linux Cheat Sheet.md - kb/sources/notes/Source - Docker Cheatsheet.md - kb/sources/notes/Source - Wine.md - kb/sources/trackers/Source - Gitea Issue 41 - Issue Management and Label Scheme 2026-09-02.md - kb/sources/trackers/Source - Gitea Issues 62-63 - status-incoming Label Introduction 2026-09-04.md - kb/sources/transcripts/Source - Conversation - AGENTS.md Skill Restructuring Session 2026-08-04.md - kb/sources/transcripts/Source - Conversation - Auto Mode and Tool Choice Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Comma Bug Budget Refund and Lint Report Path Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - ENVIRONMENT.md as an Optional Third Session-Level File Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Gate Counting and Measured Calibration Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Hardening the Test Suite Against Silent Environment Dependencies Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Issue Triage Labels and TODO Retirement Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Nightly Drift-Check Workflow and doctor's Bootstrap Gap Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Two Round-Trip Defects Found by an Ingest Session 2026-08-31.md - kb/sources/transcripts/Source - Conversation - Versioning CI-CD and Content Migration Session 2026-08-30.md - kb/sources/transcripts/Source - Conversation - Write-Once Frontmatter Fields and touch --set Session 2026-08-31.md - kb/sources/transcripts/Source - MCP Read Server Implementation Session 2026-09-02.md - kb/sources/transcripts/Source - Private-Instance Merge Correction and Issue 30 Session 2026-09-01.md - kb/sources/transcripts/Source - Public Release, Corpus Purge and History Squash Session 2026-09-01.md - kb/sources/transcripts/Source - Publish-Remote Gate and Issue Triage Session 2026-09-01.md - kb/sources/transcripts/Source - Version Part Nomenclature and Breaking Change Gate Session 2026-09-02.md - tools/CONTRACT.md - tools/chemenu/lint_core.py - tools/chemenu/tests/conftest.py - tools/chemenu/tests/test_lint.py - tools/chemenu/tests/test_new_page.py - tools/chemenu/tests/test_provenance.py - tools/chemenu/tests/test_touch.py - tools/chemenu/tests/test_type_resolver.py - tools/chemenu/tests/test_xref.py - types/source.md - types/source.schema.yaml - types/type-spec.md - work/reclassify-source-types/README.md - work/reclassify-source-types/plan.md
This commit is contained in:
@@ -127,6 +127,22 @@ def misplaced_pages(pages: dict[str, Page]) -> list[dict]:
|
||||
]
|
||||
|
||||
|
||||
def unclassified_source_pages(pages: dict[str, Page]) -> list[dict]:
|
||||
"""Source pages sitting in the `unclassified` catalog slot.
|
||||
|
||||
Advisory, like `misplaced_pages` above: `unclassified` is the visible
|
||||
fallback for a genuinely unclear source (Gitea #66, replacing the old
|
||||
silent `default: notes`), not a broken state - a page there is exactly as
|
||||
valid as one anywhere else, only waiting for someone to look at it and
|
||||
pick a real category with `wikitool touch --set source_type=<value>`."""
|
||||
return [
|
||||
{"page": title}
|
||||
for title, page in sorted(pages.items())
|
||||
if page.frontmatter.get("type") == "types/source.md"
|
||||
and page.frontmatter.get("source_type") == "unclassified"
|
||||
]
|
||||
|
||||
|
||||
def nested_pages(kb_dir: Path, pages: dict[str, Page]) -> list[dict]:
|
||||
"""Report form of `find_nested_pages`: `{"page", "at", "depth"}` per
|
||||
finding.
|
||||
@@ -474,6 +490,7 @@ def run_lint(kb_dir: Path) -> dict:
|
||||
"misplaced_pages": misplaced,
|
||||
"nested_pages": nested,
|
||||
"unsharded_collections": unsharded_collections(kb_dir, pages),
|
||||
"unclassified_source_pages": unclassified_source_pages(pages),
|
||||
"uncovered_raw_files": find_uncovered_raw_files(config.RAW_DIR, pages),
|
||||
"broken_raw_refs": find_broken_raw_refs(pages),
|
||||
"duplicate_raw_file_owners": find_duplicate_raw_file_owners(pages),
|
||||
@@ -567,6 +584,12 @@ def render_markdown(report: dict) -> str:
|
||||
"`wikitool move --reconcile` and `wikitool index rebuild`"
|
||||
),
|
||||
)
|
||||
_section(
|
||||
lines, "Unclassified Source Pages (source_type: unclassified) - recommendation, not an error",
|
||||
report.get("unclassified_source_pages", []),
|
||||
lambda i: f"[[{i['page']}]] - `wikitool touch --set source_type=<value>` once its "
|
||||
"category is known",
|
||||
)
|
||||
_section(
|
||||
lines, "Uncovered Raw Files (no source page)", report["uncovered_raw_files"],
|
||||
lambda i: f"`{i}`",
|
||||
@@ -728,6 +751,12 @@ def default_report_path(report: dict) -> Path:
|
||||
# Failing on it would also make `lint` red on a corpus that is entirely
|
||||
# self-consistent, which is the state the recommendation is asking to improve.
|
||||
#
|
||||
# `unclassified_source_pages` is advisory for the same reason `misplaced_pages`
|
||||
# is: `unclassified` (Gitea #66) is a deliberately visible catalog slot for a
|
||||
# source whose category is genuinely unclear, not a defect - failing on it
|
||||
# would penalise the honest "I don't know yet" that the slot exists to allow,
|
||||
# where the old silent `default: notes` hid the same uncertainty for free.
|
||||
#
|
||||
# `malformed_edges` and `unbalanced_markers` are hard from the start: neither
|
||||
# describes an unconverted page, only a broken one.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user