NEVER overwrite MEMORY.md -- these contain product-specific agent memory
NEVER modify SoT content -- only add section markers or frontmatter
NEVER modify PRD.md content -- only add frontmatter version
ALWAYS show diff before destructive changes (deletes, restructures)
ALWAYS verify hooks work after updating settings.json
Commit changes incrementally -- one commit per phase, not one giant commit
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: mattgierhart-prd-driven-context-engineering-ghm-template-syn3description: Template Sync4---56# Template Sync78Detect template version drift and migrate to the latest template version.910## Workflow1112### Phase 1: Detect Current State13141. Read `.claude/VERSION` (if it exists) to get current template version152. If no VERSION file, check `CLAUDE.md` frontmatter for `template_version`163. If neither exists, assume v1.0.0 (pre-versioning)174. Report: "Your repo is on template v{X}. Latest is v{Y}."1819### Phase 2: Diff Against Template2021Compare your repo structure against what the current template version expects:2223**Check for missing files:**24- `.claude/VERSION`25- `.claude/domain-profile.yaml`26- `.claude/hooks/HOOK_CONTRACT.md`27- `.claude/hooks/context-validation.sh`28- `.claude/hooks/context-density-gate.sh`29- `.claude/hooks/sot-update-trigger.sh`30- `CHANGELOG.md`31- `MIGRATION.md`3233**Check for stale files (should be removed):**34- `.claude/hooks/context-validation.py`35- `.claude/hooks/context-density-gate.py`36- `.claude/hooks/sot-update-trigger.py`37- `.claude/agents/HORIZON.md` (replaced by subdirectory)38- `.claude/agents/STUDIO.md`39- `.claude/agents/DEVLAB.md`40- `.claude/agents/METRO.md`4142**Check for structure issues:**43- `settings.json`: Does it use 3-level nesting? Are timeouts in seconds?44- Agent directories: Do `horizon/`, `studio/`, `devlab/`, `metro/` subdirectories exist with `AGENT.md` + `MEMORY.md`?45- EPIC template: Does it use semantic headers (not numbered)?46- Frontmatter: Do key files have `template_version`?4748### Phase 3: Generate Migration Plan4950Output a table:5152| File | Status | Action | Risk |53|------|--------|--------|------|54| `.claude/VERSION` | Missing | Copy from template | None |55| `.claude/hooks/*.py` | Stale | Delete (replaced by .sh) | None |56| `.claude/agents/HORIZON.md` | Stale | Split into horizon/AGENT.md + MEMORY.md | **Preserve MEMORY.md content** |57| `settings.json` | Outdated | Update hook nesting + commands | Check for custom hooks |58| `CLAUDE.md` | Missing frontmatter | Add `template_version: "3.0.0"` | None |5960### Phase 4: Execute Safe Updates6162**Auto-safe** (do without asking):63- Create `.claude/VERSION` with current template version64- Add `template_version` frontmatter to files that lack it65- Report what was done6667**Confirm first** (show diff, ask user):68- Update `settings.json` hook configuration69- Restructure agent files (must preserve MEMORY.md)70- Delete stale Python hooks71- Update EPIC template headers7273**Never touch** (product-specific):74- `PRD.md` content (only add frontmatter)75- `SoT/*.md` content76- `epics/EPIC-*.md` content (only update headers on closed EPICs)77- `.claude/agents/*/MEMORY.md` content78- `README.md` content7980### Phase 5: Verify8182After all changes:831. Test all shell hooks produce valid JSON842. Verify no Python hooks remain853. Confirm `settings.json` uses correct nesting864. Check agent subdirectories have both AGENT.md and MEMORY.md875. Report summary of changes made8889## Version Migration Matrix9091| From | To | Key Changes |92|------|----|-------------|93| v1.0.0 | v2.0.0 | Add skills, hooks, agents, SoT standardization |94| v2.0.0 | v3.0.0 | Shell hooks, agent subdirs, semantic EPICs, versioning, domain-profile |95| v1.0.0 | v3.0.0 | All of the above (cumulative) |9697## Safety Rules98991. **NEVER overwrite MEMORY.md** -- these contain product-specific agent memory1002. **NEVER modify SoT content** -- only add section markers or frontmatter1013. **NEVER modify PRD.md content** -- only add frontmatter version1024. **ALWAYS show diff before destructive changes** (deletes, restructures)1035. **ALWAYS verify hooks work** after updating settings.json1046. **Commit changes incrementally** -- one commit per phase, not one giant commit105106---107> Converted and distributed by [TomeVault](https://tomevault.io/claim/mattgierhart) — claim your Tome and manage your conversions.108<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/mattgierhart-prd-driven-context-engineering-ghm-template-syn in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Template Sync It is listed under Product & Planning on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.