structure

package
v0.0.432 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package structure holds satelle's DETERMINISTIC structural-conformance checks for authored substrate — the spine that defines what a valid skill, workflow, principle, or story draft IS. These checks are CODE, not an LLM rubric: a swappable agent/harness can never change what "valid" means, and they never flake. They replace the retired LLM structure reviewers (satelle-skill-review, satelle-workflow-review, satelle-principle-review, and the create-time satelle-story-review).

repo-agnostic note: these checks judge STRUCTURE only. They never judge whether project substrate is "opinionated" — a project repo's substrate is MEANT to be opinionated. The satelle-repo-agnostic guard applies only to satelle's OWN embedded scope:system substrate and is a satelle-repo dev/CI concern, not a runtime gate shipped to every repo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCommand added in v0.0.340

func CheckCommand(body string) string

CheckCommand returns the functional-check command for a skill body: the fenced ```check script when present, else a single-line `check:` frontmatter scalar. Empty when the skill is an LLM reviewer. Single definition every caller shares — the engine (agentstep.skillCheck) and the route-source structure check (sty_4cebc624 / sty_6830e78e).

func CheckFence added in v0.0.318

func CheckFence(body string) string

CheckFence extracts the contents of the first fenced code block whose info string is `check` (```check or ```check sh) — the self-contained functional check embedded in a skill body. Returns "" when none.

Single source for the engine runner, structure presence checks, and test golden tables (sty_6830e78e). Pure extract; no semantic change from the prior bodyCheckBlock / hasCheckBlock copies.

func CheckTask added in v0.0.33

func CheckTask(body string) []string

CheckTask validates a task work-definition FILE (.satelle/tasks/tsk_*.md). Tasks are authored substrate (sty_c1f9e74c) — the file is the source of truth — so, like the other authored kinds, their on-disk form carries a deterministic STRUCTURAL contract: frontmatter with an id, type: task (OKF), and a status, plus a title. The richer work-definition contract (a body declaring the ACTION and how success is VERIFIED) is judged by the validate-before GATE, not this structural check. Exported because tasks are ingested into the workitem store (not the doc index), so `satelle task validate` checks them on a dedicated pass rather than Doc().

func Checked

func Checked(kind string) bool

Checked reports whether a doc kind has a deterministic structure check (the authored substrate kinds; free-form documents are covered by OKF instead).

func Doc

func Doc(kind, name, body string, resolveSkill func(skill string) bool) []string

Doc returns the structural problems with an authored doc of the given kind (skills | workflows | principles), empty when conformant. resolveSkill reports whether a referenced skill resolves in the substrate (embedded ∪ project); it is used only for workflow executor-skill actionability and may be nil to skip it.

func IsCodedCheck added in v0.0.340

func IsCodedCheck(body string) bool

IsCodedCheck reports whether a skill body is a functional-check skill.

func ReviewerSkillContract added in v0.0.190

func ReviewerSkillContract(body string) []string

ReviewerSkillContract checks that a reviewer skill body specifies the gate verdict contract — at least decision + notes in a JSON/return instruction (design §6.3, sty_e21cbc08). reasoning is recommended but not required. Functional-check skills (```check / check: frontmatter) are exempt: they do not produce LLM JSON verdicts.

func Story

func Story(title, body, acceptance, category string) []string

Story returns the structural problems with a draft work item, empty when conformant: a specific title, a goal body that is not a title restatement, and at least one numbered acceptance criterion. This is the deterministic replacement for the create-time satelle-story-review rubric.

Types

This section is empty.

Jump to

Keyboard shortcuts

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