Help us shape the future of Go! Take the 2026 Go Developer Survey

skillaudit

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package skillaudit names every skill that two load roots both offer and says whether the copies match. It only reads: a root a session may load from is somewhere to look, never to repair. See docs/projection.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audited

type Audited struct {
	Root
	Skills int
}

Audited is a root that was read, with the skills it holds.

type Copy

type Copy struct {
	Label      string
	Path       string
	Digest     string
	Bytes      int64
	Mtime      time.Time
	Older      bool
	Unverified string
}

Copy is one root's skill directory. Bytes and Mtime describe its SKILL.md.

type Finding

type Finding struct {
	Name   string
	Kind   Kind
	Copies []Copy
}

Finding is a name offered by two or more roots.

type Kind

type Kind string

Kind classifies one name held by more than one root.

const (
	Identical  Kind = "identical"
	Divergent  Kind = "divergent"
	Unverified Kind = "unverified"
)

type Report

type Report struct {
	Roots    []Audited
	Skipped  []string
	Findings []Finding
}

Report is the outcome of one audit.

func Audit

func Audit(roots []Root) (*Report, error)

Audit reads every root that exists, once per real directory, and reports the names two roots both offer.

func (*Report) Count

func (r *Report) Count(kind Kind) int

Count returns how many findings are of kind.

func (*Report) Write

func (r *Report) Write(w io.Writer)

Write prints the roots, then each divergent and unverified name in full and each identical name on one line.

type Root

type Root struct {
	Label string
	Path  string
}

Root is one directory of skills, as its caller spelled it.

func Discover

func Discover(realHome, sessionHome, cwd string) ([]Root, error)

Discover lists the home layout under both homes and the repo layout at cwd and each ancestor, with suffixes read from the project registries.

func Roots

func Roots(explicit []string, realHome, sessionHome, cwd string) ([]Root, error)

Roots is the explicit list when one is given, discovery otherwise.

Jump to

Keyboard shortcuts

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