Awesome-omni-skill heir-sync-management

Master-Heir synchronization, contamination prevention, and promotion workflows

install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/devops/heir-sync-management" ~/.claude/skills/diegosouzapw-awesome-omni-skill-heir-sync-management-51ddea && rm -rf "$T"
manifest: skills/devops/heir-sync-management/SKILL.md
source content

Heir Sync Management

Safely synchronize cognitive architecture from Master to Heirs without contamination.

Scope: Master-only skill. Covers sync pipelines, PII protection, drift detection, skill promotion, and clean-slate distribution.

Core Concepts

ConceptDefinition
HeirPlatform-specific deployment inheriting Master's DNA (VS Code, M365, Codespaces)
Deployment ChannelDelivery mechanism for an heir (Marketplace, Teams Package, devcontainer push)
IntegrationCross-heir communication (OneDrive Sync, GitHub Cloud)
Translation HeirHeir requiring format/schema conversion (e.g., M365 — export pipeline)
Deployment HeirHeir needing only configuration, no code translation (e.g., Codespaces — devcontainer.json)
ContaminationMaster-specific data leaking into heir packages
DriftHeir diverging from Master's architecture over time
PromotionElevating heir-developed capabilities back to Master

Rule: Never confuse delivery mechanism with inheritance relationship — the "what" (identity/DNA) stays constant, only the "how" (delivery) varies.

Sync Architecture

What Gets Synced

The sync script (

sync-architecture.js
) copies these folders from Master
.github/
to Heir
.github/
:

FolderContent
instructions/
Procedural memory
prompts/
Episodic memory
config/
Configuration (with exclusions)
agents/
Agent definitions
muscles/
Execution scripts
skills/
Skills (filtered by inheritance)

What Must NEVER Sync

ItemWhy
user-profile.json
(real)
Contains personal name, email, preferences
episodic/
memories
Session-specific to Master
Master-only skillsOnly useful for managing the Master repo
API keys, PATs, secretsEnvironment-specific credentials
Working memory with populated P5-P7Gives new users pre-filled slots instead of clean defaults

3-Layer PII Protection

Every sync pipeline must implement three independent defense layers:

Layer 1: Exclusion List

Files that are never copied, period:

const EXCLUDED_CONFIG_FILES = [
  'user-profile.json',      // Personal data
  'MASTER-ALEX-PROTECTED.json', // Kill switch marker
  'goals.json',             // Session-specific
];

Layer 2: Source File Sanitization

Scan all files being copied for hardcoded personal data:

PatternAction
Real names in source headersReplace with team/org name
Email addresses in codeReplace with placeholder
Personal names in
package.json
Use organization name
Populated P5-P7 working memory slotsReset to
*(available)*

Rule: Personal identity belongs ONLY in

user-profile.json
. All other files use team/org names.

Layer 3: Pipeline Validation Gate

Post-copy regex scan that blocks packaging on violations:

CheckRegex ExampleOn Match
Real name in files
/\bFirstName\s+LastName\b/g
EXIT 1
Email addresses
/[\w.-]+@[\w.-]+\.\w+/g
EXIT 1 (except templates)
API keys
/[A-Za-z0-9]{32,}/
in non-code files
WARNING
Populated P5-P7Check copilot-instructions Memory StoresEXIT 1

Anti-pattern: Manual checklists. The copy function itself must be architecturally incapable of leaking.

Clean Slate Distribution

Template Generation

Simply excluding personal files leaves heirs without expected file structure. Generate fresh templates:

FileMaster VersionHeir Template
user-profile.json
Real user dataEmpty with defaults + setup instructions
copilot-instructions.md
Populated P5-P7P5-P7 set to
*(available)*
goals.json
Active session goalsEmpty goals array

Post-Sync Reset Sequence

After copying files, apply these transformations:

  1. Reset environment-specific values — P5-P7 slots, session state
  2. Generate template files — Fresh starters with clear defaults
  3. Remove broken synapse references — Master synapse IDs that don't exist in heir
  4. Validate file structure — Ensure all expected files exist (even if empty templates)

Drift Detection

Pre-Release Checklist

Run these validations before every release:

CheckMethodFail Condition
Skill count matchCount Master inheritable vs Heir skillsMismatch
File hash comparisonSHA256 of synced filesDivergence without override
Inheritance field validationAll skills have
inheritance
in synapses
Missing field
Orphan reference detectionGrep for files referenced but not presentBroken references
Config driftCompare heir config against Master templateUnexpected values

Heir Configuration Drift Signals

SignalIndicates
Heir P5-P7 slots populatedSync overwrote clean defaults
Heir has master-only skillsExclusion filter not working
Heir synapse IDs don't resolveBroken references from Master copy
Heir
package.json
has personal name
Sanitization missed

Leakage Prevention Patterns

Master-Only Content Categories

