Documentation
¶
Index ¶
- func Init() (map[string]any, error)
- func ReadSurfaceNextMode(state any, next []any) string
- type CharterAddSpecRequest
- type CharterCreateRequest
- type CharterDiffEndpoint
- type CharterDiffProjection
- type CharterDiffSpecProjection
- type CharterMembershipProjection
- type CharterProjection
- type ConfigProjection
- type DeltaAddRequest
- type DeltaCountsProjection
- type DeltaItemProjection
- type DeltaProjection
- type DeltaRebindRequest
- type DeltaTransitionRequest
- type DeltaWithdrawRequest
- type DesignDocDiff
- type DesignDocSectionDiff
- type DiffDeltaSummary
- type DiffDocumentsModel
- type DiffEndpoint
- type DiffRequirementIssuesProjection
- type DiffRequirementMatchIssue
- type DiffRequirementSummary
- type DiffSetModel
- type DiffStatusModel
- type DocAddRequest
- type DocRemoveRequest
- type ErrCharterExists
- type Failure
- type FileContextProjection
- type FileGoverningSpec
- type FileMatchProjection
- type HookAffectedSpec
- type HookProjection
- type MissingCharterContext
- type MissingSpecContext
- type OpenDeltaProjection
- type OrderedCharterSpecEntry
- type RegistryCharterSummary
- type RegistryProjection
- type RegistrySpecSummary
- type RequirementAddRequest
- type RequirementDeltaRequest
- type RequirementMatchProjection
- type RequirementProjection
- type RequirementRefreshRequest
- type RequirementReplaceRequest
- type RequirementSpecContextProjection
- type RequirementSummaryProjection
- type RequirementVerifyRequest
- type RevisionBumpRequest
- type ScopeCodeDiff
- type ScopeDriftProjection
- type Service
- func (s *Service) AddConfigPrefix(prefix string) (ConfigProjection, map[string]any, []any, error)
- func (s *Service) AddConfigTag(tag string) (ConfigProjection, map[string]any, []any, error)
- func (s *Service) AddDelta(request DeltaAddRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) AddRequirement(request RequirementAddRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) AddSpecToCharter(request CharterAddSpecRequest) (CharterProjection, map[string]any, []any, error)
- func (s *Service) BumpRevision(request RevisionBumpRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) CloseDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) CreateCharter(request CharterCreateRequest) (CharterProjection, map[string]any, []any, error)
- func (s *Service) CreateSpec(request SpecCreateRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) DeferDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) DocAdd(request DocAddRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) DocRemove(request DocRemoveRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) ReadConfig() (ConfigProjection, error)
- func (s *Service) ReadContext(target, file string) (any, []any, error)
- func (s *Service) ReadDiff(target, charterName string) (any, []any, error)
- func (s *Service) ReadHook(stdin string) (HookProjection, error)
- func (s *Service) RebindDeltaRequirements(request DeltaRebindRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) RefreshRequirement(request RequirementRefreshRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) RemoveConfigPrefix(prefix string) (ConfigProjection, map[string]any, []any, error)
- func (s *Service) RemoveConfigTag(tag string) (ConfigProjection, map[string]any, []any, error)
- func (s *Service) RemoveSpecFromCharter(charterName, slug string) (CharterProjection, map[string]any, []any, error)
- func (s *Service) ReplaceRequirement(request RequirementReplaceRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) ResumeDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) SpecsDir() string
- func (s *Service) StaleRequirement(request RequirementDeltaRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) StartDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) Sync(request SyncRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) VerifyRequirement(request RequirementVerifyRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) WithdrawDelta(request DeltaWithdrawRequest) (SpecProjection, map[string]any, []any, error)
- func (s *Service) WithdrawRequirement(request RequirementDeltaRequest) (SpecProjection, map[string]any, []any, error)
- type SpecContextWarningProjection
- type SpecCreateRequest
- type SpecCreateTemplateSeed
- type SpecDiffDeltaModel
- type SpecDiffModel
- type SpecDiffProjection
- type SpecDiffRequirementModel
- type SpecProjection
- type SyncRequest
- type ValidationContainer
- type ValidationProjection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init bootstraps specctl governance in the current working directory. Delegates filesystem operations to infrastructure.InitWorkspace.
func ReadSurfaceNextMode ¶
Types ¶
type CharterAddSpecRequest ¶
type CharterCreateRequest ¶
type CharterCreateRequest struct {
Charter string
Title string
Description string
Groups []domain.CharterGroup
}
type CharterDiffEndpoint ¶
type CharterDiffProjection ¶
type CharterDiffProjection struct {
Charter string `json:"charter"`
OrderedSpecs []CharterDiffSpecProjection `json:"ordered_specs"`
Validation ValidationProjection `json:"validation"`
}
type CharterDiffSpecProjection ¶
type CharterDiffSpecProjection struct {
Slug string `json:"slug"`
DependsOn []string `json:"depends_on"`
From *CharterDiffEndpoint `json:"from"`
To CharterDiffEndpoint `json:"to"`
Changed bool `json:"changed"`
Validation ValidationProjection `json:"validation"`
}
type CharterProjection ¶
type CharterProjection struct {
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
TrackingFile string `json:"tracking_file"`
Groups []domain.CharterGroup `json:"groups"`
OrderedSpecs []OrderedCharterSpecEntry `json:"ordered_specs"`
Validation ValidationProjection `json:"validation"`
Focus any `json:"focus,omitempty"`
}
type ConfigProjection ¶
type ConfigProjection struct {
SemanticTags []string `json:"semantic_tags"`
GherkinTags []string `json:"gherkin_tags"`
SourcePrefixes []string `json:"source_prefixes"`
Formats map[string]infrastructure.FormatConfig `json:"formats"`
Validation ValidationProjection `json:"validation"`
Warnings []infrastructure.SourcePrefixWarning `json:"warnings,omitempty"`
Focus any `json:"focus,omitempty"`
}
type DeltaAddRequest ¶
type DeltaCountsProjection ¶
type DeltaItemProjection ¶
type DeltaItemProjection struct {
ID string `json:"id"`
Area string `json:"area"`
Intent domain.DeltaIntent `json:"intent"`
Status domain.DeltaStatus `json:"status"`
OriginCheckpoint string `json:"origin_checkpoint"`
Current string `json:"current"`
Target string `json:"target"`
Notes string `json:"notes"`
AffectsRequirements []string `json:"affects_requirements"`
Updates []string `json:"updates"`
WithdrawnReason string `json:"withdrawn_reason,omitempty"`
}
type DeltaProjection ¶
type DeltaRebindRequest ¶
type DeltaTransitionRequest ¶
type DeltaWithdrawRequest ¶
type DesignDocDiff ¶
type DesignDocDiff struct {
Path string `json:"path"`
Changed bool `json:"changed"`
SectionsChanged []DesignDocSectionDiff `json:"sections_changed"`
}
type DesignDocSectionDiff ¶
type DiffDeltaSummary ¶
type DiffDocumentsModel ¶
type DiffEndpoint ¶
type DiffEndpoint struct {
Rev int `json:"rev"`
Checkpoint string `json:"checkpoint"`
Status domain.SpecStatus `json:"status"`
}
type DiffRequirementIssuesProjection ¶
type DiffRequirementIssuesProjection struct {
MatchIssues []DiffRequirementMatchIssue `json:"match_issues"`
}
type DiffRequirementSummary ¶
type DiffSetModel ¶
type DiffStatusModel ¶
type DiffStatusModel struct {
From *domain.SpecStatus `json:"from"`
To domain.SpecStatus `json:"to"`
}
type DocAddRequest ¶
type DocRemoveRequest ¶
type ErrCharterExists ¶
type ErrCharterExists struct {
Charter string
}
func (ErrCharterExists) Error ¶
func (e ErrCharterExists) Error() string
type FileContextProjection ¶
type FileContextProjection struct {
File string `json:"file"`
Resolution string `json:"resolution"`
MatchSource *string `json:"match_source"`
GoverningSpec *FileGoverningSpec `json:"governing_spec"`
Matches []FileMatchProjection `json:"matches"`
Validation ValidationProjection `json:"validation"`
Focus any `json:"focus,omitempty"`
}
type FileGoverningSpec ¶
type FileMatchProjection ¶
type HookAffectedSpec ¶
type HookAffectedSpec struct {
Slug string `json:"slug"`
Charter string `json:"charter"`
Status domain.SpecStatus `json:"status"`
TrackingFile string `json:"tracking_file"`
TrackingFileStaged bool `json:"tracking_file_staged"`
DesignDoc string `json:"design_doc"`
DesignDocStaged bool `json:"design_doc_staged"`
MatchedFiles []string `json:"matched_files"`
}
type HookProjection ¶
type HookProjection struct {
InputFiles []string `json:"input_files"`
ConsideredFiles []string `json:"considered_files"`
IgnoredFiles []string `json:"ignored_files"`
UnmatchedFiles []string `json:"unmatched_files"`
AffectedSpecs []HookAffectedSpec `json:"affected_specs"`
Validation ValidationProjection `json:"validation"`
}
type MissingCharterContext ¶
type MissingSpecContext ¶
type OpenDeltaProjection ¶
type OpenDeltaProjection struct {
ID string `json:"id"`
Area string `json:"area"`
Status domain.DeltaStatus `json:"status"`
}
type OrderedCharterSpecEntry ¶
type OrderedCharterSpecEntry struct {
Slug string `json:"slug"`
Group domain.CharterGroup `json:"group"`
Order int `json:"order"`
DependsOn []string `json:"depends_on"`
Notes string `json:"notes"`
Status domain.SpecStatus `json:"status"`
TrackingFile string `json:"tracking_file"`
Validation ValidationProjection `json:"validation"`
}
type RegistryCharterSummary ¶
type RegistryCharterSummary struct {
Name string `json:"name"`
Title string `json:"title"`
SpecCount int `json:"spec_count"`
Validation ValidationProjection `json:"validation"`
}
type RegistryProjection ¶
type RegistryProjection struct {
Specs []RegistrySpecSummary `json:"specs"`
Charters []RegistryCharterSummary `json:"charters"`
Config ValidationContainer `json:"config"`
Audit ValidationProjection `json:"audit"`
Focus any `json:"focus,omitempty"`
}
type RegistrySpecSummary ¶
type RegistrySpecSummary struct {
Slug string `json:"slug"`
Charter string `json:"charter"`
Title string `json:"title"`
Status domain.SpecStatus `json:"status"`
TrackingFile string `json:"tracking_file"`
Documents domain.Documents `json:"documents"`
Scope []string `json:"scope"`
Deltas DeltaCountsProjection `json:"deltas"`
Validation ValidationProjection `json:"validation"`
}
type RequirementAddRequest ¶
type RequirementDeltaRequest ¶
type RequirementProjection ¶
type RequirementProjection struct {
ID string `json:"id"`
Title string `json:"title"`
Tags []string `json:"tags"`
Lifecycle domain.RequirementLifecycle `json:"lifecycle"`
Verification domain.RequirementVerification `json:"verification"`
IntroducedBy string `json:"introduced_by"`
Supersedes *string `json:"supersedes"`
SupersededBy *string `json:"superseded_by"`
TestFiles []string `json:"test_files"`
Gherkin string `json:"gherkin"`
Match RequirementMatchProjection `json:"match"`
SpecContext RequirementSpecContextProjection `json:"spec_context"`
}
type RequirementSpecContextProjection ¶
type RequirementSpecContextProjection struct {
Scenarios []string `json:"scenarios"`
}
type RequirementSummaryProjection ¶
type RequirementSummaryProjection struct {
ID string `json:"id"`
Title string `json:"title"`
Tags []string `json:"tags"`
Lifecycle domain.RequirementLifecycle `json:"lifecycle"`
Verification domain.RequirementVerification `json:"verification"`
IntroducedBy string `json:"introduced_by"`
TestFiles []string `json:"test_files"`
}
type RevisionBumpRequest ¶
type ScopeCodeDiff ¶
type ScopeCodeDiff struct {
ChangedFiles []string `json:"changed_files"`
}
type ScopeDriftProjection ¶
type ScopeDriftProjection struct {
Status string `json:"status"`
Checkpoint string `json:"checkpoint"`
DriftSource *string `json:"drift_source"`
LastVerifiedAt string `json:"last_verified_at"`
TrackedBy []string `json:"tracked_by"`
FilesChangedSinceCheckpoint []string `json:"files_changed_since_checkpoint"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func OpenFromWorkingDir ¶
func (*Service) AddConfigPrefix ¶
func (*Service) AddConfigTag ¶
func (*Service) AddDelta ¶
func (s *Service) AddDelta(request DeltaAddRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) AddRequirement ¶
func (s *Service) AddRequirement(request RequirementAddRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) AddSpecToCharter ¶
func (s *Service) AddSpecToCharter(request CharterAddSpecRequest) (CharterProjection, map[string]any, []any, error)
func (*Service) BumpRevision ¶
func (s *Service) BumpRevision(request RevisionBumpRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) CloseDelta ¶
func (s *Service) CloseDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) CreateCharter ¶
func (s *Service) CreateCharter(request CharterCreateRequest) (CharterProjection, map[string]any, []any, error)
func (*Service) CreateSpec ¶
func (s *Service) CreateSpec(request SpecCreateRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) DeferDelta ¶
func (s *Service) DeferDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) DocAdd ¶
func (s *Service) DocAdd(request DocAddRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) DocRemove ¶
func (s *Service) DocRemove(request DocRemoveRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) ReadConfig ¶
func (s *Service) ReadConfig() (ConfigProjection, error)
func (*Service) ReadContext ¶
func (*Service) RebindDeltaRequirements ¶
func (s *Service) RebindDeltaRequirements(request DeltaRebindRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) RefreshRequirement ¶
func (s *Service) RefreshRequirement(request RequirementRefreshRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) RemoveConfigPrefix ¶
func (*Service) RemoveConfigTag ¶
func (*Service) RemoveSpecFromCharter ¶
func (*Service) ReplaceRequirement ¶
func (s *Service) ReplaceRequirement(request RequirementReplaceRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) ResumeDelta ¶
func (s *Service) ResumeDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) StaleRequirement ¶
func (s *Service) StaleRequirement(request RequirementDeltaRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) StartDelta ¶
func (s *Service) StartDelta(request DeltaTransitionRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) Sync ¶
func (s *Service) Sync(request SyncRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) VerifyRequirement ¶
func (s *Service) VerifyRequirement(request RequirementVerifyRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) WithdrawDelta ¶
func (s *Service) WithdrawDelta(request DeltaWithdrawRequest) (SpecProjection, map[string]any, []any, error)
func (*Service) WithdrawRequirement ¶
func (s *Service) WithdrawRequirement(request RequirementDeltaRequest) (SpecProjection, map[string]any, []any, error)
type SpecCreateRequest ¶
type SpecCreateTemplateSeed ¶
type SpecCreateTemplateSeed struct {
Target string
Group string
IncludeGroupField bool
IncludeGroupMetadata bool
ChooseWhen string
Scope string
Priority int
Instructions string
}
func (SpecCreateTemplateSeed) InstructionsOrDefault ¶
func (s SpecCreateTemplateSeed) InstructionsOrDefault() string
func (SpecCreateTemplateSeed) PriorityOrDefault ¶
func (s SpecCreateTemplateSeed) PriorityOrDefault() int
func (SpecCreateTemplateSeed) ScopePlaceholderOrDefault ¶
func (s SpecCreateTemplateSeed) ScopePlaceholderOrDefault() string
type SpecDiffDeltaModel ¶
type SpecDiffDeltaModel struct {
Opened []DiffDeltaSummary `json:"opened"`
Closed []DiffDeltaSummary `json:"closed"`
Deferred []DiffDeltaSummary `json:"deferred"`
Resumed []DiffDeltaSummary `json:"resumed"`
Withdrawn []DiffDeltaSummary `json:"withdrawn"`
}
type SpecDiffModel ¶
type SpecDiffModel struct {
Status DiffStatusModel `json:"status"`
SpecTags DiffSetModel `json:"spec_tags"`
Documents DiffDocumentsModel `json:"documents"`
Scope DiffSetModel `json:"scope"`
Deltas SpecDiffDeltaModel `json:"deltas"`
Requirements SpecDiffRequirementModel `json:"requirements"`
}
type SpecDiffProjection ¶
type SpecDiffProjection struct {
Target string `json:"target"`
Baseline string `json:"baseline"`
Comparison string `json:"comparison"`
DriftSource *string `json:"drift_source"`
From *DiffEndpoint `json:"from"`
To DiffEndpoint `json:"to"`
Model SpecDiffModel `json:"model"`
DesignDoc DesignDocDiff `json:"design_doc"`
ScopeCode ScopeCodeDiff `json:"scope_code"`
Requirements DiffRequirementIssuesProjection `json:"requirements"`
Validation ValidationProjection `json:"validation"`
Focus any `json:"focus,omitempty"`
}
type SpecDiffRequirementModel ¶
type SpecDiffRequirementModel struct {
Added []DiffRequirementSummary `json:"added"`
Verified []DiffRequirementSummary `json:"verified"`
}
type SpecProjection ¶
type SpecProjection struct {
Slug string `json:"slug"`
Charter string `json:"charter"`
Title string `json:"title"`
Status domain.SpecStatus `json:"status"`
Rev int `json:"rev"`
Created string `json:"created"`
Updated string `json:"updated"`
LastVerifiedAt string `json:"last_verified_at"`
Checkpoint string `json:"checkpoint"`
TrackingFile string `json:"tracking_file"`
Tags []string `json:"tags"`
Format *string `json:"format"`
FormatTemplate *string `json:"format_template"`
Documents domain.Documents `json:"documents"`
CharterMembership *CharterMembershipProjection `json:"charter_membership"`
Scope []string `json:"scope"`
Deltas DeltaProjection `json:"deltas"`
OpenDeltas []OpenDeltaProjection `json:"open_deltas"`
Requirements []RequirementProjection `json:"requirements"`
ActionableUnverifiedRequirements []RequirementSummaryProjection `json:"actionable_unverified_requirements"`
InactiveUnverifiedRequirements []RequirementSummaryProjection `json:"inactive_unverified_requirements"`
Changelog []domain.ChangelogEntry `json:"changelog"`
ScopeDrift ScopeDriftProjection `json:"scope_drift"`
UncommittedChanges []string `json:"uncommitted_changes"`
Warnings []SpecContextWarningProjection `json:"warnings,omitempty"`
Validation ValidationProjection `json:"validation"`
Focus any `json:"focus,omitempty"`
// OrphanGherkinBlocks is the raw list of SPEC.md gherkin blocks
// parsed from the design doc that did not match any tracking
// requirement by gherkin or title. Carried on the projection so
// buildSpecContextWarnings can emit SPEC_ORPHAN_GHERKIN_BLOCK
// advisories; not serialized directly because the user-visible
// surface is the aggregated warning, not the raw blocks.
OrphanGherkinBlocks []infrastructure.RequirementContext `json:"-"`
}
type SyncRequest ¶
type ValidationContainer ¶
type ValidationContainer struct {
Validation ValidationProjection `json:"validation"`
Warnings []infrastructure.SourcePrefixWarning `json:"warnings,omitempty"`
}
type ValidationProjection ¶
Click to show internal directories.
Click to hide internal directories.