[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJKFZVPCDR2RXEH35RMNCK":3,"skill-same:01M6FJKFZVPCDR2RXEH35RMNCK":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":29,"linkOnly":30,"markdownContent":31,"markdownBody":32,"frontMatter":33,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M6FJKFZVPCDR2RXEH35RMNCK","change-order-processor",null,"Process and manage construction change orders. Track costs, approvals, and impact on schedule and budget.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fchange-order-processor\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28],"change","processor","change order","change order processor","Budget","schedule","process","manage","orders","impact","approvals","2026-11-10 10:12:30",false,"---\r\nslug: \"change-order-processor\"\r\ndisplay_name: \"Change Order Processor\"\r\ndescription: \"Process and manage construction change orders. Track costs, approvals, and impact on schedule and budget.\"\r\n---\r\n\r\n# Change Order Processor\r\n\r\n## Business Case\r\n\r\n### Problem Statement\r\nChange orders cause project disruption:\r\n- Delayed processing affects cash flow\r\n- Unclear cost impact\r\n- Lost documentation\r\n- Schedule impacts not tracked\r\n\r\n### Solution\r\nStreamlined change order processing with cost analysis, approval workflow, and impact tracking.\r\n\r\n### Business Value\r\n- **Faster processing** - Reduce approval cycle time\r\n- **Cost control** - Accurate change pricing\r\n- **Documentation** - Complete audit trail\r\n- **Impact visibility** - Schedule and budget effects\r\n\r\n## Technical Implementation\r\n\r\n```python\r\nimport pandas as pd\r\nfrom datetime import datetime, date, timedelta\r\nfrom typing import Dict, Any, List, Optional\r\nfrom dataclasses import dataclass, field\r\nfrom enum import Enum\r\n\r\n\r\nclass ChangeOrderStatus(Enum):\r\n    \"\"\"Change order status.\"\"\"\r\n    DRAFT = \"draft\"\r\n    PENDING_REVIEW = \"pending_review\"\r\n    PENDING_APPROVAL = \"pending_approval\"\r\n    APPROVED = \"approved\"\r\n    REJECTED = \"rejected\"\r\n    VOID = \"void\"\r\n\r\n\r\nclass ChangeType(Enum):\r\n    \"\"\"Type of change.\"\"\"\r\n    OWNER_REQUESTED = \"owner_requested\"\r\n    DESIGN_CHANGE = \"design_change\"\r\n    FIELD_CONDITION = \"field_condition\"\r\n    CODE_COMPLIANCE = \"code_compliance\"\r\n    VALUE_ENGINEERING = \"value_engineering\"\r\n    ERROR_OMISSION = \"error_omission\"\r\n\r\n\r\nclass ImpactType(Enum):\r\n    \"\"\"Impact categories.\"\"\"\r\n    COST_INCREASE = \"cost_increase\"\r\n    COST_DECREASE = \"cost_decrease\"\r\n    TIME_INCREASE = \"time_increase\"\r\n    TIME_DECREASE = \"time_decrease\"\r\n    NO_IMPACT = \"no_impact\"\r\n\r\n\r\n@dataclass\r\nclass CostItem:\r\n    \"\"\"Change order cost item.\"\"\"\r\n    description: str\r\n    quantity: float\r\n    unit: str\r\n    unit_cost: float\r\n    total_cost: float\r\n    category: str  # labor, material, equipment, subcontractor\r\n    markup_percent: float = 0.0\r\n\r\n\r\n@dataclass\r\nclass ApprovalRecord:\r\n    \"\"\"Approval workflow record.\"\"\"\r\n    approver_name: str\r\n    approver_role: str\r\n    action: str  # approved, rejected, returned\r\n    action_date: datetime\r\n    comments: str = \"\"\r\n\r\n\r\n@dataclass\r\nclass ChangeOrder:\r\n    \"\"\"Change order record.\"\"\"\r\n    co_number: str\r\n    title: str\r\n    description: str\r\n    change_type: ChangeType\r\n    status: ChangeOrderStatus\r\n    created_date: date\r\n    created_by: str\r\n\r\n    # Cost\r\n    cost_items: List[CostItem] = field(default_factory=list)\r\n    direct_cost: float = 0.0\r\n    overhead_cost: float = 0.0\r\n    profit_cost: float = 0.0\r\n    total_cost: float = 0.0\r\n\r\n    # Schedule\r\n    schedule_impact_days: int = 0\r\n    affected_activities: List[str] = field(default_factory=list)\r\n\r\n    # Workflow\r\n    approvals: List[ApprovalRecord] = field(default_factory=list)\r\n    approved_date: Optional[date] = None\r\n    approved_by: str = \"\"\r\n\r\n    # References\r\n    rfi_reference: str = \"\"\r\n    spec_section: str = \"\"\r\n    drawing_reference: str = \"\"\r\n    location: str = \"\"\r\n\r\n    def to_dict(self) -> Dict[str, Any]:\r\n        return {\r\n            'co_number': self.co_number,\r\n            'title': self.title,\r\n            'change_type': self.change_type.value,\r\n            'status': self.status.value,\r\n            'created_date': self.created_date.isoformat(),\r\n            'direct_cost': self.direct_cost,\r\n            'overhead_cost': self.overhead_cost,\r\n            'profit_cost': self.profit_cost,\r\n            'total_cost': self.total_cost,\r\n            'schedule_impact': self.schedule_impact_days,\r\n            'approved_date': self.approved_date.isoformat() if self.approved_date else None\r\n        }\r\n\r\n\r\nclass ChangeOrderProcessor:\r\n    \"\"\"Process and manage change orders.\"\"\"\r\n\r\n    DEFAULT_OVERHEAD_RATE = 0.10\r\n    DEFAULT_PROFIT_RATE = 0.10\r\n\r\n    def __init__(self, project_name: str, original_contract: float,\r\n                 overhead_rate: float = None, profit_rate: float = None):\r\n        self.project_name = project_name\r\n        self.original_contract = original_contract\r\n        self.overhead_rate = overhead_rate or self.DEFAULT_OVERHEAD_RATE\r\n        self.profit_rate = profit_rate or self.DEFAULT_PROFIT_RATE\r\n        self.change_orders: Dict[str, ChangeOrder] = {}\r\n        self._co_counter = 0\r\n\r\n    def create_change_order(self,\r\n                           title: str,\r\n                           description: str,\r\n                           change_type: ChangeType,\r\n                           created_by: str,\r\n                           rfi_reference: str = \"\",\r\n                           location: str = \"\") -> ChangeOrder:\r\n        \"\"\"Create new change order.\"\"\"\r\n        self._co_counter += 1\r\n        co_number = f\"CO-{self._co_counter:04d}\"\r\n\r\n        co = ChangeOrder(\r\n            co_number=co_number,\r\n            title=title,\r\n            description=description,\r\n            change_type=change_type,\r\n            status=ChangeOrderStatus.DRAFT,\r\n            created_date=date.today(),\r\n            created_by=created_by,\r\n            rfi_reference=rfi_reference,\r\n            location=location\r\n        )\r\n\r\n        self.change_orders[co_number] = co\r\n        return co\r\n\r\n    def add_cost_item(self, co_number: str,\r\n                     description: str,\r\n                     quantity: float,\r\n                     unit: str,\r\n                     unit_cost: float,\r\n                     category: str,\r\n                     markup_percent: float = 0.0):\r\n        \"\"\"Add cost item to change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        total = quantity * unit_cost * (1 + markup_percent)\r\n        item = CostItem(\r\n            description=description,\r\n            quantity=quantity,\r\n            unit=unit,\r\n            unit_cost=unit_cost,\r\n            total_cost=total,\r\n            category=category,\r\n            markup_percent=markup_percent\r\n        )\r\n\r\n        co.cost_items.append(item)\r\n        self._recalculate_totals(co)\r\n\r\n    def _recalculate_totals(self, co: ChangeOrder):\r\n        \"\"\"Recalculate change order totals.\"\"\"\r\n        co.direct_cost = sum(item.total_cost for item in co.cost_items)\r\n        co.overhead_cost = co.direct_cost * self.overhead_rate\r\n        co.profit_cost = (co.direct_cost + co.overhead_cost) * self.profit_rate\r\n        co.total_cost = co.direct_cost + co.overhead_cost + co.profit_cost\r\n\r\n    def set_schedule_impact(self, co_number: str, days: int,\r\n                           affected_activities: List[str] = None):\r\n        \"\"\"Set schedule impact.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        co.schedule_impact_days = days\r\n        co.affected_activities = affected_activities or []\r\n\r\n    def submit_for_review(self, co_number: str):\r\n        \"\"\"Submit change order for review.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        if co.status != ChangeOrderStatus.DRAFT:\r\n            raise ValueError(\"Can only submit draft change orders\")\r\n\r\n        co.status = ChangeOrderStatus.PENDING_REVIEW\r\n\r\n    def submit_for_approval(self, co_number: str, reviewer: str, comments: str = \"\"):\r\n        \"\"\"Submit for approval after review.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        if co.status != ChangeOrderStatus.PENDING_REVIEW:\r\n            raise ValueError(\"Must be in review status\")\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=reviewer,\r\n            approver_role=\"Reviewer\",\r\n            action=\"reviewed\",\r\n            action_date=datetime.now(),\r\n            comments=comments\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.PENDING_APPROVAL\r\n\r\n    def approve_change_order(self, co_number: str, approver: str,\r\n                            approver_role: str, comments: str = \"\"):\r\n        \"\"\"Approve change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=approver,\r\n            approver_role=approver_role,\r\n            action=\"approved\",\r\n            action_date=datetime.now(),\r\n            comments=comments\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.APPROVED\r\n        co.approved_date = date.today()\r\n        co.approved_by = approver\r\n\r\n    def reject_change_order(self, co_number: str, rejector: str,\r\n                           reason: str):\r\n        \"\"\"Reject change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=rejector,\r\n            approver_role=\"Approver\",\r\n            action=\"rejected\",\r\n            action_date=datetime.now(),\r\n            comments=reason\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.REJECTED\r\n\r\n    def get_summary(self) -> Dict[str, Any]:\r\n        \"\"\"Generate change order summary.\"\"\"\r\n        cos = list(self.change_orders.values())\r\n\r\n        by_status = {}\r\n        by_type = {}\r\n        total_approved = 0\r\n        total_pending = 0\r\n        total_schedule_impact = 0\r\n\r\n        for co in cos:\r\n            # By status\r\n            status = co.status.value\r\n            by_status[status] = by_status.get(status, 0) + 1\r\n\r\n            # By type\r\n            change_type = co.change_type.value\r\n            by_type[change_type] = by_type.get(change_type, 0) + co.total_cost\r\n\r\n            # Totals\r\n            if co.status == ChangeOrderStatus.APPROVED:\r\n                total_approved += co.total_cost\r\n                total_schedule_impact += co.schedule_impact_days\r\n            elif co.status in [ChangeOrderStatus.PENDING_REVIEW, ChangeOrderStatus.PENDING_APPROVAL]:\r\n                total_pending += co.total_cost\r\n\r\n        current_contract = self.original_contract + total_approved\r\n\r\n        return {\r\n            'project': self.project_name,\r\n            'original_contract': self.original_contract,\r\n            'approved_changes': total_approved,\r\n            'current_contract': current_contract,\r\n            'pending_changes': total_pending,\r\n            'potential_contract': current_contract + total_pending,\r\n            'total_change_orders': len(cos),\r\n            'by_status': by_status,\r\n            'by_type': by_type,\r\n            'total_schedule_impact_days': total_schedule_impact,\r\n            'change_percent': round(total_approved \u002F self.original_contract * 100, 1) if self.original_contract > 0 else 0\r\n        }\r\n\r\n    def get_pending_approvals(self) -> List[ChangeOrder]:\r\n        \"\"\"Get change orders pending approval.\"\"\"\r\n        return [co for co in self.change_orders.values()\r\n                if co.status in [ChangeOrderStatus.PENDING_REVIEW, ChangeOrderStatus.PENDING_APPROVAL]]\r\n\r\n    def export_log(self, output_path: str):\r\n        \"\"\"Export change order log to Excel.\"\"\"\r\n        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:\r\n            # Summary\r\n            summary = self.get_summary()\r\n            summary_df = pd.DataFrame([\r\n                {'Metric': 'Original Contract', 'Value': summary['original_contract']},\r\n                {'Metric': 'Approved Changes', 'Value': summary['approved_changes']},\r\n                {'Metric': 'Current Contract', 'Value': summary['current_contract']},\r\n                {'Metric': 'Pending Changes', 'Value': summary['pending_changes']},\r\n                {'Metric': 'Change %', 'Value': f\"{summary['change_percent']}%\"},\r\n                {'Metric': 'Schedule Impact (days)', 'Value': summary['total_schedule_impact_days']}\r\n            ])\r\n            summary_df.to_excel(writer, sheet_name='Summary', index=False)\r\n\r\n            # Change order list\r\n            co_data = [co.to_dict() for co in self.change_orders.values()]\r\n            pd.DataFrame(co_data).to_excel(writer, sheet_name='Change Orders', index=False)\r\n\r\n            # Cost details\r\n            cost_data = []\r\n            for co in self.change_orders.values():\r\n                for item in co.cost_items:\r\n                    cost_data.append({\r\n                        'CO Number': co.co_number,\r\n                        'Description': item.description,\r\n                        'Quantity': item.quantity,\r\n                        'Unit': item.unit,\r\n                        'Unit Cost': item.unit_cost,\r\n                        'Total': item.total_cost,\r\n                        'Category': item.category\r\n                    })\r\n            if cost_data:\r\n                pd.DataFrame(cost_data).to_excel(writer, sheet_name='Cost Details', index=False)\r\n\r\n        return output_path\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\n# Initialize processor\r\nprocessor = ChangeOrderProcessor(\r\n    project_name=\"Office Tower\",\r\n    original_contract=50000000\r\n)\r\n\r\n# Create change order\r\nco = processor.create_change_order(\r\n    title=\"Additional Electrical Outlets\",\r\n    description=\"Add 50 electrical outlets per owner request\",\r\n    change_type=ChangeType.OWNER_REQUESTED,\r\n    created_by=\"Project Manager\"\r\n)\r\n\r\n# Add cost items\r\nprocessor.add_cost_item(co.co_number, \"Electrical outlets\", 50, \"EA\", 150, \"material\")\r\nprocessor.add_cost_item(co.co_number, \"Installation labor\", 25, \"HR\", 85, \"labor\")\r\n\r\n# Set schedule impact\r\nprocessor.set_schedule_impact(co.co_number, days=5)\r\n\r\n# Submit for approval\r\nprocessor.submit_for_review(co.co_number)\r\n```\r\n\r\n## Common Use Cases\r\n\r\n### 1. Process Approval\r\n```python\r\nprocessor.submit_for_approval(co.co_number, \"Reviewer\", \"Cost verified\")\r\nprocessor.approve_change_order(co.co_number, \"Owner Rep\", \"Owner\", \"Approved per request\")\r\n```\r\n\r\n### 2. Get Summary\r\n```python\r\nsummary = processor.get_summary()\r\nprint(f\"Contract value: ${summary['current_contract']:,.0f}\")\r\nprint(f\"Change %: {summary['change_percent']}%\")\r\n```\r\n\r\n### 3. Export Log\r\n```python\r\nprocessor.export_log(\"change_order_log.xlsx\")\r\n```\r\n\r\n## Resources\r\n- **DDC Book**: Chapter 3.1 - Cost Management\r\n- **Reference**: AIA Document G701\r\n","# Change Order Processor\r\n\r\n## Business Case\r\n\r\n### Problem Statement\r\nChange orders cause project disruption:\r\n- Delayed processing affects cash flow\r\n- Unclear cost impact\r\n- Lost documentation\r\n- Schedule impacts not tracked\r\n\r\n### Solution\r\nStreamlined change order processing with cost analysis, approval workflow, and impact tracking.\r\n\r\n### Business Value\r\n- **Faster processing** - Reduce approval cycle time\r\n- **Cost control** - Accurate change pricing\r\n- **Documentation** - Complete audit trail\r\n- **Impact visibility** - Schedule and budget effects\r\n\r\n## Technical Implementation\r\n\r\n```python\r\nimport pandas as pd\r\nfrom datetime import datetime, date, timedelta\r\nfrom typing import Dict, Any, List, Optional\r\nfrom dataclasses import dataclass, field\r\nfrom enum import Enum\r\n\r\n\r\nclass ChangeOrderStatus(Enum):\r\n    \"\"\"Change order status.\"\"\"\r\n    DRAFT = \"draft\"\r\n    PENDING_REVIEW = \"pending_review\"\r\n    PENDING_APPROVAL = \"pending_approval\"\r\n    APPROVED = \"approved\"\r\n    REJECTED = \"rejected\"\r\n    VOID = \"void\"\r\n\r\n\r\nclass ChangeType(Enum):\r\n    \"\"\"Type of change.\"\"\"\r\n    OWNER_REQUESTED = \"owner_requested\"\r\n    DESIGN_CHANGE = \"design_change\"\r\n    FIELD_CONDITION = \"field_condition\"\r\n    CODE_COMPLIANCE = \"code_compliance\"\r\n    VALUE_ENGINEERING = \"value_engineering\"\r\n    ERROR_OMISSION = \"error_omission\"\r\n\r\n\r\nclass ImpactType(Enum):\r\n    \"\"\"Impact categories.\"\"\"\r\n    COST_INCREASE = \"cost_increase\"\r\n    COST_DECREASE = \"cost_decrease\"\r\n    TIME_INCREASE = \"time_increase\"\r\n    TIME_DECREASE = \"time_decrease\"\r\n    NO_IMPACT = \"no_impact\"\r\n\r\n\r\n@dataclass\r\nclass CostItem:\r\n    \"\"\"Change order cost item.\"\"\"\r\n    description: str\r\n    quantity: float\r\n    unit: str\r\n    unit_cost: float\r\n    total_cost: float\r\n    category: str  # labor, material, equipment, subcontractor\r\n    markup_percent: float = 0.0\r\n\r\n\r\n@dataclass\r\nclass ApprovalRecord:\r\n    \"\"\"Approval workflow record.\"\"\"\r\n    approver_name: str\r\n    approver_role: str\r\n    action: str  # approved, rejected, returned\r\n    action_date: datetime\r\n    comments: str = \"\"\r\n\r\n\r\n@dataclass\r\nclass ChangeOrder:\r\n    \"\"\"Change order record.\"\"\"\r\n    co_number: str\r\n    title: str\r\n    description: str\r\n    change_type: ChangeType\r\n    status: ChangeOrderStatus\r\n    created_date: date\r\n    created_by: str\r\n\r\n    # Cost\r\n    cost_items: List[CostItem] = field(default_factory=list)\r\n    direct_cost: float = 0.0\r\n    overhead_cost: float = 0.0\r\n    profit_cost: float = 0.0\r\n    total_cost: float = 0.0\r\n\r\n    # Schedule\r\n    schedule_impact_days: int = 0\r\n    affected_activities: List[str] = field(default_factory=list)\r\n\r\n    # Workflow\r\n    approvals: List[ApprovalRecord] = field(default_factory=list)\r\n    approved_date: Optional[date] = None\r\n    approved_by: str = \"\"\r\n\r\n    # References\r\n    rfi_reference: str = \"\"\r\n    spec_section: str = \"\"\r\n    drawing_reference: str = \"\"\r\n    location: str = \"\"\r\n\r\n    def to_dict(self) -> Dict[str, Any]:\r\n        return {\r\n            'co_number': self.co_number,\r\n            'title': self.title,\r\n            'change_type': self.change_type.value,\r\n            'status': self.status.value,\r\n            'created_date': self.created_date.isoformat(),\r\n            'direct_cost': self.direct_cost,\r\n            'overhead_cost': self.overhead_cost,\r\n            'profit_cost': self.profit_cost,\r\n            'total_cost': self.total_cost,\r\n            'schedule_impact': self.schedule_impact_days,\r\n            'approved_date': self.approved_date.isoformat() if self.approved_date else None\r\n        }\r\n\r\n\r\nclass ChangeOrderProcessor:\r\n    \"\"\"Process and manage change orders.\"\"\"\r\n\r\n    DEFAULT_OVERHEAD_RATE = 0.10\r\n    DEFAULT_PROFIT_RATE = 0.10\r\n\r\n    def __init__(self, project_name: str, original_contract: float,\r\n                 overhead_rate: float = None, profit_rate: float = None):\r\n        self.project_name = project_name\r\n        self.original_contract = original_contract\r\n        self.overhead_rate = overhead_rate or self.DEFAULT_OVERHEAD_RATE\r\n        self.profit_rate = profit_rate or self.DEFAULT_PROFIT_RATE\r\n        self.change_orders: Dict[str, ChangeOrder] = {}\r\n        self._co_counter = 0\r\n\r\n    def create_change_order(self,\r\n                           title: str,\r\n                           description: str,\r\n                           change_type: ChangeType,\r\n                           created_by: str,\r\n                           rfi_reference: str = \"\",\r\n                           location: str = \"\") -> ChangeOrder:\r\n        \"\"\"Create new change order.\"\"\"\r\n        self._co_counter += 1\r\n        co_number = f\"CO-{self._co_counter:04d}\"\r\n\r\n        co = ChangeOrder(\r\n            co_number=co_number,\r\n            title=title,\r\n            description=description,\r\n            change_type=change_type,\r\n            status=ChangeOrderStatus.DRAFT,\r\n            created_date=date.today(),\r\n            created_by=created_by,\r\n            rfi_reference=rfi_reference,\r\n            location=location\r\n        )\r\n\r\n        self.change_orders[co_number] = co\r\n        return co\r\n\r\n    def add_cost_item(self, co_number: str,\r\n                     description: str,\r\n                     quantity: float,\r\n                     unit: str,\r\n                     unit_cost: float,\r\n                     category: str,\r\n                     markup_percent: float = 0.0):\r\n        \"\"\"Add cost item to change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        total = quantity * unit_cost * (1 + markup_percent)\r\n        item = CostItem(\r\n            description=description,\r\n            quantity=quantity,\r\n            unit=unit,\r\n            unit_cost=unit_cost,\r\n            total_cost=total,\r\n            category=category,\r\n            markup_percent=markup_percent\r\n        )\r\n\r\n        co.cost_items.append(item)\r\n        self._recalculate_totals(co)\r\n\r\n    def _recalculate_totals(self, co: ChangeOrder):\r\n        \"\"\"Recalculate change order totals.\"\"\"\r\n        co.direct_cost = sum(item.total_cost for item in co.cost_items)\r\n        co.overhead_cost = co.direct_cost * self.overhead_rate\r\n        co.profit_cost = (co.direct_cost + co.overhead_cost) * self.profit_rate\r\n        co.total_cost = co.direct_cost + co.overhead_cost + co.profit_cost\r\n\r\n    def set_schedule_impact(self, co_number: str, days: int,\r\n                           affected_activities: List[str] = None):\r\n        \"\"\"Set schedule impact.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        co.schedule_impact_days = days\r\n        co.affected_activities = affected_activities or []\r\n\r\n    def submit_for_review(self, co_number: str):\r\n        \"\"\"Submit change order for review.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        if co.status != ChangeOrderStatus.DRAFT:\r\n            raise ValueError(\"Can only submit draft change orders\")\r\n\r\n        co.status = ChangeOrderStatus.PENDING_REVIEW\r\n\r\n    def submit_for_approval(self, co_number: str, reviewer: str, comments: str = \"\"):\r\n        \"\"\"Submit for approval after review.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n        if co.status != ChangeOrderStatus.PENDING_REVIEW:\r\n            raise ValueError(\"Must be in review status\")\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=reviewer,\r\n            approver_role=\"Reviewer\",\r\n            action=\"reviewed\",\r\n            action_date=datetime.now(),\r\n            comments=comments\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.PENDING_APPROVAL\r\n\r\n    def approve_change_order(self, co_number: str, approver: str,\r\n                            approver_role: str, comments: str = \"\"):\r\n        \"\"\"Approve change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=approver,\r\n            approver_role=approver_role,\r\n            action=\"approved\",\r\n            action_date=datetime.now(),\r\n            comments=comments\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.APPROVED\r\n        co.approved_date = date.today()\r\n        co.approved_by = approver\r\n\r\n    def reject_change_order(self, co_number: str, rejector: str,\r\n                           reason: str):\r\n        \"\"\"Reject change order.\"\"\"\r\n        if co_number not in self.change_orders:\r\n            raise ValueError(f\"Change order {co_number} not found\")\r\n\r\n        co = self.change_orders[co_number]\r\n\r\n        co.approvals.append(ApprovalRecord(\r\n            approver_name=rejector,\r\n            approver_role=\"Approver\",\r\n            action=\"rejected\",\r\n            action_date=datetime.now(),\r\n            comments=reason\r\n        ))\r\n\r\n        co.status = ChangeOrderStatus.REJECTED\r\n\r\n    def get_summary(self) -> Dict[str, Any]:\r\n        \"\"\"Generate change order summary.\"\"\"\r\n        cos = list(self.change_orders.values())\r\n\r\n        by_status = {}\r\n        by_type = {}\r\n        total_approved = 0\r\n        total_pending = 0\r\n        total_schedule_impact = 0\r\n\r\n        for co in cos:\r\n            # By status\r\n            status = co.status.value\r\n            by_status[status] = by_status.get(status, 0) + 1\r\n\r\n            # By type\r\n            change_type = co.change_type.value\r\n            by_type[change_type] = by_type.get(change_type, 0) + co.total_cost\r\n\r\n            # Totals\r\n            if co.status == ChangeOrderStatus.APPROVED:\r\n                total_approved += co.total_cost\r\n                total_schedule_impact += co.schedule_impact_days\r\n            elif co.status in [ChangeOrderStatus.PENDING_REVIEW, ChangeOrderStatus.PENDING_APPROVAL]:\r\n                total_pending += co.total_cost\r\n\r\n        current_contract = self.original_contract + total_approved\r\n\r\n        return {\r\n            'project': self.project_name,\r\n            'original_contract': self.original_contract,\r\n            'approved_changes': total_approved,\r\n            'current_contract': current_contract,\r\n            'pending_changes': total_pending,\r\n            'potential_contract': current_contract + total_pending,\r\n            'total_change_orders': len(cos),\r\n            'by_status': by_status,\r\n            'by_type': by_type,\r\n            'total_schedule_impact_days': total_schedule_impact,\r\n            'change_percent': round(total_approved \u002F self.original_contract * 100, 1) if self.original_contract > 0 else 0\r\n        }\r\n\r\n    def get_pending_approvals(self) -> List[ChangeOrder]:\r\n        \"\"\"Get change orders pending approval.\"\"\"\r\n        return [co for co in self.change_orders.values()\r\n                if co.status in [ChangeOrderStatus.PENDING_REVIEW, ChangeOrderStatus.PENDING_APPROVAL]]\r\n\r\n    def export_log(self, output_path: str):\r\n        \"\"\"Export change order log to Excel.\"\"\"\r\n        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:\r\n            # Summary\r\n            summary = self.get_summary()\r\n            summary_df = pd.DataFrame([\r\n                {'Metric': 'Original Contract', 'Value': summary['original_contract']},\r\n                {'Metric': 'Approved Changes', 'Value': summary['approved_changes']},\r\n                {'Metric': 'Current Contract', 'Value': summary['current_contract']},\r\n                {'Metric': 'Pending Changes', 'Value': summary['pending_changes']},\r\n                {'Metric': 'Change %', 'Value': f\"{summary['change_percent']}%\"},\r\n                {'Metric': 'Schedule Impact (days)', 'Value': summary['total_schedule_impact_days']}\r\n            ])\r\n            summary_df.to_excel(writer, sheet_name='Summary', index=False)\r\n\r\n            # Change order list\r\n            co_data = [co.to_dict() for co in self.change_orders.values()]\r\n            pd.DataFrame(co_data).to_excel(writer, sheet_name='Change Orders', index=False)\r\n\r\n            # Cost details\r\n            cost_data = []\r\n            for co in self.change_orders.values():\r\n                for item in co.cost_items:\r\n                    cost_data.append({\r\n                        'CO Number': co.co_number,\r\n                        'Description': item.description,\r\n                        'Quantity': item.quantity,\r\n                        'Unit': item.unit,\r\n                        'Unit Cost': item.unit_cost,\r\n                        'Total': item.total_cost,\r\n                        'Category': item.category\r\n                    })\r\n            if cost_data:\r\n                pd.DataFrame(cost_data).to_excel(writer, sheet_name='Cost Details', index=False)\r\n\r\n        return output_path\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\n# Initialize processor\r\nprocessor = ChangeOrderProcessor(\r\n    project_name=\"Office Tower\",\r\n    original_contract=50000000\r\n)\r\n\r\n# Create change order\r\nco = processor.create_change_order(\r\n    title=\"Additional Electrical Outlets\",\r\n    description=\"Add 50 electrical outlets per owner request\",\r\n    change_type=ChangeType.OWNER_REQUESTED,\r\n    created_by=\"Project Manager\"\r\n)\r\n\r\n# Add cost items\r\nprocessor.add_cost_item(co.co_number, \"Electrical outlets\", 50, \"EA\", 150, \"material\")\r\nprocessor.add_cost_item(co.co_number, \"Installation labor\", 25, \"HR\", 85, \"labor\")\r\n\r\n# Set schedule impact\r\nprocessor.set_schedule_impact(co.co_number, days=5)\r\n\r\n# Submit for approval\r\nprocessor.submit_for_review(co.co_number)\r\n```\r\n\r\n## Common Use Cases\r\n\r\n### 1. Process Approval\r\n```python\r\nprocessor.submit_for_approval(co.co_number, \"Reviewer\", \"Cost verified\")\r\nprocessor.approve_change_order(co.co_number, \"Owner Rep\", \"Owner\", \"Approved per request\")\r\n```\r\n\r\n### 2. Get Summary\r\n```python\r\nsummary = processor.get_summary()\r\nprint(f\"Contract value: ${summary['current_contract']:,.0f}\")\r\nprint(f\"Change %: {summary['change_percent']}%\")\r\n```\r\n\r\n### 3. Export Log\r\n```python\r\nprocessor.export_log(\"change_order_log.xlsx\")\r\n```\r\n\r\n## Resources\r\n- **DDC Book**: Chapter 3.1 - Cost Management\r\n- **Reference**: AIA Document G701\r\n",{"slug":5,"description":7,"display_name":34},"Change Order Processor","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fdatadrivenconstruction\u002Fchange-order-processor",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add kbarbel640-del\u002Fskills --skill change-order-processor",{"tool":48,"command":49},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill change-order-processor",{"tool":51,"command":52},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill change-order-processor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fchange-order-processor\u002FSKILL.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"_meta.json","REFERENCE","参考文档",312,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fchange-order-processor\u002F_meta.json",[63,89,113,131,136,156],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":29},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":29},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[96,72,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,77,112],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":29},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[120,121,122,123,124,125,126,73,127,110,112,128,72,129,130],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":132,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":29},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[123,122,121,120,130,125,126,73,124,110,112,127,128,72,129],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":29},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[143,144,145,146,147,148,149,150,151,152,153,154,155],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":29},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[163,164,165,166,73,167,168,35,169,128,170,171,172,173,174,86,175,176,177],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]