Documentation
¶
Overview ¶
Package board handles board discovery, scaffolding, and config.
The board is a "north/" directory inside the user's project repo, anchored by "north/config.yml". It is found by walking up from the current directory, the same way git finds ".git". Tasks live in one of three state folders: drafts/, tasks/, archive/.
Index ¶
- Constants
- func InitBoard(root string) (string, error)
- func LocateBoard(start string) (string, error)
- func NextID(board string) (string, error)
- func Root(board string) string
- func Slug(title string) string
- func StateDir(board string, state models.TaskState) string
- func TaskFilename(taskID, title string) string
- func TaskFiles(board string, states ...models.TaskState) ([]string, error)
- func WriteConfig(board string, cfg Config) (string, error)
- type Config
Constants ¶
const ( BoardDirname = "north" ConfigName = "config.yml" )
Variables ¶
This section is empty.
Functions ¶
func InitBoard ¶
InitBoard scaffolds a board under root (default cwd): config + state folders. Idempotent — existing files/folders are left untouched. Returns the board dir.
func LocateBoard ¶
LocateBoard walks up from start (default cwd) to find the "north/" board dir (the one containing config.yml). Returns NotFound with a hint if none exists.
func NextID ¶
NextID returns the next free task id — a bare number, max across all folders + 1 (as a string; ids are never reused).
func TaskFilename ¶
TaskFilename is the on-disk filename for a task: "12-add-login.md".
Types ¶
type Config ¶
type Config struct {
AutoCommit bool `yaml:"auto_commit"`
}
Config holds per-board settings from "north/config.yml".
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the MVP defaults (auto_commit false).
func LoadConfig ¶
LoadConfig reads "north/config.yml" into a Config. A missing file and extra keys are tolerated; malformed YAML is a hard error (a silently ignored typo would silently change behaviour, e.g. turning auto_commit off).