/install lovefromio-continuous-learning
\r \r
Continuous Learning for Construction Automation\r
\r This skill enables automatic extraction of valuable patterns, solutions, and best practices from construction automation sessions to build institutional knowledge.\r \r
When to Use\r
\r Activate this skill:\r
- At the end of complex estimation sessions\r
- After solving non-trivial data processing problems\r
- When discovering new integration patterns\r
- After completing successful document processing\r
- When developing new automation workflows\r \r
Pattern Extraction Framework\r
\r
1. Session Analysis\r
\r
class ConstructionSessionAnalyzer:\r
"""Extract learnings from automation sessions"""\r
\r
# Categories of learnable patterns\r
PATTERN_CATEGORIES = [\r
'data_processing', # Data transformation patterns\r
'estimation', # Cost estimation techniques\r
'scheduling', # Schedule optimization patterns\r
'integration', # API/system integration patterns\r
'document_processing', # Document handling patterns\r
'quality_assurance', # Validation and QA patterns\r
'error_handling', # Error resolution patterns\r
'optimization' # Performance optimization patterns\r
]\r
\r
def analyze_session(self, session_log: list) -> dict:\r
"""Extract patterns from session history"""\r
\r
patterns = {\r
'successful_solutions': [],\r
'error_resolutions': [],\r
'optimization_discoveries': [],\r
'integration_patterns': [],\r
'reusable_code': [],\r
'decision_rationales': []\r
}\r
\r
for entry in session_log:\r
if self._is_solution(entry):\r
patterns['successful_solutions'].append(\r
self._extract_solution_pattern(entry)\r
)\r
\r
if self._is_error_resolution(entry):\r
patterns['error_resolutions'].append(\r
self._extract_error_pattern(entry)\r
)\r
\r
if self._is_optimization(entry):\r
patterns['optimization_discoveries'].append(\r
self._extract_optimization(entry)\r
)\r
\r
return patterns\r
```\r
\r
### 2. Knowledge Categories for Construction\r
\r
#### 2.1 Cost Estimation Patterns\r
\r
```yaml\r
# Example learned pattern\r
pattern:\r
name: "electrical_cost_adjustment_pattern"\r
category: "estimation"\r
context: "When estimating electrical work for high-rise buildings"\r
problem: "Standard rates don't account for vertical transportation costs"\r
solution: |\r
Apply height factor multiplier:\r
- Floors 1-5: 1.0x base rate\r
- Floors 6-15: 1.15x base rate\r
- Floors 16-30: 1.25x base rate\r
- Floors 30+: 1.35x base rate\r
confidence: 0.85\r
source_sessions: ["session_2026_01_15", "session_2026_01_20"]\r
validations: 3\r
```\r
\r
#### 2.2 BIM Data Processing Patterns\r
\r
```yaml\r
pattern:\r
name: "revit_level_extraction"\r
category: "data_processing"\r
context: "Extracting elements by level from Revit exports"\r
problem: "Elements sometimes missing level association"\r
solution: |\r
1. First check 'Level' parameter\r
2. If missing, check 'Reference Level' parameter\r
3. If still missing, derive from bounding box Z coordinate\r
4. Map Z ranges to known level elevations\r
code_snippet: |\r
def get_element_level(element: dict, levels: list) -> str:\r
# Direct level parameter\r
if level := element.get('Level'):\r
return level\r
\r
# Reference level fallback\r
if ref_level := element.get('Reference Level'):\r
return ref_level\r
\r
# Derive from geometry\r
z_coord = element['BoundingBox']['Min']['Z']\r
return find_nearest_level(z_coord, levels)\r
confidence: 0.92\r
```\r
\r
#### 2.3 Integration Patterns\r
\r
```yaml\r
pattern:\r
name: "procore_rate_limit_handling"\r
category: "integration"\r
context: "Syncing data with Procore API"\r
problem: "API returns 429 Too Many Requests during bulk operations"\r
solution: |\r
Implement exponential backoff with jitter:\r
1. Initial delay: 1 second\r
2. Multiply by 2 on each retry\r
3. Add random jitter (0-500ms)\r
4. Max retries: 5\r
5. Max delay: 32 seconds\r
code_snippet: |\r
async def procore_request_with_retry(url, data):\r
delay = 1\r
for attempt in range(5):\r
try:\r
response = await procore_api.post(url, data)\r
return response\r
except RateLimitError:\r
jitter = random.uniform(0, 0.5)\r
await asyncio.sleep(delay + jitter)\r
delay *= 2\r
raise MaxRetriesExceeded()\r
confidence: 0.95\r
```\r
\r
#### 2.4 Error Resolution Patterns\r
\r
```yaml\r
pattern:\r
name: "cwicr_no_match_resolution"\r
category: "error_handling"\r
context: "CWICR semantic search returns no relevant matches"\r
problem: "Query too specific or uses non-standard terminology"\r
solution: |\r
Resolution steps:\r
1. Simplify query to core concepts\r
2. Remove brand names and specifications\r
3. Try alternative terminology (US vs UK terms)\r
4. Expand search to parent category\r
5. If still no match, flag for manual mapping\r
examples:\r
- original: "Kohler K-4519 wall-mounted water closet"\r
simplified: "wall mounted toilet"\r
- original: "Lutron Caseta wireless dimmer switch"\r
simplified: "dimmer switch"\r
confidence: 0.88\r
```\r
\r
### 3. Learning Pipeline\r
\r
```python\r
class ConstructionLearningPipeline:\r
"""Continuous learning pipeline for construction automation"""\r
\r
def __init__(self, knowledge_base_path: str):\r
self.kb_path = knowledge_base_path\r
self.patterns = self._load_patterns()\r
\r
def learn_from_session(self, session: dict) -> list:\r
"""Extract and store learnings from session"""\r
\r
# Analyze session\r
analyzer = ConstructionSessionAnalyzer()\r
new_patterns = analyzer.analyze_session(session['log'])\r
\r
# Validate patterns\r
validated = []\r
for pattern in new_patterns['successful_solutions']:\r
if self._validate_pattern(pattern):\r
# Check if similar pattern exists\r
existing = self._find_similar_pattern(pattern)\r
if existing:\r
# Reinforce existing pattern\r
self._reinforce_pattern(existing, pattern)\r
else:\r
# Add new pattern\r
self._add_pattern(pattern)\r
validated.append(pattern)\r
\r
# Persist to knowledge base\r
self._save_patterns()\r
\r
return validated\r
\r
def apply_learnings(self, context: dict) -> list:\r
"""Retrieve relevant patterns for current context"""\r
\r
relevant_patterns = []\r
\r
for pattern in self.patterns:\r
similarity = self._calculate_similarity(pattern['context'], context)\r
if similarity > 0.7:\r
relevant_patterns.append({\r
'pattern': pattern,\r
'relevance': similarity\r
})\r
\r
return sorted(relevant_patterns, key=lambda x: x['relevance'], reverse=True)\r
\r
def _validate_pattern(self, pattern: dict) -> bool:\r
"""Validate pattern before adding to knowledge base"""\r
\r
# Check minimum confidence\r
if pattern.get('confidence', 0) \x3C 0.6:\r
return False\r
\r
# Check for code quality (if code snippet)\r
if code := pattern.get('code_snippet'):\r
if not self._is_valid_code(code):\r
return False\r
\r
# Check for completeness\r
required_fields = ['name', 'category', 'context', 'solution']\r
if not all(f in pattern for f in required_fields):\r
return False\r
\r
return True\r
```\r
\r
### 4. Knowledge Base Structure\r
\r
```\r
knowledge_base/\r
├── patterns/\r
│ ├── estimation/\r
│ │ ├── height_factors.yaml\r
│ │ ├── material_adjustments.yaml\r
│ │ └── labor_productivity.yaml\r
│ ├── data_processing/\r
│ │ ├── revit_extraction.yaml\r
│ │ ├── ifc_parsing.yaml\r
│ │ └── excel_transformations.yaml\r
│ ├── integration/\r
│ │ ├── procore_patterns.yaml\r
│ │ ├── plangrid_patterns.yaml\r
│ │ └── webhook_handlers.yaml\r
│ └── error_handling/\r
│ ├── cwicr_resolutions.yaml\r
│ ├── api_errors.yaml\r
│ └── data_validation.yaml\r
├── code_snippets/\r
│ ├── python/\r
│ ├── javascript/\r
│ └── sql/\r
├── decision_trees/\r
│ ├── estimate_type_selection.yaml\r
│ ├── schedule_method_selection.yaml\r
│ └── integration_approach.yaml\r
└── metrics/\r
├── pattern_usage.json\r
└── success_rates.json\r
```\r
\r
### 5. Session End Learning Prompt\r
\r
At the end of each construction automation session:\r
\r
```markdown\r
## Session Learning Review\r
\r
### What Worked Well\r
- [Successful approaches discovered]\r
- [Efficient patterns used]\r
- [Integrations that worked smoothly]\r
\r
### Challenges Overcome\r
- [Errors encountered and how resolved]\r
- [Workarounds developed]\r
- [Edge cases handled]\r
\r
### New Patterns Discovered\r
- [Novel approaches to problems]\r
- [Optimization techniques found]\r
- [Reusable code created]\r
\r
### Knowledge to Preserve\r
- [Key learnings to remember]\r
- [Context-specific solutions]\r
- [Client/project-specific adaptations]\r
\r
### Recommendations for Future\r
- [Improvements to suggest]\r
- [Patterns to apply elsewhere]\r
- [Automation opportunities identified]\r
```\r
\r
### 6. Pattern Application\r
\r
When starting new construction tasks:\r
\r
```python\r
def suggest_approaches(task_context: dict) -> list:\r
"""Suggest learned approaches for new tasks"""\r
\r
pipeline = ConstructionLearningPipeline('knowledge_base/')\r
relevant = pipeline.apply_learnings(task_context)\r
\r
suggestions = []\r
for item in relevant[:5]: # Top 5 suggestions\r
pattern = item['pattern']\r
suggestions.append({\r
'name': pattern['name'],\r
'relevance': f"{item['relevance']*100:.0f}%",\r
'summary': pattern['solution'][:200],\r
'confidence': pattern['confidence'],\r
'previous_uses': pattern.get('usage_count', 0)\r
})\r
\r
return suggestions\r
```\r
\r
## Integration with Other Skills\r
\r
This skill works with:\r
- **verification-loop-construction**: Learn from verification failures\r
- **security-review-construction**: Capture security patterns\r
- **estimation skills**: Build estimation knowledge base\r
- **integration skills**: Capture API patterns\r
\r
## Usage Commands\r
\r
```bash\r
# Extract learnings from current session\r
/learn\r
\r
# View patterns for current context\r
/suggest-patterns\r
\r
# Add manual pattern\r
/add-pattern --category estimation --name "my_pattern"\r
\r
# Export knowledge base\r
/export-kb --format yaml\r
```\r
\r
---\r
\r
**Every session is an opportunity to learn. Capture knowledge to compound expertise over time.**\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install lovefromio-continuous-learning - After installation, invoke the skill by name or use
/lovefromio-continuous-learning - Provide required inputs per the skill's parameter spec and get structured output
What is Lovefromio Continuous Learning?
Automatically extract patterns, best practices, and reusable knowledge from construction automation sessions to improve future performance. It is an AI Agent Skill for Claude Code / OpenClaw, with 160 downloads so far.
How do I install Lovefromio Continuous Learning?
Run "/install lovefromio-continuous-learning" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Lovefromio Continuous Learning free?
Yes, Lovefromio Continuous Learning is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Lovefromio Continuous Learning support?
Lovefromio Continuous Learning is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Lovefromio Continuous Learning?
It is built and maintained by AI (@lovefromio); the current version is v1.0.2.