Guidewire Multi-Layer Policy Integrity and Automated Correction Engine with persisted governance, ROI evidence, and integration proof points.
Core lifecycle:
Detect -> Classify -> Correct -> Re-validate (once) -> Score -> Audit
This is a PolicyCenter-style accelerator that demonstrates how insurers can:
- detect policy data issues across multiple validation layers,
- apply governed corrections safely,
- keep humans in control when needed,
- measure measurable ROI,
- and publish integration-ready events for enterprise adoption.
It is built as a runnable platform (Node.js + web UI + MySQL) and also includes Guidewire scaffold artifacts (Gosu, typelists, entity extensions, rules, PCF) for architecture mapping.
Execution can run in rollout profiles:
- Validation Only
- Human-in-the-Loop
- Full Automation
This allows incremental adoption instead of all-or-nothing rollout.
- Suggested issues can be approved/rejected.
- Approval path supports correction execution for auto-fixable suggestions.
- Manual/blocked issues can be resolved by reviewer action when deterministic manual resolution is available.
- Confidence threshold controls when auto-fix is allowed.
The platform computes and exposes:
- weekly manual hours saved,
- weekly review hours,
- net weekly hours,
- issue reduction percentage,
- blocked-case risk cost avoided.
ROI assumptions are configurable and persisted.
- Integration events are produced for PolicyCenter and BillingCenter targets.
- Event stream is queryable by policy and target system.
- Manual publish endpoint exists for demo-driven PoC runs.
Dashboard and ROI summary explicitly position the platform as closed-loop policy governance that reduces downstream compliance and servicing risk.
This solution is framed as:
- Guidewire Policy Integrity Engine (PIE)
- Closed-Loop Policy Governance Engine
The emphasis is proactive risk reduction, not just correction tooling.
- Dashboard
- KPI cards, severity/status charts, before/after score proof, batch summary, ROI highlights
- Adoption Studio
- rollout profile controls, confidence threshold, ROI assumption tuning, integration publish controls
- governance draft/apply workflow (edit safely, then commit)
- readiness snapshot (active profile, pending draft, threshold, integration flags)
- integration stream filters (search, policy, target, status) backed by API queries
- integration payload inspector for selected event rows
- Policy Workbench
- create/update/delete policy, run selected policy, run all policies, guided demo, demo case load/seed
- Guidewire-style policy creation fields (account, LOB/product, term dates, jurisdiction, producer, underwriter, submission channel, billing plan, currency)
- advanced policy filters (lifecycle status, policy state, LOB, customer-linked flag, producer, jurisdiction, effective date range)
- Validation Center
- filter issues by severity/status/policy/search + correction mode, auto-fixability, and confidence range
- Correction Center
- applied correction history + suggestion queue + manual resolution queue
- queue filters (policy, severity, rule, search) + bulk approve/resolve actions
- Audit Logs
- timeline + filtered export
- filters by policy, module, search, and date range
- Rule Configuration
- enable/disable rule, severity override, reset defaults, optional auto re-run
- autoFixable
- correctionMode (Auto, Suggested, Manual)
- correctionConfidence
- alreadyCorrected
Duplicate issue records are prevented via ruleId + issueKey dedupe.
- Validation Only
- validation on, correction off, re-validation off, auto-fix off
- Human-in-the-Loop
- validation on, correction on, re-validation on, auto-fix off
- Full Automation
- validation/correction/re-validation on, auto-fix allowed by confidence threshold
Unresolved critical conditions transition policy status to BLOCKED.
Severity deductions:
- Critical: -20
- High: -10
- Medium: -5
- Low: -2
Formula:
- score = clamp(100 - totalDeduction, 0, 100)
Resolved issues do not deduct score.
Default assumptions:
- minutesPerAutoCorrection = 12
- reviewMinutesPerSuggestedIssue = 6
- blockedCaseCostAvoided = 220
Computed outputs:
- weeklyHoursSaved
- weeklyReviewHours
- netWeeklyHours
- issueReductionPercent
- riskCostAvoided
Default targets:
- PolicyCenter
- BillingCenter
Event type:
- PolicyIntegrityEvaluated
Event payload includes:
- source and actor
- governance snapshot
- policy score/status snapshot
- issue/correction/blocked metrics
- generation timestamp
- Host: localhost
- Port: 3306
- User: root
- Password: Bunny
- Database: guidewire_policy_integrity
You can override via environment variables:
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_DATABASE
- AUDIT_MEMORY_CACHE_SIZE (default: 2000)
- INTEGRATION_MEMORY_CACHE_SIZE (default: 2000)
- platform_policies
- policy input, scores, status history, issues, corrections, logs, run timestamps
- platform_rules
- rule enabled/severity overrides
- platform_audit_events
- full action timeline
- platform_settings
- governance profile config + ROI assumptions
- platform_integration_events
- integration event history for PoC evidence
Persisted flows include:
- policy create/update/delete,
- single run,
- run-all,
- direct validate endpoint,
- suggestion approve/reject,
- rules update/reset,
- governance update,
- ROI assumption update,
- integration publish,
- full platform reset.
UI-only local state (active tab, transient filter values) is intentionally not persisted.
/api/platform/bootstrapreturns up to 100 audit events and 100 integration events./api/platform/auditsreturns up to 200 events per request./api/platform/integration/eventsreturns up to 200 events per request.- In-memory audit/integration caches are capped by
AUDIT_MEMORY_CACHE_SIZEandINTEGRATION_MEMORY_CACHE_SIZE.
- Frontend
- public/index.html
- public/styles.css
- Backend
- server/app.js
- server/platformStore.js
- server/policyMapper.js
- Engine/services
- project/engine/PolicyIntegrityEngine.js
- project/services/ValidationService.js
- project/services/CorrectionService.js
- project/services/ScoreService.js
- project/services/ruleCatalog.js
- Domain entities/models
- project/model/Policy.js
- project/model/Customer.js
- project/entity/PolicyIssue.js
- project/entity/PolicyCorrection.js
- Tests
- test/engine-and-services.test.js
- Entity extensions
- config/extensions/entity/Policy.etx
- config/extensions/entity/PolicyIssue_Ext.eti
- config/extensions/entity/PolicyCorrection_Ext.eti
- Typelists
- config/extensions/typelist/PISeverity.ttx
- config/extensions/typelist/PICorrectionMode.ttx
- Gosu
- config/gosu/com/guidewire/policyintegrity/ValidationService.gs
- config/gosu/com/guidewire/policyintegrity/CorrectionService.gs
- config/gosu/com/guidewire/policyintegrity/ScoreService.gs
- config/gosu/com/guidewire/policyintegrity/PolicyIntegrityOrchestrator.gs
- config/gosu/com/guidewire/policyintegrity/PolicyIntegritySaveHook.gs
- config/gosu/com/guidewire/policyintegrity/PolicyIntegrityConstants.gs
- Rule/PCF placeholders
- config/rules/PolicyIntegrityOnSave.gr
- config/pcf/policy/PolicyIntegrityDashboard.pcf
- Node.js 18+
- MySQL 8+
npm install$env:PORT="3000"
$env:MYSQL_HOST="localhost"
$env:MYSQL_PORT="3306"
$env:MYSQL_USER="root"
$env:MYSQL_PASSWORD="Bunny"
$env:MYSQL_DATABASE="guidewire_policy_integrity"
$env:AUDIT_MEMORY_CACHE_SIZE="2000"
$env:INTEGRATION_MEMORY_CACHE_SIZE="2000"npm startStartup behavior:
- The platform creates the MySQL database and required tables if missing.
- If MySQL initialization fails, server startup fails fast and exits.
Open:
npm run demonpm testCurrent suite validates:
- full-automation auto-fix and suggestion behavior,
- validation-only no-correction behavior,
- critical blocking behavior,
- reviewer approval flow for suggested auto-fixable issues.
- full-automation billing deactivation for cancelled policies,
- duplicate-customer suggestion approval resolution path,
- manual resolution for blocked invalid configuration issues,
- manual resolution for missing-customer issues.
- GET /api/health
- GET /api/demo-cases
- POST /api/validate-policy
- optional request fields: actor, profile (validation-only | human-in-loop | full-automation), mode
- GET /api/platform/bootstrap
- returns policies, rules, auditEvents, governance, roiAssumptions, roi, integrationEvents
- auditEvents and integrationEvents are each capped to latest 100 records
- GET /api/platform/roi
- PATCH /api/platform/roi-assumptions
- GET /api/platform/governance
- PATCH /api/platform/governance
- supported fields: mode, enableValidation, enableCorrection, enableRevalidation, autoApplyCorrections, autoApplyMinConfidence, emitIntegrationEvents
- GET /api/platform/policies
- query:
search,lifecycleStatus,policyState,lineOfBusiness,producerCode,jurisdiction,hasCustomer,effectiveFrom,effectiveTo
- query:
- POST /api/platform/policies
- payload supports Guidewire-style metadata fields in addition to simulation fields:
accountNumber,lineOfBusiness,productCode,offering,termTypeeffectiveDate,expirationDate,jurisdictionproducerCode,underwriter,submissionChannel,billingPlan,currency- customer and simulation fields (
hasCustomer,customerName,customerAddress,policyAddress,premium,coverage, etc.)
- payload supports Guidewire-style metadata fields in addition to simulation fields:
- PUT /api/platform/policies/:policyId
- DELETE /api/platform/policies/:policyId
- POST /api/platform/policies/:policyId/run
- optional body: actor, profile, mode
- POST /api/platform/run-all
- optional body: actor, profile, mode
- response includes per-policy run list, status summary, and
integrationEventCount
- POST /api/platform/reset
- GET /api/platform/issues
- query: severity, status, ruleId, policyId, search, correctionMode, autoFixable, minConfidence, maxConfidence
- GET /api/platform/corrections
- GET /api/platform/audits
- query: policyId, module, search, fromDate, toDate, limit
- returns latest 200 events after optional filtering
- GET /api/platform/rules
- PATCH /api/platform/rules/:ruleId
- POST /api/platform/rules/reset
- POST /api/platform/policies/:policyId/issues/:issueKey/action
- body: action = approve | reject | resolve, optional actor, optional customerName/customerAddress for manual customer-link resolution
- returns
400for invalid action values - returns
409when action is not valid for the issue status - returns
422when a manual resolution is requested but cannot be applied - successful response returns both updated issue and policy summary
- GET /api/platform/integration/events
- query: policyId, targetSystem, status, search, limit
- returns latest 200 events after optional filtering
- POST /api/platform/integration/policies/:policyId/publish
- body: optional actor, optional targets array
- Platform-created policies use
POL-PLT-<counter>IDs. - Audit events use
AUD-<counter>IDs. - Integration events use
INT-<counter>IDs. - Policy status lifecycle is tracked in history:
NEW -> VALIDATED | CORRECTED | BLOCKED(with timestamps).
Use this sequence in presentation:
- Seed demo cases from Workbench.
- Show Adoption Studio profile = Validation Only and run-all.
- Switch to Human-in-the-Loop and show suggestion queue approvals.
- Switch to Full Automation and tune confidence threshold.
- Open Dashboard to show score delta and ROI cards.
- Publish integration payload for selected policy to PolicyCenter/BillingCenter.
- Show Audit Logs and Integration Events as adoption evidence.
- Show MySQL table data for persistence proof.
SHOW DATABASES;
USE guidewire_policy_integrity;
SHOW TABLES;
SELECT COUNT(*) AS policies FROM platform_policies;
SELECT COUNT(*) AS rules FROM platform_rules;
SELECT COUNT(*) AS audits FROM platform_audit_events;
SELECT COUNT(*) AS settings FROM platform_settings;
SELECT COUNT(*) AS integration_events FROM platform_integration_events;
SELECT policy_id, status, score_before, score_after, updated_at
FROM platform_policies
ORDER BY updated_at DESC
LIMIT 20;
SELECT event_id, policy_id, module, message, timestamp
FROM platform_audit_events
ORDER BY timestamp DESC
LIMIT 50;
SELECT integration_event_id, policy_id, target_system, event_type, status, created_at
FROM platform_integration_events
ORDER BY created_at DESC
LIMIT 50;Guidewire Policy Integrity Engine (PIE) is a closed-loop policy governance platform that reduces policy defects, shortens manual correction cycles, strengthens compliance evidence, and integrates with InsuranceSuite workflows through low-risk phased adoption.
This repository is a high-fidelity simulation and architecture accelerator. It mirrors enterprise Guidewire patterns and integration behavior for demo, design, and evaluation without embedding proprietary Guidewire runtime internals.
Guidewire scaffold caveats:
- Gosu simulation parity now uses Policy extension driver fields:
PolicyAddressText,CustomerAddressText,BillingActive,DuplicateCustomerCandidate,ConfigValid. - Replace simulation-driver checks with real product-model, customer-resolution, and BillingCenter integrations in production.
- Treat Gosu/PCF/rule artifacts as accelerator scaffolding to be completed and bound in a live InsuranceSuite environment.
Use this sequence if you want to learn the complete application quickly and present it confidently.
- Read sections 1, 2, and 4 to understand purpose and governance.
- Start the app and seed a few policies in Policy Workbench.
- Run all policies and review Dashboard status bars and ROI cards.
- Open Validation Center and Correction Center to show issue -> action -> outcome flow.
- Open Audit Logs and Integration events to show traceability and enterprise readiness.
- Walk the backend execution in
server/app.js(resolveGovernanceForRun,computePolicyStatus,computeRoiSummary). - Walk the engine and services:
project/engine/PolicyIntegrityEngine.jsproject/services/ValidationService.jsproject/services/CorrectionService.jsproject/services/ScoreService.js
- Inspect persistence/state and schema in
server/platformStore.js. - Review UI module renderers and handlers in
public/index.html. - Run
npm testand read test scenarios intest/engine-and-services.test.js.
When user clicks Validate Policy, Run, or Run All, this is what happens:
- UI sends request to backend route (
/api/platform/policies/:policyId/runor/api/platform/run-all). - Backend resolves governance profile and controls (
validation-only,human-in-loop,full-automation). - Policy payload is mapped into domain model via
server/policyMapper.js. - Engine executes lifecycle:
- Detect (validation pass 1)
- Classify (score before)
- Correct/Suggest/Block
- Re-validate once
- Score (final)
- Audit log entries
- Backend computes status (
VALIDATED,CORRECTED,BLOCKED) and persists snapshot. - Audit events and integration events are written (if enabled).
- UI refreshes bootstrap state and all modules update from persisted backend state.
- 4 validation layers: Field, Business, Cross-Entity, Cross-System.
- 7 rules in
project/services/ruleCatalog.js:VAL_PREMIUM_NEGATIVEVAL_POLICY_ADDRESS_MISSINGBUS_COVERAGE_PREMIUM_MISMATCHBUS_POLICY_CONFIG_INVALIDXENT_MISSING_CUSTOMERXENT_DUPLICATE_CUSTOMERXSYS_BILLING_ACTIVE_ON_CANCELLED
- Rule enable/disable and severity override.
- Dedupe logic by
ruleId|issueKey. - Single re-validation pass to avoid correction loops.
- Profile-based execution behavior.
- Threshold-based auto-apply for low-risk auto-fix rules.
- Human suggestion queue and approve/reject actions.
- Cross-system auto-fix for cancelled policies with active billing (
AutoBillingDeactivation). - Reviewer approval flow can resolve duplicate-customer suggestions (
SuggestedDuplicateResolution). - Integration event toggle and target selection.
- Dashboard with KPI cards and four charts.
- Adoption Studio for governance, ROI assumptions, integration publish.
- Policy Workbench with policy CRUD, run single, run all, reset, export snapshot.
- Validation Center with filterable issue table.
- Correction Center with applied corrections and suggestion queue actions.
- Correction Center with applied corrections, suggestion queue, and manual resolution queue.
- Audit Logs with timeline and export.
- Rule Configuration with live override and optional auto re-run.
- MySQL-backed persistence with automatic schema creation.
- In-memory caches with configurable caps.
- Persisted settings: governance profile and ROI assumptions.
- Persisted evidence: policy snapshots, audits, integration events.
- Automated tests for key lifecycle and governance behavior (
npm test). - Defensive API responses for invalid issue-action requests (
400,409).
| Field | Type | Meaning | Typical values |
|---|---|---|---|
premium |
number | Policy premium used in field/business checks | -500, 8000 |
coverage |
number | Coverage amount used in premium consistency rule | 100000, 200000 |
status |
string | Policy state for cross-system rule | Active, Cancelled |
hasCustomer |
boolean | Whether customer object is created | true, false |
customerName |
string | Customer display name | Aarav Sharma |
customerAddress |
string | Source for address auto-fill rule | 12 Green Street |
policyAddress |
string/null | Policy address value | empty or populated |
duplicateCustomerCandidate |
boolean | Triggers duplicate suggestion rule | true, false |
billingActive |
boolean | Used by cancelled+billing cross-system rule | true, false |
configValid |
boolean | Critical blocker flag | true, false |
actor |
string | User/system identity for audit trails | ui.user, demo.mode |
- Identity:
ruleId,issueKey,issueType. - Severity/governance:
severity,autoFixable,correctionMode,correctionConfidence. - Lifecycle:
status,alreadyCorrected. - Audit:
detectedAt,detectedBy,correctedAt,correctedBy.
Status values used in platform:
OpenResolvedSuggestedBlockedApprovedRejected
- Linkage:
issueId,ruleId. - Action details:
correctionType,actionTaken,oldValue,newValue. - Audit details:
correctedAt,correctedBy.
NEW: created or updated but not run yet.VALIDATED: run completed; no corrections and no blockers.CORRECTED: at least one correction exists and no blockers.BLOCKED: one or more blocking issues exist.
Purpose:
- Executive summary of quality, correction outcomes, confidence, and ROI.
What it shows:
- Status counts (
VALIDATED,CORRECTED,BLOCKED). - Before vs after score for latest run.
- Auto-correction examples.
- Severity distribution, status chart, score trend, issue trend.
How to read it:
- If
BLOCKEDis zero, risk cost avoided remains$0. - If
CORRECTEDis high, automation is actively fixing low-risk issues.
Purpose:
- Governance control center and ROI tuning.
What each control does:
- Execution Profile: switches behavior matrix.
- Auto-Apply Minimum Confidence: threshold for auto-fix.
- Emit integration events: enables/disables event creation.
- Auto-apply low-risk corrections: toggles correction auto-application.
- ROI assumptions: changes labor/risk model calculations.
Purpose:
- Main authoring and execution screen for policy records.
Capabilities:
- Create, update, delete policy.
- Run selected policy.
- Run all policies.
- Seed demo pack and guided demo.
- Export selected snapshot.
- Reset full platform state.
Purpose:
- Operational queue for detected issues.
Capabilities:
- Filter by severity, status, policy, search.
- Review rule-level and policy-level issue details.
Purpose:
- Operational queue for remediation and reviewer decisions.
Capabilities:
- View applied corrections history.
- Review suggestion queue.
- Approve/reject suggestions.
- Resolve blocked/manual issues through reviewer-driven manual resolution action.
Behavior details:
approveandrejectrequire issue statusSuggested.resolveis used for blocked/manual unresolved issues.- Invalid action values return
400. - Invalid action/state combinations return
409. - Unsupported manual resolution attempts return
422. - Approving
XENT_DUPLICATE_CUSTOMERclears duplicate candidate flag and records a correction. - Resolving
BUS_POLICY_CONFIG_INVALIDappliesManualConfigNormalization. - Resolving
XENT_MISSING_CUSTOMERappliesManualCustomerLinkResolution(uses customer hints or provided customer payload).
Purpose:
- Explainability and evidence trail.
Capabilities:
- Filter by selected policy.
- View timeline by module/step.
- Export audit JSON.
Purpose:
- Change rule runtime behavior without code changes.
Capabilities:
- Change severity override.
- Enable/disable rules.
- Re-run selected policy.
- Restore defaults.
- Optional auto re-run after rule update.
Use these exact policy shapes to produce reliable outcomes.
premium:8000coverage:100000status:ActivehasCustomer:truecustomerAddress:12 Green StreetpolicyAddress:12 Green StreetduplicateCustomerCandidate:falsebillingActive:falseconfigValid:true
Expected result:
- Status:
VALIDATED - Issues:
0 - Corrections:
0
premium:-500coverage:200000status:ActivehasCustomer:truecustomerAddress:12 Green StreetpolicyAddress: emptyduplicateCustomerCandidate:falsebillingActive:falseconfigValid:true
Expected result:
- Status:
CORRECTED - Typical corrections:
AutoPremiumRecalculationAutoAddressAutofill
premium:9000coverage:100000status:ActivehasCustomer:truepolicyAddress:12 Green StreetduplicateCustomerCandidate:falsebillingActive:falseconfigValid:false
Expected result:
- Status:
BLOCKED - Critical issue:
BUS_POLICY_CONFIG_INVALID
- Use same as validated but set
duplicateCustomerCandidate=true.
Expected result:
- Issue
XENT_DUPLICATE_CUSTOMERinSuggestedstatus. - On approval from Correction Center, issue resolves and correction
SuggestedDuplicateResolutionis recorded.
premium:6000coverage:100000status:CancelledhasCustomer:truecustomerAddress:12 Green StreetpolicyAddress:12 Green StreetduplicateCustomerCandidate:falsebillingActive:trueconfigValid:true
Expected result:
- Status:
CORRECTED - Issue
XSYS_BILLING_ACTIVE_ON_CANCELLEDresolved - Correction
AutoBillingDeactivation
VALIDATEDbar: clean outcomes with no correction and no blocker.CORRECTEDbar: successful correction outcomes.BLOCKEDbar: unresolved critical/manual blockers.
Risk Cost Avoided = blockedPolicies * blockedCaseCostAvoided
If blocked count is zero, the risk card stays at $0.
- Threshold is governance
autoApplyMinConfidence. - Above threshold: candidates eligible for auto-apply.
- Below threshold: candidates moved to suggestion/manual flow.
POST /api/platform/policies
Content-Type: application/json{
"premium": -500,
"coverage": 200000,
"status": "Active",
"hasCustomer": true,
"customerName": "Aarav Sharma",
"customerAddress": "12 Green Street",
"policyAddress": null,
"duplicateCustomerCandidate": true,
"billingActive": false,
"configValid": true,
"actor": "ui.user"
}POST /api/platform/policies/:policyId/run
Content-Type: application/json{
"actor": "ui.user",
"profile": "full-automation"
}POST /api/platform/run-all
Content-Type: application/json{
"actor": "platform.batch",
"profile": "full-automation"
}POST /api/platform/policies/:policyId/issues/:issueKey/action
Content-Type: application/json{
"action": "approve",
"actor": "reviewer.user"
}POST /api/platform/integration/policies/:policyId/publish
Content-Type: application/json{
"actor": "integration.user",
"targets": ["PolicyCenter", "BillingCenter"]
}- You are likely running only auto-fixable scenarios.
- Create one clean policy and one blocker policy to diversify status chart.
- No critical unresolved issue exists in test data.
- Set
configValid=falseorhasCustomer=falseand re-run.
- Confidence threshold may allow auto-fix, or data has no suggestion rules triggered.
- Set
duplicateCustomerCandidate=truefor suggestion example.
- Check governance toggle
emitIntegrationEvents. - Check selected targets and publish action in Adoption Studio.
- Rule Configuration may auto-rerun selected policy when enabled.
- Severity and enable/disable changes immediately affect scoring and issue generation.
Current automated tests verify:
- Full automation auto-fix path and suggestion retention.
- Validation-only no-correction behavior.
- Critical blocking behavior.
- Suggestion approval applying correction.
- Full-automation billing deactivation for cancelled policies.
- Duplicate-customer suggestion approval resolution path.
- Manual resolution for blocked invalid configuration issues.
- Manual resolution for blocked missing-customer issues.
Before live InsuranceSuite rollout:
- Replace simulation driver checks with real service integrations.
- Bind
PolicyIntegrityOnSave.grto actual pre-update lifecycle in tenant. - Add authentication, authorization, and role-based controls.
- Add API integration tests and UI regression tests.
- Add environment-specific secrets handling.
- Add monitoring and alerting around run failures and integration publish failures.
- PIE: Policy Integrity Engine.
- Auto-fixable: issue can be remediated automatically by deterministic logic.
- Suggested: issue requires human decision.
- Blocked: policy cannot proceed because critical unresolved issue exists.
- Governance profile: execution behavior pack (validation-only, human-in-loop, full-automation).