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

redlines

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package redlines enforces book2skill's mechanical Quality Red Lines over an already-loaded skill: the six RIA-TV++ body segments, a per-quotation word ceiling, and a description that states when to invoke the skill.

These are distinct from speclint, which encodes the agentskills.io specification. The spec changes when agentskills.io changes; the red lines change when the book2skill methodology changes, so they are separate packages rather than one.

Every check is pure — a loaded skill in, diagnostics out — so the caller owns the file I/O and decides the exit code. It lives in skillet so exegesis (which gates a tree on the way in) and skillsaw (which must not let an optimization regress structure) enforce one definition rather than two.

Index

Constants

View Source
const MaxQuoteWords = 150

MaxQuoteWords is the per-quotation word ceiling. It is exported so a second consumer enforces this ceiling by reference instead of repeating the literal — the drift that splitting these checks out of exegesis is meant to prevent.

Variables

This section is empty.

Functions

func Check

func Check(s *skill.Skill) []finding.Diagnostic

Check returns every Quality Red Line diagnostic for s. An empty result means s passes them.

Requires: s is a loaded skill (Body and Description populated from its SKILL.md). Ensures: the result covers the missing RIA-TV++ segments, every over-long

quotation, and a description with no trigger condition; fenced code is
ignored; it is pure.

The fourth red line — that test-prompts.json exists — needs the filesystem, so it stays with the caller.

func Quotes added in v0.11.0

func Quotes(body string) []string

Quotes returns each contiguous blockquote in body, in document order: one string per run, with the "> " markers stripped and the run's lines joined by a single space.

Fenced code blocks are removed first, so a "> " line inside a shell transcript or a diff is not mistaken for a quotation. A run of bare ">" lines carries no text and is not returned.

This is exported because it is the same extraction the MaxQuoteWords red line counts. A caller checking quotations against their sources needs to agree with the rule being enforced; a second implementation elsewhere would disagree at the margins — over fences, over lazy continuation — and the two tools would then dispute what a quote is.

Ensures: every returned string contains at least one non-space character; it is pure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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