rules

package
v1.0.74 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 29 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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