Documentation
¶
Overview ¶
CANARY: REQ=ENG-4313; FEATURE="MigrateFrom"; ASPECT=CLI; STATUS=IMPL; OWNER=canary; UPDATED=2025-10-16
Index ¶
- Constants
- func CalculateConfidence(orphan *OrphanedRequirement) string
- func ExecuteMigration(rootDir string, plan *MigrationPlan, dryRun bool) error
- func GeneratePlan(orphan *OrphanedRequirement) (string, error)
- func GenerateSpec(orphan *OrphanedRequirement) (string, error)
- func GetMigrationSummary(plan *MigrationPlan) string
- type FileCopy
- type FileMerge
- type MigrationPlan
- type OrphanPlan
- type OrphanedRequirement
- type SystemType
Constants ¶
const ( ConfidenceLow = "LOW" ConfidenceMedium = "MEDIUM" ConfidenceHigh = "HIGH" )
Confidence levels for orphan detection
Variables ¶
This section is empty.
Functions ¶
func CalculateConfidence ¶
func CalculateConfidence(orphan *OrphanedRequirement) string
CalculateConfidence determines confidence level based on orphan characteristics
func ExecuteMigration ¶
func ExecuteMigration(rootDir string, plan *MigrationPlan, dryRun bool) error
ExecuteMigration performs the migration
func GeneratePlan ¶
func GeneratePlan(orphan *OrphanedRequirement) (string, error)
GeneratePlan creates an implementation plan from an orphaned requirement
func GenerateSpec ¶
func GenerateSpec(orphan *OrphanedRequirement) (string, error)
GenerateSpec creates a specification from an orphaned requirement
func GetMigrationSummary ¶
func GetMigrationSummary(plan *MigrationPlan) string
GetMigrationSummary returns a human-readable summary
Types ¶
type MigrationPlan ¶
type MigrationPlan struct {
SystemType SystemType
FilesToCopy []FileCopy
FilesToMerge []FileMerge
FilesToCreate []string
Warnings []string
}
MigrationPlan describes what will be migrated
func PlanMigration ¶
func PlanMigration(rootDir string, systemType SystemType, dryRun bool) (*MigrationPlan, error)
PlanMigration creates a migration plan
type OrphanPlan ¶
type OrphanPlan struct {
Orphans []*OrphanedRequirement
TotalOrphans int
Excluded []string
}
OrphanPlan represents the plan for migrating orphaned requirements
type OrphanedRequirement ¶
type OrphanedRequirement struct {
ReqID string
Features []*storage.Token
FeatureCount int
Confidence string
}
OrphanedRequirement represents a requirement with tokens but no specification
func DetectOrphans ¶
func DetectOrphans(db *storage.DB, projectID, rootDir string, excludePaths []string) ([]*OrphanedRequirement, error)
DetectOrphans finds all requirements with tokens but no specification projectID scopes the sweep; "" spans every project in the database.
type SystemType ¶
type SystemType string
SystemType represents the type of system being migrated from
const ( SystemTypeSpecKit SystemType = "spec-kit" SystemTypeLegacyCanary SystemType = "legacy-canary" SystemTypeMigrated SystemType = "migrated" SystemTypeUnknown SystemType = "unknown" )
func DetectSystemType ¶
func DetectSystemType(rootDir string) (SystemType, string)
DetectSystemType identifies what type of system exists in a directory