Implement the P1 slice of marqdo-knowledge#14 with the #12 contract: every
query hit now carries the document-structure identity and source evidence it
came from, without re-parsing and without a second knowledge body.
- Index anchors from the public Analysis document facts next to each unit node,
including module_id, unit_kind, mode, level and path; plain-Markdown
documents keep null upstream identity instead of fabricating one.
- Query hits add an additive `location` object (module_id, unit_id, unit_kind,
anchors, path, level, mode, nature, exact span) and an `evidence` object
(status current|stale, source_digest, snapshot_digest). `nature` is
`unspecified` because the current public inputs do not declare authority;
Knowledge never guesses it.
- spec/knowledge.md documents §3.1.1 candidate location/evidence and §4.1
document-structure index semantics: entry vs navigation, units/anchors/spans,
and the link != import != call separation (links never become execution
edges). Schema stays version 1; fields are additive and optional.
- tests/query.rs asserts location/evidence on a real compiled project.
No new parser, no metadata syntax, no cross-repo dependency, no execution or
network behavior change.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
概述
实现
marqdo#55§14 /marqdo#56在 Knowledge 责任仓的 P1 子工单:#14 的索引语义契约 + 候选精确定位/证据状态(与 #12 合并为单一现行契约),不新增 parser/元数据语法/第二份正文,不新增跨仓依赖。交付
module_id、unit_id、unit_kind、anchors、nature,来源是公开 Analysis 3 units/anchors(纯 Markdown 使用本仓既有 heading 投影,上游身份为 null,不伪造)。query每个 hit 新增 additive 可选对象:location: module_id / unit_id / unit_kind / anchors[] / path[] / level / mode / nature / 精确 span;evidence: status(current|stale) / source_digest / snapshot_digest。nature恒为unspecified:当前公开输入未声明规范性/解释性等权威性,Knowledge 不推断、不新增元数据语法。related[].relation保持 contains/references/imports/calls;Markdown 链接仍是 references 边,绝不升级为 import/执行依赖。spec/knowledge.md新增 §3.1.1(候选定位/证据)与 §4.1(文档结构索引语义:入口 vs 导航、units/anchors/spans、link≠import≠call、index.mq.md、nature、候选→精确读取边界)。tests/query.rs新增hits_return_a_stable_location_and_evidence_status,真实 compile/query 项目上断言字段与 current 状态。验证(真实,Linux x86_64 / glibc 2.43)
证据:
docs/evidence/2026-11-30-candidate-location-and-index-contract.md。未验证(如实记录):macOS/Windows 原生、公开 rc.6 归档消费(#11)、检索质量/真实语义指标、正式 release tag。本 PR 不创建发布。
边界
refs #14 #12 #13 #7 #11