board

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Overview

Package board holds the logic for making a freshly created board private and telling the agents that work in this repository about it. It depends only on the stdlib so both internal/cli and internal/tui can call it without a cycle.

Index

Constants

View Source
const IgnoreLine = "/.jaira/"

IgnoreLine is the entry that keeps a board private.

View Source
const LanesIgnoreLine = "/.jaira/lanes/"

LanesIgnoreLine keeps a project's own lane directory out of git even once the rest of the board is shared. .jaira/lanes/ is scoped to this machine (see D-03) and was never meant to reach a teammate. This is an ordinary ignore rule on a path outside any ignored tree, not a negation pattern: by the time this line matters, RemoveIgnore has already stopped ignoring .jaira/ itself, so there is no ignored parent to negate out of.

Variables

This section is empty.

Functions

func AddIgnore

func AddIgnore(root string) (changed bool, err error)

AddIgnore keeps the board out of git.

func AddLanesIgnore

func AddLanesIgnore(root string) (changed bool, err error)

AddLanesIgnore keeps this project's lane directory private, independent of whether the rest of the board is shared. Idempotent: calling it again once the line is already present reports changed=false and writes nothing.

func AnnounceInAgentFiles

func AnnounceInAgentFiles(root string, lanes []LaneFact) (written []string, err error)

AnnounceInAgentFiles writes the note into each agent instruction file.

func FirstSentence added in v0.2.0

func FirstSentence(s string) string

FirstSentence keeps a description to its opening claim, so an entry with a paragraph of prose does not push the rest of the section off the screen.

The cut is at ". " and not at every ".", so a description naming a path or an abbreviation ("writes into .claude/skills") survives it whole.

func Ignored

func Ignored(root string) bool

Ignored reports whether the root .gitignore excludes the board.

func NoteIsCurrent added in v0.1.1

func NoteIsCurrent(root string, lanes []LaneFact) (current bool, stale []string)

NoteIsCurrent reports whether every agent file's managed block already says what lanes would generate today, and names the ones that do not.

The block is regenerated whenever a lane command changes the board, but a lane file edited by hand — which is how a board's own review lane came to be a human lane on one real project — changes nothing that would trigger that. This is what lets 'jaira validate' say the note has drifted rather than leaving an agent to read a pipeline that no longer exists.

func OrList added in v0.1.1

func OrList(ids []string) string

OrList writes lane ids as a reader would say them — "in-progress", "in-progress or human", "in-progress, human or blocked" — because a lane with two back edges has two of them for a reason (a flaw goes back to be fixed, a decision goes to a person) and "in-progress, human" reads like a sequence.

Exported for 'jaira lanes show', which prints the same back edges to a person and must not describe them differently from the note generated here: one rendering, or the two drift and a reader has to work out that "in-progress, human" and "in-progress or human" are the same fact.

func RemoveIgnore

func RemoveIgnore(root string) (changed bool, err error)

RemoveIgnore stops excluding the board.

func RemoveLanesIgnore

func RemoveLanesIgnore(root string) (changed bool, err error)

RemoveLanesIgnore removes the lanes-only ignore line. Used by 'share --undo': once the whole board is private again, /.jaira/ already covers .jaira/lanes/, and a leftover line would be a puzzle for the next reader.

Types

type LaneFact added in v0.1.1

type LaneFact struct {
	ID          string
	Name        string
	Description string
	ModelTier   string
	Agentic     bool
	Terminal    bool
	HumanExit   bool
	Question    bool
	Parking     bool
	RejectsTo   []string
	Produces    []string
}

LaneFact is what the generated note says about one lane of this board.

A struct of plain fields rather than *lane.Lane, so this package keeps the stdlib-only promise its own doc comment makes and stays callable from both internal/cli and internal/tui without a cycle. The caller reads the board and hands the facts over; nothing here knows how a lane is stored.

type Prepared

type Prepared struct {
	Ignored   bool // .gitignore gained the entry on this run
	IgnoreErr error
	Notes     []string // agent files touched, as "NAME (action)"
	NoteErr   error
}

Prepared reports what preparing a new board did.

func Prepare

func Prepare(root string, lanes []LaneFact) Prepared

Prepare makes a freshly created board private and tells the agents about it.

lanes is this board's own pipeline, which the note renders so an agent reads the route it is actually on rather than a generic description of lanes. A nil slice writes exactly the note that was written before boards could describe themselves, which is what a caller with no board loaded yet should pass.

Jump to

Keyboard shortcuts

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