[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74B2D46H8FJV98DVZTZDYZX":3,"skill-same:01M74B2D46H8FJV98DVZTZDYZX":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M74B2D46H8FJV98DVZTZDYZX","cross-reference-integrity",null,"Cross-Reference Integrity","CarlosCaPe\u002Foctorato","CarlosCaPe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39838249?v=4","01M72WXX4ZRR8MBH1EP1QND2FQ","dataqbs","01M72WXX5NA7YCKRSJ54GW1GQ8",18,"MIT","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fcross-reference-integrity\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: cross-reference-integrity\ndescription: \"Cross-Reference Integrity\"\nmetadata:\n  short-description: \"Cross-Reference Integrity\"\n  original-index: 39\n---\n\n# Cross-Reference Integrity\n\n## What\n\nA systematic approach to managing internal document references (section numbers, finding numbers, evidence numbers, line numbers) that prevents reference rot and orphan links as documents evolve.\n\n## Why\n\nCross-references are the **hyperlinks of technical documents**. When they break:\n- Readers lose trust in the document's accuracy\n- Critical connections between evidence and conclusions become invisible\n- Reviewers waste time hunting for referenced content\n- Wrong decisions get made based on mislinked data\n\nReference rot accelerates as documents grow. A 500-line document might have 20 cross-references. A 3,000-line document might have 200+. Manual tracking becomes impossible.\n\n## Reference Types and Vulnerabilities\n\n| Reference Type | Pattern | Vulnerability | Example |\n|----------------|---------|---------------|---------|\n| Section reference | `§X.Y`, `Section X.Y` | Breaks when sections renumbered | \"See §2.4.2 for details\" |\n| Finding reference | `Finding #N`, `#N` | Breaks when findings reordered | \"Confirmed by Finding #35\" |\n| Evidence reference | `Evidence #N` | Breaks when evidence list changes | \"Source: Evidence #12\" |\n| Line reference | `line N`, `lines N-M` | Breaks on any edit above that line | \"See line 450\" |\n| Named anchor | `Appendix A Q7` | Stable if naming consistent | \"Answered in Appendix A Q7\" |\n\n**Stability ranking** (most to least stable):\n1. Named anchors (survive most edits)\n2. Finding\u002FEvidence numbers (survive structural changes)\n3. Section numbers (break on outline changes)\n4. Line numbers (break on any edit)\n\n## How\n\n### Reference Inventory\n\nBefore major edits, inventory all references:\n\n```bash\n# Extract all section references\ngrep -oE '§[0-9]+(\\.[0-9]+)*' document.md | sort | uniq -c\n\n# Extract all finding references  \ngrep -oE 'Finding #[0-9]+|#[0-9]+' document.md | sort | uniq -c\n\n# Extract all evidence references\ngrep -oE 'Evidence #[0-9]+' document.md | sort | uniq -c\n\n# Extract potential line references\ngrep -oE 'line[s]? [0-9]+' document.md\n```\n\n### Validation Matrix\n\nCreate a validation matrix for critical documents:\n\n```markdown\n| Reference | Target Exists? | Target Content Matches? | Used In |\n|-----------|----------------|------------------------|---------|\n| §2.5.2 | ✅ | ✅ SP inventory table | §6.4, Exec Summary |\n| Finding #35 | ✅ | ✅ Hospital pipeline failures | §6.3, Charter row 5 |\n| Evidence #12 | ✅ | ✅ Lincoln's charter PDF | Charter Traceability |\n```\n\n### Structural Change Protocol\n\nWhen renumbering sections or reordering content:\n\n1. **Before change**: Export all references to a temp file\n2. **Make change**: Perform the structural modification\n3. **After change**: Search-and-replace all affected references\n4. **Verify**: Re-run reference inventory, compare to original\n\n```bash\n# Example: Section 2.4 becomes 2.5\nsed -i 's\u002F§2\\.4\u002F§2.5\u002Fg; s\u002F§2\\.5\u002F§2.6\u002Fg; s\u002F§2\\.6\u002F§2.7\u002Fg' document.md\n# WARNING: Order matters! Work backwards to avoid collisions\n```\n\n### Bidirectional Reference Tracking\n\nFor critical references, track both directions:\n\n```markdown\n## §6.4 Domain Migration Roadmap\n\n**Referenced by:** Charter Traceability row 6, Executive Summary, §3.6.3\n**References:** §2.5.2 (SP counts), §3.1 (criteria matrix), §3.4 (risk), Finding #28 (cross-DB)\n```\n\nThis makes it visible which sections need updating when either end changes.\n\n## Reference Patterns by Document Type\n\n| Document Type | Primary Reference Style | Rationale |\n|---------------|------------------------|-----------|\n| TDD \u002F RFC | Section numbers + Finding numbers | Formal structure, evidence-backed |\n| Runbook | Named anchors + step numbers | Execution sequence matters |\n| API Docs | Named anchors + code refs | Stability across versions |\n| Audit Report | Finding numbers + Evidence numbers | Traceability chain critical |\n\n## When to Use\n\n- **Always** when document exceeds 500 lines\n- **Always** when document has >20 cross-references\n- **Always** before finalizing a decision document\n- **Always** after merging branches that touch same document\n- **Critical** when references link evidence to conclusions\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Solution |\n|--------------|---------|----------|\n| Line number references | Break on any edit | Use section\u002Ffinding numbers instead |\n| Implicit references | \"See above\" — where exactly? | Use explicit section numbers |\n| Stale reference comments | `\u002F\u002F See §4.2 (MOVED TO §5.1)` | Update the reference, remove comment |\n| Reference-free claims | \"As confirmed earlier...\" — where? | Add explicit Finding # or § reference |\n| Copy-paste references | Same §2.4.2 appears 15 times, section renamed | Search-replace systematically |\n\n## Automation Helpers\n\n### Node.js Reference Validator\n\n```javascript\nconst fs = require('fs');\nconst doc = fs.readFileSync('document.md', 'utf8');\n\n\u002F\u002F Extract all section references\nconst sectionRefs = doc.match(\u002F§\\d+(\\.\\d+)*\u002Fg) || [];\n\n\u002F\u002F Extract all section headers\nconst sectionHeaders = doc.match(\u002F^#{1,6}\\s+\\d+(\\.\\d+)*\\s\u002Fgm) || [];\nconst definedSections = sectionHeaders.map(h => h.match(\u002F\\d+(\\.\\d+)*\u002F)[0]);\n\n\u002F\u002F Find orphan references\nconst orphans = sectionRefs.filter(ref => {\n  const num = ref.replace('§', '');\n  return !definedSections.some(s => s.startsWith(num));\n});\n\nconsole.log('Potentially orphaned references:', [...new Set(orphans)]);\n```\n\n### Grep-Based Quick Check\n\n```bash\n# Find all unique section references\ngrep -oE '§[0-9.]+' doc.md | sort -u > refs.txt\n\n# Find all section headers\ngrep -oE '^#{1,4} [0-9.]+' doc.md | sed 's\u002F^#* \u002F§\u002F' | sort -u > headers.txt\n\n# Show references without matching headers\ncomm -23 refs.txt headers.txt\n```\n\n## Real-World Example\n\nFrom the Acme Corp TDD session:\n\n**Scenario:** Added new §6 Charter Deliverables section (366 lines) between existing content.\n\n**Reference Impact:**\n- Charter Traceability table needed 7 references updated (§6.1–§6.6)\n- Closing note needed update to mention \"all 8 deliverables\"\n- No section renumbering required (§6 was empty, Part Two remained Part Two)\n\n**Verification:** Node.js script checked all 8 traceability rows showed ✅ with valid §6.x references.\n\n## Related Skills\n\n- `38_document_semantic_coherence.md` — Overall coherence discipline\n- `14_research_checklist_discipline.md` — Verification before claiming done\n- `11_gap_analysis_pattern.md` — Finding what's missing before acting\n","# Cross-Reference Integrity\n\n## What\n\nA systematic approach to managing internal document references (section numbers, finding numbers, evidence numbers, line numbers) that prevents reference rot and orphan links as documents evolve.\n\n## Why\n\nCross-references are the **hyperlinks of technical documents**. When they break:\n- Readers lose trust in the document's accuracy\n- Critical connections between evidence and conclusions become invisible\n- Reviewers waste time hunting for referenced content\n- Wrong decisions get made based on mislinked data\n\nReference rot accelerates as documents grow. A 500-line document might have 20 cross-references. A 3,000-line document might have 200+. Manual tracking becomes impossible.\n\n## Reference Types and Vulnerabilities\n\n| Reference Type | Pattern | Vulnerability | Example |\n|----------------|---------|---------------|---------|\n| Section reference | `§X.Y`, `Section X.Y` | Breaks when sections renumbered | \"See §2.4.2 for details\" |\n| Finding reference | `Finding #N`, `#N` | Breaks when findings reordered | \"Confirmed by Finding #35\" |\n| Evidence reference | `Evidence #N` | Breaks when evidence list changes | \"Source: Evidence #12\" |\n| Line reference | `line N`, `lines N-M` | Breaks on any edit above that line | \"See line 450\" |\n| Named anchor | `Appendix A Q7` | Stable if naming consistent | \"Answered in Appendix A Q7\" |\n\n**Stability ranking** (most to least stable):\n1. Named anchors (survive most edits)\n2. Finding\u002FEvidence numbers (survive structural changes)\n3. Section numbers (break on outline changes)\n4. Line numbers (break on any edit)\n\n## How\n\n### Reference Inventory\n\nBefore major edits, inventory all references:\n\n```bash\n# Extract all section references\ngrep -oE '§[0-9]+(\\.[0-9]+)*' document.md | sort | uniq -c\n\n# Extract all finding references  \ngrep -oE 'Finding #[0-9]+|#[0-9]+' document.md | sort | uniq -c\n\n# Extract all evidence references\ngrep -oE 'Evidence #[0-9]+' document.md | sort | uniq -c\n\n# Extract potential line references\ngrep -oE 'line[s]? [0-9]+' document.md\n```\n\n### Validation Matrix\n\nCreate a validation matrix for critical documents:\n\n```markdown\n| Reference | Target Exists? | Target Content Matches? | Used In |\n|-----------|----------------|------------------------|---------|\n| §2.5.2 | ✅ | ✅ SP inventory table | §6.4, Exec Summary |\n| Finding #35 | ✅ | ✅ Hospital pipeline failures | §6.3, Charter row 5 |\n| Evidence #12 | ✅ | ✅ Lincoln's charter PDF | Charter Traceability |\n```\n\n### Structural Change Protocol\n\nWhen renumbering sections or reordering content:\n\n1. **Before change**: Export all references to a temp file\n2. **Make change**: Perform the structural modification\n3. **After change**: Search-and-replace all affected references\n4. **Verify**: Re-run reference inventory, compare to original\n\n```bash\n# Example: Section 2.4 becomes 2.5\nsed -i 's\u002F§2\\.4\u002F§2.5\u002Fg; s\u002F§2\\.5\u002F§2.6\u002Fg; s\u002F§2\\.6\u002F§2.7\u002Fg' document.md\n# WARNING: Order matters! Work backwards to avoid collisions\n```\n\n### Bidirectional Reference Tracking\n\nFor critical references, track both directions:\n\n```markdown\n## §6.4 Domain Migration Roadmap\n\n**Referenced by:** Charter Traceability row 6, Executive Summary, §3.6.3\n**References:** §2.5.2 (SP counts), §3.1 (criteria matrix), §3.4 (risk), Finding #28 (cross-DB)\n```\n\nThis makes it visible which sections need updating when either end changes.\n\n## Reference Patterns by Document Type\n\n| Document Type | Primary Reference Style | Rationale |\n|---------------|------------------------|-----------|\n| TDD \u002F RFC | Section numbers + Finding numbers | Formal structure, evidence-backed |\n| Runbook | Named anchors + step numbers | Execution sequence matters |\n| API Docs | Named anchors + code refs | Stability across versions |\n| Audit Report | Finding numbers + Evidence numbers | Traceability chain critical |\n\n## When to Use\n\n- **Always** when document exceeds 500 lines\n- **Always** when document has >20 cross-references\n- **Always** before finalizing a decision document\n- **Always** after merging branches that touch same document\n- **Critical** when references link evidence to conclusions\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Solution |\n|--------------|---------|----------|\n| Line number references | Break on any edit | Use section\u002Ffinding numbers instead |\n| Implicit references | \"See above\" — where exactly? | Use explicit section numbers |\n| Stale reference comments | `\u002F\u002F See §4.2 (MOVED TO §5.1)` | Update the reference, remove comment |\n| Reference-free claims | \"As confirmed earlier...\" — where? | Add explicit Finding # or § reference |\n| Copy-paste references | Same §2.4.2 appears 15 times, section renamed | Search-replace systematically |\n\n## Automation Helpers\n\n### Node.js Reference Validator\n\n```javascript\nconst fs = require('fs');\nconst doc = fs.readFileSync('document.md', 'utf8');\n\n\u002F\u002F Extract all section references\nconst sectionRefs = doc.match(\u002F§\\d+(\\.\\d+)*\u002Fg) || [];\n\n\u002F\u002F Extract all section headers\nconst sectionHeaders = doc.match(\u002F^#{1,6}\\s+\\d+(\\.\\d+)*\\s\u002Fgm) || [];\nconst definedSections = sectionHeaders.map(h => h.match(\u002F\\d+(\\.\\d+)*\u002F)[0]);\n\n\u002F\u002F Find orphan references\nconst orphans = sectionRefs.filter(ref => {\n  const num = ref.replace('§', '');\n  return !definedSections.some(s => s.startsWith(num));\n});\n\nconsole.log('Potentially orphaned references:', [...new Set(orphans)]);\n```\n\n### Grep-Based Quick Check\n\n```bash\n# Find all unique section references\ngrep -oE '§[0-9.]+' doc.md | sort -u > refs.txt\n\n# Find all section headers\ngrep -oE '^#{1,4} [0-9.]+' doc.md | sed 's\u002F^#* \u002F§\u002F' | sort -u > headers.txt\n\n# Show references without matching headers\ncomm -23 refs.txt headers.txt\n```\n\n## Real-World Example\n\nFrom the Acme Corp TDD session:\n\n**Scenario:** Added new §6 Charter Deliverables section (366 lines) between existing content.\n\n**Reference Impact:**\n- Charter Traceability table needed 7 references updated (§6.1–§6.6)\n- Closing note needed update to mention \"all 8 deliverables\"\n- No section renumbering required (§6 was empty, Part Two remained Part Two)\n\n**Verification:** Node.js script checked all 8 traceability rows showed ✅ with valid §6.x references.\n\n## Related Skills\n\n- `38_document_semantic_coherence.md` — Overall coherence discipline\n- `14_research_checklist_discipline.md` — Verification before claiming done\n- `11_gap_analysis_pattern.md` — Finding what's missing before acting\n",{"name":5,"metadata":24,"description":7},{"original-index":25,"short-description":7},39,"master","b4414608cd5a3f87d1525b518f1c6add8363540d","skills\u002Fcross-reference-integrity",6,"https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato","https:\u002F\u002Fwww.dataqbs.com\u002Foctorato","https:\u002F\u002Fgithub.com\u002FCarlosCaPe","www.dataqbs.com"," AI-powered data engineering\r\n& consulting\r\n\r\nWe build data platforms that turn complexity into clarity — from cloud architecture and ETL pipelines to AI-driven","2026-11-14 00:21:00",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add CarlosCaPe\u002Foctorato --skill cross-reference-integrity",{"tool":42,"command":43},"bunx","bunx skills add CarlosCaPe\u002Foctorato --skill cross-reference-integrity",{"tool":45,"command":46},"pnpm","pnpm dlx skills add CarlosCaPe\u002Foctorato --skill cross-reference-integrity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fcross-reference-integrity\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"skill.json","REFERENCE","参考文档",149,"https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fcross-reference-integrity\u002Fskill.json",[57,66,74,81,89,97],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M74EVAA4A4B4AKR5TT732GP4","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M74EV4WMRDKP2NQS4YWR8PXH","wrangler","Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwrangler\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwrangler\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M74EV05MHTXKEXD4B2QJEYTF","workspace-skill-discovery","Discover and include ALL skills across the workspace — not just global ones. Use at the start of every session or when the user asks about available skills. Ensures project-level skills (under .claude\u002Fskills\u002F or skills\u002F in any repo) are never missed.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkspace-skill-discovery\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M74ETV78525B4VP2F28Z6NRD","workers-best-practices","Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkers-best-practices\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M74ETR75NF67WGVEN7288ACV","winui-app","Create, build and design WinUI 3 desktop apps with C# and the Windows App SDK following Microsoft's official guidance and CommunityToolkit. Covers XAML, navigation, theming, accessibility and deployment.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwinui-app\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwinui-app\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74ETJFRNPPNSQZ36C6HD6CW","windows-brain-script-portability","Scripts in ~\u002F.claude\u002Fscripts\u002F that run on a Windows brain: use the python3.cmd shim and not bare python3, and reconfigure stdout to UTF-8 if you print symbols. Use it when writing a brain script or triaging a Windows-only crash.","https:\u002F\u002Fgithub.com\u002FCarlosCaPe\u002Foctorato\u002Fblob\u002Fmaster\u002Fskills\u002Fwindows-brain-script-portability\u002FSKILL.md",[],[]]