worklog

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package worklog manages timestamped progress entries for tasks.

Worklog files live alongside task files in .worklogs/ directories and contain chronological entries recording decisions, blockers, and progress.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendEntry

func AppendEntry(filePath string, message string) error

AppendEntry appends a new timestamped entry to a worklog file, creating the file and .worklogs/ directory if needed.

func Exists

func Exists(filePath string) bool

Exists checks whether a worklog file exists for the given path.

func WorklogPath

func WorklogPath(taskFilePath string, taskID string) string

WorklogPath computes the worklog file path for a given task file path. e.g. "tasks/cli/015-auth.md" with taskID "015" -> "tasks/cli/.worklogs/015.md"

Types

type Entry

type Entry struct {
	Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
	Content   string    `json:"content" yaml:"content"`
}

Entry is a single timestamped worklog entry.

type Worklog

type Worklog struct {
	TaskID   string  `json:"task_id" yaml:"task_id"`
	FilePath string  `json:"file_path" yaml:"file_path"`
	Entries  []Entry `json:"entries" yaml:"entries"`
}

Worklog is the parsed worklog for a task.

func ParseWorklog

func ParseWorklog(filePath string) (*Worklog, error)

ParseWorklog reads a worklog file and splits it into entries on ## timestamp headings.

Jump to

Keyboard shortcuts

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