Class: Spec
Defined in: packages/core/src/domain/entities/spec.ts:11
Metadata for a spec directory.
A spec is a directory identified by a workspace and a name (SpecPath).
It contains one or more artifact files (e.g. spec.md, proposal.md).
This entity holds only metadata — artifact content is loaded on demand
via SpecRepository.artifact().
Constructors
Constructor
new Spec(
workspace,name,filenames):Spec
Defined in: packages/core/src/domain/entities/spec.ts:23
Creates a new Spec with the given workspace, name, and artifact filenames.
Parameters
workspace
string
The workspace name from specd.yaml (e.g. "billing", "default")
name
The spec path within the workspace's specs directory (e.g. auth/oauth)
filenames
readonly string[]
The artifact filenames present in this spec directory
Returns
Spec
Accessors
filenames
Get Signature
get filenames(): readonly
string[]
Defined in: packages/core/src/domain/entities/spec.ts:43
The artifact filenames present in this spec directory (e.g. ["spec.md", "proposal.md"]).
Returns
readonly string[]
name
Get Signature
get name():
SpecPath
Defined in: packages/core/src/domain/entities/spec.ts:38
The spec identity path within the workspace's specs directory.
For example, auth/oauth or billing/payments.
Returns
workspace
Get Signature
get workspace():
string
Defined in: packages/core/src/domain/entities/spec.ts:30
The workspace name this spec belongs to (from specd.yaml).
Returns
string
Methods
hasArtifact()
hasArtifact(
filename):boolean
Defined in: packages/core/src/domain/entities/spec.ts:53
Returns whether this spec has an artifact with the given filename.
Parameters
filename
string
The filename to check (e.g. "spec.md")
Returns
boolean
true if the artifact exists in this spec directory