State Files

State Files

Bearing uses two JSONL files in the workspace root to track state.

workflow.jsonl (Committable)

Tracks branch metadata that’s portable across machines:

{"repo":"myapp","branch":"feature-auth","basedOn":"main","purpose":"Add authentication","status":"in_progress","created":"2024-12-20T12:00:00Z"}
{"repo":"myapp","branch":"fix-bug-123","basedOn":"main","purpose":"Fix login redirect","status":"in_progress","created":"2024-12-20T14:30:00Z"}
FieldDescription
repoRepository name
branchBranch name
basedOnParent branch
purposeHuman-readable description
statusin_progress, merged, abandoned
createdISO timestamp

Commit this file - It’s useful for sharing context across machines or with teammates.

local.jsonl (Not Committed)

Tracks local worktree folder paths:

{"folder":"myapp","repo":"myapp","branch":"main","base":true}
{"folder":"myapp-feature-auth","repo":"myapp","branch":"feature-auth","base":false}
FieldDescription
folderLocal folder name
repoRepository name
branchCurrent branch
baseIs this a base folder?

Don’t commit this file - It’s machine-specific.

Rebuilding State

If state files get corrupted or out of sync:

bearing worktree sync

This rebuilds local.jsonl from git state while preserving workflow.jsonl metadata.

Direct Editing

Don’t edit these files manually. Use the CLI instead—it handles consistency.