Files
marqdo-knowledge/spec
cflmy 3bd93363a1 feat: return candidate location and evidence status per hit
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.
2026-11-30 11:59:42 +08:00
..