Orient before writing
Type: types/instruction.md
Find existing KB notes that affect what the commissioned document should claim.
The writer or its calling session loads this procedure after resolving the commission and before drafting. A delegated reporter follows it as a read-only task and returns findings to the caller, which owns the writing decision. Use only repository-local reads and searches. Return the report in context. Never edit library files, change briefs, or write connect reports.
Input
The caller supplies the invoking workspace and target collection, plus the incumbent path for an edit. It assembles the following four parts from the settled commission and any declared brief.
- Governing question or target claim.
- Scope and explicit exclusions.
- Key premises and proposed attributions.
- Kind of move, such as a new theory claim, operational rule, source extraction, or narrowing.
The handoff omits raw source prose and preselected search terms. If an input needed to delimit the search is missing, report the gap to the caller.
Search
- Start in the invoking workspace with the target collection. Include other local collections whose authored routing places a premise, attribution, or competing claim there. Use caller-supplied paths and the project's routing or collection heads to choose scope.
- Scan all claim titles in each selected collection. Substitute its name for
<collection>in the command below.
bash
rg -N --no-filename -m1 '^# (.*)' -r '$1' kb/<collection>/ --glob '*.md' --glob '!*.brief.md'
If output is truncated, recover the rest in batches. Resolve promising titles to paths with rg -l -F -x -- '# <title>' kb/<collection>/.
3. Decompose the handoff into concepts. Run focused rg queries over titles, frontmatter descriptions, relevant tag heads under kb/tags/ when present, and note bodies. Query alternate terminology, adjacent mechanisms, and competing attributions. Use tag-head links to locate candidates and include any newly implicated collection in the title scan.
4. Treat a match in x.brief.md as a match on x.md. Read the authored note to verify its bearing and quote its decisive passage. Read promising candidates to establish their status and authority (for example, accepted ADR, live or archived design proposal, theory note, or collection contract). The incumbent on an edit supplies context and does not count as independent coverage of the proposed change.
Return
Identify the question or claim, scope, and key premises and attributions searched. List the collections scanned. Keep the report concise (prioritizing direct contradictions, existing coverage, and binding constraints; omit tangential background). For each consequential match, give its workspace-relative path, observed status or authority cue, a short decisive quote copied verbatim, and one of the following bearings with a short explanation.
constrains— supplies a condition or dependency the claim must address.contradicts— makes an incompatible claim within the same scope.narrows— limits the claim's scope or attribution.covers— already makes the commissioned contribution.
If no match survives a completed search, return none found with the collections scanned and actual queries run. If a required search could not be completed, return any verified findings and identify the gap.