How to use paths in SpecDD sections
This guide shows you how to use paths in SpecDD .sdd sections.
Explicit paths matter because path references can affect context, ownership, write authority, and review. SpecDD treats unprefixed filenames as text, not path references.
Short answer
Use ./, ../, or / when you mean a file or directory path. ./ and ../ resolve relative to the current .sdd
file directory. / resolves relative to the selected content root. Put paths in sections that match intent: Owns or
Can modify for authority, Can read or References for context, Forbids for blocked paths, and Structure for
layout.
Path prefixes
Use:
./local-file.js
../sibling-area/spec.sdd
/docs/adr/storage-boundary.md
Meaning:
./is relative to the directory containing the current.sddfile.../is relative to the directory containing the current.sddfile./is relative to the selected content root.~/is not a supported path prefix.
Unprefixed text is not an explicit path:
Depends on:
TripStorageTripStorage is dependency text, not a file path.
Steps
1. Choose the section by intent
Layout:
Structure:
./src: Source codeOwnership:
Owns:
./itinerary.jsWrite authority:
Can modify:
./itinerary.js
./itinerary.test.jsRead-only context:
Can read:
../storage/trip-storage.sddBlocked path:
Forbids:
../booking/*2. Use / paths for content-root references
Use / when the reference should be stable from the selected content root:
References:
/docs/adr/storage-boundary.mdThe content root is selected by tooling or project setup. In a single repository, it is usually the repository root. In a monorepo, it may be the monorepo root or an explicitly configured project root.
3. Avoid unprefixed filenames
Weak:
Can modify:
itinerary.jsGood:
Can modify:
./itinerary.jsUnprefixed filenames are plain text, not explicit path references.
4. Understand path-bearing sections
Tools may extract explicit paths from:
StructureOwnsCan modifyCan readReferencesDepends onForbidsExposes
Path-bearing does not mean path-only. These sections may still contain prose.
5. Review path authority
Paths in different sections mean different things.
Can modify:
Can modify:
./itinerary.jsmeans writable under this spec.
Can read:
Can read:
./itinerary.jsmeans read context only.
Do not treat every path as permission to edit.
Common mistakes
- Writing unprefixed filenames when explicit paths were intended.
- Using
/without knowing the selected content root. - Treating paths in
Can readorReferencesas writable. - Putting blocked paths in
Must notinstead ofForbids. - Assuming a directory path recursively includes every descendant spec.
How to verify the result
Path usage is clear when:
- explicit paths use
./,../, or/ - the section matches the intended meaning
- write authority paths are separated from read context
- content-root paths are intentional
- reviewers can explain why each path appears