change-order-analysis
Analyze and predict construction change orders using ML. Classify change order types, predict costs and schedule impacts, identify patterns, and optimize approval workflows.
What this skill does
# Change Order Analysis
## Overview
This skill implements machine learning-based change order analysis for construction projects. Predict change order costs, classify types, identify patterns in historical data, and streamline approval processes.
**Capabilities:**
- Change order classification
- Cost impact prediction
- Schedule impact analysis
- Pattern identification
- Root cause analysis
- Approval workflow optimization
## Quick Start
```python
from dataclasses import dataclass, field
from datetime import date, datetime
from typing import List, Dict, Optional
from enum import Enum
class ChangeOrderType(Enum):
DESIGN_CHANGE = "design_change"
OWNER_REQUEST = "owner_request"
FIELD_CONDITION = "field_condition"
CODE_COMPLIANCE = "code_compliance"
VALUE_ENGINEERING = "value_engineering"
ERROR_OMISSION = "error_omission"
SCOPE_CHANGE = "scope_change"
class ChangeOrderStatus(Enum):
DRAFT = "draft"
SUBMITTED = "submitted"
UNDER_REVIEW = "under_review"
APPROVED = "approved"
REJECTED = "rejected"
IMPLEMENTED = "implemented"
@dataclass
class ChangeOrder:
co_number: str
title: str
description: str
co_type: ChangeOrderType
status: ChangeOrderStatus
submitted_date: date
requested_by: str
cost_impact: float
schedule_impact_days: int
affected_elements: List[str] = field(default_factory=list)
def classify_change_order(description: str) -> ChangeOrderType:
"""Simple rule-based classification"""
description_lower = description.lower()
if any(word in description_lower for word in ['design', 'drawing', 'specification']):
return ChangeOrderType.DESIGN_CHANGE
elif any(word in description_lower for word in ['owner', 'client', 'request']):
return ChangeOrderType.OWNER_REQUEST
elif any(word in description_lower for word in ['site', 'field', 'condition', 'unforeseen']):
return ChangeOrderType.FIELD_CONDITION
elif any(word in description_lower for word in ['code', 'regulation', 'compliance']):
return ChangeOrderType.CODE_COMPLIANCE
elif any(word in description_lower for word in ['value', 'alternative', 'savings']):
return ChangeOrderType.VALUE_ENGINEERING
elif any(word in description_lower for word in ['error', 'omission', 'mistake']):
return ChangeOrderType.ERROR_OMISSION
else:
return ChangeOrderType.SCOPE_CHANGE
# Example
co = ChangeOrder(
co_number="CO-001",
title="Additional structural reinforcement",
description="Site conditions revealed weaker soil requiring additional foundation reinforcement",
co_type=classify_change_order("Site conditions revealed weaker soil"),
status=ChangeOrderStatus.SUBMITTED,
submitted_date=date.today(),
requested_by="Site Engineer",
cost_impact=50000,
schedule_impact_days=5
)
print(f"CO Type: {co.co_type.value}")
```
## Comprehensive Change Order System
### Change Order Management
```python
from dataclasses import dataclass, field
from datetime import date, datetime, timedelta
from typing import List, Dict, Optional, Tuple
from enum import Enum
import pandas as pd
import numpy as np
class ImpactSeverity(Enum):
MINOR = "minor" # < 1% cost, < 1 week schedule
MODERATE = "moderate" # 1-5% cost, 1-4 weeks schedule
MAJOR = "major" # 5-10% cost, 1-3 months schedule
CRITICAL = "critical" # > 10% cost, > 3 months schedule
@dataclass
class CostBreakdown:
labor: float = 0
materials: float = 0
equipment: float = 0
subcontractor: float = 0
overhead: float = 0
profit: float = 0
@property
def total(self) -> float:
return self.labor + self.materials + self.equipment + self.subcontractor + self.overhead + self.profit
@dataclass
class ScheduleImpact:
direct_days: int
ripple_days: int
critical_path_affected: bool
affected_activities: List[str] = field(default_factory=list)
@property
def total_days(self) -> int:
return self.direct_days + self.ripple_days
@dataclass
class ChangeOrderDetail:
co_id: str
co_number: str
title: str
description: str
justification: str
# Classification
co_type: ChangeOrderType
initiated_by: str # owner, contractor, designer, etc.
responsibility: str # who pays
# Status
status: ChangeOrderStatus
submitted_date: date
approved_date: Optional[date] = None
implemented_date: Optional[date] = None
# Impact
cost_breakdown: CostBreakdown = field(default_factory=CostBreakdown)
schedule_impact: ScheduleImpact = None
severity: ImpactSeverity = ImpactSeverity.MINOR
# Affected scope
affected_elements: List[str] = field(default_factory=list)
affected_drawings: List[str] = field(default_factory=list)
affected_specs: List[str] = field(default_factory=list)
# Supporting documents
attachments: List[str] = field(default_factory=list)
related_rfis: List[str] = field(default_factory=list)
related_cos: List[str] = field(default_factory=list)
# Approval
approvals: List[Dict] = field(default_factory=list)
comments: List[Dict] = field(default_factory=list)
class ChangeOrderManager:
"""Manage project change orders"""
def __init__(self, project_id: str, contract_value: float):
self.project_id = project_id
self.contract_value = contract_value
self.change_orders: Dict[str, ChangeOrderDetail] = {}
self.co_counter = 0
def create_change_order(self, title: str, description: str,
co_type: ChangeOrderType,
initiated_by: str) -> ChangeOrderDetail:
"""Create new change order"""
self.co_counter += 1
co_id = f"CO-{self.project_id}-{self.co_counter:04d}"
co = ChangeOrderDetail(
co_id=co_id,
co_number=f"CO-{self.co_counter:04d}",
title=title,
description=description,
justification="",
co_type=co_type,
initiated_by=initiated_by,
responsibility="TBD",
status=ChangeOrderStatus.DRAFT,
submitted_date=date.today()
)
self.change_orders[co_id] = co
return co
def update_cost(self, co_id: str, cost_breakdown: CostBreakdown):
"""Update change order cost"""
co = self.change_orders.get(co_id)
if co:
co.cost_breakdown = cost_breakdown
co.severity = self._calculate_severity(co)
def update_schedule_impact(self, co_id: str, impact: ScheduleImpact):
"""Update schedule impact"""
co = self.change_orders.get(co_id)
if co:
co.schedule_impact = impact
co.severity = self._calculate_severity(co)
def _calculate_severity(self, co: ChangeOrderDetail) -> ImpactSeverity:
"""Calculate change order severity"""
cost_pct = co.cost_breakdown.total / self.contract_value * 100
schedule_days = co.schedule_impact.total_days if co.schedule_impact else 0
if cost_pct > 10 or schedule_days > 90:
return ImpactSeverity.CRITICAL
elif cost_pct > 5 or schedule_days > 30:
return ImpactSeverity.MAJOR
elif cost_pct > 1 or schedule_days > 7:
return ImpactSeverity.MODERATE
else:
return ImpactSeverity.MINOR
def submit_for_approval(self, co_id: str):
"""Submit change order for approval"""
co = self.change_orders.get(co_id)
if co and co.status == ChangeOrderStatus.DRAFT:
co.status = ChangeOrderStatus.SUBMITTED
co.submitted_date = date.today()
def approve(self, co_id: str, approver: str, comments: str = ""):
"""Approve change order"""
co = self.change_orders.get(co_id)
if co:
co.approvals.append({
'approver': approver,
'action': 'approved',
'date': date.today()Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.