WorkBuddy is still JSONL-backed, but its source layout has two valid shapes: project-level session files and nested subagent files. Moving it behind a concrete provider keeps that provider-specific shape explicit while continuing to reuse the shared JSONL filesystem mechanics.
The provider preserves legacy discovery and lookup behavior, including symlinked project directories and files, compound subagent raw IDs, deleted-path classification, source fingerprinting, and existing parser normalization for parent/subagent relationships.
Validation: go fmt ./...; go test -tags "fts5" ./internal/parser -run TestWorkBuddyProvider -count=1; go test -tags "fts5" ./internal/parser -count=1; go vet ./...; make test-short; git diff --check
test(parser): document workbuddy subagent discovery
WorkBuddy legacy discovery accepts any JSONL filename under a valid parent session's subagents directory, while raw subagent lookup still validates the requested ID. The provider migration intentionally preserves that asymmetry rather than tightening discovery and dropping sources that older code would import.
Validation: go fmt ./...; go test -tags "fts5" ./internal/parser -run TestWorkBuddyProviderSourceMethods -count=1; go test -tags "fts5" ./internal/parser -count=1; go vet ./...; git diff --check; make nilaway
test(parser): opt workbuddy into provider shadow
WorkBuddy now has a concrete facade provider on this branch, so its migration mode should enter the shared shadow-compare harness rather than remaining legacy-only and additive.
Lower provider opt-ins stay inherited and later provider branches remain responsible for their own concrete providers.
Validation: go test -tags "fts5" ./internal/parser -run TestProviderMigrationModes -count=1; go test -tags "fts5" ./internal/parser -count=1; go vet ./...; git diff --check
test(sync): compare workbuddy shadow parity
WorkBuddy is shadow-compared on this branch, so add source-level migration coverage that compares provider observation with ParseWorkBuddySession.
The test covers both the main session file and nested subagent file shape so parent relationship parity stays visible while the stack migrates provider by provider.
Validation: go test -tags "fts5" ./internal/parser ./internal/sync -run 'TestObserveProviderSourceMatchesWorkBuddyLegacyParser|TestWorkBuddyProvider|TestParseWorkBuddy' -count=1; go test -tags "fts5" ./internal/parser ./internal/sync -count=1; go fmt ./...; go vet ./...; ./custom-gcl run --config .golangci.nilaway.yml ./internal/parser/... ./internal/sync/...; git diff --check; go test -tags "fts5" ./internal/sync -run TestObserveProviderSourceMatchesWorkBuddyLegacyParser -count=1
refactor(parser): fold workbuddy into provider
WorkBuddy already had a concrete provider, but it still depended on exported legacy parser/source functions and legacy sync dispatch. That kept the branch additive and let the old shape remain authoritative.\n\nMove parsing and composite subagent source lookup behind the provider, remove registry callbacks and sync dispatch, and convert the WorkBuddy tests to provider-backed helpers plus a guard that the old entrypoints stay gone.\n\nValidation: go test -tags "fts5" ./internal/parser ./internal/sync -run 'TestWorkBuddy|TestDiscoverWorkBuddy|TestParseWorkBuddy|TestFindWorkBuddy|TestEngineClassifyWorkBuddy|TestWorkBuddyRegistry' -count=1 -v; go test -tags "fts5" ./internal/parser ./internal/sync ./cmd/agentsview -count=1; go vet ./...; git diff --check
fix(parser): preserve workbuddy file hashes
WorkBuddy legacy sync stored the transcript content hash for both main sessions and subagent transcripts. The provider migration kept copying Fingerprint.Hash into Session.File.Hash, but the recursive source set did not request hashed fingerprints, so provider-authoritative writes would clear file_hash.\n\nEnable source hashing and make the provider parse test exercise Fingerprint -> Parse for both main and subagent sources.\n\nValidation: go test -tags "fts5" ./internal/parser -run TestWorkBuddyProvider -count=1; go test -tags "fts5" ./internal/parser -count=1; go test -tags "fts5" ./internal/sync -run 'Test.*WorkBuddy' -count=1; go vet ./...; git diff --check
fix(parser): thread ctx through workbuddy source lookups
WorkBuddy is still JSONL-backed, but its source layout has two valid shapes: project-level session files and nested subagent files. Moving it behind a concrete provider keeps that provider-specific shape explicit while continuing to reuse the shared JSONL filesystem mechanics.
The provider preserves legacy discovery and lookup behavior, including symlinked project directories and files, compound subagent raw IDs, deleted-path classification, source fingerprinting, and existing parser normalization for parent/subagent relationships. The tests also document the legacy asymmetry where discovery accepts non-ID subagent JSONL filenames while raw subagent lookup remains constrained.