Documentation
¶
Overview ¶
Package speckit exports visionspec workflow families as GitHub Spec Kit extension packages (github.com/github/spec-kit, plugin schema 1.0).
A family is split into two extensions by spec category: a product extension (source and gtm specs — the requirements chain, ending at the decision gate and UXD) and an engineering add-on extension (technical specs). Each spec type in the family's execution sequence becomes a spec-kit command that authors the document from the family's template and self-evaluates against the family's rubric.
The output is a deterministic in-memory file set; WriteFiles persists it and Check detects drift against a previously written copy (the prism-sync pattern for committed generated artifacts).
Index ¶
- func Check(dir string, files []File) ([]string, error)
- func WriteFiles(dir string, files []File) error
- type File
- type Manifest
- type ManifestCommand
- type ManifestMeta
- type ManifestProvides
- type ManifestRequires
- type ManifestTemplate
- type Options
- type WFCommandStep
- type WFGateStep
- type WFIfStep
- type WFStepInput
- type WorkflowInput
- type WorkflowManifest
- type WorkflowMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check compares a generated file set against the copy under dir and returns the relative paths that are missing or differ. An empty result means the committed artifacts are in sync with the generator.
func WriteFiles ¶
WriteFiles persists a generated file set under dir, creating directories as needed.
Types ¶
type File ¶
File is one generated file, with a path relative to the export root.
func BuildExtensions ¶
func BuildExtensions(lw *workflows.LoadedWorkflow, opts Options) ([]File, error)
BuildExtensions exports a loaded workflow family as spec-kit extension packages: a product extension (source and gtm specs) and, when the family has technical specs, an engineering add-on extension. File paths are relative to the export root (extensions/<id>/...). Output is deterministic for a given workflow and options.
func BuildWorkflow ¶
func BuildWorkflow(lw *workflows.LoadedWorkflow, opts Options) (File, error)
BuildWorkflow exports a loaded workflow family's full execution sequence (product specs, then technical specs) as a single spec-kit workflow: one command step per spec type, invoking whichever extension (BuildExtensions) owns that spec, with review gates placed exactly where the family's Execution.ReviewGates declare them. Optional spec types (SpecConfig[spec].Required == false) are wrapped in an `if` step gated by a generated include_<spec> input, so the chain can be run either minimally or with every deepening enabled.
This is the data-driven counterpart to a hand-authored triage workflow (e.g. risk-adjusted): it does not branch on work type or reversibility — it simply runs one family's sequence end to end, in the node order and gates the family already declares.
type Manifest ¶
type Manifest struct {
SchemaVersion string `yaml:"schema_version"`
Extension ManifestMeta `yaml:"extension"`
Requires ManifestRequires `yaml:"requires"`
Provides ManifestProvides `yaml:"provides"`
Tags []string `yaml:"tags,omitempty"`
}
Manifest mirrors spec-kit's extension.yml (plugin schema 1.0).
type ManifestCommand ¶
type ManifestCommand struct {
Name string `yaml:"name"`
File string `yaml:"file"`
Description string `yaml:"description"`
}
ManifestCommand is one provided slash command.
type ManifestMeta ¶
type ManifestMeta struct {
ID string `yaml:"id"`
Name string `yaml:"name"`
Version string `yaml:"version"`
Description string `yaml:"description"`
Author string `yaml:"author"`
Repository string `yaml:"repository"`
License string `yaml:"license"`
Category string `yaml:"category,omitempty"`
Effect string `yaml:"effect,omitempty"`
}
ManifestMeta is the extension identity block.
type ManifestProvides ¶
type ManifestProvides struct {
Commands []ManifestCommand `yaml:"commands,omitempty"`
Templates []ManifestTemplate `yaml:"templates,omitempty"`
}
ManifestProvides lists the components the extension ships.
type ManifestRequires ¶
type ManifestRequires struct {
SpecKitVersion string `yaml:"speckit_version"`
}
ManifestRequires declares compatibility constraints.
type ManifestTemplate ¶
ManifestTemplate is one provided document template asset.
type Options ¶
type Options struct {
// Family is the visionspec workflow name, used for provenance headers
// and id defaults. Defaults to the loaded workflow's name.
Family string
// ProductID is the spec-kit extension id for the product chain.
// Defaults to the family name with any "aws-" prefix stripped.
ProductID string
// EngineeringID is the spec-kit extension id for the technical add-on.
// Defaults to ProductID + "-engineering".
EngineeringID string
// WorkflowID is the spec-kit workflow id for the generated end-to-end
// chain (BuildWorkflow). Defaults to ProductID + "-chain".
WorkflowID string
// Version is the extension version (X.Y.Z). Defaults to "0.1.0".
Version string
// Author, Repository, and License populate the extension manifests.
Author string
Repository string
License string
// SpecKitVersion is the requires.speckit_version constraint.
// Defaults to ">=1.0.0".
SpecKitVersion string
}
Options configures an export. Zero-value fields are filled by defaults derived from the workflow family.
type WFCommandStep ¶
type WFCommandStep struct {
ID string `yaml:"id"`
Command string `yaml:"command"`
Integration string `yaml:"integration"`
Input WFStepInput `yaml:"input"`
}
WFCommandStep runs one spec-kit command.
type WFGateStep ¶
type WFGateStep struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
Message string `yaml:"message"`
}
WFGateStep pauses for human review.
type WFIfStep ¶
type WFIfStep struct {
ID string `yaml:"id"`
Type string `yaml:"type"`
Condition string `yaml:"condition"`
Then []any `yaml:"then"`
}
WFIfStep conditionally runs nested steps.
type WFStepInput ¶
type WFStepInput struct {
Args string `yaml:"args"`
}
WFStepInput is a command step's argument string.
type WorkflowInput ¶
type WorkflowInput struct {
Type string `yaml:"type"`
Required bool `yaml:"required,omitempty"`
Default string `yaml:"default,omitempty"`
Prompt string `yaml:"prompt,omitempty"`
Enum []string `yaml:"enum,omitempty"`
}
WorkflowInput is one entry in a workflow's inputs map.
type WorkflowManifest ¶
type WorkflowManifest struct {
SchemaVersion string `yaml:"schema_version"`
Workflow WorkflowMeta `yaml:"workflow"`
Requires ManifestRequires `yaml:"requires"`
Inputs map[string]WorkflowInput `yaml:"inputs,omitempty"`
Steps []any `yaml:"steps"`
}
WorkflowManifest mirrors spec-kit's workflow.yml (plugin schema 1.0).