Global Knowledge Sync
Global Knowledge Sync Skill
Manages bidirectional synchronization between local project knowledge and the centralized Alex Global Knowledge repository.
First-Time Setup (New Users)
If you don't have a Global Knowledge repository yet, create one:
Option 1: GitHub CLI (Recommended)
cd C:\Development # or your projects folder
gh repo create My-Global-Knowledge --private --description "Alex Global Knowledge Base" --clone
cd My-Global-Knowledge
Option 2: Manual
- Create a new private GitHub repo named
My-Global-Knowledge - Clone it as a sibling to your projects
Scaffold the Repository
After creating the repo, initialize the structure:
# Create folders
mkdir patterns, insights, skills
# Create index.json
@'
{
"version": "1.0.0",
"lastUpdated": "$(Get-Date -Format 'yyyy-MM-ddTHH:mm:ssZ')",
"entries": []
}
'@ | Out-File -FilePath index.json -Encoding utf8
# Create README
@'
# My Global Knowledge Base
Cross-project learnings for Alex Cognitive Architecture.
## Structure
- `patterns/` - Reusable solutions (GK-*.md)
- `insights/` - Timestamped learnings (GI-*.md)
- `skills/` - Skill registry for pull-sync
- `index.json` - Master search index
## Usage
- `/knowledge <query>` - Search knowledge
- `/saveinsight` - Save a learning
- `/promote` - Make local knowledge global
'@ | Out-File -FilePath README.md -Encoding utf8
# Commit
git add -A
git commit -m "feat: initialize global knowledge structure"
git push
Repository Location
Default: The GK repo should be a sibling folder to your project workspace:
- Your Project:
C:\Development\YourProject\ - Global Knowledge:
C:\Development\My-Global-Knowledge\
Configuration: Set via globalKnowledgeRepo in .github/config/alex-settings.json
Note: All heirs inherit this skill — GK sync works in any Alex-enabled project.
Capabilities
1. Save Insight to GK
Save a learning from the current project to global knowledge.
Trigger: /saveinsight, save this insight, promote to global
Process:
- Capture insight title and content
- Determine type:
pattern(reusable) orinsight(timestamped) - Assign category and tags
- Generate file:
GK-{slug}.mdorGI-{slug}-{date}.md - Update
index.jsonwith metadata - Commit to GK repo (optional auto-push)
2. Search Global Knowledge
Find relevant knowledge from past projects.
Trigger: /knowledge <query>, have I solved this before?
Process:
- Search
index.jsonfor matching entries (title, tags, summary) - Return top matches with links
- Optionally read full content
3. Sync During Dream
Automated sync during dream/meditation cycles.
Trigger: Dream protocol, meditation consolidation
Process:
- Check for uncommitted changes in GK repo
- Pull latest from remote
- Regenerate
KNOWLEDGE-INDEX.mdif entries changed - Report sync status in dream output
4. Promote Local Skill to Global
Promote a project's skill file to global pattern.
Trigger: /promote, make this global
Process:
- Select local file from
.github/skills/or skill - Convert to GK format with proper frontmatter
- Add source project attribution
- Save to
patterns/folder
5. Skill Pull-Sync (For Heirs)
Discover and pull new skills from the GK repository.
Trigger: /checkskills, session start (if auto-check enabled)
Process:
- Read
skills/skill-registry.jsonfrom GK - Compare against local skills
- Report new/updated skills available
- Pull on demand via
/pullskill <id>
Registry Structure (skills/skill-registry.json):
{
"version": "1.0.0",
"skills": [
{
"id": "skill-development",
"version": "1.0.0",
"inheritance": "inheritable",
"priority": "core",
"source": "master-alex"
}
],
"wishlist": [...],
"projectTypeMatching": {...}
}
Project-Skill Matching: Heirs detect project type and recommend relevant wishlist skills. See skill-development for full protocol.
Integration Points
Dream Protocol
Add to dream checklist:
- [ ] GK sync: Pull latest, check uncommitted, regenerate index
Meditation Protocol
During consolidation, prompt:
- "Any insights worth saving globally?"
- Auto-detect cross-project patterns
Upgrade Process
When upgrading a project:
- Check if project has relevant GK entries
- Suggest applicable patterns
- Note project in
relatedProjectsof used entries
File Formats
Pattern (GK-*)
# Pattern Title
**ID**: GK-pattern-slug
**Category**: category-name
**Tags**: tag1, tag2, tag3
**Source**: Original project name
**Created**: 2026-02-06T12:00:00Z
---
## Description
What this pattern solves.
## Implementation
How to apply it.
## Examples
Code samples.
Insight (GI-*)
# Insight Title
**ID**: GI-insight-slug-2026-02-06
**Category**: category-name
**Tags**: tag1, tag2
**Source Project**: project-name
**Date**: 2026-02-06T12:00:00Z
---
## Context
What problem you were solving.
## Insight
What you learned.
## Applicability
When to use this again.
Categories
| Category | Use For |
|---|---|
architecture |
System design, patterns, structure |
api-design |
REST, GraphQL, API patterns |
debugging |
Troubleshooting, diagnostics |
deployment |
CI/CD, infrastructure, publishing |
documentation |
Docs, diagrams, formatting |
error-handling |
Exception handling, recovery |
patterns |
Design patterns, reusable solutions |
performance |
Optimization, profiling |
refactoring |
Code improvement, cleanup |
security |
Auth, encryption, vulnerabilities |
testing |
Unit, integration, E2E |
tooling |
Dev tools, configuration |
general |
Everything else |
Related Skills
- meditation-facilitation - Creates insights during meditation
- bootstrap-learning - Uses GK to accelerate learning
- global-knowledge - Core GK search capability