Interface: Kernel
Defined in: packages/core/src/composition/kernel.ts:60
All use cases instantiated from a single SpecdConfig, grouped by domain area.
Delivery mechanisms (@specd/cli, @specd/mcp) receive a Kernel from
createKernel() and invoke individual use cases via kernel.changes.*,
kernel.specs.*, or kernel.project.*. Config-derived inputs (e.g.
schemaRef, schemaRepositories) are injected at construction time.
Properties
changes
changes:
object
Defined in: packages/core/src/composition/kernel.ts:66
Use cases that operate on changes.
archive
archive:
ArchiveChange
Finalises a change: merges deltas, moves to archive, fires hooks.
compile
compile:
CompileContext
Assembles the instruction block for the current lifecycle step.
create
create:
CreateChange
Creates a new change.
detectOverlap
detectOverlap:
DetectOverlap
Detects specs targeted by multiple active changes.
discard
discard:
DiscardChange
Permanently abandons a change.
draft
draft:
DraftChange
Shelves a change to drafts/.
edit
edit:
EditChange
Edits the spec scope of an existing change.
getArchived
getArchived:
GetArchivedChange
Retrieves a single archived change by name.
getArtifactInstruction
getArtifactInstruction:
GetArtifactInstruction
Returns artifact-specific instructions, rules, and delta guidance.
getHookInstructions
getHookInstructions:
GetHookInstructions
Returns instruction: hook text for a workflow step and phase.
list
list:
ListChanges
Lists all active (non-drafted, non-discarded) changes.
listArchived
listArchived:
ListArchived
Lists all archived changes.
listDiscarded
listDiscarded:
ListDiscarded
Lists all discarded changes.
listDrafts
listDrafts:
ListDrafts
Lists all drafted (shelved) changes.
preview
preview:
PreviewSpec
Previews a spec with deltas applied from a change.
repo
repo:
ChangeRepository
The change repository — exposes existence checks for artifacts and deltas.
restore
restore:
RestoreChange
Recovers a drafted change back to changes/.
runStepHooks
runStepHooks:
RunStepHooks
Executes run: hooks for a workflow step and phase.
skipArtifact
skipArtifact:
SkipArtifact
Explicitly skips an optional artifact on a change.
status
status:
GetStatus
Reports the current lifecycle state and artifact statuses.
transition
transition:
TransitionChange
Performs a lifecycle state transition with approval-gate routing.
updateSpecDeps
updateSpecDeps:
UpdateSpecDeps
Updates declared dependencies for a spec within a change.
validate
validate:
ValidateArtifacts
Validates artifact files against the active schema.
project
project:
object
Defined in: packages/core/src/composition/kernel.ts:142
Use cases that operate on the project configuration.
getProjectContext
getProjectContext:
GetProjectContext
Compiles the project-level context block without a specific change or step.
getSkillsManifest
getSkillsManifest:
GetSkillsManifest
Reads the installed skills manifest from specd.yaml.
init
init:
InitProject
Initialises a new specd project.
recordSkillInstall
recordSkillInstall:
RecordSkillInstall
Records that a skill set was installed for an agent.
registry
registry:
KernelRegistryView
Defined in: packages/core/src/composition/kernel.ts:62
Final merged registry view exposed to consumers and builders.
schemas
schemas:
SchemaRegistry
Defined in: packages/core/src/composition/kernel.ts:64
The schema registry for resolving arbitrary schema references.
specs
specs:
object
Defined in: packages/core/src/composition/kernel.ts:115
Use cases that operate on specs and approval gates.
approveSignoff
approveSignoff:
ApproveSignoff
Records a sign-off and transitions to signed-off.
approveSpec
approveSpec:
ApproveSpec
Records a spec approval and transitions to spec-approved.
generateMetadata
generateMetadata:
GenerateSpecMetadata
Generates deterministic metadata from schema-declared extraction rules.
get
get:
GetSpec
Loads a spec and all of its artifact files.
getActiveSchema
getActiveSchema:
GetActiveSchema
Resolves and returns the active schema for the project.
getContext
getContext:
GetSpecContext
Builds structured context entries for a spec with optional dependency traversal.
invalidateMetadata
invalidateMetadata:
InvalidateSpecMetadata
Invalidates a spec's metadata by removing its contentHashes.
list
list:
ListSpecs
Lists all specs across all configured workspaces.
repos
repos:
ReadonlyMap<string,SpecRepository>
Spec repositories keyed by workspace name — exposes path resolution.
saveMetadata
saveMetadata:
SaveSpecMetadata
Writes metadata for a spec.
validate
validate:
ValidateSpecs
Validates spec artifacts against the active schema's structural rules.
validateSchema
validateSchema:
ValidateSchema
Validates a schema (project resolved, project raw, or external file).