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 ¶
- func CheckCommand(body string) string
- func CheckFence(body string) string
- func CheckTask(body string) []string
- func Checked(kind string) bool
- func Doc(kind, name, body string, resolveSkill func(skill string) bool) []string
- func IsCodedCheck(body string) bool
- func ReviewerSkillContract(body string) []string
- func Story(title, body, acceptance, category string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCommand ¶ added in v0.0.340
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
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
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 ¶
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 ¶
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
IsCodedCheck reports whether a skill body is a functional-check skill.
func ReviewerSkillContract ¶ added in v0.0.190
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.
Types ¶
This section is empty.