rules

package
v1.0.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDefaultOutput

func CheckDefaultOutput(m manifest.Manifest) ([]report.Diagnostic, []facts.OutputFact)

func CheckNaming

func CheckNaming(m manifest.Manifest, allow NamingAllowlist) []report.Diagnostic

func CheckReferences

func CheckReferences(m manifest.Manifest, examples []skillscan.Example) ([]report.Diagnostic, []facts.SkillFact)

func CheckReferencesWithPolicy

func CheckReferencesWithPolicy(m manifest.Manifest, examples []skillscan.Example, policy ReferencePolicy) ([]report.Diagnostic, []facts.SkillFact)

func CheckSkillQuality

func CheckSkillQuality(docs []SkillDoc) ([]report.Diagnostic, []facts.SkillQualityFact)

func CollectErrorFacts

func CollectErrorFacts(path, src string, boundaries BoundaryIndex) ([]facts.ErrorFact, []report.Diagnostic)

func CollectErrorFactsWithStructuredHelpers

func CollectErrorFactsWithStructuredHelpers(path, src string, boundaries BoundaryIndex, packageStructuredHelpers map[string]bool) ([]facts.ErrorFact, []report.Diagnostic)

func CollectRepoErrorFacts

func CollectRepoErrorFacts(repo string, changedFiles []string, changedOnly bool) ([]facts.ErrorFact, []report.Diagnostic, error)

func HintActionCount

func HintActionCount(hint string) int

func LegacyCommandCandidates

func LegacyCommandCandidates(m manifest.Manifest) []string

func LegacyFlagCandidates

func LegacyFlagCandidates(m manifest.Manifest) []string

func Run

func Run(ctx context.Context, opts Options) ([]report.Diagnostic, facts.Facts, error)

func RunDryRuns

func RunDryRuns(ctx context.Context, cliBin string, m manifest.Manifest, examples []skillscan.Example) ([]report.Diagnostic, []facts.CommandExample)

Types

type Allowlist

type Allowlist map[string]string

type BoundaryIndex

type BoundaryIndex struct {
	Lines map[string]map[int]string
}

func BuildErrorBoundaryIndex

func BuildErrorBoundaryIndex(path, src string) BoundaryIndex

func BuildErrorBoundaryIndexWithStructuredHelpers

func BuildErrorBoundaryIndexWithStructuredHelpers(path, src string, packageStructuredHelpers map[string]bool) BoundaryIndex

func (BoundaryIndex) Contains

func (b BoundaryIndex) Contains(path string, line int) bool

type NamingAllowlist

type NamingAllowlist struct {
	Commands Allowlist
	Flags    Allowlist
}

func LoadNamingAllowlist

func LoadNamingAllowlist(repo string) (NamingAllowlist, []report.Diagnostic, error)

type Options

type Options struct {
	Repo                      string
	CLIBin                    string
	ChangedFrom               string
	FactsOut                  string
	ManifestPath              string
	CommandIndexPath          string
	PublicContentMetadataPath string
}

type ParsedExample

type ParsedExample struct {
	CommandPath string
	Flags       []string
	Positional  []string
}

type ReferencePolicy

type ReferencePolicy struct {
	Incremental            bool
	ChangedFiles           map[string]bool
	CommandSurfaceAffected bool
	BaseManifest           *manifest.Manifest
	BaseManifestComplete   bool
}

type SkillDoc

type SkillDoc struct {
	File        string
	Name        string
	Description string
	Body        string
}

func LoadSkillDocs

func LoadSkillDocs(skillsDir string) ([]SkillDoc, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL