Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(repoRoot string, r Result, backupDir, timestamp string) (rulesPath, backupPath string, err error)
Apply writes the compressed content to <repoRoot>/COMMITBRIEF.md after backing the original up to <repoRoot>/.commitbrief/backups/<timestamp>.md. The backup directory is gitignored by the .commitbrief/ rule `commitbrief setup --local` adds.
func BackupTimestamp ¶
BackupTimestamp returns the ISO-8601-ish stamp used in backup filenames. Format: 2026-05-26T14-30-00Z. Colons are replaced with dashes so the path is portable to Windows (which forbids `:` in filenames).
Types ¶
type Result ¶
type Result struct {
OriginalContent string
CompressedContent string
OriginalChars int
CompressedChars int
OriginalTokens int
CompressedTokens int
Usage provider.Usage
Aborted bool // true if the compressed output is not smaller; original unchanged
AbortReason string // why we refused to apply
}
Click to show internal directories.
Click to hide internal directories.