feat: team sync — cross-user observation sharing with author attribution#59
Closed
Chelu97 wants to merge 1 commit intoGentleman-Programming:mainfrom
Closed
feat: team sync — cross-user observation sharing with author attribution#59Chelu97 wants to merge 1 commit intoGentleman-Programming:mainfrom
Chelu97 wants to merge 1 commit intoGentleman-Programming:mainfrom
Conversation
Add team sync mechanism that shares observation memories between users enrolled in the same project, with full author attribution. This enables AI agents in multi-developer teams to see what teammates discovered, decided, or fixed. - Add cloud_project_enrollments table and enrollment CRUD - Add PullMutationsWithTeamSync for cross-user observation sharing - Add author field across all observation structs and SQL queries - Add author attribution display in MCP search/context/get - Preserve existing author on re-upsert (echo protection) - Add SetTeamSync transport config with env var override - 38 tests covering security boundaries, isolation, and attribution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Hey @Chelu97, this is a great feature — team sync with author attribution is exactly the kind of thing we want for cloud sync. However, the cloud packages have been removed from the public repo while we continue development in a separate repository. When cloud sync ships publicly, team sync will be a priority feature. We'll reference this PR when we get there. Thanks for the thorough implementation and tests! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
I work on personal projects with my brother, and we both use Claude Code with engram
as our persistent memory system. We have a shared cloud server syncing our observations,
but each user can only see their own data. There's no way for my AI agent to know what
my brother's agent discovered, decided, or fixed — and vice versa.
This defeats the purpose of having a shared cloud: two developers working on the same
codebase, both using AI agents, but their agents are completely blind to each other's work.
Solution
Team Sync — an opt-in (enabled by default) mechanism that shares observation
memories between users enrolled in the same project, with full author attribution.
How it works
engram cloud enroll <project>enrolled in the same project, their observations are shared
distinguish "this was discovered by fernando" vs "this is my own memory"
scope: personal) are never sharedMCP display
When searching or viewing context, authored observations show attribution:
The AI agent sees exactly who wrote each memory and can reason about it accordingly.
Changes
New files
internal/cloud/cloudstore/team_sync.gointernal/cloud/cloudstore/team_sync_test.gointernal/cloud/remote/team_sync_test.gocmd/engram/cloud_config_test.goModified files
cmd/engram/main.goTeamSyncconfig field, enrollment push on enroll/unenrollinternal/cloud/autosync/manager.goAuthorfrom pull to local storeinternal/cloud/cloudserver/cloudserver.gointernal/cloud/cloudserver/push_pull.goteam_syncquery param + enrollment handlersinternal/cloud/cloudstore/cloudstore.goAuthorfield onCloudMutationinternal/cloud/cloudstore/schema.gocloud_project_enrollmentstableinternal/cloud/remote/transport.goSetTeamSync(), enrollment client methodsinternal/mcp/mcp.gointernal/store/store.goAuthorfield across all structs, SQL queries, echo protectioninternal/store/store_test.goStats
exclusion, project isolation, transport client, config defaults, env var overrides
Backward Compatibility
Authorusesjson:"author,omitempty", invisible to older clients(
engram cloud enroll <project>) to activate. No enrollments = identical behavior to current versionCREATE TABLE IF NOT EXISTS, author column usesaddColumnIfNotExists"team_sync": falseincloud.jsonorENGRAM_TEAM_SYNC=falseenv varSecurity considerations
observationcrosses user boundaries)Test plan
🤖 Generated with Claude Code