Problem It Solves
Closes gap: #177
Memory is siloed per repository. Patterns discovered in one project are invisible to agents in another project in the same organization. The same anti-patterns are caught from scratch in every repo; the same architectural decisions are made repeatedly without reference to prior work.
Proposed Behavior
Shared knowledge repository
A designated repository (e.g., org/teamwork-knowledge) stores shared memory YAML files in the same format as .teamwork/memory/. No special infrastructure required — it is a plain git repository.
config.yaml shared knowledge configuration
memory:
shared_knowledge:
repo: "org/teamwork-knowledge" # GitHub owner/repo
path: "memory" # path within the repo (default: memory/)
auto_pull: true # pull on teamwork next automatically
domains: ["auth", "api", "security"] # only pull entries with these domain tags
teamwork memory sync --pull
Fetches entries from the shared knowledge repo matching the configured domains and tech stack tags, merging them into the local .teamwork/memory/ files. Existing local entries are not overwritten — shared entries are marked with a source: shared field.
teamwork memory sync --pull
✓ Pulled 12 shared entries (auth: 4, security: 5, api: 3) → .teamwork/memory/
teamwork memory add --scope shared
Promotes a local entry to the shared knowledge base:
teamwork memory add --scope shared --category pattern --domain auth --content "RS256 JWT: always validate aud and iss claims on every request"
✓ Entry submitted to org/teamwork-knowledge as PR #47 for team review.
Shared entries go through a PR on the shared knowledge repo — the team reviews before the pattern is promoted to shared status. This maintains quality of shared knowledge.
teamwork next --context integration
When generating the context package (#184), shared memory entries matching the current workflow and role are included alongside local entries, clearly marked as [shared].
Dependencies
Complexity Estimate
Large — 6 files: memory sync pull logic, shared repo GitHub API client, config schema extension, teamwork memory add --scope flag, teamwork next context integration, tests
Problem It Solves
Closes gap: #177
Memory is siloed per repository. Patterns discovered in one project are invisible to agents in another project in the same organization. The same anti-patterns are caught from scratch in every repo; the same architectural decisions are made repeatedly without reference to prior work.
Proposed Behavior
Shared knowledge repository
A designated repository (e.g.,
org/teamwork-knowledge) stores shared memory YAML files in the same format as.teamwork/memory/. No special infrastructure required — it is a plain git repository.config.yaml shared knowledge configuration
teamwork memory sync --pull
Fetches entries from the shared knowledge repo matching the configured domains and tech stack tags, merging them into the local
.teamwork/memory/files. Existing local entries are not overwritten — shared entries are marked with asource: sharedfield.teamwork memory add --scope shared
Promotes a local entry to the shared knowledge base:
Shared entries go through a PR on the shared knowledge repo — the team reviews before the pattern is promoted to shared status. This maintains quality of shared knowledge.
teamwork next --context integration
When generating the context package (#184), shared memory entries matching the current workflow and role are included alongside local entries, clearly marked as
[shared].Dependencies
GH_TOKEN)internal/memory/memory.goextended to supportsourcefield and merge semanticsComplexity Estimate
Large — 6 files: memory sync pull logic, shared repo GitHub API client, config schema extension,
teamwork memory add --scopeflag,teamwork nextcontext integration, tests