{"id":"5335c42e-06b6-4ecc-882e-46129aee93cf","shortId":"Cszkvm","kind":"skill","title":"pmstudio-sync","tagline":"Use when a project has linked documentation artifacts (PRDs, presentations, meeting notes, architecture maps) that must stay synchronized. Detects which source files changed, identifies downstream documents needing updates, reads new content, and proposes specific edits with diff","description":"# Doc Sync — Cascading Document Updater\n\n## What This Skill Does\n\nMaintains consistency across a documentation ecosystem where one source change (e.g., a new meeting note) should cascade updates to multiple downstream documents (PRD, presentation, project memory).\n\n**This is NOT a background watcher.** This skill is the Claude-side processor that:\n1. Reads a sync report or detects changes directly\n2. Extracts actionable content from new/modified source files\n3. Proposes specific edits to each downstream target\n4. Applies changes only after user approval\n\n## Prerequisites\n\n### Infrastructure (one-time setup)\n\nThe persistent detection layer runs outside Claude Code via `/project-sync init`:\n\n| Component | Path | Purpose |\n|-----------|------|---------|\n| Orchestrator | `~/.claude/scripts/project-sync-orchestrator.sh` | Email search + file detection + report generation |\n| launchd agent | `~/Library/LaunchAgents/com.claude.project-sync.<name>.plist` | Background scheduler (every 2 hours) |\n| State dir | `~/.claude/state/<project-name>/` | Logs, timestamps, cached config (outside OneDrive) |\n\n### Per-Project Config\n\nEach project needs `.sync-watch.json` in its root:\n\n```json\n{\n  \"project_name\": \"My Project\",\n  \"watch_dirs\": [\"docs/meeting-notes\", \"docs/research\"],\n  \"target_docs\": {\n    \"tier1\": [\n      {\n        \"path\": \"docs/PRD.html\",\n        \"name\": \"Product Requirements\",\n        \"update_from\": [\"meeting-notes\", \"research\"],\n        \"what\": \"Requirements, user stories, decisions\"\n      }\n    ],\n    \"tier2\": [\n      {\n        \"path\": \"docs/presentation.html\",\n        \"name\": \"Stakeholder Deck\",\n        \"update_from\": [\"meeting-notes\"],\n        \"what\": \"Stakeholder updates, timeline changes\"\n      }\n    ]\n  },\n  \"ignore_patterns\": [\".*\", \"*.tmp\", \"~$*\"],\n  \"file_types\": [\".md\", \".html\", \".docx\", \".xlsx\", \".pdf\"]\n}\n```\n\n## Invocation\n\n### Automatic (via session hook)\nWhen you start a Claude Code session in a watched project with pending changes:\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n SYNC WATCHER ► 3 new/modified file(s) detected\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nSay \"process sync report\" to review and apply updates.\n```\n\n### Manual\n- `/doc-sync` — check for changes now and process\n- `/doc-sync path/to/new-file.md` — process a specific source file\n- `process sync report` — process a pending `.sync-report.md`\n\n## Process\n\n### Step 1: Detect Changes\n\n**If `.sync-report.md` exists:** Read it — it lists all changed files with timestamps.\n\n**If no report (manual invocation):**\n```bash\n!`bash ~/.claude/scripts/project-sync-orchestrator.sh \"$(pwd)\"`\n```\nThen read the generated `.sync-report.md` (written to project root or `~/.claude/state/<project-name>/sync-report.md`).\n\n**If a specific file was passed as `$ARGUMENTS`:** Use that file as the sole source.\n\n**If no changes detected:** Report \"All documents are in sync.\" and stop.\n\n### Step 2: Read Source Files\n\nFor each new/modified file detected:\n\n1. **Skip binaries** (`.docx`, `.xlsx`, `.pptx`, `.pdf`) — note them but don't read. Tell user: \"Binary file detected — paste key content or convert to text.\"\n2. **Read text files** (`.md`, `.html`) in full\n3. **Extract structured data** from each:\n\n```\nFor each source file, extract:\n- NEW STAKEHOLDERS: Name, Role, Email, Group\n- NEW DECISIONS: What was decided, by whom, date, impact\n- NEW REQUIREMENTS: Functional/non-functional, priority, acceptance criteria\n- NEW ACTION ITEMS: Owner, deadline, status\n- NEW ARCHITECTURE: Design changes, module updates, integration changes\n- NEW RISKS: Description, impact, mitigation\n- VERSION CHANGES: What changed from previous version\n```\n\n### Step 3: Read Config & Map Dependencies\n\nRead `.sync-watch.json` to determine which target docs need which types of updates.\n\nFor each target doc in `tier1` and `tier2`:\n- Check if any source file matches its `update_from` patterns\n- If yes → read the target doc to understand current state\n- Identify exactly WHERE in the target doc the new content should go\n\n### Step 4: Propose Updates\n\nPresent a structured proposal — DO NOT edit anything yet:\n\n```markdown\n## Sync Proposal\n\n### Source: Meeting-Notes-2026-03-17.md\n**New content extracted:**\n- 2 new stakeholders (Jane Doe, John Smith)\n- 1 decision (moved go-live to Q4)\n- 3 action items\n\n### Updates Needed:\n\n**1. PRD.html** (Tier 1)\n- Section 05 Stakeholders: Add Jane Doe (Tax Director), John Smith (IT Lead)\n- Section 12 Timeline: Update go-live from Q3 → Q4\n- Change log: Add v1.1 entry\n- [Show exact diff preview for each change]\n\n**2. Presentation.html** (Tier 1)\n- Slide 7 (Team): Add 2 stakeholder cards\n- Slide 12 (Timeline): Update milestone date\n- [Show exact diff preview]\n\n**3. CLAUDE.local.md** (Tier 1)\n- Recent Changes: Add dated entry\n- [Show exact content to append]\n\n**4. Stakeholder-Directory.xlsx** (Tier 2)\n- SKIP — binary file, manual update needed\n```\n\n### Step 5: Get Approval\n\nAsk user:\n- \"Apply all updates?\" → proceed with all\n- \"Apply selectively?\" → let user pick which targets\n- \"Skip for now?\" → clean up report, do nothing\n- User may also request modifications to the proposal\n\n### Step 6: Apply Updates\n\nFor each approved target:\n1. **Read the target file** (always re-read before editing — it may have changed)\n2. **Apply edits** using the Edit tool (not Write — preserve unchanged content)\n3. **Verify** the edit was applied correctly\n4. **Log** what was changed\n\n### Step 7: Clean Up & Update Memory\n\nAfter all edits applied:\n1. **Delete `.sync-report.md`** (consumed)\n2. **Update `_temp/.last-sync-check`** timestamp\n3. **Update `CLAUDE.local.md`** Recent Changes section with a dated entry summarizing what was synced\n4. **Report** summary to user:\n\n```\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n DOC SYNC ► COMPLETE ✓\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nSource files processed: 3\nDocuments updated: 4\n  ✓ PRD.html — 3 edits (stakeholders, timeline, changelog)\n  ✓ Presentation.html — 2 edits (team slide, timeline)\n  ✓ CLAUDE.local.md — 1 edit (recent changes)\n  ⚠ Stakeholder-Directory.xlsx — skipped (binary)\n\nManual follow-up needed:\n  - Update Stakeholder-Directory.xlsx with 2 new contacts\n```\n\n## Critical Rules\n\n1. **NEVER edit without approval.** Always show the proposal first. The user must explicitly approve.\n2. **NEVER fabricate content.** Only extract what's actually written in source files. If a meeting note doesn't mention a stakeholder's email, don't guess it.\n3. **NEVER overwrite — always append/insert.** Use Edit tool with precise `old_string` matching. Never rewrite entire files.\n4. **ALWAYS read target docs before editing.** They may have been modified since the report was generated.\n5. **ALWAYS preserve existing formatting.** Match the target doc's style (HTML structure, CSS classes, indentation patterns).\n6. **Binary files are report-only.** Flag them for manual update, don't attempt to modify.\n7. **Version bumps:** If the target doc has a version badge/number, increment it and add a changelog entry.\n\n## Adding This to a New Project\n\n1. Create `.sync-watch.json` in the project root (use template above)\n2. Run `/project-sync init` to set up the launchd cron job\n3. Done — the background orchestrator runs every 2 hours and generates `.sync-report.md` when changes are detected\n\n## Dependency Graph Pattern\n\nFor complex projects, document the update cascade in `.sync-watch.json`:\n\n```\nMeeting Notes ──→ PRD ──→ PRD Presentation\n       │                         │\n       ├──→ Main Presentation ←──┘\n       │\n       └──→ CLAUDE.local.md ←── (all changes)\n```\n\nThis ensures that when a meeting note creates a PRD change, and that PRD change should also update the presentation, the full cascade is handled in one sync pass.","tags":["doc","sync","coco","rkz91","agent-skills","agents-md","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools"],"capabilities":["skill","source-rkz91","skill-doc-sync","topic-agent-skills","topic-agents-md","topic-ai-agents","topic-claude-code","topic-codex","topic-cursor","topic-developer-tools","topic-llm-tools","topic-mcp","topic-pm-tools","topic-product-management","topic-productivity"],"categories":["coco"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/rkz91/coco/doc-sync","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add rkz91/coco","source_repo":"https://github.com/rkz91/coco","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (7,753 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:06.595Z","embedding":null,"createdAt":"2026-05-18T13:21:38.693Z","updatedAt":"2026-05-18T19:14:06.595Z","lastSeenAt":"2026-05-18T19:14:06.595Z","tsv":"'/.claude/scripts/project-sync-orchestrator.sh':144,315 '/.claude/state':162,327 '/doc-sync':270,277 '/library/launchagents/com.claude.project-sync':153 '/project-sync':138,948 '/sync-report.md':328 '05':561 '1':91,293,366,543,556,559,597,618,682,731,781,801,936 '12':573,606 '2':100,158,357,391,536,594,602,632,697,735,775,796,816,946,964 '3':108,255,399,458,551,615,709,739,764,769,844,957 '4':116,516,629,716,753,767,861 '5':640,878 '6':675,895 '7':599,722,912 'accept':429 'across':52 'action':102,432,552 'actual':824 'ad':930 'add':563,584,601,621,926 'agent':152 'also':668,1011 'alway':687,806,847,862,879 'anyth':526 'append':628 'append/insert':848 'appli':117,267,645,651,676,698,714,730 'approv':122,642,680,805,815 'architectur':16,438 'argument':336 'artifact':11 'ask':643 'attempt':909 'automat':235 'background':80,155,960 'badge/number':922 'bash':313,314 'binari':368,381,634,787,896 'bump':914 'cach':165 'card':604 'cascad':43,66,982,1017 'chang':26,59,98,118,223,252,273,295,304,346,440,444,451,453,582,593,620,696,720,743,784,970,994,1005,1009 'changelog':773,928 'check':271,483 'class':892 'claud':87,135,243 'claude-sid':86 'claude.local.md':616,741,780,992 'clean':661,723 'code':136,244 'complet':760 'complex':977 'compon':140 'config':166,172,460 'consist':51 'consum':734 'contact':798 'content':34,103,386,512,534,626,708,819 'convert':388 'correct':715 'creat':937,1002 'criteria':430 'critic':799 'cron':955 'css':891 'current':501 'data':402 'date':423,610,622,747 'deadlin':435 'decid':420 'decis':207,417,544 'deck':213 'delet':732 'depend':462,973 'descript':447 'design':439 'detect':22,97,131,148,259,294,347,365,383,972 'determin':466 'diff':40,589,613 'dir':161,186 'direct':99 'director':567 'doc':41,190,469,478,498,509,758,865,886,918 'docs/meeting-notes':187 'docs/prd.html':193 'docs/presentation.html':210 'docs/research':188 'document':10,29,44,54,71,350,765,979 'docx':231,369 'doe':540,565 'doesn':833 'done':958 'downstream':28,70,114 'e.g':60 'ecosystem':55 'edit':38,111,525,692,699,702,712,729,770,776,782,803,850,867 'email':145,414,839 'ensur':996 'entir':859 'entri':586,623,748,929 'everi':157,963 'exact':504,588,612,625 'exist':298,881 'explicit':814 'extract':101,400,409,535,821 'fabric':818 'file':25,107,147,227,257,283,305,332,339,360,364,382,394,408,487,635,686,762,828,860,897 'first':810 'flag':902 'follow':790 'follow-up':789 'format':882 'full':398,1016 'functional/non-functional':427 'generat':150,320,877,967 'get':641 'go':514,547,577 'go-liv':546,576 'graph':974 'group':415 'guess':842 'handl':1019 'hook':238 'hour':159,965 'html':230,396,889 'identifi':27,503 'ignor':224 'impact':424,448 'increment':923 'indent':893 'infrastructur':124 'init':139,949 'integr':443 'invoc':234,312 'item':433,553 'jane':539,564 'job':956 'john':541,568 'json':180 'key':385 'launchd':151,954 'layer':132 'lead':571 'let':653 'link':9 'list':302 'live':548,578 'log':163,583,717 'main':990 'maintain':50 'manual':269,311,636,788,905 'map':17,461 'markdown':528 'match':488,856,883 'may':667,694,869 'md':229,395 'meet':14,63,200,217,831,985,1000 'meeting-not':199,216 'meeting-notes-2026-03-17.md':532 'memori':75,726 'mention':835 'mileston':609 'mitig':449 'modif':670 'modifi':872,911 'modul':441 'move':545 'multipl':69 'must':19,813 'name':182,194,211,412 'need':30,175,470,555,638,792 'never':802,817,845,857 'new':33,62,410,416,425,431,437,445,511,533,537,797,934 'new/modified':105,256,363 'note':15,64,201,218,373,832,986,1001 'noth':665 'old':854 'one':57,126,1021 'one-tim':125 'onedr':168 'orchestr':143,961 'outsid':134,167 'overwrit':846 'owner':434 'pass':334,1023 'past':384 'path':141,192,209 'path/to/new-file.md':278 'pattern':225,492,894,975 'pdf':233,372 'pend':251,289 'per':170 'per-project':169 'persist':130 'pick':655 'plist':154 'pmstudio':2 'pmstudio-sync':1 'pptx':371 'prd':72,987,988,1004,1008 'prd.html':557,768 'prds':12 'precis':853 'prerequisit':123 'present':13,73,519,989,991,1014 'presentation.html':595,774 'preserv':706,880 'preview':590,614 'previous':455 'prioriti':428 'proceed':648 'process':261,276,279,284,287,291,763 'processor':89 'product':195 'project':7,74,171,174,181,184,249,324,935,941,978 'propos':36,109,517,522,530,673,809 'purpos':142 'pwd':316 'q3':580 'q4':550,581 're':689 're-read':688 'read':32,92,299,318,358,378,392,459,463,495,683,690,863 'recent':619,742,783 'report':95,149,263,286,310,348,663,754,875,900 'report-on':899 'request':669 'requir':196,204,426 'research':202 'review':265 'rewrit':858 'risk':446 'role':413 'root':179,325,942 'rule':800 'run':133,947,962 'say':260 'schedul':156 'search':146 'section':560,572,744 'select':652 'session':237,245 'set':951 'setup':128 'show':587,611,624,807 'side':88 'sinc':873 'skill':48,83 'skill-doc-sync' 'skip':367,633,658,786 'slide':598,605,778 'smith':542,569 'sole':342 'sourc':24,58,106,282,343,359,407,486,531,761,827 'source-rkz91' 'specif':37,110,281,331 'stakehold':212,220,411,538,562,603,771,837 'stakeholder-directory.xlsx':630,785,794 'start':241 'state':160,502 'status':436 'stay':20 'step':292,356,457,515,639,674,721 'stop':355 'stori':206 'string':855 'structur':401,521,890 'style':888 'summar':749 'summari':755 'sync':3,42,94,253,262,285,353,529,752,759,1022 'sync-report.md':290,297,321,733,968 'sync-watch.json':176,464,938,984 'synchron':21 'target':115,189,468,477,497,508,657,681,685,864,885,917 'tax':566 'team':600,777 'tell':379 'temp/.last-sync-check':737 'templat':944 'text':390,393 'tier':558,596,617,631 'tier1':191,480 'tier2':208,482 'time':127 'timelin':222,574,607,772,779 'timestamp':164,307,738 'tmp':226 'tool':703,851 'topic-agent-skills' 'topic-agents-md' 'topic-ai-agents' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-developer-tools' 'topic-llm-tools' 'topic-mcp' 'topic-pm-tools' 'topic-product-management' 'topic-productivity' 'type':228,472 'unchang':707 'understand':500 'updat':31,45,67,197,214,221,268,442,474,490,518,554,575,608,637,647,677,725,736,740,766,793,906,981,1012 'use':4,337,700,849,943 'user':121,205,380,644,654,666,757,812 'v1.1':585 'verifi':710 'version':450,456,913,921 'via':137,236 'watch':185,248 'watcher':81,254 'without':804 'write':705 'written':322,825 'xlsx':232,370 'yes':494 'yet':527","prices":[{"id":"938402ba-2a0e-4538-b30d-8e91f2f265f3","listingId":"5335c42e-06b6-4ecc-882e-46129aee93cf","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"rkz91","category":"coco","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:38.693Z"}],"sources":[{"listingId":"5335c42e-06b6-4ecc-882e-46129aee93cf","source":"github","sourceId":"rkz91/coco/doc-sync","sourceUrl":"https://github.com/rkz91/coco/tree/main/skills/doc-sync","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:38.693Z","lastSeenAt":"2026-05-18T19:14:06.595Z"}],"details":{"listingId":"5335c42e-06b6-4ecc-882e-46129aee93cf","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"rkz91","slug":"doc-sync","github":{"repo":"rkz91/coco","stars":7,"topics":["agent-skills","agents-md","ai","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools","mcp","pm-tools","product-management","productivity","prompt-engineering","workflow-automation"],"license":"mit","html_url":"https://github.com/rkz91/coco","pushed_at":"2026-04-26T01:51:27Z","description":"Open-source library of AI superpowers — 59 skills, 34 commands, 10 agents + 24 GSD subagents, 3 system bundles. An entire team, wherever your AI lives. Vendor-neutral across Claude Code, Cursor, Codex, and any AGENTS.md tool.","skill_md_sha":"466d813b83e0ec8ea9de28da18e33e54515e125e","skill_md_path":"skills/doc-sync/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/rkz91/coco/tree/main/skills/doc-sync"},"layout":"multi","source":"github","category":"coco","frontmatter":{"name":"pmstudio-sync","description":"Use when a project has linked documentation artifacts (PRDs, presentations, meeting notes, architecture maps) that must stay synchronized. Detects which source files changed, identifies downstream documents needing updates, reads new content, and proposes specific edits with diffs before applying. Also use when a .sync-report.md exists in the project or user says \"process sync report\"."},"skills_sh_url":"https://skills.sh/rkz91/coco/doc-sync"},"updatedAt":"2026-05-18T19:14:06.595Z"}}