Discovery reads Spec and Pack carriers by the suffixes .sdp.md, .sdp.gherkin and .sdp.ts. Other .ts and .tsx files are anchor candidates, except .d.ts files. Discovery never descends into node_modules, dist, generated, coverage or a dot-directory, and configured exclusions apply to both lists.
no example exercises it
ruleline 17 · specs/extraction/excludes.sdp.md:17
An exclusion is an exact root-relative POSIX path prefix applied to Spec-carrier and anchor-candidate discovery; a repeated exclusion counts once.
Empty, absolute, Windows-drive, backslash and trailing-slash paths, and paths with an empty, . or .. segment, are refused rather than normalized into a different meaning.
Given the extraction root carries the tree {excludedTree: "foo"} and the similar sibling {similarTree: "foobar"}
Given the consumer supplies the exclusion {exclusion: "C:/work/specs"}
When the root is discovered
Then the discovery attempt {outcome: "is refused"}
Then the refusal states {diagnostic: "normalizeExcludes: invalid exclusion path"} and names the offending path
Given
the extraction root carries the tree {excludedTree: "foo"} and the similar sibling {similarTree: "foobar"}
the consumer supplies the exclusion {exclusion: "C:/work/specs"}
When
the root is discovered
Then
the discovery attempt {outcome: "is refused"}
the refusal states {diagnostic: "normalizeExcludes: invalid exclusion path"} and names the offending path
Given the extraction root carries the tree {excludedTree: "foo"} and the similar sibling {similarTree: "foobar"}
Given the consumer supplies the exclusion {exclusion: "foo"}
When the root is discovered
Then the discovery attempt {outcome: "completes"}
Then the surviving spec carrier is {specCarrier: "foobar/included.sdp.ts"} and the surviving anchor candidate is {anchorCandidate: "foobar/helper.ts"}
Given
the extraction root carries the tree {excludedTree: "foo"} and the similar sibling {similarTree: "foobar"}
the consumer supplies the exclusion {exclusion: "foo"}
When
the root is discovered
Then
the discovery attempt {outcome: "completes"}
the surviving spec carrier is {specCarrier: "foobar/included.sdp.ts"} and the surviving anchor candidate is {anchorCandidate: "foobar/helper.ts"}
Given the extraction root carries the tree {excludedTree:string} and the similar sibling {similarTree:string}
Given the consumer supplies the exclusion {exclusion:string}
When the root is discovered
Then the discovery attempt {outcome:"completes"|"is refused"}
Then the surviving spec carrier is {specCarrier:string} and the surviving anchor candidate is {anchorCandidate:string}
Then the refusal states {diagnostic:string} and names the offending path
Verification
Verifier bindings
spec:extraction.excludes.refused-path · A Windows-drive absolute path is refused rather than normalized · declared · example enabled · specs/extraction/excludes.refused-path.sdp.md
External run evidence from test/self-hosting-extraction.test.ts
One query invocation shares its extracted graph and validation result (spec:extraction.build-pipeline.same-invocation)
passed
13.53 ms
executes the bound example against a fresh world
A prefix excludes its own tree and leaves a similar sibling standing (spec:extraction.excludes.segment-boundary)
passed
1.19 ms
executes the bound example against a fresh world
A Windows-drive absolute path is refused rather than normalized (spec:extraction.excludes.refused-path)
passed
0.66 ms
executes the bound example against a fresh world
A derived payload carries a schema version its consumer can read (spec:extraction.schema-versioning.declared-version)
passed
0.42 ms
executes the bound example against a fresh world
An unbound slot in a used step earns no step contract (spec:extraction.executable-contracts.concreteness-refusal)
passed
1.07 ms
executes the bound example against a fresh world
A second structured entry is named, never left silently inert (spec:extraction.executable-contracts.multi-entry-example)
passed
1.8 ms
executes the bound example against a fresh world
A case-only path collision withholds the whole contracts tree (spec:extraction.executable-contracts.case-colliding-path)
passed
0.7 ms
executes the bound example against a fresh world
A repeated step runs its one handler at each occurrence, in contract order (spec:extraction.example-runner.step-order)
passed
0.32 ms
executes the bound example against a fresh world
A red step names itself before the assertion detail (spec:extraction.example-runner.red-step-naming)
passed
0.33 ms
spec:extraction.excludes.segment-boundary · A prefix excludes its own tree and leaves a similar sibling standing · declared · example enabled · specs/extraction/excludes.segment-boundary.sdp.md
Example space
excludedTree · string · declared by the extraction root carries the tree {excludedTree} and the similar sibling {similarTree}
similarTree · string · declared by the extraction root carries the tree {excludedTree} and the similar sibling {similarTree}
exclusion · string · declared by the consumer supplies the exclusion {exclusion}
the extraction root carries the tree {excludedTree:string} and the similar sibling {similarTree:string}
the consumer supplies the exclusion {exclusion:string}
When
the root is discovered
Then
the discovery attempt {outcome:"completes"|"is refused"}
the surviving spec carrier is {specCarrier:string} and the surviving anchor candidate is {anchorCandidate:string}
the refusal states {diagnostic:string} and names the offending path
Composing needs the script.
Design view
Requirement drawing
Requirement drawing for spec:extraction.excludes
E6: refines, verifies · declared
The diagram as text
spec:extraction.excludes: Extraction exclusions are strict consumer input · declared Spec
impl:protocol.exclusion-surface: strict root-relative exclusion input for both extraction surfaces · anchored code · src/extract/index.ts:43
test:protocol.excludes.refused-path: the refused-path point verifies the malformed-exclusion refusal · anchored test binding · binding present · test/self-hosting-extraction.test.ts:300
test:protocol.excludes.segment-boundary: the segment-boundary point verifies the exact-prefix exclusion rule · anchored test binding · binding present · test/self-hosting-extraction.test.ts:285
spec:consumers.shipped-protocol-corpus dependsOn spec:extraction.excludes · declared — the shipped corpus stays out of an adopter's graph under its canonical discovery rules
impl:protocol.exclusion-surface · strict root-relative exclusion input for both extraction surfaces · src/extract/index.ts:43 · role contract · component component:protocol.extract · layer application · context protocol
Design reference: none
Verifier binding: present
spec:extraction.excludes.refused-path · A Windows-drive absolute path is refused rather than normalized · declared · specs/extraction/excludes.refused-path.sdp.md · example enabled
spec:extraction.excludes.segment-boundary · A prefix excludes its own tree and leaves a similar sibling standing · declared · specs/extraction/excludes.segment-boundary.sdp.md · example enabled