Content that must NEVER sync to heirs falls into three categories:

CategoryExamplesFilter Method
Skillsheir-curation, master-alex-audit
inheritance: "master-only"
in synapses.json
FilesROADMAP-UNIFIED.md, alex_docs/architecture/Path-based filtering in sync script
MetadataComplete trifecta count (9 vs 8), safety imperatives I1-I4Content transformation rules

Dual Filtering Strategy (2026-02-14 Fix)

Problem:

cleanBrokenSynapseReferences()
only filtered master-only skills, not master-only files.

Solution: Enhanced function with dual target detection:

// Master-only skills (from inheritance metadata)
skippedMasterOnly.some(removed => target.includes(removed))

// Master-only files (hardcoded registry)
masterOnlyFiles.some(file => target.includes(file))

Master-Only Files Registry:

  • ROADMAP-UNIFIED.md
    — Master development roadmap
  • alex_docs/architecture/
    — Architecture documentation not deployed to heirs
  • MASTER-ALEX-PROTECTED.json
    — Kill-switch marker

Content Transformation Rules

Some content needs adjustment not removal:

ContentMaster ValueHeir ValueTransform Rule
Complete trifectas count98Remove heir-curation from list
Safety imperativesI1-I7I5-I6 onlyStrip I1-I4, I7 (master workspace protection)
Active Context PersonaCurrent sessionDeveloper (85%)Reset to default
Last AssessedDateneverClear assessment timestamp

Implementation:

applyHeirTransformations()
in sync-architecture.js

Validation Cascade (4-Stage Quality Gate)

  1. Sync: Copy files with skill/config exclusions
  2. Transform: Apply heir-specific content adjustments
  3. Validate: PII scan, master-only file detection
  4. Audit: Count verification, synapse connection integrity

Fail-Fast: Any contamination detection halts the build (exit 1).

Heir → Master Promotion

6-Step Promotion Workflow

StepActionOutput
1. DiscoverReview heir DK/skill files for portable knowledgeCandidate list
2. Create SkillWrite SKILL.md in Master's
.github/skills/
New skill file
3. Compare GapsDiff heir knowledge against Master's existing coverageGap analysis
4. ImplementPort patterns, translate code (Python→TS if needed)Working code
5. TestValidate in Master contextPassing tests
6. DocumentCHANGELOG entry, ROADMAP updateRelease-ready

Consolidation During Promotion

Heirs naturally create granular one-capability-per-skill files during experimentation. During promotion:

  1. Identify clusters — Group related heir skills by domain
  2. Choose anchor skill — Pick the broadest skill in the cluster
  3. Merge content — Absorb related skills into the anchor
  4. Deduplicate — Remove redundancy from the merge
  5. Mark inheritance — Set the promoted skill as inheritable

Anti-pattern: Promoting every heir skill as-is without consolidation review causes skill sprawl.

Code Translation Patterns (Heir → Master)

When porting from Python heirs to TypeScript Master:

PythonTypeScript
dataclass
interface
raise Exception
throw new Error
**kwargs
Optional config object
async def
async function
try/except
try/catch

Skill Inheritance Classification

Curation Rule

Ask: "Is this skill ONLY useful for managing the Alex repo itself?"

AnswerClassificationExample
Yes, master-repo only
master-only
release-preflight, heir-curation
No, any developer benefits
inheritable
deep-thinking, meditation, security-review

Truly Master-Only Skills (small list)

Only a few skills are genuinely master-only:

  • heir-curation
    — Managing what heirs receive
  • heir-sync-management
    — This skill
  • master-alex-audit
    — Master workspace auditing
  • release-preflight
    — Marketplace publishing
  • release-process
    — Release pipeline

Heir Type Comparison

HeirTypeTranslationDeploy MechanismMaintenance Cost
VS Code ExtensionSourceCompile only
npx vsce publish
Low
M365 Copilot AgentTranslationFull export/schema mappingTeams Developer PortalHigh
GitHub CodespacesDeploymentNone (same extension)
git push
devcontainer.json
Very Low

Everything else should be inheritable unless it references Master-specific file paths or workflows.

Heir-Specific Positioning

Each platform heir must position against its native competitor, not a generic category:

HeirCompares AgainstNot Against
VS Code ExtensionGitHub Copilot (native)"AI assistants" generically
M365 AgentMicrosoft 365 Copilot"AI assistants" generically

Store descriptions, README headers, and comparison tables must use platform-specific language and keywords.

Release Pipeline Integration

The release script must enforce sync before packaging:

  1. Run
    sync-architecture.js
    (copies Master → Heir)
  2. Apply post-sync transformations (clean slate)
  3. Run PII validation gate (blocks on contamination)
  4. Check
    BUILD-MANIFEST.json
    timestamp (prevents stale packaging)
  5. Package and publish

Rule: It must be impossible to publish stale content through the official release process.