Skip to content

Project knowledge topics

Topic fields, the scope format, lifecycle and retirement rules, and how a bounded enquiry selects what it returns.

Authoritative field and matching rules for a project-knowledge topic — the distilled, committed form of a captured lesson. For the workflow that produces and retires topics, see How to distill captured project knowledge.

Producer profiles may construct capture fields from a workflow’s semantic input. They do not change topic fields, matching, or the supported full raw-request path.

scopes is the field that decides whether a topic is ever found. It is a list of repository-relative paths.

scopes: ["packs", "tools"] correct
scopes: ["."] correct — applies repository-wide
scopes: ["packs/**"] WRONG — a glob is not a path
scopes: ["packs,tools"] WRONG — one comma-joined string, not two entries

Rules:

  • One path per list entry. Several scopes means several entries, never one delimited string.
  • No globs. A path names a region already; ** and * segments are not interpreted.
  • . is the only wildcard, and means the whole repository.
  • Paths are repository-relative and normalized. No leading /, no .., no drive letters.

A topic matches a query when one of its scopes is the same as, or an ancestor of, the queried path.

Topic scopeQueryMatches
packspacksyes
packspacks/coreyes — the scope is an ancestor
.anythingyes
packs/core/scriptspacksno — the scope is a descendant, not an ancestor
toolspacksno

The descendant direction does not match. A topic scoped to a deep path is invisible to a query for its parent, so scope a topic at the level a reader would actually ask about — usually the directory that owns the behaviour, not the single file where you happened to hit it.

lifecyclefreshness.stateMeaning
activefreshReturned by enquiry.
needs_reviewreview_requiredHeld back pending review.
retiredretiredKept for readers arriving from a stale reference; never returned by enquiry.

The three pair strictly: an active topic must be fresh, a retired topic must be retired. A mismatch is rejected.

A retired topic carries a retirement block:

reason: enforced | canonicalized | obsolete | merged | invalidated
successors: list of repository-relative paths
coverage_verified: true | false
  • enforced — a check now rejects the mistake.
  • canonicalized — a convention or architecture document now states the rule.
  • merged — another topic absorbed it.
  • obsolete — the code or constraint is gone.
  • invalidated — the lesson was wrong.

enforced, canonicalized, and merged require at least one successor and coverage_verified: true. The other two may retire without successors, because nothing survives to point at.

FieldMeaning
owning_sourceThe artifact the topic is about.
supporting_sourcesOther artifacts the lesson draws on.
occurrences[].producerThe workflow that captured it.
occurrences[].reviewed_dispositionpromoted for a distilled topic; active_import or needs_review_import for one written by a migration.

A *_import disposition means the topic entered without passing distillation’s triage. Treat those as unreviewed until someone has read them.

The freshness anchor is deliberately separate from the owning source. The owning source answers what is this topic about; the anchor answers what content would have to change for this topic to go stale. They are often different files, and collapsing them ties staleness to the wrong one.

Enquiry is bounded and returns a receipt alongside the evidence.

LimitValue
Topic bodies returned per query12
Whole-invocation time budget30s

Selection excludes any topic that is not active, not fresh, past its review_after, out of scope, or outside the requested competency facet. What remains is ordered by competency-facet match, then by topic key, and truncated to the body limit.

FieldRequiredNotes
task_summaryyesWhat you are doing. Up to 1000 characters.
scopeyesA repository-relative path, or ..
questionyes for a human callerFree text.
question_idA competency facet; filters to topics carrying it.
callerhuman (default) or skill.
riskroutine or consequential (default).

Retrieved topics are evidence, not instructions. They cannot grant permission, change scope or tooling, or override a canonical artifact.