| name | construction-expert |
| version | 1.0.0 |
| description | Expert-level construction management, project planning, BIM, safety compliance, and construction technology |
| category | domains |
| tags | ["construction","bim","project-management","safety","building"] |
| allowed-tools | ["Read","Write","Edit"] |
Construction Expert
Expert guidance for construction management, project planning, Building Information Modeling (BIM), safety compliance, and modern construction technology solutions.
Core Concepts
Construction Management
- Project planning and scheduling
- Cost estimation and control
- Resource management
- Quality assurance
- Contract management
- Risk management
- Change order management
Technologies
- Building Information Modeling (BIM)
- Construction management software
- Drone surveying and inspection
- 3D printing and modular construction
- IoT sensors for monitoring
- Augmented reality for visualization
- Construction robotics
Standards and Regulations
- OSHA safety regulations
- Building codes (IBC, IRC)
- AIA contracts and standards
- LEED certification
- ISO 19650 (BIM standards)
- CSI MasterFormat
- Environmental regulations
Project Management System
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import List, Optional, Dict
from decimal import Decimal
from enum import Enum
class ProjectPhase(Enum):
PRE_CONSTRUCTION = "pre_construction"
SITE_PREPARATION = "site_preparation"
FOUNDATION = "foundation"
FRAMING = "framing"
MEP = "mep"
INTERIOR = "interior"
EXTERIOR = "exterior"
FINAL = "final"
CLOSEOUT = "closeout"
class TaskStatus(Enum):
NOT_STARTED = "not_started"
IN_PROGRESS = "in_progress"
COMPLETED = "completed"
DELAYED = "delayed"
ON_HOLD = "on_hold"
@dataclass
class ConstructionProject:
"""Construction project information"""
project_id: str
project_name: str
location: dict
project_type: str
owner: str
general_contractor: str
start_date: datetime
planned_end_date: datetime
actual_end_date: [datetime]
budget: Decimal
current_cost: Decimal
square_footage:
current_phase: ProjectPhase
:
task_id:
project_id:
name:
description:
phase: ProjectPhase
status: TaskStatus
assigned_to:
planned_start: datetime
planned_end: datetime
actual_start: [datetime]
actual_end: [datetime]
budget: Decimal
actual_cost: Decimal
predecessors: []
progress_percent:
:
():
.projects = {}
.tasks = {}
.change_orders = []
.inspections = []
() -> :
project = .projects.get(project_id)
project:
{: }
tasks = []
task_data tasks_data:
task = Task(
task_id=._generate_task_id(),
project_id=project_id,
name=task_data[],
description=task_data.get(, ),
phase=ProjectPhase(task_data[]),
status=TaskStatus.NOT_STARTED,
assigned_to=task_data[],
planned_start=task_data[],
planned_end=task_data[],
actual_start=,
actual_end=,
budget=Decimal((task_data[])),
actual_cost=Decimal(),
predecessors=task_data.get(, []),
progress_percent=
)
tasks.append(task)
.tasks[task.task_id] = task
critical_path = ._calculate_critical_path(tasks)
tasks:
project_end = (t.planned_end t tasks)
project_duration = (project_end - project.start_date).days
:
project_duration =
{
: project_id,
: (tasks),
: project_duration,
: [t.task_id t critical_path],
: (
(t.planned_end - t.planned_start).days t critical_path
)
}
() -> [Task]:
start_tasks = [t t tasks t.predecessors]
critical_path = []
current_tasks = start_tasks
current_tasks:
longest_task = (current_tasks,
key= t: (t.planned_end - t.planned_start).days)
critical_path.append(longest_task)
current_tasks = [
t t tasks
longest_task.task_id t.predecessors
]
critical_path
() -> :
project = .projects.get(project_id)
project:
{: }
project_tasks = [t t .tasks.values() t.project_id == project_id]
project_tasks:
overall_progress = (t.progress_percent t project_tasks) / (project_tasks)
:
overall_progress =
total_planned_days = (project.planned_end_date - project.start_date).days
elapsed_days = (datetime.now() - project.start_date).days
planned_progress = (elapsed_days / total_planned_days * ) total_planned_days >
schedule_variance = overall_progress - planned_progress
cost_variance = project.budget - project.current_cost
cost_performance_index = (project.budget / project.current_cost) project.current_cost >
overall_progress > :
estimated_total_days = elapsed_days / (overall_progress / )
estimated_completion = project.start_date + timedelta(days=estimated_total_days)
:
estimated_completion = project.planned_end_date
{
: project_id,
: overall_progress,
: schedule_variance,
: schedule_variance > schedule_variance < ,
: (cost_variance),
: cost_performance_index,
: cost_variance > ,
: estimated_completion.isoformat(),
: (estimated_completion - project.planned_end_date).days
}
() -> :
project = .projects.get(project_id)
project:
{: }
change_order = {
: ._generate_co_id(),
: project_id,
: change_data[],
: change_data[],
: Decimal((change_data[])),
: change_data.get(, ),
: change_data[],
: datetime.now(),
: ,
:
}
.change_orders.append(change_order)
{
: change_order[],
: (change_order[]),
: change_order[],
: (project.budget + change_order[]),
: (
project.planned_end_date + timedelta(days=change_order[])
).isoformat()
}
() -> :
base_costs = {
: Decimal(),
: Decimal(),
: Decimal(),
: Decimal()
}
base_cost_per_sf = base_costs.get(project_type, Decimal())
base_cost = base_cost_per_sf * Decimal((square_footage))
complexity_factor = Decimal()
specifications.get(, ):
complexity_factor += Decimal()
specifications.get(, ):
complexity_factor += Decimal()
specifications.get(, ):
complexity_factor += Decimal()
adjusted_cost = base_cost * complexity_factor
contingency = adjusted_cost * Decimal()
breakdown = {
: (adjusted_cost * Decimal()),
: (adjusted_cost * Decimal()),
: (adjusted_cost * Decimal()),
: (adjusted_cost * Decimal()),
: (adjusted_cost * Decimal()),
: (adjusted_cost * Decimal())
}
total_estimate = adjusted_cost + contingency
{
: project_type,
: square_footage,
: (base_cost_per_sf),
: (complexity_factor),
: (adjusted_cost),
: (contingency),
: (total_estimate),
: breakdown
}
() -> :
uuid
() -> :
uuid
Safety Management System
@dataclass
class SafetyIncident:
"""Safety incident report"""
incident_id: str
project_id: str
incident_type: str
severity: str
description: str
location: str
occurred_at: datetime
reported_by: str
injured_person: Optional[str]
root_cause: Optional[str]
corrective_actions: List[str]
class SafetyManagementSystem:
"""Construction safety management"""
def __init__(self):
self.incidents = []
self.safety_inspections = []
self.training_records = []
def conduct_safety_inspection(self, project_id: str, inspector: str) -> dict:
"""Conduct safety inspection"""
inspection_items = [
'Personal protective equipment (PPE)',
'Fall protection systems',
'Scaffolding integrity',
'Electrical safety',
'Equipment guarding',
'Housekeeping',
'Fire prevention',
'First aid availability',
,
]
violations = []
passed_items = []
item inspection_items:
random
random.random() < :
passed_items.append(item)
:
violations.append({
: item,
: random.choice([, ]),
: random.random() <
})
inspection = {
: ._generate_inspection_id(),
: project_id,
: inspector,
: datetime.now(),
: (inspection_items),
: (passed_items),
: violations,
: ((passed_items) / (inspection_items)) * ,
: (violations) ==
}
.safety_inspections.append(inspection)
inspection
() -> SafetyIncident:
incident = SafetyIncident(
incident_id=._generate_incident_id(),
project_id=incident_data[],
incident_type=incident_data[],
severity=incident_data[],
description=incident_data[],
location=incident_data[],
occurred_at=incident_data[],
reported_by=incident_data[],
injured_person=incident_data.get(),
root_cause=,
corrective_actions=[]
)
.incidents.append(incident)
._notify_incident(incident)
incident
() -> :
project_incidents = [
i i .incidents
i.project_id == project_id
]
recordable_incidents = [
i i project_incidents
i.incident_type == i.severity [, , ]
]
hours_worked > :
incident_rate = ((recordable_incidents) * ) / hours_worked
:
incident_rate =
dart_incidents = [
i i recordable_incidents
i.severity [, ]
]
dart_rate = ((dart_incidents) * ) / hours_worked hours_worked >
{
: project_id,
: hours_worked,
: (project_incidents),
: (recordable_incidents),
: incident_rate,
: dart_rate,
: incident_rate <
incident_rate <
}
():
() -> :
uuid
() -> :
uuid
BIM Integration
class BIMManagement:
"""Building Information Modeling management"""
def __init__(self):
self.models = {}
self.clash_detections = []
def perform_clash_detection(self, model_ids: List[str]) -> dict:
"""Detect clashes between BIM models"""
clashes = [
{
'clash_id': 'CLASH-001',
'type': 'hard',
'disciplines': ['structural', 'mep'],
'description': 'Steel beam conflicts with HVAC duct',
'location': 'Level 3, Grid B-4',
'severity': 'high',
'status': 'open'
},
{
'clash_id': 'CLASH-002',
'type': 'soft',
'disciplines': ['architectural', 'mep'],
'description': 'Insufficient clearance for plumbing access',
'location': 'Level 2, Grid C-2',
: ,
:
}
]
{
: model_ids,
: (clashes),
: ([c c clashes c[] == ]),
: ([c c clashes c[] == ]),
: clashes
}
() -> :
quantities = {
: {
: ,
: ,
: ,
:
},
: {
: ,
: ,
: ,
:
},
: {
: ,
: ,
: ,
:
}
}
total_cost = (item[] item quantities.values())
{
: model_id,
: quantities,
: total_cost
}
Best Practices
Project Management
- Use critical path method for scheduling
- Implement regular progress reviews
- Maintain detailed documentation
- Use integrated project delivery (IPD)
- Implement lean construction principles
- Track key performance indicators
- Conduct regular stakeholder meetings
Cost Control
- Develop detailed estimates
- Track costs continuously
- Manage change orders effectively
- Use value engineering
- Implement cost coding systems
- Monitor cash flow
- Conduct regular audits
Safety Management
- Implement comprehensive safety program
- Conduct regular toolbox talks
- Provide proper PPE
- Maintain OSHA compliance
- Investigate all incidents
- Track safety metrics
- Promote safety culture
BIM Implementation
- Use BIM for clash detection
- Implement 4D scheduling
- Extract quantities from model
- Enable collaboration
- Maintain model coordination
- Use BIM for facility management
- Follow ISO 19650 standards
Anti-Patterns
❌ Poor project planning
❌ Inadequate cost tracking
❌ No safety program
❌ Poor communication
❌ Ignoring change orders
❌ No quality control
❌ Inadequate documentation
❌ Poor subcontractor management
❌ No risk management
Resources