Command Code and iFlow both fit the directory JSONL source shape, so moving them together proves the helper against real providers without mixing in nested layouts like Qwen or composite providers like WorkBuddy.
The providers keep source discovery, changed-path classification, persisted lookup, fingerprinting, and parse normalization behind concrete facade implementations while preserving the legacy parser functions for current runtime callers.
fix(parser): preserve JSONL provider symlink discovery
Command Code and iFlow legacy discovery followed symlinked project directories. The migrated providers should keep that behavior so users with linked project roots do not silently lose discovery or raw-session lookup after moving onto the provider facade.
test(parser): opt commandcode iflow into provider shadow
CommandCode and iFlow now have concrete facade providers on this branch, so keeping them legacy-only would let the migration branch remain additive instead of exercised by the shared provider harness.
This makes the migration manifest fail closed for the providers introduced here while leaving unrelated providers for their own stack branches.
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 commandcode iflow shadow parity
Command Code and iFlow now opt into shadow comparison, so their provider branch should prove more than provider-local parsing. Add source-level migration tests that run ObserveProviderSource and compare the normalized provider output against the legacy parser functions for both agents.
Validation: go fmt ./...; go test -tags "fts5" ./internal/parser ./internal/sync -count=1; go vet ./...; git diff --check; ./custom-gcl run --config .golangci.nilaway.yml ./internal/parser/... ./internal/sync/...
refactor(parser): fold commandcode and iflow into provider
Move Command Code and iFlow parse ownership onto their concrete
providers and delete the package-level discover/find/parse entrypoints
plus the legacy sync dispatch for both agents. Both agents become
provider-authoritative so runtime sync routes through provider
changed-path classification and processProviderFile instead of the
removed processCommandCode/processIflow methods.
Command Code:
- parseSession moves onto the provider; DiscoverCommandCodeSessions,
FindCommandCodeSourceFile, and ParseCommandCodeSession are removed.
- The provider reproduces the legacy .meta.json companion behavior:
WatchPlan includes *.meta.json, SourcesForChangedPath remaps a
changed .meta.json back to its .jsonl transcript, the composite
Fingerprint folds the companion size, mtime, and content into the
freshness identity, and Parse overrides File.Size/File.Mtime with the
combined transcript+meta effective info. commandCodeEffectiveInfo
stays in the engine for the SourceMtime watcher fallback.
iFlow:
- parseSession moves onto the provider; DiscoverIflowProjects,
FindIflowSourceFile, and ParseIflowSession are removed.
- Parse mirrors the legacy sync path: it resolves the project from the
recorded cwd and git branch (falling back to GetProjectName of the
project directory), applies InferRelationshipTypes to derive
continuation/subagent links, and enables source content hashing so
File.Hash matches the legacy ComputeFileHash value.
Tests move from the deleted free functions to provider API coverage,
add guard tests asserting the legacy entrypoints stay gone, drop the
shadow comparison test, and remove both provider files from the
pending-shim scan list.
fix(parser): preserve commandcode file hash parity
Command Code needs a composite provider fingerprint so metadata-only edits invalidate freshness, but that value should not replace the persisted transcript content hash. The legacy sync path stored the SHA-256 of the transcript file in file_hash, and changing that semantic would make metadata-only edits look like transcript content changes.\n\nKeep the composite value scoped to SourceFingerprint and recompute Session.File.Hash from the transcript during provider parse. The provider test now exercises Fingerprint -> Parse with a .meta.json companion to prove the two hashes remain distinct.\n\nValidation: go test -tags "fts5" ./internal/parser -run TestCommandCodeProvider -count=1; go test -tags "fts5" ./internal/parser -count=1; go test -tags "fts5" ./internal/sync -run 'Test.*CommandCode|Test.*Iflow' -count=1; go vet ./...; git diff --check
fix(parser): thread ctx through commandcode and iflow source lookups
Migrates Command Code and iFlow from the transitional legacy provider adapter to concrete provider facade implementations. Both providers share the directory-shaped JSONL source helper while still keeping parser-specific filters, source IDs, project hints, fingerprinting, and parse normalization explicit in their own files.
The slice keeps legacy behavior for deleted-path classification, full-ID and raw-ID lookup, source fingerprints, parse output, and symlinked project-directory discovery. Command Code and iFlow are grouped together because they exercise the same //.jsonl layout without adding nested or composite provider complexity.