cwicr-value-engineering
Perform value engineering analysis using CWICR data. Identify cost-saving alternatives while maintaining function and quality.
What this skill does
# CWICR Value Engineering
## Business Case
### Problem Statement
Projects often exceed budget:
- Where can costs be reduced?
- What alternatives exist?
- How to maintain quality?
- Document VE decisions
### Solution
Systematic value engineering using CWICR data to identify cost-effective alternatives, analyze trade-offs, and document decisions.
### Business Value
- **Cost savings** - Identify reduction opportunities
- **Quality maintenance** - Function-based analysis
- **Documentation** - VE proposal records
- **Client value** - Optimize value for cost
## Technical Implementation
```python
import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from datetime import date
from enum import Enum
class VECategory(Enum):
"""Value engineering categories."""
MATERIAL = "material"
METHOD = "method"
DESIGN = "design"
SPECIFICATION = "specification"
SYSTEM = "system"
class VEStatus(Enum):
"""VE proposal status."""
PROPOSED = "proposed"
UNDER_REVIEW = "under_review"
ACCEPTED = "accepted"
REJECTED = "rejected"
IMPLEMENTED = "implemented"
@dataclass
class VEProposal:
"""Value engineering proposal."""
proposal_id: str
title: str
category: VECategory
description: str
original_item: str
proposed_item: str
original_cost: float
proposed_cost: float
savings: float
savings_percent: float
function_impact: str
quality_impact: str
schedule_impact: int
risk_assessment: str
status: VEStatus
@dataclass
class VEAnalysis:
"""Complete VE analysis."""
project_name: str
total_original_cost: float
total_proposed_cost: float
total_savings: float
savings_percent: float
proposals: List[VEProposal]
accepted_savings: float
pending_savings: float
class CWICRValueEngineering:
"""Value engineering analysis using CWICR data."""
def __init__(self, cwicr_data: pd.DataFrame):
self.cost_data = cwicr_data
self._index_data()
self._proposals: Dict[str, VEProposal] = {}
def _index_data(self):
"""Index cost data."""
if 'work_item_code' in self.cost_data.columns:
self._code_index = self.cost_data.set_index('work_item_code')
else:
self._code_index = None
def get_item_cost(self, code: str, quantity: float = 1) -> Tuple[float, Dict[str, float]]:
"""Get item cost breakdown."""
if self._code_index is None or code not in self._code_index.index:
return (0, {})
item = self._code_index.loc[code]
labor = float(item.get('labor_cost', 0) or 0) * quantity
material = float(item.get('material_cost', 0) or 0) * quantity
equipment = float(item.get('equipment_cost', 0) or 0) * quantity
return (labor + material + equipment, {
'labor': labor,
'material': material,
'equipment': equipment
})
def find_alternatives(self,
work_item_code: str,
quantity: float,
max_cost_increase: float = 0) -> List[Dict[str, Any]]:
"""Find alternative work items that could replace original."""
original_cost, _ = self.get_item_cost(work_item_code, quantity)
if self._code_index is None:
return []
# Get original item category
if work_item_code in self._code_index.index:
original = self._code_index.loc[work_item_code]
category = str(original.get('category', '')).lower()
else:
return []
alternatives = []
for code, row in self._code_index.iterrows():
if code == work_item_code:
continue
# Match by category prefix or similar category
item_category = str(row.get('category', '')).lower()
if category[:4] in item_category or item_category[:4] in category:
alt_cost, breakdown = self.get_item_cost(code, quantity)
if alt_cost <= original_cost * (1 + max_cost_increase):
savings = original_cost - alt_cost
alternatives.append({
'code': code,
'description': str(row.get('description', code)),
'cost': round(alt_cost, 2),
'savings': round(savings, 2),
'savings_pct': round(savings / original_cost * 100, 1) if original_cost > 0 else 0,
'breakdown': breakdown
})
# Sort by savings
return sorted(alternatives, key=lambda x: x['savings'], reverse=True)[:10]
def create_proposal(self,
proposal_id: str,
title: str,
category: VECategory,
description: str,
original_item: str,
proposed_item: str,
quantity: float,
function_impact: str = "Equivalent",
quality_impact: str = "Equivalent",
schedule_impact: int = 0,
risk_assessment: str = "Low") -> VEProposal:
"""Create VE proposal."""
original_cost, _ = self.get_item_cost(original_item, quantity)
proposed_cost, _ = self.get_item_cost(proposed_item, quantity)
savings = original_cost - proposed_cost
savings_pct = (savings / original_cost * 100) if original_cost > 0 else 0
proposal = VEProposal(
proposal_id=proposal_id,
title=title,
category=category,
description=description,
original_item=original_item,
proposed_item=proposed_item,
original_cost=round(original_cost, 2),
proposed_cost=round(proposed_cost, 2),
savings=round(savings, 2),
savings_percent=round(savings_pct, 1),
function_impact=function_impact,
quality_impact=quality_impact,
schedule_impact=schedule_impact,
risk_assessment=risk_assessment,
status=VEStatus.PROPOSED
)
self._proposals[proposal_id] = proposal
return proposal
def update_status(self, proposal_id: str, status: VEStatus):
"""Update proposal status."""
if proposal_id in self._proposals:
self._proposals[proposal_id].status = status
def identify_high_cost_items(self,
items: List[Dict[str, Any]],
top_n: int = 20,
min_percentage: float = 2.0) -> List[Dict[str, Any]]:
"""Identify high-cost items for VE focus."""
item_costs = []
total_cost = 0
for item in items:
code = item.get('work_item_code', item.get('code'))
qty = item.get('quantity', 0)
cost, breakdown = self.get_item_cost(code, qty)
item_costs.append({
'code': code,
'quantity': qty,
'cost': cost,
'breakdown': breakdown
})
total_cost += cost
# Add percentage and sort
for item in item_costs:
item['percentage'] = round(item['cost'] / total_cost * 100, 2) if total_cost > 0 else 0
# Filter and sort
significant = [i for i in item_costs if i['percentage'] >= min_percentage]
significant.sort(key=lambda x: x['cost'], reverse=True)
return significant[:top_n]
def analyze_material_alternatives(self,
material_type: str,
quantity: float) -> Dict[str, Any]:
"""Analyze alternative materials by type."""
if self._code_index is None:
return 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.