GitProxy now has three sink backends implementing the Sink interface in src/db/types.ts: fs (NeDB), mongo, and postgres (in progress via #1687). Every change to one backend is a parity obligation on the others, and recent history shows how easily that slips:
AI agents do a growing share of this work, so the guardrail should live where agents look: a skill in .agents/skills/ (exposed to Claude via the .claude/skills symlink and to opencode via a command stub) that encodes the parity contract and checklist:
src/db/types.ts is the contract: any new member or field must be implemented in src/db/file, src/db/mongo, and src/db/postgres in the same change.
- Parity is semantic, not just structural: same defaults on create, same timestamp bumps, same projections and filters, same error behaviour, matching case sensitivity.
- Column allowlists must not silently drop new fields; postgres schema changes are append-only migrations.
- Per-backend unit tests plus the verification commands that catch drift (
npm run check-types:server, backend test suites, the postgres integration lane).
Acceptance: sink-parity skill file plus opencode stub on the feat/postgres integration branch, applicable to any agent that reads AGENTS.md.
GitProxy now has three sink backends implementing the
Sinkinterface insrc/db/types.ts:fs(NeDB),mongo, andpostgres(in progress via #1687). Every change to one backend is a parity obligation on the others, and recent history shows how easily that slips:Sinkmembers (getRepoPushRollupsByCanonicalUrl,updateRepo, the migration hooks) had to be retrofitted onto the postgres adapter after landing for mongo/fs.Repofields (dateCreated/lastModified, feat(db): add dateCreated and lastModified to Repo #1656) were stored and bumped by mongo/fs but silently dropped by the postgres adapter's update allowlist, which would have made the feat: backfill repo dateCreated/lastModified via migration #1681 startup migration abort boot on postgres.AI agents do a growing share of this work, so the guardrail should live where agents look: a skill in
.agents/skills/(exposed to Claude via the.claude/skillssymlink and to opencode via a command stub) that encodes the parity contract and checklist:src/db/types.tsis the contract: any new member or field must be implemented insrc/db/file,src/db/mongo, andsrc/db/postgresin the same change.npm run check-types:server, backend test suites, the postgres integration lane).Acceptance:
sink-parityskill file plus opencode stub on thefeat/postgresintegration branch, applicable to any agent that readsAGENTS.md.