📌 專案摘要與架構定位 📌 Executive Summary & Architectural Positioning
本儲存庫為企業管治與工程現場數位轉型之開源概念驗證(PoC),展示如何以「治理即代碼」(Governance-as-Code)原則重塑建造業地盤績效考核。
This repository is an open-source Enterprise Demo illustrating how Governance-as-Code modernizes construction site performance appraisals.
本系統將傳統紙本《高級管工關鍵績效指標(KPI)考核協議書》全面數位化,採用 Streamlit 行動優先介面與純 Python ReportLab 報表核心。系統於底層落實無資料庫零資料保留(Zero-Data-Retention)架構,僅在單次會話記憶體中即時計算與渲染報告,兼顧香港《個人資料(私隱)條例》(PDPO 第 486 章)資料最小化原則與 ISO 9001:2015 條款 7.5 文件可追溯性。
Built on a mobile-first Streamlit interface and pure-Python ReportLab engine, the platform digitizes traditional paper-based Senior Foreman KPI agreements. Operating strictly on a stateless Zero-Data-Retention architecture with no persistent database, it aligns with Hong Kong PDPO (Cap. 486) data minimization principles and ISO 9001:2015 Clause 7.5 documented audit trails.
在演算法治理層面,全數 11 項 KPI 評分門檻與重大違規一票否決規則均為公開透明之確定性邏輯(Deterministic Logic),並強制保留人類監督(Human-in-the-Loop)四方簽署程序,主動對齊 ISO/IEC 42001 透明度要求並排除黑箱 AI 自動化決策風險。
All 11 KPI thresholds and major-breach veto rules rely solely on transparent deterministic logic—avoiding black-box AI scoring while aligning with ISO/IEC 42001 explainability principles and enforcing mandatory Human-in-the-Loop (HITL) 4-party sign-off.
🏛️ 流程生命週期與四階治理閉環 🏛️ Four-Stage Governance Lifecycle
針對傳統地盤考核「紙本難攜、人工手算易錯、扣分口說無憑、審計鏈斷裂」四大痛點,系統建立標準化四階閉環:
Designed to eliminate paper friction, manual calculation errors, unverified deductions, and broken audit trails across construction sites:
主管單手輸入原始次數與成本,即時運算比率與 11 項 KPI 得分,零表單提交延遲。Supervisors enter raw counts and cost figures on mobile for instant percentage and 11-KPI scoring.
每份評核紀錄綁定地盤日誌、驗收批次單或安全巡查編號,確保扣分客觀可核實。Binds site logs, inspection batch IDs, or safety audit references to eliminate unsubstantiated deductions.
重大失聯或安全違規強制判定 F 級,自動提示啟動 ISO 糾正措施(CAPA)與改善計劃(PIP)。Major breaches force Grade F and automatically flag ISO CAPA or 30–60 day PIP procedures.
匯出標準檔名([編號]_[姓名]_[日期].pdf)官方 A4 報告,會話結束即清除伺服器記憶體。Exports standardized [ID]_[Name]_[Date].pdf A4 reports and purges session memory immediately.
📋 考核四大維度與 ISO 7.5 核實矩陣 📋 Four KPI Dimensions & ISO 7.5 Verification Matrix
| 考核維度Dimension | 權重Weight | 核心評核指標(11 項 KPI)Core KPIs (11 Indicators) | ISO 7.5 核實憑據與歸責排除原則ISO 7.5 Evidence & Attribution Guardrails |
|---|---|---|---|
| 一、溝通及匯報1. Communication & Reporting | 20% |
1.1 緊急通訊準時回覆率(8分) 1.2 開工/異常/收工匯報完整率(8分) 1.3 工作行程及場地交接紀錄(4分) 1.1 Emergency Call Response Rate (8 pts) 1.2 Daily Work & Incident Reporting (8 pts) 1.3 Site Transfer & Handover Log (4 pts) |
通訊紀錄、每日匯報時間戳記、跨場地交接登記表;排除非辦公時間及不可控訊號盲區。 Call logs, daily report timestamps, transfer registers; excludes off-duty hours and uncontrollable signal outages. |
| 二、工程進度及技術執行2. Progress & Technical Execution | 35% |
2.1 里程碑按時完成率(15分) 2.2 首次驗收通過率(12分) 2.3 圖紙版本/RFI/技術交底(8分) 2.1 Milestone On-Time Completion (15 pts) 2.2 First-Time Inspection Pass Rate (12 pts) 2.3 Drawing / RFI / Technical Briefing (8 pts) |
總進度表、驗收批次紀錄單、RFI 澄清文件及交底簽署表;排除惡劣天氣及業主改圖延誤。 Master programme, inspection batch records, RFI logs, briefing sign-offs; excludes weather and client redesign delays. |
| 三、物料及成本控制3. Material & Cost Control | 15% |
3.1 物料核對準確率(8分) 3.2 可避免物料損耗率(7分) 3.1 Material Requisition & Receipt Accuracy (8 pts) 3.2 Avoidable Material Wastage Rate (7 pts) |
收貨對單表、報廢審定單;嚴格排除設計變更、業主指示及非本施工組導致之正常損耗。 Delivery verification notes and scrap approval sheets; excludes design variations and non-attributable normal wastage. |
| 四、安全及團隊管理4. Safety & Team Management | 30% |
4.1 安全巡查整改完成率(12分) 4.2 風險評估及事件呈報(10分) 4.3 出勤核實及人手調配(8分) 4.1 Safety Rectification Completion (12 pts) 4.2 Risk Assessment & Incident Reporting (10 pts) 4.3 Attendance Verification & Allocation (8 pts) |
安全巡查整改通知書、動態風險評估表、工具箱會議紀錄及每日工人出勤核實紀錄。 Safety rectification notices, dynamic risk assessments, toolbox talk logs, and daily attendance registers. |
🧮 互動式 11 項 KPI 即時計分與一票否決模擬器 🧮 Interactive 11-KPI Real-Time Scoring & Veto Simulator
本模擬器與 app.py 採用 100% 一致的確定性算分引擎。你可以套用預設情境、調整任一現場原始數據,或勾選「一票否決」即時測試等級判定、CAPA/PIP 警示與標準化 PDF 檔名產出:
Powered by the exact deterministic scoring rules in app.py. Apply quick presets, modify raw site figures, or toggle the Major Breach Veto to preview real-time grading, CAPA/PIP alerts, and standardized PDF naming:
| # | KPI 評核指標KPI Indicator | 現場原始數據輸入Raw Site Data Input | 計算比率/狀態Calculated Rate / Status | 即時得分Score |
|---|---|---|---|---|
| 一、溝通及匯報(權重 20%) Dimension 1: Communication & Reporting (Weight 20%) | ||||
1.1 |
緊急通訊準時回覆率Emergency Call Response |
準時On-time
/ 總數Total
|
95.0% | 8 / 8 |
1.2 |
開工/異常/收工匯報完整率Daily Report Completion |
合規OK
/ 應交Due
|
100.0% | 8 / 8 |
1.3 |
工作行程及場地交接紀錄Site Transfer Log |
漏登Missed
/ 總次Total
|
0 | 4 / 4 |
| 二、工程進度及技術執行(權重 35%) Dimension 2: Progress & Technical Execution (Weight 35%) | ||||
2.1 |
里程碑按時完成率Milestone Completion |
完成Done
/ 到期Due
|
90.0% | 15 / 15 |
2.2 |
首次驗收通過率First Inspection Pass |
通過Pass
/ 批次Batches
|
85.0% | 12 / 12 |
2.3 |
圖紙版本/RFI/技術交底事件Drawing / RFI / Briefing Incidents |
輕Min
中Med
重Maj
|
1 / 0 / 0 | 6 / 8 |
| 三、物料及成本控制(權重 15%) Dimension 3: Material & Cost Control (Weight 15%) | ||||
3.1 |
物料核對準確率Material Accuracy |
準確OK
/ 項目Items
|
98.0% | 8 / 8 |
3.2 |
可避免物料損耗率(金額)Avoidable Material Wastage |
損耗Loss
/ 成本Cost
|
1.50% | 7 / 7 |
| 四、安全及團隊管理(權重 30%) Dimension 4: Safety & Team Management (Weight 30%) | ||||
4.1 |
安全巡查整改完成率Safety Rectification Rate |
完成Done
/ 應改Due
|
95.0% | 12 / 12 |
4.2 |
風險評估及事件呈報Risk Assessment & Reporting |
合規OK
/ 應交Due
|
96.2% | 8 / 10 |
4.3 |
出勤核實及調配差異Attendance Verification Discrepancies |
差異Diff
/ 日數Days
|
1 | 6 / 8 |
DEMO-001_示範管工_20261119.pdf
🛡️ ISO 7.5 追溯狀態:
🛡️ ISO 7.5 Traceability:
OK
🔍 檢視即時生成的結構化 JSON Payload(對齊後端 Schema 與審批流程) 🔍 Inspect Live Structured JSON Payload (Schema & Approval Flow Ready)
⚙️ 技術亮點與合規工程實踐 ⚙️ Technical & Compliance Engineering Highlights
1. 零資料保留架構Zero-Data-Retention Architecture
全系統採無狀態記憶體計算,不設後端永久資料庫,用畢即棄,從架構層面杜絕員工績效個資外洩風險。Stateless in-memory computation with zero persistent database eliminates backend PII exposure risks by design.
2. 確定性透明演算法Deterministic Scoring Transparency
完整開源 11 項 KPI 算分規則與閥值條件,無黑箱 AI 推論,對齊 ISO/IEC 42001 可解釋性與審計要求。Open-source thresholds for all 11 KPIs without black-box AI, aligning with ISO/IEC 42001 explainability and auditability.
3. 純 Python ReportLab 引擎Pure-Python ReportLab PDF Engine
捨棄依賴 C 語言底層庫之方案,以純 Python 生成矢量 A4 四方簽署報表,確保雲端部署 100% 穩定相容。Eliminates C-library deployment dependencies, generating vector A4 4-party sign-off reports reliably across cloud platforms.
4. ISO 7.5 實據與四方閉環ISO 7.5 Evidence & 4-Party Closure
強制串聯工程日誌單號與被考核者、主管、QMS/HR 審核員及公司代表四方簽署,兼顧程序正義與稽核留痕。Pairs site log references with 4-party sign-off (Employee, Supervisor, QMS/HR Auditor, Authorized Rep) for due process.