Edge Cloud Sync
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Edge Cloud Sync provides bidirectional synchronization between edge devices and cloud services, handling conflict resolution, offline operation, and data consistency across distributed edge deployments.
Why This Matters
- Data Consistency: 99.9% data consistency across edge and cloud
- Offline Operation: 95%+ uptime during network outages
- Cost Reduction: 60-80% reduction in bandwidth through intelligent sync
- Analytics Quality: Real-time data availability for cloud analytics
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- Edge device data (sensor readings, logs, events)
- Cloud configuration data (configs, firmware, commands)
- Sync configuration (directions, strategies, conflict resolution)
- Entry Conditions:
- Edge devices provisioned and connected
- Cloud storage and services configured
- Network connectivity available (initially)
- Outputs:
- Synced data in cloud storage
- Updated configurations on edge devices
- Sync operation status and metrics
- Artifacts Required (Deliverables):
- Sync engine implementation
- Local database schema
- Conflict resolution logic
- Monitoring and alerting setup
- Acceptance Evidence:
- Sync success rate > 99.5%
- Conflict rate < 0.1%
- Data consistency > 99.9%
- Offline operation > 95% uptime
- Success Criteria:
- Sync success rate > 99.5%
- Conflict rate < 0.1% of sync operations
- Data consistency > 99.9%
- Offline operation > 95% uptime during outages
- Bandwidth efficiency > 80% reduction through delta sync
Skill Composition
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: edge-cloud-sync3description: Edge Cloud Sync provides bidirectional synchronization between edge devices Use when this capability is needed.4---56# Edge Cloud Sync78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Edge Cloud Sync provides bidirectional synchronization between edge devices and cloud services, handling conflict resolution, offline operation, and data consistency across distributed edge deployments.1819## Why This Matters20- **Data Consistency**: 99.9% data consistency across edge and cloud21- **Offline Operation**: 95%+ uptime during network outages22- **Cost Reduction**: 60-80% reduction in bandwidth through intelligent sync23- **Analytics Quality**: Real-time data availability for cloud analytics2425---2627## Core Concepts & Rules2829### 1. Core Principles30- Follow established patterns and conventions31- Maintain consistency across codebase32- Document decisions and trade-offs3334### 2. Implementation Guidelines35- Start with the simplest viable solution36- Iterate based on feedback and requirements37- Test thoroughly before deployment383940## Inputs / Outputs / Contracts41* **Inputs**:42 - Edge device data (sensor readings, logs, events)43 - Cloud configuration data (configs, firmware, commands)44 - Sync configuration (directions, strategies, conflict resolution)45* **Entry Conditions**:46 - Edge devices provisioned and connected47 - Cloud storage and services configured48 - Network connectivity available (initially)49* **Outputs**:50 - Synced data in cloud storage51 - Updated configurations on edge devices52 - Sync operation status and metrics53* **Artifacts Required (Deliverables)**:54 - Sync engine implementation55 - Local database schema56 - Conflict resolution logic57 - Monitoring and alerting setup58* **Acceptance Evidence**:59 - Sync success rate > 99.5%60 - Conflict rate < 0.1%61 - Data consistency > 99.9%62 - Offline operation > 95% uptime63* **Success Criteria**:64 - Sync success rate > 99.5%65 - Conflict rate < 0.1% of sync operations66 - Data consistency > 99.9%67 - Offline operation > 95% uptime during outages68 - Bandwidth efficiency > 80% reduction through delta sync6970## Skill Composition71* **Depends on**: [Differential OTA Updates](../73-iot-fleet-management/differential-ota-updates/SKILL.md), [Fleet Campaign Management](../73-iot-fleet-management/fleet-campaign-management/SKILL.md)72* **Compatible with**: [Edge Observability](../75-edge-computing/edge-observability/SKILL.md), [Edge Security Compliance](../75-edge-computing/edge-security-compliance/SKILL.md)73* **Conflicts with**: None74* **Related Skills**: [Differential OTA Updates](../73-iot-fleet-management/differential-ota-updates/SKILL.md), [Fleet Campaign Management](../73-iot-fleet-management/fleet-campaign-management/SKILL.md)7576---7778## Quick Start / Implementation Example79801. Review requirements and constraints812. Set up development environment823. Implement core functionality following patterns834. Write tests for critical paths845. Run tests and fix issues856. Document any deviations or decisions8687```python88# Example implementation following best practices89def example_function():90 # Your implementation here91 pass92```939495## Assumptions / Constraints / Non-goals9697* **Assumptions**:98 - Development environment is properly configured99 - Required dependencies are available100 - Team has basic understanding of domain101* **Constraints**:102 - Must follow existing codebase conventions103 - Time and resource limitations104 - Compatibility requirements105* **Non-goals**:106 - This skill does not cover edge cases outside scope107 - Not a replacement for formal training108109110## Compatibility & Prerequisites111112* **Supported Versions**:113 - Python 3.8+114 - Node.js 16+115 - Modern browsers (Chrome, Firefox, Safari, Edge)116* **Required AI Tools**:117 - Code editor (VS Code recommended)118 - Testing framework appropriate for language119 - Version control (Git)120* **Dependencies**:121 - Language-specific package manager122 - Build tools123 - Testing libraries124* **Environment Setup**:125 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)126127128## Test Scenario Matrix (QA Strategy)129130| Type | Focus Area | Required Scenarios / Mocks |131| :--- | :--- | :--- |132| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |133| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |134| **E2E** | User Journey | Critical user flows to test |135| **Performance** | Latency / Load | Benchmark requirements |136| **Security** | Vuln / Auth | SAST/DAST or dependency audit |137| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |138139140## Technical Guardrails & Security Threat Model141142### 1. Security & Privacy (Threat Model)143* **Top Threats**: Injection attacks, authentication bypass, data exposure144- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII145- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager146- [ ] **Authorization**: Validate user permissions before state changes147148### 2. Performance & Resources149- [ ] **Execution Efficiency**: Consider time complexity for algorithms150- [ ] **Memory Management**: Use streams/pagination for large data151- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks152153### 3. Architecture & Scalability154- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection155- [ ] **Modularity**: Decouple logic from UI/Frameworks156157### 4. Observability & Reliability158- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`159- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`160- [ ] **Error Handling**: Standardized error codes, no bare except161- [ ] **Observability Artifacts**:162 - **Log Fields**: timestamp, level, message, request_id163 - **Metrics**: request_count, error_count, response_time164 - **Dashboards/Alerts**: High Error Rate > 5%165166167## Agent Directives & Error Recovery168*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*169170- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.171- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.172- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.173- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.174175176## Definition of Done (DoD) Checklist177178- [ ] Tests passed + coverage met179- [ ] Lint/Typecheck passed180- [ ] Logging/Metrics/Trace implemented181- [ ] Security checks passed182- [ ] Documentation/Changelog updated183- [ ] Accessibility/Performance requirements met (if frontend)184185186## Anti-patterns / Pitfalls187188* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries189* ⚠️ **Watch out for**: Common symptoms and quick fixes190* 💡 **Instead**: Use proper error handling, pagination, and logging191192193## Reference Links & Examples194195* Internal documentation and examples196* Official documentation and best practices197* Community resources and discussions198199200## Versioning & Changelog201202* **Version**: 1.0.0203* **Changelog**:204 - 2026-02-22: Initial version with complete template structure205206---207> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.208<!-- tomevault:4.0:skill_md:2026-04-13 -->