[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N7YAGGQZCGDV6EHCSVCKS9":3,"skill-same:01M6N7YAGGQZCGDV6EHCSVCKS9":64},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M6N7YAGGQZCGDV6EHCSVCKS9","mh-cto-sdlc-integration-design",null,"Imad-Oute\u002FMicroHard","Imad-Oute","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F139675528?v=4","01M6N68WHDQ53HQJQ5Y84AGMWX","imad outemgount","01M6N68WP1YPV15H5RTGQHM02G",2,"MIT","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-4-architecture\u002Fmh-cto-sdlc-integration-design\u002FSKILL.md",[],[18,19,20,21,22,23],"design","integration","sdlc","integration design","cto","mh cto sdlc integration design","2026-11-10 10:12:30",false,"---\nname: mh-cto-sdlc-integration-design\ndescription: Integration Design — defines contracts, error behavior, and resilience patterns for every external system integration. For each integration point: what is the contract, what happens when unavailable, and how does the system recover. Run after system-decomp. Trigger phrases: \"integration design\", \"integration contracts\", \"third-party integrations\", \"API contracts\", \"external systems\", \"define integrations\", \"integration patterns\".\nmetadata:\n  author: MicroHard\n  version: 1.0.0\n  phase: 4-architecture\n  module: cto-sdlc\n---\n\n# Integration Design\n\n**Mode: synthesize-first (D34).** Read the system diagram and arch drivers for integration points. Derive contracts and resilience patterns from those inputs. Ask only when a third-party API's behavior cannot be determined from context.\n\n**Elite character:** Every integration is a trust boundary and a failure mode. The question is never \"will this integration fail?\" — it will. The question is \"what does our system do when it fails?\" Systems that have not answered this question are systems that fail silently in production.\n\n**ADR rule (D27):** Write an ADR for integration pattern choices that are hard to reverse and surprising without context — e.g. choosing event-driven over synchronous for a critical integration, choosing a polling strategy over webhooks.\n\n## Step 1 — Load Artifacts\n\nConfirm present:\n\n- System diagram (`system-diagram.md`) ✓ \u002F ✗ — REQUIRED\n- Arch drivers (`arch-drivers.md`) ✓ \u002F ✗ — REQUIRED\n- Constraint inventory (`constraint-inventory.md`) ✓ \u002F ✗\n- Stories referencing external systems ✓ \u002F ✗\n\nMissing system diagram: cannot proceed.\n\n## Step 2 — Enumerate Integration Points\n\nFrom the system diagram, identify every external system:\n\n- Third-party APIs (payment processors, auth providers, email services, analytics)\n- Internal services in separate deployment units\n- Databases as external dependencies (when treated as shared infrastructure)\n- File storage, CDN, or message brokers\n\nFor each integration point:\n\n- **System:** [name and what it does]\n- **Integration direction:** inbound (calls us) \u002F outbound (we call it) \u002F both\n- **Criticality:** critical (core functionality fails without it) \u002F important \u002F optional\n- **Data exchanged:** [what data crosses this boundary in each direction]\n\n## Step 3 — Define Integration Contracts\n\nFor each outbound integration (we call them), define the contract:\n\n**Integration: {system name}**\n\n**Request contract:**\n\n- Method \u002F endpoint \u002F protocol\n- Required inputs (fields, types, constraints)\n- Authentication method\n\n**Response contract:**\n\n- Success shape (fields returned, their types)\n- Error codes (which errors are recoverable, which are terminal)\n- Rate limits or quotas\n\n**Availability SLA:** [their stated uptime — or \"unknown\" if not published]\n\n**Latency characteristic:** [P50 \u002F P99 response time — from their docs or empirical]\n\nFor inbound integrations (they call us), define the webhook\u002Fcallback contract we expose.\n\n## Step 4 — Resilience Pattern Per Integration\n\nFor every **critical** integration, design the failure behavior:\n\n**When unavailable:**\n\n- **Retry strategy:** [none \u002F immediate \u002F exponential backoff with jitter — and max attempts]\n- **Circuit breaker:** [yes \u002F no — and what the open\u002Fhalf-open thresholds are]\n- **Fallback:** [degraded mode the product enters — e.g. \"payment unavailable\" screen, cached data, skip non-critical enrichment]\n- **Queue\u002Fbuffer:** [is the request buffered for later processing, or lost on failure?]\n\n**When slow (latency spike):**\n\n- **Timeout:** [hard timeout value — what is returned to the user if it is exceeded]\n- **Bulkhead:** [does a slow integration starve other system capabilities?]\n\n**Data consistency on partial failure:**\n\n- If the call fails mid-saga (multi-step operation), what is the rollback strategy?\n- Are there compensating transactions needed?\n\n**For non-critical integrations:** document the degraded mode only — no retry\u002Fcircuit-breaker needed.\n\n## Step 5 — Event and Async Pattern Design\n\nFor any integration using events, queues, or webhooks:\n\n**Producer contract:**\n\n- Event name and schema\n- Ordering guarantees (ordered \u002F unordered)\n- At-least-once \u002F exactly-once \u002F at-most-once delivery\n\n**Consumer contract:**\n\n- Idempotency key (what makes a message safe to re-process)\n- Dead letter strategy (what happens to unprocessable messages)\n- Consumer lag tolerance (how far behind can the consumer be before it matters?)\n\nFlag any integration where \"exactly-once processing\" is assumed but not guaranteed — this is a common source of production data corruption.\n\n## Step 6 — Write ADR Entries (D27)\n\nFor integration pattern choices that qualify:\n\nSave to `docs\u002Fadr\u002F000{N}-{slug}.md`. Scan for current highest number.\n\nCandidates: choice of synchronous vs. event-driven for a critical integration, choice of saga vs. distributed transaction, choice of polling vs. webhook, choice of circuit breaker implementation.\n\n## Step 7 — Write Output\n\nSave to `_mh-output\u002Fcto\u002Fsdlc\u002Fintegration-design\u002F{YYYY-MM-DD}_{r###}_integration-contracts.md`:\n\n```markdown\n# Integration Contracts\n\n**Product:** {name}\n**Date:** {date}\n\n---\n\n## Integration Inventory\n\n| System | Direction                 | Criticality                     | Auth Method |\n| ------ | ------------------------- | ------------------------------- | ----------- |\n| {name} | outbound \u002F inbound \u002F both | critical \u002F important \u002F optional | {method}    |\n\n## Contract Definitions\n\n### {Integration Name}\n\n**Request:** {method, endpoint, required inputs}\n**Response:** {success shape, error codes}\n**Availability SLA:** {their SLA or unknown}\n**Latency:** {P99 characteristic}\n\n**Failure behavior:**\n\n- When unavailable: {retry strategy + fallback}\n- When slow: {timeout value + bulkhead strategy}\n- Data consistency: {rollback \u002F compensating transaction \u002F none needed}\n\n{Repeat for each integration}\n\n## Event \u002F Async Contracts\n\n{For each async integration — producer contract, consumer contract, idempotency key}\n\n## Integration Risk Register\n\n| Integration | Risk           | Severity         | Mitigation |\n| ----------- | -------------- | ---------------- | ---------- |\n| {name}      | {failure mode} | High \u002F Med \u002F Low | {pattern}  |\n\n## ADRs Written\n\n{List of ADR files created}\n```\n\n## Step 8 — Present Summary\n\n**Integration Design complete.** {N} integrations defined: {N} critical, {N} important, {N} optional.\n\n**Resilience patterns:**\n\n- Circuit breakers: {N} integrations\n- Async\u002Fbuffered: {N} integrations\n- Degraded-mode fallbacks: {N} integrations\n\n**Risks flagged:** {N} integration risks to address in Phase 5 contract tests.\n\n**Next step:** Run `\u002Fmh-cto-sdlc-observability-design` and `\u002Fmh-cto-sdlc-security-arch` (can overlap after system-decomp is done).\n","# Integration Design\n\n**Mode: synthesize-first (D34).** Read the system diagram and arch drivers for integration points. Derive contracts and resilience patterns from those inputs. Ask only when a third-party API's behavior cannot be determined from context.\n\n**Elite character:** Every integration is a trust boundary and a failure mode. The question is never \"will this integration fail?\" — it will. The question is \"what does our system do when it fails?\" Systems that have not answered this question are systems that fail silently in production.\n\n**ADR rule (D27):** Write an ADR for integration pattern choices that are hard to reverse and surprising without context — e.g. choosing event-driven over synchronous for a critical integration, choosing a polling strategy over webhooks.\n\n## Step 1 — Load Artifacts\n\nConfirm present:\n\n- System diagram (`system-diagram.md`) ✓ \u002F ✗ — REQUIRED\n- Arch drivers (`arch-drivers.md`) ✓ \u002F ✗ — REQUIRED\n- Constraint inventory (`constraint-inventory.md`) ✓ \u002F ✗\n- Stories referencing external systems ✓ \u002F ✗\n\nMissing system diagram: cannot proceed.\n\n## Step 2 — Enumerate Integration Points\n\nFrom the system diagram, identify every external system:\n\n- Third-party APIs (payment processors, auth providers, email services, analytics)\n- Internal services in separate deployment units\n- Databases as external dependencies (when treated as shared infrastructure)\n- File storage, CDN, or message brokers\n\nFor each integration point:\n\n- **System:** [name and what it does]\n- **Integration direction:** inbound (calls us) \u002F outbound (we call it) \u002F both\n- **Criticality:** critical (core functionality fails without it) \u002F important \u002F optional\n- **Data exchanged:** [what data crosses this boundary in each direction]\n\n## Step 3 — Define Integration Contracts\n\nFor each outbound integration (we call them), define the contract:\n\n**Integration: {system name}**\n\n**Request contract:**\n\n- Method \u002F endpoint \u002F protocol\n- Required inputs (fields, types, constraints)\n- Authentication method\n\n**Response contract:**\n\n- Success shape (fields returned, their types)\n- Error codes (which errors are recoverable, which are terminal)\n- Rate limits or quotas\n\n**Availability SLA:** [their stated uptime — or \"unknown\" if not published]\n\n**Latency characteristic:** [P50 \u002F P99 response time — from their docs or empirical]\n\nFor inbound integrations (they call us), define the webhook\u002Fcallback contract we expose.\n\n## Step 4 — Resilience Pattern Per Integration\n\nFor every **critical** integration, design the failure behavior:\n\n**When unavailable:**\n\n- **Retry strategy:** [none \u002F immediate \u002F exponential backoff with jitter — and max attempts]\n- **Circuit breaker:** [yes \u002F no — and what the open\u002Fhalf-open thresholds are]\n- **Fallback:** [degraded mode the product enters — e.g. \"payment unavailable\" screen, cached data, skip non-critical enrichment]\n- **Queue\u002Fbuffer:** [is the request buffered for later processing, or lost on failure?]\n\n**When slow (latency spike):**\n\n- **Timeout:** [hard timeout value — what is returned to the user if it is exceeded]\n- **Bulkhead:** [does a slow integration starve other system capabilities?]\n\n**Data consistency on partial failure:**\n\n- If the call fails mid-saga (multi-step operation), what is the rollback strategy?\n- Are there compensating transactions needed?\n\n**For non-critical integrations:** document the degraded mode only — no retry\u002Fcircuit-breaker needed.\n\n## Step 5 — Event and Async Pattern Design\n\nFor any integration using events, queues, or webhooks:\n\n**Producer contract:**\n\n- Event name and schema\n- Ordering guarantees (ordered \u002F unordered)\n- At-least-once \u002F exactly-once \u002F at-most-once delivery\n\n**Consumer contract:**\n\n- Idempotency key (what makes a message safe to re-process)\n- Dead letter strategy (what happens to unprocessable messages)\n- Consumer lag tolerance (how far behind can the consumer be before it matters?)\n\nFlag any integration where \"exactly-once processing\" is assumed but not guaranteed — this is a common source of production data corruption.\n\n## Step 6 — Write ADR Entries (D27)\n\nFor integration pattern choices that qualify:\n\nSave to `docs\u002Fadr\u002F000{N}-{slug}.md`. Scan for current highest number.\n\nCandidates: choice of synchronous vs. event-driven for a critical integration, choice of saga vs. distributed transaction, choice of polling vs. webhook, choice of circuit breaker implementation.\n\n## Step 7 — Write Output\n\nSave to `_mh-output\u002Fcto\u002Fsdlc\u002Fintegration-design\u002F{YYYY-MM-DD}_{r###}_integration-contracts.md`:\n\n```markdown\n# Integration Contracts\n\n**Product:** {name}\n**Date:** {date}\n\n---\n\n## Integration Inventory\n\n| System | Direction                 | Criticality                     | Auth Method |\n| ------ | ------------------------- | ------------------------------- | ----------- |\n| {name} | outbound \u002F inbound \u002F both | critical \u002F important \u002F optional | {method}    |\n\n## Contract Definitions\n\n### {Integration Name}\n\n**Request:** {method, endpoint, required inputs}\n**Response:** {success shape, error codes}\n**Availability SLA:** {their SLA or unknown}\n**Latency:** {P99 characteristic}\n\n**Failure behavior:**\n\n- When unavailable: {retry strategy + fallback}\n- When slow: {timeout value + bulkhead strategy}\n- Data consistency: {rollback \u002F compensating transaction \u002F none needed}\n\n{Repeat for each integration}\n\n## Event \u002F Async Contracts\n\n{For each async integration — producer contract, consumer contract, idempotency key}\n\n## Integration Risk Register\n\n| Integration | Risk           | Severity         | Mitigation |\n| ----------- | -------------- | ---------------- | ---------- |\n| {name}      | {failure mode} | High \u002F Med \u002F Low | {pattern}  |\n\n## ADRs Written\n\n{List of ADR files created}\n```\n\n## Step 8 — Present Summary\n\n**Integration Design complete.** {N} integrations defined: {N} critical, {N} important, {N} optional.\n\n**Resilience patterns:**\n\n- Circuit breakers: {N} integrations\n- Async\u002Fbuffered: {N} integrations\n- Degraded-mode fallbacks: {N} integrations\n\n**Risks flagged:** {N} integration risks to address in Phase 5 contract tests.\n\n**Next step:** Run `\u002Fmh-cto-sdlc-observability-design` and `\u002Fmh-cto-sdlc-security-arch` (can overlap after system-decomp is done).\n",{},"main","2ec3bbf5ba353f3fdd2c6d842b791fd75d08a635","src\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-4-architecture\u002Fmh-cto-sdlc-integration-design",0,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard","https:\u002F\u002Fgithub.com\u002FImad-Oute","https:\u002F\u002Fimad369.vercel.app\u002F","I'm just starting my Journey.","2026-05-13 03:02:22",{"source":7,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-integration-design",{"tool":44,"command":45},"bunx","bunx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-integration-design",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-integration-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-4-architecture\u002Fmh-cto-sdlc-integration-design\u002FSKILL.md",true,[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"customize.toml","OTHER","其他",614,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-4-architecture\u002Fmh-cto-sdlc-integration-design\u002Fcustomize.toml",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"mh-skill-manifest.yaml","REFERENCE","参考文档",558,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-4-architecture\u002Fmh-cto-sdlc-integration-design\u002Fmh-skill-manifest.yaml",[65,92,109,123,140,157],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":24},"01M6N8JYRPSHVW4Y76X5SAGRDX","mh-vo-vault-brief","Weekly vault intelligence report — health score, pipeline status, OS alignment, and top issues. Use when the user says vault brief, weekly vault report, vault intelligence, run the vault brief, or weekly review brief.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F5-report\u002Fmh-vo-vault-brief\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"mh vo vault brief","brief","vault","intelligence report","top","weekly","os","pipeline","health","issues","report","run","status","review","weekly review","user","use","pipeline status","alignment","intelligence",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":24},"01M6N8JCK7E7Y19940RBB51R96","mh-vo-output-bridge","Scan _mh-output\u002F for new artifacts and create or update corresponding vault entries. Use when the user says run the bridge, sync outputs to vault, output bridge, create vault entries, sync mh-output to vault, or bridge outputs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F4-bridge\u002Fmh-vo-output-bridge\u002FSKILL.md",[],[99,100,101,74,102,103,83,104,105,106,87,107,108,88],"bridge","output","mh vo output bridge","artifacts","update","create","sync","for","entries","scan",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":24},"01M6N8HXW3ENQ939C93R59W371","mh-vo-moc-builder","Create or update Maps of Content for vault sections and ensure every note is reachable from a MOC. Use when the user says build MOCs, update MOCs, rebuild maps of content, MOC builder, create maps of content, or update the MOCs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-moc-builder\u002FSKILL.md",[],[116,117,106,118,119,120,121,104,88,74,122,103,87],"builder","mh vo moc builder","note","build","rebuild","maps","content",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":24},"01M6N8HHZ30706B2ZS33X3MR42","mh-vo-link-architect","Identify missing vault connections and generate precise link recommendations. Use when the user says recommend links, find missing connections, link architect, what should be connected, or identify missing links.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-link-architect\u002FSKILL.md",[],[130,131,132,87,133,134,135,136,137,88,138,74,139],"mh vo link architect","link","architect","recommend","links","missing","recommendations","connections","find","generate",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":24},"01M6N8H6FKWGTNFWS5PTPPTEN0","mh-vo-base-builder","Generate Obsidian Bases (.base files) for live database views of vault data. Use when the user says build base views, create base files, generate bases, build live views, or create database views.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-base-builder\u002FSKILL.md",[],[147,148,149,116,74,150,151,152,139,104,153,87,106,154,119,155,156,88],"mh vo base builder","base builder","base","obsidian bases","data","database","obsidian","live","files","bases",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":24},"01M6N8GSRETQW3B9C843F1S1CP","mh-vo-taxonomy-enforcer","Audit vault tags and frontmatter, find drift, and apply corrections. Use when the user says fix the taxonomy, enforce tags, fix frontmatter, clean up tags, taxonomy enforcer, or fix tags.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F2-route\u002Fmh-vo-taxonomy-enforcer\u002FSKILL.md",[],[164,165,166,167,168,169,170,171,172,173,88,174,87,138,74,175],"mh vo taxonomy enforcer","taxonomy","enforce","apply","frontmatter","tags","drift","clean","vault tags","up","fix","audit"]