Development record
a-new-capture-or-draft-is-matched-against-the-record-before
Summary
The design record for itd-2609212137116617: lexical matching at filing, a typed link, never a refusal.
Scope
- The matcher (
internal/core/record/match.go): tokenises the new text and each candidate's title, press release or body, scores overlap, returns candidates above and below the threshold (criteria 1, 2, 4). - The writers:
captureandintentcreate call it before the write and add the link field; the print (criteria 1, 2, 3). - Configuration:
match.threshold,match.fieldsthrough the layered resolver (criterion 4). - The discipline record itd-84 edited to mark the rung (criterion 5).
Out of scope
- Refusal; cross-repository; semantic matching.
Approach
The overlap function is the one the embark ranking uses, moved to the record package as the canonical primitive; both callers run it under their existing locks.
Footprint
- packages: internal/core/record, internal/core/capture, internal/core/intent
- tests: the scorer on fixtures; both writers with a planted double; the below-threshold json; the discipline edit
How the criteria are satisfied
| Criterion | Where |
|---|---|
| 1 capture links | scope 1, 2 |
| 2 intent links | scope 1, 2 |
| 3 never refused | scope 2 |
| 4 threshold and json | scope 1, 3 |
| 5 itd-84 rung | scope 4 |
Amendment (2026-09-26)
The Scope, Approach and Footprint above name a delivery that did not happen
(iss-2609261631134401). No embark ranking held an overlap function to move: the
embark ranking is scope 7 of the open reflect spec, spc-2609211751376504, and is
not yet built. The primitive shipped new, as the package
internal/core/record/match rather than a file in internal/core/record,
because internal/core/record imports the capture and intent packages that
call the matcher, and a matcher there would close an import cycle. The capture
and intent writers import it directly, and the reflect spec's Approach names
it as the primitive its embark ranking is to use.
Frontmatter
| id | spc-2609212141417782 |
|---|---|
| type | spec |
| lifecycle | closed |
.abcd/development/specs/closed/spc-2609212141417782-a-new-capture-or-draft-is-matched.md
open on GitHub ↗ · commit history ↗
References1
- itd-2609212137116617A new capture or draft is matched against the record before it is writtenimplements
mentions3
- iss-2609261631134401The closed spec spc-2609212141417782 says the filing-time overlap function is 'the one the embark ranking uses, moved to the record package' at internal/core/record/match.go. Neither happened: no embark overlap function existed, and the primitive shipped new, at internal/core/record/match (a sub-package, because record imports capture and intent). The closed record states a delivery that did not occur.
- itd-84An Intent Is Decomposed Before It Is Filed, And A Reversal Is Only Ever Flagged
- spc-2609211751376504reflect-command