Documentation
¶
Overview ¶
Package defaults contains the default instruction texts shipped with brigada.
Index ¶
- Constants
- Variables
- func ArchiveRoleText(version, role string) (string, error)
- func ArchiveSkillText(version, skill string) (string, error)
- func ArchiveText(version, name string) (string, error)
- func Digest(text string) string
- func FindByDigest(name, digest string) (text, version string, ok bool)
- func LiveRoleText(role string) (string, error)
- func LiveSkillText(skill string) (string, error)
- func SetArchiveOverlay(f fs.FS) (restore func())
- func Versions() ([]string, error)
Constants ¶
const Version = "1.0.0"
Version names the newest directory of the archive, the version of the current defaults. It is not the brigada binary's version (internal/version), which generated headers carry: a header's version selects an archive directory when it names one, and its digest verifies the text found there; when no directory matches, FindByDigest finds the text by digest alone.
Variables ¶
var Archive embed.FS
Archive holds every shipped version's default texts under versions/<ver>/..., at the same package-relative paths as Texts, so a three-way diff can rebuild the exact text a file was generated from: live text, the version it was generated from, the new version's text. A release that changes a live text adds the new version's directory and bumps Version; older directories never change.
var Roles = []string{"foreman", "plan_review", "reviewer", "worker"}
Roles are the roles the package carries a text for, in setting order; each role's text lives at <role>.md.
var Skills = []string{"bugfix", "cli-flag", "config-setting", "dependency", "docs-change", "refactor", "schema-migration", "surface-parity"}
Skills are the task-shape skills the package carries, each at skills/<name>/SKILL.md.
var Texts embed.FS
Texts holds the role texts and skill files at their package-relative paths.
Functions ¶
func ArchiveRoleText ¶
ArchiveRoleText returns a shipped version's archived text of a role.
func ArchiveSkillText ¶
ArchiveSkillText returns a shipped version's archived SKILL.md of a skill, so an older generated skill can be reconstructed for diffs.
func ArchiveText ¶
ArchiveText returns a shipped version's archived text by name: the package-relative path of the file, like "worker.md" or "skills/cli-flag/SKILL.md". An unknown version or a name outside the archive is refused; nothing is guessed or substituted.
func FindByDigest ¶
FindByDigest returns the archived text of a role or skill file (name as for ArchiveText) whose digest is digest, from any shipped version, newest first, and the version it was found in.
func LiveRoleText ¶
LiveRoleText returns the live embedded text of a role, like "worker".
func LiveSkillText ¶
LiveSkillText returns the live embedded SKILL.md text of a skill.
func SetArchiveOverlay ¶
SetArchiveOverlay makes the files of f, laid out like Archive (versions/<ver>/...), readable beside the embedded archive until the returned function runs. It exists so a test can ship a fixture older version; nothing in the product calls it.
Types ¶
This section is empty.