Share - Cross-Project Knowledge Sync
Copy project-specific knowledge to the shared directory for reuse across projects.
Usage
/share [knowledge-file-path]
/share kb/02-patterns/retry-pattern.md
Output: $PROJECT_ROOT/docs/shared-knowledge/[filename].md
Instructions
- Validate the source file exists and is in docs/
- Copy to
docs/shared-knowledge/ - Clean project-specific references (paths, project names)
- Add cross-project metadata:
- Remove project-specific paths
- Add
scope: cross-projectto frontmatter - Add source project reference
- Confirm with user
Template Additions
Add to the shared file's frontmatter:
scope: cross-project
source_project: [current project name]
shared_date: YYYY-MM-DD
Sync to Other Projects
To use shared knowledge in another project:
# Option 1: Symlink
ln -s /path/to/shared-knowledge docs/shared-knowledge
# Option 2: Copy specific files
cp /path/to/shared-knowledge/pattern.md kb/02-patterns/
Related Commands
| Command | Purpose |
|---------|---------|
| /distill | Create knowledge (can then /share) |
| /search | Find knowledge to share |
| /share | Share cross-project (you are here) |
微信扫一扫