Skip to content

Package internal/gap

Import path: go.devnw.com/canary/internal/gap

package gap // import "go.devnw.com/canary/internal/gap"

API (raw go doc)


package gap // import "go.devnw.com/canary/internal/gap"

CANARY: REQ=CBIN-140; FEATURE="GapService"; ASPECT=Engine; STATUS=IMPL;
UPDATED=2025-10-17

TYPES

type Service struct {
    // Has unexported fields.
}
    Service provides gap analysis business logic

func NewService(repo *storage.GapRepository) *Service
    NewService creates a new gap analysis service

func (s *Service) FormatGapsForInjection(reqID string) (string, error)
    FormatGapsForInjection formats gaps for injection into plan command prompt

func (s *Service) GenerateReport(reqID string) (string, error)
    GenerateReport generates a gap analysis report for a requirement

func (s *Service) GetCategories() ([]*storage.GapCategory, error)
    GetCategories retrieves all available gap categories

func (s *Service) GetConfig() (*storage.GapConfig, error)
    GetConfig retrieves current gap analysis configuration

func (s *Service) GetTopGapsForPlan(reqID string) ([]*storage.GapEntry, error)
    GetTopGapsForPlan retrieves top gaps for a requirement to inject into
    planning

func (s *Service) MarkGap(reqID, feature, aspect, category, description, correctiveAction, createdBy string) (string, error)
    MarkGap records a new gap analysis entry

func (s *Service) MarkHelpful(gapID string) error
    MarkHelpful marks a gap entry as helpful

func (s *Service) MarkUnhelpful(gapID string) error
    MarkUnhelpful marks a gap entry as unhelpful

func (s *Service) QueryGaps(reqID, feature, aspect, category string, limit int) ([]*storage.GapEntry, error)
    QueryGaps queries gap entries with filters

func (s *Service) UpdateConfig(maxGapInjection, minHelpfulThreshold int, rankingStrategy string) error
    UpdateConfig updates gap analysis configuration