guidewire-local-dev-loop
Configure local Guidewire development workflow with Guidewire Studio, Gosu debugging, and hot reload capabilities. Use when setting up development environment, configuring IDE, or optimizing dev workflow. Trigger with phrases like "guidewire local dev", "guidewire studio setup", "gosu development", "guidewire debugging", "configure guidewire ide".
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2.0k
- Forks
- 233
01 前言 Front Matter
- name
- guidewire-local-dev-loop
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Configure local Guidewire development workflow with Guidewire Studio, Gosu debugging, and hot reload capabilities. Use when setting up development environment, configuring IDE, or optimizing dev workflow. Trigger with phrases like "guidewire local dev", "guidewire studio setup", "gosu development", "guidewire debugging", "configure guidewire ide".
- allowed-tools
- Read, Write, Edit, Bash(java:*), Bash(gradle:*), Bash(git:*), Grep
03 SKILL.md 正文
Guidewire Local Dev Loop
Overview
Set up an efficient local development workflow with Guidewire Studio, including hot reload, Gosu debugging, and continuous testing.
Prerequisites
- JDK 17 installed and configured
- IntelliJ IDEA (Ultimate recommended) or Guidewire Studio
- Gradle 8.x
- Git for version control
- Access to Guidewire Cloud sandbox environment
Instructions
Step 1: Configure IDE Settings
# IntelliJ IDEA settings for Guidewire
# File > Settings > Build, Execution, Deployment > Build Tools > Gradle
# Set Gradle JVM to JDK 17
# Enable auto-import for Gradle projects
# Set test runner to Gradle
IntelliJ Plugins to Install:
- Gosu Language Support
- Guidewire Studio Plugin
- EditorConfig
Step 2: Project Structure Setup
# Standard Guidewire project structure
project-root/
├── build.gradle # Main build configuration
├── settings.gradle # Multi-project settings
├── gradle.properties # Gradle properties
├── modules/
│ ├── configuration/ # Gosu configuration code
│ │ ├── gsrc/ # Gosu source files
│ │ └── config/ # XML configuration
│ └── integration/ # Integration code
├── database/
│ └── upgrade/ # Database upgrade scripts
└── build/
└── idea/ # IDE-specific files
Step 3: Configure Local Server
// build.gradle - Local server configuration
plugins {
id 'com.guidewire.gradle' version '10.12.0'
}
guidewire {
server {
port = 8080
debugPort = 5005
jvmArgs = [
'-Xmx4g',
'-XX:+UseG1GC',
'-Dgw.server.mode=dev'
]
}
database {
server = 'localhost'
port = 5432
name = 'pc_dev'
username = 'postgres'
password = System.getenv('DB_PASSWORD') ?: 'password'
}
}
// Hot reload configuration
tasks.register('devServer') {
dependsOn 'classes'
doLast {
exec {
commandLine 'java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005',
'-jar', 'build/libs/server.jar'
}
}
}
Step 4: Database Setup
# Create local development database
createdb -U postgres pc_dev
# Run database upgrade
./gradlew dbUpgrade
# Reset database (caution: destroys data)
./gradlew dbReset
# Generate sample data
./gradlew loadSampleData
Step 5: Start Development Server
# Start server with hot reload
./gradlew runServer
# Start with debugging enabled
./gradlew runServer --debug-jvm
# Start specific application
./gradlew :policycenter:runServer
Step 6: Configure Hot Reload
// Enable Gosu hot swap in development
// config/dev-config.xml
<config>
<development>
<hot-swap enabled="true"/>
<gosu-reload enabled="true"/>
<pcf-reload enabled="true"/>
</development>
</config>
IDE Configuration for Hot Reload:
- Run > Edit Configurations > Remote JVM Debug
- Set port to 5005
- Start debug session after server is running
Gosu Development Workflow
Create New Gosu Class
// gsrc/gw/custom/MyService.gs
package gw.custom
uses gw.api.database.Query
uses gw.api.util.Logger
class MyService {
private static final var LOG = Logger.forCategory("MyService")
static function processPolicy(policyNumber : String) : Policy {
LOG.info("Processing policy: ${policyNumber}")
var policy = Query.make(Policy)
.compare(Policy#PolicyNumber, Equals, policyNumber)
.select()
.AtMostOneRow
if (policy == null) {
throw new IllegalArgumentException("Policy not found: ${policyNumber}")
}
// Business logic here
return policy
}
}
Unit Testing
// test/gsrc/gw/custom/MyServiceTest.gs
package gw.custom
uses gw.testharness.v3.PLTestCase
uses gw.testharness.v3.PLAssert
class MyServiceTest extends PLTestCase {
function testProcessPolicy() {
// Setup test data
var account = createTestAccount()
var policy = createTestPolicy(account)
// Execute
var result = MyService.processPolicy(policy.PolicyNumber)
// Assert
PLAssert.assertNotNull(result)
PLAssert.assertEquals(policy.PolicyNumber, result.PolicyNumber)
}
private function createTestAccount() : Account {
var account = new Account()
account.AccountNumber = "TEST-" + System.currentTimeMillis()
account.Bundle.commit()
return account
}
}
Run Tests
# Run all tests
./gradlew test
# Run specific test class
./gradlew test --tests "gw.custom.MyServiceTest"
# Run with coverage
./gradlew test jacocoTestReport
# Continuous testing (watch mode)
./gradlew test --continuous
PCF Development
<!-- pcf/AccountDetailScreen.pcf -->
<?xml version="1.0"?>
<PCF
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="pcf.xsd">
<Screen
id="AccountDetailScreen"
editable="true">
<Require var="account" type="Account"/>
<Toolbar>
<ToolbarButton
action="saveAccount()"
id="SaveButton"
label="Save"/>
</Toolbar>
<DetailViewPanel>
<InputColumn>
<TextInput
editable="true"
id="AccountNumber"
label="Account Number"
value="account.AccountNumber"/>
<TextInput
editable="true"
id="AccountName"
label="Account Name"
value="account.AccountHolderContact.DisplayName"/>
</InputColumn>
</DetailViewPanel>
<Code>
<![CDATA[
function saveAccount() {
account.Bundle.commit()
util.LocationUtil.addRequestScopedInfoMessage("Account saved")
}
]]>
</Code>
</Screen>
</PCF>
Output
- Running local development server
- Hot reload enabled for Gosu and PCF changes
- Debug session attached to IDE
- Unit tests executing successfully
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Port already in use | Server already running | Kill existing process or change port |
| Database connection failed | Wrong credentials/missing DB | Check postgres is running |
| Gosu compilation error | Syntax error | Check IDE error highlights |
| Hot reload not working | Debug not attached | Reconnect debugger |
| Out of memory | Insufficient heap | Increase -Xmx in jvmArgs |
Development Commands Cheatsheet
# Build
./gradlew clean build
# Run server
./gradlew runServer
# Database operations
./gradlew dbUpgrade
./gradlew dbReset
./gradlew loadSampleData
# Testing
./gradlew test
./gradlew test --tests "ClassName.methodName"
./gradlew test --continuous
# Code quality
./gradlew gosucheck
./gradlew spotlessApply
# Generate API documentation
./gradlew apiDoc
IDE Keyboard Shortcuts
| Action | IntelliJ Shortcut |
|---|---|
| Hot swap code | Ctrl+Shift+F9 |
| Run to cursor | Alt+F9 |
| Evaluate expression | Alt+F8 |
| Find usages | Alt+F7 |
| Go to declaration | Ctrl+B |
| Refactor rename | Shift+F6 |
Resources
Next Steps
For SDK and API patterns, see guidewire-sdk-patterns.
04 同仓库更多 Skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
neuropixels-analysis
Neuropixels neural recording analysis. Load SpikeGLX/OpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen/IBL curation, AI-assisted visual analysis, for Neuropixels 1.0/2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
notebooklm
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.